<?php include_once dirname(__FILE__) . '/layout/opt_header.php'; ?> <?php if (isset($_GET['tracking'])) { $track_by = $_GET['tracking']; opt_settings('click_tracking', $track_by); } else { $track_by = opt_settings('click_tracking'); if ($track_by == '') { $track_by = 'optins'; opt_settings('click_tracking', 'optins'); } } function opt_stats_dropdown($track_by) { unset($options); $options[0]['name'] = 'Optins'; $options[0]['value'] = 'optins'; $options[1]['name'] = 'OptinLink Clicks'; $options[1]['value'] = 'clicks'; $options[2]['name'] = 'OptinLink Views'; $options[2]['value'] = 'views'; $options[3]['name'] = 'Unique Visitors'; $options[3]['value'] = 'visitors'; $options[4]['name'] = 'Page Impressions'; $options[4]['value'] = 'impressions'; $options[5]['name'] = 'All Stats By Hour'; $options[5]['value'] = 'hour'; $options[6]['name'] = 'All Stats By Day'; $options[6]['value'] = 'day'; $options[7]['name'] = 'All Stats By Month'; $options[7]['value'] = 'month'; $output = opt_dropdown('page_count',$options,$track_by,$class='','style="width:200px;" onChange="window.location=\''.opt_url('tracking=&sort=&order=','page').'&tracking=\'+this.value"'); return $output; } ?> <h2>OptinLinks Statistics Log <?php echo opt_advanced_button(); ; ?> <?php echo opt_help_button(); ; ?></h2> <?php opt_help_text('securedpages'); ?> <?php echo opt_advanced_search(); ; ?> <?php ?> <table width="100%" style="margin:0; padding:0;"><tr style="padding-left:0;"><td style="padding-left:0;"> Show Stats: <?php echo opt_stats_dropdown($track_by); ; ?> <?php if ((isset($_GET['order']) && $_GET['order'] != '') || (isset($_GET['sort']) && $_GET['sort'] != '')) { ?> <a href="<?php echo opt_url('sort=&order=', '') ; ?>" class="button" style="margin-left:10px;">Clear Sorting</a> <?php } ?> </td><td> <div class="alignright actions" style="margin:10px 0 0 0; text-align:right;"> <?php echo opt_date_range_form() ; ?> </div> </td></tr></table> <div id="opt_table_container"> <?php if ($track_by == 'visitors') { include_once dirname(__FILE__) . '/visitor_tracking/visitors.php'; } elseif ($track_by == 'impressions') { include_once dirname(__FILE__) . '/visitor_tracking/impressions.php'; } elseif ($track_by == 'optins') { include_once dirname(__FILE__) . '/visitor_tracking/optins.php'; } elseif ($track_by == 'clicks') { include_once dirname(__FILE__) . '/visitor_tracking/clicks.php'; } elseif ($track_by == 'views') { include_once dirname(__FILE__) . '/visitor_tracking/views.php'; } elseif ($track_by == 'hour' || $track_by == 'day' || $track_by == 'month') { include_once dirname(__FILE__) . '/visitor_tracking/stats_by_time.php'; } else { echo 'hey buddy'; } ?> </div> <?php include_once dirname(__FILE__) . '/layout/opt_footer.php'; ?> 