本文整理汇总了PHP中form::form_close方法的典型用法代码示例。如果您正苦于以下问题:PHP form::form_close方法的具体用法?PHP form::form_close怎么用?PHP form::form_close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form
的用法示例。
在下文中一共展示了form::form_close方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
* 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' => ''));
$html_page .= $form->text(array('label' => 'Nhóm dược lý', 'name' => 'pha_nhom_duoc_ly', 'id' => 'pha_nhom_duoc_ly', 'value' => $check_name_ndl, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Thành phần', 'name' => 'pha_thanh_phan', 'id' => 'pha_thanh_phan', 'value' => $pha_thanh_phan, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Hàm lượng', 'name' => 'pha_ham_luong', 'id' => 'pha_ham_luong', 'value' => $pha_ham_luong, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Chỉ định', 'name' => 'pha_chi_dinh', 'id' => 'pha_chi_dinh', 'value' => $pha_chi_dinh, 'require' => 1, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Chống chỉ định', 'name' => 'pha_chong_chi_dinh', 'id' => 'pha_chong_chi_dinh', 'value' => $pha_chong_chi_dinh, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Tương tác thuốc', 'name' => 'pha_tuong_tac_thuoc', 'id' => 'pha_tuong_tac_thuoc', 'value' => $pha_tuong_tac_thuoc, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Tác dụng phụ', 'name' => 'pha_tac_dung_phu', 'id' => 'pha_tac_dung_phu', 'value' => $pha_tac_dung_phu, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Chú ý đề phòng', 'name' => 'pha_chu_y_de_phong', 'id' => 'pha_chu_y_de_phong', 'value' => $pha_chu_y_de_phong, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Liều lượng', 'name' => 'pha_lieu_luong', 'id' => 'pha_lieu_luong', 'value' => $pha_lieu_luong, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Bảo quản', 'name' => 'pha_bao_quan', 'id' => 'pha_bao_quan', 'value' => $pha_bao_quan, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->ajaxUploadFile(array('label' => 'Ảnh sản phẩm', 'name' => 'pha_image', 'id' => 'pha_image', 'browse_id' => 'btn_picture', 'viewer_id' => 'viewer_picture', 'value' => get_picture_path($pha_image)));
$html_page .= $form->text(array('label' => 'Tag', 'name' => 'pha_tag', 'id' => 'pha_tag', 'value' => '', 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= file_get_contents('script.html');
$html_page .= $form->form_redirect();
$html_page .= $form->form_action(array('label' => array('Cập nhật', 'Nhập lại'), 'type' => array('submit', 'reset')));
$html_page .= $form->form_close();
$rainTpl->assign('html_page', $html_page);
$rainTpl->draw('add');
示例2: array
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 |'));
?>
<?php
echo $form->text(array('label' => 'URL file', 'name' => 'mod_listfile', 'id' => 'mod_listfile', 'placeholder' => 'Cách nhau bởi dấu |'));
?>
<?php
echo $form->form_action(array('label' => array('Thêm mới', 'Nhập lại'), 'type' => array('submit', 'reset')));
?>
<?php
echo $form->form_close();
?>
</div>
<div id="list_module">
<?php
//select module
$db_module = new db_query("SELECT * FROM modules ORDER BY mod_order ASC");
$listmodule = $db_module->resultArray();
unset($db_module);
$i = 0;
?>
<?php
foreach ($listmodule as $mod) {
if (!file_exists("../../modules/" . $mod["mod_path"] . "/inc_security.php") && !file_exists("../../core/" . $mod["mod_path"] . "/inc_security.php")) {
continue;
}
示例3: array
$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'> </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':
示例4: form
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);
}
}
示例5: showOptionsOrder
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;
}
示例6: getValue
<?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');
示例7: while
while ($row_custom = mysqli_fetch_assoc($db_custom_role->result)) {
$i++;
$list_checkbox[] = array('name' => 'custom_role' . $row['mod_id'] . '[]', 'id' => 'custom_role' . $row['mod_id'] . $i, 'value' => $row_custom['rol_id'], 'label' => $row_custom['rol_name'], 'is_check' => in_array($row_custom['rol_id'], $true_custom_role));
}
$list_checkbox[] = array('name' => 'role_add' . $row['mod_id'], 'id' => 'role_add' . $row['mod_id'], 'value' => 1, 'label' => 'Thêm mới', 'is_check' => $true_roles['role_add']);
$list_checkbox[] = array('name' => 'role_edit' . $row['mod_id'], 'id' => 'role_edit' . $row['mod_id'], 'value' => 1, 'label' => 'Sửa', 'is_check' => $true_roles['role_edit']);
$list_checkbox[] = array('name' => 'role_trash' . $row['mod_id'], 'id' => 'role_trash' . $row['mod_id'], 'value' => 1, 'label' => 'Xóa', 'is_check' => $true_roles['role_trash']);
$list_checkbox[] = array('name' => 'role_delete' . $row['mod_id'], 'id' => 'role_delete' . $row['mod_id'], 'value' => 1, 'label' => 'Xóa vĩnh viễn', 'is_check' => $true_roles['role_delete']);
$list_checkbox[] = array('name' => 'role_recovery' . $row['mod_id'], 'id' => 'role_recovery' . $row['mod_id'], 'value' => 1, 'label' => 'Khôi phục', 'is_check' => $true_roles['role_recovery']);
$html .= $form->list_checkbox(array('label' => $row['mod_name'], 'list' => $list_checkbox, 'column' => 2));
$html .= $form->form_divider();
}
$html .= $form->form_action(array('label' => array('Đồng ý', 'Hủy bỏ'), 'type' => array('submit', 'reset'), 'extra' => array('', 'modal-control="modal-close"')));
$html .= $form->hidden(array('name' => 'action_modal', 'id' => 'action_modal', 'value' => 'permission_group'));
$html .= $form->hidden(array('name' => 'record_id', 'id' => 'record_id', 'value' => $group_id));
$html .= $form->form_close();
$html .= mini_modal_close();
echo $html;
break;
case 'deleteGroupUser':
//hàm xóa 1 nhóm tài khoản đăng nhập - trả về json
$group_id = getValue('group', 'int', 'POST', 0);
$array_return = array();
//kiểm tra xem group này còn user nào ko, nếu còn thì ko xóa được
$check_user = new db_count('SELECT count(*) as count FROM admin_users WHERE adm_group_id = ' . $group_id);
if ($check_user->total) {
$array_return = array('success' => 0, 'error' => 'Bạn không thể xóa nhóm này, vì nó vẫn còn chứa các tài khoản. Vui lòng xóa các tài khoản đăng nhập trước');
unset($db_count);
die(json_encode($array_return));
break;
}
示例8: getFontList
//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 (isset($info['bi'])) {
$wa[] = PDF_LAN_30;
}
$variants = implode(', ', $wa);
$text .= "<tr><td>{$font}</td><td>{$info['info']['type']}</td><td>{$variants}</td><td>{$info['info']['weight']}</td><td>{$info['info']['codes']}</td></tr>\n";
示例9: foreach
$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}");
$row = $sql->db_Fetch();
}
$text = "\n\t\t<div style='text-align:center'>\n\t\t<form method='post' action='" . e_SELF . "' id='wmform'>\n\t\t<fieldset id='code-wmessage-create'>\n <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>\n\t\t";
$text .= "\n\t\t<tr>\n\t\t<td>" . WMLAN_10 . "</td>\n\t\t<td>\n\t\t<input type='text' class='tbox' id='wm_caption' name='wm_caption' maxlength='80' style='width:95%' value=\"" . $tp->toForm($row['gen_ip']) . "\" />\n\t\t</td>\n\t\t</tr>";
$text .= "<tr>\n\t\t<td>" . WMLAN_04 . "</td>\n\t\t<td>\n\t\t<textarea class='e-wysiwyg tbox' id='data' name='data' cols='70' rows='15' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this)'>" . $tp->toForm($row['gen_chardata']) . "</textarea>\n\t\t<br />";
$text .= display_help("helpb", "admin");