예제 #1
0
 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
0
파일: faqs.php 프로젝트: armpit/e107
 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
0
파일: image.php 프로젝트: e107Bulgaria/e107
 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
0
    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
0
 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
0
    $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
0
    $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' />") . "&nbsp;&nbsp;" . 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' />") . "&nbsp;&nbsp;" . CHBLAN_29 . "&nbsp;--&nbsp;" . 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' />") . "&nbsp;&nbsp;" . 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
0
파일: prefs.php 프로젝트: 8moustapha8/e107
$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
0
 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 . "&amp;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
0
    $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')) . '/>&nbsp;';
    }
    $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
0
    $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
0
    $ret = "<div style='padding-bottom: 4px'>" . $prompt . "&nbsp;&nbsp;" . "<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 . "&nbsp;&nbsp;\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 . "&nbsp;&nbsp;\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 . "&nbsp;&nbsp;\n\t<input type='radio' name='statRecent' value='1'" . ($pref['statRecent'] ? " checked='checked'" : "") . " /> " . ADSTAT_ON . "&nbsp;&nbsp;\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
0
파일: link_class.php 프로젝트: notzen/e107
 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);
     $TOPIC_TOPIC = LCLAN_OPT_23;
     $TOPIC_FIELD = "\n        " . $rs->form_select_open("link_sort") . "\n        " . $rs->form_option(LCLAN_OPT_34, $linkspage_pref['link_sort'] == "heading" ? "1" : "0", "heading", "") . "\n        " . $rs->form_option(LCLAN_OPT_35, $linkspage_pref['link_sort'] == "url" ? "1" : "0", "url", "") . "\n        " . $rs->form_option(LCLAN_OPT_36, $linkspage_pref['link_sort'] == "order" ? "1" : "0", "order", "") . "\n        " . $rs->form_option(LCLAN_OPT_37, $linkspage_pref['link_sort'] == "refer" ? "1" : "0", "refer", "") . "\n        " . $rs->form_option(LCLAN_OPT_53, $linkspage_pref['link_sort'] == "date" ? "1" : "0", "date", "") . "\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_order") . "\n        " . $rs->form_option(LCLAN_OPT_30, $linkspage_pref['link_order'] == "ASC" ? "1" : "0", "ASC", "") . "\n        " . $rs->form_option(LCLAN_OPT_31, $linkspage_pref['link_order'] == "DESC" ? "1" : "0", "DESC", "") . "\n        " . $rs->form_select_close();
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     //0=same window, 1=_blank, 2=_parent, 3=_top, 4=miniwindow
     $TOPIC_TOPIC = LCLAN_OPT_32;
     $TOPIC_FIELD = "\n        " . $rs->form_select_open("link_open_all") . "\n        " . $rs->form_option(LCLAN_OPT_42, $linkspage_pref['link_open_all'] == "5" ? "1" : "0", "5", "") . "\n        " . $rs->form_option(LCLAN_OPT_43, $linkspage_pref['link_open_all'] == "0" ? "1" : "0", "0", "") . "\n        " . $rs->form_option(LCLAN_OPT_44, $linkspage_pref['link_open_all'] == "1" ? "1" : "0", "1", "") . "\n        " . $rs->form_option(LCLAN_OPT_45, $linkspage_pref['link_open_all'] == "4" ? "1" : "0", "4", "") . "\n        " . $rs->form_select_close();
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_33;
     $TOPIC_FIELD = $rs->form_text("link_resize_value", "3", $linkspage_pref['link_resize_value'], "3", "tbox", "", "", "") . " " . LCLAN_OPT_5;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $text .= $TOPIC_TABLE_END;
     $text .= "\n        <div id='optrefer' style='display:none; text-align:center'>\n        <table style='" . ADMIN_WIDTH . "' class='fborder'>";
     $TOPIC_CAPTION = LCLAN_OPT_MENU_5;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_56;
     $TOPIC_FIELD = $rs->form_text("link_refer_minimum", "3", $linkspage_pref['link_refer_minimum'], "3", "tbox", "", "", "") . " " . LCLAN_OPT_57;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $text .= $TOPIC_TABLE_END;
     $text .= "\n        <div id='optrating' style='display:none; text-align:center'>\n        <table style='" . ADMIN_WIDTH . "' class='fborder'>";
     $TOPIC_CAPTION = LCLAN_OPT_MENU_6;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_63;
     $TOPIC_FIELD = "";
     $TOPIC_FIELD = $rs->form_text("link_rating_minimum", "3", $linkspage_pref['link_rating_minimum'], "3", "tbox", "", "", "") . " " . LCLAN_OPT_64;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $text .= $TOPIC_TABLE_END;
     $text .= "\n        <div id='optmenu' style='display:none; text-align:center'>\n        <table style='" . ADMIN_WIDTH . "' class='fborder'>";
     $TOPIC_CAPTION = LCLAN_OPT_MENU_7;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_TITLE_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_85;
     $TOPIC_FIELD = $rs->form_text("link_menu_caption", "15", $linkspage_pref['link_menu_caption'], "100", "tbox", "", "", "");
     $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_menu_navigator_frontpage", 1, $linkspage_pref['link_menu_navigator_frontpage'] ? "1" : "0") . " " . LCLAN_OPT_60 . "<br />\n        " . $rs->form_checkbox("link_menu_navigator_submit", 1, $linkspage_pref['link_menu_navigator_submit'] ? "1" : "0") . " " . LCLAN_OPT_58 . "<br />\n        " . $rs->form_checkbox("link_menu_navigator_manager", 1, $linkspage_pref['link_menu_navigator_manager'] ? "1" : "0") . " " . LCLAN_OPT_59 . "<br />\n        " . $rs->form_checkbox("link_menu_navigator_refer", 1, $linkspage_pref['link_menu_navigator_refer'] ? "1" : "0") . " " . LCLAN_OPT_20 . "<br />\n        </td><td style='white-space:nowrap;'>\n        " . $rs->form_checkbox("link_menu_navigator_rated", 1, $linkspage_pref['link_menu_navigator_rated'] ? "1" : "0") . " " . LCLAN_OPT_21 . "<br />\n        " . $rs->form_checkbox("link_menu_navigator_links", 1, $linkspage_pref['link_menu_navigator_links'] ? "1" : "0") . " " . LCLAN_OPT_67 . "<br />\n        " . $rs->form_checkbox("link_menu_navigator_category", 1, $linkspage_pref['link_menu_navigator_category'] ? "1" : "0") . " " . LCLAN_OPT_61 . "<br />\n        </td></tr></table>";
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_79;
     $TOPIC_FIELD = $rs->form_text("link_menu_navigator_caption", "15", $linkspage_pref['link_menu_navigator_caption'], "100", "tbox", "", "", "");
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_69;
     $TOPIC_FIELD = "\n        " . $rs->form_radio("link_menu_navigator_rendertype", "1", $linkspage_pref['link_menu_navigator_rendertype'] ? "1" : "0", "", "") . LCLAN_OPT_76 . "\n        " . $rs->form_radio("link_menu_navigator_rendertype", "0", $linkspage_pref['link_menu_navigator_rendertype'] ? "0" : "1", "", "") . LCLAN_OPT_75;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_70;
     $TOPIC_FIELD = "\n        " . $rs->form_radio("link_menu_category", "1", $linkspage_pref['link_menu_category'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n        " . $rs->form_radio("link_menu_category", "0", $linkspage_pref['link_menu_category'] ? "0" : "1", "", "") . LCLAN_OPT_4;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_80;
     $TOPIC_FIELD = $rs->form_text("link_menu_category_caption", "15", $linkspage_pref['link_menu_category_caption'], "100", "tbox", "", "", "");
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_87;
     $TOPIC_FIELD = "\n        " . $rs->form_radio("link_menu_category_amount", "1", $linkspage_pref['link_menu_category_amount'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n        " . $rs->form_radio("link_menu_category_amount", "0", $linkspage_pref['link_menu_category_amount'] ? "0" : "1", "", "") . LCLAN_OPT_4;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_71;
     $TOPIC_FIELD = "\n        " . $rs->form_radio("link_menu_category_rendertype", "1", $linkspage_pref['link_menu_category_rendertype'] ? "1" : "0", "", "") . LCLAN_OPT_76 . "\n        " . $rs->form_radio("link_menu_category_rendertype", "0", $linkspage_pref['link_menu_category_rendertype'] ? "0" : "1", "", "") . LCLAN_OPT_75;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_72;
     $TOPIC_FIELD = "\n        " . $rs->form_radio("link_menu_recent", "1", $linkspage_pref['link_menu_recent'] ? "1" : "0", "", "") . LCLAN_OPT_3 . "\n        " . $rs->form_radio("link_menu_recent", "0", $linkspage_pref['link_menu_recent'] ? "0" : "1", "", "") . LCLAN_OPT_4;
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_73;
     $TOPIC_FIELD = "<table style='width:100%;' cellpadding='0' cellspacing='0'><tr><td style='white-space:nowrap; width:20%;'>\n        " . $rs->form_checkbox("link_menu_recent_category", 1, $linkspage_pref['link_menu_recent_category'] ? "1" : "0") . " " . LCLAN_OPT_77 . "<br />\n        " . $rs->form_checkbox("link_menu_recent_description", 1, $linkspage_pref['link_menu_recent_description'] ? "1" : "0") . " " . LCLAN_OPT_78 . "<br />\n        </td></tr></table>";
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_81;
     $TOPIC_FIELD = $rs->form_text("link_menu_recent_caption", "15", $linkspage_pref['link_menu_recent_caption'], "100", "tbox", "", "", "");
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $TOPIC_TOPIC = LCLAN_OPT_74;
     $TOPIC_FIELD = $rs->form_select_open("link_menu_recent_number");
     for ($i = 1; $i < 15; $i++) {
         $TOPIC_FIELD .= $rs->form_option($i, $linkspage_pref["link_menu_recent_number"] == $i ? "1" : "0", $i);
     }
     $TOPIC_FIELD .= $rs->form_select_close();
     $text .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $TOPIC_ROW);
     $text .= $TOPIC_TABLE_END;
     $text .= "\n        " . $rs->form_close() . "\n        </div>";
     $ns->tablerender(LCLAN_OPT_2, $text);
 }
예제 #14
0
    // 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
0
 function sc_tag_opt_class()
 {
     global $tag;
     $id = 'tagwords_class';
     return r_userclass($id, $tag->pref[$id], "", "admin,public,guest,nobody,member,classes");
 }
예제 #16
0
파일: search.php 프로젝트: gitye/e107
        $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>" . $search_info[0]['qtype'] . "</td>\n\t\t\t\t\t\t\t<td class='center'>" . r_userclass("plug_handlers[" . $plug_dir . "][class]", $search_prefs['plug_handlers'][$plug_dir]['class'], "off", "public,guest,nobody,member,admin,classes") . "</td>\n\t\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t<select name='plug_handlers[" . $plug_dir . "][order]' class='tbox order'>\n\t\t";
        for ($a = 1; $a <= $handlers_total; $a++) {
            $text .= vartrue($search_prefs['plug_handlers'][$plug_dir]['order']) == $a ? "<option value='" . $a . "' selected='selected'>" . $a . "</option>" : "<option value='" . $a . "'>" . $a . "</option>";
        }
        $text .= "\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t<a class='btn btn-large' href='" . e_SELF . "?edit.p." . $plug_dir . "'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t";
        unset($search_info);
    }
    //$sel = (isset($search_prefs['google']) && $search_prefs['google']) ? " checked='checked'" : "";
    $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Google</td>\n\t\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t" . r_userclass("google", $search_prefs['google'], "off", "public,guest,nobody,member,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</fieldset>\n\n\t";
    $text .= "\n\n\t\t\t<fieldset id='core-search-configuration-comm'>\n\t\t\t\t<legend class='e-hideme'>" . SEALAN_1 . "</legend>\n\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col style='width:55%' />\n\t\t\t\t\t\t<col style='width:45%' />\n\t\t\t\t\t</colgroup>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>" . SEALAN_18 . "</th>\n\t\t\t\t\t\t\t<th class='last'>" . SEALAN_25 . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t";
    foreach ($search_prefs['comments_handlers'] as $key => $value) {
        $path = $value['dir'] == 'core' ? e_HANDLER . 'search/comments_' . $key . '.php' : e_PLUGIN . $value['dir'] . '/search/search_comments.php';
        if (is_readable($path)) {
            require_once $path;
        }
        $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>" . vartrue($comments_title) . "</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . r_userclass("comments_handlers[" . $key . "][class]", $search_prefs['comments_handlers'][$key]['class'], "off", "public,guest,nobody,member,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t";
        unset($comments_title);
    }
    $text .= "\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div class='buttons-bar center'>\n\t\t\t" . $frm->admin_button('update_main', 'no-value', 'update', LAN_UPDATE) . "\n\t\t\t</div>\n\t\t</fieldset>\n\t\t</form>\n\t";
    $ns->tablerender(SEALAN_1, $mes->render() . $text);
}
require_once "footer.php";
function search_adminmenu()
{
    $query = e_QUERY;
    $action = vartrue($query, 'main');
    $var['main']['text'] = SEALAN_41;
    $var['main']['link'] = e_SELF;
    $var['settings']['text'] = LAN_PREFS;
    $var['settings']['link'] = e_SELF . "?settings";
    e107::getNav()->admin(SEALAN_40, $action, $var);
예제 #17
0
파일: admin.php 프로젝트: armpit/e107
 function show_download_options()
 {
     global $pref, $ns;
     require_once e_HANDLER . "form_handler.php";
     $frm = new e_form(true);
     //enable inner tabindex counter
     $agree_flag = $pref['agree_flag'];
     $agree_text = $pref['agree_text'];
     $c = $pref['download_php'] ? " checked = 'checked' " : "";
     $sacc = varset($pref['download_incinfo'], 0) == '1' ? " checked = 'checked' " : "";
     $order_options = array("download_id" => "Id No.", "download_datestamp" => LAN_DATE, "download_requested" => LAN_PLUGIN_DOWNLOAD_NAME, "download_name" => DOWLAN_59, "download_author" => DOWLAN_15);
     $sort_options = array("ASC" => DOWLAN_62, "DESC" => DOWLAN_63);
     $text = "\n\t\t\t\t   \n\t\t\t\t\t   <ul class='nav nav-tabs'>\n\t\t\t\t\t\t   <li class='active'><a data-toggle='tab' href='#core-download-download1'>" . LAN_DL_DOWNLOAD_OPT_GENERAL . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download2'>" . LAN_DL_DOWNLOAD_OPT_BROKEN . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download3'>" . LAN_DL_DOWNLOAD_OPT_AGREE . "</a></li>\n\t\t\t\t\t\t   <li><a data-toggle='tab' href='#core-download-download4'>" . LAN_DL_UPLOAD . "</a></li>\n\t\t\t\t\t   </ul>\n\t\t\t\t\t\t\n\t\t        \t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\n\t\t        \t\t<div class='tab-content'>\n\t\t   \t\t\t\t<div class='tab-pane active' id='core-download-download1'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_USE_PHP . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_php', '1', $pref['download_php']) . $frm->label(LAN_DL_USE_PHP_INFO, 'download_php', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_SUBSUB_CAT . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_subsub', '1', $pref['download_subsub']) . $frm->label(LAN_DL_SUBSUB_CAT_INFO, 'download_subsub', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_DL_SUBSUB_COUNT . "</td>\n\t\t            \t\t         <td>" . $frm->checkbox('download_incinfo', '1', $pref['download_incinfo']) . $frm->label(LAN_DL_SUBSUB_COUNT_INFO, 'download_incinfo', '1') . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_55 . "</td>\n\t\t            \t\t         <td>" . $frm->text('download_view', $pref['download_view'], '4', array('size' => '4')) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_56 . "</td>\n\t\t            \t\t         <td>" . $frm->select('download_order', $order_options, $pref['download_order']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . LAN_ORDER . "</td>\n\t\t             \t\t         <td>" . $frm->select('download_sort', $sort_options, $pref['download_sort']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_160 . "</td>\n\t\t               \t\t      <td>\n\t\t                  \t\t      <select name='mirror_order' class='tbox'>" . ($pref['mirror_order'] == "0" ? "<option value='0' selected='selected'>" . DOWLAN_161 . "</option>" : "<option value='0'>" . DOWLAN_161 . "</option>") . ($pref['mirror_order'] == "1" ? "<option value='1' selected='selected'>" . LAN_ID . "</option>" : "<option value='1'>" . LAN_ID . "</option>") . ($pref['mirror_order'] == "2" ? "<option value='2' selected='selected'>" . DOWLAN_163 . "</option>" : "<option value='2'>" . DOWLAN_12 . "</option>") . "\n\t\t            \t\t            </select>\n\t\t               \t\t      </td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_164 . "</td>\n\t\t            \t\t         <td><input type='text' name='recent_download_days' class='tbox' value='" . $pref['recent_download_days'] . "' size='3' maxlength='3'/>\n\t\t            \t\t         </td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download2'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_151 . "</td>\n\t\t               \t\t      <td>" . r_userclass("download_reportbroken", $pref['download_reportbroken']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_150 . "</td>\n\t\t               \t\t      <td>" . ($pref['download_email'] ? "<input type='checkbox' name='download_email' value='1' checked='checked'/>" : "<input type='checkbox' name='download_email' value='1'/>") . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download3'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t               \t\t      <td>" . DOWLAN_100 . "</td>\n\t\t               \t\t      <td>" . ($agree_flag ? "<input type='checkbox' name='agree_flag' value='1' checked='checked'/>" : "<input type='checkbox' name='agree_flag' value='1'/>") . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_101 . "</td>\n\t\t               \t   \t   <td>" . $frm->bbarea('agree_text', $agree_text) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_146 . "</td>\n\t\t            \t\t         <td>" . $frm->bbarea('download_denied', $pref['download_denied']) . "</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t   \t\t\t\t<div class='tab-pane' id='core-download-download4'>\n\t\t            \t   <div>\n\t\t            \t\t   <table class='table adminform'>\n\t\t            \t\t      <colgroup>\n\t\t            \t\t         <col style='width:30%'/>\n\t\t            \t\t         <col style='width:70%'/>\n\t\t            \t\t      </colgroup>\n\t\t            \t\t      <tr>\n\t\t            \t\t         <td>" . DOWLAN_XXX . "</td>\n\t\t            \t\t         <td>//TODO</td>\n\t\t            \t\t      </tr>\n\t\t            \t\t   </table>\n\t\t            \t\t</div>\n\t\t\t\t   \t\t</div>\n\t\t\t\t\t\t   <div class='buttons-bar center'>\n\t\t                  <input class='btn btn-default button' type='submit' name='updatedownlaodoptions' value='" . DOWLAN_64 . "'/>\n\t\t               </div>\n\t\t              \n\t\t           </div>\n\t\t           </form>\n\t\t      ";
     // $ns->tablerender(LAN_DL_OPTIONS, $text);
     echo $text;
 }
예제 #18
0
 function doForm($editArray = FALSE)
 {
     $frm = e107::getForm();
     $sql = e107::getDb();
     $ns = e107::getRender();
     $mes = e107::getMessage();
     $count = $sql->db_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\n\t\t<tr>\n\t\t<td style='width:25%'>" . GSLAN_25 . "\n\t\t<span class='smalltext'>&nbsp;</span></td>\n\t\t<td>\n\t\t<input class='tbox' type='text' style='width:90%' name='gsitemap_name' size='40' value='" . $editArray['gsitemap_name'] . "' maxlength='100' />\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td style='width:25%'>" . GSLAN_26 . "\n\t\t<span class='smalltext'>&nbsp;</span></td>\n\t\t<td>\n\t\t<input class='tbox' type='text' style='width:90%' name='gsitemap_url' size='40' value='" . $editArray['gsitemap_url'] . "' maxlength='100' />\n\t\t<input class='tbox' type='hidden'  name='gsitemap_lastmod' size='40' value='" . time() . "' maxlength='100' />\n\t\t</td>\n\t\t</tr>\n\n\n\t\t<tr>\n\t\t<td style='width:25%'>" . GSLAN_10 . "\n\t\t<span class='smalltext'>&nbsp;</span></td>\n\t\t<td>\n\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</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td>" . GSLAN_9 . "<br />\n\t\t<span class='smalltext'>&nbsp;</span></td>\n\t\t<td>\n\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\n\n\t\t<tr>\n\t\t<td>" . GSLAN_30 . "</td>\n\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 .= "\n\t\t</select>\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td>" . GSLAN_31 . "</td>\n\t\t<td>";
     $text .= r_userclass("gsitemap_active", $editArray['gsitemap_active'], 'off', "nobody,public,guest,member,admin,classes,language");
     $text .= "\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\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 .= "<input class='button' type='submit' name='add_link' value='".LAN_CREATE."' />";
     }
     $text .= "</div>\n\t\t</form>\n\t\t";
     $ns->tablerender(GSLAN_29, $mes->render() . $text);
 }
예제 #19
0
            }
            $text .= '
		</select></div></td>
		<td>' . ebImageTextButton('eventaddplayer', 'user_add.png', EB_EVENTM_L45) . '</td>
		</tr>
		</table>
		</td>
		</tr>';
            if ($event->getField('Type') == "One Player Ladder") {
                $text .= '
			<tr>
			<td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L159 . '</td>
			<td class="eb_td">
			<table class="table_left">
			<tr>
			<td>' . r_userclass("eventadduserclass", $eventadduserclass, 'off', "member, classes") . '</td>
			<td>' . ebImageTextButton('eventadduserclass_submit', 'user_add.png', EB_EVENTM_L160) . '</td>
			</tr>
			</table>
			</td>
			</tr>';
            }
            $text .= '
		<tr>
		<td class="eb_td eb_tdc1 eb_w40"></td>
		<td class="eb_td">
		<div><input class="tbox" type="checkbox" name="eventaddplayernotify"/>' . EB_EVENTM_L46 . '</div>
		</td>
		</tr>
		</tbody>
		</table>
예제 #20
0
function product_table($category_id, $item_id, $item_name, $item_description, $item_price, $sku_number, $shipping_first_item, $shipping_additional_item, $handling_override, $item_image, $item_active_status, $item_order, $prod_prop_1_id, $prod_prop_2_id, $prod_prop_3_id, $prod_prop_4_id, $prod_prop_5_id, $prod_discount_id, $image_array, $icon_width, $item_instock, $item_track_stock, $enable_ipn, $download_product, $download_filename, $store_image_path, $prod_promo_class, $item_minimum, $download_datasheet, $download_datasheet_filename, $item_quotation)
{
    $text .= "\n\t<table border='0' cellspacing='15' width='100%'>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_05 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<select class='tbox' name='category_id'>";
    $sql2 = new db();
    $sql2->db_Select(DB_TABLE_SHOP_ITEM_CATEGORIES, "*", "WHERE category_active_status = '2' ORDER BY category_order", false);
    // Select only active categories
    while ($row2 = $sql2->db_Fetch()) {
        if ($row2['category_id'] == $category_id) {
            $text .= "\n                    <option value='" . $row2['category_id'] . "' selected='selected'>" . $row2['category_name'] . "</option>";
        } else {
            $text .= "\n                    <option value='" . $row2['category_id'] . "'>" . $row2['category_name'] . "</option>";
        }
    }
    $text .= "\n        </select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_06 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='25' type='text' name='item_name' value='" . $item_name . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_07 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='item_description' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>" . $item_description . "</textarea><br />" . display_help('helpa') . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_08 . ": <img src='" . e_IMAGE . "admin_images/docs_16.png' title='" . EASYSHOP_CONF_ITM_09 . "' alt='" . EASYSHOP_CONF_ITM_09 . "' /></b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='25' type='text' name='sku_number' value='" . $sku_number . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_10 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='7' type='text' name='item_price' value='" . $item_price . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_11 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='shipping_first_item' value='" . $shipping_first_item . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_12 . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_13 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='shipping_additional_item' value='" . $shipping_additional_item . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_12 . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_14 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='handling_override' value='" . $handling_override . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>";
    // Show all available images
    $item_image = explode(",", $item_image);
    $arrayLength = count($item_image);
    $j = 1;
    for ($i = 0; $i < $arrayLength; $i++) {
        $text .= "\n  \t\t\t<td valign='top'>\n  \t\t\t\t<b>" . EASYSHOP_CONF_ITM_15 . " " . $j . ":</b>\n  \t\t\t</td>\n  \t\t\t<td valign='top'>\n\t\t\t\t<input type='text' size='25' class='tbox' id='item_image" . $i . "' name='item_image[]' value='" . $item_image[$i] . "' /> " . EASYSHOP_CONF_ITM_16 . "<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'] . "','item_image" . $i . "','itmimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> ";
        }
        $text .= "</td></tr>";
        $j++;
    }
    // Add a blank input image field on top of the current list
    $j = $arrayLength + 1;
    $text .= "\n      \t\t<td valign='top'>\n  \t\t\t\t<b>" . EASYSHOP_CONF_ITM_15 . " " . $j . ":</b>\n  \t\t\t</td>\n  \t\t\t<td valign='top'>\n\t\t\t\t<input type='text' size='25' class='tbox' id='item_image" . $j . "' name='item_image[]' value='" . $item_image[$j] . "' /> " . EASYSHOP_CONF_ITM_16 . "<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'] . "','item_image" . $j . "','itmimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> ";
    }
    $text .= "</td></tr>";
    // Show upload button
    $imgdirname = e_PLUGIN . "easyshop/" . $store_image_path;
    $text .= "<tr><td></td><td><br /><input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_43 . "\" onclick=\"expandit(this)\" />\n  \t\t\t<div style=\"display:none;\">\n  \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n  \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_38 . "\" />\n  \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $imgdirname . "\" />\n  \t\t\t</div></td></tr>";
    $text .= "\n\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_17 . "\n\t\t\t\t</td>\n\t\t\t</tr>\n    <tr>\n      <td>\n        <b>" . EASYSHOP_CONF_ITM_18 . "</b>\n      </td>\n      <td>";
    // Display the check box for active status (active = 2)
    if ($item_active_status == 2) {
        $text .= "<input type='checkbox' name='item_active_status' value='2' checked='checked' />";
    } else {
        $text .= "<input type='checkbox' name='item_active_status' value='1' />";
    }
    $text .= "\n      </td>\n    </tr>";
    for ($n = 1; $n < 6; $n++) {
        $fpropname = "prod_prop_" . $n . "_id";
        $text .= "\n    <tr>\n      <td>\n        <b>" . EASYSHOP_CONF_ITM_28 . " " . $n . "</b>\n      </td>\n      <td>\n\t\t<select class='tbox' name='{$fpropname}'>\n        <option value='' selected='selected'></option>";
        $sql3 = new db();
        $sql3->db_Select(DB_TABLE_SHOP_PROPERTIES, "*", " ORDER BY prop_display_name", false);
        // Select all properties
        while ($row3 = $sql3->db_Fetch()) {
            //$positioner = ${"prod_prop_".$n."_id"};
            // Show display_name and first 10 characters of the string; so it is no problem to select from same name e.g. 'Color' with different property list
            if ($row3['property_id'] == ${"prod_prop_" . $n . "_id"}) {
                $text .= "<option value='" . $row3['property_id'] . "' selected='selected'>" . $row3['prop_display_name'] . ": " . substr($row3['prop_list'], 0, 10) . (strlen($row3['prop_list']) ? "..." : "") . "</option>";
            } else {
                $text .= "<option value='" . $row3['property_id'] . "'>" . $row3['prop_display_name'] . ": " . substr($row3['prop_list'], 0, 10) . (strlen($row3['prop_list']) ? "..." : "") . "</option>";
            }
        }
        $text .= "\n\t\t</select>\n\t  </td>\n    </tr>";
    }
    // End of For loop for properties
    // Display discount
    $text .= "\n    <tr>\n      <td>\n        <b>" . EASYSHOP_CONF_ITM_29 . "</b>\n      </td>\n      <td>\n\t\t<select class='tbox' name='prod_discount_id'>\n        <option value='' selected='selected'></option>";
    $sql4 = new db();
    $sql4->db_Select(DB_TABLE_SHOP_DISCOUNT, "*", " ORDER BY discount_name", false);
    // Select all discounts
    while ($row4 = $sql4->db_Fetch()) {
        if ($row4['discount_id'] == $prod_discount_id) {
            $text .= "<option value='" . $row4['discount_id'] . "' selected='selected'>" . $row4['discount_name'] . "</option>";
        } else {
            $text .= "<option value='" . $row4['discount_id'] . "'>" . $row4['discount_name'] . "</option>";
        }
    }
    $text .= "\n        </select>";
    if (trim($prod_discount_id) > "") {
        $sql5 = new db();
        $sql5->db_Select(DB_TABLE_SHOP_DISCOUNT, "*", "discount_id = " . $prod_discount_id);
        // Select the selected discount
        if ($row5 = $sql5->db_Fetch()) {
            if ($row5['discount_valid_till'] == 0) {
                // Set the end date to maximum if not filled in
                $row5['discount_valid_till'] = 9999999999.0;
            }
            $today = time();
            // $text .= "-- Today = $today Discount_valid_till = ".$row5['discount_valid_till']." Discount_valid_from = ".$row5['discount_valid_from']."--"; // Some debug info
            if ($today > $row5['discount_valid_till']) {
                $text .= "&nbsp;" . EASYSHOP_CONF_ITM_30 . " (" . date("Y/m/d", $row5['discount_valid_till']) . ")";
            }
            if ($today < $row5['discount_valid_from']) {
                $text .= "&nbsp;" . EASYSHOP_CONF_ITM_31 . " (" . date("Y/m/d", $row5['discount_valid_from']) . ")";
            }
        }
    }
    $text .= "\n      </td></tr>";
    // IPN addition - include track stock option in form
    $item_track_stock != '2' ? $trackstock_text = " value = '1' " : ($trackstock_text = " value = '2' checked='checked' ");
    $enable_ipn != '2' ? $enabled_text = " disabled = 'true' " : ($enabled_text = "");
    $text .= "\n    <tr>\n        <td>\n            <b>" . EASYSHOP_CONF_ITM_33 . "</b><br />";
    if ($enable_ipn != '2') {
        $text .= EASYSHOP_CONF_ITM_34;
    }
    $text .= "\n        </td>\n\n        <td valign='top'>\n            <input type='checkbox' name='item_track_stock' {$trackstock_text} {$enabled_text} />\n        </td>\n        </tr>\n        <tr>\n        <td>\n            <b>" . EASYSHOP_CONF_ITM_35 . "</b><br />";
    if ($enable_ipn != '2') {
        $text .= EASYSHOP_CONF_ITM_34;
    }
    $text .= "\n        </td>\n        <td valign='top'>\n            <input class='tbox' size='7' type='text' name='item_instock' value='" . $item_instock . "' {$enabled_text} />\n        </td>\n    </tr>\n\t<tr>\n        <td>\n            <b>" . EASYSHOP_CONF_ITM_47 . "</b><br />";
    if ($enable_ipn != '2') {
        $text .= EASYSHOP_CONF_ITM_34;
    }
    $text .= "\n        </td>\n        <td valign='top'>\n            <input class='tbox' size='7' type='text' name='item_minimum' value='" . $item_minimum . "' {$enabled_text} />\n        </td>\n    </tr>";
    // Download product: only if IPN is activated
    $text .= "\n    <tr><td>\n    <b>" . EASYSHOP_CONF_ITM_36 . "</b><br />\n    ";
    if ($enable_ipn != '2') {
        $text .= EASYSHOP_CONF_ITM_34;
    }
    $download_product != '2' ? $download_product_text = " value = '1' " : ($download_product_text = " value = '2' checked='checked' ");
    $text .= "\n    </td><td>\n           <input type='checkbox' name='download_product' {$download_product_text} {$enabled_text} />\n    </td></tr>";
    if (strlen(trim($download_filename)) == 0) {
        // Show upload button and select box when no download file is stored yet
        $text .= "\n      <tr><td>\n      </td><td>";
        $dirname = e_PLUGIN . "easyshop/downloads";
        $text .= "<input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_37 . "\" onclick=\"expandit(this)\" />\n  \t\t\t<div style=\"display:none;\">\n  \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n  \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_38 . "\" />\n  \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $dirname . "\" />\n  \t\t\t</div>";
        $text .= "\n      </td></tr>";
        // Show select box when no download file is stored yet
        require_once e_HANDLER . 'file_class.php';
        $dl = new e_file();
        $rejecfiles = array('$.', '$..', '/', 'CVS', 'thumbs.db', '*._$', "thumb_", 'index', 'null*');
        $downloadlist = $dl->get_files(e_PLUGIN . "easyshop/downloads", $rejecthumb);
        $text .= "\n      <tr><td>\n           <b>" . EASYSHOP_CONF_ITM_39 . "</b>\n      </td><td>\n  \t\t   <select name='download_filename' class='tbox'>\n  \t\t\t<option value=''>&nbsp;</option>\n  \t\t\t";
        foreach ($downloadlist as $file) {
            $extension = strrpos($file['fname'], ".") ? substr($file['fname'], strrpos($file['fname'], ".")) : "";
            if (strlen($extension) > 0) {
                // Suppress files without extension
                if ($file['fname'] == $download_filename) {
                    $selected_text = "selected='selected'";
                } else {
                    $selected_text = "";
                }
                $text .= "<option value='" . $file['fname'] . "' {$selected_text}>" . $file['fname'] . "</option>";
            }
        }
        $text .= "</select>";
    } else {
        // Show stored download file
        $text .= "\n      <tr><td>\n           <b>" . EASYSHOP_CONF_ITM_40 . "</b><br />\n           " . EASYSHOP_CONF_ITM_41 . "\n      </td><td>\n        <input name='download_filename' value='" . $download_filename . "' disabled = 'true' />\n      ";
    }
    // Show scramled file info
    if (strlen($download_filename) > 0) {
        $scramled_name = $item_id . $download_filename;
        $text .= "<br />\n  \t\t" . EASYSHOP_CONF_ITM_42 . ": " . md5($scramled_name) . "<br />";
    }
    $text .= "<input type='hidden' name='stored_download_filename' value='" . $download_filename . "' />\n    </td></tr>\n    ";
    // Promotion class: only if IPN is activated
    $text .= "\n    <tr><td>\n    <b>" . EASYSHOP_CONF_ITM_45 . "</b><br />\n    ";
    if ($enable_ipn != '2') {
        $text .= EASYSHOP_CONF_ITM_34;
    }
    $download_product != '2' ? $download_product_text = " value = '1' " : ($download_product_text = " value = '2' checked='checked' ");
    require_once e_HANDLER . 'userclass_class.php';
    $text .= "\n    </td><td>\n\t\t\t" . r_userclass("prod_promo_class", $prod_promo_class, "off", "nobody,classes") . "\t\t   \n   </td></tr>";
    // NEW: START v1.6m
    // Datasheet functionality
    $text .= "\n    <tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_56 . "</b><br /> ";
    $download_datasheet != '2' ? $download_datasheet_text = " value = '1' " : ($download_datasheet_text = " value = '2' checked='checked' ");
    $text .= "\n    </td><td>\n\t\t<input type='checkbox' name='download_datasheet' {$download_datasheet_text} />\n    </td></tr>";
    if (strlen(trim($download_datasheet_filename)) == 0) {
        // Show upload button and select box when no datasheet file is stored yet
        $text .= "\n\t<tr><td>\n\t</td><td>";
        $dirname = e_PLUGIN . "easyshop/datasheets";
        $text .= "<input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_57 . "\" onclick=\"expandit(this)\" />\n  \t\t\t<div style=\"display:none;\">\n  \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n  \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_58 . "\" />\n  \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $dirname . "\" />\n  \t\t\t</div>";
        $text .= "\n\t</td></tr>";
        // Show select box when no datasheet file is stored yet
        require_once e_HANDLER . 'file_class.php';
        $dl = new e_file();
        $rejecfiles = array('$.', '$..', '/', 'CVS', 'thumbs.db', '*._$', "thumb_", 'index', 'null*');
        $datasheetlist = $dl->get_files(e_PLUGIN . "easyshop/datasheets", $rejecthumb);
        $text .= "\n\t<tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_59 . "</b>\n\t</td><td>\n\t\t<select name='download_datasheet_filename' class='tbox'>\n\t\t\t<option value=''>&nbsp;</option>";
        foreach ($datasheetlist as $file) {
            $extension = strrpos($file['fname'], ".") ? substr($file['fname'], strrpos($file['fname'], ".")) : "";
            if (strlen($extension) > 0) {
                // Suppress files without extension
                if ($file['fname'] == $download_datasheet_filename) {
                    $download_datasheet_selected_text = "selected='selected'";
                } else {
                    $download_datasheet_selected_text = "";
                }
                $text .= "<option value='" . $file['fname'] . "' {$download_datasheet_selected_text}>" . $file['fname'] . "</option>";
            }
        }
        $text .= "\n\t\t</select>\n\t</td></tr>";
    } else {
        // Show stored datasheet file
        $text .= "\n\t<tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_60 . "</b><br />\n\t\t" . EASYSHOP_CONF_ITM_61 . "\n\t</td><td>\n\t\t<input name='download_datasheet_filename' value='" . $download_datasheet_filename . "' disabled = 'true' />\n\t</td></tr>";
    }
    // Display item_quotation checkbox
    $text .= "\n    <tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_62 . "</b><br /> ";
    $item_quotation != '2' ? $item_quotation_text = " value = '1' " : ($item_quotation_text = " value = '2' checked='checked' ");
    $text .= "\n    </td><td>\n\t\t<input type='checkbox' name='item_quotation' {$item_quotation_text} />\n    </td></tr>";
    // NEW: END v1.6m
    $text .= "\n\t</table>";
    return $text;
}
예제 #21
0
파일: upload.php 프로젝트: gitye/e107
         $current_perms[e_UC_MEMBER] = array('type' => 'zip,tar,gz,jpg,png', 'maxupload' => '2M');
     }
     $text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "?filetypes'>\n\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t<colgroup>\n\t\t<col style='width:30%' />\n\t\t<col style='width:40%' />\n\t\t<col style='width:25%' />\n\t\t<col style='width:5%' />\n\t\t</colgroup>\n\t  <tr>\n\t\t<td class='forumheader3' colspan='4'><input type='hidden' name='upload_do_edit' value='1'>" . str_replace(array('--SOURCE--', '--DEST--'), array(e_UPLOAD_TEMP_DIR . e_SAVE_FILETYPES, e_ADMIN . e_READ_FILETYPES), UPLLAN_52) . "</td>\n\t  </tr>\n\t  <tr>\n\t\t<td class='forumheader3' colspan='4'>" . UPLLAN_57 . $source_file . "</td>\n\t  </tr>\n\t  <tr>\n\t\t<td class='fcaption'>" . LAN_USERCLASS . "</td>\n\t\t<td class='fcaption'>" . UPLLAN_54 . "</td>\n\t\t<td class='fcaption' style='text-align:center'>" . UPLLAN_55 . "</td>\n\t\t<td class='fcaption' style='text-align:center'>" . LAN_DELETE . "</td>\n\t  </tr>";
     foreach ($current_perms as $uclass => $uinfo) {
         $text .= "\n\t\t<tr>\n\t\t  <td class='forumheader3'><select name='file_class_select[]' class='tbox'>\n\t\t  " . $e_userclass->vetted_tree('file_class_select', array($e_userclass, 'select'), $uclass, 'member,main,classes,admin, no-excludes') . "\n\t\t  </select></td>\n\t\t  <td class='forumheader3'><input type='text' name='file_type_list[]' value='{$uinfo['type']}' class='tbox' size='40' /></td>\n\t\t  <td class='forumheader3' style='text-align:center'><input type='text' name='file_maxupload[]' value='{$uinfo['maxupload']}' class='tbox' size='10' /></td>\n\t\t  <td class='forumheader3'><input type='checkbox' value='1' name='file_line_delete_{$uclass}' /></td>\n\t\t</tr>";
     }
     // Now put up a box to add a new setting
     $text .= "\n\t  <tr>\n\t\t  <td class='forumheader3'><select name='file_class_select[]' class='tbox'>\n\t\t  " . $e_userclass->vetted_tree('file_class_select', array($e_userclass, 'select'), '', 'member,main,classes,admin,blank, no-excludes') . "\n\t\t  </select></td>\n\t\t  <td class='forumheader3'><input type='text' name='file_type_list[]' value='' class='tbox' size='40' /></td>\n\t\t  <td class='forumheader3' style='text-align:center'><input type='text' name='file_maxupload[]' value='" . ini_get('upload_max_filesize') . "' class='tbox' size='10' /></td>\n\t\t  <td class='forumheader3'>&nbsp;</td>\n\t  </tr>";
     $text .= "\n\t  <tr>\n\t\t<td class='forumheader3' style='text-align:center' colspan='4'>\n\t\t\t\t<input class='btn button' type='submit' name='generate_filetypes_xml' value='" . UPLLAN_56 . "' />\n\t\t</td>\n\t  </tr>\n\t</table></form>\n\t</div>";
     $ns->tablerender(LAN_FILETYPES, $text);
     break;
 case 'options':
     if (!getperms('0')) {
         exit;
     }
     $text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "?options'>\n\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t<tr>\n\t<td style='width:50%' class='forumheader3'>" . UPLLAN_25 . "<br />\n\t<span class='smalltext'>" . UPLLAN_26 . "</span></td>\n\t<td style='width:50%' class='forumheader3'>" . ($pref['upload_enabled'] == 1 ? $rs->form_radio("upload_enabled", 1, 1) . " " . LAN_YES . $rs->form_radio("upload_enabled", 0) . " " . LAN_NO : $rs->form_radio("upload_enabled", 1) . " " . LAN_YES . $rs->form_radio("upload_enabled", 0, 1) . " " . LAN_NO) . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td style='width:70%' class='forumheader3'>" . UPLLAN_33 . "<br />\n\t<span class='smalltext'>" . UPLLAN_34 . " (upload_max_filesize = " . ini_get('upload_max_filesize') . ", post_max_size = " . ini_get('post_max_size') . " )</span></td>\n\t<td style='width:30%' class='forumheader3'>" . $rs->form_text("upload_maxfilesize", 10, $pref['upload_maxfilesize'], 10) . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td style='width:70%' class='forumheader3'>" . UPLLAN_37 . "<br />\n\t<span class='smalltext'>" . UPLLAN_38 . "</span></td>\n\t<td style='width:30%' class='forumheader3'>" . r_userclass("upload_class", $pref['upload_class'], "off", "nobody,public,guest,member,admin,classes") . "\n\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td colspan='2' class='forumheader' style='text-align:center'>" . $rs->form_button("submit", "optionsubmit", LAN_SUBMIT) . "\n\t</td>\n\t</tr>\n\t</table>" . $rs->form_close() . "\n\t</div>";
     $ns->tablerender(LAN_OPTIONS, $text);
     break;
 case 'view':
     $sql->db_Select('upload', '*', "upload_id='{$id}'");
     $row = $sql->db_Fetch();
     extract($row);
     $post_author_id = substr($upload_poster, 0, strpos($upload_poster, "."));
     $post_author_name = substr($upload_poster, strpos($upload_poster, ".") + 1);
     $poster = !$post_author_id ? "<b>" . $post_author_name . "</b>" : "<a href='" . e_BASE . "user.php?id." . $post_author_id . "'><b>" . $post_author_name . "</b></a>";
     $upload_datestamp = $gen->convert_date($upload_datestamp, "long");
     $text = "<div style='text-align:center'>\n\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t<colgroup>\n\t\t<col style='width:30%' />\n\t\t<col style='width:70%' />\n\t\t</colgroup>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_ID . "</td>\n\t\t<td class='forumheader3'>{$upload_id}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_DATE . "</td>\n\t\t<td class='forumheader3'>{$upload_datestamp}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_5 . "</td>\n\t\t<td class='forumheader3'>{$poster}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_6 . "</td>\n\t\t<td class='forumheader3'><a href='mailto:{$upload_email}'>{$upload_email}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_7 . "</td>\n\t\t<td class='forumheader3'>" . ($upload_website ? "<a href='{$upload_website}'>{$upload_website}</a>" : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_FILE_NAME . "</td>\n\t\t<td class='forumheader3'>" . ($upload_name ? $upload_name : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_VERSION . "</td>\n\t\t<td class='forumheader3'>" . ($upload_version ? $upload_version : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_FILE . "</td>\n\t\t<td class='forumheader3'>" . (is_numeric($upload_file) ? "Binary file ID " . $upload_file : "<a href='" . e_SELF . "?dl.{$upload_file}'>{$upload_file}</a>") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_SIZE . "</td>\n\t\t<td class='forumheader3'>" . $e107->parseMemorySize($upload_filesize) . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_SCREENSHOT . "</td>\n\t\t<td class='forumheader3'>" . ($upload_ss ? "<a href='" . e_BASE . "request.php?upload." . $upload_id . "'>" . $upload_ss . "</a>" : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_DESCRIPTION . "</td>\n\t\t<td class='forumheader3'>{$upload_description}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_14 . "</td>\n\t\t<td class='forumheader3'>" . ($upload_demo ? $upload_demo : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_OPTIONS . "</td>\n\t\t<td class='forumheader3'><a href='" . e_SELF . "?dlm.{$upload_id}'>" . UPLAN_COPYTODLM . "</a> | <a href='" . e_SELF . "?news.{$upload_id}'>" . UPLLAN_16 . "</a> | <a href='" . e_SELF . "?dis.{$upload_id}'>" . UPLLAN_17 . "</a></td>\n\t\t</tr>\n\n\t\t</table>\n\t\t</div>";
     $ns->tablerender(UPLLAN_18, $text);
     // Intentionally fall through into list mode
 // Intentionally fall through into list mode
 case 'list':
예제 #22
0
파일: download.php 프로젝트: notzen/e107
 function show_categories($sub_action, $id)
 {
     global $sql, $rs, $ns, $tp, $pst;
     if (!is_object($sql2)) {
         $sql2 = new db();
     }
     $text = $rs->form_open("post", e_SELF . "?" . e_QUERY, "myform");
     $text .= "<div style='padding : 1px; " . ADMIN_WIDTH . "; height : 200px; overflow : auto; margin-left: auto; margin-right: auto;'>";
     $qry = "\n\t\tSELECT dc.*, COUNT(d.download_id) AS filecount FROM #download_category AS dc\n\t\tLEFT JOIN #download AS d ON d.download_category = dc.download_category_id\n\t\tGROUP BY dc.download_category_id\n\t\tORDER BY dc.download_category_order\n\t\t";
     if ($sql->db_Select_gen($qry)) {
         $categories = $sql->db_getList();
         foreach ($categories as $cat) {
             $cat_array[$cat['download_category_parent']][] = $cat;
         }
         $text .= "\n\t\t\t<table class='fborder' style='width:99%'>\n\t\t\t\t<tr>\n\t\t\t\t<td style='width:5%; text-align:center' class='fcaption'>&nbsp;</td>\n\t\t\t\t<td style='width:70%; text-align:center' class='fcaption'>" . DOWLAN_11 . "</td>\n\t\t\t\t<td style='width:5%; text-align:center' class='fcaption'>" . DOWLAN_52 . "</td>\n\t\t\t\t<td style='width:5%; text-align:center' class='fcaption'>" . LAN_ORDER . "</td>\n\t\t\t\t<td style='width:20%; text-align:center' class='fcaption'>" . LAN_OPTIONS . "</td>\n\t\t\t\t</tr>";
         //Start displaying parent categories
         foreach ($cat_array[0] as $parent) {
             if (strstr($parent['download_category_icon'], chr(1))) {
                 list($parent['download_category_icon'], $parent['download_category_icon_empty']) = explode(chr(1), $parent['download_category_icon']);
             }
             $text .= "<tr>\n\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader'>" . ($parent['download_category_icon'] ? "<img src='" . e_IMAGE . "icons/{$parent['download_category_icon']}' style='vertical-align:middle; border:0' alt='' />" : "&nbsp;") . "</td>\n\t\t\t\t\t<td colspan='2' style='width:70%' class='forumheader'><b>{$parent['download_category_name']}</b></td>\n\t\t\t\t\t<td class='forumheader3'>\n\t\t\t\t\t <input class='tbox' type='text' name='catorder[{$parent['download_category_id']}]' value='{$parent['download_category_order']}' size='3' />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:left;padding-left:12px' class='forumheader'>\n\t\t\t\t\t<a href='" . e_SELF . "?cat.edit.{$parent['download_category_id']}'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t\t";
             if (!is_array($cat_array[$parent['download_category_id']])) {
                 $text .= "<input type='image' title='" . LAN_DELETE . "' name='delete[category_{$parent['download_category_id']}]' src='" . ADMIN_DELETE_ICON_PATH . "' onclick=\"return jsconfirm('" . $tp->toJS(DOWLAN_34 . " [ID: {$parent['download_category_id']} ]") . "') \"/>";
             }
             $text .= "\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t";
             //Show main categories
             if (is_array($cat_array[$parent['download_category_id']])) {
                 foreach ($cat_array[$parent['download_category_id']] as $main) {
                     if (strstr($main['download_category_icon'], chr(1))) {
                         list($main['download_category_icon'], $main['download_category_icon_empty']) = explode(chr(1), $main['download_category_icon']);
                     }
                     $text .= "<tr>\n\t\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>" . ($main['download_category_icon'] ? "<img src='" . e_IMAGE . "icons/{$main['download_category_icon']}' style='vertical-align:middle; border:0' alt='' />" : "&nbsp;") . "</td>\n\t\t\t\t\t\t<td style='width:70%' class='forumheader3'>{$main['download_category_name']}<br /><span class='smalltext'>{$main['download_category_description']}</span></td>\n\t\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>{$main['filecount']}</td>\n\t\t\t\t\t\t<td class='forumheader3'>\n\t\t\t\t\t\t\t<input class='tbox' type='text' name='catorder[{$main['download_category_id']}]' value='{$main['download_category_order']}' size='3' />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style='width:20%; text-align:left;padding-left:12px' class='forumheader3'>\n\t\t\t\t\t\t<a href='" . e_SELF . "?cat.edit.{$main['download_category_id']}'>" . ADMIN_EDIT_ICON . "</a>";
                     if (!is_array($cat_array[$main['download_category_id']]) && !$main['filecount']) {
                         $text .= "<input type='image' title='" . LAN_DELETE . "' name='delete[category_{$main['download_category_id']}]' src='" . ADMIN_DELETE_ICON_PATH . "' onclick=\"return jsconfirm('" . $tp->toJS(DOWLAN_34 . " [ID: {$main['download_category_id']} ]") . "') \"/>";
                     }
                     $text .= "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
                     //Show sub categories
                     if (is_array($cat_array[$main['download_category_id']])) {
                         foreach ($cat_array[$main['download_category_id']] as $sub) {
                             if (strstr($sub['download_category_icon'], chr(1))) {
                                 list($sub['download_category_icon'], $sub['download_category_icon_empty']) = explode(chr(1), $sub['download_category_icon']);
                             }
                             $text .= "<tr>\n\t\t\t\t\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>" . ($sub['download_category_icon'] ? "<img src='" . e_IMAGE . "icons/{$sub['download_category_icon']}' style='vertical-align:middle; border:0' alt='' />" : "&nbsp;") . "</td>\n\t\t\t\t\t\t\t\t\t<td style='width:70%' class='forumheader3'>&nbsp;&nbsp;&nbsp;&nbsp;" . DOWLAN_53 . ": {$sub['download_category_name']}<br />&nbsp;&nbsp;&nbsp;&nbsp;<span class='smalltext'>{$sub['download_category_description']}</span></td>\n\t\t\t\t\t\t\t\t\t<td style='width:5%; text-align:center' class='forumheader3'>{$sub['filecount']}</td>\n\t\t\t\t\t\t\t\t\t<td class='forumheader3'>\n\t\t\t\t\t\t\t\t\t\t<input class='tbox' type='text' name='catorder[{$sub['download_category_id']}]' value='{$sub['download_category_order']}' size='3' />\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style='width:20%; text-align:left;padding-left:12px' class='forumheader3'>\n\t\t\t\t\t\t\t\t\t<a href='" . e_SELF . "?cat.edit.{$sub['download_category_id']}'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t\t\t\t\t\t";
                             if (!$sub['filecount']) {
                                 $text .= "<input type='image' title='" . LAN_DELETE . "' name='delete[category_{$sub['download_category_id']}]' src='" . ADMIN_DELETE_ICON_PATH . "' onclick=\"return jsconfirm('" . $tp->toJS(DOWLAN_34 . " [ID: {$sub['download_category_id']} ]") . "') \"/>";
                             }
                             $text .= "\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>";
                         }
                     }
                 }
             }
         }
         $text .= "</table></div>";
         $text .= "<div style='text-align:center'>\n\t\t\t\t<input class='button' type='submit' name='update_catorder' value='" . LAN_UPDATE . "' />\n\t\t\t\t</div>";
     } else {
         $text .= "<div style='text-align:center'>" . DOWLAN_38 . "</div>";
     }
     $text .= "</form>";
     $ns->tablerender(DOWLAN_37, $text);
     unset($download_category_id, $download_category_name, $download_category_description, $download_category_parent, $download_category_icon, $download_category_class);
     $handle = opendir(e_IMAGE . "icons");
     while ($file = readdir($handle)) {
         if ($file != "." && $file != ".." && $file != "/" && $file != "CVS") {
             $iconlist[] = $file;
         }
     }
     closedir($handle);
     if ($sub_action == "edit" && !$_POST['add_category']) {
         if ($sql->db_Select("download_category", "*", "download_category_id={$id}")) {
             $row = $sql->db_Fetch();
             extract($row);
             $main_category_parent = $download_category_parent;
             if (strstr($download_category_icon, chr(1))) {
                 list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $download_category_icon);
             } else {
                 $download_category_icon_empty = "";
             }
         }
     }
     $preset = $pst->read_preset("admin_dl_cat");
     // read preset values into array
     extract($preset);
     $frm_action = isset($_POST['add_category']) ? e_SELF . "?cat" : e_SELF . "?" . e_QUERY;
     $text = "<div style='text-align:center'>\n\t\t\t<form method='post' action='{$frm_action}' id='dlform'>\n\t\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t\t<tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_37 . ": </td>\n\t\t\t<td style='width:70%' class='forumheader3'>";
     if (!($download_cats = $sql->db_Select("download_category"))) {
         $text .= "\n\t\t\t\t<select name='download_category_parent' class='tbox'>\n\t\t\t\t<option>" . DOWLAN_40 . "</option>\n\t\t\t\t</select>\n";
     } else {
         $text .= "\n\t\t\t\t<select name='download_category_parent' class='tbox'>\n\t\t\t\t<option>" . DOWLAN_40 . "</option>";
         while (list($cat_id, $cat_name, $null, $null, $cat_parent) = $sql->db_Fetch()) {
             $sql2->db_Select("download_category", "download_category_parent", "download_category_id='{$cat_parent}'", TRUE);
             $row = $sql2->db_Fetch();
             extract($row);
             if (!$download_category_parent || !$cat_parent) {
                 $text .= $main_category_parent == $cat_id ? "<option value='{$cat_id}' selected='selected'>" . $cat_name . "</option>" : "<option value='{$cat_id}'>" . $cat_name . "</option>";
             }
         }
         $text .= "</select>";
     }
     $text .= "</td></tr><tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_12 . ": </td>\n\t\t\t<td style='width:70%' class='forumheader3'>\n\t\t\t<input class='tbox' type='text' name='download_category_name' size='40' value='{$download_category_name}' maxlength='100' />\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_18 . ": </td>\n\t\t\t<td style='width:70%' class='forumheader3'>\n\t\t\t<textarea class='tbox' name='download_category_description' cols='59' rows='3'>{$download_category_description}</textarea>\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_41 . ": </td>\n\t\t\t<td style='width:70%' class='forumheader3'>\n\t\t\t<input class='tbox' type='text' id='download_category_icon' name='download_category_icon' size='60' value='{$download_category_icon}' maxlength='100' />\n\n\t\t\t<br />\n\t\t\t<input class='button' type ='button' style='cursor:pointer' size='30' value='" . DOWLAN_42 . "' onclick='expandit(this)' />\n\t\t\t<div id='cat_icn' style='display:none;{head}' >";
     while (list($key, $icon) = each($iconlist)) {
         $text .= "<a href=\"javascript:insertext('{$icon}','download_category_icon','cat_icn')\"><img src='" . e_IMAGE . "icons/" . $icon . "' style='border:0' alt='' /></a> ";
     }
     reset($iconlist);
     $text .= "\n\t\t\t</div></td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_147 . ": </td>\n\t\t\t<td style='width:70%' class='forumheader3'>\n\t\t\t<input class='tbox' type='text' id='download_category_icon_empty' name='download_category_icon_empty' size='60' value='{$download_category_icon_empty}' maxlength='100' />\n\n\t\t\t<br />\n\t\t\t<input class='button' type ='button' style='cursor:pointer' size='30' value='" . DOWLAN_42 . "' onclick='expandit(this)' />\n\t\t\t<div id='cat_icn_empty' style='display:none;{head}' >";
     while (list($key, $icon) = each($iconlist)) {
         $text .= "<a href=\"javascript:insertext('{$icon}','download_category_icon_empty','cat_icn_empty')\"><img src='" . e_IMAGE . "icons/" . $icon . "' style='border:0' alt='' /></a> ";
     }
     $text .= "\n\t\t\t</div></td>\n\t\t\t</tr>\n\n\n\n\t\t\t<tr>\n\t\t\t<td style='width:30%' class='forumheader3'>" . DOWLAN_43 . ":<br /><span class='smalltext'>(" . DOWLAN_44 . ")</span></td>\n\t\t\t<td style='width:70%' class='forumheader3'>" . r_userclass("download_category_class", $download_category_class, 'off', 'public, nobody, member, admin, classes, language') . "\n\n\t\t\t</td></tr>";
     $text .= "\n\t\t\t<tr style='vertical-align:top'>\n\t\t\t<td colspan='2' style='text-align:center' class='forumheader'>";
     if ($id && $sub_action == "edit" && !isset($_POST['add_category'])) {
         $text .= "<input class='button' type='submit' name='add_category' value='" . DOWLAN_46 . "' /> ";
     } else {
         $text .= "<input class='button' type='submit' name='add_category' value='" . DOWLAN_45 . "' />";
     }
     $text .= "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t</div>";
     $ns->tablerender(DOWLAN_39, $text);
 }
