本文整理汇总了PHP中r_userclass函数的典型用法代码示例。如果您正苦于以下问题:PHP r_userclass函数的具体用法?PHP r_userclass怎么用?PHP r_userclass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了r_userclass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: option_submission
function option_submission()
{
global $qs, $id, $sql, $ns, $rs, $aa, $content_pref, $pref, $content_cat_icon_path_large, $content_cat_icon_path_small, $plugintable, $plugindir, $TOPIC_TITLE_ROW, $TOPIC_ROW, $TOPIC_ROW_NOEXPAND, $TOPIC_TABLE_START, $TOPIC_TABLE_END;
global $fl, $stylespacer, $tp;
$text = "\n\t\t\t<div id='submission' style='display:none;' class='text-left'>\n\t\t\t<table class='table adminform' id='show_options_cat_02a'>";
$TOPIC_CAPTION = CONTENT_ADMIN_OPT_LAN_MENU_4;
// $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_TITLE_ROW);
$fanat1k_tmp = $TOPIC_TITLE_ROW;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_9;
$TOPIC_FIELD = "\n\t\t\t" . $rs->form_radio("content_submit", "1", $content_pref['content_submit'] ? "1" : "0", "", "") . CONTENT_ADMIN_OPT_LAN_SECTION_30 . "\n\t\t\t" . $rs->form_radio("content_submit", "0", $content_pref['content_submit'] ? "0" : "1", "", "") . CONTENT_ADMIN_OPT_LAN_SECTION_31 . "\n\t\t\t";
//$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_class_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_10;
$TOPIC_FIELD = r_userclass("content_submit_class", $content_pref['content_submit_class']);
//$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_directpost_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_11;
$TOPIC_FIELD = "\n\t\t\t" . $rs->form_radio("content_submit_directpost", "1", $content_pref['content_submit_directpost'] ? "1" : "0", "", "") . CONTENT_ADMIN_OPT_LAN_SECTION_30 . "\n\t\t\t" . $rs->form_radio("content_submit_directpost", "0", $content_pref['content_submit_directpost'] ? "0" : "1", "", "") . CONTENT_ADMIN_OPT_LAN_SECTION_31 . "\n\t\t\t";
// $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_sections
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_SECTION_1;
$TOPIC_FIELD = "<table style='width:100%;' cellpadding='0' cellspacing='0'><tr><td style='white-space:nowrap;'>\n\t\t\t" . $rs->form_checkbox("content_submit_subheading", 1, isset($content_pref['content_submit_subheading']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_32 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_summary", 1, isset($content_pref['content_submit_summary']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_38 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_startdate", 1, isset($content_pref['content_submit_startdate']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_33 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_enddate", 1, isset($content_pref['content_submit_enddate']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_34 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_icon", 1, isset($content_pref['content_submit_icon']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_27 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_attach", 1, isset($content_pref['content_submit_attach']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_2 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_images", 1, isset($content_pref['content_submit_images']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_3 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_comment", 1, isset($content_pref['content_submit_comment']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_4 . "<br />\n\t\t\t</td><td style='white-space:nowrap; vertical-align:top;'>\n\t\t\t" . $rs->form_checkbox("content_submit_rating", 1, isset($content_pref['content_submit_rating']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_5 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_score", 1, isset($content_pref['content_submit_score']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_6 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_pe", 1, isset($content_pref['content_submit_pe']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_20 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_visibility", 1, isset($content_pref['content_submit_visibility']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_7 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_meta", 1, isset($content_pref['content_submit_meta']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_8 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_layout", 1, isset($content_pref['content_submit_layout']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_9 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_customtags", 1, isset($content_pref['content_submit_customtags']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_10 . "<br />\n\t\t\t" . $rs->form_checkbox("content_submit_presettags", 1, isset($content_pref['content_submit_presettags']) ? "1" : "0") . " " . CONTENT_ADMIN_OPT_LAN_SECTION_11 . "<br />\n\t\t\t</td></tr></table>\n\t\t\t";
//$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_custom_number_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_5;
$TOPIC_FIELD = "\n\t\t\t" . $rs->form_select_open("content_submit_custom_number");
for ($i = 0; $i < 11; $i++) {
$TOPIC_FIELD .= $rs->form_option($i, $content_pref['content_submit_custom_number'] == $i ? "1" : "0", $i);
}
$TOPIC_FIELD .= $rs->form_select_close();
//$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_images_number_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_3;
$TOPIC_FIELD = "\n\t\t\t" . $rs->form_select_open("content_submit_images_number");
for ($i = 1; $i < 16; $i++) {
$k = $i * 2;
$TOPIC_FIELD .= $rs->form_option($k, $content_pref['content_submit_images_number'] == $k ? "1" : "0", $k);
}
$TOPIC_FIELD .= $rs->form_select_close();
// $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
//content_submit_files_number_
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_4;
$TOPIC_FIELD = "\n\t\t\t" . $rs->form_select_open("content_submit_files_number");
for ($i = 1; $i < 6; $i++) {
$TOPIC_FIELD .= $rs->form_option($i, $content_pref['content_submit_files_number'] == $i ? "1" : "0", $i);
}
$TOPIC_FIELD .= $rs->form_select_close();
//$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
$fanat1k_tmp = $TOPIC_ROW_NOEXPAND;
preg_match_all("/\\{(.*?)\\}/", $fanat1k_tmp, $matches);
for ($i = 0; $i < count($matches[1]); $i++) {
$fanat1k_tmp = str_replace("{{$matches[1][$i]}}", ${$matches[1][$i]}, $fanat1k_tmp);
}
$text .= $fanat1k_tmp;
$text .= $TOPIC_TABLE_END;
return $text;
}
示例2: add_faq
function add_faq($action, $id, $idx)
{
global $rs;
$tp = e107::getParser();
$sql = e107::getDb();
$ns = e107::getRender();
$userid = USERID;
$text .= "<table class='fborder' style=\"" . USER_WIDTH . "\" >\n <tr>\n <td colspan='2' class='forumheader3' style=\"width:80%; padding:0px\">";
$sql->db_Select("faqs", "*", "faq_parent='{$id}' AND faq_author = '{$userid}' ORDER BY faq_id ASC");
$text .= "<div style='width : auto; height : 110px; overflow : auto; '>\n <table class='fborder' style=\"width:100%\">\n <tr>\n <td class='fcaption' style=\"width:70%\">" . FAQ_ADLAN_49 . "</td>\n <td class='fcaption' style='text-align:center'>Options</td></tr>\n ";
while ($rw = $sql->db_Fetch()) {
// list($pfaq_id, $pfaq_parent, $pfaq_question, $pfaq_answer, $pfaq_comment);
$rw['faq_question'] = substr($rw['faq_question'], 0, 50) . " ... ";
$text .= "<tr>\n\n <td style='width:70%' class='forumheader3'>" . ($rw['faq_question'] ? $tp->toHTML($rw['faq_question']) : "[" . NWSLAN_42 . "]") . "</td>\n <td style='width:30%; text-align:center' class='forumheader3'>\n " . $rs->form_button("submit", "entry_edit_{$rw['faq_id']}", FAQ_ADLAN_45, "onclick=\"document.location='" . e_SELF . "?edit." . $id . "." . $rw['faq_id'] . ".'\"");
// $text .= $rs -> form_button("submit", "entry_delete", FAQ_ADLAN_50, "onclick=\"document.location='".e_SELF."?delentry.$id.$pfaq_id'\"")."
$text .= "</td>\n </tr>";
}
$text .= "</table></div>";
if ($action == "edit") {
$sql->db_Select("faqs", "*", " faq_id = '{$idx}' ");
$row = $sql->db_Fetch();
extract($row);
$data = $faq_answer;
}
$text .= "</td>\n </tr></table><form method=\"post\" action=\"" . e_SELF . "?cat.{$id}.{$idx}\" id=\"dataform\">\n <table class='fborder' style=\"" . USER_WIDTH . "\" >\n <tr>\n <td class='fcaption' colspan='2' style='text-align:center'>";
$text .= is_numeric($id) ? "Edit" : "Add";
$text .= " an FAQ</td></tr>";
$text .= "\n <tr>\n <td class='forumheader3' style=\"width:20%\">" . FAQ_ADLAN_78 . "</td>\n <td class='forumheader3' style=\"width:80%\">";
$text .= "<select style='width:150px' class='tbox' id='faq_parent' name='faq_parent' >";
$sql->db_Select("faqs_info", "*", "faq_info_parent !='0' ");
while ($prow = $sql->db_Fetch()) {
//extract($row);
$selected = $prow['faq_info_id'] == $id ? " selected='selected'" : "";
$text .= "<option value=\"" . $prow['faq_info_id'] . "\" {$selected}>" . $prow['faq_info_title'] . "</option>";
}
$text .= " </select>\n </td>\n </tr>";
$text .= "\n <tr>\n <td class='forumheader3' style=\"width:20%\">" . FAQ_ADLAN_51 . "</td>\n <td class='forumheader3' style=\"width:80%\">\n\n <input class=\"tbox\" type=\"text\" name=\"faq_question\" style=\"width:100%\" value=\"{$faq_question}\" />\n </td>\n </tr>\n\n <tr>\n <td class='forumheader3' style=\"width:20%;vertical-align:top\">" . FAQ_ADLAN_60 . "</td>\n <td class='forumheader3' style=\"width:80%\">\n <textarea id=\"data\" cols='15' class=\"tbox\" name=\"data\" style=\"width:100%\" rows=\"8\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\">{$data}</textarea>\n <br />\n <input class='helpbox' type=\"text\" id='helpb' name=\"helpb\" size=\"70\" style='width:100%' /><br />\n ";
$text .= ren_help("addtext");
$text .= "<br /></td></tr>";
if (ADMIN) {
$text .= "<tr>\n <td class='forumheader3' style=\"width:20%; vertical-align:top\">" . FAQ_ADLAN_52 . "</td>";
require_once e_HANDLER . "userclass_class.php";
$text .= "<td class='forumheader3' >" . r_userclass("faq_comment", $faq_comment, "", "public,guest,nobody,member,admin,classes") . "</td>";
$text .= "\n </tr>";
} else {
$text .= "<input type='hidden' name='faq_comment' value='0' />";
}
$text .= "\n\n <tr>\n <td class='forumheader' colspan=\"2\" style=\"text-align:center\">\n ";
if ($action == "edit") {
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_edit_submit\" value=\"" . FAQ_ADLAN_53 . "{$faq_id}\" />\n <input type=\"hidden\" name=\"faq_id\" value=\"{$idx}\" /> ";
} else {
$text .= "<input class=\"button\" type=\"submit\" name=\"faq_submit\" value=\"" . FAQ_ADLAN_54 . "\" />";
}
$text .= "<input type=\"hidden\" name=\"faq\" value=\"{$faq}\" />\n </td>\n </tr>\n </table>\n\n </form>";
if (varset($faq)) {
$sql->db_Select("faqs_info", "*", "faq_info_id='{$faq}'");
$row = $sql->db_Fetch();
extract($row);
}
$ns->tablerender("Frequently asked Questions" . $faq_info_title, "<div style='text-align:center'>" . $text . "</div>" . $this->faq_footer());
}
示例3: settingsPage
function settingsPage()
{
global $pref;
$frm = e107::getForm();
$tp = e107::getParser();
$sql = e107::getDb();
$ns = e107::getRender();
$mes = e107::getMessage();
if (function_exists('gd_info')) {
$gd_info = gd_info();
$gd_version = $gd_info['GD Version'];
} else {
$gd_version = "<span class='error'> " . IMALAN_55 . "</span>";
}
if ($pref['resize_method'] == "ImageMagick" && !vartrue(e107::getFolder('imagemagick'))) {
$mes->addWarning('Please add: <b>$IMAGEMAGICK_DIRECTORY="' . $pref['im_path'] . '";</b> to your e107_config.php file');
}
//$IM_NOTE = "";
$im_path = vartrue(e107::getFolder('imagemagick'));
if ($im_path != "") {
$im_file = $im_path . 'convert';
if (!file_exists($im_file)) {
//$IM_NOTE = "<span class='error'>".IMALAN_52."</span>";
$mes->addWarning(IMALAN_52);
} else {
$cmd = "{$im_file} -version";
$tmp = `{$cmd}`;
if (strpos($tmp, "ImageMagick") === FALSE) {
//$IM_NOTE = "<span class='error'>".IMALAN_53."</span>";
$mes->addWarning(IMALAN_53);
}
}
}
$text = "\n\t\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\t\t\t\t<fieldset id='core-image-settings'>\n\t\t\t\t\t<legend class='e-hideme'>" . IMALAN_7 . "</legend>\n\t\t\t\t\t<table class='table adminform'>\n\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t\t\t<col class='col-control' />\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . IMALAN_1 . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<div class='auto-toggle-area autocheck'>\n\t\t\t\t\t\t\t\t\t\t" . $frm->checkbox('image_post', 1, $pref['image_post']) . "\n\t\t\t\t\t\t\t\t\t\t<div class='field-help'>" . IMALAN_2 . "</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . IMALAN_10 . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . r_userclass('image_post_class', $pref['image_post_class'], "off", "public,guest,nobody,member,admin,main,classes") . "\n\t\t\t\t\t\t\t\t\t<div class='field-help'>" . IMALAN_11 . "</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . IMALAN_12 . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . $frm->select_open('image_post_disabled_method') . "\n\t\t\t\t\t\t\t\t\t\t" . $frm->option(IMALAN_14, '0', $pref['image_post_disabled_method'] == "0") . "\n\t\t\t\t\t\t\t\t\t\t" . $frm->option(IMALAN_15, '1', $pref['image_post_disabled_method'] == "1") . "\n\t\t\t\t\t\t\t\t\t" . $frm->select_close() . "\n\t\t\t\t\t\t\t\t\t<div class='field-help'>" . IMALAN_13 . "</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>";
list($img_import_w, $img_import_h) = explode("x", $pref['img_import_resize']);
$text .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . IMALAN_105 . "<div class='label-note'>" . IMALAN_106 . "</div></td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . $frm->text('img_import_resize_w', $img_import_w, 4) . "px X " . $frm->text('img_import_resize_h', $img_import_h, 4) . "px\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . IMALAN_3 . "<div class='label-note'>" . IMALAN_54 . " {$gd_version}</div></td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . $frm->select_open('resize_method') . "\n\t\t\t\t\t\t\t\t\t\t" . $frm->option('gd1', 'gd1', $pref['resize_method'] == "gd1") . "\n\t\t\t\t\t\t\t\t\t\t" . $frm->option('gd2', 'gd2', $pref['resize_method'] == "gd2") . "\n\t\t\t\t\t\t\t\t\t\t" . $frm->option('ImageMagick', 'ImageMagick', $pref['resize_method'] == "ImageMagick") . "\n\t\t\t\t\t\t\t\t\t" . $frm->select_close() . "\n\t\t\t\t\t\t\t\t\t<div class='field-help'>" . IMALAN_4 . "</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>";
/*
$text .= "
// Removed to prevent mod_security blocks, and show only when relevant (non-GD2 users)
<tr>
<td>".IMALAN_5."<div class='label-note'>{$IM_NOTE}</div></td>
<td>
".$frm->text('im_path', $pref['im_path'])."
<div class='field-help'>".IMALAN_6."</div>
</td>
</tr>";
// Removed as IE6 should no longer be supported. A 3rd-party plugin can be made for this functionality if really needed.
$text .= "
<tr>
<td>".IMALAN_34."
</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('enable_png_image_fix', 1, ($pref['enable_png_image_fix']))."
<div class='field-help'>".IMALAN_35."</div>
</div>
</td>
</tr>";
*/
$text .= "\n\t\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . IMALAN_36 . "</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t" . $frm->admin_button('check_avatar_sizes', ADLAN_145) . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t" . $frm->admin_button('update_options', IMALAN_8, 'update') . "\n\t\t\t\t\t</div>\n\t\t\t\t</fieldset>\n\t\t\t</form>";
echo $mes->render() . $text;
return;
// $ns->tablerender(LAN_MEDIAMANAGER." :: ".IMALAN_7, $mes->render().$text);
}
示例4: count
if (!empty($si)) {
$n = count($si);
for ($i = 0; $i < $n; $i++) {
$instances .= $si[$i] . " ";
}
}
$pref['wowprogress_showinstances'] = $instances;
$pref['wowprogress_manageclass'] = $_POST['wowprogress_manageclass'];
$pref['wowprogress_killstyle'] = $_POST['killstyle'];
$pref['wowprogress_headerstyle'] = $_POST['headerstyle'];
save_prefs();
$message = WPCONFIG_LAN001;
}
if (isset($message)) {
$ns->tablerender("", "<div style='text-align:center'><b>" . $message . "</b></div>");
}
$text = "\n<div style='text-align:center'>\n<form method='post' action='" . e_SELF . "'>\n<table style='width:75%' class='fborder'>\n<tr>\n<td style='width:50%' class='forumheader3'>" . WPCONFIG_LAN002 . "</td>\n<td style='width:50%; text-align:right' class='forumheader3'>\n" . r_userclass('wowprogress_manageclass', $pref['wowprogress_manageclass'], 'off', 'nobody,member,admin,classes') . "\n</td>\n</tr>\n<tr>\n<td style='width:50%' class='forumheader3'>" . WPCONFIG_LAN003 . "</td>\n<td style='width:50%; text-align:right' class='forumheader3'>";
$sql->db_Select("wowprogress_instances", "*");
$sitext = "";
while ($row = $sql->db_Fetch()) {
$showinstances = explode(" ", $pref['wowprogress_showinstances']);
if (in_array($row['id'], $showinstances)) {
$sitext .= $row['zonename'] . " <input type='checkbox' name='showinstances[]' value='" . $row['id'] . "' checked /><br />";
} else {
$sitext .= $row['zonename'] . " <input type='checkbox' name='showinstances[]' value='" . $row['id'] . "' /><br />";
}
}
$text .= $sitext != "" ? $sitext : "" . WPCONFIG_LAN004 . " <a href='" . e_PLUGIN . "wowprogress/datapack.php'>" . WPCONFIG_LAN005 . "</a>!";
$text .= "</td>\n</tr>\n<tr>\n<td style='width:50%' class='forumheader3'>" . WPCONFIG_LAN006 . "</td>\n<td style='width:50%; text-align:right' class='forumheader3'>\n<select name='killstyle' class='tbox'>\n<option value='total'" . ($pref['wowprogress_killstyle'] == "total" ? " selected" : "") . ">" . WPCONFIG_LAN007 . " - Icecrown Citadel (8/24)</option>\n<option value='normal'" . ($pref['wowprogress_killstyle'] == "normal" ? " selected" : "") . ">" . WPCONFIG_LAN008 . " - Icecrown Citadel (6/12)</option>\n<option value='heroic'" . ($pref['wowprogress_killstyle'] == "heroic" ? " selected" : "") . ">" . WPCONFIG_LAN009 . " - Icecrown Citadel (2/12)</option>\n<option value='none'" . ($pref['wowprogress_killstyle'] == "none" ? " selected" : "") . ">" . WPCONFIG_LAN010 . " - Icecrown Citadel</option>\n</select>\n</td>\n</tr>\n<tr>\n<td style='width:50%' class='forumheader3'>" . WPCONFIG_LAN011 . "</td>\n<td style='width:50%; text-align:right' class='forumheader3'>\n<select name='headerstyle' class='tbox'>\n<option value='fcaption'" . ($pref['wowprogress_headerstyle'] == "fcaption" ? " selected" : "") . ">fcaption</option>\n<option value='forumheader'" . ($pref['wowprogress_headerstyle'] == "forumheader" ? " selected" : "") . ">forumheader</option>\n<option value='forumheader2'" . ($pref['wowprogress_headerstyle'] == "forumheader2" ? " selected" : "") . ">forumheader2</option>\n<option value='forumheader3'" . ($pref['wowprogress_headerstyle'] == "forumheader3" ? " selected" : "") . ">forumheader3</option>\n</select>\n</td>\n</tr>\n<tr>\n<td colspan='2' style='text-align:center' class='forumheader'>\n<input class='button' type='submit' name='updatesettings' value='" . WPCONFIG_LAN012 . "' />\n</td>\n</tr>\n</table>\n</form>\n</div>\n";
$ns->tablerender(WPCONFIG_LAN013, $text);
require_once e_ADMIN . "footer.php";
示例5: doForm
function doForm($editArray = FALSE)
{
$frm = e107::getForm();
$sql = e107::getDb();
$ns = e107::getRender();
$mes = e107::getMessage();
$count = $sql->select("gsitemap", "*", "gsitemap_id !=0 ORDER BY gsitemap_id ASC");
$text = "\n\t\t<form action='" . e_SELF . "' id='form' method='post'>\n\t\t<table class='table adminform'>\n\t <colgroup span='2'>\n \t\t<col class='col-label' />\n \t\t<col class='col-control' />\n \t</colgroup>\n\t\t<tr>\n\t\t\t<td>" . LAN_NAME . "</td>\n\t\t\t<td>" . $frm->text('gsitemap_name', $editArray['gsitemap_name'], '100', array('class' => 'tbox input-text span3')) . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<td>" . LAN_URL . "</td>\n\t\t\t<td>" . $frm->text('gsitemap_url', $editArray['gsitemap_url'], '100', array('class' => 'tbox input-text span3')) . "\n\t\t\t\t<input class='tbox' type='hidden' name='gsitemap_lastmod' size='40' value='" . time() . "' maxlength='100' /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . GSLAN_10 . "</td>\n\t\t\t<td>\n\t\t\t\t<select class='tbox' name='gsitemap_freq'>\n";
foreach ($this->freq_list as $k => $fq) {
$sel = $editArray['gsitemap_freq'] == $k ? "selected='selected'" : "";
$text .= "<option value='{$k}' {$sel}>" . $fq . "</option>\n";
}
$text .= "</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . GSLAN_9 . "</td>\n\t\t\t<td>\n\t\t\t\t<select class='tbox' name='gsitemap_priority' >\n";
for ($i = 0.1; $i < 1.0; $i = $i + 0.1) {
$sel = $editArray['gsitemap_priority'] == number_format($i, 1) ? "selected='selected'" : "";
$text .= "<option value='" . number_format($i, 1) . "' {$sel}>" . number_format($i, 1) . "</option>\n";
}
$text .= "</select></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . LAN_ORDER . "</td>\n\t\t\t<td><select name='gsitemap_order' class='tbox'>";
for ($i = 0; $i < $count; $i++) {
$text .= $editArray['gsitemap_order'] == $i ? "<option value='" . $i . "' selected='selected'>" . $i . "</option>" : "<option value='" . $i . "'>" . $i . "</option>";
}
$text .= "</select>\n\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . LAN_VISIBILITY . "</td>\n\t\t\t<td>" . r_userclass("gsitemap_active", $editArray['gsitemap_active'], 'off', "nobody,public,guest,member,admin,classes,language") . "\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t<div class='buttons-bar center'>";
if (is_array($editArray)) {
$text .= $frm->admin_button('add_link', LAN_UPDATE, 'update') . "\n\t\t\t<input type='hidden' name='gsitemap_id' value='" . $editArray['gsitemap_id'] . "' />";
} else {
$text .= $frm->admin_button('add_link', LAN_CREATE, 'create');
}
$text .= "</div>\n\t\t</form>\n\t\t";
$ns->tablerender(GSLAN_29, $mes->render() . $text);
}
示例6: data_type_select
$ret = "<div class='control-group clearfix' >\r\n \t\t<span class='pull-left'>" . $prompt . "</span><span class='pull-right'><select name='{$name}' class='tbox'>\n\r\n\t\t<option value='0' " . ($value == 0 ? " selected='selected'" : "") . ">" . ADSTAT_L50 . "</option>\n\r\n\t\t<option value='1' " . ($value == 1 ? " selected='selected'" : "") . ">" . ADSTAT_L49 . "</option>\n\r\n\t\t<option value='2' " . ($value == 2 ? " selected='selected'" : "") . ">" . ADSTAT_L48 . "</option>\n\r\n\t\t</select></span></div>";
return $ret;
}
function data_type_select($name, $value)
{
global $stats_list;
$ret = "<select name='{$name}' class='tbox' onchange=\"settypebox(this.value);\">\n\r\n\t\t<option value='page' " . ($value == 'page' ? " selected='selected'" : "") . ">" . ADSTAT_L52 . "</option>\n";
foreach ($stats_list as $k => $v) {
$ret .= "<option value='{$k}' " . ($value == $k ? " selected='selected'" : "") . ">{$v}</option>\n";
}
$ret .= "</select>\n";
return $ret;
}
switch ($action) {
case 'config':
$text = "\r\n\t<form method='post' action='" . e_SELF . "'>\r\n\t<table class='table adminform'>\r\n\t<colgroup>\r\n\t\t<col style='width:40%' />\r\n\t\t<col style='width:60%' />\r\n\t</colgroup>\r\n\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L4 . "</td>\r\n\t\t<td>" . $frm->radio_switch('statActivate', $pref['statActivate']) . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L18 . "</td>\r\n\t\t<td>" . r_userclass("statUserclass", $pref['statUserclass'], 'off', 'public, member, admin, classes') . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L20 . "</td>\r\n\t\t<td>" . $frm->radio_switch('statCountAdmin', $pref['statCountAdmin']) . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L21 . "</td>\r\n\t\t<td><input class='tbox' type='text' name='statDisplayNumber' size='8' value='" . $pref['statDisplayNumber'] . "' maxlength='3' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L5 . "</td>\r\n\t\t<td>\r\n\t\t" . gen_select(ADSTAT_L6, 'statBrowser', $pref['statBrowser']) . gen_select(ADSTAT_L7, 'statOs', $pref['statOs']) . gen_select(ADSTAT_L8, 'statScreen', $pref['statScreen']) . gen_select(ADSTAT_L9, 'statDomain', $pref['statDomain']) . gen_select(ADSTAT_L10, 'statRefer', $pref['statRefer']) . gen_select(ADSTAT_L11, 'statQuery', $pref['statQuery']) . "<div class='clearfix' style='padding-bottom: 4px'><span class='pull-left'>" . ADSTAT_L19 . "</span><span class='pull-right'>\r\n\t\t " . $frm->radio_switch('statRecent', $pref['statRecent']) . "</span></div>\r\n\t\t</td>\r\n\t</tr>\r\n\r\n\t<tr>\r\n\t<td>" . ADSTAT_L78 . "</td>\r\n\t\t<td>" . $frm->checkbox('statPrevMonth', 1, varset($pref['statPrevMonth'], 0)) . "<span class='field-help'>" . ADSTAT_L79 . "</span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L12 . "</td>\r\n\t\t<td>\r\n\t\t\t" . $frm->checkbox('wipe[statWipePage]', 1, false, array('label' => ADSTAT_L14)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeBrowser]', 1, false, array('label' => ADSTAT_L6)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeOs]', 1, false, array('label' => ADSTAT_L7)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeScreen]', 1, false, array('label' => ADSTAT_L8)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeDomain]', 1, false, array('label' => ADSTAT_L9)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeRefer]', 1, false, array('label' => ADSTAT_L10)) . "\r\n\t\t\t" . $frm->checkbox('wipe[statWipeQuery]', 1, false, array('label' => ADSTAT_L11)) . "\r\n\t\t\t<br />\r\n\t\t\t" . $frm->admin_button('wipeSubmit', LAN_RESET, 'delete') . "<span class='field-help'>" . ADSTAT_L13 . "</span>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . ADSTAT_L26 . "</td>\r\n\t\t<td>" . $frm->admin_button('openRemPageD', ADSTAT_L28, 'other') . "<span class='field-help'>" . ADSTAT_L27 . "</span>\t</td>\r\n\t</tr>\r\n\t</table>\r\n\t<div class='buttons-bar center'>\r\n\t\t" . $frm->admin_button('updatesettings', LAN_UPDATE, 'update') . "\r\n\t</div>\r\n\t</form>";
$ns->tablerender(ADSTAT_L16, $text);
break;
// case config
// case config
case 'rempage':
// Remove pages
rempage();
break;
case 'export':
// Export file
// Export file
case 'datasets':
//===========================================================
// EXPORT DATA
//===========================================================
示例7: r_userclass
$text .= "<option selected='selected'>10</option>\n";
} else {
$text .= "<option>10</option>\n";
}
if ($chatbox_posts == 15) {
$text .= "<option selected='selected'>15</option>\n";
} else {
$text .= "<option>15</option>\n";
}
if ($chatbox_posts == 20) {
$text .= "<option selected='selected'>20</option>\n";
} else {
$text .= "<option>20</option>\n";
}
if ($chatbox_posts == 25) {
$text .= "<option selected='selected'>25</option>\n";
} else {
$text .= "<option>25</option>\n";
}
if (!isset($pref['cb_mod'])) {
$pref['cb_mod'] = e_UC_ADMIN;
}
$text .= "</select>\r\n<span class='field-help'>" . CHBLAN_12 . "</span>\r\n\t</td>\r\n\t</tr>\r\n\r\n\t<tr><td>" . CHBLAN_32 . ": </td>\r\n\t<td>" . r_userclass("cb_mod", $pref['cb_mod'], 'off', "nobody,main,admin, classes") . "\r\n\t</td>\r\n\t</tr>\r\n\r\n\t<tr><td>" . CHBLAN_36 . "</td>\r\n\t<td>" . ($pref['cb_layer'] == 0 ? "<input type='radio' name='cb_layer' value='0' checked='checked' />" : "<input type='radio' name='cb_layer' value='0' />") . " " . CHBLAN_37 . "<br />" . ($pref['cb_layer'] == 1 ? "<input type='radio' name='cb_layer' value='1' checked='checked' />" : "<input type='radio' name='cb_layer' value='1' />") . " " . CHBLAN_29 . " -- " . CHBLAN_30 . ": <input class='tbox' type='text' name='cb_layer_height' size='8' value='" . $pref['cb_layer_height'] . "' maxlength='3' /><br />" . ($pref['cb_layer'] == 2 ? "<input type='radio' name='cb_layer' value='2' checked='checked' />" : "<input type='radio' name='cb_layer' value='2' />") . " " . CHBLAN_38 . "\r\n\t</td>\r\n\t</tr>\r\n\t";
if ($pref['smiley_activate']) {
$text .= "<tr><td>" . CHBLAN_31 . "?: </td>\r\n\t\t<td>" . ($pref['cb_emote'] ? "<input type='checkbox' name='cb_emote' value='1' checked='checked' />" : "<input type='checkbox' name='cb_emote' value='1' />") . "\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t";
}
$text .= "<tr>\r\n\t<td>" . CHBLAN_21 . ":</td>\r\n\t<td>\r\n\t" . CHBLAN_23 . " <select name='chatbox_prune' class='tbox'>\r\n\t<option></option>\r\n\t<option value='86400'>" . CHBLAN_24 . "</option>\r\n\t<option value='604800'>" . CHBLAN_25 . "</option>\r\n\t<option value='2592000'>" . CHBLAN_26 . "</option>\r\n\t<option value='1'>" . CHBLAN_27 . "</option>\r\n\t</select>\r\n\t" . $frm->admin_button('prune', CHBLAN_21, 'other') . "\r\n\t<span class='field-help'>" . CHBLAN_22 . "</span>\r\n\t</td>\r\n\t</tr>";
$text .= "<tr>\r\n\t<td>" . CHBLAN_34 . ":</td>\r\n\t<td>\r\n\t" . $frm->admin_button('recalculate', CHBLAN_35, 'other') . "\r\n\t</td>\r\n\t</tr>\r\n\t</table>";
$text .= "<div class='buttons-bar center'>\r\n\t" . $frm->admin_button('updatesettings', LAN_UPDATE, 'update') . "\r\n\t</div>\r\n\t</form>\r\n\t</div>";
$ns->tablerender(CHBLAN_20, $text);
require_once e_ADMIN . "footer.php";
示例8: array
$text .= "\n\t\t<fieldset class='e-hideme' id='core-prefs-comments'>\n\t\t\t<legend>" . PRFLAN_87 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_161 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('comments_disabled', $pref['comments_disabled'], LAN_NO, LAN_YES, array('reverse' => 1)) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n \t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_32 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('anon_post', $pref['anon_post'], LAN_YES, LAN_NO) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_33 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_89 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('comments_icon', $pref['comments_icon'], LAN_YES, LAN_NO) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_88 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('nested_comments', $pref['nested_comments'], LAN_YES, LAN_NO) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_90 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('allowCommentEdit', $pref['allowCommentEdit'], LAN_YES, LAN_NO) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_166 . ": </td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('comments_emoticons', $pref['comments_emoticons'], LAN_YES, LAN_NO) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_233 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->uc_select('comments_moderate', $pref['comments_moderate'], "nobody,guest,new,bots,public,admin,main,classes") . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_234 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_235 . "</td>\n\t\t\t\t\t\t<td>";
$comment_sort = array("desc" => PRFLAN_236, 'asc' => PRFLAN_237);
$text .= $frm->select('comments_sort', $comment_sort, $pref['comments_moderate']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t</tbody>\n\t\t\t</table>\n\n\t\t\t<legend>" . PRFLAN_209 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . PRFLAN_208 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $e_userclass->uc_dropdown('email_item_class', varset($pref['email_item_class'], e_UC_MEMBER), 'nobody,admin,main,public,member,classes', "tabindex='" . $frm->getNext() . "'") . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t" . pref_submit('comments') . "\n\t\t</fieldset>\n\t";
// File Uploads
include_lan(e_LANGUAGEDIR . e_LANGUAGE . "/admin/lan_upload.php");
require_once e_HANDLER . "upload_handler.php";
$text .= "\n\t<fieldset class='e-hideme' id='core-prefs-uploads'>\n\t\t\t<legend>" . PRFLAN_238 . "</legend>";
$upload_max_filesize = ini_get('upload_max_filesize');
$post_max_size = ini_get('post_max_size');
$maxINI = min($upload_max_filesize, $post_max_size);
if ($maxINI < $pref['upload_maxfilesize']) {
$text .= "<div class='alert-block alert alert-danger'>";
$text .= PRFLAN_239 . " " . $maxINI . "</div>";
$pref['upload_maxfilesize'] = $maxINI;
}
$text .= "\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t<tr>\n\t<td>" . UPLLAN_25 . "</td>\n\t<td>" . $frm->radio_switch('upload_enabled', $pref['upload_enabled'], LAN_YES, LAN_NO) . "\n\t<div class='field-help'>" . UPLLAN_26 . "</div>\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . UPLLAN_33 . "<br />\n\t</td>\n\t<td>" . $frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], 10) . "\n\t <div class='field-help'>" . UPLLAN_34 . "</div>\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . UPLLAN_37 . "</td>\n\t<td>" . r_userclass("upload_class", $pref['upload_class'], "off", "nobody,public,guest,member,admin,classes") . "\n\t<div class='field-help'>" . UPLLAN_38 . "</div>\n\t</td>\n\t</tr>\n\t<tr><td>" . PRFLAN_240 . "</td>\n\t<td>\n\n\t<table class='table table-striped table-bordered'>\n\t<tr><th>" . LAN_TYPE . "</th><th>" . UPLLAN_33 . "</th>\n\t";
$fl = e107::getFile();
$data = $fl->getFiletypeLimits();
foreach ($data as $k => $v) {
$text .= "<tr><td>" . $k . "</td>\n\t\t<td>" . $fl->file_size_encode($v) . "</td>\n\t\t</tr>";
}
// $text .= print_a($data,true);
$text .= "</table>\n\t\n\t<div>" . PRFLAN_241 . " <b>" . str_replace("../", '', e_SYSTEM) . e_READ_FILETYPES . "</b></div>\n\t</td>\n\t\n\t\n\t</tbody>\n\t\t</table>\n\t\t\t" . pref_submit('uploads');
$text .= "\n\t\t</fieldset>";
// Javascript Control
$text .= "\n\t\t\t<fieldset class='e-hideme' id='core-prefs-javascript'>\n\t\t\t<legend>" . PRFLAN_242 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>";
$js_options = array('auto' => PRFLAN_243, 'admin' => PRFLAN_244, 'front' => PRFLAN_245, 'all' => PRFLAN_246, 'none' => PRFLAN_247);
//TODO FIXME
// ie. e107 Core Minimum: JS similar to e107 v1.0 should be loaded "e_js.php" (no framwork dependency)
// with basic functions like SyncWithServerTime() and expandit(), externalLinks() etc.
$js_types = array(array('id' => 'jquery', 'name' => 'jQuery (local)'), array('id' => 'prototype', 'name' => 'Prototype (local)'));
示例9: menuVisibilityOptions
function menuVisibilityOptions()
{
if (!$_GET['vis']) {
return;
}
global $sql, $ns, $frm;
require_once e_HANDLER . "userclass_class.php";
if (!$sql->db_Select("menus", "*", "menu_id=" . intval($_GET['vis']))) {
$this->menuAddMessage("Couldn't Load Menu", E_MESSAGE_ERROR);
return;
}
$row = $sql->db_Fetch();
$listtype = substr($row['menu_pages'], 0, 1);
$menu_pages = substr($row['menu_pages'], 2);
$menu_pages = str_replace("|", "\n", $menu_pages);
$text = "<div style='text-align:center;'>\n\t\t<form method='post' action='" . e_SELF . "?lay=" . $this->curLayout . "&iframe=1'>\n <fieldset id='core-menus-visibilityform'>\n\t\t<legend>" . MENLAN_7 . " " . $row['menu_name'] . "</legend>\n <table class='adminform'>\n\t\t<tr>\n\t\t<td>\n\t\t<input type='hidden' name='menuAct[{$row['menu_id']}]' value='sv.{$row['menu_id']}' />\n\t\t" . MENLAN_4 . " " . r_userclass('menu_class', $row['menu_class'], "off", "public,member,guest,admin,main,classes,nobody") . "\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td><br />";
$checked = $listtype == 1 ? " checked='checked' " : "";
$text .= "<input type='radio' {$checked} name='listtype' value='1' /> " . MENLAN_26 . "<br />";
$checked = $listtype == 2 ? " checked='checked' " : "";
$text .= "<input type='radio' {$checked} name='listtype' value='2' /> " . MENLAN_27 . "<br /><br />" . MENLAN_28 . "<br />";
$text .= "<textarea name='pagelist' cols='60' rows='10' class='tbox'>{$menu_pages}</textarea>";
$text .= "</td></tr>\n\t\t</table>\n\t\t<div class='buttons-bar center'>";
// <input class='button' type='submit' name='class_submit' value='".MENLAN_6."' />
$text .= $frm->admin_button('class_submit', MENLAN_6, 'update');
$text .= "<input type='hidden' name='menu_id' value='" . intval($_GET['vis']) . "' />\n\t\t</div>\n\t\t</fieldset>\n\t\t</form>\n\t\t</div>";
return $text;
$caption = MENLAN_7 . " " . $row['menu_name'];
$ns->tablerender($caption, $text);
}
示例10: changeTextAvatar
$text .= "<tr>\r\n\t<td class='eb_td2' colspan='3' style='text-align:center'>\r\n\t<input class='button' type='submit' name='update_activity' value='" . EB_ADMIN_L28 . "' />\r\n\t</td>\r\n\t</tr>\r\n\t</tbody>\r\n\t</table>\r\n\t</form>\r\n\t</div>";
// The usual, tell e107 what to include on the page
$ns->tablerender(EB_ADMIN_L10, $text);
}
// ========================================================
// MAIN OPTIONS MENU
// ========================================================
if (!isset($qs[0]) || isset($qs[0]) && $qs[0] == "config") {
$text = "\r\n\t<script type='text/javascript'>\r\n\t<!--//\r\n\tfunction changeTextAvatar(v)\r\n\t{\r\n\tdocument.getElementById('eb_avatar_default_image').value=v;\r\n\t}\r\n\tfunction changeteamtext(v)\r\n\t{\r\n\tdocument.getElementById('eb_avatar_default_team_image').value=v;\r\n\t}\r\n\t//-->\r\n\t</script>\r\n\t";
$text .= "<div style='text-align:center'>\r\n\t<form id='adminform' method='post' action='" . e_SELF . "?config'>\r\n\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\r\n\t<tbody>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L2 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_mod_class", $pref['eb_mod_class'], 'off', "admin, classes") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L12 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_events_create_class", $pref['eb_events_create_class'], 'off', "public, member, admin, classes") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L13 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_teams_create_class", $pref['eb_teams_create_class'], 'off', "public, member, admin, classes") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L43 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_media_submit_class", $pref['eb_media_submit_class'], 'off', "public, member, admin, classes") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L44 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_pm_notifications_class", $pref['eb_pm_notifications_class'], 'off', "public, member, admin, classes, nobody") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L45 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>" . r_userclass("eb_email_notifications_class", $pref['eb_email_notifications_class'], 'off', "public, member, admin, classes, nobody") . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L3 . ": <div class='smalltext'>" . EB_ADMIN_L4 . "</div></td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t<input class='tbox' type='text' name='eb_events_update_delay' size='8' value='" . $pref['eb_events_update_delay'] . "' maxlength='3' /> " . EB_ADMIN_L5 . "<br />\r\n\r\n\t<input class='tbox' type='checkbox' name='eb_events_update_delay_enable' value='1' " . ($pref['eb_events_update_delay_enable'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L6 . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L14 . ": </td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t<input type='radio' size='40' name='eb_tab_theme' " . ($pref['eb_tab_theme'] == 'default' ? "checked='checked'" : "") . " value='default' />Default\r\n\t<input type='radio' size='40' name='eb_tab_theme' " . ($pref['eb_tab_theme'] == 'ebattles' ? "checked='checked'" : "") . " value='ebattles' />eBattles\r\n\t<input type='radio' size='40' name='eb_tab_theme' " . ($pref['eb_tab_theme'] == 'ui-lightness' ? "checked='checked'" : "") . " value='ui-lightness' />Light\r\n\t<input type='radio' size='40' name='eb_tab_theme' " . ($pref['eb_tab_theme'] == 'ui-darkness' ? "checked='checked'" : "") . " value='ui-darkness' />Dark\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L15 . ": <div class='smalltext'>" . EB_ADMIN_L16 . "</div></td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t<input class='tbox' type='text' name='eb_max_image_size' size='8' value='" . $pref['eb_max_image_size'] . "' maxlength='3' /> px<br />\r\n\t<input class='tbox' type='checkbox' name='eb_max_image_size_check' value='1' " . ($pref['eb_max_image_size_check'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L17 . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L40 . ": <div class='smalltext'>" . EB_ADMIN_L41 . "</div></td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t<input class='tbox' type='text' name='eb_max_map_image_size' size='8' value='" . $pref['eb_max_map_image_size'] . "' maxlength='3' /> px<br />\r\n\t<input class='tbox' type='checkbox' name='eb_max_map_image_size_check' value='1' " . ($pref['eb_max_map_image_size_check'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L42 . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L19 . ": <div class='smalltext'>" . EB_ADMIN_L20 . "</div></td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t<input class='tbox' type='text' name='eb_max_avatar_size' size='8' value='" . $pref['eb_max_avatar_size'] . "' maxlength='3' /> px<br />\r\n\t<input class='tbox' type='checkbox' name='eb_avatar_enable_playersstandings' value='1' " . ($pref['eb_avatar_enable_playersstandings'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L21 . "\r\n\t<input class='tbox' type='checkbox' name='eb_avatar_enable_teamsstandings' value='1' " . ($pref['eb_avatar_enable_teamsstandings'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L33 . "\r\n\t<input class='tbox' type='checkbox' name='eb_avatar_enable_teamslist' value='1' " . ($pref['eb_avatar_enable_teamslist'] == 1 ? "checked='checked'" : "") . "/>" . EB_ADMIN_L36 . "\r\n\t</td>\r\n\t</tr>\r\n\t";
$text .= "<tr>\r\n\t<td class='forumheader3' style='width:40%'>" . EB_ADMIN_L22 . ": <div class='smalltext'>" . EB_ADMIN_L23 . "</div></td>\r\n\t<td class='forumheader3' style='width:60%'>\r\n\t";
if ($pref['eb_avatar_default_image'] != '') {
$text .= '<img ' . getAvatarResize(getImagePath($pref['eb_avatar_default_image'], 'avatars')) . '/> ';
}
$text .= "<input class='tbox' type='text' id='eb_avatar_default_image' name='eb_avatar_default_image' size='20' value='" . $pref['eb_avatar_default_image'] . "'/>";
$text .= "<div><br />";
$avatarlist = array();
$avatarlist[0] = "";
$handle = opendir(e_PLUGIN . "ebattles/images/avatars/");
while ($file = readdir($handle)) {
示例11: time
$prunetime = time() - $chatbox_prune;
$sql->delete("chatbox", "cb_datestamp < '{$prunetime}' ");
e107::getLog()->add('CHBLAN_02', $chatbox_prune . ', ' . $prunetime, E_LOG_INFORMATIVE, '');
e107::getCache()->clear("nq_chatbox");
$mes->addSuccess(LAN_AL_CHBLAN_02);
}
if (isset($_POST['recalculate'])) {
$sql->update("user", "user_chats = 0");
$qry = "SELECT u.user_id AS uid, count(c.cb_nick) AS count FROM #chatbox AS c\r\n\t\tLEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id\r\n\t\tWHERE u.user_id > 0\r\n\t\tGROUP BY uid";
if ($sql->gen($qry)) {
$ret = array();
while ($row = $sql->fetch()) {
$list[$row['uid']] = $row['count'];
}
}
foreach ($list as $uid => $cnt) {
$sql->update("user", "user_chats = '{$cnt}' WHERE user_id = '{$uid}'");
}
e107::getLog()->add('CHBLAN_03', '', E_LOG_INFORMATIVE, '');
$mes->addSuccess(CHBLAN_33);
}
if (!isset($pref['cb_mod'])) {
$pref['cb_mod'] = e_UC_ADMIN;
}
$text = "\r\n\t<form method='post' action='" . e_SELF . "' id='cbform' >\r\n <table class='table adminform'>\r\n \t<colgroup>\r\n \t\t<col class='col-label' />\r\n \t\t<col class='col-control' />\r\n \t</colgroup>\r\n\t<tr>\r\n\t\t<td>" . CHBLAN_11 . ":</td>\r\n\t\t<td>" . $frm->select('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'], 'useValues=1') . "<span class='field-help'>" . CHBLAN_12 . "</span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . CHBLAN_32 . ": </td>\r\n\t\t<td>" . r_userclass("cb_mod", $pref['cb_mod'], 'off', "nobody,main,admin, classes") . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . CHBLAN_36 . "</td>\r\n\t\t<td>" . $frm->radio('cb_layer', array(0 => CHBLAN_37, 1 => str_replace("[x]", $frm->number('cb_layer_height', $pref['cb_layer_height'], 3), CHBLAN_29), 2 => CHBLAN_38), $pref['cb_layer'], array('sep' => '<br />')) . "</td>\r\n\t</tr>\r\n\t";
if ($pref['smiley_activate']) {
$text .= "<tr>\r\n\t\t\t\t \t<td>" . CHBLAN_31 . "?: </td>\r\n\t\t\t\t\t<td>" . $frm->radio_switch('cb_emote', $pref['cb_emote']) . "</td>\r\n\t\t\t\t </tr>";
}
$text .= "\r\n\t<tr>\r\n\t\t<td>" . CHBLAN_42 . "</td>\r\n\t\t<td>" . $frm->radio_switch('cb_user_addon', $pref['cb_user_addon']) . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . LAN_PRUNE . ":</td>\r\n\t\t<td class='form-inline'>" . CHBLAN_23 . $frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true) . $frm->admin_button('prune', LAN_PRUNE, 'other') . "<span class='field-help'>" . CHBLAN_22 . "</span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>" . CHBLAN_34 . ":</td>\r\n\t\t<td>" . $frm->admin_button('recalculate', CHBLAN_35, 'other') . "</td>\r\n\t</tr>\r\n\t</table>\r\n\r\n\t<div class='buttons-bar center'>\r\n\t\t" . $frm->admin_button('updatesettings', LAN_UPDATE, 'update') . "\r\n\t</div>\r\n\t</form>";
$ns->tablerender(CHBLAN_20, $mes->render() . $text);
require_once e_ADMIN . "footer.php";
示例12: data_type_select
$ret = "<div style='padding-bottom: 4px'>" . $prompt . " " . "<select name='{$name}' class='tbox'>\n\n\t\t<option value='0' " . ($value == 0 ? " selected='selected'" : "") . ">" . ADSTAT_L50 . "</option>\n\n\t\t<option value='1' " . ($value == 1 ? " selected='selected'" : "") . ">" . ADSTAT_L49 . "</option>\n\n\t\t<option value='2' " . ($value == 2 ? " selected='selected'" : "") . ">" . ADSTAT_L48 . "</option>\n\n\t\t</select>\n</div>";
return $ret;
}
function data_type_select($name, $value)
{
global $stats_list;
$ret = "<select name='{$name}' class='tbox' onchange=\"settypebox(this.value);\">\n\n\t\t<option value='page' " . ($value == 'page' ? " selected='selected'" : "") . ">" . ADSTAT_L52 . "</option>\n";
foreach ($stats_list as $k => $v) {
$ret .= "<option value='{$k}' " . ($value == $k ? " selected='selected'" : "") . ">{$v}</option>\n";
}
$ret .= "</select>\n";
return $ret;
}
switch ($action) {
case 'config':
$text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "'>\n\t<table class='table adminform'>\n\t<colgroup>\n\t <col style='width:50%' />\n\t <col style='width:50%' />\n\t</colgroup>\n\n\t<tr>\n\t<td>" . ADSTAT_L4 . "</td>\n\t<td style='text-align: right;'>\n\t<input type='radio' name='statActivate' value='1'" . ($pref['statActivate'] ? " checked='checked'" : "") . " /> " . ADSTAT_ON . " \n\t<input type='radio' name='statActivate' value='0'" . (!$pref['statActivate'] ? " checked='checked'" : "") . " /> " . ADSTAT_OFF . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L18 . "</td>\n\t<td style='text-align: right;'>" . r_userclass("statUserclass", $pref['statUserclass'], 'off', 'public, member, admin, classes') . "</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L20 . "</td>\n\t<td style='text-align: right;'>\n\t<input type='radio' name='statCountAdmin' value='1'" . ($pref['statCountAdmin'] ? " checked='checked'" : "") . " /> " . ADSTAT_ON . " \n\t<input type='radio' name='statCountAdmin' value='0'" . (!$pref['statCountAdmin'] ? " checked='checked'" : "") . " /> " . ADSTAT_OFF . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L21 . "</td>\n\t<td style='text-align: right;'>\n\t<input class='tbox' type='text' name='statDisplayNumber' size='8' value='" . $pref['statDisplayNumber'] . "' maxlength='3' />\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L5 . "</td>\n\t<td style='text-align: right'>\n\t" . gen_select(ADSTAT_L6, 'statBrowser', $pref['statBrowser']) . gen_select(ADSTAT_L7, 'statOs', $pref['statOs']) . gen_select(ADSTAT_L8, 'statScreen', $pref['statScreen']) . gen_select(ADSTAT_L9, 'statDomain', $pref['statDomain']) . gen_select(ADSTAT_L10, 'statRefer', $pref['statRefer']) . gen_select(ADSTAT_L11, 'statQuery', $pref['statQuery']) . ADSTAT_L19 . " \n\t<input type='radio' name='statRecent' value='1'" . ($pref['statRecent'] ? " checked='checked'" : "") . " /> " . ADSTAT_ON . " \n\t<input type='radio' name='statRecent' value='0'" . (!$pref['statRecent'] ? " checked='checked'" : "") . " /> " . ADSTAT_OFF . "<br />\n\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L78 . "<br /><span class='smalltext'>" . ADSTAT_L79 . "</span></td>\n\t<td style='text-align: right;'>\n\t<input type='checkbox' name='statPrevMonth' value='1'" . (varset($pref['statPrevMonth'], 0) ? " checked='checked'" : "") . " />\n\t</td></tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L12 . "<br /><span class='smalltext'>" . ADSTAT_L13 . "</span></td>\n\t<td style='text-align: right;'>\n\t" . ADSTAT_L14 . "<input type='checkbox' name='wipe[statWipePage]' value='1' /><br />\n\t" . ADSTAT_L6 . "<input type='checkbox' name='wipe[statWipeBrowser]' value='1' /><br />\n\t" . ADSTAT_L7 . " <input type='checkbox' name='wipe[statWipeOs]' value='1' /><br />\n\t" . ADSTAT_L8 . " <input type='checkbox' name='wipe[statWipeScreen]' value='1' /><br />\n\t" . ADSTAT_L9 . "<input type='checkbox' name='wipe[statWipeDomain]' value='1' /><br />\n\t" . ADSTAT_L10 . "<input type='checkbox' name='wipe[statWipeRefer]' value='1' /><br />\n\t" . ADSTAT_L11 . "<input type='checkbox' name='wipe[statWipeQuery]' value='1' /><br />\n\t<br /><input class='button' type='submit' name='wipeSubmit' value='" . ADSTAT_L12 . "' />\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td>" . ADSTAT_L26 . "<br /><span class='smalltext'>" . ADSTAT_L27 . "</span></td>\n\t<td style='text-align: right;'><input class='button' type='submit' name='openRemPageD' value='" . ADSTAT_L28 . "' />\n\t</td>\n\t</tr>\n\t";
$text .= "\n\t</tr>\n\t</table>\n\t<div class='buttons-bar center'>\n\t" . $frm->admin_button('updatesettings', LAN_UPDATE, 'update') . "\n\t</div>\n\t</form>\n\t</div>";
$ns->tablerender(ADSTAT_L16, $text);
break;
// case config
// case config
case 'rempage':
// Remove pages
rempage();
break;
case 'export':
// Export file
// Export file
case 'datasets':
//===========================================================
// EXPORT DATA
示例13: show_pref_options
function show_pref_options()
{
global $linkspage_pref, $ns, $rs, $pref;
$text = "\n <script type=\"text/javascript\">\n <!--\n var hideid=\"optgeneral\";\n function showhideit(showid){\n if (hideid!=showid){\n show=document.getElementById(showid).style;\n hide=document.getElementById(hideid).style;\n show.display=\"\";\n hide.display=\"none\";\n\n //showh=document.getElementById(showid+'help').style;\n //hideh=document.getElementById(hideid+'help').style;\n //showh.display=\"\";\n //hideh.display=\"none\";\n\n hideid = showid;\n }\n }\n //-->\n </script>";
$TOPIC_ROW = "\n <tr>\n <td class='forumheader3' style='width:25%; white-space:nowrap; vertical-align:top;'>{TOPIC_TOPIC}</td>\n <td class='forumheader3' style='vertical-align:top;'>{TOPIC_FIELD}</td>\n </tr>";
$TOPIC_TITLE_ROW = "<tr><td colspan='2' class='fcaption'>{TOPIC_CAPTION}</td></tr>";
$TOPIC_ROW_SPACER = "<tr><td style='height:20px;' colspan='2'></td></tr>";
$TOPIC_TABLE_END = $this->pref_submit() . "</table></div>";
$text .= "\n <div style='text-align:center'>\n " . $rs->form_open("post", e_SELF . "?" . e_QUERY, "optform", "", "", "") . "\n\n <div id='optgeneral' style='text-align:center'>\n <table style='" . ADMIN_WIDTH . "' class='fborder'>";
$TOPIC_CAPTION = LCLAN_OPT_MENU_1;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
$TOPIC_TOPIC = LCLAN_OPT_7;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_page_categories", "1", $linkspage_pref['link_page_categories'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_page_categories", "0", $linkspage_pref['link_page_categories'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_8;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_submit", "1", $linkspage_pref['link_submit'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_submit", "0", $linkspage_pref['link_submit'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_9;
$TOPIC_FIELD = r_userclass("link_submit_class", $linkspage_pref['link_submit_class']);
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_48;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_submit_directpost", "1", $linkspage_pref['link_submit_directpost'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_submit_directpost", "0", $linkspage_pref['link_submit_directpost'] ? "0" : "1", "", "") . LCLAN_OPT_4 . "<br />" . LCLAN_OPT_49;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
//link_nextprev
$TOPIC_TOPIC = LCLAN_OPT_10;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_nextprev", "1", $linkspage_pref["link_nextprev"] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_nextprev", "0", $linkspage_pref["link_nextprev"] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
//link_nextprev_number
$TOPIC_TOPIC = LCLAN_OPT_11;
$TOPIC_FIELD = $rs->form_select_open("link_nextprev_number");
for ($i = 2; $i < 52; $i++) {
$TOPIC_FIELD .= $rs->form_option($i, $linkspage_pref["link_nextprev_number"] == $i ? "1" : "0", $i);
$i++;
}
$TOPIC_FIELD .= $rs->form_select_close();
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
//link_comment
$TOPIC_TOPIC = LCLAN_OPT_55;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_comment", "1", $linkspage_pref["link_comment"] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_comment", "0", $linkspage_pref["link_comment"] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_27;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_rating", "1", $linkspage_pref['link_rating'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_rating", "0", $linkspage_pref['link_rating'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_62;
$TOPIC_FIELD = "<table style='width:100%;' cellpadding='0' cellspacing='0'><tr><td style='white-space:nowrap; width:20%;'>\n " . $rs->form_checkbox("link_navigator_frontpage", 1, $linkspage_pref['link_navigator_frontpage'] ? "1" : "0") . " " . LCLAN_OPT_60 . "<br />\n " . $rs->form_checkbox("link_navigator_submit", 1, $linkspage_pref['link_navigator_submit'] ? "1" : "0") . " " . LCLAN_OPT_58 . "<br />\n " . $rs->form_checkbox("link_navigator_manager", 1, $linkspage_pref['link_navigator_manager'] ? "1" : "0") . " " . LCLAN_OPT_59 . "<br />\n " . $rs->form_checkbox("link_navigator_refer", 1, $linkspage_pref['link_navigator_refer'] ? "1" : "0") . " " . LCLAN_OPT_20 . "<br />\n </td><td style='white-space:nowrap;'>\n " . $rs->form_checkbox("link_navigator_rated", 1, $linkspage_pref['link_navigator_rated'] ? "1" : "0") . " " . LCLAN_OPT_21 . "<br />\n " . $rs->form_checkbox("link_navigator_allcat", 1, $linkspage_pref['link_navigator_allcat'] ? "1" : "0") . " " . LCLAN_OPT_66 . "<br />\n " . $rs->form_checkbox("link_navigator_links", 1, $linkspage_pref['link_navigator_links'] ? "1" : "0") . " " . LCLAN_OPT_67 . "<br />\n " . $rs->form_checkbox("link_navigator_category", 1, $linkspage_pref['link_navigator_category'] ? "1" : "0") . " " . LCLAN_OPT_61 . "<br />\n </td></tr></table>";
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$text .= $TOPIC_TABLE_END;
$text .= "\n <div id='optmanager' style='display:none; text-align:center'>\n <table style='" . ADMIN_WIDTH . "' class='fborder'>";
$TOPIC_CAPTION = LCLAN_OPT_MENU_2;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
$TOPIC_TOPIC = LCLAN_OPT_54;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_manager", "1", $linkspage_pref['link_manager'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_manager", "0", $linkspage_pref['link_manager'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_46;
$TOPIC_FIELD = r_userclass("link_manager_class", $linkspage_pref['link_manager_class']) . "<br />" . LCLAN_OPT_47;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_48;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_directpost", "1", $linkspage_pref['link_directpost'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_directpost", "0", $linkspage_pref['link_directpost'] ? "0" : "1", "", "") . LCLAN_OPT_4 . "<br />" . LCLAN_OPT_49;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_50;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_directdelete", "1", $linkspage_pref['link_directdelete'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_directdelete", "0", $linkspage_pref['link_directdelete'] ? "0" : "1", "", "") . LCLAN_OPT_4 . "<br />" . LCLAN_OPT_51;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$text .= $TOPIC_TABLE_END;
$text .= "\n <div id='optcategory' style='display:none; text-align:center'>\n <table style='" . ADMIN_WIDTH . "' class='fborder'>";
$TOPIC_CAPTION = LCLAN_OPT_MENU_3;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
$TOPIC_TOPIC = LCLAN_OPT_13;
$TOPIC_FIELD = "<table style='width:100%;' cellpadding='0' cellspacing='0'><tr><td style='white-space:nowrap; width:20%;'>\n " . $rs->form_checkbox("link_cat_icon", 1, $linkspage_pref['link_cat_icon'] ? "1" : "0") . " " . LCLAN_OPT_14 . "<br />\n " . $rs->form_checkbox("link_cat_desc", 1, $linkspage_pref['link_cat_desc'] ? "1" : "0") . " " . LCLAN_OPT_15 . "<br />\n </td><td style='white-space:nowrap;'>\n " . $rs->form_checkbox("link_cat_amount", 1, $linkspage_pref['link_cat_amount'] ? "1" : "0") . " " . LCLAN_OPT_16 . "<br />\n " . $rs->form_checkbox("link_cat_total", 1, $linkspage_pref['link_cat_total'] ? "1" : "0") . " " . LCLAN_OPT_19 . "<br />\n </td></tr></table>";
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_65;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_cat_empty", "1", $linkspage_pref['link_cat_empty'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_cat_empty", "0", $linkspage_pref['link_cat_empty'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_22;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_cat_icon_empty", "1", $linkspage_pref['link_cat_icon_empty'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_cat_icon_empty", "0", $linkspage_pref['link_cat_icon_empty'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_29;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_cat_sortorder", "1", $linkspage_pref['link_cat_sortorder'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_cat_sortorder", "0", $linkspage_pref['link_cat_sortorder'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_23;
$TOPIC_FIELD = "\n " . $rs->form_select_open("link_cat_sort") . "\n " . $rs->form_option(LCLAN_OPT_40, $linkspage_pref['link_cat_sort'] == "heading" ? "1" : "0", "heading", "") . "\n " . $rs->form_option(LCLAN_OPT_41, $linkspage_pref['link_cat_sort'] == "id" ? "1" : "0", "id", "") . "\n " . $rs->form_option(LCLAN_OPT_36, $linkspage_pref['link_cat_sort'] == "order" ? "1" : "0", "order", "") . "\n " . $rs->form_select_close();
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_24;
$TOPIC_FIELD = "\n " . $rs->form_select_open("link_cat_order") . "\n " . $rs->form_option(LCLAN_OPT_30, $linkspage_pref['link_cat_order'] == "ASC" ? "1" : "0", "ASC", "") . "\n " . $rs->form_option(LCLAN_OPT_31, $linkspage_pref['link_cat_order'] == "DESC" ? "1" : "0", "DESC", "") . "\n " . $rs->form_select_close();
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_25;
$TOPIC_FIELD = $rs->form_text("link_cat_resize_value", "3", $linkspage_pref['link_cat_resize_value'], "3", "tbox", "", "", "") . " " . LCLAN_OPT_5;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$text .= $TOPIC_TABLE_END;
$text .= "\n <div id='optlinks' style='display:none; text-align:center'>\n <table style='" . ADMIN_WIDTH . "' class='fborder'>";
$TOPIC_CAPTION = LCLAN_OPT_MENU_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
$TOPIC_TOPIC = LCLAN_OPT_13;
$TOPIC_FIELD = "<table style='width:100%;' cellpadding='0' cellspacing='0'><tr><td style='white-space:nowrap; width:20%;'>\n " . $rs->form_checkbox("link_icon", 1, $linkspage_pref['link_icon'] ? "1" : "0") . " " . LCLAN_OPT_14 . "<br />\n " . $rs->form_checkbox("link_referal", 1, $linkspage_pref['link_referal'] ? "1" : "0") . " " . LCLAN_OPT_17 . "<br />\n </td><td style='white-space:nowrap;'>\n " . $rs->form_checkbox("link_url", 1, $linkspage_pref['link_url'] ? "1" : "0") . " " . LCLAN_OPT_18 . "<br />\n " . $rs->form_checkbox("link_desc", 1, $linkspage_pref['link_desc'] ? "1" : "0") . " " . LCLAN_OPT_15 . "<br />\n </td></tr></table>";
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_28;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_icon_empty", "1", $linkspage_pref['link_icon_empty'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_icon_empty", "0", $linkspage_pref['link_icon_empty'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
$TOPIC_TOPIC = LCLAN_OPT_29;
$TOPIC_FIELD = "\n " . $rs->form_radio("link_sortorder", "1", $linkspage_pref['link_sortorder'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n " . $rs->form_radio("link_sortorder", "0", $linkspage_pref['link_sortorder'] ? "0" : "1", "", "") . LCLAN_OPT_4;
$text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
//.........这里部分代码省略.........
示例14: db
// Create a new category
$text .= "\n\t<form id='cat_new' method='post' action='" . e_SELF . "'>\n\t\t<div style='text-align:center;'>\n\t\t\t<div style='width:80%'>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t" . EASYSHOP_CAT_03 . "\n\t\t\t\t\t</legend>\n\t\t\t\t\t<table border='0' cellspacing='15' width='100%'>";
// Only display Main Category selection if there are active Main Categories
if ($sql->db_Count(DB_TABLE_SHOP_MAIN_CATEGORIES, "(*)", "WHERE main_category_active_status = '2'") > 0) {
$text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_22 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<select class='tbox' name='category_main_id'>";
$sql2 = new db();
$sql2->db_Select(DB_TABLE_SHOP_MAIN_CATEGORIES, "*", "WHERE main_category_active_status = '2' ORDER BY main_category_order", false);
// Select only active main categories
$text .= "<option value='' selected='selected'></option>";
// Add a blank option too
while ($row2 = $sql2->db_Fetch()) {
if ($row2['main_category_id'] == $category_main_id) {
$text .= "\n\t\t <option value='" . $row2['main_category_id'] . "' selected='selected'>" . $row2['main_category_name'] . "</option>";
} else {
$text .= "\n\t\t <option value='" . $row2['main_category_id'] . "'>" . $row2['main_category_name'] . "</option>";
}
}
$text .= "\n\t\t </select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
}
$text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_04 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class='tbox' size='25' type='text' name='category_name' />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_05 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='category_description' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea><br />" . display_help('helpb') . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_06 . "</b>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_07 . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n <input type='text' class='tbox' id='category_image' name='category_image' value='" . $category_image . "' /> " . EASYSHOP_CAT_08 . "<br />";
// Show icons with width 16 of the array of images and put name in variable $category_image
foreach ($image_array as $icon) {
$text .= "<a href=\"javascript:insertext('" . $icon['fname'] . "','category_image','catimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> ";
}
$text .= "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_15 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type='checkbox' name='category_active_status' value='1' />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_23 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t" . r_userclass("category_class", $category_class, "off", "public,guest,member,nobody,main,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_25 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t" . r_userclass("category_order_class", $category_order_class, "off", "public,guest,member,nobody,main,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t<br />\n\t\t\t\t\t<div style='text-align:center;'>\n\t\t\t\t\t\t<input type='hidden' name='create_category' value='1' />\n\t\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_CAT_09 . "' />\n\t\t\t\t\t</div>\n\t\t\t\t\t<br />\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\t\t</div>\n\t</form>";
// Render the value of $text in a table.
$title = EASYSHOP_CAT_00;
$ns->tablerender($title, $text);
}
// END MAIN ADMIN CATEGORIES
require_once e_ADMIN . 'footer.php';
示例15: sc_tag_opt_class
function sc_tag_opt_class()
{
global $tag;
$id = 'tagwords_class';
return r_userclass($id, $tag->pref[$id], "", "admin,public,guest,nobody,member,classes");
}