Example #1
0
function main_screen($mode = 'reg')
{
    global $INSTALLER09, $lang;
    $page_title = $lang['stats_ex_center'];
    $page_detail = "{$lang['stats_ex_details_main']}<br />{$lang['stats_ex_details_main1']}";
    if ($mode == 'reg') {
        $form_code = 'show_reg';
        $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_registr']}</div></div>";
    } else {
        if ($mode == 'topic') {
            $form_code = 'show_topic';
            $table = $lang['stats_ex_newtopicst'];
        } else {
            if ($mode == 'post') {
                $form_code = 'show_post';
                $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_poststs']}</div></div>";
            } else {
                if ($mode == 'msg') {
                    $form_code = 'show_msg';
                    $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_pmsts']}</div></div>";
                } else {
                    if ($mode == 'views') {
                        $form_code = 'show_views';
                        $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_topicviewsts']}</div></div>";
                    } else {
                        if ($mode == 'comms') {
                            $form_code = 'show_comms';
                            $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_comsts']}</div></div>";
                        } else {
                            if ($mode == 'torrents') {
                                $form_code = 'show_torrents';
                                $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_torrsts']}</div></div>";
                            } else {
                                if ($mode == 'reps') {
                                    $form_code = 'show_reps';
                                    $table = "<div class='row'><div class='col-md-12'>{$lang['stats_ex_repsts']}</div></div>";
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $old_date = getdate(time() - 3600 * 24 * 90);
    $new_date = getdate(time() + 3600 * 24);
    $menu = make_side_menu();
    $htmlout = "\n    <div class='well'><div class='row'><div class='col-md-12'><h2 class='text-center'>{$lang['stats_ex_center']}</h2></div></div><br><div class='row'><div class='col-md-12'>{$menu}</div></div><br><div class='row'><div class='col-md-12'>\n    <form action='{$INSTALLER09['baseurl']}/staffpanel.php?tool=stats_extra&amp;action=stats_extra' method='post' name='StatsForm'>\n    <input name='mode' value='{$form_code}' type='hidden'>\n    <div class='row'><div class='col-md-12'><h4 class='text-center'>{$table}</h4></div></div>\n    <div class='row well'><div class='col-md-12'><fieldset><legend><strong>{$lang['stats_ex_infor']}</strong></legend>{$page_detail}</fieldset></div></div>\n    <div class='row well'><div class='col-md-12'><fieldset><legend><strong>{$lang['stats_ex_datefrom']}</strong></legend>";
    $htmlout .= make_select('from_month', make_month(), $old_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_day', make_day(), $old_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_year', make_year(), $old_date['year']) . '</fieldset><br>';
    $htmlout .= "<fieldset><legend><strong>{$lang['stats_ex_dateto']}</strong></legend>";
    $htmlout .= make_select('to_month', make_month(), $new_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_day', make_day(), $new_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_year', make_year(), $new_date['year']) . '</fieldset>';
    $htmlout .= "</div></div>";
    if ($mode != 'views') {
        $htmlout .= "<div class='row'><div class='col-md-12'></div></div><div class='row well'><div class='col-md-12'><fieldset><legend><strong>{$lang['stats_ex_timescale']}</strong></legend>";
        $htmlout .= make_select('timescale', array(0 => array('daily', $lang['stats_ex_daily']), 1 => array('weekly', $lang['stats_ex_weekly']), 2 => array('monthly', $lang['stats_ex_monthly']))) . '</fieldset>';
    }
    $htmlout .= "<br><fieldset><legend><strong>{$lang['stats_ex_ressort']}</strong></legend>";
    $htmlout .= make_select('sortby', array(0 => array('asc', $lang['stats_ex_asc']), 1 => array('desc', $lang['stats_ex_desc'])), 'desc') . '</fieldset>';
    $htmlout .= "</div></div></div>";
    $htmlout .= "<br><fieldset class='text-center'><legend><strong>{$lang['stats_ex_submit']}</strong></legend>\n\t\t<input value='{$lang['stats_ex_show']}' class='btn btn-default' accesskey='s' type='submit'></fieldset></form></div></div>";
    echo stdhead($page_title) . $htmlout . stdfoot();
}
Example #2
0
function main_screen($mode = 'reg')
{
    global $month_names;
    $page_title = "Statistic Center";
    $page_detail = "Please define the date ranges and other options below.<br>Note: The statistics generated are based on the information currently held in the database, they do not take into account pruned forums or delete posts, etc.";
    if ($mode == 'reg') {
        $form_code = 'show_reg';
        $table = 'Registration Statistics<br />';
    } else {
        if ($mode == 'rate') {
            $form_code = 'show_rate';
            $table = 'Rating Statistics';
        } else {
            if ($mode == 'post') {
                $form_code = 'show_post';
                $table = 'Post Statistics';
            } else {
                if ($mode == 'msg') {
                    $form_code = 'show_msg';
                    $table = 'PM Statistics';
                } else {
                    if ($mode == 'torr') {
                        $form_code = 'show_torr';
                        $table = 'Torrent Statistics';
                    } else {
                        if ($mode == 'bans') {
                            $form_code = 'show_bans';
                            $table = 'Ban Statistics';
                        } else {
                            if ($mode == 'comm') {
                                $form_code = 'show_comm';
                                $table = 'Comment Statistics';
                            } else {
                                if ($mode == 'new') {
                                    $form_code = 'show_new';
                                    $table = 'News Statistics';
                                } else {
                                    if ($mode == 'poll') {
                                        $form_code = 'show_poll';
                                        $table = 'Polls Statistics';
                                    } else {
                                        if ($mode == 'rqst') {
                                            $form_code = 'show_rqst';
                                            $table = 'Request Statistics';
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $old_date = getdate(time() - 3600 * 24 * 90);
    $new_date = getdate(time() + 3600 * 24);
    // -----------------------------------------
    $html = "<table id=torrenttable border=1><tr><td>{$table}</td></tr>";
    $html .= "<tr><td>{$page_title}<br />{$page_detail}</td></tr>";
    $html .= start_form(array(1 => array('code', $form_code), 2 => array('act', 'stats')));
    // -----------------------------------------
    // Naaaaaaaaaaaah!!
    // $td_header = array();
    // $td_header[] = array( "&nbsp;"  , "40%" );
    // $td_header[] = array( "&nbsp;"  , "60%" );
    // -----------------------------------------
    $html .= "<tr><td><br /><b>Date From</b>" . form_dropdown("from_month", make_month(), $old_date['mon']) . '&nbsp;&nbsp;' . form_dropdown("from_day", make_day(), $old_date['mday']) . '&nbsp;&nbsp;' . form_dropdown("from_year", make_year(), $old_date['year']) . "<br /></td></tr>";
    $html .= "<tr><td><br /><b>Date To</b>" . form_dropdown("to_month", make_month(), $new_date['mon']) . '&nbsp;&nbsp;' . form_dropdown("to_day", make_day(), $new_date['mday']) . '&nbsp;&nbsp;' . form_dropdown("to_year", make_year(), $new_date['year']) . "<br /></td></tr>";
    if ($mode != 'views') {
        $html .= "<tr><td><br /><b>Time scale</b>" . form_dropdown("timescale", array(0 => array('daily', 'Daily'), 1 => array('weekly', 'Weekly'), 2 => array('monthly', 'Monthly'))) . "<br /></td></tr>";
    }
    $html .= "<tr><td><br /><b>Result Sorting</b>" . form_dropdown("sortby", array(0 => array('asc', 'Ascending - Oldest dates first'), 1 => array('desc', 'Descending - Newest dates first')), 'desc') . "<br /></td></tr>";
    $html .= end_form("Show") . "</table>";
    print $html;
}
Example #3
0
function main_screen($mode = 'reg')
{
    global $INSTALLER09;
    $page_title = "Statistic Center";
    $page_detail = "Please define the date ranges and other options below.<br />Note: The statistics generated are based on the information currently held in the database.";
    if ($mode == 'reg') {
        $form_code = 'show_reg';
        $table = 'Registration Statistics';
    } else {
        if ($mode == 'topic') {
            $form_code = 'show_topic';
            $table = 'New Topic Statistics';
        } else {
            if ($mode == 'post') {
                $form_code = 'show_post';
                $table = 'Post Statistics';
            } else {
                if ($mode == 'msg') {
                    $form_code = 'show_msg';
                    $table = 'PM Statistics';
                } else {
                    if ($mode == 'views') {
                        $form_code = 'show_views';
                        $table = 'Topic View Statistics';
                    } else {
                        if ($mode == 'comms') {
                            $form_code = 'show_comms';
                            $table = 'Comment Statistics';
                        } else {
                            if ($mode == 'torrents') {
                                $form_code = 'show_torrents';
                                $table = 'Torrrents Statistics';
                            } else {
                                if ($mode == 'reps') {
                                    $form_code = 'show_reps';
                                    $table = 'Reputation Statistics';
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $old_date = getdate(time() - 3600 * 24 * 90);
    $new_date = getdate(time() + 3600 * 24);
    $menu = make_side_menu();
    $htmlout = "<div>\n      <div style='background: grey; height: 25px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>Statistics Center</span>\n      </div><br />\n    {$menu}\n    <form action='{$INSTALLER09['baseurl']}/staffpanel.php?tool=stats_extra&amp;action=stats_extra' method='post' name='StatsForm'>\n    <input name='mode' value='{$form_code}' type='hidden' />\n\n\t\n    <div style='text-align: left; width: 50%; border: 1px solid blue; padding: 5px;'>\n\t\t<div style='background: grey; height: 25px; margin-bottom:20px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>{$table}</span>\n    </div>\n    <fieldset><legend><strong>Info</strong></legend>\n    {$page_detail}</fieldset>\n\t\t<fieldset><legend><strong>Date From</strong></legend>";
    $htmlout .= make_select('from_month', make_month(), $old_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_day', make_day(), $old_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_year', make_year(), $old_date['year']) . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>Date To</strong></legend>";
    $htmlout .= make_select('to_month', make_month(), $new_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_day', make_day(), $new_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_year', make_year(), $new_date['year']) . '</fieldset>';
    if ($mode != 'views') {
        $htmlout .= "<fieldset><legend><strong>Time scale</strong></legend>";
        $htmlout .= make_select('timescale', array(0 => array('daily', 'Daily'), 1 => array('weekly', 'Weekly'), 2 => array('monthly', 'Monthly'))) . '</fieldset>';
    }
    $htmlout .= "<fieldset><legend><strong>Result Sorting</strong></legend>";
    $htmlout .= make_select('sortby', array(0 => array('asc', 'Ascending - Oldest dates first'), 1 => array('desc', 'Descending - Newest dates first')), 'desc') . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>Submit it!</strong></legend>\n\t\t\t\t<input value='Show' class='btn' accesskey='s' type='submit' />\n\t\t\t</fieldset>\n\n\t\t</div>\n\t\n    </form></div>";
    echo stdhead($page_title) . $htmlout . stdfoot();
}
function main_screen($mode = 'reg')
{
    global $INSTALLER09, $lang;
    $page_title = $lang['stats_ex_center'];
    $page_detail = "{$lang['stats_ex_details_main']}<br />{$lang['stats_ex_details_main1']}";
    if ($mode == 'reg') {
        $form_code = 'show_reg';
        $table = $lang['stats_ex_registr'];
    } else {
        if ($mode == 'topic') {
            $form_code = 'show_topic';
            $table = $lang['stats_ex_newtopicst'];
        } else {
            if ($mode == 'post') {
                $form_code = 'show_post';
                $table = $lang['stats_ex_poststs'];
            } else {
                if ($mode == 'msg') {
                    $form_code = 'show_msg';
                    $table = $lang['stats_ex_pmsts'];
                } else {
                    if ($mode == 'views') {
                        $form_code = 'show_views';
                        $table = $lang['stats_ex_topicviewsts'];
                    } else {
                        if ($mode == 'comms') {
                            $form_code = 'show_comms';
                            $table = $lang['stats_ex_comsts'];
                        } else {
                            if ($mode == 'torrents') {
                                $form_code = 'show_torrents';
                                $table = $lang['stats_ex_torrsts'];
                            } else {
                                if ($mode == 'reps') {
                                    $form_code = 'show_reps';
                                    $table = $lang['stats_ex_repsts'];
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $old_date = getdate(time() - 3600 * 24 * 90);
    $new_date = getdate(time() + 3600 * 24);
    $menu = make_side_menu();
    $htmlout = "<div>\n      <div style='background: grey; height: 25px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>{$lang['stats_ex_center']}</span>\n      </div><br />\n    {$menu}\n    <form action='{$INSTALLER09['baseurl']}/staffpanel.php?tool=stats_extra&amp;action=stats_extra' method='post' name='StatsForm'>\n    <input name='mode' value='{$form_code}' type='hidden' />\n\n\t\n    <div style='text-align: left; width: 50%; border: 1px solid blue; padding: 5px;'>\n\t\t<div style='background: grey; height: 25px; margin-bottom:20px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>{$table}</span>\n    </div>\n    <fieldset><legend><strong>{$lang['stats_ex_infor']}</strong></legend>\n    {$page_detail}</fieldset>\n\t\t<fieldset><legend><strong>{$lang['stats_ex_datefrom']}</strong></legend>";
    $htmlout .= make_select('from_month', make_month(), $old_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_day', make_day(), $old_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_year', make_year(), $old_date['year']) . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>{$lang['stats_ex_dateto']}</strong></legend>";
    $htmlout .= make_select('to_month', make_month(), $new_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_day', make_day(), $new_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_year', make_year(), $new_date['year']) . '</fieldset>';
    if ($mode != 'views') {
        $htmlout .= "<fieldset><legend><strong>{$lang['stats_ex_timescale']}</strong></legend>";
        $htmlout .= make_select('timescale', array(0 => array('daily', $lang['stats_ex_daily']), 1 => array('weekly', $lang['stats_ex_weekly']), 2 => array('monthly', $lang['stats_ex_monthly']))) . '</fieldset>';
    }
    $htmlout .= "<fieldset><legend><strong>{$lang['stats_ex_ressort']}</strong></legend>";
    $htmlout .= make_select('sortby', array(0 => array('asc', $lang['stats_ex_asc']), 1 => array('desc', $lang['stats_ex_desc'])), 'desc') . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>{$lang['stats_ex_submit']}</strong></legend>\n\t\t\t\t<input value='{$lang['stats_ex_show']}' class='btn' accesskey='s' type='submit' />\n\t\t\t</fieldset>\n\n\t\t</div>\n\t\n    </form></div>";
    echo stdhead($page_title) . $htmlout . stdfoot();
}