예제 #23
0
function table_discounts($discount_id, $discount_name, $discount_class, $discount_flag, $discount_amount, $discount_valid_from, $discount_valid_till, $discount_code, $cal)
{
    $text .= "\n    <table border='0' cellspacing='15' width='100%'>\n    \t<tr>\n    \t\t<td>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_04 . "</b>\n    \t\t</td>\n    \t\t<td>\n    \t\t\t<input class='tbox' size='25' type='text' name='discount_name' value='{$discount_name}'/>\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_05 . "</b>\n    \t\t</td>\n    \t\t<td>\n    \t\t\t" . r_userclass("discount_class", $discount_class, "off", "public,guest,member,nobody,main,admin,classes") . "\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_06 . "</b>\n    \t\t</td>\n    \t\t<td>\n    \t\t\t<select class='tbox' name='discount_flag' value='{$discount_flag}'>\n             <option value='0'";
    if ($discount_flag == 0) {
        $text .= " selected ";
    }
    $text .= ">" . EASYSHOP_ADMIN_DISC_08A . "</option>\n             <option value='1'";
    if ($discount_flag == 1) {
        $text .= " selected ";
    }
    $text .= ">" . EASYSHOP_ADMIN_DISC_08B . "</option>\n          </select>\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_07 . "</b>\n    \t\t</td>\n    \t\t<td>\n    \t\t\t<input class='tbox' size='25' type='text' name='discount_amount' value='" . number_format($discount_amount, 2, '.', '') . "'/>\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_09 . "</b>\n    \t\t</td>\n    \t\t<td>";
    // Display calender icon for discount_valid_from
    unset($cal_options);
    unset($cal_attrib);
    $cal_options['firstDay'] = 0;
    $cal_options['showsTime'] = false;
    $cal_options['showOthers'] = false;
    $cal_options['weekNumbers'] = true;
    $cal_attrib['class'] = "tbox";
    $cal_attrib['name'] = "discount_valid_from";
    $cal_attrib['value'] = $discount_valid_from > 0 ? $discount_valid_from : EASYSHOP_ADMIN_DISC_31;
    $text .= $cal->make_input_field($cal_options, $cal_attrib);
    $text .= "\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_10 . "</b>\n    \t\t</td>\n    \t\t<td>";
    // Display calender icon for discount_valid_till
    unset($cal_options);
    unset($cal_attrib);
    $cal_options['firstDay'] = 0;
    $cal_options['showsTime'] = false;
    $cal_options['showOthers'] = false;
    $cal_options['weekNumbers'] = true;
    $cal_attrib['class'] = "tbox";
    $cal_attrib['name'] = "discount_valid_till";
    $cal_attrib['value'] = $discount_valid_till > 0 ? $discount_valid_till : EASYSHOP_ADMIN_DISC_31;
    $text .= $cal->make_input_field($cal_options, $cal_attrib);
    $text .= "\n    \t\t</td>\n    \t</tr>\n    \t<tr>\n    \t\t<td valign='top'>\n    \t\t\t<b>" . EASYSHOP_ADMIN_DISC_11 . "</b>\n    \t\t</td>\n    \t\t<td>\n    \t\t\t<input class='tbox' size='25' type='text' name='discount_code' value='" . $discount_code . "'/>";
    // Suggest a discount code if there isn't one present
    if ($discount_code == "") {
        $text .= "&nbsp;" . EASYSHOP_ADMIN_DISC_35 . "&nbsp;<strong>" . General::CreateRandomDiscountCode() . "</strong>";
    }
    $text .= "\n    \t\t</td>\n    \t</tr>\n    </table>";
    return $text;
}
예제 #24
0
 private function renderVisibilityOptions()
 {
     if (!vartrue($_GET['vis'])) {
         return;
     }
     //	print_a($_GET);
     $tp = e107::getParser();
     $sql = e107::getDb();
     $ns = e107::getRender();
     $frm = e107::getForm();
     require_once e_HANDLER . "userclass_class.php";
     /*
     	if(!$sql->select("menus", "*", "menu_id=".intval($_GET['vis'])))
     	{
             	$this->menuAddMessage("Couldn't Load Menu",E_MESSAGE_ERROR);
                 return;
     	}
     	
     	$row = $sql->fetch();
     */
     $listtype = substr($_GET['pages'], 0, 1);
     $menu_pages = substr($_GET['pages'], 2);
     $menu_pages = str_replace("|", "\n", $menu_pages);
     $text = "<div>\n\t\t\t<form class='form-horizontal' id='e-save-form' method='post' action='" . e_SELF . "?lay=" . $this->curLayout . "&amp;iframe=1'>\n\t        <fieldset>\n\t\t\t<legend>" . MENLAN_7 . " " . $row['menu_name'] . "</legend>\n\t        <table class='table adminform'>\n\t\t\t<tr>\n\t\t\t<td>\n\t\t\t" . MENLAN_4 . " " . r_userclass('menu_class', intval($_GET['class']), "off", "public,member,guest,admin,main,classes,nobody") . "\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr><td><div class='radio'>\n\t\t";
     $checked = $listtype == 1 ? " checked='checked' " : "";
     $text .= $frm->radio('listtype', 1, $checked, array('label' => $tp->toHtml(MENLAN_26, true), 'class' => 'e-save'));
     $text .= "<br />";
     //	$text .= "<input type='radio' class='e-save' {$checked} name='listtype' value='1' /> ".MENLAN_26."<br />";
     $checked = $listtype == 2 ? " checked='checked' " : "";
     $text .= $frm->radio('listtype', 2, $checked, array('label' => $tp->toHtml(MENLAN_27, true), 'class' => 'e-save'));
     // $text .= "<input type='radio' class='e-save' {$checked} name='listtype' value='2' /> ".MENLAN_27."<br />";
     $text .= "</div>\n\t\t<div class='row' style='padding:10px'>\n\t\t\t\n\t\t\t<div class='pull-left span3' >\n\t\t\n\t\t\t\t<textarea name='pagelist' class='e-save span3' cols='60' rows='8' class='tbox'>" . $menu_pages . "</textarea>\n\t\t\t</div>\n\t\t\t<div class='  span4 col-md-4'><small>" . MENLAN_28 . "</small></div>\n\t\t</div></td></tr>\n\t\t</table>";
     $text .= $frm->hidden('mode', 'visibility');
     $text .= $frm->hidden('menu_id', $_GET['vis']);
     // is NOT an integer
     /*
     		$text .= "
     		<div class='buttons-bar center'>";
             $text .= $frm->admin_button('class_submit', MENLAN_6, 'update');
     
     		
     		</div>";
     */
     $text .= "\n\t\t</fieldset>\n\t\t</form>\n\t\t</div>";
     return $text;
     //$caption = MENLAN_7." ".$row['menu_name'];
     //$ns->tablerender($caption, $text);
     //echo $text;
 }
