Ejemplo n.º 1
0
function SaveRedirList()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("LC") != 1) {
        exit;
    }
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM redirect WHERE  s_redirect_id='{$id}' ");
    $row = $DB->samsdb_fetch_array();
    PageTop("export_48.jpg", "{$redir_exporturllist1} <FONT COLOR=\"BLUE\">{$row['s_name']}</FONT>");
    $DB->free_samsdb_query();
    $filename = strftime("urllist-%d%b%Y-%H-%M-%S.txt");
    $fout = fopen("data/{$filename}", "w");
    if ($fout == FALSE) {
        echo "can't open sams config file data/{$filename}<BR>";
        exit(0);
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM url WHERE  s_redirect_id='{$id}' ");
    while ($row = $DB->samsdb_fetch_array()) {
        fwrite($fout, "{$row['s_url']}\n");
    }
    fclose($fout);
    print "<A HREF=\"data/{$filename}\">\n";
    print "<BR>{$redir_exporturllist2} \n";
    print "</A>\n";
}
Ejemplo n.º 2
0
function UpdateGroupForm()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit;
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM sgroup WHERE s_group_id='{$id}' ");
    $row = $DB->samsdb_fetch_array();
    PageTop("shablon.jpg", "{$groupbuttom_0_prop_UpdateGroupForm_1} <FONT COLOR=\"BLUE\">{$row['s_name']}</FONT>");
    print "<FORM NAME=\"UPDATEGROUP\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"updategroup\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"groupbuttom_0_prop.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" value=\"{$id}\">\n";
    print "<TABLE  BORDER=0>\n";
    print "<TR>\n";
    print "<TD><B>{$groupbuttom_0_prop_UpdateGroupForm_2}: </B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"nick\" SIZE=30 VALUE=\"{$row['s_name']}\"> \n";
    print "</TABLE>\n";
    /* calendar */
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$shablonbuttom_1_prop_UpdateShablonForm_7}\">\n";
    print "</FORM>\n";
}
Ejemplo n.º 3
0
function redirbuttom_3_deletelist()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM redirect WHERE s_redirect_id='{$id}' ");
    $row = $DB->samsdb_fetch_array();
    if ($USERConf->ToWebInterfaceAccess("LC") == 1) {
        print "<SCRIPT language=JAVASCRIPT>\n";
        print "function DeleteList(id)\n";
        print "{\n";
        print "  value=window.confirm(\"{$redirbuttom_3_deletelist_redirbuttom_3_deletelist_1} {$row['s_name']} \" );\n";
        print "  if(value==true) \n";
        print "     {\n";
        print "        parent.basefrm.location.href=\"main.php?show=exe&function=deletelist&filename=redirlisttray.php&id={$id}\";\n";
        print "     }\n";
        print "}\n";
        print "</SCRIPT> \n";
        print "<TD CLASS=\"samstraytd\">\n";
        print "<IMAGE id=Trash name=\"Trash\" src=\"{$SAMSConf->ICONSET}/trash_32.jpg\" \n ";
        print "TITLE=\"{$redirbuttom_3_deletelist_redirbuttom_3_deletelist_1}\"  border=0 ";
        print "onclick=DeleteList(\"{$id}\") \n";
        print "onmouseover=\"this.src='{$SAMSConf->ICONSET}/trash_48.jpg'\" \n";
        print "onmouseout= \"this.src='{$SAMSConf->ICONSET}/trash_32.jpg'\" >\n";
    }
}
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";
}
Ejemplo n.º 5
0
 function SAMSSHABLON($shablonid)
 {
     global $SAMSConf;
     $DB = new SAMSDB();
     $num_rows = $DB->samsdb_query_value("SELECT * FROM shablon WHERE s_shablon_id='{$shablonid}' ");
     $row = $DB->samsdb_fetch_array();
     $this->s_shablon_id = $row['s_shablon_id'];
     $this->s_shablon_id2 = $row['s_shablon_id2'];
     $this->s_name = $row['s_name'];
     $this->s_auth = $row['s_auth'];
     $this->s_quote = $row['s_quote'];
     $this->s_period = $row['s_period'];
     $this->s_clrdate = $row['s_clrdate'];
     $this->s_alldenied = $row['s_alldenied'];
     $DB->free_samsdb_query();
 }
Ejemplo n.º 6
0
 function SAMSPOOL($poolid)
 {
     global $SAMSConf;
     $DB = new SAMSDB();
     $num_rows = $DB->samsdb_query_value("SELECT * FROM delaypool WHERE s_pool_id='{$poolid}' ");
     $row = $DB->samsdb_fetch_array();
     $this->s_pool_id = $row['s_pool_id'];
     $this->s_name = $row['s_name'];
     $this->s_class = $row['s_class'];
     $this->s_agg1 = $row['s_agg1'];
     $this->s_agg2 = $row['s_agg2'];
     $this->s_net1 = $row['s_net1'];
     $this->s_net2 = $row['s_net2'];
     $this->s_ind1 = $row['s_ind1'];
     $this->s_ind2 = $row['s_ind2'];
     $DB->free_samsdb_query();
 }
Ejemplo n.º 7
0
function lffolder_5_z0_trange()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        $item = array("classname" => "timerange", "icon" => "clock.gif", "target" => "basefrm", "url" => "main.php?show=exe&filename=trangetray.php&function=addtrangeform", "text" => "{$lffolder_5_z0_trange_lfforder_5_z0_trange_1}");
        treeFolder($item);
        $num_rows = $DB->samsdb_query_value("SELECT * FROM timerange");
        while ($row = $DB->samsdb_fetch_array()) {
            $item = array("classname" => "timerange", "target" => "tray", "url" => "tray.php?show=exe&filename=trangetray.php&function=trangetray&id={$row['s_trange_id']}", "text" => "{$row['s_name']}");
            treeFolderItem($item);
        }
        treeFolderClose();
    }
}
Ejemplo n.º 8
0
function lffolder_5_z1_shablon()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        $item = array("classname" => "shablon", "icon" => "paddressbook.gif", "target" => "basefrm", "url" => "main.php?show=exe&function=newshablonform&filename=shablonnew.php", "text" => "{$lframe_sams_UserShablonFolder_1}");
        treeFolder($item);
        $DB->samsdb_query("SELECT * FROM shablon ORDER BY s_name");
        while ($row = $DB->samsdb_fetch_array()) {
            $item = array("classname" => "shablon", "target" => "tray", "url" => "tray.php?show=exe&function=shablontray&filename=shablontray.php&id={$row['s_shablon_id']}", "text" => "{$row['s_name']}");
            treeFolderItem($item);
        }
        treeFolderClose();
    }
}
Ejemplo n.º 9
0
function lffolder_5_z20_delaypool()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        $item = array("classname" => "delaypool", "icon" => "delaypool.png", "target" => "basefrm", "url" => "main.php?show=exe&filename=pooltray.php&function=addpoolform", "text" => "{$lframe_sams_DelayPools}");
        treeFolder($item);
        $num_rows = $DB->samsdb_query_value("SELECT * FROM delaypool");
        while ($row = $DB->samsdb_fetch_array()) {
            $item = array("classname" => "delaypool", "target" => "tray", "url" => "tray.php?show=exe&filename=pooltray.php&function=pooltray&id={$row['s_pool_id']}", "text" => "{$row['s_name']}");
            treeFolderItem($item);
        }
        treeFolderClose();
    }
}
Ejemplo n.º 10
0
function lffolder_2_squid()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        $item = array("classname" => "squid", "icon" => "pobject.gif", "target" => "tray", "url" => "tray.php?show=exe&filename=squidtray.php&function=squidtray", "text" => "SQUID");
        treeFolder($item);
        $DB->samsdb_query_value("SELECT * FROM proxy");
        while ($row = $DB->samsdb_fetch_array()) {
            $item = array("classname" => "squid", "target" => "tray", "url" => "tray.php?show=exe&function=proxytray&filename=proxytray.php&id={$row['s_proxy_id']}", "text" => "{$row['s_description']}");
            treeFolderItem($item);
        }
        treeFolderClose();
    }
}
Ejemplo n.º 11
0
function lffolder_4_z2_url()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("CL") == 1) {
        $item = array("classname" => "url", "icon" => "stop.gif", "target" => "basefrm", "url" => "main.php?show=exe&filename=redirlisttray.php&function=addurllistform&type=regex", "text" => "{$lframe_sams_FolderContextDenied_1}");
        treeFolder($item);
        $num_rows = $DB->samsdb_query_value("SELECT * FROM redirect WHERE s_type='regex' ");
        while ($row = $DB->samsdb_fetch_array()) {
            $item = array("classname" => "url", "target" => "tray", "url" => "tray.php?show=exe&filename=redirlisttray.php&function=redirlisttray&id={$row['s_redirect_id']}", "text" => "{$row['s_name']}");
            treeFolderItem($item);
        }
        treeFolderClose();
    }
}
Ejemplo n.º 12
0
 function SAMSPROXY($proxy_id)
 {
     global $SAMSConf;
     $DB = new SAMSDB();
     $num_rows = $DB->samsdb_query_value("SELECT * FROM proxy WHERE s_proxy_id='{$proxy_id}' ");
     $row = $DB->samsdb_fetch_array();
     $this->s_proxy_id = $row['s_proxy_id'];
     $this->s_description = $row['s_description'];
     $this->s_endvalue = $row['s_endvalue'];
     $this->s_redirect_to = $row['s_redirect_to'];
     $this->s_denied_to = $row['s_denied_to'];
     $this->s_redirector = $row['s_redirector'];
     $this->s_delaypool = $row['s_delaypool'];
     $this->s_auth = $row['s_auth'];
     $this->s_wbinfopath = $row['s_wbinfopath'];
     $this->s_separator = $row['s_separator'];
     $this->s_usedomain = $row['s_usedomain'];
     $this->s_bigd = $row['s_bigd'];
     $this->s_bigu = $row['s_bigu'];
     $this->s_sleep = $row['s_sleep'];
     $this->s_parser = $row['s_parser'];
     $this->s_parser_time = $row['s_parser_time'];
     $this->s_count_clean = $row['s_count_clean'];
     $this->s_nameencode = $row['s_nameencode'];
     $this->s_realsize = $row['s_realsize'];
     $this->s_checkdns = $row['s_checkdns'];
     $this->s_debuglevel = $row['s_debuglevel'];
     $this->s_defaultdomain = $row['s_defaultdomain'];
     $this->s_squidbase = $row['s_squidbase'];
     $this->s_udscript = $row['s_udscript'];
     $this->s_adminaddr = $row['s_adminaddr'];
     $this->s_kbsize = $row['s_kbsize'];
     $this->s_mbsize = $row['s_mbsize'];
     $this->s_ldapserver = $row['s_ldapserver'];
     $this->s_ldapbasedn = $row['s_ldapbasedn'];
     $this->s_ldapuser = $row['s_ldapuser'];
     $this->s_ldappasswd = $row['s_ldappasswd'];
     $this->s_ldapusergroup = $row['s_ldapusergroup'];
     $this->s_autouser = $row['s_autouser'];
     $this->s_autotpl = $row['s_autotpl'];
     $this->s_autogrp = $row['s_autogrp'];
     $DB->free_samsdb_query();
 }
