function MoveUserTrafficDataForm()
{
    global $SAMSConf;
    global $USERConf;
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    $DB = new SAMSDB();
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit;
    }
    PageTop("switchuser_48.jpg", "{$MoveUserTrafficDataForm_1}");
    print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">";
    print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/samsbackup.html\">{$documentation}</A>";
    print "<P>\n";
    print "<FORM NAME=\"BACKUP\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"moveusertrafficdata\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"configbuttom_6_moveusertrafficdata.php\">\n";
    $dateselect->SetPeriod();
    print "<TABLE WIDTH=70%>\n";
    print "<TR><TD WIDTH=20%>{$MoveUserTrafficDataForm_2}\n";
    print "<TD WIDTH=35%><SELECT NAME=\"userfrom\">\n";
    $QUERY = "SELECT s_user FROM squidcache GROUP BY s_user ORDER BY s_user";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        print "<OPTION VALUE=\"" . $row['s_user'] . "\"> " . $row['s_user'] . "\n";
    }
    print "</SELECT>\n";
    print "<TD WIDTH=10%> {$MoveUserTrafficDataForm_3}\n";
    print "<TD WIDTH=35%><SELECT NAME=\"userto\">\n";
    $QUERY = "SELECT * FROM squiduser ORDER BY s_nick";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        print "<OPTION VALUE=\"" . $row['s_nick'] . "\"> " . $row['s_nick'] . "\n";
    }
    print "</SELECT>\n";
    print "</TABLE>\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$MoveUserTrafficDataForm_4}\">\n";
    print "</FORM>\n";
}
示例#2
0
function UserTimeTrafficForm()
{
    global $SAMSConf;
    global $USERConf;
    global $SquidUSERConf;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $SquidUSERConf = new SAMSUSER();
    $SquidUSERConf->sams_user($id);
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("GSC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) {
        PageTop("ttraffic_48.jpg", "{$traffic_1} <FONT COLOR=\"BLUE\">{$SquidUSERConf->s_nick}</FONT> <BR>{$URLTimeForm_userbuttom_4_time_1}");
        print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=UserName value=\"{$SquidUSERConf->s_user_id}\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"usertimetraffic\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"userbuttom_3_time.php\">\n";
        //		$dateselect->SetDate();
        $dateselect->ThisDate();
        print "</FORM>\n";
    }
}
示例#3
0
function UsersTrafficForm()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("CS") != 1) {
        exit(0);
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["userid"])) {
        $userid = $_GET["userid"];
    }
    PageTop("traffic_48.jpg", "{$alltraffic_1}<BR>{$usersbuttom_2_traffic_UsersTrafficForm_1}");
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userstrafficperiod\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"usersbuttom_2_traffic.php\">\n";
    $dateselect->SetPeriod();
    print "</FORM>\n";
}
function selectimportdateform()
{
    global $SAMSConf;
    global $USERConf;
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit(0);
    }
    if (isset($_GET["hostname"])) {
        $hostname = $_GET["hostname"];
    }
    if (isset($_GET["username"])) {
        $username = $_GET["username"];
    }
    if (isset($_GET["pass"])) {
        $pass = $_GET["pass"];
    }
    $oldDB = new CREATESAMSDB("MySQL", "0", $hostname, $username, $pass, "squidlog", "0");
    $num_rows = $oldDB->samsdb_query_value("SELECT min(date) FROM squidlog.cache");
    $row = $oldDB->samsdb_fetch_array();
    $startdate = $row[0];
    $num_rows = $oldDB->samsdb_query_value("SELECT max(date) FROM squidlog.cache");
    $row = $oldDB->samsdb_fetch_array();
    $enddate = $row[0];
    // Получаем дату, за которую производится импорт данных
    PageTop("importcachedb_48.jpg", "{$configbuttom_3_importcache_selectimportdateform_1}");
    print "<P><IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">";
    print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/importfromsams1.html\">{$documentation}</A>";
    print "<P>\n";
    echo "<B>{$configbuttom_3_importcache_selectimportdateform_2} {$startdate} {$configbuttom_3_importcache_selectimportdateform_3} {$enddate}";
    echo "<BR>{$configbuttom_3_importcache_selectimportdateform_4}</B>";
    require "reportsclass.php";
    $dateselect = new DATESELECT($startdate, $enddate);
    print "<FORM NAME=\"selectdate\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"importcachesumtable\">\n";
    #  print("<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"importcachetable\">\n");
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"configbuttom_3_importcache.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"hostname\" value=\"{$hostname}\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"username\" value=\"{$username}\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"pass\" value=\"{$pass}\">\n";
    $dateselect->SetPeriod();
    printf("<BR><CENTER>");
    print "</FORM>\n";
}
示例#5
0
function GroupTrafficForm()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("CS") != 1) {
        exit(0);
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    $DB = new SAMSDB();
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $a = array(array($usersbuttom_2_traffic_UsersTrafficForm_4, 'all_sum', 'desc', 'CHECKED'), array($usersbuttom_2_traffic_UsersTrafficForm_5, 's_nick', '', ''));
    $num_rows = $DB->samsdb_query_value("SELECT * FROM sgroup WHERE s_group_id='{$id}' ");
    $row = $DB->samsdb_fetch_array();
    PageTop("traffic_48.jpg", "{$grptraffic_1} <FONT COLOR=\"BLUE\"> " . $row['s_name'] . " </FONT><BR> {$groupbuttom_1_traffic_GroupTrafficForm_1}");
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"grouptrafficperiod\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"groupbuttom_2_traffic.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" value=\"{$id}\">\n";
    $dateselect->SetPeriod2("{$usersbuttom_2_traffic_UsersTrafficForm_3}", $a);
    print "</FORM>\n";
}
示例#6
0
function UsersStatForm()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("CS") != 1) {
        exit(0);
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["userid"])) {
        $userid = $_GET["userid"];
    }
    PageTop("filesize_48.jpg", "{$usersbuttom_3_file_usersbuttom_3_file_1}");
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userstrafficstat\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"usersbuttom_4_file.php\">\n";
    $dateselect->SetPeriod();
    print "<SELECT NAME=\"type\">";
    print "<OPTION VALUE=\"size\" SELECTED> {$mysqltools_dateselect5}";
    print "<OPTION VALUE=\"url\"> {$mysqltools_dateselect6}";
    print " <INPUT TYPE=\"TEXT\" NAME=\"text\">\n";
    print "</FORM>\n";
}
示例#7
0
function SamsLogForm()
{
    global $SAMSConf;
    global $USERConf;
    global $SquidUSERConf;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $SquidUSERConf = new SAMSUSER();
    $SquidUSERConf->sams_user($id);
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("GSC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) {
        PageTop("samslog_48.jpg", "{$configbuttom_7_log_1}");
        print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=UserName value=\"{$SquidUSERConf->s_user_id}\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"showlogperiod\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"configbuttom_7_log.php\">\n";
        $dateselect->SetPeriod();
        print "<B>{$configbuttom_7_log_8}</B> <INPUT TYPE=\"checkbox\" NAME=\"clear\"><br>";
        print "</FORM>\n";
    }
}
示例#8
0
function UserFileSizeForm()
{
    global $SAMSConf;
    global $USERConf;
    global $SquidUSERConf;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $SquidUSERConf = new SAMSUSER();
    $SquidUSERConf->sams_user($id);
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("GSC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) {
        PageTop("filesize_48.jpg", "{$traffic_1} <FONT COLOR=\"BLUE\">{$SquidUSERConf->s_nick}</FONT> <BR>{$userbuttom_3_file_UserFileSizeForm_1}");
        print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=UserName value=\"{$SquidUSERConf->s_user_id}\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userfilesize\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"userbuttom_3_file.php\">\n";
        $dateselect->SetPeriod();
        print "<B>{$usersbuttom_3_file_UsersFileSizePeriod_3}</B> <INPUT TYPE=\"TEXT\" NAME=\"size\"><br>";
        print "</FORM>\n";
    }
}
示例#9
0
function UsersPercentTrafficForm()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("CS") != 1) {
        exit(0);
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    $a = array(array('users', 'users', 'desc', 'CHECKED'), array('groups', 'groups', '', ''));
    PageTop("persent_48.jpg", "{$usersbuttom_4_percent_UsersPercentTrafficForm_1}<BR>{$usersbuttom_4_percent_UsersPercentTrafficForm_2}");
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userschart\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"usersbuttom_4_percent.php\">\n";
    $dateselect->SetPeriod2("select sort mode", $a);
    print "</FORM>\n";
}
示例#10
0
function UsersSitesForm()
{
    global $SAMSConf;
    global $USERConf;
    global $SquidUSERConf;
    require "reportsclass.php";
    $dateselect = new DATESELECT("", "");
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("GSC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) {
        PageTop("straffic_48.jpg", "{$alltraffic_1} <BR>{$groupbuttom_3_site_GroupSitesPeriod_1}");
        print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userssitesperiod\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"usersbuttom_3_site.php\">\n";
        $dateselect->SetPeriod();
        print "</FORM>\n";
    }
}