本文整理汇总了PHP中main_status函数的典型用法代码示例。如果您正苦于以下问题:PHP main_status函数的具体用法?PHP main_status怎么用?PHP main_status使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了main_status函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main_page
function main_page()
{
$html = "\n<script language=\"JavaScript\"> \n\nvar timerID = null;\nvar timerID1 = null;\nvar tant=0;\nvar reste=0;\n\nfunction demarre(){\n tant = tant+1;\n reste=10-tant;\n\tif (tant < 10 ) { \n timerID = setTimeout(\"demarre()\",5000);\n } else {\n tant = 0;\n //document.getElementById('wait').innerHTML='<img src=img/wait.gif>';\n ChargeLogs();\n demarre(); //la boucle demarre !\n }\n}\n\n\nfunction ChargeLogs(){\n\tLoadAjax('services_status','{$page}?status=yes&hostname={$_GET["hostname"]}');\n\tif(document.getElementById('target_disks_list')){\n\t\tLoadAjax('target_disks_list','{$page}?main=refresh_disk_list&hostname={$_GET["hostname"]}');\n\t}\n\tif(document.getElementById('target_selected_list')){\n\t\tLoadAjax('target_selected_list','{$page}?main=selected_disk_list&hostname={$_GET["hostname"]}');\n\t}\n\t\n\tif(document.getElementById('dar_status')){\n\t\tLoadAjax('dar_status','{$page}?main=dar_status&hostname={$_GET["hostname"]}');\n\t}\n\tif(document.getElementById('networks_shares')){\n\t\tLoadAjax('networks_shares','{$page}?main=networks_shares');\n\t}\n\t\n}\n\nfunction SelectDisk(dd){\n\tYahooWin2(450,'{$page}?main=select-disk&disk='+dd);\n\t}\n\t\nfunction DiskDelete(uid){\n\t var XHR = new XHRConnection();\n\t\tXHR.appendData('disk_usb_del',uid);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_disk_add);\t\t\n}\n\t\nvar x_disk_add= function (obj) {\n\ttempvalue=obj.responseText;\n\tif(tempvalue.length>1){\n\talert(tempvalue);\n\t}\n\tYAHOO.example.container.dialog2.hide();\n\tLoadAjax('target_selected_list','{$page}?main=selected_disk_list&hostname={$_GET["hostname"]}');\n\tLoadAjax('persopath','{$page}?main=persopath&hostname={$_GET["hostname"]}');\n\t\n\t}\t\n\t\nfunction disk_add(uid){\n\tvar disk_add_caption=document.getElementById('disk_add_caption').value;\n\tif(confirm(disk_add_caption)){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('disk_usb_add',uid);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_disk_add);\t\n\t\n\t}\n}\n\nfunction BrowseDareContener(uid){YahooWin(450,'{$page}?main=BrowseDareContener&disk='+uid);}\n\nfunction dar_search(e){\n\tif(e){\n\t\tif(!checkEnter(e)){\n\t\t\treturn false;\n\t\t}\n\t}\n\tvar uuid=document.getElementById('uuid-disk').value;\n\tvar search=document.getElementById('dar_query').value;\n\tLoadAjax('dar_results','{$page}?main=dar_query&hostname={$_GET["hostname"]}&pattern='+search+'&disk='+uuid);\n\t}\n\t\nfunction dar_file_info(file){\n\tvar uuid=document.getElementById('uuid').value;\n\tYahooWin2(350,'{$page}?main=dar_file_info&file='+file+'&uuid='+uuid);\n\t}\n\t\nfunction AddPersonalizeFolder(){\n var folder=document.getElementById('TreeSelectedFolder').value;\n var XHR = new XHRConnection();\n XHR.appendData('AddPersonalizeFolder',folder);\n XHR.sendAndLoad('{$page}', 'GET',x_disk_add);\t\n \n}\n\nfunction DeletePersoPath(num){\n var XHR = new XHRConnection();\n XHR.appendData('DeletePersonalizeFolder',num);\n XHR.sendAndLoad('{$page}', 'GET',x_disk_add);\n\n}\n\nvar x_RestoreSingleFile= function (obj) {\n\ttempvalue=obj.responseText;\n\talert(tempvalue);\n\t}\n\nfunction RestoreSingleFile(database,file,uuid){\n YahooWin3(500,'{$page}?RestoreSingleFile='+file+'&database='+database+'&uuid='+uuid,'restore');\n}\n\t\nfunction RestoreDatabase(database,uuid){\n\t\tYahooWin3(500,'{$page}?RestoreDatabase='+database+'&uuid='+uuid,'restoring database');\n\t\t}\n\t\t\nfunction PerformRestore(){\t\t\n\tvar target_folder=document.getElementById('restore_path').value;\t\n\tvar uuid=document.getElementById('uuid').value;\t\n\tvar database=document.getElementById('database').value;\t\t\n\tYahooWin4(500,'{$page}?PerformRestoreDatabase=yes&database='+database+'&uuid='+uuid+'&target_folder='+target_folder,'restoring database');\n\t}\n\t\nfunction DeleteRemoteShare(num){\n\tLoadAjax('share_list','{$page}?main=share_list&delete='+num);\n\n}\n\nfunction ConnectShare(num){\n\tLoadAjax('networks_shares','{$page}?main=networks_shares&connect='+num);\n}\n\nfunction NetUmount(uuid){\n\tLoadAjax('networks_shares','{$page}?main=networks_shares&disconnect='+uuid);\n}\n\t\n</script>\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><img src='img/bg_backup.jpg' style='margin-right:80px'></td>\n\t<td valign='top'><div id='services_status'>" . main_status() . "</div><br>\n\t\t<p class=caption>{about}</p>\n\t\n\t\n\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 valign='top'><br>\n\t\t\t<div id='main_config'></div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>demarre();LoadAjax('main_config','{$page}?main=yes');</script>\n\t\n\t";
$cfg["JS"][] = 'js/iptables.js';
$tpl = new template_users('{APP_BACKUP}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
示例2: main_switch
function main_switch()
{
switch ($_GET["main"]) {
case "nmap-list":
echo main_network_list();
exit;
break;
case "nmap-add":
echo main_form_add();
exit;
break;
case "nmap-log":
echo main_events();
exit;
break;
case "status":
echo main_status();
exit;
break;
case "nmap-evdetails":
echo main_events_fill();
break;
default:
main_settings();
break;
}
}
示例3: main_page
function main_page()
{
$html = "\n<script language=\"JavaScript\"> \nvar timerID = null;\nvar timerID1 = null;\nvar tant=0;\nvar reste=0;\n\nfunction demarre(){\n tant = tant+1;\n reste=10-tant;\n\tif (tant < 10 ) { \n timerID = setTimeout(\"demarre()\",5000);\n } else {\n tant = 0;\n //document.getElementById('wait').innerHTML='<img src=img/wait.gif>';\n ChargeLogs();\n demarre(); //la boucle demarre !\n }\n}\n\n\nfunction ChargeLogs(){\n\tLoadAjax('services_status','{$page}?status=yes&hostname={$_GET["hostname"]}');\n\t}\n</script>\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><img src='img/bg_obm.png' style='margin-right:80px'></td>\n\t<td valign='top'><div id='services_status'>" . main_status() . "</div><br><p class=caption>{about}</p></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 valign='top'><br>\n\t\t\t<div id='main_config'></div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>demarre();LoadAjax('main_config','{$page}?main=yes');</script>\n\t\n\t";
$cfg["JS"][] = 'js/obm.js';
$tpl = new template_users('{APP_OBM}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
示例4: main_page
function main_page()
{
if ($_GET["hostname"] == null) {
$user = new usersMenus();
$_GET["hostname"] = $user->hostname;
}
$html = "<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><img src='img/bg_sqlgrey.jpg'>\t<p class=caption>{about}</p></td>\n\t<td>\n\t" . applysettings("sqlgrey") . "<br>" . main_status() . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 valign='top'><br>\n\t\t\t<div id='main_config'></div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>LoadAjax('main_config','{$page}?main=yes');</script>\n\t\n\t";
$cfg["JS"][] = 'js/sqlgrey.js';
$tpl = new template_users('{APP_SQLGREY}', $html, 0, 0, 0, 0, $cfg);
echo $tpl->web_page;
}
示例5: page
function page()
{
$page = CurrentPageName();
$usersmenus = new usersMenus();
switch ($_GET["main"]) {
case "master-config":
echo main_master_config();
exit;
break;
case "slaves":
echo main_slaves();
exit;
break;
case "download":
main_download();
exit;
break;
case "rules":
echo main_rules();
exit;
break;
case "deny_ext":
main_denyext();
exit;
break;
case "deny_ext_list":
echo main_denyext_list();
exit;
break;
case "members":
echo main_members();
exit;
break;
default:
break;
}
$html = "\n<table style='width:100%' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/bg_balance.png'>\n\n</td>\n<td valign='top' align='left'>\n" . main_status() . "\n</tr>\n</table><br>\n<div id='mainconfig'></div>\n\n<script>LoadAjax('mainconfig','{$page}?main=master-config&tab=0');</script>\n\n";
$CFG["JS"][] = "js/crossroads.js";
$tpl = new template_users('Postfix {APP_CROSSROADS}', $html, 0, 0, 0, 0, $CFG);
echo $tpl->web_page;
}
示例6: SaveDnsrbl
exit;
}
if (isset($_GET["dnsrbl_subindex"])) {
echo SaveDnsrbl();
exit;
}
if (isset($_GET["DeleteDnsbl"])) {
echo DeleteDnsbl();
exit;
}
if (isset($_GET["BackToDNSBLDefault"])) {
BackToDNSBLDefault();
exit;
}
if (isset($_GET["status"])) {
echo main_status();
exit;
}
if (isset($_GET["SrvMilterServ"])) {
SrvMilterServ();
exit;
}
if (isset($_GET["events"])) {
events();
exit;
}
if (isset($_GET["js"])) {
js();
exit;
}
if (isset($_GET["dumpfile-js"])) {
示例7: main_switch
function main_switch()
{
switch ($_GET["main"]) {
case "status":
main_status();
exit;
break;
case "settings":
main_config();
exit;
break;
case "logs":
main_logs();
exit;
break;
case "trusted_networks":
main_trusted_networks();
exit;
break;
case "trusted_networks_list":
echo main_trusted_networks_list();
exit;
break;
case "conf":
echo main_conf();
exit;
break;
case "plugins":
echo main_plugins();
exit;
default:
break;
}
}
示例8: gmdate
<?php
header("Pragma: no-cache");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
include_once('ressources/class.templates.inc');
include_once('ressources/class.ldap.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.artica.inc');
include_once('ressources/class.mysql.inc');
$usersmenus=new usersMenus();
if($usersmenus->AsArticaAdministrator==false){header('location:users.index.php');exit;}
if(isset($_GET["main"])){main_switch();exit;}
if(isset($_GET["status"])){main_status();exit;}
if(isset($_GET["CheckEveryMinutes"])){SaveConf();exit;}
if(isset($_GET["ArticaUpdateInstallPackage"])){ArticaUpdateInstallPackage();exit;}
if(isset($_GET["auto_update_perform"])){auto_update_perform();exit;}
if(isset($_GET["PackageUninstall"])){uninstall_package();exit;}
if(isset($_GET["PackageUninstallRoolback"])){uninstall_rollback_package();exit;}
if(isset($_GET["apply_uninstall"])){uninstall_to_system();exit;}
if(isset($_GET["PackageInstall"])){install_package();exit;}
if(isset($_GET["PackageInstallRoolback"])){install_rollback_package();exit;}
if(isset($_GET["DeleteEvent"])){main_event_delete();exit;}
if(isset($_GET["apply_upgrade"])){upgrade_to_system();exit;}
if(isset($_GET["popup"])){popup();exit;}
//main_page();
main_js();
function main_js(){
示例9: main_config_pureftpd
//.........这里部分代码省略.........
<tr>
<td $style class=legend nowrap valign='top'><strong>{AutoRename}:</strong></td>
<td $style valign='top'>" . Field_checkbox('AutoRename','yes',$pure->main_array["AutoRename"])."</td>
<td $style valign='top'>" . help_icon("{AutoRename_text}")."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{DontResolve}:</strong></td>
<td $style valign='top'>" . Field_checkbox('DontResolve','yes',$pure->main_array["DontResolve"])."</td>
<td $style valign='top'>" . help_icon("{DontResolve_text}")."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{DisplayDotFiles}:</strong></td>
<td $style valign='top'>" . Field_checkbox('DisplayDotFiles','yes',$pure->main_array["DisplayDotFiles"])."</td>
<td $style valign='top'>" . help_icon("{DisplayDotFiles_text}")."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{ProhibitDotFilesWrite}:</strong></td>
<td $style valign='top'>" . Field_checkbox('ProhibitDotFilesWrite','yes',$pure->main_array["ProhibitDotFilesWrite"])."</td>
<td $style valign='top'>" . help_icon("{ProhibitDotFilesWrite_text}")."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{ProhibitDotFilesRead}:</strong></td>
<td $style valign='top'>" . Field_checkbox('ProhibitDotFilesRead','yes',$pure->main_array["ProhibitDotFilesRead"])."</td>
<td $style valign='top'>" . help_icon("{ProhibitDotFilesRead_text}")."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{MaxIdleTime}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('MaxIdleTime',$pure->main_array["MaxIdleTime"],'width:70px;font-size:13px;padding:3px',null,null,'{MaxIdleTime_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{MaxClientsNumber}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('MaxClientsNumber',$pure->main_array["MaxClientsNumber"],'width:70px;font-size:13px;padding:3px',null,null,'{MaxClientsNumber_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{MaxClientsPerIP}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('MaxClientsPerIP',$pure->main_array["MaxClientsPerIP"],'width:70px;font-size:13px;padding:3px',null,null,'{MaxClientsPerIP_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{LimitRecursion}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('LimitRecursion',$pure->main_array["LimitRecursion"],'width:70px;font-size:13px;padding:3px',null,null,'{LimitRecursion_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{Max_Load}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('MaxLoad',$pure->main_array["MaxLoad"],'width:70px;font-size:13px;padding:3px',null,null,'{MaxLoad_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{AnonymousBandwidth}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('AnonymousBandwidth',$pure->main_array["AnonymousBandwidth"],'width:70px;font-size:13px;padding:3px',null,null,'{AnonymousBandwidth_text}')."</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{MaxDiskUsage}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('MaxDiskUsage',$pure->main_array["MaxDiskUsage"],'width:70px;font-size:13px;padding:3px',null,null,'{MaxDiskUsage_text}')."%</td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{PassivePortRange1}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('PassivePortRange1',$PassivePortRange1,'width:70px;font-size:13px;padding:3px',null,null,'{PassivePortRange_text}')." <strong>Port</strong></td>
</tr>
<tr>
<td $style class=legend nowrap valign='top'><strong>{PassivePortRange2}:</strong></td>
<td $style valign='top' colspan=2>" . Field_text('PassivePortRange2',$PassivePortRange2,'width:70px;font-size:13px;padding:3px',null,null,'{PassivePortRange_text}')." <strong>Port</strong></td>
</tr>
<tr>
<td $style class=legend valign='top' colspan=3 aling='right'>
<hr>
". button("{apply}","javascript:Loadjs('$page?pure-js=yes')")."
</td>
</tr>
</table>
</FORM>
</div>
</td>
</tr>
</table>
".main_status();
$tpl=new templates();
if($returned==1){return $tpl->_ENGINE_parse_body($html);}
echo $tpl->_ENGINE_parse_body($html);
}
示例10: index
function index()
{
$status = main_status();
$page = CurrentPageName();
$html = "\n\t<H1>{APP_NTPD}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<p style='font-size:13px'>{about}</p>\n\t</td>\n\t<td valign='top'>\n\t\t{$status}\n\t</td>\n\t</tr>\n\t</table>\n\t<div id='enable-ntpd'></div>\n\t\n\t<script>\n\t\tLoadAjax('enable-ntpd','{$page}?enable-ntpd-switch=yes');\n\t\t\n\t\n\t\tvar X_SaveEnableNTPDSwitch= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('enable-ntpd','{$page}?enable-ntpd-switch=yes');\n\t\t\t}\t\t\n\t\t\n\t\tfunction SaveEnableNTPDSwitch(){\n\t\t\tvar XHR = new XHRConnection();\n \t\tXHR.appendData('NTPDEnabled',document.getElementById('NTPDEnabled').value);\n \t\tdocument.getElementById('enable-ntpd').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n \t\tXHR.sendAndLoad('{$page}', 'GET',X_SaveEnableNTPDSwitch); \n\t\t\n\t\t}\n\t\t\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例11: main_switch
function main_switch()
{
switch ($_GET["main"]) {
case "index":
echo ajax_index();
exit;
break;
case "conf":
echo main_conf();
exit;
break;
case "rlogs":
echo main_rlogs();
exit;
break;
case "nmap-add":
echo main_form_add();
exit;
break;
case "status":
echo main_status();
exit;
break;
case "mysql":
echo main_mysql();
exit;
break;
case "rlogss":
echo main_rlogs_parse();
exit;
break;
case "multiple-roundcube":
echo multiple_roundcube();
exit;
break;
default:
main_settings();
break;
}
}
示例12: popup_status
function popup_status()
{
$page = CurrentPageName();
$time = time();
$sock = new sockets();
$EnableVirtualDomainsInMailBoxes = intval($sock->GET_INFO("EnableVirtualDomainsInMailBoxes"));
$t = time();
$EnableVirtualDomainsInMailBoxes_field = Paragraphe_switch_img('{multidomains}', '{multidomains_text}<br>{multidomains_explain}', "EnableVirtualDomainsInMailBoxes-{$t}", $EnableVirtualDomainsInMailBoxes, '{enable_disable}', 750);
$html = "\n\t<table style='width:100%'>\n\t<tbody>\n\t<tr>\n\t<td width=1% valign='top' align='middle' width=40%>\n\t\n\t\n\t\n\t<center><img src='img/bg-cyrus.jpg'></center></td>\n\t<td valign='top'>\n\t\t<div id='services_status_mbx_cyrus'>" . main_status() . "</div>\n\t\t<div style='font-size:18px;' class=explain>{about_cyrus}</div>\n\t\t<div style='text-align:right;width:100%;font-size:16px'><hr>\n\t\t\t\t" . button('{sync_services}', "Loadjs('cyrus.sync-services.progress.php')", 26) . "\n\t\t\t\t" . button('{create_a_mailbox}', "Loadjs('create-user.php')", 26) . "</div>\n\t\t\n\t\t\n\t\t\n\t</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t\n\t<div class=form style='width:98%;margin-top:15px;margin-bottom:20px'>\n\t{$EnableVirtualDomainsInMailBoxes_field}\n\t<div style='text-align:right;width:100%'><hr>" . button('{apply}', "ApplyMultidomains{$t}()", 26) . "</div>\n\t</div>\n\t\n\t\n\t<center style='width:100%'><div id='{$time}' class=form style='width:80%'></div></center>\n\t<script>\nvar X_ApplyMultidomains{$t}= function (obj) {\n\tvar results=trim(obj.responseText);\n\tif(results.length>0){alert(results);}\n\tLoadjs('cyrus.sync-services.progress.php');\n}\n\t\t\nfunction ApplyMultidomains{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('EnableVirtualDomainsInMailBoxes',document.getElementById('EnableVirtualDomainsInMailBoxes-{$t}').value);\n\tXHR.sendAndLoad('{$page}', 'POST',X_ApplyMultidomains{$t});\t\t\t\t\n}\n\t\n\t\nLoadAjax('{$time}','postfix.index.php?mailbox-section=yes');\n\t</script>\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例13: index
function index(){
$status=main_status();
$page=CurrentPageName();
$html="
<table style='width:100%'>
<tr>
<td valign='top'>
<p style='font-size:13px'>{ntp_about}</p>
</td>
<td valign='top'>
$status
</td>
</tr>
</table>
<div id='enable-ntpd'></div>
<script>
LoadAjax('enable-ntpd','$page?enable-ntpd-switch=yes');
var X_SaveEnableNTPDSwitch= function (obj) {
var results=obj.responseText;
if(results.length>0){alert(results);}
LoadAjax('enable-ntpd','$page?enable-ntpd-switch=yes');
}
function SaveEnableNTPDSwitch(){
var XHR = new XHRConnection();
XHR.appendData('NTPDEnabled',document.getElementById('NTPDEnabled').value);
document.getElementById('enable-ntpd').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';
XHR.sendAndLoad('$page', 'GET',X_SaveEnableNTPDSwitch);
}
</script>
";
$tpl=new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例14: main_page
function main_page(){
$page=CurrentPageName();
$html=
"
<script language=\"JavaScript\">
var timerID = null;
var timerID1 = null;
var tant=0;
var reste=0;
function demarre(){
tant = tant+1;
reste=10-tant;
if (tant < 10 ) {
timerID = setTimeout(\"demarre()\",5000);
} else {
tant = 0;
//document.getElementById('wait').innerHTML='<img src=img/wait.gif>';
ChargeLogs();
demarre(); //la boucle demarre !
}
}
function ChargeLogs(){
LoadAjax('services_status','$page?status=yes&hostname={$_GET["hostname"]}');
if(document.getElementById('kaveventsShow')){
LoadAjax('main_smb_config','$page?main=kav4samba&kavTab=events&hostname={$_GET["hostname"]}')
}
}
</script>
<table style='width:100%'>
<tr>
<td width=1% valign='top'><img src='img/bg_samba.png'> <p class=caption>{about}</p></td>
<td valign='top'><div id='services_status'>". main_status() . "</div></td>
</tr>
<tr>
<td colspan=2 valign='top'><br>
<div id='main_smb_config'></div>
</td>
</tr>
</table>
<script>demarre();LoadAjax('main_smb_config','$page?main=yes');</script>
";
$cfg["JS"][]='js/samba.js';
$cfg["JS"][]="js/json.js";
$tpl=new template_users('{APP_SAMBA}',$html,0,0,0,0,$cfg);
echo $tpl->web_page;
}
示例15: index
function index()
{
$status = main_status();
$page = CurrentPageName();
$users = new usersMenus();
if (!$users->NTPD_INSTALLED) {
$error = FATAL_ERROR_SHOW_128("{ntpd_server_not_installed_only_client_mode}");
}
$html = "\n\t<div class=text-info style='font-size:16px'>{ntp_about}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='width:220px'>\n\t\t\n\t\t<div id='ntpd-status'></div>\n\t\t<div id='ntpd-server'></div>\n\t\t\n\t</td>\n\t<td valign='top' style='width:95%'>\n\t\t{$error}\n\t\t<div id='enable-ntpd' style='width:98%' class=form></div>\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t<script>\n\t\t\n\t\t\n\t\n\t\tvar X_SaveEnableNTPDSwitch= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('enable-ntpd','{$page}?enable-ntpd-switch=yes');\n\t\t\tNTPD_STATUS();\n\t\t\t}\t\t\n\t\t\n\t\tfunction SaveEnableNTPDSwitch(){\n\t\t\tvar XHR = new XHRConnection();\n \t\tXHR.appendData('NTPDEnabled',document.getElementById('NTPDEnabled').value);\n \t\tdocument.getElementById('enable-ntpd').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n \t\tXHR.sendAndLoad('{$page}', 'GET',X_SaveEnableNTPDSwitch); \n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction NTPD_STATUS(){\n\t\t\tLoadAjax('ntpd-status','{$page}?status=yes');\n\t\t\tLoadAjax('ntpd-server','{$page}?ntpd-server=yes');\n\t\t\n\t\t}\n\t\tLoadAjax('enable-ntpd','{$page}?enable-ntpd-switch=yes');\n\t\tNTPD_STATUS();\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}