本文整理汇总了PHP中form_select_tree函数的典型用法代码示例。如果您正苦于以下问题:PHP form_select_tree函数的具体用法?PHP form_select_tree怎么用?PHP form_select_tree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_select_tree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: str_replace
if (isset($_GET['submitted']) && $_GET['submitted'] == "d") {
echo "<div class='well text-center'><p><strong>" . $locale['download_0042'] . "</strong></p>";
echo "<p><a href='submit.php?stype=d'>" . $locale['download_0043'] . "</a></p>";
echo "<p><a href='index.php'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['download_0039']) . "</a></p>\n";
echo "</div>\n";
} else {
/**
* The form
*/
// must have category
if (dbcount("(download_cat_id)", DB_DOWNLOAD_CATS, multilang_table("DL") ? "download_cat_language='" . LANGUAGE . "'" : "")) {
echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['download_0044']) . "</div>\n";
echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=d", array('enctype' => TRUE));
echo form_text('download_title', $locale['download_0200'], $criteriaArray['download_title'], array('required' => TRUE, "inline" => TRUE, 'error_text' => $locale['download_0110']));
echo form_select_tree("download_cat", $locale['download_0207'], $criteriaArray['download_cat'], array("inline" => TRUE, "no_root" => TRUE, "placeholder" => $locale['choose'], "query" => multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "'" : ""), DB_DOWNLOAD_CATS, "download_cat_name", "download_cat_id", "download_cat_parent");
echo form_select('download_keywords', $locale['download_0203'], $criteriaArray['download_keywords'], array("placeholder" => $locale['download_0203a'], 'max_length' => 320, "inline" => TRUE, 'width' => '100%', 'tags' => 1, 'multiple' => 1));
echo form_textarea('download_description_short', $locale['download_0202'], $criteriaArray['download_description_short'], array('bbcode' => 1, 'required' => TRUE, "autosize" => TRUE, "inline" => TRUE, 'error_text' => $locale['download_0112'], 'form_name' => 'submit_form'));
echo form_textarea('download_description', $locale['download_0202a'], $criteriaArray['download_description'], array("required" => $dl_settings['download_extended_required'] ? TRUE : FALSE, "inline" => TRUE, "bbcode" => TRUE, "autosize" => TRUE, "placeholder" => $locale['download_0201'], 'form_name' => 'submit_form'));
echo "<div class='row m-l-0 m-r-0 m-b-20'>\n";
echo "<div class='col-xs-12 col-sm-3 p-l-0'>\n ";
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-9 p-r-0'>\n";
$tab_title['title'][] = "1 -" . $locale['download_0214'];
$tab_title['id'][] = 'dlf';
$tab_title['icon'][] = 'fa fa-file-zip-o fa-fw';
$tab_title['title'][] = "2 -" . $locale['download_0215'];
$tab_title['id'][] = 'dll';
$tab_title['icon'][] = 'fa fa-plug fa-fw';
$tab_active = tab_active($tab_title, 0);
echo "<div class='list-group-item'>\n";
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:download_submit.php
示例2: mod_move_posts
/**
* Moving Posts
*/
private function mod_move_posts()
{
global $locale;
if (isset($_POST['move_posts']) && iMOD) {
$remove_first_post = FALSE;
$f_post_blo = FALSE;
if (isset($_POST['delete_post']) && !empty($_POST['delete_post'])) {
$first_post = dbarray(dbquery("SELECT post_id FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . intval($this->thread_id) . "' ORDER BY post_datestamp ASC LIMIT 1"));
/**
* Scan for Posts
*/
$move_posts = "";
$array_post = array();
$first_post_found = FALSE;
foreach ($_POST['delete_post'] as $move_post_id) {
if (isnum($move_post_id)) {
$move_posts .= ($move_posts ? "," : "") . $move_post_id;
$array_post[] = $move_post_id;
if ($move_post_id == $first_post['post_id']) {
$first_post_found = TRUE;
}
}
}
// triggered move post
if ($move_posts) {
// validate whether the selected post exists
$move_result = dbquery("SELECT forum_id, thread_id, COUNT(post_id) 'num_posts'\n\t\t\t\t\t\t\t\t\tFROM " . DB_FORUM_POSTS . "\n\t\t\t\t\t\t\t\t\tWHERE post_id IN (" . $move_posts . ")\n\t\t\t\t\t\t\t\t\tAND thread_id='" . intval($this->thread_id) . "'\n\t\t\t\t\t\t\t\t\tGROUP BY thread_id");
if (dbrows($move_result) > 0) {
$pdata = dbarray($move_result);
$post_count = dbcount("(post_id)", DB_FORUM_POSTS, "thread_id='" . intval($pdata['thread_id']) . "'");
ob_start();
echo openmodal('forum0300', $locale['forum_0300'], array('class' => 'modal-md'));
if ($first_post_found) {
// there is a first post.
echo "<div id='close-message'><div class='admin-message alert alert-info m-t-10'>";
if ($pdata['num_posts'] != $post_count) {
$remove_first_post = TRUE;
echo $locale['forum_0305'] . "<br />\n";
// trying to remove first post with other post in the thread
} else {
echo $locale['forum_0306'] . "<br />\n";
// confirm ok to remove first post.
}
if ($remove_first_post && count($array_post) == 1) {
echo "<br /><strong>" . $locale['forum_0307'] . "</strong><br /><br />\n";
// no post to move.
echo "<a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $pdata['thread_id'] . "&rowstart=" . $_GET['rowstart'] . "'>" . $locale['forum_0309'] . "</a>";
$f_post_blo = TRUE;
}
echo "</div></div>\n";
}
if (!isset($_POST['new_forum_id']) && !$f_post_blo) {
$fl_result = dbquery("\n\t\t\t\t\t\t\t\t\t\tSELECT f.forum_id, f.forum_name, f.forum_type, f2.forum_name 'forum_cat_name',\n\t\t\t\t\t\t\t\t\t\t(\tSELECT COUNT(thread_id) FROM " . DB_FORUM_THREADS . " th WHERE f.forum_id=th.forum_id AND th.thread_id !='" . intval($this->thread_id) . "'\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY th.forum_id\n\t\t\t\t\t\t\t\t\t\t) AS threadcount\n\t\t\t\t\t\t\t\t\t\t\tFROM " . DB_FORUMS . " f\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN " . DB_FORUMS . " f2 ON f.forum_cat=f2.forum_id\n\t\t\t\t\t\t\t\t\t\tWHERE " . groupaccess('f.forum_access') . "\n\t\t\t\t\t\t\t\t\t\tORDER BY f2.forum_order ASC, f.forum_order ASC\n\t\t\t\t\t\t\t\t\t\t");
if (dbrows($fl_result) > 0) {
$exclude_opts = array();
while ($data = dbarray($fl_result)) {
if (empty($data['threadcount']) || $data['forum_type'] == '1') {
$exclude_opts[] = $data['forum_id'];
}
}
echo openform('modopts', 'post', $this->form_action);
echo form_select_tree('new_forum_id', $locale['forum_0301'], '', array('disable_opts' => $exclude_opts, 'no_root' => 1, 'inline' => 1), DB_FORUMS, 'forum_name', 'forum_id', 'forum_cat');
foreach ($array_post as $value) {
echo form_hidden("delete_post[]", "", $value, array("input_id" => "delete_post[{$value}]"));
}
echo form_hidden('move_posts', '', 1);
echo "<div class='clearfix'>\n<div class='col-xs-12 col-md-offset-3 col-lg-offset-3'>\n";
echo form_button($locale['forum_0302'], $locale['forum_0208'], $locale['forum_0208'], array('inline' => 1, 'class' => 'btn-primary'));
echo "</div>\n</div>\n";
echo closeform();
} else {
echo "<div class='well'>\n";
echo "<strong>" . $locale['forum_0310'] . "</strong><br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $pdata['thread_id'] . "&rowstart=" . $_GET['rowstart'] . "'>" . $locale['forum_0309'] . "</a><br /><br />\n";
echo "</div>\n";
}
} elseif (isset($_POST['new_forum_id']) && isnum($_POST['new_forum_id']) && !isset($_POST['new_thread_id']) && !$f_post_blo) {
// Select Threads in Selected Forum.
// build the list.
$tl_result = dbquery("\n\t\t\t\t\t\t\tSELECT thread_id, thread_subject\n\t\t\t\t\t\t\tFROM " . DB_FORUM_THREADS . "\n\t\t\t\t\t\t\tWHERE forum_id='" . intval($_POST['new_forum_id']) . "' AND thread_id !='" . intval($pdata['thread_id']) . "' AND thread_hidden='0'\n\t\t\t\t\t\t\tORDER BY thread_subject ASC\n\t\t\t\t\t\t\t");
if (dbrows($tl_result) > 0) {
$forum_list = array();
while ($tl_data = dbarray($tl_result)) {
$forum_list[$tl_data['thread_id']] = $tl_data['thread_subject'];
}
echo openform('modopts', 'post', $this->form_action . "&sv", array('max_tokens' => 1, 'downtime' => 1));
echo form_hidden('new_forum_id', '', $_POST['new_forum_id']);
echo form_select('new_thread_id', $locale['forum_0303'], '', array('options' => $forum_list, 'inline' => 1));
foreach ($array_post as $value) {
echo form_hidden("delete_post[]", "", $value, array("input_id" => "delete_post[{$value}]"));
}
echo form_hidden('move_posts', '', 1);
echo form_button($locale['forum_0304'], $locale['forum_0208'], $locale['forum_0208'], array('class' => 'btn-primary btn-sm'));
} else {
echo $locale['forum_0308'] . "<br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $pdata['thread_id'] . "'>" . $locale['forum_0309'] . "</a>\n";
}
//.........这里部分代码省略.........
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:mods.php
示例3: nl2br
echo $locale['news_0203'] . " " . nl2br(parseubb($news_snippet)) . "<br /><br />";
echo $locale['news_0204'] . " " . nl2br(parseubb($news_body));
closetable();
}
add_to_title($locale['global_200'] . $locale['news_0400']);
echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['news_0703']) . "</div>\n";
echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=n", array("enctype" => $news_settings['news_allow_submission_files'] ? TRUE : FALSE));
echo form_text('news_subject', $locale['news_0200'], $criteriaArray['news_subject'], array("required" => TRUE, "inline" => TRUE));
if (multilang_table("NS")) {
echo form_select('news_language', $locale['global_ML100'], $criteriaArray['news_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
} else {
echo form_hidden('news_language', '', $criteriaArray['news_language']);
}
echo form_select('news_keywords', $locale['news_0205'], $criteriaArray['news_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE));
echo form_select_tree("news_cat", $locale['news_0201'], $criteriaArray['news_cat'], array("width" => "250px", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
if ($news_settings['news_allow_submission_files']) {
$file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image', "inline" => TRUE);
echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options);
echo "<div class='small col-sm-offset-3 m-b-10'><span class='p-l-15'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</span></div>\n";
$alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
echo form_select('news_ialign', $locale['news_0218'], $criteriaArray['news_ialign'], array("options" => $alignOptions, "inline" => TRUE));
}
echo form_textarea('news_news', $locale['news_0203'], $criteriaArray['news_snippet'], array("required" => TRUE, "html" => TRUE, "form_name" => "submit_form", "autosize" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE));
echo form_textarea('news_body', $locale['news_0203b'], $criteriaArray['news_body'], array("required" => $news_settings['news_extended_required'] ? TRUE : FALSE, "html" => TRUE, "form_name" => "submit_form", "autosize" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE));
echo fusion_get_settings("site_seo") ? "" : form_button('preview_news', $locale['news_0240'], $locale['news_0240'], array('class' => 'btn-primary m-r-10'));
echo form_button('submit_news', $locale['news_0700'], $locale['news_0700'], array('class' => 'btn-primary'));
echo closeform();
echo "</div>\n</div>\n";
}
} else {
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:news_submit.php
示例4: quantum_module_form
/** Add Modules Plugin Form */
private function quantum_module_form()
{
global $aidlink, $defender, $locale;
$form_action = FUSION_SELF . $aidlink;
if (isset($_GET['action']) && $_GET['action'] == 'module_edit' && isset($_GET['module_id']) && isnum($_GET['module_id'])) {
$form_action .= "&action=" . $_GET['action'] . "&module_id=" . $_GET['module_id'];
$result = dbquery("SELECT * FROM " . $this->field_db . " WHERE field_id='" . $_GET['module_id'] . "'");
if (dbrows($result) > 0) {
$this->field_data = dbarray($result);
if ($this->debug) {
print_p('Old Data');
print_p($this->field_data);
}
} else {
if (!$this->debug) {
addNotice('warning', $locale['field_0205']);
redirect(FUSION_SELF . $aidlink);
}
}
}
$this->field_data['add_module'] = isset($_POST['add_module']) ? form_sanitizer($_POST['add_module']) : $this->field_data['field_name'];
$user_field_name = '';
$user_field_api_version = '';
$user_field_desc = '';
$user_field_dbname = '';
$user_field_dbinfo = '';
if (file_exists($this->plugin_locale_folder . stripinput($this->field_data['add_module']) . ".php") && file_exists($this->plugin_folder . stripinput($this->field_data['add_module']) . "_include_var.php")) {
include $this->plugin_locale_folder . stripinput($this->field_data['add_module']) . ".php";
include $this->plugin_folder . stripinput($this->field_data['add_module']) . "_include_var.php";
$this->user_field_dbinfo = $user_field_dbinfo;
if (!isset($user_field_dbinfo)) {
addNotice('warning', $locale['fields_0602']);
}
} else {
$defender->stop();
addNotice('danger', $locale['fields_0109']);
}
// Script Execution
if (isset($_POST['enable'])) {
$this->field_data = array('add_module' => isset($_POST['add_module']) ? form_sanitizer($_POST['add_module']) : $this->field_data['field_name'], 'field_type' => 'file', 'field_id' => isset($_POST['field_id']) ? form_sanitizer($_POST['field_id'], '', 'field_id') : isset($_GET['module_id']) && isnum($_GET['module_id']) ? $_GET['module_id'] : 0, 'field_title' => form_sanitizer($_POST['field_title'], '', 'field_title'), 'field_name' => form_sanitizer($_POST['field_name'], '', 'field_name'), 'field_cat' => form_sanitizer($_POST['field_cat'], '', 'field_cat'), 'field_default' => form_sanitizer($_POST['field_default'], '', 'field_default'), 'field_error' => form_sanitizer($_POST['field_error'], '', 'field_error'), 'field_required' => isset($_POST['field_required']) ? 1 : 0, 'field_registration' => isset($_POST['field_registration']) ? 1 : 0, 'field_log' => isset($_POST['field_log']) ? 1 : 0, 'field_order' => form_sanitizer($_POST['field_order'], '0', 'field_order'));
$this->field_data['field_name'] = str_replace(' ', '_', $this->field_data['field_name']);
// make sure no space.
$this->create_fields($this->field_data, 'module');
}
echo "<div class='m-t-20'>\n";
echo openform('fieldform', 'post', $form_action, array('max_tokens' => 1));
echo "<p class='strong text-dark'>" . $user_field_name . "</p>\n";
echo "<div class='well'>\n";
echo "<p class='strong'>" . $locale['fields_0400'] . "</p>\n";
echo "<span class='text-dark strong'>" . $locale['fields_0401'] . "</span> " . ($user_field_api_version ? $user_field_api_version : $locale['fields_0402']) . "<br/>\n";
echo "<span class='text-dark strong'>" . $locale['fields_0403'] . "</span>" . ($user_field_dbname ? "<br/>" . $user_field_dbname : '<br/>' . $locale['fields_0404']) . "<br/>\n";
echo "<span class='text-dark strong'>" . $locale['fields_0405'] . "</span>" . ($user_field_dbinfo ? "<br/>" . $user_field_dbinfo : '<br/>' . $locale['fields_0406']) . "<br/>\n";
echo "<span class='text-dark strong'>" . $locale['fields_0407'] . "</span>" . ($user_field_desc ? "<br/>" . $user_field_desc : '') . "<br/>\n";
echo "</div>\n";
echo "<hr/>\n";
// start form.
$disable_opts = array();
foreach ($this->page_list as $index => $v) {
$disable_opts[] = $index;
}
echo form_select_tree('field_cat', $locale['fields_0410'], $this->field_data['field_cat'], array('no_root' => 1, 'disable_opts' => $disable_opts), $this->category_db, 'field_cat_name', 'field_cat_id', 'field_parent');
if ($user_field_dbinfo != "") {
if (version_compare($user_field_api_version, "1.01.00", ">=")) {
echo form_checkbox('field_required', $locale['fields_0411'], $this->field_data['field_required']);
} else {
echo "<p>\n" . $locale['428'] . "</p>\n";
}
}
if ($user_field_dbinfo != "") {
if (version_compare($user_field_api_version, "1.01.00", ">=")) {
echo form_checkbox('field_log', $locale['fields_0412'], $this->field_data['field_log']);
} else {
echo "<p>\n" . $locale['429a'] . "</p>\n";
}
}
if ($user_field_dbinfo != "") {
echo form_checkbox('field_registration', $locale['fields_0413'], $this->field_data['field_registration']);
}
echo form_text('field_order', $locale['fields_0414'], $this->field_data['field_order']);
echo form_hidden('add_module', '', $this->field_data['add_module']);
echo form_hidden('field_name', '', $user_field_dbname);
echo form_hidden('field_title', '', $user_field_name);
// new api introduced
echo form_hidden('field_default', '', isset($user_field_default) ? $user_field_default : '');
echo form_hidden('field_options', '', isset($user_field_options) ? $user_field_options : '');
echo form_hidden('field_error', '', isset($user_field_error) ? $user_field_error : '');
echo form_hidden('field_config', '', isset($user_field_config) ? $user_field_config : '');
echo form_hidden('field_id', '', $this->field_data['field_id']);
echo form_button('enable', $this->field_data['field_id'] ? $locale['fields_0415'] : $locale['fields_0416'], $this->field_data['field_id'] ? $locale['fields_0415'] : $locale['fields_0416'], array('class' => 'btn-primary btn-sm'));
echo closeform();
echo "</div>\n";
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:93,代码来源:QuantumFields.php
示例5: openside
echo "</div>\n";
echo "</div>\n";
// end package
openside();
if (fusion_get_settings('comments_enabled') == "0" || fusion_get_settings('ratings_enabled') == "0") {
$sys = "";
if (fusion_get_settings('comments_enabled') == "0" && fusion_get_settings('ratings_enabled') == "0") {
$sys = $locale['comments_ratings'];
} elseif (fusion_get_settings('comments_enabled') == "0") {
$sys = $locale['comments'];
} else {
$sys = $locale['ratings'];
}
echo "<div class='well'>" . sprintf($locale['download_0256'], $sys) . "</div>\n";
}
echo form_select_tree("download_cat", $locale['download_0207'], $callback_data['download_cat'], array("no_root" => 1, "placeholder" => $locale['choose'], 'width' => '100%', "query" => multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "'" : ""), DB_DOWNLOAD_CATS, "download_cat_name", "download_cat_id", "download_cat_parent");
echo form_select('download_visibility', $locale['download_0205'], $callback_data['download_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%'));
echo form_button('publish', $locale['download_0061'], $locale['download_0061'], array('class' => 'btn-primary m-r-10'));
closeside();
openside('');
echo form_checkbox('download_allow_comments', $locale['download_0223'], $callback_data['download_allow_comments'], array('class' => 'm-b-0'));
echo form_checkbox('download_allow_ratings', $locale['download_0224'], $callback_data['download_allow_ratings'], array('class' => 'm-b-0'));
if (isset($_GET['action']) && $_GET['action'] == "edit") {
echo form_checkbox('update_datestamp', $locale['download_0213'], '', array('class' => 'm-b-0'));
}
closeside();
openside();
echo form_text('download_license', $locale['download_0208'], $callback_data['download_license'], array('inline' => 1));
echo form_text('download_copyright', $locale['download_0222'], $callback_data['download_copyright'], array('inline' => 1));
echo form_text('download_os', $locale['download_0209'], $callback_data['download_os'], array('inline' => 1));
echo form_text('download_version', $locale['download_0210'], $callback_data['download_version'], array('inline' => 1));
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:download_submissions.php
示例6: openform
echo openform('inputform', 'post', $formaction, array('enctype' => 1, 'max_tokens' => 1));
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
echo form_hidden("blog_id", "", $data['blog_id']);
echo form_hidden("blog_datestamp", "", $data['blog_datestamp']);
echo form_text('blog_subject', $locale['blog_0422'], $data['blog_subject'], array('required' => TRUE, 'max_length' => 200, 'error_text' => $locale['blog_0450']));
// move keywords here because it's required
echo form_select('blog_keywords', $locale['blog_0443'], $data['blog_keywords'], array("max_length" => 320, "placeholder" => $locale['blog_0444'], "width" => "100%", "error_text" => $locale['blog_0457'], "tags" => TRUE, "multiple" => TRUE));
echo "<div class='pull-left m-r-10 display-inline-block'>\n";
echo form_datepicker('blog_start', $locale['blog_0427'], $data['blog_start'], array("placeholder" => $locale['blog_0429'], "join_to_id" => "blog_end"));
echo "</div>\n<div class='pull-left m-r-10 display-inline-block'>\n";
echo form_datepicker('blog_end', $locale['blog_0428'], $data['blog_end'], array("placeholder" => $locale['blog_0429'], "join_from_id" => "blog_start"));
echo "</div>\n";
echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
openside('');
echo form_select_tree("blog_cat[]", $locale['blog_0423'], $data['blog_cat'], array("width" => "100%", "delimiter" => ".", "inline" => TRUE, "no_root" => TRUE, "tags" => TRUE, "multiple" => TRUE, "query" => multilang_table("BL") ? "WHERE blog_cat_language='" . LANGUAGE . "'" : ""), DB_BLOG_CATS, "blog_cat_name", "blog_cat_id", "blog_cat_parent");
echo form_select('blog_visibility', $locale['blog_0430'], $data['blog_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
if (multilang_table("BL")) {
echo form_select('blog_language', $locale['global_ML100'], $data['blog_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
} else {
echo form_hidden('blog_language', '', $data['blog_language']);
}
echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
echo form_button('save', $locale['blog_0437'], $locale['blog_0437'], array('class' => 'btn-success', 'icon' => 'fa fa-square-check-o'));
closeside();
echo "</div>\n</div>\n";
$snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['blog_0425a'], "form_name" => "inputform");
if (fusion_get_settings("tinymce_enabled")) {
$snippetSettings = array("required" => TRUE, "type" => "tinymce", "tinymce" => "advanced");
}
echo form_textarea('blog_blog', $locale['blog_0425'], $data['blog_blog'], $snippetSettings);
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:blog.php
示例7: display_sitelinks_form
/**
* Site Links Form
*/
private function display_sitelinks_form()
{
$locale = fusion_get_locale();
fusion_confirm_exit();
if (isset($_POST['savelink'])) {
$this->data = array("link_id" => form_sanitizer($_POST['link_id'], 0, 'link_id'), "link_cat" => form_sanitizer($_POST['link_cat'], 0, 'link_cat'), "link_name" => form_sanitizer($_POST['link_name'], '', 'link_name'), "link_url" => form_sanitizer($_POST['link_url'], '', 'link_url'), "link_icon" => form_sanitizer($_POST['link_icon'], '', 'link_icon'), "link_language" => form_sanitizer($_POST['link_language'], '', 'link_language'), "link_visibility" => form_sanitizer($_POST['link_visibility'], '', 'link_visibility'), "link_position" => form_sanitizer($_POST['link_position'], '', 'link_position'), "link_order" => form_sanitizer($_POST['link_order'], '', 'link_order'), "link_window" => form_sanitizer(isset($_POST['link_window']) && $_POST['link_window'] == 1 ? 1 : 0, 0, 'link_window'));
if ($this->data['link_position'] > 3) {
$this->data['link_position'] = form_sanitizer($_POST['link_position_id'], 3, 'link_position_id');
}
if (empty($this->data['link_order'])) {
$max_order_query = "SELECT MAX(link_order) 'link_order' FROM " . DB_SITE_LINKS . "\n " . (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : "WHERE") . "\n link_cat='" . $this->data['link_cat'] . "'";
$this->data['link_order'] = dbresult(dbquery($max_order_query), 0) + 1;
}
if (\defender::safe()) {
if (!empty($this->data['link_id'])) {
dbquery_order(DB_SITE_LINKS, $this->data['link_order'], "link_order", $this->data['link_id'], "link_id", $this->data['link_cat'], "link_cat", multilang_table("SL"), "link_language", "update");
dbquery_insert(DB_SITE_LINKS, $this->data, 'update');
addNotice("success", $locale['SL_0016']);
} else {
dbquery_order(DB_SITE_LINKS, $this->data['link_order'], "link_order", $this->data['link_id'], "link_id", $this->data['link_cat'], "link_cat", multilang_table("SL"), "link_language", "save");
dbquery_insert(DB_SITE_LINKS, $this->data, 'save');
addNotice("success", $locale['SL_0015']);
}
redirect(clean_request("link_cat=" . $this->data['link_cat'], array('ref'), FALSE));
}
}
echo "<div class='m-t-20'>\n";
echo openform('link_administration_frm', 'post', FUSION_REQUEST);
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-12 col-md-8 col-lg-8'>\n";
echo form_hidden('link_id', '', $this->data['link_id']);
echo form_textarea('link_name', $locale['SL_0020'], $this->data['link_name'], array('max_length' => 100, 'required' => TRUE, 'error_text' => $locale['SL_0085'], 'form_name' => 'linkform', 'type' => 'bbcode', 'inline' => TRUE));
echo form_text('link_icon', 'Link Icon', $this->data['link_icon'], array('max_length' => 100, 'inline' => TRUE));
echo form_text('link_url', $locale['SL_0021'], $this->data['link_url'], array('required' => TRUE, 'error_text' => $locale['SL_0086'], 'inline' => TRUE));
echo form_text('link_order', $locale['SL_0023'], $this->data['link_order'], array('class' => 'pull-left', 'inline' => TRUE, 'width' => '250px', 'type' => 'number'));
// There will be a trick to manipulate the situation here
if ($this->data['link_position'] > 3) {
$this->data['link_position_id'] = $this->data['link_position'];
$this->data['link_position'] = 4;
}
echo form_select('link_position', $locale['SL_0024'], $this->data['link_position'], array('options' => $this->position_opts, 'inline' => TRUE, 'stacked' => form_text('link_position_id', '', $this->data['link_position_id'], array('required' => true, 'placeholder' => 'ID', 'type' => 'number', 'type' => 'number', 'width' => '150px'))));
add_to_jquery("\n checkLinkPosition( " . $this->data['link_position'] . " );\n \$('#link_position').bind('change', function(e) {\n checkLinkPosition( \$(this).val() );\n });\n ");
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-12 col-md-4 col-lg-4'>\n";
echo form_select_tree("link_cat", $locale['SL_0029'], $this->data['link_cat'], array('input_id' => 'link_categorys', "parent_value" => $locale['parent'], 'width' => '100%', 'query' => multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "'" : '', 'disable_opts' => $this->data['link_id'], 'hide_disabled' => 1), DB_SITE_LINKS, "link_name", "link_id", "link_cat");
echo form_select('link_language', $locale['global_ML100'], $this->data['link_language'], array('options' => $this->language_opts, 'placeholder' => $locale['choose'], 'width' => '100%'));
echo form_select('link_visibility', $locale['SL_0022'], $this->data['link_visibility'], array('options' => self::get_LinkVisibility(), 'placeholder' => $locale['choose'], 'width' => '100%'));
echo form_checkbox('link_window', $locale['SL_0028'], $this->data['link_window']);
echo "</div>\n";
echo "</div>\n";
echo form_button('savelink', $locale['SL_0040'], $locale['SL_0040'], array('class' => 'btn-primary m-r-10', 'input_id' => 'savelink_2'));
echo form_button("cancel", $locale['cancel'], "cancel", array('input_id' => 'cancel2'));
echo closeform();
echo "</div>\n";
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:58,代码来源:site_links.php
示例8: opentabbody
echo opentabbody($articleCatTab['title'][0], $articleCatTab['id'][0], $tab_active);
echo "<table class='table table-responsive table-hover table-striped'>\n";
if (dbcount("(article_cat_id)", DB_ARTICLE_CATS, multilang_table("AR") ? "article_cat_language='" . LANGUAGE . "'" : "")) {
showcatlist();
} else {
echo "<tr><td align='center' class='tbl1' colspan='2'>" . $locale['articles_0342'] . "</td></tr>\n";
}
echo "</table>\n";
echo closetabbody();
echo opentabbody($articleCatTab['title'][1], $articleCatTab['id'][1], $tab_active);
echo openform('addcat', 'post', FUSION_REQUEST, array('class' => "m-t-20"));
echo form_hidden("cat_id", "", $cat_id);
echo form_text('cat_name', $locale['articles_0300'], $cat_name, array("inline" => true, "required" => true, 'error_text' => $locale['articles_0351']));
$textArea_opts = array("required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "", "autosize" => TRUE, "inline" => TRUE, "preview" => TRUE, "form_name" => "addcat");
echo form_textarea('cat_description', $locale['articles_0301'], $cat_description, $textArea_opts);
echo form_select_tree("cat_parent", $locale['articles_0308'], $cat_parent, array("inline" => true, "disable_opts" => $cat_hidden, "hide_disabled" => TRUE), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
if (multilang_table("AR")) {
echo form_select('cat_language', $locale['global_ML100'], $cat_language, array("inline" => true, 'options' => $language_opts, 'placeholder' => $locale['choose']));
} else {
echo form_hidden('cat_language', '', $cat_language);
}
echo "<div class='row m-0'>\n";
echo "<label class='label-control col-xs-12 col-sm-3 p-l-0'>" . $locale['articles_0302'] . "</label>\n";
echo "<div class='col-xs-12 col-sm-3 p-l-0'>\n";
echo form_select('cat_sort_by', "", $cat_sort_by, array("inline" => TRUE, "width" => "100%", 'options' => array('1' => $locale['articles_0303'], '2' => $locale['articles_0304'], '3' => $locale['articles_0305']), 'class' => 'pull-left m-r-10'));
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-2'>\n";
echo form_select('cat_sort_order', '', $cat_sort_order, array("inline" => true, "width" => "100%", 'options' => array('ASC' => $locale['articles_0306'], 'DESC' => $locale['articles_0307']), 'placeholder' => $locale['choose']));
echo "</div>\n";
echo "</div>\n";
echo form_button('save_cat', $locale['articles_0309'], $locale['articles_0309'], array('class' => 'btn-primary', 'inline' => 1));
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:article_cat.php
示例9: dbarray
if (dbrows($result)) {
$data = dbarray($result);
$data['news_cat_hidden'] = array($data['news_cat_id']);
$formTitle = $locale['news_0021'];
} else {
// FUSION_REQUEST without the "action" gets
redirect(clean_request("", array("action"), FALSE));
}
}
add_breadcrumb(array('link' => "", 'title' => $formTitle));
opentable($formTitle);
echo openform("addcat", "post", $formAction);
openside("");
echo form_hidden("news_cat_id", "", $data['news_cat_id']);
echo form_text("news_cat_name", $locale['news_0300'], $data['news_cat_name'], array("required" => TRUE, "inline" => TRUE, "error_text" => $locale['news_0351']));
echo form_select_tree("news_cat_parent", $locale['news_0305'], $data['news_cat_parent'], array("inline" => TRUE, "disable_opts" => $data['news_cat_hidden'], "hide_disabled" => TRUE, "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
if (multilang_table("NS")) {
echo form_select("news_cat_language", $locale['global_ML100'], $data['news_cat_language'], array("inline" => TRUE, "options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose']));
} else {
echo form_hidden("news_cat_language", "", $data['news_cat_language']);
}
echo form_select("news_cat_image", $locale['news_0301'], $data['news_cat_image'], array("inline" => TRUE, "options" => newsCatImageOpts()));
echo form_button("save_cat", $locale['news_0302'], $locale['news_0302'], array("class" => "btn-success"));
closeside();
openside($locale['news_0020']);
$result = dbquery("SELECT news_cat_id, news_cat_name FROM " . DB_NEWS_CATS . " " . (multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : "") . " ORDER BY news_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0;
$columns = 4;
echo "<div class='row'>\n";
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:news_cat.php
示例10: dbquery
}
// update current forum
dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_postcount=forum_postcount+1, forum_threadcount=forum_threadcount+1, forum_lastpostid='" . $post_data['post_id'] . "', forum_lastuser='" . $post_data['post_author'] . "' WHERE forum_id='" . $post_data['forum_id'] . "'");
// update current thread
dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $post_data['post_id'] . "', thread_lastuser='" . $post_data['post_author'] . "' WHERE thread_id='" . $post_data['thread_id'] . "'");
// set notify
if ($forum_settings['thread_notify'] && isset($_POST['notify_me']) && $post_data['thread_id']) {
if (!dbcount("(thread_id)", DB_FORUM_THREAD_NOTIFY, "thread_id='" . $post_data['thread_id'] . "' AND notify_user='" . $post_data['post_author'] . "'")) {
dbquery("INSERT INTO " . DB_FORUM_THREAD_NOTIFY . " (thread_id, notify_datestamp, notify_user, notify_status) VALUES('" . $post_data['thread_id'] . "', '" . time() . "', '" . $post_data['post_author'] . "', '1')");
}
}
if ($defender->safe()) {
redirect(INFUSIONS . "forum/postify.php?post=new&error=0&forum_id=" . intval($post_data['forum_id']) . "&parent_id=" . intval($post_data['forum_cat']) . "&thread_id=" . intval($post_data['thread_id'] . ""));
}
} else {
addNotice("danger", $locale['forum_0186']);
}
} else {
addNotice("danger", $locale['forum_0187']);
redirect(INFUSIONS . "forum/index.php");
}
}
}
$form_action = INFUSIONS . "forum/newthread.php";
$info = array('title' => $locale['forum_0057'], 'description' => '', 'openform' => openform('input_form', 'post', $form_action, array('enctype' => FALSE)), 'closeform' => closeform(), 'forum_id_field' => '', 'thread_id_field' => '', 'forum_field' => form_select_tree("forum_id", $locale['forum_0395'], $thread_data['forum_id'], array("required" => true, "width" => "320px", "no_root" => TRUE, "query" => multilang_table("FO") ? "WHERE forum_language='" . LANGUAGE . "'" : ""), DB_FORUMS, "forum_name", "forum_id", "forum_cat"), 'subject_field' => form_text('thread_subject', $locale['forum_0600'], $thread_data['thread_subject'], array('required' => 1, 'placeholder' => $locale['forum_2001'], 'error_text' => '', 'class' => 'm-t-20 m-b-20')), 'message_field' => form_textarea('post_message', $locale['forum_0601'], $post_data['post_message'], array('required' => 1, 'error_text' => '', 'autosize' => 1, 'no_resize' => 1, 'preview' => 1, 'form_name' => 'input_form', 'bbcode' => 1)), 'attachment_field' => "", 'poll_form' => "", 'smileys_field' => form_checkbox('post_smileys', $locale['forum_0622'], $post_data['post_smileys'], array('class' => 'm-b-0')), 'signature_field' => array_key_exists("user_sig", $userdata) && $userdata['user_sig'] ? form_checkbox('post_showsig', $locale['forum_0623'], $post_data['post_showsig'], array('class' => 'm-b-0')) : '', 'sticky_field' => iSUPERADMIN ? form_checkbox('thread_sticky', $locale['forum_0620'], $thread_data['thread_sticky'], array('class' => 'm-b-0')) : '', 'lock_field' => iSUPERADMIN ? form_checkbox('thread_locked', $locale['forum_0621'], $thread_data['thread_locked'], array('class' => 'm-b-0')) : '', 'edit_reason_field' => '', 'delete_field' => '', 'hide_edit_field' => '', 'post_locked_field' => '', 'notify_field' => $forum_settings['thread_notify'] ? form_checkbox('notify_me', $locale['forum_0626'], $post_data['notify_me'], array('class' => 'm-b-0')) : '', 'post_buttons' => form_button('post_newthread', $locale['forum_0057'], $locale['forum_0057'], array('class' => 'btn-primary btn-sm')) . form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default btn-sm m-l-10')), 'last_posts_reply' => '');
postform($info);
}
} else {
redirect(INFUSIONS . 'forum/index.php');
}
require_once THEMES . "templates/footer.php";
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:newthread.php
示例11: opentabbody
echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $tab_active);
echo openform('addcat', 'post', FUSION_REQUEST, array('class' => 'm-t-20'));
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-8'>\n";
openside('');
echo form_hidden("download_cat_id", "", $data['download_cat_id']);
echo form_text('download_cat_name', $locale['download_0300'], $data['download_cat_name'], array('required' => TRUE, 'error_text' => $locale['download_0351']));
echo form_textarea('download_cat_description', $locale['download_0301'], $data['download_cat_description'], array('resize' => 0, 'autosize' => TRUE));
echo "<div class='clearfix'>\n";
echo form_select('download_cat_sort_by', $locale['download_0302'], $data['download_cat_sort_by'], array('options' => array('1' => $locale['download_0303'], '2' => $locale['download_0304'], '3' => $locale['download_0305']), 'class' => 'pull-left m-r-10', 'width' => '200px'));
echo form_select('download_cat_sort_order', '', $data['download_cat_sort_order'], array('options' => array('ASC' => $locale['download_0306'], 'DESC' => $lo
|
请发表评论