function AdminTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; if ($USERConf->ToWebInterfaceAccess("C") != 1) { print "parent.basefrm.location.href= \t\"main.php?show=exe&filename=admintray.php&function=userdoc\";\n"; } print "</SCRIPT> \n"; print "<TABLE WIDTH=\"90%\" BORDER=0 ALIGN=CENTER>\n"; print "<TR>\n"; if ($USERConf->ToWebInterfaceAccess("C") != 1) { print "<TD WIDTH=34 HEIGH=34><IMAGE src=\"{$SAMSConf->ICONSET}/config_32.jpg\" BORDER=0 ALT=\"SAMS management interface\"\n "; // print("<TD><A HREF=\"main.php?show=exe&function=changeuser&filename=adminbuttom_2_chuser.php\" TARGET=basefrm> SAMS management interface</A>"); print "<TD><A HREF=\"main.php?show=exe&function=changeuser&filename=adminbuttom_2_chuser.php\" TARGET=basefrm> {$admintray_admintray_1}</A>"; } else { print "<TD VALIGN=\"TOP\" WIDTH=\"30%\"\">"; print "<B>User<BR><FONT SIZE=\"+1\" COLOR=\"blue\">{$SAMSConf->adminname}</FONT></B>\n"; ExecuteFunctions("./src", "adminbuttom", "1"); print "<TD>\n"; } print "</TABLE>\n"; }
function lframe_sams() { global $SAMSConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; $item = array("classname" => "sams", "icon" => "proxy.gif", "target" => "basefrm", "url" => "main.php", "text" => "SAMS"); treeFolder($item); ExecuteFunctions("./src", "lffolder_", "1"); treeFolderClose(); return 0; }
function AuthNCSATray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&function=authncsavalues&filename=authncsatray.php\";\n"; print "</SCRIPT> \n"; if ($USERConf->ToWebInterfaceAccess("UC") == 1) { print "<TABLE border=0 WIDTH=95%>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B>{$authtype_AuthTray}<BR><FONT SIZE=\"+1\" COLOR=\"BLUE\">NCSA</FONT></B>\n"; ExecuteFunctions("./src", "authncsabuttom", "1"); } print "<TD>\n"; print "</TABLE>\n"; }
function SquidTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&filename=squidtray.php&function=helpsquidform\";\n"; print "</SCRIPT> \n"; if ($USERConf->ToWebInterfaceAccess("C") == 1) { print "<TABLE border=0 WIDTH=95%>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B><FONT SIZE=\"+1\">SQUID</FONT></B>\n"; ExecuteFunctions("./src", "squidbuttom", "1"); } print "<TD>\n"; print "</TABLE>\n"; }
function NewGrpTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&function=blankpage\";\n"; print "</SCRIPT> \n"; print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR>\n"; print "<TD VALIGN=\"TOP\" WIDTH=\"30%\"\">"; print "<B><FONT SIZE=\"+1\" COLOR=\"blue\">{$newgrouptray_NewGrpTray_1}</FONT></B>\n"; ExecuteFunctions("./src", "newgrpbuttom", "1"); print "<TD>\n"; print "</TABLE>\n"; }
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"; }
function ProxyTray() { global $SAMSConf; global $PROXYConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") == 1) { print "<SCRIPT>\n"; JSProxyInfo(); print "</SCRIPT> \n"; print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=\"30%\">"; print "<B>Proxy<BR><FONT COLOR=\"BLUE\">{$PROXYConf->s_description}</FONT></B>\n"; ExecuteFunctions("./src", "proxybuttom", "1"); print "<TD>\n"; print "</TABLE>\n"; } }
function UserTray() { global $SAMSConf; global $USERConf; global $SquidUSERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if (isset($_GET["id"])) { $id = $_GET["id"]; } if (isset($_GET["auth"])) { $auth = $_GET["auth"]; } $SquidUSERConf = new SAMSUSER(); $SquidUSERConf->sams_user($id); if ($USERConf->s_samsadmin > 0 || $USERConf->s_user_id == $id || $USERConf->ToGroupStatAccess("GS", $SquidUSERConf->s_group_id) == 1) { print "<SCRIPT>\n"; JSUserInfo(); print "</SCRIPT> \n"; print "<TABLE border=0 WIDTH=95%>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B>{$usertray_UserTray_1} <BR> <FONT SIZE=\"+1\" COLOR=\"blue\">{$SquidUSERConf->s_nick} </FONT> </B>\n"; ExecuteFunctions("./src", "userbuttom", $USERConf->s_user_id); print "<TD>\n"; print "</TABLE>\n"; } else { print "<SCRIPT>\n"; print "parent.basefrm.location.href=\"main.php?show=exe&filename=usertray.php&function=userauthform&id={$id}&auth={$auth}\";\n"; print "</SCRIPT> \n"; exit(0); } }
function WebConfigTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; if ($USERConf->ToWebInterfaceAccess("C") == 1) { print "parent.basefrm.location.href=\"main.php?show=exe&function=sysinfo&filename=webconfigtray.php\";\n"; } else { print "parent.basefrm.location.href=\"main.php?show=exe&function=cuserdoc&filename=configtray.php\";\n"; } print "</SCRIPT> \n"; print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR>\n"; print "<TD VALIGN=\"TOP\" WIDTH=\"30%\"\">"; print "<B>{$webconfigbuttom_1_prop_webconfigbuttom_1_propadmintray_1}</B>\n"; ExecuteFunctions("./src", "webconfigbuttom", "1"); print "<TD>\n"; print "</TABLE>\n"; }
function UsersTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("AUCS") == 1) { print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&filename=userstray.php&function=AllUsersForm&type=all\";\n"; print "</SCRIPT> \n"; } else { print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php\";\n"; print "</SCRIPT> \n"; } print "<TABLE border=0 WIDTH=95%>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B><FONT SIZE=\"+1\" COLOR=\"blue\">{$userstray_UsersTray_1}</FONT></B>\n"; ExecuteFunctions("./src", "usersbuttom", "1"); // print("<TD>\n"); print "<TD>\n"; print "</TABLE>\n"; }
function TRangeTray() { if (isset($_GET["id"])) { $id = $_GET["id"]; } global $SAMSConf; global $TRANGEConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") != 1) { exit; } print "<SCRIPT>\n"; JSTRangeInfo(); print "</SCRIPT> \n"; print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B>{$TRangeTray_trangetray_1}<BR><FONT COLOR=\"BLUE\">{$TRANGEConf->s_name}</FONT></B>\n"; ExecuteFunctions("./src", "trangebuttom", "1"); print "<TD>\n"; print "</TABLE>\n"; }
function ShablonTray() { global $SAMSConf; global $SHABLONConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") == 1) { print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&filename=shablontray.php&function=shablonusers&id={$SHABLONConf->s_shablon_id}&sid=ALL\";\n"; print "</SCRIPT> \n"; print "<TABLE border=0 WIDTH=\"100%\">\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B>{$shablontray_ShablonTray_1} <BR><FONT SIZE=\"+1\" COLOR=\"BLUE\">{$SHABLONConf->s_name}</FONT></B>\n"; ExecuteFunctions("./src", "shablonbuttom", "1"); } print "<TD>\n"; print "</TABLE>\n"; }
function ConfigTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; if ($USERConf->ToWebInterfaceAccess("C") == 1) { print "<SCRIPT>\n"; print "parent.basefrm.location.href=\"main.php?show=exe&function=sysinfo&filename=configtray.php\";\n"; print "</SCRIPT> \n"; print "<TABLE WIDTH=\"95%\" BORDER=0>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=\"25%\"\">"; print "<B>{$adminbuttom_1_prop_SamsReConfigForm_1}</B>\n"; ExecuteFunctions("./src", "configbuttom", "1"); print "<TD>\n"; print "</TABLE>\n"; } else { print "<SCRIPT>\n"; print "parent.basefrm.location.href=\"main.php?show=exe&function=cuserdoc&filename=configtray.php\";\n"; print "</SCRIPT> \n"; } }
print "<link rel=\"STYLESHEET\" type=\"text/css\" href=\"icon/classic/treeview.css\">\n"; echo "<script type=\"text/javascript\" src=\"lib/jquery-1.2.6.js\"></script> \n\n<script type=\"text/javascript\" src=\"lib/jquery.cookie.js\"></script>\n\n<script type=\"text/javascript\" src=\"lib/jquery.treeview.js\"></script>\n"; echo "<TABLE CLASS=lframehead>\n"; echo "<TR><TH CLASS=lframehead>SAMS\n"; echo "<TR><TD CLASS=lframehead>squid account management system\n"; echo "</TABLE>\n"; if (strlen($USERConf->s_nick) != 0 || strlen($SAMSConf->adminname) != 0) { echo "<span class=\"connecteduser\">connected as {$USERConf->s_nick} {$SAMSConf->adminname}</span>\n"; } echo "<P>\n"; $HOSTNAME = getenv('HOSTNAME'); echo "<style type=\"text/css\">\n\n.filetree span.hostname { padding: 1px 0 1px 25px; display: block; }\n\n.filetree span.hostname { background: url({$SAMSConf->ICONSET}/earth.gif) 0 0 no-repeat; }\n\n</style>\n"; echo "<li><span class=\"hostname\">{$HOSTNAME}</span></li>"; echo "<div id=\"ex1\">"; echo "<ul id=\"browser\" class=\"filetree treeview\">"; ExecuteFunctions("./", "lframe_", "1"); echo "</ul>"; echo "</div>"; echo "<script type=\"text/javascript\">\n"; echo "\$(document).ready(function(){\n"; echo "\$(\"#browser\").treeview({"; echo " animated: \"fast\","; echo " collapsed: true,"; echo " persist: \"cookie\","; echo " prerendered: true, \n"; echo " toggle: function() {"; echo " window.console && console.log(\"%o was toggled\", this);"; echo " }"; echo " });\n"; echo "});\n"; echo "</script>\n";
function GroupTray() { if (isset($_GET["id"])) { $id = $_GET["id"]; } global $SAMSConf; global $USERConf; if ($USERConf->ToWebInterfaceAccess("SC") == 1 || $USERConf->ToWebInterfaceAccess("G") == 1 && $USERConf->s_group_id == $id) { $DB = new SAMSDB(); $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; print " parent.basefrm.location.href = \"main.php?show=exe&filename=grouptray.php&function=usergroupform&id={$id}&gid=ALL\";\n"; print "</SCRIPT> \n"; $num_rows = $DB->samsdb_query_value("SELECT * FROM sgroup WHERE s_group_id='{$id}' "); $row = $DB->samsdb_fetch_array(); print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=25%>"; print "<B>{$grouptray_GroupTray_1} <BR><FONT SIZE=\"+1\" COLOR=\"blue\">{$row['s_name']} </FONT> </B>\n"; ExecuteFunctions("./src", "groupbuttom", $id); print "<TD>\n"; print "</TABLE>\n"; } else { print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php\";\n"; print "</SCRIPT> \n"; } }
function AuthADLDTray() { global $SAMSConf; global $USERConf; $lang = "./lang/lang.{$SAMSConf->LANG}"; require $lang; print "<SCRIPT>\n"; print " parent.basefrm.location.href=\"main.php?show=exe&function=authadldvalues&filename=authadldtray.php\";\n"; print "</SCRIPT> \n"; if ($USERConf->ToWebInterfaceAccess("UC") == 1) { print "<TABLE WIDTH=\"100%\" BORDER=0>\n"; print "<TR HEIGHT=60>\n"; print "<TD WIDTH=30%>"; print "<B>{$authtype_AuthTray}<BR><FONT SIZE=\"+1\" COLOR=\"BLUE\">ADLD</FONT></B>\n"; ExecuteFunctions("./src", "authadldbuttom", "1"); print "<TD> </TD>\n"; print "</TABLE>\n"; } /* print("<TABLE WIDTH=\"100%\" BORDER=0>\n"); print("<TR HEIGHT=60>\n"); print("<TD WIDTH=\"30%\"\">"); print("<B>Proxy<BR><FONT COLOR=\"BLUE\">$PROXYConf->s_description</FONT></B>\n"); ExecuteFunctions("./src", "proxybuttom","1"); print("<TD>\n"); print("</TABLE>\n"); */ }