本文整理汇总了PHP中Field_text函数的典型用法代码示例。如果您正苦于以下问题:PHP Field_text函数的具体用法?PHP Field_text怎么用?PHP Field_text使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Field_text函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: popup
function popup()
{
$page = CurrentPageName();
$html = "\n\t<div class=text-info>{import_smtp_domains_explain}</div>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px' width=1% nowrap>{filename}:</td>\n\t\t<td width=99%>" . Field_text("DomainsSourcefile", null, "font-size:13px;padding:3px") . "</td>\n\t\t<td width=1%><input type='button' value='{browse} »' OnClick=\"javascript:Loadjs('tree.php?select-file=txt&target-form=DomainsSourcefile');\"></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{import}", "DomainImportPerform()") . "</td>\n\t</tr>\n\t</table>\n\t\t\n\t<div id='domains-status'></div>\n\t\n\t\n\t<script>\n\t\tfunction DomainImportPerform(){\n\t\t\tvar path=escape(document.getElementById('DomainsSourcefile').value);\n\t\t\tLoadAjax('domains-status','{$page}?popup-import=yes&ou={$_GET["ou"]}&path='+path);\n\t\t\n\t\t}\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例2: page
function page()
{
$q = new mysql_squid_builder();
$timekey = date('Ymd');
$timekeyMonth = date("Ym");
$time = time();
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$tpl = new templates();
$t = time();
$per["1m"] = "{minute}";
$per["5m"] = "5 {minutes}";
$per["10m"] = "10 {minutes}";
$per["1h"] = "{hour}";
$per["1d"] = "{day}";
$members["MAC"] = "{MAC}";
$members["USERID"] = "{uid}";
$members["IPADDR"] = "{ipaddr}";
if (!isset($_SESSION["SQUID_STATS_MEM_DATE1"])) {
$_SESSION["SQUID_STATS_MEM_DATE1"] = date("Y-m-d");
}
if (!isset($_SESSION["SQUID_STATS_MEM_TIME1"])) {
$_SESSION["SQUID_STATS_MEM_TIME1"] = "00:00";
}
if (!isset($_SESSION["SQUID_STATS_MEM_DATE2"])) {
$_SESSION["SQUID_STATS_MEM_DATE2"] = date("Y-m-d");
}
if (!isset($_SESSION["SQUID_STATS_MEM_TIME2"])) {
$_SESSION["SQUID_STATS_MEM_TIME2"] = "23:00";
}
$html = "\n\t<div style='width:98%;margin-bottom:20px' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend>{interval}:</td>\n\t\t<td style='vertical-align:top;font-size:18px;'>" . Field_array_Hash($per, "interval-{$t}", "10m", "blur()", null, 0, "font-size:18px;") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{from_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("from-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE1"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("from-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME1"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{to_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("to-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE2"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("to-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME2"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px;;width:400px'>" . button("Go", "Run{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t<div style='font-size:32px'>{proxy_memory_service_status}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='graph-{$t}'></div>\n\t<div style='font-size:32px'>{server_memory_consumption}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='memstats-{$t}'></div>\n\t\n\t\n\t\n\t\n\t\n\t\n<script>\n\nfunction Run{$t}(){\n\tvar date1=document.getElementById('from-date-{$t}').value;\n\tvar time1=document.getElementById('from-time-{$t}').value;\n\tvar date2=document.getElementById('to-date-{$t}').value\n\tvar time2=document.getElementById('to-time-{$t}').value;\n\tvar interval=document.getElementById('interval-{$t}').value;\n\tLoadjs('{$page}?query=yes&container=graph-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\tLoadjs('{$page}?memstats=yes&container=memstats-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\n}\nRun{$t}();\n</script>\t\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例3: page
function page()
{
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
if (!$users->APACHE_MOD_BW) {
echo FATAL_ERROR_SHOW_128("{the_specified_module_is_not_installed}");
return;
}
$servername_enc = urlencode($_GET["servername"]);
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql();
$sock = new sockets();
$free = new freeweb($_GET["servername"]);
$Params = $free->Params;
$t = time();
$ForceBandWidthModule = intval($Params["ModeBw"]["ForceBandWidthModule"]);
$BandwidthAll = intval($Params["ModeBw"]["BandwidthAll"]);
if ($BandwidthAll == 0) {
$BandwidthAll = 1536000;
}
$BandwidthAll = $BandwidthAll / 1024;
$html = "\n\n\t<div style='width:98%' class=form>\n\t" . Paragraphe_switch_img("{apache_Bandwidth_enable}", "{apache_Bandwidth_explain}", "bandlimit", "{$free->bandlimit}", null, 650) . "\n\t<table style='width:100%'>\n\t<td colspan=3 align=right>" . button("{rules}", "Loadjs('freeweb.mod.bw.php?servername={$servername_enc}')", 24) . "</td>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{limit_all_requests}:</td>\n\t\t<td>" . Field_checkbox("ForceBandWidthModule", 1, $ForceBandWidthModule) . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{default_limit}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("BandwidthAll", $BandwidthAll, "font-size:18px;width:90px") . " KB/s</td>\n\t\t<td></td>\n\t</tr>\n\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "Save{$t}()", 24) . "</td>\n\t</tr>\n\t</table>\n\t<p> </p>\n\t</div>\n<script>\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_freeweb_qos');\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('bandlimit',document.getElementById('bandlimit').value);\n\tif(document.getElementById('ForceBandWidthModule').checked){\n\t\tXHR.appendData('ForceBandWidthModule',1);\n\t}else{\n\t\tXHR.appendData('ForceBandWidthModule',0);\n\t}\n\t\n\t\n\tXHR.appendData('BandwidthAll',document.getElementById('BandwidthAll').value);\n\tXHR.appendData('servername','{$_GET["servername"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: popup
function popup()
{
$hostname = $_GET["hostname"];
$page = CurrentPageName();
$users = new usersMenus();
$tpl = new templates();
$t = time();
$main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
$detect_8bit_encoding_header = $main->GET("detect_8bit_encoding_header");
$disable_mime_input_processing = $main->GET("disable_mime_input_processing");
$disable_mime_output_conversion = $main->GET("disable_mime_output_conversion");
$mime_nesting_limit = $main->GET("mime_nesting_limit");
if (!is_numeric($detect_8bit_encoding_header)) {
$detect_8bit_encoding_header = 1;
}
if (!is_numeric($disable_mime_input_processing)) {
$disable_mime_input_processing = 0;
}
if (!is_numeric($disable_mime_output_conversion)) {
$disable_mime_output_conversion = 0;
}
if (!is_numeric($mime_nesting_limit)) {
$mime_nesting_limit = 100;
}
$html = "\n\t<div id='{$t}'></div>\n\t\n\t<div style='width:98%' class=form>\n\t<table>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{detect_8bit_encoding_header}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("detect_8bit_encoding_header-{$t}", 1, $detect_8bit_encoding_header) . "</td>\n\t\t<td width=1%>" . help_icon("{detect_8bit_encoding_header_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{disable_mime_output_conversion}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("disable_mime_output_conversion-{$t}", 1, $disable_mime_output_conversion) . "</td>\n\t\t<td width=1%>" . help_icon("{disable_mime_output_conversion_text}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{disable_mime_input_processing}:</td>\n\t\t<td class=legend style='font-size:16px'>" . Field_checkbox("disable_mime_input_processing-{$t}", 1, $disable_mime_input_processing) . "</td>\n\t\t<td width=1%>" . help_icon("{disable_mime_input_processing_text}") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:16px'>{mime_nesting_limit}</strong>:</td>\n\t\t<td>" . Field_text("mime_nesting_limit-{$t}", $mime_nesting_limit, 'width:70px;font-size:16px;padding:3px;text-align:right') . " </td>\n\t\t<td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td align='right' colspan=2><hr>" . button("{apply}", "Save{$t}()", "18px") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar X_Save{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t}\t\t\n\t\n\tfunction Save{$t}(){\n\t\tdetect_8bit_encoding_header=0;\n\t\tdisable_mime_output_conversion=0;\n\t\tdisable_mime_input_processing=0;\n\t\t\n\t\tif(document.getElementById('detect_8bit_encoding_header-{$t}').checked){detect_8bit_encoding_header=1;}\n\t\tif(document.getElementById('disable_mime_output_conversion-{$t}').checked){disable_mime_output_conversion=1;}\n\t\tif(document.getElementById('disable_mime_input_processing-{$t}').checked){disable_mime_input_processing=1;}\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$hostname}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('detect_8bit_encoding_header',detect_8bit_encoding_header);\n\t\tXHR.appendData('disable_mime_output_conversion',disable_mime_output_conversion);\n\t\tXHR.appendData('disable_mime_input_processing',disable_mime_input_processing);\n\t\tXHR.appendData('mime_nesting_limit',document.getElementById('mime_nesting_limit-{$t}').value);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_Save{$t});\n\t}\n\t\n\t\n\t\n\t</script>\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: popup_index
function popup_index()
{
$main = new main_cf();
$html = "<H1>{address_verify_map_minitext}</H1>" . RoundedLightWhite("<p class=caption>{address_verify_map_text}</p>") . "<br>\n\n\n<form name='FFMDBCache'>\n\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t\t" . RoundedLightWhite("\n\t\t<table style='width:100%;margin:10px'>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_map_field}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_map', str_replace('btree:', '', $main->main_array["address_verify_map"])) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_negative_cache}:</strong></td>\n\t\t\t\t<td>" . Field_yesno_checkbox_img('address_verify_negative_cache', $main->main_array["address_verify_negative_cache"], '{address_verify_negative_cache_text}') . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_count}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_count', $main->main_array["address_verify_poll_count"], 'width:30%', null, null, '{address_verify_poll_count_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_delay}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_delay', $main->main_array["address_verify_poll_delay"], 'width:30%', null, null, '{address_verify_poll_delay_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_sender}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_sender', $main->main_array["address_verify_sender"], 'width:30%', null, null, '{address_verify_sender_text}') . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_expire_time', $main->main_array["address_verify_negative_expire_time"], 'width:30%', null, null, '{address_verify_negative_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_refresh_time', $main->main_array["address_verify_negative_refresh_time"], 'width:30%', null, null, '{address_verify_negative_refresh_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_expire_time', $main->main_array["address_verify_positive_expire_time"], 'width:30%', null, null, '{address_verify_positive_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_refresh_time', $main->main_array["address_verify_positive_refresh_time"], 'width:30%', null, null, '{address_verify_positive_refresh_time_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\n\t\t\t\n\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' colspan=2><input type='button' value='{delete} »' OnClick=\"PostFixVerifyDatabaseDeleteSave();\"> <input type='button' value='{edit} »' OnClick=\"PostFixVerifyDatabaseSave();\"></td>\n\t\t\t</tr>\t\t\t\t\n\t\t</table>") . "\n</td>\n</tr>\n</table></form>";
$tpl = new Templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例6: ADD_PAGE
function ADD_PAGE()
{
if (isset($_GET["EDIT_PAGE"])) {
$ldap = new clladp();
$hash = $ldap->UserDatas($_SESSION["uid"]);
if (preg_match('#<header>(.+?)</header><pattern>(.+?)</pattern><regex>(.+?)</regex><action>(.+?)</action>#', $hash["RegexRules"][$_GET["EDIT_PAGE"]], $reg)) {
$header_field = $reg[1];
$action_value = $reg[4];
$regex_value = $reg[3];
$pattern_value = $reg[2];
$button_name = '{edit}';
$title = '{edit_a_rule}';
$hidden = "<input type='hidden' id='edit' value='{$_GET["EDIT_PAGE"]}'>";
}
} else {
$button_name = "{add}";
$title = "{add_a_rule}";
}
$fields = Field_array_Hash(ARRAY_HEADERS_FIELD(), 'header_field', $header_field);
$array_action = array("quarantine" => "{user_quarantine}", "delete" => "{user_delete}", "pass" => "{user_skip_antispam}");
$action = Field_array_Hash($array_action, 'action', $action_value);
$html = "\n\t<div style='padding:20px'>\n\t{$hidden}\n\t<H3>{$title}</H3>\n\t<p> </p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right'><strong>{select_header_field}</strong>:</td>\n\t\t<td>{$fields}</td>\n\t<tr>\n\t\t<td align='right'><strong>{match_pattern}</strong></td>\n\t\t<td>" . Field_text('pattern', $pattern_value) . ":</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{use_regex}</strong>:</td>\n\t\t<td>" . Field_numeric_checkbox_img('regex', $regex_value, '{enable_disable}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{then}</strong>:</td>\n\t\t<td>{$action}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td colspan=2 class='caption'>{star_explain} {only_regex_off}</td>\t\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{$button_name} »' OnClick=\"javascript:AddFilterRule();\"</td>\t\n\t</tr>\t\n\t\n\t\n\t\n\t</table>\n\t\n\t";
//ArticaUserFilterRule
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例7: messages_add
function messages_add()
{
$page = CurrentPageName();
$tpl = new templates();
$html = "\n\t<div style='font-size:26px;color:#d32d2d' id='post-message-results'></div>\n\t<div class=explain style='font-size:18px'>{spamass_analyze_post_explain}</div>\n\t<hr>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:22px'>{from}:</td>\n\t\t<td>" . Field_text("amavid-sender", null, "font-size:22px;padding:3px;width:97%") . "</td>\n\t</tr>\n\t\t<td valign='top' class=legend style='font-size:22px'>{recipients}:</td>\n\t\t<td><textarea id='amavid-recipients' style='width:100%;height:60px;overflow:auto;font-size:22px !important'></textarea></td>\n\t</tr>\n\t<td colspan=2>\n\t\t<div style='margin-bottom:10px;margin-top:20px;font-size:22px'>{source_message_explain}:</div>\n\t\t<textarea id='spamass_message' placeholder='{source_message_explain}' style='width:100%;height:250px;overflow:auto;font-size:7px'></textarea>\n\t</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<center>" . button("{submit}", "spamass_message_upload()", 40) . "</center>\n\t\n\t<script>\nvar X_spamass_message_upload= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('post-message-results').innerHTML=results;\n\t\t\n\t}\t\t\nfunction spamass_message_upload(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('upload-message','yes');\n\t\tXHR.appendData('message',document.getElementById('spamass_message').value);\n\t\tXHR.appendData('sender',document.getElementById('amavid-sender').value);\n\t\tXHR.appendData('recipients',document.getElementById('amavid-recipients').value);\n\t\tdocument.getElementById('post-message-results').innerHTML='analyze....';\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_spamass_message_upload);\n\t\t}\n\t\t\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例8: LoadRblist
function LoadRblist($ou)
{
$ldap = new clladp();
$oudat = $ldap->OUDatas($ou);
if (!is_array($oudat["SURBLServers"])) {
echo " ";
exit;
}
$cell = CellRollOver() . " style='font-size:12px'";
$serverlist = RblForm(1);
$html = "\n\t<H5>{rbl_servers}</H5>\n\t<table style='width:90%'>";
while (list($num, $val) = each($oudat["SURBLServers"])) {
if (strpos($val, ':') > 0) {
$tb = explode(":", $val);
$rbl = $tb[0];
$purc = $tb[1];
$count = $count + $purc;
} else {
$country = $val;
$action = "delete";
}
$html = $html . "\n\t\t\t<tr>\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td {$cell}><strong>{$rbl}</strong></td>\n\t\t\t<td {$cell} width=1%'><img src='img/i16.gif'></td>\n\t\t\t<td {$cell}><strong><a href='{$serverlist["{$rbl}"]["uri"]}' target='_new'>{$serverlist["{$rbl}"]["name"]}</a></strong></td>\n\t\t\t<td {$cell}><strong>" . Field_text("{$num}", $purc, 'width:50px', null, 'EditSurblRblServer(this)') . "</strong></td>\n\t\t\t<td {$cell} width=1%>" . imgtootltip('x.gif', '{delete}', "SURblDelete({$num})") . "</td>\n\t\t\t</tr>";
}
$html = $html . "<tr><td colspan=4 align='right' style='color:#005447;font-size:12px;border-top:1px solid black;padding:5px'><strong>{$count}%</strong></td></tr>";
$tpl = new templates();
echo "<br>" . RoundedLightGrey($tpl->_ENGINE_parse_body($html . "</table>"));
}
示例9: popup
function popup()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$_GET["ou"] = base64_decode($_GET["ou"]);
if ($_GET["ou"] != null) {
$config = $sock->GET_INFO("eMailingForAllOrg{$_GET["ou"]}");
} else {
$config = $sock->GET_INFO("eMailingForAllOrg");
}
if (preg_match('#<from>(.+?)</from><subject>(.+?)</subject><body>(.+?)</body>#is', $config, $re)) {
$from = $re[1];
$subject = $re[2];
$body = $re[3];
$conf = explode("\n", $body);
$body = null;
while (list($num, $val) = each($conf)) {
if (trim($val) == null) {
continue;
}
$body .= $val . "\n";
}
}
if ($_SESSION["uid"] != -100) {
$user = new user($uid);
$from = $user->mail;
}
$html = "\n\t<H1>{send_to_all_users}</H1>\n\t<p class=caption>{send_to_all_users_text}</p>\n\t<div id='emailform'>\n\t<table style='width:100%' class=table_form>\n\t<tr><td colspan=2 align=right><input type='button' OnClick=\"javascript:SendEmailText();\" value='{send} »'></td></tr>\n\t<tr>\n\t\t<td class=legend>{from}:</td>\n\t\t<td>" . Field_text('FromEmailingOrg', $from, 'width:220px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{subject}:</td>\n\t\t<td>" . Field_text('subjectEmailingOrg', $subject) . "</td>\n\t</tr>\n\t<tr><td colspan=2><hr></td></tr>\n\t<tr><td colspan=2><textarea name='body' id='bodyEmailingOrg' style='width:100%;height:120px;overflow:auto'>{$body}</textarea></td>\n\t</tr>\n\t<tr><td colspan=2><hr></td></tr>\n\t<tr><td colspan=2 align=right><input type='button' OnClick=\"javascript:SaveEmailText();\" value='{edit} »'></td></tr>\n\t</table>\n\t</div>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: popup
function popup()
{
$sock = new sockets();
$page = CurrentPageName();
$CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
if ($CyrusEnableLMTPUnix == null) {
$CyrusEnableLMTPUnix = 1;
}
$nets["127.0.0.1"] = "127.0.0.1";
$net = new networking();
while (list($num, $ipaddr) = each($net->array_TCP)) {
if ($ipaddr == null) {
continue;
}
$nets[$ipaddr] = $ipaddr;
}
$CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
if ($CyrusLMTPListen == null) {
$CyrusLMTPListen = "127.0.0.1:2005";
}
if (preg_match("#(.+?):(.+)#", $CyrusLMTPListen, $re)) {
$ipaddr_listen = $re[1];
$port = $re[2];
}
$lmtp_unix = "/var/spool/postfix/var/run/cyrus/socket/lmtp";
$html = "\n\t<div id='cyrus_lmtp_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/database-connect-settings-90.png'></td>\n\t\t<td valign='top'>\n\t<div style='font-size:13px;padding:5px'>{cyrus_lmtp_howto}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{enable_lmtp_unix}:</td>\n\t\t<td>" . Field_checkbox("CyrusEnableLMTPUnix", 1, $CyrusEnableLMTPUnix, "CyrusEnableLMTPUnixSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{listen_ip}:</td>\n\t\t<td>\n\t\t\t<table style='width:1%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>" . Field_array_Hash($nets, "lmtp_ipaddr", $ipaddr_listen, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t<td width=1%>:</td>\n\t\t\t\t<td width=1%>" . Field_text("lmtp_port", $port, "font-size:13px;padding:3px;width:40px") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{apply}", "CyrusEnableLMTPUnixSave()") . "</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_CyrusEnableLMTPUnixSave= function (obj) {\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction CyrusEnableLMTPUnixSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('CyrusEnableLMTPUnix').checked){XHR.appendData('CyrusEnableLMTPUnix',1);}else{XHR.appendData('CyrusEnableLMTPUnix',0);}\n\t\tXHR.appendData('CyrusLMTPListen',document.getElementById('lmtp_ipaddr').value+':'+document.getElementById('lmtp_port').value);\n\t\tdocument.getElementById('cyrus_lmtp_div').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusEnableLMTPUnixSave);\n\t}\n\t\t\n\t\tCyrusEnableLMTPUnixSwitch();\n\t</script>\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例11: add_cluster_popup
function add_cluster_popup()
{
$list = add_cluster_list();
$html = "<H1>{ADD_CLUSTER_RESSOUCE}</H1>\n<p class=caption>{ADD_CLUSTER_RESSOUCE}</p>\n\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td valign='top' class=legend>{servername}:</td>\n\t\t<td valign='top' >" . Field_text('cluster_client', null, 'width:150px') . "</td>\n\t\t<td valign='top' ><input type='button' OnClick=\"javascript:AddClusterButton()\" value='{add} »'></td>\n\t</tr>\n\t</table>\n\t" . RoundedLightWhite("<div style='width:100%;height:200px;overflow:auto' id='cluster-list'>{$list}</div>") . "\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例12: auth_popup
function auth_popup()
{
$page = CurrentPageName();
$tpl = new templates();
$html = "\n\t<span id='postresults'></span>\n\t<form id='authform'>\n\t<table style='width:100%' >\n\t<tr>\n\t\t<td class=legend>{username}:</td>\n\t\t<td>" . Field_text("username-logon", null, "font-size:16px;padding:5px", "script:SuBmitAuthCheck(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_password("username-password", null, "font-size:16px;padding:5px", "script:SuBmitAuthCheck(event)") . "</td>\n\t</tr>\t\n\t<tr>\n\t<td colspan=2 align='right' style='font-size:16px;padding:5px'>" . button("{submit}", "SuBmitAuth()") . "</td>\n\t</tr>\n\t</table>\n\t</form>\n\t\n\t<script>\n\t\tfunction SuBmitAuthCheck(e){\n\t\t\tif(checkEnter(e)){SuBmitAuth();}\n\t\t}\n\t\n\t\n\t\tvar x_DeleteAllArticaEvents= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('articaevents','{$page}?events-table=yes&LockBycontext={$_GET["LockBycontext"]}');\n\t\t\t\t\n\t\t}\t\t\t\n\t\t\n\t\tfunction SuBmitAuth(){\n\t\t\tAnimateDiv('postresults');\n\t\t\t\$.post('{$page}', \$('#authform').serialize(),\n\t\t\t\tfunction(data) {\n \t\t\t\t\t\$('#postresults').html(data);\n\t\t\t\t}\n\t\t\t);\n\t\t\n\t\t}\t\n\tdocument.title='Artica {$_SERVER["SERVER_NAME"]}'; \n\t\n\t</script>\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1%><img src='img/databases-search-net-128.png' id='databases-search-net-128'></td>\n\t\t<td valign='top'>\n\t\t\t<div class=text-info>{adSearchPopupHowto}</div>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{server_host}:</td>\n\t\t\t\t\t<td>" . Field_text("ServerQueryADHost", "", "width:220px;font-size:13px", "script:QueryLDAPDBBrowseCheck(event)") . "</td>\n\t\t\t\t\t<td>" . button("{browse}", "QueryLDAPDBBrowse()") . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t\t\n\t<div id='QueryLDAPDBBrowseResults' style='widht:100%;height:240px;overflow:auto'></div>\n\t\n\t\n\t<script>\nvar X_QueryLDAPDBBrowse= function (obj) {\n\t\tvar results=trim(obj.responseText);\n\t\tdocument.getElementById('databases-search-net-128').src='img/databases-search-net-128.png'; \n\t\tdocument.getElementById('QueryLDAPDBBrowseResults').innerHTML=results;\n\t}\t\t\nfunction QueryLDAPDBBrowse(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('QueryLDAPDBBrowse',document.getElementById('ServerQueryADHost').value);\n\t\tdocument.getElementById('databases-search-net-128').src='img/wait_verybig.gif'; \n\t\tXHR.sendAndLoad('{$page}', 'GET',X_QueryLDAPDBBrowse);\n\t\t\n\t}\nfunction QueryLDAPDBBrowseCheck(e){\n\tif(checkEnter(e)){QueryLDAPDBBrowse();}\n}\n\t</script>\n\t\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例14: page
function page()
{
$tpl = new templates();
$page = CurrentPageName();
$html = "\n\t<center>\n\t<table style='width:80%' class=form>\n\t<tr>\n\t\t<td class=legend>{access_events}:</td>\n\t\t<td>" . Field_text("access-search", null, "font-size:14px", null, null, null, false, "SquidAccessCheck(event)") . "</td>\n\t\t<td>" . button("{search}", "SquidAccess()") . "</td>\n\t</tr>\n\t</table>\n\t</center>\n\t<hr>\n\t<div id='squid-access-logs' style='width:100%;height:450px;overflow:auto'></div>\n\t\n\t<script>\n\tfunction SquidAccessCheck(e){\n\t\tif(checkEnter(e)){SquidAccess();}\n\t}\n\t\n\tfunction SquidAccess(){\n\t\t\tvar se=escape(document.getElementById('access-search').value);\n\t\t\tLoadAjax('squid-access-logs','{$page}?list=yes&search='+se);\n\t\t}\n\n\t\t\n\tSquidAccess();\t\t\n\t</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例15: popup_dns
function popup_dns()
{
$tpl = new templates();
$page = CurrentPageName();
$sock = new sockets();
$t = $_GET["t"];
$resolv_conf = explode("\n", @file_get_contents("/etc/resolv.conf"));
while (list($index, $lines) = each($resolv_conf)) {
if (preg_match("#127\\.0\\.0\\.1#", $lines)) {
continue;
}
if (preg_match("#^nameserver\\s+(.+)#", $lines, $re)) {
$g = trim($re[1]);
if ($g == "127.0.0.1") {
continue;
}
$arrayNameServers[] = $g;
}
}
$hostname = base64_decode($sock->getFrameWork("network.php?fqdn=yes"));
if (preg_match("#Name or service not known#", $hostname)) {
$mustchangeHostname = true;
$hostname = null;
}
if ($hostname == null) {
$users = new usersMenus();
$hostname = $users->fqdn;
}
$WizardNetLeaveUnconfigured = $sock->GET_INFO("WizardNetLeaveUnconfigured");
$html = "\n\t<center>\n\t<table style='width:80%' class=form>\n\t<tr>\n\t\t<td class=legend nowrap style='font-size:14px'>{i_prefer_leave_unconfigured}:</td>\n\t\t<td>" . Field_checkbox("WizardNetLeaveUnconfigured", 1, $WizardNetLeaveUnconfigured, "WizardNetLeaveUnconfiguredSave()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $hostname, "font-size:14px;width:210px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{primary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS1-{$t}", $arrayNameServers[0], "font-size:14px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{secondary_dns}:</td>\n\t\t<td>" . field_ipv4("DNS2-{$t}", $arrayNameServers[1], "font-size:14px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='right'>" . button("{apply}", "SaveDNS{$t}()", 13) . "</td>\n\t</tr>\n\t</table>\n\t</center>\n\t<script>\n\tvar x_SaveDNS{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tWizardDNSRefresh();\n\t}\t\n\t\n\tfunction SaveDNS{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('DNS1',document.getElementById('DNS1-{$t}').value);\n\t\tXHR.appendData('DNS2',document.getElementById('DNS2-{$t}').value);\n\t\tXHR.appendData('hostname',document.getElementById('hostname-{$t}').value);\n\t\tAnimateDiv('{$t}-dns');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveDNS{$t});\t\n\t\n\t}\t\t\n</script>\t\n\t\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}