public function showForm($mes) { $ns = e107::getRender(); $frm = new form(); $text = $frm->form_open('post', e_SELF); $text .= "<table class='table adminform'>"; $text .= "<tr><td>" . LAN_RADIUS_01 . "</td><td>"; $text .= $frm->form_text('radius_server', 35, vartrue($this->radius['radius_server']), 120); $text .= "</td></tr>\n"; $text .= "<tr><td>" . LAN_RADIUS_02 . "</td><td>"; $text .= $frm->form_text('radius_secret', 35, vartrue($this->radius['radius_secret']), 200); $text .= "</td></tr>\n"; $tmp = $this->alt_auth_get_field_list('radius', $frm, $this->radius, FALSE); if ($tmp) { $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>\n" . $tmp; unset($tmp); } $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>"; // $text .= $frm -> form_button("submit", "update", LAN_ALT_2); $text .= e107::getForm()->admin_button('update', LAN_UPDATE, 'update'); $text .= "</td></tr>\n"; $text .= "</table>\n"; $text .= $frm->form_close(); $ns->tablerender(LAN_RADIUS_06, $mes->render() . $text); $ns->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('radius', $frm)); }
function show_importdb_form() { $ns = e107::getRender(); $parm = altAuthGetParams('importdb'); $frm = new form(); $text = $frm->form_open('post', e_SELF); $text .= "<table class='table adminform'>\r\n\t<colgroup span='2'>\r\n\t\t<col class='col-label' />\r\n\t\t<col class='col-control' />\r\n\t</colgroup>"; $text .= "<tr><td colspan='2'>" . IMPORTDB_LAN_11 . "</td></tr>"; $text .= "<tr><td>" . IMPORTDB_LAN_9 . "</td><td>"; $text .= altAuthGetPasswordSelector('importdb_password_method', $frm, $parm['importdb_password_method'], TRUE); $text .= "</td></tr>"; $text .= "</table><div class='buttons-bar center'>"; $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update'); $text .= "</div>"; $text .= $frm->form_close(); $ns->tablerender(IMPORTDB_LAN_10, $text); $ns->tablerender(LAN_ALT_40 . LAN_ALT_41, alt_auth_test_form('importdb', $frm)); }
public function showForm() { $ns = e107::getRender(); $parm = $this->altAuthGetParams('e107db'); $frm = new form(); $text = $frm->form_open('post', e_SELF); $text .= "<table class='table adminform'>\r\n\t\t<colgroup span='2'>\r\n\t\t\t<col class='col-label' />\r\n\t\t\t<col class='col-control' />\r\n\t\t</colgroup>"; $text .= "<tr><td>" . LAN_ALT_26 . "</td><td>"; $text .= E107DB_LAN_1; $text .= "</td></tr>"; $text .= $this->alt_auth_get_db_fields('e107db', $frm, $parm, 'server|uname|pwd|db|prefix|classfilt'); $text .= "<tr><td>" . E107DB_LAN_9 . "</td><td>"; $text .= $this->altAuthGetPasswordSelector('e107db_password_method', $frm, $parm['e107db_password_method'], FALSE); $text .= "</td></tr>"; $text .= "<tr><td colspan='2'><br />" . E107DB_LAN_11 . "</td></tr>"; $text .= $this->alt_auth_get_field_list('e107db', $frm, $parm, TRUE); $text .= "</table><div class='buttons-bar center'>"; $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update'); // $text .= $frm -> form_button("submit", "update", LAN_ALT_UPDATESET); $text .= '</div>'; $text .= $frm->form_close(); $ns->tablerender(E107DB_LAN_10, $text); $ns->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('e107db', $frm)); }
function show_otherdb_form() { $ns = e107::getRender(); $parm = altAuthGetParams('otherdb'); $frm = new form(); $text = $frm->form_open("post", e_SELF); $text .= "<table class='table adminform'>"; $text .= "<tr><td>" . LAN_ALT_26 . "</td><td>"; $text .= OTHERDB_LAN_15; $text .= "</td></tr>"; $text .= alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt'); $text .= "<tr><td>" . OTHERDB_LAN_9 . "</td><td>"; $text .= altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE); $text .= "</td></tr>"; $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>"; $text .= alt_auth_get_field_list('otherdb', $frm, $parm, FALSE); $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>"; $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update'); $text .= '</td></tr>'; $text .= '</table>'; $text .= $frm->form_close(); $ns->tablerender(OTHERDB_LAN_10, $text); $ns->tablerender(LAN_ALT_40 . LAN_ALT_41, alt_auth_test_form('otherdb', $frm)); }
function showOptionsOrder($mode, $ordertypeid = "") { global $plugindir, $rs, $qs; if (!is_object($rs)) { require_once e_HANDLER . "form_handler.php"; $rs = new form(); } if (!isset($ordertypeid)) { $ordertypeid = is_numeric($qs[1]) ? $qs[1] : $qs[2]; } $text = ""; if (strpos(e_SELF, 'content.php') !== FALSE) { if (e_QUERY) { $check = ""; for ($i = 0; $i < count($qs); $i++) { if ($qs[$i] && substr($qs[$i], 0, 5) == "order") { $check = $qs[$i]; break; } } $baseurl = $plugindir . "content.php"; $qry = (isset($qs[0]) && substr($qs[0], 0, 5) != "order" ? $qs[0] : "") . (isset($qs[1]) && substr($qs[1], 0, 5) != "order" ? "." . $qs[1] : "") . (isset($qs[2]) && substr($qs[2], 0, 5) != "order" ? "." . $qs[2] : "") . (isset($qs[3]) && substr($qs[3], 0, 5) != "order" ? "." . $qs[3] : ""); $text = $rs->form_open("post", $baseurl . "?{$qs['0']}.{$ordertypeid}", "contentsearchorder{$mode}", "", "enctype='multipart/form-data'"); $text .= "<div><select id='ordervalue{$mode}' name='ordervalue{$mode}' class='tbox' onchange=\"if(this.options[this.selectedIndex].value != 'none'){ return document.location=this.options[this.selectedIndex].value; }\">"; $text .= $rs->form_option(CONTENT_ORDER_LAN_0, 1, "none"); if ($qs[0] == "author" && $qs[1] == "list") { $text .= $rs->form_option(CONTENT_ORDER_LAN_11, $check == "orderaauthor" ? "1" : "0", $baseurl . "?" . $qry . ".orderaauthor"); $text .= $rs->form_option(CONTENT_ORDER_LAN_12, $check == "orderdauthor" ? "1" : "0", $baseurl . "?" . $qry . ".orderdauthor"); } else { $text .= $rs->form_option(CONTENT_ORDER_LAN_1, $check == "orderaheading" ? "1" : "0", $baseurl . "?" . $qry . ".orderaheading"); $text .= $rs->form_option(CONTENT_ORDER_LAN_2, $check == "orderdheading" ? "1" : "0", $baseurl . "?" . $qry . ".orderdheading"); $text .= $rs->form_option(CONTENT_ORDER_LAN_3, $check == "orderadate" ? "1" : "0", $baseurl . "?" . $qry . ".orderadate"); $text .= $rs->form_option(CONTENT_ORDER_LAN_4, $check == "orderddate" ? "1" : "0", $baseurl . "?" . $qry . ".orderddate"); $text .= $rs->form_option(CONTENT_ORDER_LAN_5, $check == "orderarefer" ? "1" : "0", $baseurl . "?" . $qry . ".orderarefer"); $text .= $rs->form_option(CONTENT_ORDER_LAN_6, $check == "orderdrefer" ? "1" : "0", $baseurl . "?" . $qry . ".orderdrefer"); $text .= $rs->form_option(CONTENT_ORDER_LAN_7, $check == "orderaparent" ? "1" : "0", $baseurl . "?" . $qry . ".orderaparent"); $text .= $rs->form_option(CONTENT_ORDER_LAN_8, $check == "orderdparent" ? "1" : "0", $baseurl . "?" . $qry . ".orderdparent"); $text .= $rs->form_option(CONTENT_ORDER_LAN_9, $check == "orderaorder" ? "1" : "0", $baseurl . "?" . $qry . ".orderaorder"); $text .= $rs->form_option(CONTENT_ORDER_LAN_10, $check == "orderdorder" ? "1" : "0", $baseurl . "?" . $qry . ".orderdorder"); } $text .= $rs->form_select_close(); $text .= "</div>"; $text .= $rs->form_close(); } } return $text; }
<?php require_once 'inc_security.php'; $total_money = getValue('total', 'int', 'GET', 0); $content_column = ''; $form = new form(); $content_column .= $form->form_open('debit_form'); $content_column .= $form->text(array('label' => 'Số tiền phải trả', 'name' => 'debit_total_money', 'id' => 'debit_total_money', 'value' => number_format($total_money), 'readonly' => 1, 'addon' => DEFAULT_MONEY_UNIT)); $content_column .= $form->text(array('label' => 'Thanh toán', 'name' => 'debit_money_paid', 'id' => 'debit_money_paid', 'value' => 0, 'addon' => DEFAULT_MONEY_UNIT)); $content_column .= $form->text(array('label' => 'Còn lại', 'name' => 'debit_money_debit', 'id' => 'debit_money_debit', 'value' => number_format($total_money), 'readonly' => 1, 'addon' => DEFAULT_MONEY_UNIT)); $content_column .= $form->text(array('label' => 'Ngày hẹn trả', 'name' => 'debit_date_debit', 'id' => 'debit_date_debit', 'value' => date('d/m/Y', time() + 84600))); $content_column .= '<div class="form-group debit-submit"> <button type="button" class="btn btn-primary" onclick="debitSubmit()">Đồng ý</button> <button class="btn btn-default">Hủy bỏ</button> </div>'; $content_column .= $form->form_close(); add_more_css('css/debit.css?v=1', $load_header); $rainTpl = new RainTPL(); $rainTpl->assign('load_header', $load_header); $rainTpl->assign('content_column', $content_column); $rainTpl->assign('total_money', $total_money); $rainTpl->draw('/v2/home/debit');
$myform->addTable($bg_table_district); $myform->add('dis_city_id', 'dis_city_id', 1, 0, 0, 1, 'Bạn chưa chọn tỉnh/thành phố'); $myform->add('dis_name', 'dis_name', 0, 0, '', 1, 'Bạn chưa nhập tên quận/huyện'); $myform->add('dis_static_fee', 'dis_static_fee', 1, 0, 0); $action = getValue('action', 'str', 'POST', ''); if ($action == 'execute') { $bg_errorMsg = $myform->checkdata(); if (!$bg_errorMsg) { $db_insert = new db_execute_return(); $last_id = $db_insert->db_execute($myform->generate_insert_SQL()); $form_redirect = getValue('form_redirect', 'str', 'POST', ''); redirect($form_redirect); } } #Phần hiển thị $rainTpl = new RainTPL(); $rainTpl->assign('load_header', $load_header); $rainTpl->assign('module_name', $module_name); $rainTpl->assign('error_msg', print_error_msg($bg_errorMsg)); $html_page = ''; $form = new form(); $html_page .= $form->form_open('add_new'); $html_page .= $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập'); $html_page .= $form->select(array('label' => 'Chọn tỉnh/thành phố', 'name' => 'dis_city_id', 'id' => 'dis_city_id', 'require' => 1, 'option' => $array_city, 'selected' => getValue('dis_city_id', 'int', 'POST', 0), 'errorMsg' => 'Bạn chưa chọn tỉnh - thành phố')); $html_page .= $form->text(array('label' => 'Nhập tên quận - huyện', 'name' => 'dis_name', 'id' => 'dis_name', 'value' => getValue('dis_name', 'str', 'POST', ''), 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên quận - huyện')); $html_page .= $form->number(array('label' => 'Phí ship cố định', 'name' => 'dis_static_fee', 'id' => 'dis_static_fee', 'addon' => 'VNĐ', 'value' => getValue('dis_static_fee', 'int', 'POST', 0))); $html_page .= $form->form_redirect(array('list' => array('Thêm mới' => 'add_district.php', 'Danh sách' => 'listing.php'))); $html_page .= $form->form_action(array('label' => array('Thêm mới', 'Nhập lại'), 'type' => array('submit', 'reset'))); $html_page .= $form->form_close(); $rainTpl->assign('html_page', $html_page); $rainTpl->draw('add');
if ($pha_nhom_duoc_ly_id != 0) { $check_name_ndl = new db_query('SELECT phg_name FROM pharma_group WHERE phg_id = "' . $pha_nhom_duoc_ly_id . '" LIMIT 1'); $check_name_ndl = mysqli_fetch_assoc($check_name_ndl->result); $check_name_ndl = $check_name_ndl['phg_name']; } #Phần hiển thị $rainTpl = new RainTPL(); $rainTpl->assign('load_header', $load_header); $rainTpl->assign('module_name', $module_name); $rainTpl->assign('error_msg', print_error_msg($bg_errorMsg)); $html_page = ''; $form = new form(); $html_page .= $form->form_open(); $html_page .= $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập'); /** * something here */ $html_page .= $form->text(array('label' => 'Tên thuốc', 'name' => 'pha_name', 'id' => 'pha_name', 'value' => $pha_name, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên thuốc', 'placeholder' => 'tên thuốc', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Tiêu đề thuốc', 'name' => 'pha_title', 'id' => 'pha_title', 'value' => $pha_title, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tiêu đề thuốc', 'placeholder' => 'tiêu đề thuốc', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->textarea(array('label' => 'Mô tả', 'name' => 'pha_description', 'id' => 'pha_description', 'value' => $pha_description, 'require' => 0, 'placeholder' => 'Mô tả thuốc', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->textarea(array('label' => 'Nội dung', 'name' => 'pha_content', 'id' => 'pha_content', 'value' => $pha_content, 'require' => 0, 'placeholder' => 'Nội dung thuốc', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Mã đăng ký', 'name' => 'pha_so_dang_ky', 'id' => 'pha_so_dang_ky', 'value' => $pha_so_dang_ky, 'require' => 1, 'placeholder' => 'Mã đăng ký', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Dạng bào chế', 'name' => 'pha_dang_bao_che', 'id' => 'pha_dang_bao_che', 'value' => $pha_dang_bao_che, 'require' => 1, 'placeholder' => 'Dạng bào chế', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Đóng gói', 'name' => 'pha_dong_goi', 'id' => 'pha_dong_goi', 'value' => $pha_dong_goi, 'require' => 0, 'placeholder' => 'Pha đóng gói', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Giá bán buôn', 'name' => 'pha_gia_buon', 'id' => 'pha_gia_buon', 'value' => $pha_gia_buon, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Giá bán lẻ', 'name' => 'pha_gia_le', 'id' => 'pha_gia_le', 'value' => $pha_gia_le, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Nhà sản xuất', 'name' => 'pha_nha_sx_name', 'id' => 'pha_nha_sx_name', 'value' => $pha_nha_sx_name, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => '')); $html_page .= $form->text(array('label' => 'Nhà đăng ký', 'name' => 'pha_nha_dk_name', 'id' => 'pha_nha_dk_name', 'value' => $pha_nha_dk_name, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
<script type="text/javascript" src="../js/bootstrap.min.js"></script> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <div id="wrapper"> <?php echo $errorMsg; ?> <?php echo $success; ?> <a href="/admin/logout.php" style="padding: 8px;">Thoát đăng nhập</a> <?php $form = new form(); ?> <?php echo $form->form_open('add_new', $_SERVER['REQUEST_URI']); ?> <?php echo $form->textnote(array('Thay đổi mật khẩu quản trị viên')); ?> <?php echo $form->password(array('label' => 'Mật khẩu cũ', 'name' => 'old_pass', 'id' => 'old_pass', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập mật khẩu cũ')); ?> <?php echo $form->password(array('label' => 'Mật khẩu mới', 'name' => 'new_pass', 'id' => 'new_pass', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập mật khẩu mới')); ?> <?php echo $form->password(array('label' => 'Xác nhận mật khẩu ', 'name' => 'check_pass', 'id' => 'new_pass', 'require' => 1, 'errorMsg' => 'Mật khẩu xác nhận không khớp')); ?> <?php echo $form->form_action(array('label' => array('Thêm mới', 'Nhập lại'), 'type' => array('submit', 'reset')));
$mes->addSuccess(alt_auth_post_options('radius')); } if (!extension_loaded('radius')) { // $message .= "<br /><br /><div style='color:#f00; font-weight:bold'>".LAN_RADIUS_11."</div><br />"; $mes->addWarning(LAN_RADIUS_11); } if ($message) { $ns->tablerender("", "<div style='text-align:center;'>" . $message . "</div>"); } $sql->db_Select("alt_auth", "*", "auth_type = 'radius' "); while ($row = $sql->db_Fetch()) { $radius[$row['auth_parmname']] = base64_decode(base64_decode($row['auth_parmval'])); // Encoding is new for 0.8 } $frm = new form(); $text = $frm->form_open("post", e_SELF); $text .= "<table class='table adminform'>"; $text .= "<tr><td>" . LAN_RADIUS_01 . "</td><td>"; $text .= $frm->form_text("radius_server", 35, $radius['radius_server'], 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LAN_RADIUS_02 . "</td><td>"; $text .= $frm->form_text('radius_secret', 35, $radius['radius_secret'], 200); $text .= "</td></tr>"; $tmp = alt_auth_get_field_list('radius', $frm, $ldap, FALSE); if ($tmp) { $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>" . $tmp; unset($tmp); } $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>"; // $text .= $frm -> form_button("submit", "update", LAN_ALT_2); $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
echo $html; ?> </div> </div> <?php break; case 'loadFormPermission': $group_id = getValue('group', 'int', 'POST', 0); if ($group_id === 1) { echo 'Bạn không thể chỉnh sửa quyền của nhóm quản lý mặc định của hệ thống'; exit; } $html = ''; $form = new form(); $html .= mini_modal_open('Phân quyền nhóm tài khoản', 'style="height:236px;width:480px;"'); $html .= $form->form_open(); $html .= $form->textnote('Chú ý : Nếu trong 1 chức năng, không tick vào quyền sử dụng thì các quyền khác không có hiệu lực'); //lấy ra list các module, ứng với mỗi module lấy ra các quyền tương ứng $db_query = new db_query('SELECT * FROM modules'); $list_module = array(); while ($row = mysqli_fetch_assoc($db_query->result)) { //kiểm tra quyền của group trong mỗi module $db_role = new db_query('SELECT * FROM admin_group_role WHERE module_id = ' . $row['mod_id'] . ' AND group_id = ' . $group_id . ' LIMIT 1'); $true_roles = mysqli_fetch_assoc($db_role->result); unset($db_role); //Tạo các checkbox $list_checkbox = array(); //Checkbox quyền sử dụng - được tick khi mod_id match với true_role[module_id] $list_checkbox[] = array('name' => 'use_module[]', 'id' => 'use_module' . $row['mod_id'], 'value' => $row['mod_id'], 'label' => 'Sử dụng', 'is_check' => $true_roles ? TRUE : FALSE); //lấy ra các quyền đặc biệt của module $db_custom_role = new db_query('SELECT * FROM custom_roles WHERE rol_module_id = ' . $row['mod_id']);
} // Now get the info on each font. foreach ($fontList as $font => $info) { $fontList[$font]['info'] = getFontInfo($info['base']); } //print_a($fontList); return $fontList; } $fontList = getFontList(); $coreList = array(); foreach ($fontList as $font => $info) { if ($info['info']['type'] == 'core') { $coreList[$font] = $font; } } $text = "\n<div style='text-align:center'>\n" . $rs->form_open("post", e_SELF, "pdfform", "", "enctype='multipart/form-data'") . "\n<table class='fborder' style='" . ADMIN_WIDTH . "'>\n\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_5 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_left", 10, $pdfpref['pdf_margin_left'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_6 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_right", 10, $pdfpref['pdf_margin_right'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_7 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_top", 10, $pdfpref['pdf_margin_top'], 10) . "</td>\n</tr>"; $text .= "\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_8 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_select_open("pdf_font_family"); foreach ($coreList as $font => $info) { $text .= $rs->form_option($font, $pdfpref['pdf_font_family'] == $font ? "1" : "0", $font); } $text .= $rs->form_select_close() . "\n\t</td>\n</tr>\n\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_9 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size", 10, $pdfpref['pdf_font_size'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_10 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_sitename", 10, $pdfpref['pdf_font_size_sitename'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_11 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_page_url", 10, $pdfpref['pdf_font_size_page_url'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_12 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_page_number", 10, $pdfpref['pdf_font_size_page_number'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_13 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_logo", "1", $pdfpref['pdf_show_logo'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_logo", "0", $pdfpref['pdf_show_logo'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_14 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_sitename", "1", $pdfpref['pdf_show_sitename'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_sitename", "0", $pdfpref['pdf_show_sitename'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_15 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_page_url", "1", $pdfpref['pdf_show_page_url'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_page_url", "0", $pdfpref['pdf_show_page_url'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_16 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_page_number", "1", $pdfpref['pdf_show_page_number'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_page_number", "0", $pdfpref['pdf_show_page_number'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_20 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_error_reporting", "1", $pdfpref['pdf_error_reporting'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_error_reporting", "0", $pdfpref['pdf_error_reporting'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n\n<tr>\n\t<td style='text-align:center' class='forumheader' colspan='2'>" . $rs->form_button("submit", "update_pdf", PDF_LAN_17) . "</td>\n</tr>\n\n</table>\n" . $rs->form_close() . "\n</div>"; $ns->tablerender(PDF_LAN_2, $text); $text = "<div style='text-align:center;>\n\n<table cellpadding='0' cellspacing='0' class='adminform'>\n<tr><th>" . PDF_LAN_21 . "</th><th>" . PDF_LAN_22 . "</th><th>" . PDF_LAN_23 . "</th>\n\t<th>" . PDF_LAN_24 . "</th><th title='" . PDF_LAN_25 . "'>" . PDF_LAN_26 . "</th></tr>\n"; foreach ($fontList as $font => $info) { $wa = array(PDF_LAN_27); if (isset($info['b'])) { $wa[] = PDF_LAN_28; } if (isset($info['i'])) { $wa[] = PDF_LAN_29; }
} if (!function_exists('ldap_connect')) { // $message .= "<br /><br /><div style='color:#f00; font-weight:bold'>".LDAPLAN_11."</div><br />"; $mes->addWarning(LDAPLAN_11); } if ($message) { e107::getRender()->tablerender('', "<div style='text-align:center;'>" . $message . '</div>'); } $ldap = altAuthGetParams('ldap'); if (!isset($ldap['ldap_edirfilter'])) { $ldap['ldap_edirfilter'] == ''; } //print_a($ldap); $current_filter = "(&(cn=[USERNAME]){$ldap['ldap_edirfilter']})"; $frm = new form(); $text = $frm->form_open('post', e_SELF); $text .= "<table class='table adminform'>"; $text .= "<tr><td>" . LDAPLAN_12 . "</td><td>"; $text .= $frm->form_select_open("ldap_servertype"); foreach ($server_types as $v) { $sel = $ldap['ldap_servertype'] == $v ? " Selected='selected'" : ''; $text .= $frm->form_option($v, $sel, $v); } $text .= $frm->form_select_close(); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_1 . "</td><td>"; $text .= $frm->form_text("ldap_server", 35, $ldap['ldap_server'], 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_2 . "</td><td>"; $text .= $frm->form_text("ldap_basedn", 35, $ldap['ldap_basedn'], 120); $text .= "</td></tr>";
$message = LAN_SETSAVED; } } if (isset($_POST['main_delete'])) { $del_id = array_keys($_POST['main_delete']); welcome_adminlog('03', $wmId, ''); $message = $sql->db_Delete("generic", "gen_id='" . $del_id[0] . "' ") ? LAN_DELETED : LAN_DELETED_FAILED; } if (isset($message)) { $ns->tablerender("", "<div style='text-align:center'><b>" . $message . "</b></div>"); } // Show Existing ------- if ($action == "main" || $action == "") { if ($wm_total = $sql->db_Select("generic", "*", "gen_type='wmessage' ORDER BY gen_id ASC")) { $wmList = $sql->db_getList(); $text = $rs->form_open('post', e_SELF, 'myform_wmessage', '', ''); $text .= "<div style='text-align:center'>\n <table class='table adminlist'>\n\t\t\t<colgroup>\n\t\t\t\t<col style='width:5%' />\n\t\t\t\t<col style='width:60%' />\n\t\t\t\t<col style='width:20%' />\n\t\t\t\t<col style='width:10%' />\n \t\t\t</colgroup>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>" . WMLAN_02 . "</th>\n\t\t\t\t<th class='center'>" . WMLAN_03 . "</th>\n\t\t\t\t<th class='center'>" . LAN_OPTIONS . "</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>"; foreach ($wmList as $row) { $text .= "\n\t\t\t<tr>\n\t\t\t\t<td class='center' style='text-align: center; vertical-align: middle'>" . $row['gen_id'] . "</td>\n\t\t\t\t<td>" . strip_tags($tp->toHTML($row['gen_ip'])) . "</td>\n\t\t\t\t<td>" . r_userclass_name($row['gen_intdata']) . "</td>\n \t<td class='center nowrap'>\n\t\t\t\t\t<a href='" . e_SELF . "?create.edit.{$row['gen_id']}'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t\t<input type='image' title='" . LAN_DELETE . "' name='main_delete[" . $row['gen_id'] . "]' src='" . ADMIN_DELETE_ICON_PATH . "' onclick=\"return jsconfirm('" . LAN_CONFIRMDEL . " [ID: {$row['gen_id']} ]')\"/>\n\t\t\t\t</td>\n\t\t\t</tr>"; } $text .= "</tbody></table></div>"; $text .= $rs->form_close(); } else { $text .= "<div style='text-align:center'>" . WMLAN_09 . "</div>"; } $ns->tablerender(WMLAN_00, $text); } // Create and Edit if ($action == "create" || $action == "edit") { if ($sub_action == "edit") { $sql->db_Select("generic", "gen_intdata, gen_ip, gen_chardata", "gen_id = {$id}");
<div class="module_header bold fix"><?php echo $module_name; ?> </div> <div id="wrapper"> <?php print_error_msg($bg_errorMsg); ?> <?php $form = new form(); ?> <script> var News = new News(); </script> <?php echo $form->form_open(); ?> <?php echo $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập'); ?> <?php echo $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập'); ?> <?php echo $form->text(array('label' => 'Email', 'name' => 'use_email', 'id' => 'use_email', 'value' => getValue('use_email', 'str', 'POST', $use_email), 'require' => 1, 'errorMsg' => 'Bạn chưa nhập email', 'placeholder' => 'Email không dài quá 255 ký tự'), 0, 'span6'); ?> <?php echo $form->text(array('label' => 'Họ', 'name' => 'use_firstname', 'id' => 'use_firstname', 'value' => getValue('use_firstname', 'str', 'POST', $use_firstname), 'require' => 1, 'errorMsg' => 'Bạn chưa nhập họ', 'placeholder' => 'Họ'), 0, 'span6'); ?> <?php
function show_reported($sub_action) { $rs = new form(); // FIXME - update to $frm $sql = e107::getDb(); $ns = e107::getRender(); $tp = e107::getParser(); $mes = e107::getMessage(); if ($sub_action) { $sql->select("generic", "*", "gen_id='" . $sub_action . "'"); $row = $sql->fetch(); $sql->select("user", "*", "user_id='" . $row['gen_user_id'] . "'"); $user = $sql->fetch(); //$con = new convert; $text = "\n\t\t\t<table class='table adminlist'>\n\t\t\t<colgroup span='2'>\n \t\t\t<col class='col-label' />\n \t\t\t<col class='col-control' />\n \t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td>" . FORLAN_171 . ":</td>\n\t\t\t\t<td><a href='" . e_PLUGIN . "forum/forum_viewtopic.php?" . $row['gen_intdata'] . ".post' rel='external'>#" . $row['gen_intdata'] . "</a></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . FORLAN_173 . ":</td>\n\t\t\t\t<td>" . $row['gen_ip'] . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . FORLAN_174 . ":</td>\n\t\t\t\t<td><a href='" . e_BASE . "user.php?id." . $user['user_id'] . "'>" . $user['user_name'] . "</a>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . FORLAN_175 . ":</td>\n\t\t\t\t<td>" . e107::getDate()->convert_date($row['gen_datestamp'], "long") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . LAN_FORUM_2046 . ":</td>\n\t\t\t\t<td>" . $row['gen_chardata'] . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='text-align:center' colspan='2'>\n\t\t\t\t" . $rs->form_open("post", e_SELF . "?sr", "", "", "", " onsubmit=\"return confirm_('sr'," . $row['gen_datestamp'] . ")\"") . "\n\t\t\t\t" . $rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172) . "\n\t\t\t\t" . $rs->form_close() . "\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>"; $ns->tablerender(FORLAN_116, $text); } else { if ($reported_total = $sql->select("generic", "*", "gen_type='reported_post' OR gen_type='Reported Forum Post'")) { $text = "\n\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . FORLAN_170 . "</td>\n\t\t\t\t\t\t<td>" . LAN_OPTIONS . "</td>\n\t\t\t\t\t</tr>"; while ($row = $sql->fetch()) { $text .= " \n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td<a href='" . e_SELF . "?sr." . $row['gen_id'] . "'>" . FORLAN_171 . " #" . $row['gen_intdata'] . "</a></td>\n\t\t\t\t\t\t\t<td text-align:center; vertical-align:top; white-space: nowrap'>\n\t\t\t\t\t\t\t" . $rs->form_open("post", e_SELF . "?sr", "", "", "", " onsubmit=\"return confirm_('sr'," . $row['gen_datestamp'] . ")\"") . "\n\t\t\t\t\t\t\t" . $rs->form_button("submit", "delete[reported_{$row['gen_id']}]", FORLAN_172) . "\n\t\t\t\t\t\t\t" . $rs->form_close() . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>"; } $text .= "</table>"; } else { //$text = "<div style='text-align:center'>".FORLAN_121."</div>"; $mes->addInfo(FORLAN_121); } $ns->tablerender(FORLAN_116, $mes->render() . $text); } }
$curVal['userclass_list'] = $userMethods->addCommonClasses($curVal, FALSE); if ($_POST) { // Fix for all the values being lost when there was an error in a field - restore from the latest $_POST values // (Password fields have intentionally been cleared). If no error, there's an unset($_POST) to disable this block foreach ($_POST as $key => $val) { if ($key != 'class') { $curVal['user_' . $key] = $tp->post_toForm($val); } } foreach ($_POST['ue'] as $key => $val) { $curVal[$key] = $tp->post_toForm($val); } } require_once e_HANDLER . "form_handler.php"; $rs = new form(); $text = e_QUERY ? $rs->form_open("post", e_SELF . "?" . e_QUERY, "dataform", "", " enctype='multipart/form-data'") : $rs->form_open("post", e_SELF, "dataform", "", " enctype='multipart/form-data'"); if (e_QUERY == "update") { $text .= "<div class='fborder' style='text-align:center'><br />" . str_replace("*", "<span class='required'>*</span>", LAN_USET_9) . "<br />" . LAN_USET_10 . "<br /><br /></div>"; } e107::getScBatch('usersettings')->setVars($curVal); $text .= $tp->parseTemplate($USERSETTINGS_EDIT, TRUE, $usersettings_shortcodes); $text .= "<div><input type='hidden' name='_uid' value='{$uuid}' /></div>\n\t</form>\n\t"; $caption = isset($USERSETTINGS_EDIT_CAPTION) ? $USERSETTINGS_EDIT_CAPTION : LAN_USET_39; // 'Update User Settings' $ns->tablerender($caption, $text); if (!$adminEdit) { require_once FOOTERF; } else { require_once e_ADMIN . "footer.php"; } // If a field is required, returns a red asterisk
<title>Add New</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link href="../css/bootstrap.css" rel="stylesheet"/> <link href="../css/font-awesome.min.css" rel="stylesheet"/> <link href="../css/common.css" rel="stylesheet"/> <link href="../css/template.css" rel="stylesheet"/> <script type="text/javascript" src="../js/jquery.js"></script> <script type="text/javascript" src="../js/bootstrap.min.js"></script> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <div id="wrapper"> <?php $form = new form(); ?> <?php echo $form->form_open('add_new', $_SERVER['REQUEST_URI']); ?> <?php echo $form->textnote(array('Thêm mới module')); ?> <?php echo $form->text(array('label' => 'Tên module', 'name' => 'mod_name', 'id' => 'mod_name')); ?> <?php echo $form->text(array('label' => 'Thư mục', 'name' => 'mod_path', 'id' => 'mod_path')); ?> <?php echo $form->text(array('label' => 'Thứ tự', 'name' => 'mod_order', 'id' => 'mod_order', 'value' => $max_order + 1)); ?> <?php echo $form->text(array('label' => 'Tiêu đề', 'name' => 'mod_listname', 'id' => 'mod_listname', 'placeholder' => 'Cách nhau bởi dấu |'));
public function showForm($mes) { $server_types[1] = 'LDAP'; $server_types[2] = 'ActiveDirectory'; $server_types[3] = 'eDirectory'; $ldap_ver[1] = '2'; $ldap_ver[2] = '3'; $ldap = $this->altAuthGetParams('ldap'); if (!isset($ldap['ldap_edirfilter'])) { $ldap['ldap_edirfilter'] == ''; } //print_a($ldap); $current_filter = "(&(cn=[USERNAME]){$ldap['ldap_edirfilter']})"; $frm = new form(); $text = $frm->form_open('post', e_SELF); $text .= "<table class='table adminform'>"; $text .= "<tr><td>" . LDAPLAN_12 . "</td><td>"; $text .= $frm->form_select_open("ldap_servertype"); foreach ($server_types as $v) { $sel = vartrue($ldap['ldap_servertype']) == $v ? " Selected='selected'" : ''; $text .= $frm->form_option($v, $sel, $v); } $text .= $frm->form_select_close(); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_1 . "</td><td>"; $text .= $frm->form_text("ldap_server", 35, vartrue($ldap['ldap_server']), 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_2 . "</td><td>"; $text .= $frm->form_text("ldap_basedn", 35, vartrue($ldap['ldap_basedn']), 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_14 . "</td><td>"; $text .= $frm->form_text("ldap_ou", 35, vartrue($ldap['ldap_ou']), 60); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_3 . "</td><td>"; $text .= $frm->form_text("ldap_user", 35, vartrue($ldap['ldap_user']), 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_4 . "</td><td>"; $text .= $frm->form_text("ldap_passwd", 35, vartrue($ldap['ldap_passwd']), 120); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_5 . "</td><td>"; $text .= $frm->form_select_open("ldap_version"); foreach ($ldap_ver as $v) { $sel = $ldap['ldap_version'] == $v ? " Selected='selected'" : ""; $text .= $frm->form_option($v, $sel, $v); } $text .= $frm->form_select_close(); $text .= "</td></tr>"; $text .= "<tr><td>" . LDAPLAN_7 . "<br /><span class='smalltext'>" . LDAPLAN_8 . "</span></td><td>"; $text .= $frm->form_text('ldap_edirfilter', 35, $ldap['ldap_edirfilter'], 120); $text .= "<br /><span class='smalltext'>" . LDAPLAN_9 . "<br />" . htmlentities($current_filter) . "</span></td></tr>"; $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>"; $this->add_extended_fields(); $text .= $this->alt_auth_get_field_list('ldap', $frm, $ldap, FALSE); $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>"; $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update'); //$text .= $frm -> form_button('submit', 'update', LDAPLAN_13); $text .= "</td></tr>"; $text .= "</table>\n"; $text .= $frm->form_close(); e107::getRender()->tablerender(LDAPLAN_6, $mes->render() . $text); e107::getRender()->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('ldap', $frm)); }