예제 #25
0
 function show_categories($current)
 {
     global $sql, $ns, $ue, $frm;
     $text = "<div style='text-align:center'>";
     $text .= "\n        <table class='table adminlist'>\n\n\t\t<thead>\n\t\t<tr>\n\t\t<th>" . EXTLAN_1 . "</th>\n\t\t<th>" . EXTLAN_79 . "</th>\n\t\t<th>" . EXTLAN_5 . "</th>\n\t\t<th>" . EXTLAN_6 . "</th>\n\t\t<th>" . EXTLAN_7 . "</th>\n\t\t<th>&nbsp;</th>\n\t\t<th>" . EXTLAN_8 . "</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t";
     $catList = $ue->user_extended_get_categories(FALSE);
     if (count($catList)) {
         //			Show current categories
         $i = 0;
         foreach ($catList as $ext) {
             if ($ext['user_extended_struct_order'] != $i) {
                 $ext['user_extended_struct_order'] = $i;
                 $xID = $ext['user_extended_struct_id'];
                 $sql->db_Update("user_extended_struct", "user_extended_struct_order={$i} WHERE user_extended_struct_type = 0 AND user_extended_struct_id={$xID}");
             }
             $text .= "\n\t\t\t\t<tr>\n\t\t\t\t<td>{$ext['user_extended_struct_name']}</td>\n\t\t\t\t<td>" . deftrue($ext['user_extended_struct_text'], $ext['user_extended_struct_text']) . "</td>\n\t\t\t\t<td>" . r_userclass_name($ext['user_extended_struct_applicable']) . "</td>\n\t\t\t\t<td>" . r_userclass_name($ext['user_extended_struct_read']) . "</td>\n\t\t\t\t<td>" . r_userclass_name($ext['user_extended_struct_write']) . "</td>\n\t\t\t\t<td>\n\t\t\t\t<form method='post' action='" . e_SELF . "?cat'>\n\t\t\t\t<div>\n\t\t\t\t<input type='hidden' name='id' value='{$ext['user_extended_struct_id']}.{$ext['user_extended_struct_order']}' />\n\t\t\t\t";
             if ($i > 0) {
                 $text .= "\n\t\t\t\t\t<input type='image' alt='' title='" . EXTLAN_26 . "' src='" . ADMIN_UP_ICON_PATH . "' name='catup' value='{$ext['user_extended_struct_id']}.{$i}' />\n\t\t\t\t\t";
             }
             if ($i <= count($catList) - 2) {
                 $text .= "<input type='image' alt='' title='" . EXTLAN_25 . "' src='" . ADMIN_DOWN_ICON_PATH . "' name='catdown' value='{$ext['user_extended_struct_id']}.{$i}' />";
             }
             $text .= "\n\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t\t<td class='center' style='white-space: nowrap'>\n\t\t\t\t<form method='post' action='" . e_SELF . "?cat' onsubmit='return confirm(\"" . EXTLAN_27 . "\")'>\n\t\t\t\t<div>\n\t\t\t\t<input type='hidden' name='eu_action' value='delcat' />\n\t\t\t\t<input type='hidden' name='key' value='{$ext['user_extended_struct_id']},{$ext['user_extended_struct_name']}' />\n\t\t\t\t<a style='text-decoration:none' href='" . e_SELF . "?cat.{$ext['user_extended_struct_id']}'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t<input type='image' title='" . LAN_DELETE . "' name='eudel' src='" . ADMIN_DELETE_ICON_PATH . "' />\n\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t";
             $i++;
         }
     } else {
         $text .= "\n\t\t\t<tr>\n\t\t\t<td colspan='8' class='center'>" . EXTLAN_37 . "</td>\n\t\t\t</tr>\n\t\t\t";
     }
     //Show add/edit form
     $text .= "</tbody>\n\t\t</table>\n\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\t\t";
     $text .= "<div><br /></div>\n\t\t<table class='table adminform'>\n\t\t<colgroup>\n\t\t\t<col class='col-label' />\n\t\t\t<col class='col-control' />\n\t\t</colgroup>";
     $text .= "\n\n\t\t<tr>\n\t\t<td>" . EXTLAN_38 . ":</td>\n\t\t<td colspan='3'>\n\t\t<input class='tbox' type='text' name='user_field' size='40' value='" . $current['user_extended_struct_name'] . "' maxlength='50' />\n\t\t<br /><span class='field-help'>" . EXTLAN_11 . "</span>\n\t\t</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td>" . EXTLAN_31 . ":</td>\n\t\t<td colspan='3'>\n\t\t<input class='tbox' type='text' name='user_text' size='40' value='" . $current['user_extended_struct_text'] . "' maxlength='255' />\n\t\t<br /><span class='field-help'>" . EXTLAN_32 . "</span>\n\t\t</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td>" . EXTLAN_5 . "</td>\n\t\t<td colspan='3'>\n\t\t" . r_userclass("user_applicable", $current['user_extended_struct_applicable'], 'off', 'member, admin, classes') . "<br /><span class='field-help'>" . EXTLAN_20 . "</span>\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td>" . EXTLAN_6 . "</td>\n\t\t<td colspan='3'>\n\t\t" . r_userclass("user_read", $current['user_extended_struct_read'], 'off', 'public, member, admin, classes, readonly') . "<br /><span class='field-help'>" . EXTLAN_22 . "</span>\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td >" . EXTLAN_7 . "</td>\n\t\t<td colspan='3'>\n\t\t" . r_userclass("user_write", $current['user_extended_struct_write'], 'off', 'member, admin, classes') . "<br /><span class='field-help'>" . EXTLAN_21 . "</span>\n\t\t</td>\n\t\t</tr>\n\t\t</table>";
     $text .= "<div class='buttons-bar center'>";
     if (!is_array($current)) {
         $text .= $frm->admin_button('add_category', EXTLAN_39);
     } else {
         $text .= $frm->admin_button('update_category', EXTLAN_42, 'update') . $frm->admin_button('cancel', EXTLAN_33);
     }
     // ======= end added by Cam.
     $text .= "</div></form></div>";
     $emessage = e107::getMessage();
     $ns->tablerender(EXTLAN_9, $emessage->render() . $text);
 }