Ejemplo n.º 13
0
function SysPlugConfigForm()
{
    global $SAMSConf;
    $DB = new SAMSDB();
    $num_rows = $DB->samsdb_query_value("SELECT * FROM sysinfo");
    PageTop("sysplug_64.png", "System Plugins");
    print "<FORM NAME=\"sysplugconfigform\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"sysplugconfig\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"sysplugconfigtray.php\">\n";
    print "<TABLE CLASS=samstable>\n";
    print "<TH>Name</TH>\n";
    print "<TH>Version</TH>\n";
    print "<TH>Author</TH>\n";
    print "<TH>Enabled</TH>\n";
    while ($row = $DB->samsdb_fetch_array()) {
        /*      
              print("<TR>\n");
              if(isset($_GET["$row[s_row_id]"])) $val=$_GET["$row[s_row_id]"];
        
              print("<TD>s_row_id=$row[s_row_id]</TD>\n");
              print("<TD>val=$val</TD>\n");
              if($val=="on") $val=1; else $val=0;
              print("<TD>val=$val</TD>\n");
              print("<TD>s_status=$row[s_status]</TD>\n");
              print("</TR>\n");
        */
        print "<TR>\n";
        print "  <TD>{$row['s_name']}</TD>\n";
        print "  <TD>{$row['s_version']}</TD>\n";
        print "  <TD>{$row['s_author']}</TD>\n";
        $CHECKED = "";
        if ($row['s_status'] == 1) {
            $CHECKED = "CHECKED";
        }
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"{$row['s_row_id']}\" {$CHECKED}></TD>\n";
        print "</TR>\n";
    }
    $DB->free_samsdb_query();
    print "</TABLE>\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"Configure\">\n";
    print "</FORM>\n";
}
Ejemplo n.º 14
0
function RemoveCache()
{
    global $SAMSConf;
    $DB = new SAMSDB("{$SAMSConf->DB_ENGINE}", $SAMSConf->ODBC, $SAMSConf->DB_SERVER, $SAMSConf->DB_USER, $SAMSConf->DB_PASSWORD, $SAMSConf->SAMSDB, $SAMSConf->PDO);
    $DB2 = new SAMSDB("{$SAMSConf->DB_ENGINE}", $SAMSConf->ODBC, $SAMSConf->DB_SERVER, $SAMSConf->DB_USER, $SAMSConf->DB_PASSWORD, $SAMSConf->SAMSDB, $SAMSConf->PDO);
    if (isset($_GET["cache"])) {
        $cache = $_GET["cache"];
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM proxy ");
    while ($row = $DB->samsdb_fetch_array()) {
        $id = $row['s_proxy_id'];
        if ($cache[$id] == "on") {
            $DB2->samsdb_query("DELETE FROM {$SAMSConf->SAMSDB}.proxy WHERE s_proxy_id=\"{$id}\" ");
        }
    }
    print "<SCRIPT>\n";
    print "  parent.basefrm.location.href=\"main.php?show=exe&function=cacheform&filename=squidbuttom_4_addcache.php\"; \n";
    print "  parent.lframe.location.href=\"lframe.php\";\n";
    print "</SCRIPT> \n";
}
Ejemplo n.º 15
0
 function LoadUndefinedUserVariables($request)
 {
     global $SAMSConf;
     $DB = new SAMSDB();
     $num_rows = $DB->samsdb_query_value($request);
     if ($num_rows > 0) {
         $row = $DB->samsdb_fetch_array();
         $this->UserName = $row['s_nick'];
         $this->UserGroup = $row['s_group_id'];
         $this->gauditor = $row['s_gauditor'];
         $this->autherrorc = $row['s_autherrorc'];
         $this->autherrort = $row['s_autherrort'];
         $this->userid = $row['s_user_id'];
         $this->salt = substr($row['s_passwd'], 0, 2);
         return 1;
     } else {
         $this->UserName = "";
     }
     return 0;
 }
Ejemplo n.º 16
0
function DeleteShablon()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit;
    }
    if ($sname != "default") {
        $num_rows = $DB->samsdb_query_value("SELECT * FROM squiduser WHERE s_shablon_id='{$id}' ");
        $DB->free_samsdb_query();
        if ($num_rows == 0) {
            $QUERY = "select s_name from shablon where s_shablon_id='{$id}'";
            $DB->samsdb_query_value($QUERY);
            $row = $DB->samsdb_fetch_array();
            $s_name = $row['s_name'];
            $DB->free_samsdb_query();
            $QUERY = "delete from auth_param where (s_param='adldgroup' OR s_param='ntlmgroup' OR s_param='ldapgroup') AND s_value='{$s_name}'";
            $DB->samsdb_query($QUERY);
            $QUERY = "DELETE FROM shablon WHERE s_shablon_id='{$id}'";
            $DB->samsdb_query($QUERY);
        } else {
            PageTop("denied.gif", "<FONT SIZE=+3 COLOR=\"RED\"> {$shablonbuttom_9_delete_DeleteShablon_3} </FONT>");
            echo "<FONT  SIZE=+1>{$shablonbuttom_9_delete_DeleteShablon_1} {$num_rows} {$shablonbuttom_9_delete_DeleteShablon_2}</FONT>";
            exit(0);
        }
    }
    print "OK<BR>";
    print "<SCRIPT>\n";
    print "        parent.lframe.location.href=\"lframe.php\";\n";
    print "        parent.basefrm.location.href=\"main.php?show=exe&function=newshablonform&filename=shablonnew.php\";\n";
    print "</SCRIPT> \n";
}
Ejemplo n.º 17
0
 function SAMSTRANGE($trangeid)
 {
     global $SAMSConf;
     $DB = new SAMSDB();
     $num_rows = $DB->samsdb_query_value("SELECT *, extract(hour from s_timestart) as s_hour, extract(hour from s_timeend) as e_hour, extract(minute from s_timestart) as s_min, extract(minute from s_timeend) as e_min  FROM timerange WHERE s_trange_id='{$trangeid}' ");
     $row = $DB->samsdb_fetch_array();
     $this->s_trange_id = $row['s_trange_id'];
     $this->s_name = $row['s_name'];
     $this->s_timestart = $row['s_timestart'];
     $this->s_timeend = $row['s_timeend'];
     $this->s_shour = $row['s_hour'];
     $this->s_ehour = $row['e_hour'];
     $this->s_smin = $row['s_min'];
     $this->s_emin = $row['e_min'];
     if (strstr($row['s_days'], "M")) {
         $this->s_days[1] = "CHECKED";
     }
     if (strstr($row['s_days'], "T")) {
         $this->s_days[2] = "CHECKED";
     }
     if (strstr($row['s_days'], "W")) {
         $this->s_days[3] = "CHECKED";
     }
     if (strstr($row['s_days'], "H")) {
         $this->s_days[4] = "CHECKED";
     }
     if (strstr($row['s_days'], "F")) {
         $this->s_days[5] = "CHECKED";
     }
     if (strstr($row['s_days'], "A")) {
         $this->s_days[6] = "CHECKED";
     }
     if (strstr($row['s_days'], "S")) {
         $this->s_days[7] = "CHECKED";
     }
     $DB->free_samsdb_query();
 }
