本文整理汇总了PHP中button_browse函数的典型用法代码示例。如果您正苦于以下问题:PHP button_browse函数的具体用法?PHP button_browse怎么用?PHP button_browse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了button_browse函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popup
function popup()
{
$dev = $_GET["dev"];
$html = "<H1>{$dev}</h1>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top' width=1%><center><img src='img/database-connect-128.png'></center></td>\n\t\t<td valign='top' width=99%>\n\t\t\t<div id='fstab'><p class=caption>{CONNECT_HD_TEXT}</p>\n\t\t\t\t<table style='width:100%' class=table_form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='middle' class=legend nowrap>{mount_point}:</td>\n\t\t\t\t\t<td nowrap>" . Field_text('mount_point', null, 'width:220px') . "" . button_browse('mount_point') . "</td>\n\t\t\t\t\t<td>" . button("{add}", "fstabAdd()") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t" . RoundedLightWhite("<div id='fslist' style='width:99%;height:220px;overflow:auto'>" . listfstab($dev) . "</div>") . "\n\t\t\t</div>\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'system.internal.disks.php');
}
示例2: popup
function popup()
{
$dev = $_GET["dev"];
$sock = new sockets();
$uuid = base64_decode($sock->getFrameWork("hd.php?uuid-from-dev=" . urlencode($dev)));
$html = "<div style='font-size:22px;margin-bottom:30px'>{$dev} ( {$uuid} )</div>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top' width=1%><center><img src='img/database-connect-128.png'></center></td>\n\t\t<td valign='top' width=99%>\n\t\t\t<div id='fstab'><div class=text-info style='font-size:16px'>{CONNECT_HD_TEXT}</div>\n\t\t\t\t<div style='width:98%' class=form>\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='middle' class=legend nowrap style='font-size:16px'>{mount_point}:</td>\n\t\t\t\t\t<td nowrap>" . Field_text('mount_point', null, 'width:220px;font-size:16px') . "" . button_browse('mount_point') . "</td>\n\t\t\t\t\t<td>" . button("{add}", "fstabAdd()", 18) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<div id='fslist' style='width:99%;height:220px;overflow:auto'>" . listfstab($dev) . "</div>\n\t\t\t</div>\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html, 'system.internal.disks.php');
}
示例3: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$t = time();
$varlog = base64_decode($sock->getFrameWork("squid.php?varlog-location=yes"));
$t = time();
$html = "\n\t<div style='font-size:32px;margin-bottom:25px'>{log_location}</div>\n\t<div class=explain style='font-size:22px;margin-bottom:25px'>{squid_log_location_explain}</div>\n\t<div style='width:98%' class=form>\t\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:28px;vertical-align:middle'>{edit_location}:</td>\n\t\t<td>" . Field_text("location-{$t}", $varlog, "font-size:28px;width:99%") . "</td>\n\t\t<td style='font-size:28px;vertical-align:middle'>" . button_browse("location-{$t}") . "</td>\n\t</tr>\n\t<tr><td colspan=3 align='right'><p> </p><hr>" . button("{apply}", "Save{$t}()", 38) . "</td></tr>\n\t</table>\t\t\n\t</div>\n<script>\n\n\tvar xSave{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\tLoadjs('squid.varlog.progress.php');\n\t}\n\nfunction Save{$t}(){\n\tvar pp=encodeURIComponent(document.getElementById('location-{$t}').value);\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('location',pp);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t}); \n}\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$sock = new sockets();
$sock->getFrameWork("postgres.php?PostGresSQLDatabaseDirectory=yes");
$PostGresSQLDatabaseDirectory = $sock->GET_INFO("PostGresSQLDatabaseDirectory");
$html = "<div style=width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='middle' style='font-size:18px'>{database_storage_path}:</td>\n\t\t<td valign='middle'>" . Field_text("database-dir-{$t}", "{$PostGresSQLDatabaseDirectory}", "font-size:18px;width:98%") . "</td>\n\t\t<td valign='middle'>" . button_browse("database-dir-{$t}", 18) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 32) . "</td>\n\t</tR>\n</table>\n</div>\n<script>\nvar xSave{$t}= function (obj) {\t\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tYahooWin3Hide();\n\tLoadjs('postgres.changedir.progress.php');\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ChangePostGresSQLDir', encodeURIComponent(document.getElementById('database-dir-{$t}').value));\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t}); \n\n}\n</script>\t\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$confirm = $tpl->javascript_parse_text("{change_path_services_warn}");
$sock = new sockets();
$ARRAY = unserialize(base64_decode($sock->getFrameWork("system.php?critical-paths-locations=yes")));
$html = "\n<div id='id-final-{$t}'>\n<div id='text-{$t}' style='font-size:18px' class=explain>{change_directories_paths_text}</div>\n<div style='width:98%' class=form>\n\t<table>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>Artica {logs_directory} (" . FormatBytes($ARRAY["/var/log/artica-postfix"]["SIZE"]) . "):</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("varlogart-{$t}", $ARRAY["/var/log/artica-postfix"]["PATH"], "font-size:18px;width:95%") . "</td>\n\t\t<td width=1%>" . button_browse("varlogart-{$t}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>Proxy {logs_directory} (" . FormatBytes($ARRAY["/var/log/squid"]["SIZE"]) . "):</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("varlog-{$t}", $ARRAY["/var/log/squid"]["PATH"], "font-size:18px;width:95%") . "</td>\n\t\t<td width=1%>" . button_browse("varlog-{$t}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{logs_backup} (" . FormatBytes($ARRAY["/home/logs-backup"]["SIZE"]) . "):</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("logsbackup-{$t}", $ARRAY["/home/logs-backup"]["PATH"], "font-size:18px;width:95%") . "</td>\n\t\t<td width=1%>" . button_browse("logsbackup-{$t}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{categories_databases}: (" . FormatBytes($ARRAY["/home/artica/categories_databases"]["SIZE"]) . ")</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("categoriesdb-{$t}", $ARRAY["/home/artica/categories_databases"]["PATH"], "font-size:18px;width:95%") . "</td>\n\t\t<td width=1%>" . button_browse("categoriesdb-{$t}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{webfiltering_databases} ICAP: (" . FormatBytes($ARRAY["/home/c-icap/blacklists"]["SIZE"]) . ")</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_text("icapdb-{$t}", $ARRAY["/home/c-icap/blacklists"]["PATH"], "font-size:18px;width:95%") . "</td>\n\t\t<td width=1%>" . button_browse("icapdb-{$t}") . "</td>\n\t</tr>\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}...", "Save{$t}()", "26") . "</td>\n\t</tr>\n</table>\n</div>\n<script>\nvar x_Save{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\tLoadjs('squid.directories.progress.php');\n}\nfunction Save{$t}(){\n\tif(!confirm('{$confirm}')){return;}\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('varlog',document.getElementById('varlog-{$t}').value);\n\tXHR.appendData('logsbackup',document.getElementById('logsbackup-{$t}').value);\n\tXHR.appendData('categoriesdb',document.getElementById('categoriesdb-{$t}').value);\n\tXHR.appendData('icapdb',document.getElementById('icapdb-{$t}').value);\n\tXHR.appendData('varlogart',document.getElementById('varlogart-{$t}').value);\n\t\n\t\n\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\n}\n\n\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例6: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$size = $sock->GET_INFO("SystemTotalSize");
$DirectoryFSPath = $sock->GET_INFO("DirectoryFSPath");
$move_fs_to = $tpl->javascript_parse_text("{move_fs_to}");
$size = FormatBytes($size / 1024);
$html = "\n\t<div style='width:98%' class=form>\n\t\t<div style='font-size:22px'>{move_filesystem}: {$size}</div>\n\t\t<div class=explain style='font-size:14px'>{move_filesystem_explain}</div>\t\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{directory}:</td>\n\t\t\t<td>" . Field_text("DirectoryFSPath", $DirectoryFSPath, "width:220px;font-size:16px") . "</td>\n\t\t\t<td>" . button_browse("DirectoryFSPath") . "</td>\n\t\t</tr>\n\t\t<tr>\t\t\n\t\t\t<td colspan=3 align='right'><hr>" . button("{move}", "DirectoryFSPathSave()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\t\t\n<script>\nvar xDirectoryFSPathSave= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\tYahooWin3Hide();\n\t\n}\nfunction DirectoryFSPathSave(){\n\tvar path=document.getElementById('DirectoryFSPath').value;\n\tif(confirm('{$move_fs_to}:'+path+' ?')){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('DirectoryFSPath',path);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xDirectoryFSPathSave);\n\t}\n}\t\t\t\t\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例7: popup
function popup()
{
$sock = new sockets();
$tpl = new templates();
$page = CurrentPageName();
$ArticaDBPath = $sock->GET_INFO("ArticaDBPath");
if ($ArticaDBPath == null) {
$ArticaDBPath = "/opt/articatech";
}
$t = time();
$html = "\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{directory}:</td>\n\t\t<td>" . Field_text("ArticaDBPath", $ArticaDBPath, "font-size:16px;width:220px") . "</td>\n\t\t<td width=1%>" . button_browse("ArticaDBPath") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>" . button("{apply}", "Save{$t}()", 18) . "</td>\n\t</tr>\n\t</table>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n}\t\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ArticaDBPath',document.getElementById('ArticaDBPath').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n}\n</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例8: page
function page()
{
$tpl = new templates();
$page = CurrentPageName();
$q = new mysql();
$gid = $_GET["gid"];
$t = time();
$q = new mysql();
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM storage_containers WHERE `groupid`='" . mysql_escape_string2($gid) . "'", "artica_backup"));
if (!is_numeric($ligne["maxsize"])) {
$ligne["maxsize"] = "5000";
}
$html = "\n\t<div style='font-size:16px' class=explain>{BACKUP_STORAGE_ENDUSERS_CONTAINER_EXPLAIN}</div>\n\t<div id='animate-{$t}'></div>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{enable}:</td>\n\t\t<td>" . Field_checkbox("enable-{$t}", 1, $ligne["enabled"]) . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{max_size}:</td>\t\n\t\t<td style='font-size:16px'>" . Field_text("maxsize-{$t}", $ligne["maxsize"], "font-size:16px;width:120px") . " M</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{directory}:</td>\t\n\t\t<td style='font-size:16px'>" . Field_text("directory-{$t}", $ligne["directory"], "font-size:16px;width:220px") . button_browse("directory-{$t}") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "</td>\n\t</tr>\n\t</table>\t\n\t<script>\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('animate-{$t}').innerHTML='';\n\t\tif(results.length>0){alert(results);return;}\n\t\t\n\t\tYahooWinHide();\n\t}\n\t\n\tfunction Save{$t}(){\n\t\tvar enabled=0;\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('gid','{$_GET["gid"]}');\n\t\n\t\tif(document.getElementById('enable-{$t}').checked){enabled=1;}\n\t\tXHR.appendData('enabled',enabled);\n\t\tXHR.appendData('maxsize',document.getElementById('maxsize-{$t}').value);\n\t\tXHR.appendData('directory',document.getElementById('directory-{$t}').value);\n\t\tAnimateDiv('animate-{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t}\t\n\t\t\t\t\n\t\t\t\t\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例9: index
function index()
{
$ct = new user($_GET["uid"]);
$sock = new sockets();
$RsyncStoragePath = $sock->GET_INFO("RsyncStoragePath");
if ($RsyncStoragePath == null) {
$RsyncStoragePath = "/var/spool/rsync";
}
if ($ct->RsyncBackupTargetPath == null) {
$ct->RsyncBackupTargetPath = $RsyncStoragePath;
}
$RsyncBackupTargetPath = Field_text("RsyncBackupTargetPath", $ct->RsyncBackupTargetPath, "width:220px") . button_browse("RsyncBackupTargetPath");
$EnableBackupAccount = Field_numeric_checkbox_img("EnableBackupAccount", $ct->EnableBackupAccount);
$html = "<H1>{backup_parameters}</H1>\n<div id='{$ct->uid}_divid'>\n" . RoundedLightWhite("\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n\t<center><img src='img/bg_backup-org.png'></center><br>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t<td class=legend nowrap valign='top'>{ENABLE_RSYNC_ACCOUNT}:</td>\n\t<td>{$EnableBackupAccount}<p class=caption>{ENABLE_RSYNC_ACCOUNT_TEXT}</p></td>\n\t</tr>\n\t<tr>\n\t<td class=legend>{storage_path}:</td>\n\t<td>{$RsyncBackupTargetPath}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top' align='right' colspan=2><hr>\n\t\t\t<input type='button' OnClick=\"javascript:SaveBackupUserInfos();\" value=' {edit} » '>\n\t\t</td>\n\t</tr>\n</table>\n");
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例10: popup
function popup()
{
$sock = new sockets();
$tpl = new templates();
$users = new usersMenus();
$page = CurrentPageName();
$DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
if (!is_numeric($DisableAnyCache)) {
$DisableAnyCache = 0;
}
$SquidCacheLevel = $sock->GET_INFO("SquidCacheLevel");
if (!is_numeric($SquidCacheLevel)) {
$SquidCacheLevel = 4;
}
if ($SquidCacheLevel == 0) {
$DisableAnyCache = 1;
}
if ($DisableAnyCache == 1) {
$html = FATAL_ERROR_SHOW_128("{all_cache_method_are_globally_disabled}");
$html = $html . "\n\t\t<div style='width:100%'>\n\t\t\t\t<div style='margin-top:10px;width:99%' class=form>\n\t\t\t\t\t<a href=\"javascript:blur();\" OnClick=\"Loadjs('squid.caches.disable.php')\"\n\t\t\t\t\tstyle='font-size:16px;text-decoration:underline;font-weight:bold'\n\t\t\t\t\t>{access_to_parameters}</a>\n\t\t\t\t</div>\n\t\t</div>";
echo $tpl->_ENGINE_parse_body($html);
return;
}
$SquidEnableRockStore = $sock->GET_INFO("SquidEnableRockStore");
$SquidRockStoreSize = $sock->GET_INFO("SquidRockStoreSize");
$SquidRockStorePath = $sock->GET_INFO("SquidRockStorePath");
if (!is_numeric($SquidEnableRockStore)) {
$SquidEnableRockStore = 0;
}
if (!is_numeric($SquidRockStoreSize)) {
$SquidRockStoreSize = 2000;
}
if ($SquidRockStorePath == null) {
$SquidRockStorePath = "/home/squid";
}
$t = time();
$html = "\n\t<div style='font-size:14px' class=explain>{SQUID_ROCK_STORE_EXPLAIN}</div>\n\t<div style='width:98%' class=form>\n\t<div id='waitcache-{$t}'></div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{enable}:</td>\n\t\t<td>" . Field_checkbox("SquidEnableRockStore", 1, $SquidEnableRockStore) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{size}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("SquidRockStoreSize", $SquidRockStoreSize, "font-size:16px;width:90px") . " MB</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{directory}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("SquidRockStorePath", $SquidRockStorePath, "font-size:16px;width:220px") . button_browse("SquidRockStorePath") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 18) . "</td>\n\t</tr>\n\t</table>\n\t</div>\n<script>\n\tvar x_Save{$t}= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tdocument.getElementById('waitcache-{$t}').innerHTML='';\n\t\t\tif(results.length>3){alert(results);return;}\n\t\t\tRefreshTab('squid_main_caches_new');\n\t\t\tRefreshTab('squid_main_svc');\n\t\t\tLoadjs('squid.restart.php?ApplyConfToo=yes&ask=yes');\n\t\t\t\n\t\t}\t\t\t\n\t\t\n\tfunction Save{$t}(){\n\t\t\tvar enabled=1;\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(!document.getElementById('SquidEnableRockStore').checked){enabled=0;}\n\t\t\tXHR.appendData('SquidRockStoreSize',document.getElementById('SquidRockStoreSize').value);\n\t\t\tXHR.appendData('SquidRockStorePath',document.getElementById('SquidRockStorePath').value);\n\t\t\tXHR.appendData('SquidEnableRockStore',enabled);\n\t\t\tAnimateDiv('waitcache-{$t}');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\n\t\t}\n</script>\t\t\t\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例11: popup
function popup(){
$page=CurrentPageName();
$tpl=new templates();
$sock=new sockets();
$t=time();
$varlog=base64_decode($sock->getFrameWork("squid.php?varlog-location=yes"));
$t=time();
$html="
<div style='width:98%' class=form>
<table style='width:100%'>
<tr>
<td valign='top' class=legend style='font-size:18px;vertical-align:middle'>{directory}:</td>
<td>". Field_text("location-$t",$varlog,"font-size:18px;width:99%")."</td>
<td style='font-size:18px;vertical-align:middle'>". button_browse("location-$t")."</td>
</tr>
<tr><td colspan=3 align='right'><p> </p><hr>". button("{apply}","Save$t()",22)."</td></tr>
</table>
</div>
<script>
var xSave$t= function (obj) {
var res=obj.responseText;
if (res.length>3){alert(res);}
Loadjs('squid.varlog.progress.php');
}
function Save$t(){
var pp=encodeURIComponent(document.getElementById('location-$t').value);
var XHR = new XHRConnection();
XHR.appendData('location',pp);
XHR.sendAndLoad('$page', 'POST',xSave$t);
}
</script>
";
echo $tpl->_ENGINE_parse_body($html);
}
示例12: parameters
function parameters()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$maillogToMysql = $sock->GET_INFO("maillogToMysql");
if (!is_numeric($maillogToMysql)) {
$maillogToMysql = 1;
}
$maillogStoragePath = $sock->GET_INFO("maillogStoragePath");
if ($maillogStoragePath == null) {
$maillogStoragePath = "/home/postfix/maillog";
}
$maillogMaxDays = $sock->GET_INFO("maillogMaxDays");
if (!is_numeric($maillogMaxDays)) {
$maillogMaxDays = 7;
}
$t = time();
$html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{store_events_to_mysql}:</td>\n\t\t<td>" . Field_checkbox("maillogToMysql", 1, $maillogToMysql, "Check{$t}()") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{storage_directory}:</td>\n\t\t<td>" . Field_text("maillogStoragePath", $maillogStoragePath, "font-size:16px;width:300px") . "</td>\n\t\t<td width=1% nowrap>" . button_browse("maillogStoragePath") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{max_days}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("maillogMaxDays", $maillogMaxDays, "font-size:16px;width:90px") . " {days}</td>\n\t\t<td> </td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'>\n\t\t\t\t<hr>" . button("{apply}", "Save{$t}()", 18) . "\n\t\t</td>\n\t</tr>\n\t</table>\n\t</div>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=trim(obj.responseText);\n\tif(results.length>0){alert(results);}\n\tRefreshTab('main_postfix_events');\n\t}\n\t\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('maillogToMysql').checked){\n\t\tXHR.appendData('maillogToMysql',1);\n\t}else{\n\t\tXHR.appendData('maillogToMysql',0);\n\t}\n\tXHR.appendData('maillogStoragePath',document.getElementById('maillogStoragePath').value);\n\tXHR.appendData('maillogMaxDays',document.getElementById('maillogMaxDays').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t},true);\t\t\t\t\n}\t\n\t\nfunction Check{$t}(){\n\tif(document.getElementById('maillogToMysql').checked){\n\t\tdocument.getElementById('maillogStoragePath').disabled=true;\n\t\tdocument.getElementById('maillogMaxDays').disabled=true;\n\t}else{\n\t\tdocument.getElementById('maillogStoragePath').disabled=false;\n\t\tdocument.getElementById('maillogMaxDays').disabled=false;\t\n\t}\n\n}\nCheck{$t}();\t\n</script>\t\t\t\t\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: index
function index()
{
$users = new usersMenus();
$sock = new sockets();
$RsyncDaemonEnable = $sock->GET_INFO("RsyncDaemonEnable");
$RsyncBwlimit = $sock->GET_INFO("RsyncBwlimit");
$RsyncPort = $sock->GET_INFO("RsyncPort");
$RsyncMaxConnections = $sock->GET_INFO("RsyncMaxConnections");
$RsyncStoragePath = $sock->GET_INFO("RsyncStoragePath");
$RsyncEnableStunnel = $sock->GET_INFO("RsyncEnableStunnel");
if ($RsyncBwlimit == null) {
$RsyncBwlimit = "1000";
}
if ($RsyncPort == null) {
$RsyncPort = "873";
}
if ($RsyncMaxConnections == null) {
$RsyncMaxConnections = "4";
}
if ($RsyncPort == null) {
$RsyncPort = "873";
}
if ($RsyncStoragePath == null) {
$RsyncStoragePath = "/var/spool/rsync";
}
if ($RsyncEnableStunnel == null) {
$RsyncEnableStunnel = "0";
}
if ($RsyncEnableStunnelPort == null) {
$RsyncEnableStunnelPort = 8000;
}
$enable = Paragraphe_switch_img_32('{ENABLE_RSYNC_SERVER}', '{ENABLE_RSYNC_SERVER_TEXT}', 'RsyncDaemonEnable', $RsyncDaemonEnable, '{enable_disable}', 220);
if ($users->stunnel4_installed) {
$stunnel = "\t<tr>\n\t\t<td class=legend nowrap>{RsyncEnableStunnel}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('RsyncEnableStunnel', $RsyncEnableStunnel, "{enable_disable}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{RsyncEnableStunnelPort}:</td>\n\t\t<td>" . Field_text("RsyncEnableStunnelPort", $RsyncEnableStunnelPort, "width:60px") . "</td>\n\t</tr>";
} else {
$stunnel = null;
}
$view_events = Paragraphe("routing-domain-relay-events.png", "{APP_RSYNC_SERVER_LOG}", "{APP_RSYNC_SERVER_LOG_TEXT}", "javascript:Loadjs('rsync.server.php?js-logs=yes')");
$form = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend nowrap>{RsyncBwlimit}:</td>\n\t\t<td>" . Field_text("RsyncBwlimit", $RsyncBwlimit, "width:60px") . " KBytes</td>\n\t</tr>\n{$stunnel}\t\n\t<tr>\n\t\t<td class=legend nowrap>{listen_port}:</td>\n\t\t<td>" . Field_text("RsyncPort", $RsyncPort, "width:60px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap>{max_connections}:</td>\n\t\t<td>" . Field_text("RsyncMaxConnections", $RsyncMaxConnections, "width:20px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap>{storage_path}:</td>\n\t\t<td>" . Field_text("RsyncStoragePath", $RsyncStoragePath, "width:120px") . " " . button_browse("RsyncStoragePath") . "</td>\n\t</tr>\t\t\t\n\t</table>\n";
$html = "<H1>{APP_RSYNC}</H1>\n\t<div id='rsyncsrver'>\n\t<form name='rsyncsrverForm'>\n\t<p class=caption>{APP_RSYNC_SERVER_TEXT}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$enable}</td>\n\t<td valign='top'>{$form}</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2><hr></td></tr>\n\t<tr>\n\t<td valign='top'><div id='rsyncstatus' style='margin:4px'></div></td>\n\t<td valign='top'>{$view_events}</td>\n\t</tr>\t\n\t<tr><td colspan=2 align='right'>\n\t\t<hr>\n\t\t<input type='button' OnClick=\"javascript:SaveRsyncConf();\" value='{apply} »'>\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t</form>\n\t</div>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例14: status
function status()
{
$tpl = new templates();
$page = CurrentPageName();
$users = new usersMenus();
$sock = new sockets();
$t = time();
$WORKDIR = base64_decode($sock->getFrameWork("squid.php?artica-db-path=yes"));
$html = "\n\t<div id='title-{$t}' style='font-size:16px;font-weight:bold'></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t<td valign='top'><div id='squid-db-status'></div></td>\n\t<td valign='top'><div id='squid-db-mysql'>\n\t\t<div class=explain style='font-size:14px'>{squiddb_howitis}</div>\n\t</td>\n\t</tr>\n\t</table>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{database_path}:</td>\n\t\t<td>" . Field_text("SquidStatsDatabasePath", $WORKDIR, "font-size:18px") . "</td>\n\t\t<td>" . button_browse("SquidStatsDatabasePath") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right' style='padding-top:20px'><hr>\n\t\t\t\t" . button("{backup_database}", "Loadjs('squid.articadb.progress.php?backup=yes')", 26) . " " . button("{change_database_path}", "SaveWorkdir{$t}()", 26) . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t\n\t\n\t\n\t\n\t\n\t<script>\n\t\tfunction RefreshTableTitle{$t}(){\n\t\t\tLoadAjaxTiny('title-{$t}','squid.artica.statistics.purge.php?title=yes&t={$t}');\n\t\t\tLoadAjaxTiny('squid-db-status','{$page}?squid-db-status=yes&t={$t}');\n\t\t}\n\tvar xSaveWorkdir{$t}= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\tLoadjs('squid.articadb.progress.php');\n\t\tUnlockPage();\n\t}\t\t\n\t\t\n\tfunction SaveWorkdir{$t}(){\n\t\tvar XHR = new XHRConnection();\t\n\t\tXHR.appendData('SquidStatsDatabasePath',document.getElementById('SquidStatsDatabasePath').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSaveWorkdir{$t});\t\t\t\t\n\t}\n\t\n\tfunction SaveWorkdir{$t}(){\n\t\tvar XHR = new XHRConnection();\t\n\t\tXHR.appendData('SquidStatsDatabasePath',document.getElementById('SquidStatsDatabasePath').value);\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSaveWorkdir{$t});\t\t\t\t\n\t}\t\n\t\t\n\tRefreshTableTitle{$t}();\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例15: add_popup
function add_popup()
{
$tpl = new templates();
$page = CurrentPageName();
$t = time();
$html = "\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:18px'>{directory}:</td>\n\t\t\t<td >" . Field_text("directory-{$t}", null, "font-size:18px", false, "SaveCK{$t}(event)") . "</td>\n\t\t\t<td width=1%>" . button_browse("directory-{$t}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:18px'>{write}:</td>\n\t\t\t<td >" . Field_checkbox_design("write-{$t}", 1, 0) . "</td>\n\t\t\t<td width=1%> </td>\n\t\t</tr>\t\t\t\t\t\n\t\t<td colspan=3 align='right'><hr>" . button("{add}", "Save{$t}()", 22) . "</td>\n\t\t</tr>\n\t</table>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif (res.length>3){alert(res);return;}\n\t\$('#ARTICA_WEBDAV_TABLE').flexReload();\n\tYahooWinHide();\n}\nfunction SaveCK{$t}(e){\n\tif(!checkEnter(e)){return;}\n\tSave{$t}();\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('directory',document.getElementById('directory-{$t}').value);\n\tif( document.getElementById('write-{$t}').checked){\n\t\tXHR.appendData('write',1);\n\t}else{\n\t\tXHR.appendData('write',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}