예제 #26
0
if ($class_total == "0") {
    $text .= UCSLAN_7;
} else {
    $text .= "<span class='defaulttext'>" . UCSLAN_8 . ":</span>\n\t\t<select name='existing' class='tbox'>";
    while ($row = $sql->db_Fetch()) {
        if (check_class($row['userclass_editclass']) || getperms("0")) {
            $text .= "<option value='{$row['userclass_id']}'>{$row['userclass_name']}</option>";
        }
    }
    $text .= "</select>\n\t\t<input class='button' type='submit' name='edit' value='" . LAN_EDIT . "' />\n\t\t<input class='button' type='submit' name='delete' value='" . LAN_DELETE . "' />\n\t\t<input type='checkbox' name='confirm' value='1' /><span class='smalltext'> " . UCSLAN_11 . "</span>\n\t\t</td>\n\t\t</tr>";
}
$text .= "\n\t<tr>\n\t<td class='forumheader3' style='width:30%'>" . UCSLAN_12 . "</td>\n\t<td class='forumheader3' style='width:70%'>\n\t<input class='tbox' type='text' size='30' maxlength='25' name='userclass_name' value='{$userclass_name}' /></td>\n\t</tr>\n\t<tr>\n\t<td class='forumheader3'>" . UCSLAN_13 . "</td>\n\t<td class='forumheader3' style='width:70%'><input class='tbox' type='text' size='60' maxlength='85' name='userclass_description' value='{$userclass_description}' /></td>\n\t</tr>\n\t";
if (!isset($userclass_editclass)) {
    $userclass_editclass = e_UC_ADMIN;
}
$text .= "\n\t<tr>\n\t<td class='forumheader3'>" . UCSLAN_24 . "</td>\n\t<td class='forumheader3'>" . r_userclass("userclass_editclass", $userclass_editclass, "off", "main,admin,classes,matchclass,public,nobody") . "</td>\n\t</tr>\n\t";
$text .= "\n\t<tr><td colspan='2' style='text-align:center' class='forumheader'>";
if (isset($_POST['edit'])) {
    $text .= "<input class='button' type='submit' name='updateclass' value='" . UCSLAN_14 . "' />\n\t\t<input type='hidden' name='userclass_id' value='{$userclass_id}' />";
} else {
    $text .= "<input class='button' type='submit' name='createclass' value='" . UCSLAN_15 . "' />";
}
$text .= "</td></tr></table>";
if (isset($_POST['edit'])) {
    $sql->db_Select("user", "user_id, user_name, user_class, user_login", "user_ban != 1 ORDER BY user_name ");
    $c = 0;
    $d = 0;
    while ($row = $sql->db_Fetch()) {
        extract($row);
        if (check_class($userclass_id, $user_class)) {
            $in_userid[$c] = $user_id;
예제 #27
0
파일: poll_class.php 프로젝트: armpit/e107
 /**
  * Render a Poll creation Form
  * @param $mode string - admin | forum | front 
  */
 function renderPollForm($mode = 'admin')
 {
     $tp = e107::getParser();
     $frm = e107::getForm();
     //	echo "MODE=".$mode;
     //XXX New v2.x default for front-end. Currently used by forum-post in bootstrap mode.
     // TODO LAN - Needs a more generic LAN rewrite when used on another area than forum
     if ($mode == 'front') {
         $text = "\n\t\t\t\n\t\t\t<div class='alert alert-info'>\n\t\t\t\t<small >" . LAN_FORUM_3029 . "</small>\n\t\t\t</div>";
         //		$text .= "<form>";
         $text .= "\n\n\t\t\t\t<div class='form-group'>\n\t\t\t\t\t<label for='poll_title'>Poll question</label>\n\t\t\t\t\t" . $frm->text('poll_title', $tp->post_toForm(vartrue($_POST['poll_title'])), '200', array('placeholder' => LAN_FORUM_3030, 'id' => 'poll_title')) . " \n\t\t\t\t</div>";
         $option_count = vartrue($_POST['poll_option']) ? count($_POST['poll_option']) : 2;
         $text .= "\t\t\n\t\t\t\t<div id='pollsection'>\n\t\t\t\t\t<label for='pollopt'>Poll answers</label>";
         for ($count = 1; $count <= $option_count; $count++) {
             // if ($count != 1 && $_POST['poll_option'][($count-1)] =="")
             // {
             // //	break;
             // }
             $opt = $count == 1 ? "id='poll_answer'" : "";
             $text .= "<div class='form-group' " . $opt . ">\n\t\t\t\t\t\t\t\t" . $frm->text('poll_option[]', $_POST['poll_option'][$count - 1], '200', array('placeholder' => LAN_FORUM_3031, 'id' => $opt)) . "\n\t\t\t\t\t\t\t  </div>";
         }
         $text .= "</div>";
         // end pollsection div
         $text .= "<div  class='form-group control-group'>\n\t\t\t\t\t\t\t<input class='btn btn-default' type='button' id='addoption' name='addoption' value='" . LAN_FORUM_3032 . "' />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t";
         //FIXME - get this looking good with Bootstrap CSS only.
         $opts = array(1 => LAN_YES, 0 => LAN_NO);
         // Set to IP address.. Can add a pref to Poll admin for 'default front-end storage method' if demand is there for it.
         $text .= "<br />\n\t\t\t <div class='form-horizontal control-group'>\n\t\t\t\t<label class='control-label'>" . LAN_FORUM_3033 . "</label>\n\t\t\t\t<div class='radio controls'>\n\t\t\t\t\t" . $frm->radio('multipleChoice', $opts, vartrue($_POST['multipleChoice'], 0)) . $frm->hidden('storageMethod', 1) . "\n\t\t\t\t</div>\n\t\t\t</div>\t\t\t\n\t\t";
         //	$text .= "</form>";
         return $text;
         /*
         $text .= "
         	<div class='controls controls-row'>".POLL_506."
         	
         	<input type='radio' name='multi/pleChoice' value='1'".(vartrue($_POST['multipleChoice']) ? " checked='checked'" : "")." /> ".POLL_507."&nbsp;&nbsp;
         	<input type='radio' name='multi/pleChoice' value='0'".(!$_POST['multipleChoice'] ? " checked='checked'" : "")." /> ".POLL_508."
         	
         	</div>";
         */
         //XXX Should NOT be decided by USER
         /*
         $text .= "
         
         <div>
         ".POLLAN_16."
         
         <input type='radio' name='storageMethod' value='0'".(!vartrue($_POST['storageMethod']) ? " checked='checked'" : "")." /> ".POLLAN_17."<br />
         <input type='radio' name='storageMethod' value='1'".($_POST['storageMethod'] == 1 ? " checked='checked'" : "")." /> ".POLLAN_18."<br />
         <input type='radio' name='storageMethod' value='2'".($_POST['storageMethod'] ==2 ? " checked='checked'" : "")." /> ".POLLAN_19."
         </div>
         ";
         */
     }
     //TODO Hardcoded FORUM code needs to be moved somewhere.
     if ($mode == 'forum') {
         $text = "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'><span class='smalltext'>" . LAN_FORUM_3029 . "</span></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width:20%'><div class='normaltext'>" . LAN_FORUM_3030 . ": </div></td>\n\t\t\t\t<td style='width:80%'class='forumheader3'><input class='tbox' type='text' name='poll_title' size='70' value='" . $tp->post_toForm(vartrue($_POST['poll_title'])) . "' maxlength='200' /></td>\n\t\t\t</tr>";
         $option_count = count(vartrue($_POST['poll_option'])) ? count($_POST['poll_option']) : 1;
         $text .= "\n\t\t\t<tr>\n\t\t\t\t<td style='width:20%'>" . LAN_FORUM_3031 . "</td>\n\t\t\t\t<td style='width:80%'>\n\t\t\t\t<div id='pollsection'>";
         for ($count = 1; $count <= $option_count; $count++) {
             if ($count != 1 && $_POST['poll_option'][$count - 1] == "") {
                 break;
             }
             $opt = $count == 1 ? "id='pollopt'" : "";
             $text .= "<span {$opt}><input  class='tbox' type='text' name='poll_option[]' size='40' value=\"" . $_POST['poll_option'][$count - 1] . "\" maxlength='200' />";
             $text .= "</span><br />";
         }
         $text .= "\n\t\t\t\t</div>\n\t\t\t\t<input class='btn btn-default button' type='button' name='addoption' value='" . LAN_FORUM_3032 . "' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width:20%'>" . LAN_FORUM_3033 . "</td>\n\t\t\t\t<td style='width:80%'>\n\t\t\t\t<input type='radio' name='multipleChoice' value='1'" . (vartrue($_POST['multipleChoice']) ? " checked='checked'" : "") . " /> " . LAN_YES . "&nbsp;&nbsp;\n\t\t\t\t<input type='radio' name='multipleChoice' value='0'" . (!$_POST['multipleChoice'] ? " checked='checked'" : "") . " /> " . LAN_NO . "\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width:30%'>" . LAN_FORUM_3034 . "</td>\n\t\t\t\t<td>\n\t\t\t\t\t<input type='radio' name='storageMethod' value='0'" . (!vartrue($_POST['storageMethod']) ? " checked='checked'" : "") . " /> " . LAN_FORUM_3035 . "<br />\n\t\t\t\t\t<input type='radio' name='storageMethod' value='1'" . ($_POST['storageMethod'] == 1 ? " checked='checked'" : "") . " /> " . LAN_FORUM_3036 . "<br />\n\t\t\t\t\t<input type='radio' name='storageMethod' value='2'" . ($_POST['storageMethod'] == 2 ? " checked='checked'" : "") . " /> " . LAN_FORUM_3037 . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t";
         return $text;
     }
     $formgo = e_SELF . (e_QUERY && !defined("RESET") && strpos(e_QUERY, 'delete') === FALSE ? "?" . e_QUERY : "");
     $text = "<div>\n\t\t<form method='post' action='{$formgo}'>\n\t\t<table class='table adminform'>\n        <colgroup>\n\t\t\t<col class='col-label' />\n\t\t\t<col class='col-control' />\n\t\t</colgroup>\n\t\t<tr>\n\t\t<td style='width:30%'><div class='normaltext'>" . POLLAN_3 . ":</div></td>\n\t\t<td style='width:70%'>\n\t\t<input class='tbox input-xxlarge' type='text' name='poll_title' size='70' value='" . $tp->post_toForm(varset($_POST['poll_title'])) . "' maxlength='200' />";
     $option_count = varset($_POST['poll_option']) && count($_POST['poll_option']) ? count($_POST['poll_option']) : 2;
     $text .= "</td></tr><tr>\n\t\t<td style='width:30%;vertical-align:top'>" . LAN_OPTIONS . " :</td>\n\t\t<td style='width:70%'>\n\t\t<div id='pollsection'>";
     for ($count = 1; $count <= $option_count; $count++) {
         $opt = $count == 1 ? "id='pollopt'" : "";
         $text .= "<span class='form-inline' style='display:inline-block; padding-bottom:5px' {$opt}><input  class='tbox input-large' type='text' name='poll_option[]' size='40' value=\"" . $tp->post_toForm($_POST['poll_option'][$count - 1]) . "\" maxlength='200' />";
         $text .= "</span><br />";
     }
     $text .= "</div><input class='btn btn-default' type='button' name='addoption' value='" . POLLAN_8 . "' onclick=\"duplicateHTML('pollopt','pollsection')\" /><br />\n\t\t</td></tr>\n\n\t\t<tr>\n\t\t<td style='width:30%'>" . POLLAN_9 . "</td>\n\t\t<td style='width:70%'>\n\t\t<input type='radio' name='multipleChoice' value='1'" . (varset($_POST['multipleChoice']) ? " checked='checked'" : "") . " /> " . POLLAN_10 . "&nbsp;&nbsp;\n\t\t<input type='radio' name='multipleChoice' value='0'" . (!varset($_POST['multipleChoice']) ? " checked='checked'" : "") . " /> " . POLLAN_11 . "\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td style='width:30%'>" . POLLAN_12 . "</td>\n\t\t<td style='width:70%'>\n\t\t<input type='radio' name='showResults' value='0'" . (!varset($_POST['showResults']) ? " checked='checked'" : "") . " /> " . POLLAN_13 . "<br />\n\t\t<input type='radio' name='showResults' value='1'" . (varset($_POST['showResults']) ? " checked='checked'" : "") . " /> " . POLLAN_14 . "\n\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td style='width:30%'>" . POLLAN_15 . "</td>";
     $uclass = ADMIN ? "" : "public,member,admin,classes,matchclass";
     $text .= "\n\t\t<td>" . r_userclass("pollUserclass", vartrue($_POST['pollUserclass']), 'off', $uclass) . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td style='width:30%'>" . POLLAN_16 . "</td>\n\t\t<td>\n\t\t<input type='radio' name='storageMethod' value='0'" . (!varset($_POST['storageMethod']) ? " checked='checked'" : "") . " /> " . POLLAN_17 . "<br />\n\t\t<input type='radio' name='storageMethod' value='1'" . (varset($_POST['storageMethod']) == 1 ? " checked='checked'" : "") . " /> " . POLLAN_18 . "<br />\n\t\t<input type='radio' name='storageMethod' value='2'" . (varset($_POST['storageMethod']) == 2 ? " checked='checked'" : "") . " /> " . POLLAN_19 . "\n\t\t</td></tr>\n\n\t\t<tr>\n\t\t<td>" . POLLAN_20 . ": </td><td>\n\t\t<input type='radio' name='poll_comment' value='1'" . (varset($_POST['poll_comment']) ? " checked='checked'" : "") . " /> " . POLLAN_10 . "\n\t\t<input type='radio' name='poll_comment' value='0'" . (!varset($_POST['poll_comment']) ? " checked='checked'" : "") . " /> " . POLLAN_11 . "\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t<div class='buttons-bar center'>";
     if (isset($_POST['preview']) || varset($_POST['edit'])) {
         // $text .= "<input  type='submit' name='preview' value='".POLLAN_24."' /> ";
         $text .= $frm->admin_button('preview', POLLAN_24, 'other');
         if (POLLACTION == 'edit') {
             $text .= $frm->admin_button('submit', LAN_UPDATE, 'update') . "\n\t\t\t\t\n\t\t\t\t<input type='hidden' name='poll_id' value='" . intval($_POST['poll_id']) . "' /> ";
         } else {
             $text .= $frm->admin_button('submit', 'no-value', 'submit', LAN_CREATE);
             //	$text .= "<input type='submit' name='submit' value='".POLLAN_23."' /> ";
         }
     } else {
         $text .= $frm->admin_button('preview', 'no-value', 'other', POLLAN_24);
         //	$text .= "<input  type='submit' name='preview' value='".POLLAN_24."' /> ";
     }
     if (defset('POLLID')) {
         $text .= $frm->admin_button('reset', 'no-value', 'reset', POLLAN_25);
         //	$text .= "<input  type='submit' name='reset' value='".POLLAN_25."' /> ";
     }
     $text .= "</div>\n\t\t</form>\n\t\t</div>";
     return $text;
 }
예제 #28
0
파일: e_gold.php 프로젝트: testt98/ebattles
 function ebattles_configure_edit()
 {
     global $gold_obj, $pref;
     $retval = "\r\n\t<form method='POST' action='" . e_SELF . "' id='ebattles' >\r\n\t<div><input type='hidden' name='gold_plugin' value='ebattles' /></div>\r\n\t<table class='fborder' style='" . ADMIN_WIDTH . "'>\r\n\t<tr>\r\n\t<td class='fcaption' colspan='2'  style='text-align:center; font-size:12pt'><b>" . EB_GOLD_L1 . "</b></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='forumheader3' style='width:386'>" . EB_GOLD_L4 . " <div class='smalltext'>" . EB_GOLD_L5 . "</div></td>\r\n\t<td class='forumheader3' style='width:451'>\r\n        " . r_userclass("eb_gold_userclass", $pref['eb_gold_userclass'], 'off', "public, member, admin, classes, nobody") . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='forumheader3' style='width:386'>" . EB_GOLD_L6 . "</td>\r\n\t<td class='forumheader3' style='width:451'>\r\n        <input type='textbox' class='tbox' name='eb_gold_playmatch' value='" . $pref['eb_gold_playmatch'] . "'></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='forumheader2' colspan='2' style='text-align:center'><input type='submit' class='button' name='gold_save' value='" . EB_GOLD_L2 . "'</td>\r\n\t</tr>\t\t\t\r\n\t</table>\r\n\t</form>";
     return $retval;
 }
예제 #29
0
function show_upload_options()
{
    global $pref, $ns;
    require_once e_HANDLER . "form_handler.php";
    $frm = new e_form(true);
    //enable inner tabindex counter
    $text = "\n           <form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n            <fieldset id='core-download-upload1'>\n               <div>\n                  <table class='table adminform'>\n                     <colgroup>\n                        <col style='width:30%'/>\n                        <col style='width:70%'/>\n                     </colgroup>\n                     <tr>\n                        <td>" . DOWLAN_26 . "</td>\n                        <td>" . $frm->radio_switch('upload_enabled', $pref['upload_enabled']) . "<div class='field-help'>" . $frm->label(DOWLAN_51, 'upload_enabled', '1') . "</div>" . "</td>\n                     </tr>\n                     <tr>\n                        <td>" . DOWLAN_35 . "</td>\n                        <td>" . $frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], '4', array('size' => '10')) . "<div class='field-help'>" . $frm->label(str_replace(array("%1", "%2"), array(ini_get('upload_max_filesize'), ini_get('post_max_size')), DOWLAN_58), 'upload_maxfilesize', '1') . "</div>" . "</td>\n                     </tr>\n                     <tr>\n                        <td>" . DOWLAN_61 . "</td>\n                        <td>" . r_userclass("upload_class", $pref['upload_class']) . "<div class='field-help'>" . $frm->label(DOWLAN_60, 'upload_class', '1') . "</div>" . "</td>\n                     </tr>\n                  </table>\n        \t</div>\n            </fieldset>\n            <div class='buttons-bar center'>\n               <input class='btn btn-default button' type='submit' name='updateuploadoptions' value='" . DOWLAN_64 . "'/>\n            </div>\n           </form>\n      ";
    $ns->tablerender(LAN_DL_OPTIONS, $text);
}
예제 #30
0
파일: prefs.php 프로젝트: notzen/e107
foreach ($CHAP_list as $ab => $ab_title) {
    $text .= "\n\t\t\t\t\t\t\t\t" . $frm->option($ab_title, $ab, $pref['password_CHAP'] == $ab) . "\n\t";
}
$text .= "\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t<div class='smalltext field-help'>" . PRFLAN_183 . "<br />" . PRFLAN_179 . "</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_40 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('profanity_filter', $pref['profanity_filter']) . "\n\t\t\t\t\t\t\t<div class='smalltext field-help'>" . PRFLAN_41 . "</div>\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_42 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->text('profanity_replace', $pref['profanity_replace'], 20) . "\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_43 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->tags('profanity_words', $pref['profanity_words']) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_44 . "</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_35 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('antiflood1', $pref['antiflood1']) . "\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_36 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->number('antiflood_timeout', $pref['antiflood_timeout'], 3) . "\n\t\t\t\t\t\t\t<div class='smalltext field-help'>" . PRFLAN_38 . "</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_37 . "</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->select_open('autoban');
$autoban_list = array(PRFLAN_113, PRFLAN_144, PRFLAN_142, PRFLAN_143);
foreach ($autoban_list as $ab => $ab_title) {
    $sel = $pref['autoban'] == $ab ? "selected='selected'" : "";
    $text .= "\n\t\t\t\t\t\t\t\t" . $frm->option($ab_title, $ab, $pref['autoban'] == $ab) . "\n\t";
}
$text .= "\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_91 . "</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_139 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('adminpwordchange', $pref['adminpwordchange']) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t" . pref_submit('security') . "\n\t\t</fieldset>\n";
$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>Allow users to post comments: </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>Moderate Comments made by: </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'>Comments will require manual approval by an admin prior to being visible to other users</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>Comment Sorting: </td>\n\t\t\t\t\t\t<td>";
$comment_sort = array("desc" => "Most recent comments first", 'asc' => "Most recent comments last");
$text .= $frm->selectbox('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");
$text .= "\n\t<fieldset class='e-hideme' id='core-prefs-uploads'>\n\t\t\t<legend>File Uploading</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<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 . " (upload_max_filesize = " . ini_get('upload_max_filesize') . ", post_max_size = " . ini_get('post_max_size') . " )</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</tbody>\n\t\t</table>\n\t\t\t" . pref_submit('uploads') . "\n\t\t</fieldset>";
// Javascript Control
//TODO LANS
$text .= "\n\t\t\t<fieldset class='e-hideme' id='core-prefs-javascript'>\n\t\t\t<legend>Javascript Frameworks (for testing purposes only)</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' => 'Auto (on-demand)', 'admin' => 'Admin Area', 'front' => 'Front-End', 'all' => "Both", 'none' => 'Disabled');
//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' => 'prototype', 'name' => 'Prototype (local)'), array('id' => 'jquery', 'name' => 'jQuery (local)'));
//TODO // separate switch for CDN.. or automatic fall-back.
foreach ($js_types as $arr) {
    // $k = $arr['path'];
    $k = $arr['id'];
    $name = $arr['name'];
    $text .= "<tr>\n\t\t\t\t<td>" . $name . "</td>\n\t\t\t\t<td>" . $frm->radio_multi("e_jslib_core[{$k}]", $js_options, $pref['e_jslib_core'][$k]) . "</td>\n\t\t\t\t</tr>";
}