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"; }
function ClearUserTrafficCounterForm() { global $SAMSConf; global $USERConf; global $SquidUSERConf; $DB = new SAMSDB(); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("UC") != 1) { exit(0); } if (isset($_GET["id"])) { $id = $_GET["id"]; } $SquidUSERConf = new SAMSUSER(); $SquidUSERConf->sams_user($id); PageTop("usertraffic_48.jpg", "{$usertray_UserTray_1} <FONT COLOR=\"BLUE\">{$SquidUSERConf->s_nick}</FONT> <BR>{$userbuttom_5_clear_userbuttom_5_clear_1}"); print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=UserName value=\"{$SquidUSERConf->s_user_id}\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"clearusertrafficcounter\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"userbuttom_5_clear.php\">\n"; print "<BR><INPUT TYPE=\"CHECKBOX\" NAME=\"enabled\" CHECKED> {$activate_user}\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$userbuttom_5_clear_userbuttom_5_clear_1}\">\n"; print "</FORM>\n"; }
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"; }
function AuthEnabledForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit(0); } $ADLDCHECKED = ""; $NTLMCHECKED = ""; $LDAPCHECKED = ""; $NCSACHECKED = ""; PageTop("config_48.jpg", "{$authtray_AuthEnabledForm_1}"); print "<P>\n"; print "<FORM NAME=\"authenabledform\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"authenabled\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authtray.php\">\n"; print "<TABLE CLASS=samstable WIDTH=\"90%\" BORDER=0>\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TH bgcolor=blanchedalmond>{$authtray_AuthEnabledForm_2}\n"; print "<TH bgcolor=blanchedalmond>{$authtray_AuthEnabledForm_3}\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>IP </B>\n"; if (GetAuthParameter("ip", "enabled") > 0) { $IPCHECKED = "CHECKED"; } print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"ip\" {$IPCHECKED}> \n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>Active Directory </B>\n"; if (GetAuthParameter("adld", "enabled") > 0) { $ADLDCHECKED = "CHECKED"; } print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"adld\" {$ADLDCHECKED}> \n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>NTLM</B>\n"; if (GetAuthParameter("ntlm", "enabled") > 0) { $NTLMCHECKED = "CHECKED"; } print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"ntlm\" {$NTLMCHECKED}> \n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>LDAP</B>\n"; if (GetAuthParameter("ldap", "enabled") > 0) { $LDAPCHECKED = "CHECKED"; } print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"ldap\" {$LDAPCHECKED}> \n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>NCSA</B>\n"; if (GetAuthParameter("ncsa", "enabled") > 0) { $NCSACHECKED = "CHECKED"; } print "<TD><INPUT TYPE=\"CHECKBOX\" NAME=\"ncsa\" {$NCSACHECKED}> \n"; print "</TABLE>\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$lframe_sams_Auth_ConfigureButton}\">\n"; print "</FORM>\n"; print "<P><IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">"; print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/authorization.html\">{$documentation}</A>"; }
function ChUserPasswdForm() { global $SAMSConf; global $USERConf; global $SquidUSERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } $SquidUSERConf = new SAMSUSER(); $SquidUSERConf->sams_user($id); if ($USERConf->ToWebInterfaceAccess("AUC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) { PageTop("userpasswd_48.jpg", "{$userbuttom_6_chpasswd_ChUserPasswdForm_1} <FONT COLOR=\"BLUE\">{$SquidUSERConf->s_nick}</FONT>"); print "<P>\n"; print "<SCRIPT language=JAVASCRIPT>\n"; print "function TestUserData(formname)\n"; print "{\n"; print " var passw1=formname.passw1.value; \n"; print " var passw2=formname.passw2.value; \n"; print " var res=0;\n"; print " if(passw1.length!=passw2.length) \n"; print " {\n"; print " window.confirm(\"{$adminbuttom_4_chpasswd_ChangeAdminPasswdForm_4}\");\n"; print " res=1;\n"; print " }\n"; print " else\n"; print " {\n"; print " for(var i=0; i < passw1.length; i +=1 ) \n"; print " {\n"; print " if(passw1.charAt(i)!=passw2.charAt(i)) \n"; print " {\n"; print " window.confirm(\"{$adminbuttom_4_chpasswd_ChangeAdminPasswdForm_5}\");\n"; print " res=1;\n"; print " break;\n"; print " }\n"; print " }\n"; print " }\n"; print " if(res==0) \n"; print " this.document.forms[\"form1\"].submit();\n"; print "}\n"; print "</SCRIPT> \n"; print "<FORM NAME=\"form1\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"chuserpasswd\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"userbuttom_6_chpasswd.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" value=\"{$SquidUSERConf->s_user_id}\">\n"; print "<TABLE WIDTH=\"90%\">"; print "<TR><TD><B>login:</B><TD>"; print "{$SquidUSERConf->s_nick}"; print "<TR><TD><B>Password:</B><TD>"; print "<BR><INPUT TYPE=\"PASSWORD\" NAME=\"passw1\" SIZE=30> \n"; print "<TR><TD><B>Retype:</B><TD>"; print "<BR><INPUT TYPE=\"PASSWORD\" NAME=\"passw2\" SIZE=30> \n"; print "<BR><INPUT TYPE=\"BUTTON\" value=\"{$adminbuttom_4_chpasswd_ChangeAdminPasswdForm_2}\" onclick=TestUserData(form1)>\n"; print "</FORM>\n"; } }
function NotEmptyGroupWarning($groupnick) { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } PageTop("warning.jpg", "{$groupbuttom_9_delete_NotEmptyGroupWarning_1}"); print "<B>{$groupbuttom_9_delete_NotEmptyGroupWarning_2}</B>"; }
function shutdown_proxy() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } if ($USERConf->ToWebInterfaceAccess("C") == 1) { $DB = new SAMSDB(); PageTop("reconfig_48.jpg", "Send command '{$SAMSConf->SHUTDOWN}' to proxy server"); $QUERY = "INSERT INTO reconfig (s_proxy_id, s_service, s_action) VALUES('{$id}', 'squid', 'shutdown'); "; $result = $DB->samsdb_query($QUERY); } }
function AuthNTLMReConfigForm() { global $SAMSConf; global $PROXYConf; global $USERConf; $DB = new SAMSDB(); $files = array(); if (isset($_GET["id"])) { $proxy_id = $_GET["id"]; } $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } PageTop("config_48.jpg", "{$authntlmbuttom_1_prop_AuthNTLMReConfigForm_1} "); print "<P>\n"; print "<FORM NAME=\"adldreconfigform\" 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=\"authntlmreconfig\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"authntlmbuttom_1_prop.php\">\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><INPUT TYPE=\"TEXT\" NAME=\"ntlmserver\" VALUE=\"{$value}\" >\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>{$ntlm_domain}</B>\n"; $value = GetAuthParameter("ntlm", "ntlmdomain"); print "<TD><INPUT TYPE=\"TEXT\" NAME=\"ntlmdomain\" VALUE=\"{$value}\">\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>{$ntlm_admin}</B>\n"; $value = GetAuthParameter("ntlm", "ntlmadmin"); print "<TD><INPUT TYPE=\"TEXT\" NAME=\"ntlmadmin\" VALUE=\"{$value}\">\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>{$ntlm_passwd}</B>\n"; $value = GetAuthParameter("ntlm", "ntlmadminpasswd"); print "<TD><INPUT TYPE=\"TEXT\" NAME=\"ntlmadminpasswd\" VALUE=\"{$value}\">\n"; print "<TR bgcolor=blanchedalmond>\n"; print "<TD><B>{$ntlm_group}</B>\n"; $value = GetAuthParameter("ntlm", "ntlmusergroup"); print "<TD><INPUT TYPE=\"TEXT\" NAME=\"ntlmusergroup\" VALUE=\"{$value}\">\n"; print "</TABLE>\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$adminbuttom_1_prop_SamsReConfigForm_12}\">\n"; print "</FORM>\n"; }
function AddURLListForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; print " parent.tray.location.href=\"tray.php\";\n"; print "</SCRIPT> \n"; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } PageTop("redirect_48.jpg", "{$redirlisttray_AddRedirListForm_1} "); print "<BR>\n"; print "<SCRIPT language=JAVASCRIPT>\n"; print "function TestName(formname)\n"; print "{\n"; print " var shablonname=formname.name.value; \n"; print " if(shablonname.length==0) \n"; print " {\n"; print " alert(\"{$redirlisttray_AddRedirListForm_5}\");\n"; print " return false"; print " }\n"; print " return true"; print "}\n"; print "</SCRIPT> \n"; print "<FORM NAME=\"REDIRECT\" ACTION=\"main.php\" onsubmit=\"return TestName(REDIRECT)\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"addnewlist\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"execute\" id=execute value=\"redirlisttray\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"urllistfunction.php\">\n"; print "<TABLE>\n"; print "<TR>\n"; print "<TD>\n"; print "<B>{$redirlisttray_AddRedirListForm_2}:\n"; print "<TD>\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" id=type value=\"redir\">\n"; print "<INPUT TYPE=\"TEXT\" NAME=\"name\" SIZE=50> \n"; print "</TABLE>\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$redirlisttray_AddRedirListForm_3}\">\n"; print "</FORM>\n"; print "<P><TABLE WIDTH=\"90%\"><TR><TD WIDTH=\"15%\"><A HREF=\"doc/{$SAMSConf->LANGCODE}/urllists.html\">"; print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\" ALIGN=RIGHT>"; print "<TD>{$redirlisttray_AddRedirListForm_4}"; }
function HelpSquidForm() { global $SAMSConf; global $USERConf; $files = array(); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; PageTop("reconfig_48.jpg", "{$squidtray_HelpSquidForm_1}"); print "<P><P>\n"; print "<P><TABLE WIDTH=\"90%\"><TR><TD WIDTH=\"15%\">"; //print("<A HREF=\"doc/reconfig.html\">"); print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\" ALIGN=RIGHT>"; print "<TD>{$squidtray_HelpSquidForm_2}"; print "</TABLE>"; if ($USERConf->ToWebInterfaceAccess("C") == 1) { $squidlogfiles = 0; $scount = 0; if ($handle2 = opendir("./backup")) { while (false !== ($file = readdir($handle2))) { if ($file != "." && $file != ".." && $file != ".svn") { if (strlen($file) > 0) { $script[$scount] = $file; $scount++; } } } } if ($scount > 0) { print "<H3>{$squidtray_HelpSquidForm_3} </H3>"; print "<P><TABLE border=0 WIDTH=\"60%\">\n"; print "<TH >N "; print "<TH >Filename"; print "<TH >Size"; } for ($i = 0; $i < $scount; $i++) { $filesize = filesize("./backup/{$script[$i]}"); print "<TR>\n"; print "<TD WIDTH=\"10%\" ALIGN=\"CENTER\">{$i} "; print "<TD WIDTH=\"70%\" ALIGN=\"LEFT\">"; print "<B><A HREF=\"backup/{$script[$i]}\">{$script[$i]}</A></B>\n"; print "<TD WIDTH=\"20%\" ALIGN=\"CENTER\"> {$filesize}"; } } }
function ChangeUser() { global $SAMSConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT language=JAVASCRIPT>\n"; print "function TestUserData(formname)\n"; print "{\n"; print " var username=formname.username.value; \n"; print " var res=0;\n"; print " var host=window.location.hostname;\n"; print " var path=window.location.pathname;\n"; print " var hrefstr=\"https://\"+host+path;\n"; print " if(username.length==0) \n"; print " {\n"; print " window.confirm(\"{$adminbuttom_2_chuser_ChangeUser_3}\");\n"; print " res=1;\n"; print " }\n"; print " if(res==0) \n"; print " this.document.forms[\"form1\"].submit();\n"; print "}\n"; print "</SCRIPT> \n"; print "<CENTER>\n"; print "<TABLE WIDTH=\"90%\" BORDER=0>\n"; print "<TR>\n"; print "<TD COLSPAN=2>\n"; PageTop("getpassword.jpg", "{$adminbuttom_2_chuser_ChangeUser_1} "); print "<B>{$adminbuttom_2_chuser_ChangeUser_2}</B>"; print "<P>\n"; print "<FORM NAME=\"form1\" ACTION=\"main.php\" onsubmit=TestUserData(form1) method=\"POST\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"setcookie\">\n"; print "<TR>\n"; print "<TD><B>login:</B>\n"; print "<TD><INPUT TYPE=\"TEXT\" NAME=\"username\" SIZE=30>\n"; print "<TR>\n"; print "<TD><B>password:</B>\n"; print "<TD><INPUT TYPE=\"PASSWORD\" NAME=\"userid\" SIZE=30 > \n"; print "<TR>\n"; print "<TD COLSPAN=2 ALIGN=CENTER>\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"Ok\">\n"; print "</TABLE>\n"; print "</FORM>\n"; }
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"; }
function LoadRedirListForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } if ($USERConf->ToWebInterfaceAccess("CL") != 1) { exit; } PageTop("import_48.jpg", "{$redir_loadfurllist1}"); print "<FORM NAME=\"LOADBACKUP\" ENCTYPE=\"multipart/form-data\" ACTION=\"main.php?show=exe&function=loadredirlist&filename=redirbuttom_1_loadlist.php&id={$id}&type=redir&execute=redirlisttray \" METHOD=POST>\n"; print " <INPUT TYPE=\"HIDDEN\" NAME=\"MAX_FILES_SIZE\" value=\"1048576\">\n"; print "<BR><INPUT TYPE=\"FILE\" NAME=\"userfile\" value=\"{$redir_importurllistform1}\">\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"Load file\">\n"; print "</FORM>\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"; }
function LoadBackUpForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } PageTop("reark_48.jpg", "{$backupbuttom_2_loadbase_LoadBackUpForm_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 "<BR>{$backupbuttom_2_loadbase_LoadBackUpForm_4}\n"; print "<FORM NAME=\"LOADBACKUP\" ENCTYPE=\"multipart/form-data\" ACTION=\"main.php?show=exe&function=loadbackup&filename=configbuttom_5_restore.php\" METHOD=POST>\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"MAX_FILES_SIZE\" value=\"10485760\">\n"; print "<INPUT TYPE=\"FILE\" name=\"userfile\" value=\"{$backupbuttom_2_loadbase_LoadBackUpForm_2}\">\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"load file and restore backup\">\n"; print "</FORM>\n"; }
function ReconfigSquidForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit(0); } if (isset($_GET["id"])) { $id = $_GET["id"]; } PageTop("reconfig_48.jpg", "{$squidbuttom_0_reconfig_ReconfigSquidForm_1} "); print "<FORM NAME=\"adddenied\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"reconfigsquid\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"proxybuttom_2_reconfig.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" value=\"{$id}\">\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$squidbuttom_0_reconfig_ReconfigSquidForm_2}\">\n"; print "</FORM>\n"; }
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"; }
function NewGroupForm() { global $SAMSConf; global $USERConf; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; PageTop("usergroup_48.jpg", "{$grouptray_NewGroupForm_1}"); print "<FORM NAME=\"NEWUSER\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"addgroup\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"newgrpbuttom_5_addgroup.php\">\n"; print "<TABLE>\n"; print "<TR>\n"; print "<TD>\n"; print "<B>{$grouptray_NewGroupForm_2}\n"; print "<TD>\n"; print "<INPUT TYPE=\"TEXT\" NAME=\"groupnick\" SIZE=30> \n"; print "</TABLE>\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$denied_quickadddeniedurlform4}\">\n"; print "</FORM>\n"; }
function SaveBackUpForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } PageTop("backup_48.jpg", "{$backupbuttom_1_savebase_SaveBackUpForm_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=\"savebackup\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"configbuttom_4_backup.php\">\n"; print "<BR>{$backupbuttom_1_savebase_SaveBackUpForm_2}:\n"; print "<P><TABLE>\n"; print "<TR><TD><P><INPUT TYPE=\"CHECKBOX\" NAME=\"traffic\"> Save traffic \n"; print "<TR><TD><P><INPUT TYPE=\"SUBMIT\" value=\"{$backupbuttom_1_savebase_SaveBackUpForm_3}\">\n"; print "</TABLE>\n"; print "</FORM>\n"; }
function importdataform() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit(0); } PageTop("importdb_48.jpg", "{$configbuttom_3_import_importdataform_1} "); print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">"; print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/importfromsams1.html\">{$documentation}</A>"; print "<P>\n"; print "<SCRIPT LANGUAGE=JAVASCRIPT>\n"; print "function EnableUserNameTransform(formname) \n"; print "{\n"; print " var transformenabled=formname.importusers.checked; \n"; print " if(transformenabled==true) \n"; print " {\n"; print " \tformname.nametransform.disabled=false; \n"; print " }\n"; print " if(transformenabled==false) \n"; print " {\n"; print " \tformname.nametransform.disabled=true; \n"; print " }\n"; print "}\n"; print "</SCRIPT>\n"; print "<FORM NAME=\"createdatabase\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" value=\"importdata\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" value=\"configbuttom_3_import.php\">\n"; print "<TABLE WIDTH=\"90%\">\n"; print "<TR><TD ALIGN=RIGHT>DB Hostname: <TD ALIGN=LEFT><INPUT TYPE=\"TEXT\" NAME=\"hostname\" value=\"localhost\">\n"; print "<TR><TD ALIGN=RIGHT>DB login: <TD ALIGN=LEFT><INPUT TYPE=\"TEXT\" NAME=\"username\">\n"; print "<TR><TD ALIGN=RIGHT>DB password: <TD ALIGN=LEFT><INPUT TYPE=\"PASSWORD\" NAME=\"pass\">\n"; print "<TR><TD ALIGN=RIGHT>{$configbuttom_3_import_importdataform_2}: <TD ALIGN=LEFT><INPUT TYPE=\"CHECKBOX\" NAME=\"importusers\" CHECKED onchange=EnableUserNameTransform(createdatabase)>\n"; // print("<TR><TD ALIGN=RIGHT>$configbuttom_3_import_importdataform_7\n"); print "<TR><TD ALIGN=RIGHT>{$configbuttom_3_import_importdataform_7}\n"; print "<SELECT NAME=\"nametransform\">\n"; print "<OPTION VALUE=\"nochange\" SELECTED> {$configbuttom_3_import_importdataform_8}"; print "<OPTION VALUE=\"tolower\"> {$configbuttom_3_import_importdataform_9}"; print "<OPTION VALUE=\"toupper\"> {$configbuttom_3_import_importdataform_10}"; print "</SELECT>\n"; print "<TR><TD ALIGN=RIGHT>{$configbuttom_3_import_importdataform_3}: <TD ALIGN=LEFT><INPUT TYPE=\"CHECKBOX\" NAME=\"importurllists\" CHECKED>\n"; print "<TR><TD ALIGN=RIGHT>{$configbuttom_3_import_importdataform_4}: <TD ALIGN=LEFT><INPUT TYPE=\"CHECKBOX\" NAME=\"importproxy\" CHECKED>\n"; print "</TABLE>\n"; printf("<BR><CENTER>"); print "<BR><INPUT TYPE=\"SUBMIT\" value=\"{$configbuttom_3_import_importdataform_5}\">\n"; print "</FORM>\n"; }
function CUserDoc() { global $SAMSConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; PageTop("user.jpg", "{$admintray_UserDoc_1}"); print "<H2>{$admintray_UserDoc_2}</H2>"; print "</CENTER>"; print "<IMG SRC=\"{$SAMSConf->ICONSET}/lframe.jpg\" ALIGN=LEFT>"; print "{$admintray_UserDoc_3}"; print "{$admintray_UserDoc_4}"; }
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"; } }
function UsersTrafficForm() { global $SAMSConf; global $USERConf; if ($USERConf->ToWebInterfaceAccess("CS") != 1) { exit(0); } require "reportsclass.php"; $dateselect = new DATESELECT("", ""); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["userid"])) { $userid = $_GET["userid"]; } PageTop("traffic_48.jpg", "{$alltraffic_1}<BR>{$usersbuttom_2_traffic_UsersTrafficForm_1}"); print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"userstrafficperiod\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"usersbuttom_2_traffic.php\">\n"; $dateselect->SetPeriod(); print "</FORM>\n"; }
function 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"; } }
function UserTimeTrafficForm() { global $SAMSConf; global $USERConf; global $SquidUSERConf; if (isset($_GET["id"])) { $id = $_GET["id"]; } $SquidUSERConf = new SAMSUSER(); $SquidUSERConf->sams_user($id); require "reportsclass.php"; $dateselect = new DATESELECT("", ""); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("GSC") == 1 || $USERConf->s_user_id == $SquidUSERConf->s_user_id && $USERConf->ToWebInterfaceAccess("W") == 1) { PageTop("ttraffic_48.jpg", "{$traffic_1} <FONT COLOR=\"BLUE\">{$SquidUSERConf->s_nick}</FONT> <BR>{$URLTimeForm_userbuttom_4_time_1}"); print "<FORM NAME=\"UserIDForm\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" id=UserName value=\"{$SquidUSERConf->s_user_id}\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"usertimetraffic\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"userbuttom_3_time.php\">\n"; // $dateselect->SetDate(); $dateselect->ThisDate(); print "</FORM>\n"; } }
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"; }
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"; } }
function LoadNCSAFileForm() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } if ($USERConf->ToWebInterfaceAccess("UCL") != 1) { exit; } PageTop("loadncsa_48.jpg", "{$authbuttom_1_ncsaimport_LoadFileForm_1}"); print "<FORM NAME=\"LOADFILE\" ENCTYPE=\"multipart/form-data\" ACTION=\"main.php?show=exe&function=usersimportfromncsafileform&filename=authncsabuttom_2_ncsaimport.php\" METHOD=POST>\n"; print " <INPUT TYPE=\"HIDDEN\" NAME=\"MAX_FILES_SIZE\" value=\"1048576\">\n"; print "<BR><INPUT TYPE=\"FILE\" NAME=\"userfile\" value=\"{$redir_importurllistform1}\">\n"; print "<BR><INPUT TYPE=\"SUBMIT\" value=\"Load file\">\n"; print "</FORM>\n"; }
function RedirListForm() { global $SAMSConf; global $USERConf; $DB = new SAMSDB(); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } $count = 0; if ($USERConf->ToWebInterfaceAccess("LC") != 1) { exit; } $num_rows = $DB->samsdb_query_value("SELECT * FROM redirect WHERE s_redirect_id='{$id}' "); $row = $DB->samsdb_fetch_array(); $show1 = $row['s_type']; $nick1 = $row['s_name']; 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'] == "files") { $type = " {$filedeniedlisttray_filedeniedlisttray_1}"; } if ($row['s_type'] == "local") { $type = " {$redirlisttray_RedirListTray_2}"; } if ($row['s_type'] == "regex") { $type = " {$regexlisttray_regexlisttray_1}"; } PageTop("redirect_48.jpg", "{$type} <FONT COLOR=\"BLUE\">{$row['s_name']}</FONT>"); print "<IMG SRC=\"{$SAMSConf->ICONSET}/help.jpg\">"; print "<A HREF=\"http://sams.perm.ru/sams2/doc/" . $SAMSConf->LANG . "/accesslists.html#fileext\">{$documentation}</A>"; print "<P>\n"; print "<FORM NAME=\"destination\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"savedestination\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"redirlisttray.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"row_id\" VALUE=\"{$id}\"> \n"; if ($row['s_type'] == "replace") { print "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" VALUE=\"replace\"> \n"; print "Substitute destination <INPUT TYPE=\"TEXT\" NAME=\"dest\" SIZE=50 VALUE=\"{$row['s_dest']}\"> </INPUT>"; print "<INPUT TYPE=\"SUBMIT\" value=\"Save\">\n"; print "<BR>"; } print "</FORM>"; $DB->free_samsdb_query(); print "<BR>\n"; print "<FORM NAME=\"table\" ACTION=\"main.php\">\n"; print "<SELECT NAME=\"delete\" ID=\"deleteurl\" SIZE=10 TABINDEX=20 "; print "STYLE=\"font-size:10pt\">\n"; $num_rows = $DB->samsdb_query_value("SELECT s_url FROM url WHERE s_redirect_id='{$id}' ORDER BY s_url"); while ($row = $DB->samsdb_fetch_array()) { $count++; $string = $row['s_url']; $string2 = EkranChars($string); print "<OPTION VALUE={$string} onclick=EditURL(\"{$string2}\")> {$string}\n"; } print "</SELECT>\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"deleteurlfromlist\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"redirlisttray.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" VALUE=\"{$id}\"> \n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"deletedurl\" VALUE=\"\"> \n"; print "</BR>\n"; print "\n"; print "<INPUT TYPE=\"BUTTON\" value=\"{$redirlisttray_RedirListForm_1}\" OnClick=DeleteURL(table)>\n"; print "</FORM>\n"; print "<script language=JAVASCRIPT>\n"; print "function AppendURLString(s)\n"; print "{\n"; print " var res=\"\";\n"; print " for (var i=0; i <= s.length; i++)\n"; print " {\n"; print " var letter =s.substr(i,1);\n"; print " if ( letter == \"\\\\\" ) \n"; print " { res = res + letter }\n"; print " res = res + letter \n"; print " } \n"; print " return res\n"; print "}\n"; print "function AddURL(formname)\n"; print "{\n"; print " var s=formname.addurl.value;\n"; print " var res=AppendURLString(s);\n"; print " document.forms[\"ADDURL\"].elements[\"addurl\"].value=res;\n"; print " document.forms[\"ADDURL\"].submit();\n"; print "}\n"; print "function DeleteURL(formname)\n"; print "{\n"; print " var s=formname.deleteurl.value;\n"; print " var res=AppendURLString(s);\n"; print " document.forms[\"table\"].elements[\"deletedurl\"].value=res;\n"; print " document.forms[\"table\"].submit();\n"; print "}\n"; print "function ChangeURL(formname)\n"; print "{\n"; print " var s=formname.editurlstr.value;\n"; print " var res=AppendURLString(s);\n"; print " document.forms[\"EDITURL\"].elements[\"editurl\"].value=res;\n"; print " document.forms[\"EDITURL\"].submit();\n"; print "}\n"; print "function EditURL(URL)\n"; print "{\n"; print " document.forms[\"EDITURL\"].elements[\"editurlstr\"].value=URL;\n"; print " var res=AppendURLString(URL);\n"; print " document.forms[\"EDITURL\"].elements[\"oldvalue\"].value=res;\n"; print "}\n"; print "function SaveDestination(formname)\n"; print "{\n"; //print(" var s=formname.deleteurl.value;\n"); //print(" var res=AppendURLString(s);\n"); //print(" document.forms[\"table\"].elements[\"deletedurl\"].value=res;\n"); //print(" document.forms[\"table\"].submit();\n"); print "}\n"; print "</script>\n"; print "<P>\n"; print "<FORM NAME=\"EDITURL\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"editurlfromlist\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"redirlisttray.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" VALUE=\"{$id}\"> \n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"oldvalue\" VALUE=\"\"> \n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"editurl\" VALUE=\"\"> \n"; print "<INPUT TYPE=\"TEXT\" NAME=\"editurlstr\" SIZE=30> \n"; print "<INPUT TYPE=\"BUTTON\" value=\"Change\" OnClick=ChangeURL(EDITURL)>\n"; print "</FORM>\n"; print "<P><BR>\n"; print "<FORM NAME=\"ADDURL\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"addurlfromlist\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"redirlisttray.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"id\" VALUE=\"{$id}\"> \n"; print "<INPUT TYPE=\"TEXT\" NAME=\"addurl\" SIZE=30> \n"; print "<INPUT TYPE=\"BUTTON\" value=\"{$redirlisttray_RedirListForm_2}\" OnClick=AddURL(ADDURL)>\n"; print "</FORM>\n"; print "<P>\n"; print "<FORM NAME=\"CLEARLIST\" ACTION=\"main.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"show\" id=Show value=\"exe\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"function\" id=function value=\"deleteallurlfromlist\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"filename\" id=filename value=\"redirlisttray.php\">\n"; print "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" VALUE=\"{$id}\"> \n"; print "<INPUT TYPE=\"SUBMIT\" value=\"{$redirlisttray_RedirListForm_3}\">\n"; print "</FORM>\n"; }
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"; } }