Ejemplo n.º 18
0
function UserForm()
{
    global $SAMSConf;
    $DB = new SAMSDB();
    $DB2 = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["userid"])) {
        $userid = $_GET["userid"];
    }
    $num_rows = $DB->samsdb_query_value("SELECT * FROM squiduser WHERE s_user_id='{$userid}' ");
    $row = $DB->samsdb_fetch_array();
    $num_rows2 = $DB2->samsdb_query_value("SELECT * FROM sgroup WHERE s_group_id='{$row['s_group_id']}' ");
    $row2 = $DB2->samsdb_fetch_array();
    PageTop("user.jpg", "{$usertray_UserForm_1} <FONT COLOR=\"BLUE\">{$row['nick']}</FONT>");
    print "<TABLE>\n";
    print "<TR>\n";
    print "<TD>\n";
    print "<B>Nickname:\n";
    print "<TD>\n";
    print "{$row['s_nick']}\n";
    if ($SAMSConf->NTLMDOMAIN == "Y") {
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_2}\n";
        print "<TD>\n";
        print "{$row['S_domain']}\n";
    }
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_3}:\n";
        print "<TD>\n";
        print "{$row['s_ip']}\n";
    }
    print "<TR>\n";
    print "<TD>\n";
    print "<B>{$usertray_UserForm_4}: \n";
    print "<TD>\n";
    print "{$row['s_name']}\n";
    print "<TR>\n";
    print "<TD>\n";
    print "<B>{$usertray_UserForm_5}: \n";
    print "<TD>\n";
    print "{$row['s_soname']}\n";
    print "<TR>\n";
    print "<TD>\n";
    print "<B>{$usertray_UserForm_6}: \n";
    print "<TD>\n";
    print "{$row['s_family']} \n";
    print "<TR>\n";
    print "<TD>\n";
    print "<B>{$usertray_UserForm_7}: \n";
    print "<TD>\n";
    print "{$row2['s_name']}\n";
    $DB2->free_samsdb_query();
    if ($USERConf->ToWebInterfaceAccess("C") == 1 || strcasecmp($SAMSConf->domainusername, $row[nick]) == 0 || $SAMSConf->groupauditor == $row[group]) {
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_8}: \n";
        print "<TD>\n";
        if ($row['s_quote'] > 0) {
            print " {$row['s_quote']} Mb";
        } else {
            print " unlimited ";
        }
        //       print("$row[quotes] Mb\n");
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_9}: \n";
        print "<TD>\n";
        $syea = strftime("%Y");
        $smon = strftime("%m");
        $eday = strftime("%d");
        $sdate = "{$syea}-{$smon}-1";
        $edate = "{$syea}-{$smon}-{$eday}";
        $stime = "0:00:00";
        $etime = "0:00:00";
        //       if($SAMSConf->realtraffic=="real")
        //	     PrintTrafficSize($row['s_size']-$row['s_hit']);
        //       else
        //	     PrintTrafficSize($row['s_size']);
    }
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_10}:\n";
        print "<TD>\n";
        if ($row['s_enabled'] == 2) {
            print "{$usertray_UserForm_14}\n";
        } else {
            if ($row['s_enabled'] == 1) {
                print "{$usertray_UserForm_13}\n";
            } else {
                if ($row['s_enabled'] == 0) {
                    print "{$usertray_UserForm_15}\n";
                } else {
                    if ($row['s_enabled'] == -1) {
                        print "{$usertray_UserForm_11}\n";
                    } else {
                        print "Unknown status\n";
                    }
                }
            }
        }
        $num_rows2 = $DB2->samsdb_query_value("SELECT * FROM shablon WHERE s_shablon_id='{$row['s_shablon_id']}' ");
        $row2 = $DB2->samsdb_fetch_array();
        print "<TR>\n";
        print "<TD>\n";
        print "<B>{$usertray_UserForm_12}: \n";
        print "<TD>\n";
        print "<A HREF=\"tray.php?show=exe&function=shablontray&id={$row2['s_shablon_id']}\" TARGET=\"tray\">{$row2['s_name']}</A>\n";
        print "</TABLE>\n";
    }
}
Ejemplo n.º 19
0
function AuthNTLMValues()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit;
    }
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    $DB = new SAMSDB();
    $DB2 = new SAMSDB();
    PageTop("config_48.jpg", $lframe_sams_Auth_Title_NTLM_Config);
    //  print("<IMG SRC=\"$SAMSConf->ICONSET/help.jpg\">");
    //  print("<A HREF=\"http://sams.perm.ru/sams2/doc/".$SAMSConf->LANG."/syncwithntlm.html\">Documentation</A>");
    //  print("<P>\n");
    print "<P>\n";
    print "<TABLE CLASS=samstable WIDTH=\"90%\" BORDER=0>\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$ntlm_server}</B>\n";
    $value = GetAuthParameter("ntlm", "ntlmserver");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$ntlm_domain}</B>\n";
    $value = GetAuthParameter("ntlm", "ntlmdomain");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$ntlm_admin}</B>\n";
    $value = GetAuthParameter("ntlm", "ntlmadmin");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$ntlm_passwd}</B>\n";
    $value = GetAuthParameter("ntlm", "ntlmadminpasswd");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$ntlm_group}</B>\n";
    $value = GetAuthParameter("ntlm", "ntlmusergroup");
    print "<TD>{$value} \n";
    print "</TABLE>\n";
    print "<FORM NAME=\"adldreconfigform\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"ntlmtest\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authntlmtray.php\">\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$lframe_sams_Auth_NTLM_config_test}\">\n";
    print "</FORM>\n";
    $num_rows = $DB->samsdb_query_value("select s_value from auth_param where s_auth='ntlm' AND  s_param='ntlmgroup'");
    if ($num_rows > 0) {
        print "<FORM NAME=\"rmsyncgroupform\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"removesyncgroup\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authntlmtray.php\">\n";
        print "<SELECT NAME=\"rmsyncgroupname[]\" SIZE=3 TABINDEX=30 MULTIPLE>\n";
        while ($row = $DB->samsdb_fetch_array()) {
            print "<OPTION VALUE=\"" . $row['s_value'] . "\"> " . $row['s_value'] . "";
        }
        print "</SELECT>\n";
        print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$AuthNTLMValues_authntlmtray_1} \">\n";
        print "</FORM>\n";
    }
    $num_rows = $DB->samsdb_query_value("SELECT sgroup.s_name FROM sgroup ");
    if ($num_rows > 0) {
        print "<FORM NAME=\"addsyncgroupform\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"addsyncgroup\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authntlmtray.php\">\n";
        print "<SELECT NAME=\"addsyncgroupname[]\" SIZE=3 TABINDEX=30 MULTIPLE>\n";
        while ($row = $DB->samsdb_fetch_array()) {
            $QUERY = "SELECT * FROM auth_param WHERE s_param='ntlmgroup' AND s_value='" . $row['s_name'] . "'";
            $num_rows = $DB2->samsdb_query_value($QUERY);
            if ($num_rows == 0) {
                print "<OPTION VALUE=\"" . $row['s_name'] . "\"> " . $row['s_name'] . "";
            }
        }
        print "</SELECT>\n";
        print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$AuthNTLMValues_authntlmtray_2} \">\n";
        print "</FORM>\n";
    }
}
Ejemplo n.º 20
0
function SamsReConfigForm()
{
    global $SAMSConf;
    $files = array();
    $DB = new SAMSDB("{$SAMSConf->DB_ENGINE}", $SAMSConf->ODBC, $SAMSConf->DB_SERVER, $SAMSConf->DB_USER, $SAMSConf->DB_PASSWORD, $SAMSConf->SAMSDB, $SAMSConf->PDO);
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($SAMSConf->access != 2) {
        exit;
    }
    PageTop("config_48.jpg", "{$adminbuttom_1_prop_SamsReConfigForm_1}");
    print "<P>\n";
    print "<SCRIPT LANGUAGE=JAVASCRIPT>\n";
    print "function EnableCheckBox(formname)\n";
    print "{\n";
    print "    formname.ntlmdomain.disabled=false; \n";
    print "    formname.bigdomain.disabled=false; \n";
    print "    formname.bigusername.disabled=false; \n";
    print "    formname.nameencode.disabled=false; \n";
    print "    formname.testpdc.disabled=false; \n";
    print "    formname.plus.disabled=false; \n";
    print "    formname.at.disabled=false; \n";
    print "    formname.slashe.disabled=false; \n";
    //		   print("    document.getElementById('c1').innerHTML='YES'; ");
    print "}\n";
    print "function DisableCheckBox(formname)\n";
    print "{\n";
    print "    formname.ntlmdomain.disabled=true; \n";
    print "    formname.bigdomain.disabled=true; \n";
    print "    formname.bigusername.disabled=true; \n";
    print "    formname.nameencode.disabled=true; \n";
    print "    formname.testpdc.disabled=true; \n";
    print "    formname.plus.disabled=true; \n";
    print "    formname.at.disabled=true; \n";
    print "    formname.slashe.disabled=true; \n";
    print "}\n";
    print "function TestPDC(formname)\n";
    print "{\n";
    print "  if(formname.auth[0].checked==true)\n";
    print "    {\n";
    print "      window.open('main.php?show=exe&function=testpdc&filename=configbuttom_1_prop.php&auth=ntlm'); \n";
    print "    }\n";
    print "  if(formname.auth[1].checked==true)\n";
    print "    {\n";
    print "      window.open('main.php?show=exe&function=testpdc&filename=configbuttom_1_prop.php&auth=adld'); \n";
    print "    }\n";
    print "}\n";
    print "</SCRIPT>\n";
    print "</SCRIPT>\n";
    $num_rows = $DB->samsdb_query_value("SELECT * FROM sams ");
    $row = $DB->samsdb_fetch_array();
    print "<FORM NAME=\"samsreconfigform\" ACTION=\"main.php\">\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$adminbuttom_1_prop_SamsReConfigForm_12}\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"samsreconfig\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"configbuttom_1_prop.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"defauth\" value=\"{$row['s_auth']}\">\n";
    print "<P><B>{$adminbuttom_1_prop_SamsReConfigForm_45}:</B>\n";
    print "<TABLE CLASS=samstable WIDTH=\"90%\" BORDER=0>\n";
    print "<TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_46}: </B>\n";
    print "<TD><SELECT NAME=\"traffic\">\n";
    if ($row['s_realsize'] == "real") {
        print "<OPTION VALUE=\"real\" SELECTED> {$adminbuttom_1_prop_SamsReConfigForm_47}";
        print "<OPTION VALUE=\"full\"> {$adminbuttom_1_prop_SamsReConfigForm_48}";
    } else {
        print "<OPTION VALUE=\"real\"> {$adminbuttom_1_prop_SamsReConfigForm_47}";
        print "<OPTION VALUE=\"full\" SELECTED> {$adminbuttom_1_prop_SamsReConfigForm_48}";
    }
    print "</SELECT>\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_49}</B>\n";
    if ($row['s_checkdns'] == "Y") {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"checkdns\" CHECKED>\n";
    } else {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"checkdns\" > \n";
    }
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_51}</B>\n";
    print "<TD><SELECT NAME=\"loglevel\">\n";
    for ($i = 0; $i < 10; $i++) {
        if ($row['s_loglevel'] == $i) {
            print "<OPTION VALUE=\"{$i}\" SELECTED> {$i}";
        } else {
            print "<OPTION VALUE=\"{$i}\"> {$i}";
        }
    }
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_52}</B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"defaultdomain\" value=\"{$row['s_defaultdomain']}\">\n";
    $scount = 0;
    if ($handle2 = opendir("./src/script")) {
        while (false !== ($file = readdir($handle2))) {
            if ($file != "." && $file != ".." && $file != ".svn") {
                if (strlen($file) > 0) {
                    $script[$scount] = $file;
                    $scount++;
                }
            }
        }
    }
    print "<TR>\n";
    print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_56}</B>\n";
    print "<TD><SELECT NAME=\"udscript\" ID=\"udscript\" >\n";
    $SELECTED = "";
    if ($row['s_udscript'] == "none") {
        $SELECTED = "SELECTED";
    }
    print "<OPTION VALUE=\"none\" {$SELECTED}> NONE\n";
    for ($i = 0; $i < $scount; $i++) {
        $SELECTED = "";
        if ($row['s_udscript'] == $script[$i]) {
            $SELECTED = "SELECTED";
        }
        print "<OPTION VALUE=\"{$script[$i]}\" {$SELECTED}> {$script[$i]}\n";
    }
    print "</SELECT>\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_57}</B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"adminaddr\" value=\"{$row['s_adminaddr']}\">\n";
    print "</TABLE>\n";
    print "<P><B>{$adminbuttom_1_prop_SamsReConfigForm_17}</B>\n";
    print "<TABLE WIDTH=\"90%\" BORDER=0 >\n";
    print "<TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_2}</B><TD>\n";
    $NTLMCHECKED = "";
    $NCSACHECKED = "";
    $IPCHECKED = "";
    $ADLDCHECKED = "";
    $DOMAINDISABLE = "DISABLED";
    if ($row['s_auth'] == "ip") {
        $IPCHECKED = "CHECKED";
    } else {
        if ($row['s_auth'] == "ncsa") {
            $NCSACHECKED = "CHECKED";
        } else {
            if ($row['s_auth'] == "adld") {
                $ADLDCHECKED = "CHECKED";
                $DOMAINDISABLE = "ENABLED";
            } else {
                $NTLMCHECKED = "CHECKED";
                $DOMAINDISABLE = "ENABLED";
            }
        }
    }
    print "<TR bgcolor=blanchedalmond><TD VALIGN=TOP >";
    print "<INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ntlm\" {$NTLMCHECKED}  onclick=EnableCheckBox(samsreconfigform) onchange=EnableDomainName(samsreconfigform)>\n";
    $sdomain = "";
    $suser = "";
    if ($row['s_ntlmdomain'] == "Y") {
        if ($row['s_bigd'] == "Y") {
            $sdomain = "DOMAIN +";
        }
        if ($row['s_bigd'] == "S") {
            $sdomain = "domain +";
        }
        if ($row['s_bigd'] == "N") {
            $sdomain = "Domain +";
        }
    }
    if ($row['s_bigu'] == "Y") {
        $suser = "******";
    }
    if ($row['s_bigu'] == "S") {
        $suser = "******";
    }
    if ($row['s_bigu'] == "N") {
        $suser = "******";
    }
    print "  <B>NTLM (</B>\n<B ID=\"DomainUser\"> {$sdomain} {$suser}";
    print "  </B>\n<B>)</B>\n";
    print "<BR><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"adld\" {$ADLDCHECKED}  onclick=EnableCheckBox(samsreconfigform) onchange=EnableDomainName(samsreconfigform)>\n";
    print "  <B>Active Directory</B><BR>(Experimental)\n";
    print "<TD name=c1  ID=\"c1\">";
    if ($row['s_ntlmdomain'] == "Y") {
        print "<INPUT TYPE=\"CHECKBOX\" NAME=\"ntlmdomain\" {$DOMAINDISABLE} CHECKED onchange=EnableDomainName(samsreconfigform)>{$adminbuttom_1_prop_SamsReConfigForm_18}\n";
    } else {
        print "<INPUT TYPE=\"CHECKBOX\" NAME=\"ntlmdomain\" {$DOMAINDISABLE} onchange=EnableDomainName(samsreconfigform)>{$adminbuttom_1_prop_SamsReConfigForm_19}\n";
    }
    //  print("<BR>$adminbuttom_1_prop_SamsReConfigForm_20\n");
    print "<BR><LI>{$adminbuttom_1_prop_SamsReConfigForm_20} \n";
    print "<SELECT NAME=\"bigdomain\" onchange=EnableDomainName(samsreconfigform)>\n";
    if ($row['s_bigd'] == "Y") {
        print "<OPTION VALUE=\"Y\" SELECTED >{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"Y\">{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
    }
    if ($row['s_bigd'] == "S") {
        print "<OPTION VALUE=\"S\" SELECTED >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"S\" >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    }
    if ($row['s_bigd'] != "Y" && $row['s_bigd'] != "S") {
        print "<OPTION VALUE=\"N\" SELECTED >{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"N\">{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
    }
    if ($row['s_bigd'] == "A") {
        print "<OPTION VALUE=\"A\" SELECTED >{$adminbuttom_1_prop_SamsReConfigForm_20a} & {$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"A\" >{$adminbuttom_1_prop_SamsReConfigForm_20a} & {$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    }
    print "</SELECT > {$adminbuttom_1_prop_SamsReConfigForm_20d}\n";
    print "<BR><LI>{$adminbuttom_1_prop_SamsReConfigForm_22} \n";
    print "<SELECT NAME=\"bigusername\" onchange=EnableDomainName(samsreconfigform)>\n";
    if ($row['s_bigu'] == "Y") {
        print "<OPTION VALUE=\"Y\" SELECTED>{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"Y\">{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
    }
    if ($row['s_bigu'] == "S") {
        print "<OPTION VALUE=\"S\" SELECTED >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"S\" >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
    }
    if ($row['s_bigu'] != "Y" && $row['s_bigu'] != "S") {
        print "<OPTION VALUE=\"N\" SELECTED>{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
    } else {
        print "<OPTION VALUE=\"N\">{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
    }
    print "</SELECT >{$adminbuttom_1_prop_SamsReConfigForm_20d}\n";
    print "<P><B> {$adminbuttom_1_prop_SamsReConfigForm_50} </B>\n";
    if (strpos($row['s_separator'], "+") != false) {
        print "<P><INPUT TYPE=\"CHECKBOX\" NAME=\"plus\" CHECKED {$DOMAINDISABLE}> <B>+</B>\n";
    } else {
        print "<P><INPUT TYPE=\"CHECKBOX\" NAME=\"plus\" {$DOMAINDISABLE}> <B>+</B>\n";
    }
    if (strpos($row['s_separator'], chr(92)) != false) {
        print "<BR><INPUT TYPE=\"CHECKBOX\" NAME=\"slashe\" CHECKED {$DOMAINDISABLE}> <B>\\</B> \n";
    } else {
        print "<BR><INPUT TYPE=\"CHECKBOX\" NAME=\"slashe\" {$DOMAINDISABLE}> <B>\\</B> \n";
    }
    if (strpos($row['s_separator'], chr(64)) != false) {
        print "<BR><INPUT TYPE=\"CHECKBOX\" NAME=\"at\" CHECKED {$DOMAINDISABLE}> <B>@</B> \n";
    } else {
        print "<BR><INPUT TYPE=\"CHECKBOX\" NAME=\"at\"  {$DOMAINDISABLE}> <B>@</B> \n";
    }
    print "<P >\n";
    if ($row['s_auth'] == "ntlm" || $row['s_auth'] == "adld") {
        print "<BR><INPUT TYPE=\"BUTTON\" NAME=\"testpdc\" VALUE=\"{$adminbuttom_1_prop_SamsReConfigForm_39}\" onclick=TestPDC(samsreconfigform) >\n";
    } else {
        print "<BR><INPUT TYPE=\"BUTTON\" NAME=\"testpdc\" VALUE=\"{$adminbuttom_1_prop_SamsReConfigForm_39}\" onclick=TestPDC(samsreconfigform) DISABLED>\n";
    }
    if ($row['s_nameencode'] == "Y") {
        print "<P><INPUT TYPE=\"CHECKBOX\" NAME=\"nameencode\" {$DOMAINDISABLE} CHECKED >\n";
    } else {
        print "<P><INPUT TYPE=\"CHECKBOX\" NAME=\"nameencode\" {$DOMAINDISABLE} >\n";
    }
    print "{$adminbuttom_1_prop_SamsReConfigForm_28}";
    print "<BR>{$adminbuttom_1_prop_SamsReConfigForm_29}";
    print "<TR bgcolor=blanchedalmond><TD><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ncsa\" {$NCSACHECKED}  onclick=DisableCheckBox(samsreconfigform)><B>NCSA</B><TD>\n";
    print "<TR bgcolor=blanchedalmond><TD><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ip\" {$IPCHECKED}  onclick=DisableCheckBox(samsreconfigform)><B>IP</B><TD>\n";
    print "</TABLE>\n";
    print "<SCRIPT LANGUAGE=JAVASCRIPT>\n";
    print "function EnableDomainName(formname) \n";
    print "{\n";
    print "  var domain='domain'; \n";
    print "  var user='******'; \n";
    print "  var enabled=formname.ntlmdomain.checked; \n";
    print "  var bigdomain=formname.bigdomain.value; \n";
    print "  var bigusername=formname.bigusername.value; \n";
    print "  if(bigdomain=='Y') \n";
    print "    {\n";
    print "       domain='DOMAIN'; \n";
    print "    }\n";
    print "  if(bigdomain=='N') \n";
    print "    {\n";
    print "       domain='Domain'; \n";
    print "    }\n";
    print "  if(bigusername=='Y') \n";
    print "    {\n";
    print "       user='******'; \n";
    print "    }\n";
    print "  if(bigusername=='N') \n";
    print "    {\n";
    print "       user='******'; \n";
    print "    }\n";
    print "  if(enabled==true) \n";
    print "    {\n";
    print "       var domainuser=domain+'+'+user; \n";
    print "       document.getElementById('DomainUser').innerHTML=domainuser;  \n";
    print "    }\n";
    print "  else \n";
    print "    {\n";
    print "       document.getElementById('DomainUser').innerHTML=user;  \n";
    print "    }\n";
    print "}\n";
    print "function DisableDomainName() \n";
    print "{\n";
    print "  document.getElementById('DomainUser').innerHTML=\"1234qwer\";  \n";
    print "  output1.innerText=\"123\"; \n";
    print "}\n";
    print "</SCRIPT>\n";
    print "<TABLE WIDTH=\"90%\" BORDER=0>\n";
    print "<TR><TD>{$adminbuttom_1_prop_SamsReConfigForm_24}\n";
    print "<TR><TD> {$adminbuttom_1_prop_SamsReConfigForm_25}\n";
    print "<TR><TD><LI> {$adminbuttom_1_prop_SamsReConfigForm_26}\n";
    print "<TR><TD><LI> {$adminbuttom_1_prop_SamsReConfigForm_27}\n";
    print "<SCRIPT LANGUAGE=JAVASCRIPT>";
    print "function EnableParser(formname)";
    print "{";
    print "  var parser_on=formname.parser_on.checked; \n";
    print "  if(parser_on==true) \n";
    print "    {\n";
    print "      formname.parser.disabled=false; ";
    print "      formname.parser_time.disabled=false; ";
    print "      DisableParserTime(formname); ";
    print "    }\n";
    print "  else \n";
    print "    {\n";
    print "      formname.parser.disabled=true; ";
    print "      formname.parser_time.disabled=true; ";
    print "    }\n";
    print "}\n";
    print "</SCRIPT>";
    print "<P>\n";
    print "<P><CENTER><B>{$adminbuttom_1_prop_SamsReConfigForm_30}</B></CENTER>\n";
    print "<TABLE WIDTH=\"90%\" BORDER=0 >\n";
    $SLEEP = 1;
    if ($row['s_sleep'] > 0) {
        $SLEEP = $row['s_sleep'];
    }
    print "<TR bgcolor=blanchedalmond><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_31} </B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"sleep\" SIZE=5 VALUE={$SLEEP}> {$adminbuttom_1_prop_SamsReConfigForm_32}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_38}</B>\n";
    if ($row['s_parser_on'] == "Y") {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"parser_on\" CHECKED onchange=EnableParser(samsreconfigform)>\n";
    } else {
        $DISABLED_PARSER = "DISABLED";
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"parser_on\" onchange=EnableParser(samsreconfigform)> \n";
    }
    print "<TR bgcolor=blanchedalmond><TD ALIGN=\"RIGHT\"><B> {$adminbuttom_1_prop_SamsReConfigForm_40}</B>\n";
    print "<TD><SELECT NAME=\"parser\" {$DISABLED_PARSER}  onchange=DisableParserTime(samsreconfigform)>\n";
    if ($row['s_parser'] == "analog") {
        print "<OPTION VALUE=\"analog\" SELECTED > {$adminbuttom_1_prop_SamsReConfigForm_33}\n";
        $DISABLED_PARSER = "DISABLED";
    } else {
        print "<OPTION VALUE=\"analog\" >  {$adminbuttom_1_prop_SamsReConfigForm_33}\n";
    }
    if ($row['s_parser'] == "diskret") {
        print "<OPTION VALUE=\"diskret\" SELECTED >  {$adminbuttom_1_prop_SamsReConfigForm_34}\n";
    } else {
        print "<OPTION VALUE=\"diskret\" >  {$adminbuttom_1_prop_SamsReConfigForm_34}\n";
    }
    print "</SELECT>\n";
    if ($row['s_parser_time'] > 0) {
        $time = $row['s_parser_time'];
    } else {
        $time = 1;
    }
    print "<TR bgcolor=blanchedalmond><TD ALIGN=\"RIGHT\"><B>{$adminbuttom_1_prop_SamsReConfigForm_35} </B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"parser_time\" SIZE=5 VALUE=\"{$time}\" {$DISABLED_PARSER}> {$adminbuttom_1_prop_SamsReConfigForm_36}\n";
    print "<TR bgcolor=blanchedalmond><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_37} </B>\n";
    if ($row['s_count_clean'] == "Y") {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"count_clean\" CHECKED >\n";
    } else {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"count_clean\" > \n";
    }
    print "</TABLE >\n";
    print "<SCRIPT LANGUAGE=JAVASCRIPT> \n";
    print "function DisableParserTime(formname) \n";
    print "{ \n";
    print "  var parser_on=formname.parser.value; \n";
    print "  if(parser_on==\"diskret\") \n";
    print "    {\n";
    print "      formname.parser_time.disabled=false;  \n";
    print "    }\n";
    print "  else \n";
    print "    {\n";
    print "      formname.parser_time.disabled=true;  \n";
    print "    }\n";
    print "}\n";
    print "</SCRIPT> \n";
    print "<P><TABLE WIDTH=\"90%\" BORDER=0 >\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_3}</B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"wbinfopath\" SIZE=50 VALUE=\"{$row['s_wbinfopath']}\">\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_4}</B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"redirect_to\" SIZE=50 VALUE=\"{$row['s_redirect_to']}\">\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_5}</B>\n";
    print "<TD><INPUT TYPE=\"TEXT\" NAME=\"denied_to\" SIZE=50 VALUE=\"{$row['s_denied_to']}\"> \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_6}</B>\n";
    print "<TD><SELECT NAME=\"redirector\">\n";
    if ($row['s_redirector'] == "none") {
        print "<OPTION VALUE=\"none\" SELECTED> {$adminbuttom_1_prop_SamsReConfigForm_43}";
    } else {
        print "<OPTION VALUE=\"none\" > {$adminbuttom_1_prop_SamsReConfigForm_43}";
    }
    if ($row['s_redirector'] == "sams") {
        print "<OPTION VALUE=\"sams\" SELECTED> {$adminbuttom_1_prop_SamsReConfigForm_7}";
    } else {
        print "<OPTION VALUE=\"sams\" > {$adminbuttom_1_prop_SamsReConfigForm_7}";
    }
    if ($row['s_redirector'] == "rejik") {
        print "<OPTION VALUE=\"rejik\" SELECTED> Rejik";
    } else {
        print "<OPTION VALUE=\"rejik\"> Rejik";
    }
    if ($row['s_redirector'] == "squidguard") {
        print "<OPTION VALUE=\"squidguard\" SELECTED> SquidGuard";
    } else {
        print "<OPTION VALUE=\"squidguard\"> SquidGuard";
    }
    if ($row['s_redirector'] == "squid") {
        print "<OPTION VALUE=\"squid\" SELECTED> {$adminbuttom_1_prop_SamsReConfigForm_8}";
    } else {
        print "<OPTION VALUE=\"squid\"> {$adminbuttom_1_prop_SamsReConfigForm_8}";
    }
    print "</SELECT>\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_9}</B>\n";
    if ($row['s_delaypool'] == "Y") {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"delaypool\" CHECKED> \n";
    } else {
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"delaypool\" > \n";
    }
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_53}</B>\n";
    print "<TD><SELECT NAME=\"squidbase\">\n";
    $SELECTED = "";
    if ($row['s_squidbase'] == 0) {
        $SELECTED = "SELECTED";
    }
    print "<OPTION VALUE=\"0\" {$SELECTED}> {$configbuttom_1_prop_SamsReConfigForm_54}";
    for ($i = 1; $i <= 12; $i++) {
        $SELECTED = "";
        if ($row['s_squidbase'] == $i) {
            $SELECTED = "SELECTED";
        }
        print "<OPTION VALUE=\"{$i}\" {$SELECTED}> {$i}";
    }
    print "</SELECT>\n";
    print "{$configbuttom_1_prop_SamsReConfigForm_55}\n";
    print "</TABLE>\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$adminbuttom_1_prop_SamsReConfigForm_12}\">\n";
    print "</FORM>\n";
}
Ejemplo n.º 21
0
function UserTimeTraffic()
{
    global $SAMSConf;
    global $DATE;
    global $USERConf;
    global $SquidUSERConf;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $SquidUSERConf = new SAMSUSER();
    $SquidUSERConf->sams_user($id);
    if ($USERConf->ToWebInterfaceAccess("GSC") != 1 && ($USERConf->s_user_id != $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") != 1)) {
        exit(0);
    }
    $DB = new SAMSDB();
    $sdate = $DATE->sdate();
    $edate = $DATE->edate();
    $bdate = $DATE->BeginDate();
    $eddate = $DATE->EndDate();
    $sday = $DATE->sday;
    $smon = $DATE->smon;
    $syea = $DATE->syea;
    $shou = $DATE->shou;
    $eday = $DATE->eday;
    $emon = $DATE->emon;
    $eyea = $DATE->eyea;
    require "reportsclass.php";
    $dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("WAUC") != 1) {
        exit(0);
    }
    PageTop("ttraffic_48.jpg", "{$traffic_1} <FONT COLOR=\"BLUE\"> {$SquidUSERConf->s_nick}</FONT><BR>{$URLTimeForm_userbuttom_4_time_1}<BR>{$bdate}");
    print "<TABLE WIDTH=\"90%\"><TR><TD>";
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=id 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();
    print "<TD><IMG SRC=\"{$SAMSConf->ICONSET}/printer.gif\" TITLE=\"Print\" ALT=\"Print\" onClick=\"JavaScript:window.print();\"></TABLE>\n";
    print "</FORM>\n";
    $URL = array("time" => array(), "url" => array(), "method" => array());
    $count = 0;
    $QUERY = "SELECT * FROM (SELECT substring(s_time from 1 for 5) as time  , substring( s_url from position('//' in s_url)+2 for position('/' in substring(s_url from position('/' in s_url)+2 )) ) as url_domain, s_method FROM squidcache WHERE s_user='******' AND s_date='{$sdate}' AND s_method!='CONNECT' ORDER BY s_time) AS _cache GROUP BY _cache.time,_cache.url_domain ORDER BY _cache.time";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        $URL["time"][$count] = $row['time'];
        $URL["url"][$count] = str_replace("/", "", $row['url_domain']);
        $URL["method"][$count] = $row['s_method'];
        $count++;
    }
    $QUERY = "SELECT * FROM (SELECT substring(s_time from 1 for 5) as time, s_url as url_domain,  s_method FROM squidcache WHERE s_user='******' AND s_date='{$sdate}' AND s_method='CONNECT' ORDER BY s_time) AS _cache GROUP BY _cache.time,_cache.url_domain ORDER BY _cache.time";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        $URL["time"][$count] = $row['time'];
        $URL["url"][$count] = str_replace("/", "", $row['url_domain']);
        $URL["method"][$count] = $row['s_method'];
        $count++;
    }
    print "<CENTER>\n";
    print "<script type=\"text/javascript\" src=\"lib/jquery-1.2.6.js\"></script>\n";
    print "<script type=\"text/javascript\" src=\"lib/jquery.dataTables.js\"></script>\n";
    print "<script type=\"text/javascript\">\n";
    print "\$(document).ready(function(){\n";
    print "  \$(\"#urltime\").dataTable({\n";
    print "\t\"bInfo\": 0,\n";
    print "\t\"iDisplayLength\": {$count},\n";
    print "\t\"iDisplayStart\": 0,\n";
    print "\t\"iDisplayEnd\": {$count},\n";
    print "\t\"oLanguage\": {\n";
    print "\t\t\"sSearch\": \"search\", \n";
    print "\t\t\"sLengthMenu\": \"Show _MENU_ entries\"\n";
    print "\t\t},\n";
    print "\t\"aoColumns\": [ \n";
    print "\t\t{ \"sType\": \"numeric\", \"sWidth\": \"15%\" },\n";
    print "\t\t{ \"sType\": \"html\", \"sWidth\": \"75%\"},\n";
    print "\t\t{ \"sType\": \"html\", \"sWidth\": \"10%\"},\n";
    print "    ]\n";
    print "  });\n";
    print "});\n";
    print "</script>\n";
    print "</CENTER>\n";
    asort($URL["time"]);
    reset($URL["time"]);
    $cache = 0;
    print "<TABLE CLASS=samstable id=\"urltime\" WIDTH=80%>";
    print "<THEAD>\n";
    print "<TH>Time";
    print "<TH>URL";
    print "<TH>Method";
    print "</THEAD>\n";
    print "<TBODY>\n";
    $size = 0;
    asort($URL["time"]);
    reset($URL["time"]);
    while (list($key, $val) = each($URL["time"])) {
        print "<TR>";
        LTableCell($URL['time'][$key], 15);
        if ($USERConf->ToWebInterfaceAccess("C") == 1) {
            RTableCell($URL['url'][$key], 75);
        }
        RTableCell($URL['method'][$key], 15);
        print "</TR>\n";
    }
    print "</TBODY>\n";
    print "</TABLE>";
}
Ejemplo n.º 22
0
function JSProxyInfo()
{
    global $SAMSConf;
    global $PROXYConf;
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($PROXYConf->s_realsize == "real") {
        $traffic = "{$adminbuttom_1_prop_SamsReConfigForm_47}";
    } else {
        $traffic = "{$adminbuttom_1_prop_SamsReConfigForm_48}";
    }
    if ($PROXYConf->s_auth == "ip") {
        $auth = "IP";
    }
    if ($PROXYConf->s_auth == "ncsa") {
        $auth = "NCSA";
    }
    if ($PROXYConf->s_auth == "ntlm") {
        $auth = "NTLM";
    }
    if ($PROXYConf->s_auth == "adld") {
        $auth = "Active Directory";
    }
    if ($PROXYConf->s_auth == "ldap") {
        $auth = "LDAP";
    }
    if ($PROXYConf->s_parser == 0) {
        $parser = "No";
    }
    if ($PROXYConf->s_parser == 2) {
        $parser = "{$adminbuttom_1_prop_SamsReConfigForm_33}";
    }
    if ($PROXYConf->s_parser == 1) {
        $parser = "{$adminbuttom_1_prop_SamsReConfigForm_34}";
    }
    if ($PROXYConf->s_redirector == "sams") {
        $redirector = "{$adminbuttom_1_prop_SamsReConfigForm_7}";
    } else {
        if ($PROXYConf->s_redirector == "rejik") {
            $redirector = "Rejik";
        } else {
            if ($PROXYConf->s_redirector == "squidguard") {
                $redirector = "SquidGuard";
            } else {
                if ($PROXYConf->s_redirector == "squid") {
                    $redirector = "{$adminbuttom_1_prop_SamsReConfigForm_8}";
                } else {
                    $redirector = "{$adminbuttom_1_prop_SamsReConfigForm_43}";
                }
            }
        }
    }
    $extrainfo = "";
    $DB = new SAMSDB();
    $num_rows = $DB->samsdb_query("SELECT * FROM sysinfo WHERE s_status='1' AND s_proxy_id='{$PROXYConf->s_proxy_id}'");
    if ($num_rows > 0) {
        $extrainfo = $extrainfo . "<HR>";
        $extrainfo = $extrainfo . "<TABLE CLASS=samstable>";
    }
    while ($row = $DB->samsdb_fetch_array()) {
        $extrainfo = $extrainfo . "<TR><TD><FONT COLOR=blue>{$row['s_name']} updated at {$row['s_date']}</FONT></TD></TR>";
        $extrainfo = $extrainfo . "<TR><TD>{$row['s_info']}</TD></TR>";
    }
    if ($num_rows > 0) {
        $extrainfo = $extrainfo . "</TABLE>";
    }
    $DB->free_samsdb_query();
    $htmlcode = "<HTML><HEAD>\n  <link rel=\"STYLESHEET\" type=\"text/css\" href=\"{$SAMSConf->ICONSET}/tree.css\">\n  </HEAD>\n  <BODY><CENTER>\n  <TABLE WIDTH=\"95%\" border=0><TR><TD WIDTH=\"10%\"  valign=\"middle\">\n  <img src=\"{$SAMSConf->ICONSET}/user.jpg\" align=\"RIGHT\" valign=\"middle\" >\n  <TD  valign=\"middle\"><h2  align=\"CENTER\">Proxy server <BR><FONT COLOR=\"BLUE\">{$PROXYConf->s_description}</FONT></h2>\n  </TABLE>\n\n  <TABLE>\n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_53}<TD>{$PROXYConf->s_proxy_id} \n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_2}<TD>{$auth} \n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_38}<TD>{$parser}\n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_6}<TD>{$redirector}\n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_46}<TD>{$traffic}\n  <TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_54}<TD>{$PROXYConf->s_endvalue} \n  </TABLE>";
    $htmlcode = $htmlcode . $extrainfo;
    $htmlcode = $htmlcode . "\n  <IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">\n  <A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/squid.html\">{$documentation}</A>\n  <P>\n  </CENTER></BODY></HTML>";
    $htmlcode = str_replace("\"", "\\\"", $htmlcode);
    $htmlcode = str_replace("\n", "", $htmlcode);
    print " parent.basefrm.document.write(\"{$htmlcode}\");\n";
    print " parent.basefrm.document.close();\n";
}
Ejemplo n.º 23
0
function UserTrafficPeriod()
{
    global $SAMSConf;
    global $DATE;
    global $USERConf;
    global $SquidUSERConf;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    $SquidUSERConf = new SAMSUSER();
    $SquidUSERConf->sams_user($id);
    if ($USERConf->ToWebInterfaceAccess("GSC") != 1 && ($USERConf->s_user_id != $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") != 1)) {
        exit(0);
    }
    $DB = new SAMSDB();
    $sdate = $DATE->sdate();
    $edate = $DATE->edate();
    $bdate = $DATE->BeginDate();
    $eddate = $DATE->EndDate();
    require "reportsclass.php";
    $dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("WAUC") != 1) {
        exit(0);
    }
    PageTop("usertraffic_48.jpg", "{$traffic_1} <FONT COLOR=\"BLUE\"> {$SquidUSERConf->s_nick}</FONT><BR>{$userbuttom_2_traffic_UserTrafficPeriod_2}");
    print "<TABLE WIDTH=\"90%\"><TR><TD>";
    print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=id 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=\"usertrafficperiod\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"userbuttom_2_traffic.php\">\n";
    $dateselect->SetPeriod();
    print "<TD><IMG SRC=\"{$SAMSConf->ICONSET}/printer.gif\" TITLE=\"Print\" ALT=\"Print\" onClick=\"JavaScript:window.print();\"></TABLE>\n";
    print "</FORM>\n";
    printf("<BR><B>{$traffic_2} {$bdate} {$traffic_3} {$eddate}</B> ");
    printf("<P><IMG SRC=\"main.php?show=exe&function=usertrafficperiodgb&filename=userbuttom_2_traffic.php&id={$SquidUSERConf->s_user_id}&gb=1&sdate={$sdate}&edate={$edate}\"><P>");
    $count = 1;
    $cache = 0;
    print "<TABLE CLASS=samstable>";
    print "<THEAD>\n";
    print "<TH>No";
    print "<TH>{$traffic_data}";
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        print "<TH>{$userbuttom_2_traffic_UserTrafficPeriod_3}";
        print "<TH>{$userbuttom_2_traffic_UserTrafficPeriod_4}";
    }
    print "<TH>{$userbuttom_2_traffic_UserTrafficPeriod_5}";
    print "</THEAD>\n";
    print "<TBODY>\n";
    $size = 0;
    $QUERY = "SELECT sum(s_size),s_date,s_user,s_domain,sum(s_hit) FROM cachesum WHERE lower(s_user)=lower('" . $SquidUSERConf->s_nick . "') AND s_date>='{$sdate}' AND s_date<='{$edate}' GROUP BY s_date,s_user,s_domain ORDER BY s_date";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        print "<TR>";
        LTableCell($count, 10);
        $aaa = ReturnDate($row['s_date']);
        LTableCell($aaa, 15);
        if ($USERConf->ToWebInterfaceAccess("C") == 1) {
            $aaa = FormattedString("{$row['0']}");
            RTableCell($aaa, 25);
            $aaa = FormattedString("{$row['4']}");
            RTableCell($aaa, 25);
        }
        //         if($SAMSConf->realtraffic=="real")
        PrintFormattedSize($row[0] - $row[4]);
        //	 else
        //	   PrintFormattedSize($row[0]);
        print "</TR>";
        $count = $count + 1;
        $size = $size + $row[0];
        $cache = $cache + $row[4];
    }
    print "<TR>";
    print "</TBODY>\n";
    print "<TD>";
    RBTableCell("{$vsego}", 25);
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        //      $aaa=FormattedString("$size");
        //      RBTableCell("$aaa",25);
        PrintFormattedSize($size);
        //      $aaa=FormattedString("$cache");
        //      RBTableCell("$aaa",25);
        PrintFormattedSize($cache);
    }
    //  if($SAMSConf->realtraffic=="real")
    PrintFormattedSize($size - $cache);
    //  else
    //    PrintFormattedSize($size);
    //  echo "$SAMSConf->realtraffic";
    print "</TABLE>";
}
Ejemplo n.º 24
0
function SaveBackUp()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit;
    }
    if (isset($_GET["traffic"])) {
        $traffic = $_GET["traffic"];
    }
    $samsdb = array('auth_param', 'passwd', 'proxy', 'redirect', 'sconfig', 'sconfig_time', 'sgroup', 'shablon', 'squiduser', 'sysinfo', 'timerange', 'url', 'websettings');
    $traffictable = array('squidcache', 'cachesum');
    $filename = strftime("sams2-%d%b%Y-%H-%M-%S.sql.gz");
    PageTop("backup_48.jpg", "{$backupbuttom_1_savebase_SaveBackUpForm_1}");
    if (($fout = gzopen("data/{$filename}", "w9")) != NULL) {
        gzwrite($fout, "# " . $SAMSConf->SAMSDB . " DUMP FOR " . $SAMSConf->DB_ENGINE . " DATABASE\n");
        for ($tcount = 0; $tcount < count($samsdb); $tcount++) {
            echo "export table: " . $samsdb[$tcount] . "<BR>";
            gzwrite($fout, "TRUNCATE TABLE " . $samsdb[$tcount] . ";\n");
            $QUERY = "SELECT * FROM " . $samsdb[$tcount];
            $num_rows = $DB->samsdb_query_value($QUERY);
            while ($row = $DB->samsdb_fetch_array()) {
                $export = "INSERT INTO " . $samsdb[$tcount] . " VALUES(";
                $a = 0;
                $a = ceil(count($row) / 2);
                for ($i = 0; $i < $a; $i++) {
                    $export = $export . "'" . $row[$i] . "'";
                    if ($i < $a - 1) {
                        $export = $export . ",";
                    }
                }
                $export = $export . ");";
                gzwrite($fout, $export . "\n");
            }
        }
        if ($traffic == "on") {
            for ($tcount = 0; $tcount < count($traffictable); $tcount++) {
                echo "export table: " . $traffictable[$tcount] . "<BR>";
                gzwrite($fout, "DELETE FROM " . $traffictable[$tcount] . ";\n");
                $QUERY = "SELECT * FROM " . $traffictable[$tcount];
                $num_rows = $DB->samsdb_query_value($QUERY);
                while ($row = $DB->samsdb_fetch_array()) {
                    $export = "INSERT INTO " . $traffictable[$tcount] . " VALUES(";
                    $a = 0;
                    $a = ceil(count($row) / 2);
                    for ($i = 0; $i < $a; $i++) {
                        $export = $export . "'" . $row[$i] . "'";
                        if ($i < $a - 1) {
                            $export = $export . ",";
                        }
                    }
                    $export = $export . ");";
                    gzwrite($fout, $export . "\n");
                }
            }
        }
        gzclose($fout);
    } else {
        fwrite($fout, "# " . $SAMSConf->SAMSDB . " DUMP FOR " . $SAMSConf->DB_ENGINE . " DATABASE\n");
        fwrite($fout, "USE " . $SAMSConf->SAMSDB . ";\n");
        for ($tcount = 0; $tcount < count($samsdb); $tcount++) {
            fwrite($fout, "DROP TABLE IF EXISTS `" . $samsdb[$tcount] . "`;\n");
            fwrite($fout, "CREATE TABLE `" . $samsdb[$tcount] . "`;\n");
            $QUERY = "SELECT * FROM " . $samsdb[$tcount];
            $num_rows = $DB->samsdb_query_value($QUERY);
            while ($row = $DB->samsdb_fetch_array()) {
                $export = "INSERT INTO " . $samsdb[$tcount] . " VALUES(";
                $a = count($row);
                for ($i = 0; $i < $a; $i++) {
                    $export = $export . "'" . $row[$i] . "'";
                    if ($i < $a - 1) {
                        $export = $export . ",";
                    }
                }
                $export = $export . ");";
                fwrite($fout, $export . "\n");
            }
        }
        if ($traffic == "on") {
            for ($tcount = 0; $tcount < count($traffictable); $tcount++) {
                fwrite($fout, "DROP TABLE IF EXISTS `" . $traffictable[$tcount] . "`;\n");
                fwrite($fout, "CREATE TABLE `" . $traffictable[$tcount] . "`;\n");
                $QUERY = "SELECT * FROM " . $traffictable[$tcount];
                $num_rows = $DB->samsdb_query_value($QUERY);
                while ($row = $DB->samsdb_fetch_array()) {
                    $export = "INSERT INTO " . $traffictable[$tcount] . " VALUES(";
                    $a = count($row);
                    for ($i = 0; $i < $a; $i++) {
                        $export = $export . "'" . $row[$i] . "'";
                        if ($i < $a - 1) {
                            $export = $export . ",";
                        }
                    }
                    $export = $export . ");";
                    fwrite($fout, $export . "\n");
                }
            }
        }
        fclose($fout);
    }
    print "<P><A HREF=\"data/{$filename}\">\n";
    print "<BR><FONT COLOR=\"BLUE\">{$backupbuttom_1_savebase_SaveBackUp_1} <B>{$filename}</B></FONT>\n";
    print "</A>\n";
}
Ejemplo n.º 25
0
function AuthLDAPValues()
{
    global $SAMSConf;
    global $USERConf;
    if ($USERConf->ToWebInterfaceAccess("C") != 1) {
        exit(0);
    }
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    $DB = new SAMSDB();
    $DB2 = new SAMSDB();
    PageTop("config_48.jpg", $lframe_sams_Auth_Title_LDAP_Config);
    print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">";
    print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/syncwithldap.html\">{$documentation}</A>";
    print "<P>\n";
    print "<TABLE CLASS=samstable WIDTH=\"90%\" BORDER=0>\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Server</B>\n";
    $value = GetAuthParameter("ldap", "ldapserver");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Base DN</B>\n";
    $value = GetAuthParameter("ldap", "basedn");
    print "<TD>{$value} \n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Bind DN</B>\n";
    $value = GetAuthParameter("ldap", "adadmin");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Bind password</B>\n";
    $value = GetAuthParameter("ldap", "adadminpasswd");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Users RDN</B>\n";
    $value = GetAuthParameter("ldap", "usersrdn");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Users filter</B>\n";
    $value = GetAuthParameter("ldap", "usersfilter");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>User name attribute</B>\n";
    $value = GetAuthParameter("ldap", "usernameattr");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Groups RDN</B>\n";
    $value = GetAuthParameter("ldap", "groupsrdn");
    print "<TD>{$value}\n";
    print "<TR bgcolor=blanchedalmond>\n";
    print "<TD><B>Groups filter</B>\n";
    $value = GetAuthParameter("ldap", "groupsfilter");
    print "<TD>{$value}\n";
    print "</TABLE>\n";
    print "<FORM NAME=\"ldapreconfigform\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"ldaptest\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authldaptray.php\">\n";
    print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$lframe_sams_Auth_LDAP_connections_test}\">\n";
    print "</FORM>\n";
    $num_rows = $DB->samsdb_query_value("select s_value from auth_param where s_auth='ldap' AND  s_param='ldapgroup'");
    if ($num_rows > 0) {
        print "<FORM NAME=\"rmsyncgroupform\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"removesyncgroup\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authldaptray.php\">\n";
        print "<SELECT NAME=\"rmsyncgroupname[]\" SIZE=3 TABINDEX=30 MULTIPLE>\n";
        while ($row = $DB->samsdb_fetch_array()) {
            print "<OPTION VALUE=\"" . $row['s_value'] . "\"> " . $row['s_value'] . "";
        }
        print "</SELECT>\n";
        print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$AuthLDAPValues_authldaptray_1} \">\n";
        print "</FORM>\n";
    }
    $num_rows = $DB->samsdb_query_value("SELECT sgroup.s_name FROM sgroup ");
    if ($num_rows > 0) {
        print "<FORM NAME=\"addsyncgroupform\" ACTION=\"main.php\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"addsyncgroup\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authldaptray.php\">\n";
        print "<SELECT NAME=\"addsyncgroupname[]\" SIZE=3 TABINDEX=30 MULTIPLE>\n";
        while ($row = $DB->samsdb_fetch_array()) {
            $QUERY = "SELECT * FROM auth_param WHERE s_param='ldapgroup' AND s_value='" . $row['s_name'] . "'";
            $num_rows = $DB2->samsdb_query_value($QUERY);
            if ($num_rows == 0) {
                print "<OPTION VALUE=\"" . $row['s_name'] . "\"> " . $row['s_name'] . "";
            }
        }
        print "</SELECT>\n";
        print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$AuthLDAPValues_authldaptray_2}\">\n";
        print "</FORM>\n";
    }
}
Ejemplo n.º 26
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";
}
Ejemplo n.º 27
0
function UsersTrafficPeriod()
{
    global $SAMSConf;
    global $USERConf;
    global $DATE;
    if ($USERConf->ToWebInterfaceAccess("CS") != 1) {
        exit(0);
    }
    $DB = new SAMSDB();
    $sdate = $DATE->sdate();
    $edate = $DATE->edate();
    $bdate = $DATE->BeginDate();
    $eddate = $DATE->EndDate();
    $size = "";
    if (isset($_GET["size"])) {
        $size = $_GET["size"];
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    PageTop("usergroup_48.jpg", "{$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}");
    print "<BR>\n";
    print "<TABLE WIDTH=\"90%\"><TR><TD>";
    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 "<TD><IMG SRC=\"{$SAMSConf->ICONSET}/printer.gif\" TITLE=\"Print\" ALT=\"Print\" onClick=\"JavaScript:window.print();\">";
    print "<A HREF=\"main.php?show=exe&function=userstrafficperiodpdf&filename=usersbuttom_2_traffic.php\"> pdf</a> </TABLE>\n";
    print "</FORM>\n";
    printf("<BR><B>{$traffic_2} {$bdate} {$traffic_3} {$eddate}</B> ");
    printf("<P><IMG SRC=\"main.php?show=exe&function=userstrafficperiodgb&filename=usersbuttom_2_traffic.php&gb=1&sdate={$sdate}&edate={$edate}\"><P>");
    $count = 1;
    $size2 = 0;
    $hitsize = 0;
    $traf = 0;
    print "<script type=\"text/javascript\" src=\"lib/jquery-1.2.6.js\"></script>";
    print "<script type=\"text/javascript\" src=\"lib/jquery.dataTables.js\"></script>\n";
    print "<script type=\"text/javascript\">\n";
    print "\$(document).ready(function(){\n";
    print "  \$(\"#userstraffic\").dataTable({\n";
    print "\t\"bInfo\": 0,\n";
    print "\t\"iDisplayLength\": 100,\n";
    print "\t\"iDisplayStart\": 0,\n";
    print "\t\"iDisplayEnd\": 100,\n";
    print "\t\"oLanguage\": {\n";
    print "\t\t\"sSearch\": \"search\", \n";
    print "\t\t\"sLengthMenu\": \"Show _MENU_ entries\"\n";
    print "\t\t},\n";
    print "\t\"aoColumns\": [ \n";
    print "\t\t{ \"sType\": \"numeric\", \"sWidth\": \"8%\" },\n";
    print "\t\t{ \"sType\": \"html\", \"sWidth\": \"16%\"},\n";
    print "\t\t{ \"sType\": \"formatted-num\", \"sWidth\": \"15%\" },\n";
    print "\t\t{ \"sType\": \"formatted-num\", \"sWidth\": \"15%\" },\n";
    print "\t\t{ \"sType\": \"formatted-num\", \"sWidth\": \"30%\" }\n";
    print "    ]\n";
    print "  });\n";
    print "});\n";
    print "</script>\n";
    print "<TABLE CLASS=samstable id=\"userstraffic\">\n";
    $item = array("head" => "squid", "access" => "pobject.gif", "target" => "tray", "url" => "tray.php?show=exe&filename=squidtray.php&function=squidtray", "text" => "SQUID");
    print "<THEAD>\n";
    print "<TH>No\n";
    print "<TH>{$usersbuttom_2_traffic_UsersTrafficPeriod_4}\n";
    if ($size == "On") {
        print "<TH>{$usersbuttom_2_traffic_UsersTrafficPeriod_8}\n";
    } else {
        if (($SAMSConf->AUTH = "ntlm" || ($SAMSConf->AUTH = "adld")) && $SAMSConf->NTLMDOMAIN == "Y") {
            print "<TH>Domain\n";
        }
    }
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        print "<TH>{$usersbuttom_2_traffic_UsersTrafficPeriod_6}\n";
        print "<TH>{$usersbuttom_2_traffic_UsersTrafficPeriod_5}\n";
    }
    print "<TH>{$usersbuttom_2_traffic_UsersTrafficPeriod_7}\n";
    print "</THEAD>\n";
    print "<TBODY>\n";
    $QUERY = "SELECT sum(cachesum.s_size),sum(cachesum.s_hit),cachesum.s_user,cachesum.s_domain, squiduser.s_nick, squiduser.s_family, squiduser.s_name, squiduser.s_user_id FROM cachesum LEFT JOIN squiduser ON cachesum.s_user=squiduser.s_nick WHERE cachesum.s_date>='{$sdate}'AND cachesum.s_date<='{$edate}' GROUP BY cachesum.s_user,cachesum.s_domain,squiduser.s_nick,squiduser.s_family, squiduser.s_name, squiduser.s_user_id  order by sum(cachesum.s_size) desc";
    $num_rows = $DB->samsdb_query_value($QUERY);
    while ($row = $DB->samsdb_fetch_array()) {
        print "<TR>\n";
        //LTableCell($count,8);
        print "<TD>{$count}";
        if ($SAMSConf->SHOWNAME == "fam") {
            $name = "{$row['s_family']}";
        } else {
            if ($SAMSConf->SHOWNAME == "famn") {
                $name = "{$row['s_family']} {$row['s_name']}";
            } else {
                if ($SAMSConf->SHOWNAME == "nickd") {
                    $name = "{$row['s_nick']} / {$row['s_domain']}";
                } else {
                    $name = $row['s_nick'];
                }
            }
        }
        $str = "<A HREF=\"tray.php?show=exe&filename=usertray.php&function=usertray&id={$row['s_user_id']}\" TARGET=\"tray\">{$name} </A>\n";
        LTableCell($str, 16);
        if ($size == "On") {
            LTableCell($row['s_family'], 16);
        } else {
            if (($SAMSConf->AUTH = "ntlm" || ($SAMSConf->AUTH = "adld")) && $SAMSConf->NTLMDOMAIN == "Y") {
                TableCell($row['s_domain'], 16);
            }
        }
        if ($USERConf->ToWebInterfaceAccess("C") == 1) {
            $aaa = FormattedString("{$row['0']}");
            LTableCell("{$aaa}", 15);
            $aaa = FormattedString("{$row['1']}");
            LTableCell("{$aaa}", 15);
        }
        if ($SAMSConf->realtraffic == "real") {
            PrintFormattedSize($row[0] - $row[1]);
        } else {
            PrintFormattedSize($row[0]);
        }
        print "</TR>\n";
        $count = $count + 1;
        $size2 = $size2 + $row[0];
        $hitsize = $hitsize + $row[1];
    }
    print "</TBODY>\n";
    print "<TFOOT><TR>\n";
    print "<TD>";
    RBTableCell("{$vsego}", 16);
    if (($SAMSConf->AUTH = "ntlm" || ($SAMSConf->AUTH = "adld")) && $SAMSConf->NTLMDOMAIN == "Y" || $size == "On") {
        print "<TD>";
    }
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        $aaa = FormattedString("{$size2}");
        RBTableCell($aaa, 15);
        $aaa = FormattedString("{$hitsize}");
        RBTableCell($aaa, 15);
    }
    if ($SAMSConf->realtraffic == "real") {
        PrintFormattedSize($size2 - $hitsize);
    } else {
        PrintFormattedSize($size2);
    }
    print "</TFOOT></TABLE>\n";
}
Ejemplo n.º 28
0
function UsersImportFromNCSAFileForm()
{
    global $SAMSConf;
    global $USERConf;
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("UC") != 1) {
        exit;
    }
    $DB = new SAMSDB();
    PageTop("loadncsa_48.jpg", "{$authbuttom_1_ncsaimport_LoadFileForm_1}");
    $listfilename = $_FILES["userfile"]["name"];
    //echo "filename: ".$_FILES["userfile"]["name"]."<BR>";
    //echo "filename: ".$_FILES["userfile"]["tmp_name"]."<BR>";
    $aaa = copy($_FILES["userfile"]["tmp_name"], "data/ncsauserslist.txt");
    print "<FORM NAME=\"AddUsersFromFile\" ACTION=\"main.php\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"domain\" id=Show value=\"{$domain}\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"usersimportfromncsafile\">\n";
    print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"authncsabuttom_2_ncsaimport.php\">\n";
    print "<TABLE>\n";
    print "<TR><TD><TD>\n";
    //  print("    <INPUT TYPE=\"HIDDEN\" NAME=\"MAX_FILES_SIZE\" value=\"1048576\">\n");
    //  print("<BR><INPUT TYPE=\"FILE\" NAME=\"userfile\" value=\"$redir_importurllistform1\">\n");
    print "<TR><TD>\n";
    print "<B>{$usersbuttom_1_domain_AddUsersFromDomainForm_3} \n";
    print "<TD>\n";
    print "<SELECT NAME=\"groupname\" ID=\"groupname\" SIZE=1 TABINDEX=30 >\n";
    $num_rows = $DB->samsdb_query_value("SELECT * FROM sgroup");
    while ($row2 = $DB->samsdb_fetch_array()) {
        print "<OPTION VALUE=\"{$row2['s_group_id']}\"> {$row2['s_name']} \n";
    }
    $DB->free_samsdb_query();
    print "</SELECT>\n";
    print "<TR>\n";
    print "<TD>\n";
    print "<B>{$usersbuttom_1_domain_AddUsersFromDomainForm_4} \n";
    print "<TD>\n";
    print "<SELECT NAME=\"usershablon\" ID=\"usershablon\" SIZE=1 TABINDEX=30 > \n";
    $num_rows = $DB->samsdb_query_value("SELECT s_shablon_id, s_name FROM shablon");
    while ($row = $DB->samsdb_fetch_array()) {
        print "<OPTION VALUE={$row['s_shablon_id']}> {$row['s_name']}\n";
    }
    $DB->free_samsdb_query();
    print "</SELECT>";
    print "<TR><TD><B>{$usersbuttom_1_domain_AddUsersFromDomainForm_6}";
    print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"enabled\" CHECKED>";
    print "</TABLE>\n";
    print "<INPUT TYPE=\"SUBMIT\" value=\"{$usersbuttom_1_domain_AddUsersFromDomainForm_5}\">\n";
    print "</FORM>\n";
    exit(0);
}
Ejemplo n.º 29
0
function RedirListTray()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    }
    print "<SCRIPT>\n";
    print "        parent.basefrm.location.href=\"main.php?show=exe&filename=redirlisttray.php&function=redirlistform&id={$id}\";\n";
    print "</SCRIPT> \n";
    $num_rows = $DB->samsdb_query_value("SELECT * FROM redirect WHERE s_redirect_id='{$id}' ");
    $row = $DB->samsdb_fetch_array();
    if ($USERConf->ToWebInterfaceAccess("LC") == 1) {
        print "<TABLE border=0 WIDTH=\"100%\">\n";
        print "<TR HEIGHT=60>\n";
        print "<TD WIDTH=25%>";
        if ($row['s_type'] == "redir") {
            $type = "{$redirlisttray_RedirListTray_1}";
        }
        if ($row['s_type'] == "replace") {
            $type = "{$redirlisttray_ReplaceListTray_1}";
        }
        if ($row['s_type'] == "denied") {
            $type = "{$deniedlisttray_DeniedListTray_1}";
        }
        if ($row['s_type'] == "allow") {
            $type = "{$allowlisttray_allowlisttray_1}";
        }
        if ($row['s_type'] == "local") {
            $type = " {$redirlisttray_RedirListTray_2}";
        }
        if ($row['s_type'] == "files") {
            $type = " {$filedeniedlisttray_filedeniedlisttray_1}";
        }
        print "<B>{$type} <FONT SIZE=\"+1\" COLOR=\"blue\">{$row['s_name']}</FONT></B>\n";
        ExecuteFunctions("./src", "redirbuttom", "1");
    }
    print "<TD>\n";
    print "</TABLE>\n";
}
Ejemplo n.º 30
0
function CacheForm()
{
    global $SAMSConf;
    global $USERConf;
    $DB = new SAMSDB();
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    if ($USERConf->ToWebInterfaceAccess("C") == 1) {
        PageTop("proxyes_48.jpg", "{$CacheForm_squidbuttom_4_addcache_6}");
        print "<SCRIPT LANGUAGE=JAVASCRIPT>\n";
        print "function EnableCheckBox(formname)\n";
        print "{\n";
        print "    formname.ntlmdomain.disabled=false; \n";
        print "    formname.bigdomain.disabled=false; \n";
        print "    formname.bigusername.disabled=false; \n";
        print "    formname.nameencode.disabled=false; \n";
        print "    formname.testpdc.disabled=false; \n";
        print "    formname.separator.disabled=false; \n";
        //		   print("    document.getElementById('c1').innerHTML='YES'; ");
        print "}\n";
        print "function DisableCheckBox(formname)\n";
        print "{\n";
        print "    formname.ntlmdomain.disabled=true; \n";
        print "    formname.bigdomain.disabled=true; \n";
        print "    formname.bigusername.disabled=true; \n";
        print "    formname.nameencode.disabled=true; \n";
        print "    formname.testpdc.disabled=true; \n";
        print "    formname.separator.disabled=true; \n";
        print "}\n";
        print "function TestPDC(formname)\n";
        print "{\n";
        print "  if(formname.auth[0].checked==true)\n";
        print "    {\n";
        print "      window.open('main.php?show=exe&function=testpdc&filename=configbuttom_1_prop.php&auth=ntlm'); \n";
        print "    }\n";
        print "  if(formname.auth[1].checked==true)\n";
        print "    {\n";
        print "      window.open('main.php?show=exe&function=testpdc&filename=configbuttom_1_prop.php&auth=adld'); \n";
        print "    }\n";
        print "}\n";
        print "</SCRIPT>\n";
        print "<P>\n";
        //      print("<H2>$CacheForm_squidbuttom_4_addcache_6</H2>\n");
        print "<SCRIPT language=JAVASCRIPT>\n";
        print "function TestName(formname)\n";
        print "{\n";
        print "  var shablonname=formname.description.value; \n";
        print "  if(shablonname.length==0) \n";
        print "    {\n";
        print "       alert(\"{$CacheForm_squidbuttom_4_addcache_9}\");\n";
        print "       return false";
        print "    }\n";
        print "  return true";
        print "}\n";
        print "</SCRIPT> \n";
        print "<FORM NAME=\"ADDCACHE\" ACTION=\"main.php\" onsubmit=\"return TestName(ADDCACHE)\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"addcache\">\n";
        print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"squidbuttom_4_addcache.php\">\n";
        print "<INPUT TYPE=\"SUBMIT\" value=\"{$CacheForm_squidbuttom_4_addcache_8}\" >\n";
        print "<TABLE CLASS=samstable WIDTH=\"90%\" BORDER=0>\n";
        print "<TR><TD><B>{$CacheForm_squidbuttom_4_addcache_7}:</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"description\" SIZE=30> \n";
        /*      ������� ������: REAL/FULL     */
        print "<TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_46}: </B>\n";
        print "<TD><SELECT NAME=\"traffic\">\n";
        print "<OPTION VALUE=\"full\"> {$adminbuttom_1_prop_SamsReConfigForm_48}";
        print "<OPTION VALUE=\"real\"> {$adminbuttom_1_prop_SamsReConfigForm_47}";
        print "</SELECT>\n";
        /*      ��������� DNS     */
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_49}</B>\n";
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"checkdns\" > \n";
        /*      ������� �����     */
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_51}</B>\n";
        print "<TD><SELECT NAME=\"loglevel\">\n";
        for ($i = 0; $i < 10; $i++) {
            if ($row['loglevel'] == $i) {
                print "<OPTION VALUE=\"{$i}\" SELECTED> {$i}";
            } else {
                print "<OPTION VALUE=\"{$i}\"> {$i}";
            }
        }
        print "</SELECT>\n";
        /*     ����� ��-���������     */
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_52}</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"defaultdomain\" value=\"{$row['defaultdomain']}\">\n";
        $scount = 0;
        if ($handle2 = opendir("./src/script")) {
            while (false !== ($file = readdir($handle2))) {
                if ($file != "." && $file != ".." && $file != ".svn") {
                    if (strlen($file) > 0) {
                        $script[$scount] = $file;
                        $scount++;
                    }
                }
            }
        }
        /*     ������, ���������� ��� ���������� ������������     */
        print "<TR>\n";
        print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_56}</B>\n";
        print "<TD><SELECT NAME=\"udscript\" ID=\"udscript\" >\n";
        $SELECTED = "";
        print "<OPTION VALUE=\"none\"> NONE\n";
        for ($i = 0; $i < $scount; $i++) {
            print "<OPTION VALUE=\"{$script[$i]}\"> {$script[$i]}\n";
        }
        print "</SELECT>\n";
        /*     ����� ��������������     */
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_57}</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"adminaddr\" value=\"root@localhost\">\n";
        print "<TR><TD><B>{$webconfigbuttom_1_prop_WebInterfaceReConfigForm_7} (byte)</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"kbsize\" value=\"1024\">\n";
        print "<TR><TD><B>{$webconfigbuttom_1_prop_WebInterfaceReConfigForm_8} (byte)</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"mbsize\" value=\"1048576\">\n";
        print "</TABLE>\n";
        //********* ����������� ������������  **************************
        $QUERY = "SELECT s_auth FROM auth_param WHERE s_param='enabled' AND s_value='1'";
        $num_rows = $DB->samsdb_query_value($QUERY);
        $ntlmauth = 0;
        $ncsaauth = 0;
        $ldapauth = 0;
        $adldauth = 0;
        while ($row = $DB->samsdb_fetch_array()) {
            if ($row[s_auth] == "ntlm") {
                $ntlmauth = 1;
            }
            if ($row[s_auth] == "adld") {
                $adldauth = 1;
            }
            if ($row[s_auth] == "ldap") {
                $ldapauth = 1;
            }
            if ($row[s_auth] == "ncsa") {
                $ncsaauth = 1;
            }
        }
        print "<P><B>{$adminbuttom_1_prop_SamsReConfigForm_17}</B>\n";
        print "<TABLE WIDTH=\"90%\" BORDER=0 >\n";
        print "<TR><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_2}</B><TD>\n";
        if ($ntlmauth == 1) {
            print "<TR bgcolor=blanchedalmond><TD VALIGN=TOP >";
            print "<INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ntlm\" onclick=EnableCheckBox(ADDCACHE) onchange=EnableDomainName(ADDCACHE)>\n";
            $sdomain = "";
            $suser = "";
            if ($row['bigu'] == "Y") {
                $suser = "******";
            }
            if ($row['bigu'] == "S") {
                $suser = "******";
            }
            if ($row['bigu'] == "N") {
                $suser = "******";
            }
            print "  <B>NTLM (</B>\n<B ID=\"DomainUser\"> {$sdomain} {$suser}";
            print "  </B>\n<B>)</B>\n";
        }
        if ($adldauth == 1) {
            print "<BR><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"adld\" onclick=EnableCheckBox(ADDCACHE) onchange=EnableDomainName(ADDCACHE)>\n";
            print "  <B>Active Directory</B><BR>\n";
        }
        if ($ntlmauth == 1 || $adldauth == 1) {
            print "<TD name=c1  ID=\"c1\">";
            print "<INPUT TYPE=\"CHECKBOX\" NAME=\"ntlmdomain\" DISABLED onchange=EnableDomainName(ADDCACHE)>{$adminbuttom_1_prop_SamsReConfigForm_19}\n";
            print "<BR><LI>{$adminbuttom_1_prop_SamsReConfigForm_20} \n";
            print "<SELECT NAME=\"bigdomain\" DISABLED onchange=EnableDomainName(ADDCACHE)>\n";
            print "<OPTION VALUE=\"0\">{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
            print "<OPTION VALUE=\"1\" >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
            print "<OPTION VALUE=\"2\">{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
            print "</SELECT > {$adminbuttom_1_prop_SamsReConfigForm_20d}\n";
            print "<BR><LI>{$adminbuttom_1_prop_SamsReConfigForm_22} \n";
            print "<SELECT NAME=\"bigusername\" DISABLED onchange=EnableDomainName(ADDCACHE)>\n";
            print "<OPTION VALUE=\"0\">{$adminbuttom_1_prop_SamsReConfigForm_20a}</OPTION>\n";
            print "<OPTION VALUE=\"1\" >{$adminbuttom_1_prop_SamsReConfigForm_20b}</OPTION>\n";
            print "<OPTION VALUE=\"2\">{$adminbuttom_1_prop_SamsReConfigForm_20c}</OPTION>\n";
            print "</SELECT >{$adminbuttom_1_prop_SamsReConfigForm_20d}\n";
            print "<P>{$adminbuttom_1_prop_SamsReConfigForm_50}: \n";
            print "<SELECT NAME=\"separator\"  DISABLED>\n";
            print "<OPTION VALUE=0>+</OPTION>\n";
            print "<OPTION VALUE=1 SELECTED >\\</OPTION>\n";
            print "<OPTION VALUE=2>@</OPTION>\n";
            print "</SELECT>\n";
            print "<P >\n";
            print "<BR><INPUT TYPE=\"BUTTON\" NAME=\"testpdc\" VALUE=\"{$adminbuttom_1_prop_SamsReConfigForm_39}\" onclick=TestPDC(ADDCACHE) DISABLED>\n";
            print "<P><INPUT TYPE=\"CHECKBOX\" NAME=\"nameencode\" DISABLED >\n";
            print "{$adminbuttom_1_prop_SamsReConfigForm_28}";
            print "<BR>{$adminbuttom_1_prop_SamsReConfigForm_29}";
        }
        if ($ldapauth == 1) {
            print "<TR bgcolor=blanchedalmond><TD><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ldap\"  onclick=DisableCheckBox(ADDCACHE)><B>LDAP</B><TD>\n";
        }
        if ($ncsaauth == 1) {
            print "<TR bgcolor=blanchedalmond><TD><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ncsa\"  onclick=DisableCheckBox(ADDCACHE)><B>NCSA</B><TD>\n";
        }
        print "<TR bgcolor=blanchedalmond><TD><INPUT TYPE=\"RADIO\" NAME=\"auth\" VALUE=\"ip\"  CHECKED  onclick=DisableCheckBox(ADDCACHE)><B>IP</B><TD>\n";
        print "</TABLE>\n";
        print "<SCRIPT LANGUAGE=JAVASCRIPT>\n";
        print "function EnableDomainName(formname) \n";
        print "{\n";
        print "  var domain='domain'; \n";
        print "  var user='******'; \n";
        print "  var enabled=formname.ntlmdomain.checked; \n";
        print "  var bigdomain=formname.bigdomain.value; \n";
        print "  var bigusername=formname.bigusername.value; \n";
        print "  if(bigdomain=='Y') \n";
        print "    {\n";
        print "       domain='DOMAIN'; \n";
        print "    }\n";
        print "  if(bigdomain=='N') \n";
        print "    {\n";
        print "       domain='Domain'; \n";
        print "    }\n";
        print "  if(bigusername=='Y') \n";
        print "    {\n";
        print "       user='******'; \n";
        print "    }\n";
        print "  if(bigusername=='N') \n";
        print "    {\n";
        print "       user='******'; \n";
        print "    }\n";
        print "  if(enabled==true) \n";
        print "    {\n";
        print "       var domainuser=domain+'+'+user; \n";
        print "       document.getElementById('DomainUser').innerHTML=domainuser;  \n";
        print "    }\n";
        print "  else \n";
        print "    {\n";
        print "       document.getElementById('DomainUser').innerHTML=user;  \n";
        print "    }\n";
        print "}\n";
        print "function DisableDomainName() \n";
        print "{\n";
        print "  document.getElementById('DomainUser').innerHTML=\"1234qwer\";  \n";
        print "  output1.innerText=\"123\"; \n";
        print "}\n";
        print "</SCRIPT>\n";
        //***********************************
        print "<TABLE WIDTH=\"90%\" BORDER=0>\n";
        print "<TR><TD>{$adminbuttom_1_prop_SamsReConfigForm_24}\n";
        print "<TR><TD> {$adminbuttom_1_prop_SamsReConfigForm_25}\n";
        print "<TR><TD><LI> {$adminbuttom_1_prop_SamsReConfigForm_26}\n";
        print "<TR><TD><LI> {$adminbuttom_1_prop_SamsReConfigForm_27}\n";
        print "<SCRIPT LANGUAGE=JAVASCRIPT>";
        print "function EnableParser(formname)";
        print "{";
        print "  var parser_on=formname.parser_on.checked; \n";
        print "  if(parser_on==true) \n";
        print "    {\n";
        print "      formname.parser.disabled=false; ";
        print "      formname.parser_time.disabled=false; ";
        print "      DisableParserTime(formname); ";
        print "    }\n";
        print "  else \n";
        print "    {\n";
        print "      formname.parser.disabled=true; ";
        print "      formname.parser_time.disabled=true; ";
        print "    }\n";
        print "}\n";
        print "</SCRIPT>";
        print "<P>\n";
        print "<P><CENTER><B>{$adminbuttom_1_prop_SamsReConfigForm_30}</B></CENTER>\n";
        print "<TABLE WIDTH=\"90%\" BORDER=0 >\n";
        $SLEEP = 1;
        print "<TR bgcolor=blanchedalmond><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_31} </B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"sleep\" SIZE=5 VALUE={$SLEEP}> {$adminbuttom_1_prop_SamsReConfigForm_32}\n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_38}</B>\n";
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"parser_on\" CHECKED onchange=EnableParser(ADDCACHE)>\n";
        print "<TR bgcolor=blanchedalmond><TD ALIGN=\"RIGHT\"><B> {$adminbuttom_1_prop_SamsReConfigForm_40}</B>\n";
        print "<TD><SELECT NAME=\"parser\" {$DISABLED_PARSER}  onchange=DisableParserTime(ADDCACHE)>\n";
        print "<OPTION VALUE=\"1\" SELECTED >  {$adminbuttom_1_prop_SamsReConfigForm_34}\n";
        print "<OPTION VALUE=\"2\" >  {$adminbuttom_1_prop_SamsReConfigForm_33}\n";
        print "</SELECT>\n";
        $time = 1;
        print "<TR bgcolor=blanchedalmond><TD ALIGN=\"RIGHT\"><B>{$adminbuttom_1_prop_SamsReConfigForm_35} </B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"parser_time\" SIZE=5 VALUE=\"{$time}\" > {$adminbuttom_1_prop_SamsReConfigForm_36}\n";
        print "<TR bgcolor=blanchedalmond><TD><B>{$adminbuttom_1_prop_SamsReConfigForm_37} </B>\n";
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"count_clean\" CHECKED >\n";
        print "</TABLE >\n";
        print "<SCRIPT LANGUAGE=JAVASCRIPT> \n";
        print "function DisableParserTime(formname) \n";
        print "{ \n";
        print "  var parser_on=formname.parser.value; \n";
        print "  if(parser_on==\"0\") \n";
        print "    {\n";
        print "      formname.parser_time.disabled=false;  \n";
        print "    }\n";
        print "  else \n";
        print "    {\n";
        print "      formname.parser_time.disabled=true;  \n";
        print "    }\n";
        print "}\n";
        print "</SCRIPT> \n";
        print "<P><TABLE WIDTH=\"90%\" BORDER=0 >\n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_3}</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"wbinfopath\" SIZE=50 VALUE=\"/usr/bin\">\n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_4}</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"redirect_to\" SIZE=50 VALUE=\"http://ip.addr/sams/icon/classic/blank.gif\">\n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_5}</B>\n";
        print "<TD><INPUT TYPE=\"TEXT\" NAME=\"denied_to\" SIZE=50 VALUE=\"http://ip.addr/sams/messages\"> \n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_6}</B>\n";
        print "<TD><SELECT NAME=\"redirector\">\n";
        print "<OPTION VALUE=\"none\" > {$adminbuttom_1_prop_SamsReConfigForm_43}";
        print "<OPTION VALUE=\"sams\" > {$adminbuttom_1_prop_SamsReConfigForm_7}";
        print "<OPTION VALUE=\"rejik\"> Rejik";
        print "<OPTION VALUE=\"squidguard\"> SquidGuard";
        print "<OPTION VALUE=\"squid\"> {$adminbuttom_1_prop_SamsReConfigForm_8}";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$adminbuttom_1_prop_SamsReConfigForm_9}</B>\n";
        print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"delaypool\" > \n";
        print "<TR bgcolor=blanchedalmond>\n";
        print "<TD><B>{$configbuttom_1_prop_SamsReConfigForm_53}</B>\n";
        print "<TD><SELECT NAME=\"squidbase\">\n";
        print "<OPTION VALUE=\"0\" {$SELECTED}> {$configbuttom_1_prop_SamsReConfigForm_54}";
        for ($i = 1; $i <= 12; $i++) {
            $SELECTED = "";
            print "<OPTION VALUE=\"{$i}\" > {$i}";
        }
        print "</SELECT>\n";
        print "{$configbuttom_1_prop_SamsReConfigForm_55}\n";
        print "</TABLE>\n";
        print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$CacheForm_squidbuttom_4_addcache_8}\" >\n";
        print "</FORM>\n";
    }
}