function display_forum_postform($info) { $locale = fusion_get_locale(); add_to_head("<link rel='stylesheet' type='text/css' href='" . INFUSIONS . "forum/templates/css/forum.css'>"); echo render_breadcrumbs(); opentable($info['title']); // New template echo "<!--pre_form-->\n"; echo "<h4 class='m-b-20'>" . $info['description'] . "</h4>\n"; echo $info['openform']; echo $info['forum_field']; echo $info['subject_field']; echo $info['tags_field']; echo $info['message_field']; echo $info['edit_reason_field']; echo $info['forum_id_field']; echo $info['thread_id_field']; echo $info['poll_form']; $tab_title['title'][0] = $locale['forum_0602']; $tab_title['id'][0] = 'postopts'; $tab_title['icon'][0] = ''; $tab_active = tab_active($tab_title, 0); $tab_content = opentabbody($tab_title['title'][0], 'postopts', $tab_active); // first one is guaranteed to be available $tab_content .= "<div class='well m-t-20'>\n"; $tab_content .= $info['delete_field']; $tab_content .= $info['sticky_field']; $tab_content .= $info['notify_field']; $tab_content .= $info['lock_field']; $tab_content .= $info['hide_edit_field']; $tab_content .= $info['smileys_field']; $tab_content .= $info['signature_field']; $tab_content .= "</div>\n"; $tab_content .= closetabbody(); if (!empty($info['attachment_field'])) { $tab_title['title'][1] = $locale['forum_0557']; $tab_title['id'][1] = 'attach_tab'; $tab_title['icon'][1] = ''; $tab_content .= opentabbody($tab_title['title'][1], 'attach_tab', $tab_active); $tab_content .= "<div class='well m-t-20'>\n" . $info['attachment_field'] . "</div>\n"; $tab_content .= closetabbody(); } echo opentab($tab_title, $tab_active, 'newthreadopts'); echo $tab_content; echo closetab(); echo $info['post_buttons']; echo $info['closeform']; echo "<!--end_form-->\n"; closetable(); if (!empty($info['last_posts_reply'])) { echo "<div class='well m-t-20'>\n"; echo $info['last_posts_reply']; echo "</div>\n"; } }
/** * Admin interface */ public function viewTagsAdmin() { global $aidlink; pageAccess('F'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=ft', 'title' => self::$locale['forum_tag_0100'])); echo "<div class='well'>" . self::$locale['forum_tag_0101'] . "</div>\n"; $tab['title'][] = self::$locale['forum_tag_0102']; $tab['id'][] = "tag_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['tag_id']) && isnum($_GET['tag_id']) ? self::$locale['forum_tag_0104'] : self::$locale['forum_tag_0103']; $tab['id'][] = "tag_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "tag_list"; echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "tag_form": echo $this->displayTagForm(); break; case "tag_list": echo $this->displayTagList(); } echo closetab(); }
public function viewRanksAdmin() { global $aidlink; pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => self::$locale['404'])); $forum_settings = $this->get_forum_settings(); echo "<div class='well'>" . self::$locale['forum_rank_0100'] . "</div>\n"; if ($forum_settings['forum_ranks']) { $tab['title'][] = self::$locale['402']; $tab['id'][] = "rank_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['rank_id']) && isnum($_GET['rank_id']) ? self::$locale['401'] : self::$locale['400']; $tab['id'][] = "rank_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "rank_list"; echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "rank_form": // @todo: improvise rank from ui echo $this->displayRanksForm(); break; case "rank_list": echo $this->displayRankList(); } echo closetab(); } else { opentable(self::$locale['403']); ?> <div class="well text-center"> <?php echo sprintf(self::$locale['450'], "<a href='" . FUSION_SELF . $aidlink . "§ion=fs'>" . self::$locale['451'] . "</a>"); ?> </div> <?php closetable(); } }
public function viewMoodAdmin() { global $aidlink; pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fmd', 'title' => self::$locale['forum_admin_004'])); echo "<div class='well'>" . self::$locale['forum_090'] . "</div>\n"; $tab['title'][] = self::$locale['forum_093']; $tab['id'][] = "mood_list"; $tab['icon'][] = ""; $tab['title'][] = isset($_GET['mood_id']) && isnum($_GET['mood_id']) ? self::$locale['forum_092'] : self::$locale['forum_091']; $tab['id'][] = "mood_form"; $tab['icon'][] = ""; $_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "mood_list"; echo opentab($tab, $_GET['ref'], "mood_admin", TRUE, "m-t-10", "ref"); switch ($_GET['ref']) { case "mood_form": $this->displayMoodForm(); break; case "mood_list": $this->displayMoodList(); break; } echo closetab(); }
dbquery_insert(DB_ARTICLE_CATS, $inputArray, "save"); addNotice("success", $locale['articles_0150']); redirect(clean_request("cat_view=1", array("section", "aid"), true)); } else { addNotice("danger", $locale['articles_0352']); } } } } // UI dual tab $articleCatTab['title'][] = $locale['articles_0020']; $articleCatTab['id'][] = "b"; $articleCatTab['title'][] = $locale['articles_0027']; $articleCatTab['id'][] = "a"; $tab_active = tab_active($articleCatTab, isset($_GET['action']) or !defender::safe() ? 1 : 0); echo opentab($articleCatTab, $tab_active, "artCTab", FALSE, "m-t-20"); 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);
$master_title['icon'] = ''; $master_title['title'][] = $edit ? $locale['blog_0402'] : $locale['blog_0401']; $master_title['id'][] = 'blog_form'; $master_title['icon'] = ''; $master_title['title'][] = $locale['blog_0502']; $master_title['id'][] = 'blog_category'; $master_title['icon'] = ''; $master_title['title'][] = $locale['blog_0406']; $master_title['id'][] = 'settings'; $master_title['icon'] = ''; $master_title['title'][] = $locale['blog_0600']; $master_title['id'][] = 'submissions'; $master_title['icon'] = ''; $tab_active = $_GET['section']; opentable($locale['blog_0405']); echo opentab($master_title, $tab_active, 'blog', 1); switch ($_GET['section']) { case "blog_category": include "admin/blog_cat.php"; break; case "settings": add_breadcrumb(array('link' => "", 'title' => $locale['blog_settings'])); include "admin/blog_settings.php"; break; case "blog_form": add_breadcrumb(array('link' => '', 'title' => $edit ? $locale['blog_0402'] : $locale['blog_0401'])); include "admin/blog.php"; break; case "submissions": include "admin/blog_submissions.php"; break;
} opentable($locale['theme_1000']); switch ($_GET['action']) { case "manage": if (isset($_GET['theme'])) { echo "<div class='m-t-20'>\n"; $theme_admin::display_theme_editor($_GET['theme']); echo "</div>\n"; } break; default: $tab_title['title'] = array($locale['theme_1010'], $locale['theme_1011']); $tab_title['id'] = array("list", "upload"); $active_set = isset($_POST['upload']) ? 1 : 0; $active_tab = tab_active($tab_title, $active_set); echo opentab($tab_title, $active_tab, 'theme_tab'); echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $active_tab); echo "<div class='m-t-20'>\n"; $theme_admin::display_theme_list(); echo "</div>\n"; echo closetabbody(); echo opentabbody($tab_title['title'][1], $tab_title['id'][1], $active_tab); echo "<div class='m-t-20'>\n"; $theme_admin::theme_uploader(); echo "</div>\n"; echo closetabbody(); echo closetab(); break; } closetable(); require_once THEMES . "templates/footer.php";
| copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess("CP"); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/sitelinks.php"; $locale = fusion_get_locale("", LOCALE . LOCALESET . "admin/custom_pages.php"); $customPage = new PHPFusion\CustomPage(); add_breadcrumb(array('link' => ADMIN . 'custom_pages.php' . $aidlink, 'title' => $locale['403'])); $customPage->display_custom_page_admin(); $edit = isset($_GET['action']) && $_GET['action'] == 'edit' ? 1 : 0; $allowed_pages = array('cp1', 'cp2'); $_GET['section'] = isset($_GET['section']) && in_array($_GET['section'], $allowed_pages) ? $_GET['section'] : 'cp1'; $tab_title['title'][] = $locale['402']; $tab_title['id'][] = 'cp1'; $tab_title['icon'][] = ''; $tab_title['title'][] = $edit ? $locale['401'] : $locale['400']; $tab_title['id'][] = 'cp2'; $tab_title['icon'][] = $edit ? "fa fa-pencil m-r-10" : 'fa fa-plus-square m-r-10'; $tab_active = tab_active($tab_title, $_GET['section'], TRUE); echo opentab($tab_title, $tab_active, 'cpa', TRUE); if (isset($_GET['section']) && $_GET['section'] == "cp2") { add_breadcrumb(array('link' => ADMIN . 'custom_pages.php' . $aidlink, 'title' => $edit ? $locale['401'] : $locale['400'])); $data = $customPage->getData(); $customPage::customPage_form($data); } else { $customPage::listPage(); } echo closetab(); require_once THEMES . "templates/footer.php";
closedir($temp); if ($panel_id != NULL) { return $panel_list[$panel_id]; } sort($panel_list); return $panel_list; } } // do the table opentable($locale['600']); $fusion_panel = new fusion_panels(); $edit = isset($_GET['action']) && $_GET['action'] == 'edit' ? $fusion_panel->verify_panel($_GET['panel_id']) : 0; // build a new interface $tab_title['title'][] = $locale['407']; $tab_title['id'][] = 'listpanel'; $tab_title['icon'][] = ''; $tab_title['title'][] = $edit ? $locale['409'] : $locale['408']; $tab_title['id'][] = 'panelform'; $tab_title['icon'][] = $edit ? "fa fa-pencil m-r-10" : 'fa fa-plus-square m-r-10'; $tab_active = tab_active($tab_title, $edit ? 1 : 0, TRUE, 1); echo opentab($tab_title, $tab_active, 'id', FUSION_SELF . $aidlink); echo opentabbody($tab_title['title'][0], 'listpanel', $tab_active, 1); $fusion_panel->panel_listing(); echo closetabbody(); if (isset($_GET['section']) && $_GET['section'] == 'panelform') { echo opentabbody($tab_title['title'][1], 'panelform', $tab_active, 1); $fusion_panel->add_panel_form(); echo closetabbody(); } closetable(); require_once THEMES . "templates/footer.php";
/** * Theme Styler Page * Edit done, save done. Now load. */ public function theme_editor() { global $aidlink, $locale; if (isset($_GET['e_action']) && $_GET['e_action'] == "edit" && isset($_GET['preset']) && isnum($_GET['preset'])) { $result = dbquery("SELECT * FROM " . DB_THEME . " WHERE theme_name='" . $this->theme_name . "' AND theme_id='" . intval($_GET['preset']) . "'"); if (dbrows($result) > 0) { $this->data = dbarray($result); if ($this->data['theme_config']) { $this->data += unserialize(stripslashes($this->data['theme_config'])); } } } self::save_theme(); $this->font_decoration_options = array($locale['theme_5000'], $locale['theme_5001'], $locale['theme_5002'], $locale['theme_5003'], $locale['theme_5004'], $locale['theme_5005'], $locale['theme_5006'], $locale['theme_5007']); $this->fills = array($locale['theme_5008'], $locale['theme_5009'], $locale['theme_5010'], $locale['theme_5011'], $locale['theme_5012']); $tab_title['title'][] = $locale['theme_2001']; $tab_title['id'][] = 'font'; $tab_title['icon'][] = 'fa fa-text-width m-r-10'; $tab_title['title'][] = $locale['theme_2002']; $tab_title['id'][] = 'grid'; $tab_title['icon'][] = 'fa fa-magic m-r-10'; $tab_title['title'][] = $locale['theme_2003']; $tab_title['id'][] = 'nav'; $tab_title['icon'][] = 'fa fa-navicon m-r-10'; $tab_active = tab_active($tab_title, 0); if ($this->debug) { print_p($_POST); } // Use a modal to block user to avoid double clicking the save button. echo openmodal('dbi', sprintf($locale['theme_2005'], ucwords($this->theme_name)), array('class' => 'zindex-boost modal-center', 'button_id' => 'save_theme', 'static' => 1)); echo "<div class='pull-left m-r-20'><i class='icon_notify n-magic'></i></div>\n"; echo "<div class='overflow-hide text-smaller'>" . $locale['theme_2006'] . "</div>\n"; echo closemodal(); // how come my multiple preset missing now? echo openform('theme_edit', 'post', FUSION_REQUEST, array("class" => "m-t-20")); echo "<div class='list-group-item m-b-20 clearfix'>\n"; echo "<div class='pull-right m-l-10'>\n"; echo form_button('save_theme', $locale['theme_5013'], 'save_theme', array('class' => 'btn-primary m-r-10')); echo form_button('close_theme', $locale['close'], 'close_theme', array('class' => 'btn-default')); echo "</div>\n"; echo "<div class='overflow-hide'>\n"; echo form_hidden('theme_id', '', $this->data['theme_id']); echo form_hidden("theme_datestamp", '', time()); echo form_text('theme_title', $locale['theme_2007'], $this->data['theme_title'], array('inline' => 1, 'required' => TRUE)); echo form_hidden('theme_name', $locale['theme_2008'], $this->theme_name, array('inline' => 1, 'deactivate' => 1)); echo "</div>\n"; echo "</div>\n"; echo opentab($tab_title, $tab_active, 'atom'); echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $tab_active); echo "<div class='m-t-20'>\n"; $this->font_admin(); echo "</div>\n"; echo closetabbody(); echo opentabbody($tab_title['title'][1], $tab_title['id'][1], $tab_active); echo "<div class='m-t-20'>\n"; $this->layout_admin(); echo "</div>\n"; echo closetabbody(); echo opentabbody($tab_title['title'][2], $tab_title['id'][2], $tab_active); echo "<div class='m-t-20'>\n"; $this->nav_admin(); echo "</div>\n"; echo closetabbody(); echo closetab(); echo closeform(); }
| at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; pageAccess("SL"); require_once THEMES . "templates/admin_header.php"; include LOCALE . LOCALESET . "admin/sitelinks.php"; $site_links = new \PHPFusion\SiteLinks(); $edit = isset($_GET['link_id']) ? $site_links->verify_edit($_GET['link_id']) : 0; $master_title['title'][] = $locale['SL_0001']; $master_title['id'][] = "links"; $master_title['icon'][] = ''; $master_title['title'][] = $edit ? $locale['SL_0011'] : $locale['SL_0010']; $master_title['id'][] = "nform"; $master_title['icon'][] = $edit ? "fa fa-pencil m-r-10" : "fa fa-plus-square m-r-10"; $section = "links"; $allowed_section = array("links", "nform"); if (isset($_GET['section']) && in_array($_GET['section'], $allowed_section)) { $section = $_GET['section']; } opentable($locale['SL_0012']); echo opentab($master_title, $section, 'link', TRUE); if (isset($_GET['section']) && $_GET['section'] == "nform") { $site_links->menu_form(); } else { $site_links->menu_listing(); } echo closetab(); closetable(); require_once THEMES . "templates/footer.php";
public function display_administration_form() { global $aidlink; pageAccess("SL"); $locale = fusion_get_locale("", LOCALE . LOCALESET . "admin/sitelinks.php"); if (isset($_POST['cancel'])) { redirect(FUSION_SELF . $aidlink); } $title = $locale['SL_0001']; if (isset($_GET['ref']) && $_GET['ref'] == "link_form") { $title = isset($_GET['link_id']) && $this->verify_sitelinks($_GET['link_id']) ? $locale['SL_0011'] : $locale['SL_0010']; } $master_title['title'][] = $title; $master_title['id'][] = "links"; $master_title['icon'][] = ''; $master_title['title'][] = $locale['SL_0041']; $master_title['id'][] = "settings"; $master_title['icon'][] = ''; $link_index = dbquery_tree(DB_SITE_LINKS, "link_id", "link_cat"); $link_data = dbquery_tree_full(DB_SITE_LINKS, "link_id", "link_cat"); make_page_breadcrumbs($link_index, $link_data, "link_id", "link_name", "link_cat"); opentable($locale['SL_0012']); echo opentab($master_title, isset($_GET['section']) ? $_GET['section'] : "links", 'link', TRUE); if (isset($_GET['section']) && $_GET['section'] == "settings") { $this->display_sitelinks_settings(); } else { if (isset($_GET['ref'])) { switch ($_GET['ref']) { case "link_form": $this->display_sitelinks_form(); break; default: $this->display_sitelinks_list(); } } else { $this->display_sitelinks_list(); } } echo closetab(); closetable(); }
/** * News Page Template * @param $info */ function render_main_news($info) { $news_settings = \PHPFusion\News\NewsServer::get_news_settings(); $locale = fusion_get_locale(); /* Slideshow */ $carousel_indicators = ''; $carousel_item = ''; $carousel_height = "350"; $limit_per_showcase = 5; $carousel_count = 0; if (!empty($info['news_items'])) { $showcase_slides = array_chunk($info['news_items'], $limit_per_showcase, TRUE); foreach ($showcase_slides as $news_slides) { if (!empty($news_slides)) { $item_count = 1; $small_items = array(); $small_items_image = array(); $carousel_active = $carousel_count == 0 ? 'active' : ''; // Uncomment this to get the carousel indicator //$carousel_indicators .= "<li data-target='#news-carousel' data-slide-to='$carousel_count' class='".$carousel_active."'></li>\n"; $carousel_count++; foreach ($news_slides as $news_item) { $image_src = !empty($news_item['news_image_src']) && file_exists($news_item['news_image_src']) ? $news_item['news_image_src'] : THEME . "images/news.jpg"; ob_start(); ?> <div class='item-caption overflow-hide'> <label class="label label-news"> <?php echo $news_item['news_cat_name']; ?> </label> <span class="label-date"> <i class="fa fa-clock-o fa-fw m-r-5"></i> <?php echo showdate('newsdate', $news_item['news_date']); ?> </span> <a class='text-white' href='<?php echo INFUSIONS . "news/news.php?readmore=" . $news_item['news_id']; ?> '> <h4 class='text-white m-t-10'><?php echo $news_item['news_subject']; ?> </h4> </a> <?php if ($news_item['news_allow_comments']) { ?> <span class='m-r-10'><?php echo display_comments($news_item['news_comments'], INFUSIONS . "news/news.php?readmore=" . $news_item['news_id'] . "#comments"); ?> </span> <?php } ?> <?php if ($news_item['news_allow_ratings']) { ?> <span class='m-r-10'><?php echo display_ratings($news_item['news_sum_rating'], $news_item['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $news_item['news_id'] . "#postrating"); ?> </span> <?php } ?> </div> <?php $item = ob_get_contents(); ob_end_clean(); if ($item_count == 1) { // big sized ones $big_item = $item; $big_item_image = $image_src; } else { // small sized ones $small_items[] = $item; $small_items_image[] = $image_src; } $item_count++; if ($item_count == $limit_per_showcase + 1) { $item_count = 1; } } $carousel_item .= "<div class='item " . $carousel_active . "'>\n"; $carousel_item .= "<div class='col-xs-12 col-sm-6 item-lg' style='height: " . $carousel_height . "px; background-image: url({$big_item_image}); background-size: cover;'>"; $carousel_item .= "<div class='item-inner'>\n"; $carousel_item .= $big_item; $carousel_item .= "</div>"; $carousel_item .= "</div>"; $carousel_item .= "<div class='col-xs-6 col-sm-6 p-0'>\n"; if (!empty($small_items)) { $i_count = 1; foreach ($small_items as $iCount => $small_item_info) { $carousel_item .= "<div class='col-xs-6 col-sm-6 p-0'>"; $carousel_item .= "<div class='item-sm' style='" . ($i_count > 2 ? "margin-left: 5px; margin-top:5px; height: " . ($carousel_height / 2 - 5) . "px;" : "margin-left: 5px; height: " . $carousel_height / 2 . "px;") . " background-image: url({$small_items_image[$iCount]}); background-size: cover;'>\n"; $carousel_item .= "<div class='item-inner'>\n"; $carousel_item .= $small_item_info; $carousel_item .= "</div>\n"; $carousel_item .= "</div>\n"; $carousel_item .= "</div>"; $i_count++; } } $carousel_item .= "</div>\n"; $carousel_item .= "</div>\n"; } } } if ($carousel_count) { $carousel_html = "<div id='news-carousel' class='carousel slide m-b-20' data-interval='20000' data-ride='carousel'>\n"; if ($carousel_count > 1 && !empty($carousel_indicators)) { $carousel_html .= "<ol class='carousel-indicators'>\n"; $carousel_html .= $carousel_indicators; $carousel_html .= "</ol>"; } $carousel_html .= "<div class='carousel-inner' style='height:" . $carousel_height . "px' role='listbox'>\n"; $carousel_html .= $carousel_item; $carousel_html .= "</div>\n"; if ($carousel_count > 1) { $carousel_html .= "\n\t\t\t\t<a class='left carousel-control' href='#news-carousel' role='button' data-slide='prev'>\n\t\t\t\t\t<span class='fa fa-chevron-left' aria-hidden='true'></span>\n\t\t\t\t\t<span class='sr-only'>" . $locale['previous'] . "</span>\n\t\t\t \t</a>\n\t\t\t \t<a class='right carousel-control' href='#news-carousel' role='button' data-slide='next'>\n\t\t\t\t\t<span class='fa fa-chevron-right' aria-hidden='true'></span>\n\t\t\t\t\t<span class='sr-only'>" . $locale['next'] . "</span>\n\t\t\t \t</a>\n\n\t\t\t\t"; } $carousel_html .= "</div>\n"; // Inject into header of Septenary \PHPFusion\SeptenaryTheme::Factory()->set_header_html($carousel_html); } // Process and inject all news categories to Left Panel ob_start(); openside($locale['news_0009']); ?> <ul> <?php if (!empty($info['news_categories'])) { foreach ($info['news_categories'] as $cat_id => $cat_data) { echo isset($_GET['cat_id']) && $_GET['cat_id'] == $cat_id ? '' : "<li>\n<a href='" . INFUSIONS . "news/news.php?cat_id=" . $cat_id . "'>" . $cat_data['name'] . "</a>\n</li>\n"; } echo "<li>\n<a href='" . INFUSIONS . "news/news.php?cat_id=0'>" . $locale['news_0006'] . "</a>\n</li>\n"; } else { echo "<li>\n<a href='" . INFUSIONS . "news/news.php?cat_id=0'>" . $locale['news_0006'] . "</a>\n</li>\n"; } ?> </ul> <?php closeside(); $left_html = ob_get_contents(); ob_end_clean(); \PHPFusion\SeptenaryTheme::Factory()->set_left_html($left_html); echo render_breadcrumbs(); // Build filters $i = 0; foreach ($info['news_filter'] as $link => $title) { $tab_title['title'][] = $title; $tab_title['id'][] = $i; $i++; } $active_tab = tab_active($tab_title, 0, 'type'); ?> <div id="news_filter_tab"> <?php echo opentab($tab_title, $active_tab, 'filters', TRUE, '', 'type'); if (!empty($info['news_items'])) { echo "<div class='row'>\n"; foreach ($info['news_items'] as $i => $news_info) { echo "<div class='" . \PHPFusion\SeptenaryComponents::col_span(4, 6, 6) . "'>\n"; echo isset($_GET['cat_id']) ? "<!--pre_news_cat_idx-->\n" : "<!--news_prepost_" . $i . "-->\n"; render_news($news_info['news_subject'], $news_info['news_news'], $news_info, FALSE); echo isset($_GET['cat_id']) ? "<!--sub_news_cat_idx-->" : "<!--sub_news_idx-->\n"; echo "</div>\n"; } echo "</div>\n"; if ($info['news_total_rows'] > $news_settings['news_pagination']) { $type_start = isset($_GET['type']) ? "type=" . $_GET['type'] . "&" : ''; $cat_start = isset($_GET['cat_id']) ? "cat_id=" . $_GET['cat_id'] . "&" : ''; echo "<div class='text-center m-t-10 m-b-10'>" . makepagenav($_GET['rowstart'], $news_settings['news_pagination'], $info['news_total_rows'], 3, INFUSIONS . "news/news.php?" . $cat_start . $type_start) . "</div>\n"; } } else { echo "<div class='well text-center'>" . $locale['news_0005'] . "</div>\n"; } echo closetab(); ?> </div> <?php }
dbquery_insert(DB_SMILEYS, $data, "save"); addNotice("success", $locale['410']); redirect(FUSION_SELF . $aidlink); } } } } opentable($form_title); $tab_title['title'][] = $locale['400']; $tab_title['id'][] = "smiley_list"; $tab_title['icon'][] = ""; $tab_title['title'][] = $form_title; $tab_title['id'][] = "smileyform"; $tab_title['icon'][] = ""; $tab_active = tab_active($tab_title, $edit ? 1 : 0); echo opentab($tab_title, $tab_active, "smileyAdmin"); echo opentabbody($tab_title['title'][0], $tab_title['id'][0], $tab_active); $result = dbquery("SELECT smiley_id, smiley_code, smiley_image, smiley_text FROM " . DB_SMILEYS . " ORDER BY smiley_text"); if (dbrows($result)) { echo "<table class='table table-hover table-striped'>\n"; echo "<tr>\n<th class='tbl2'><strong>" . $locale['430'] . "</strong></th>\n"; echo "<th class='tbl2'><strong>" . $locale['431'] . "</strong></th>\n"; echo "<th class='tbl2'><strong>" . $locale['432'] . "</strong></th>\n"; echo "<th class='tbl2' width='1%' style='white-space:nowrap'><strong>" . $locale['433'] . "</strong></th>\n</tr>\n<tbody>\n"; while ($cdata = dbarray($result)) { echo "<tr>\n<td>" . $cdata['smiley_code'] . "</td>\n"; echo "<td><img src='" . IMAGES . "smiley/" . $cdata['smiley_image'] . "' alt='" . $data['smiley_text'] . "' /></td>\n"; echo "<td>" . $cdata['smiley_text'] . "</td>\n"; echo "<td width='1%' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&smiley_id=" . $cdata['smiley_id'] . "'>" . $locale['434'] . "</a> -\n"; echo "<a id='confirm' href='" . FUSION_SELF . $aidlink . "&action=delete&smiley_id=" . $cdata['smiley_id'] . "'>" . $locale['435'] . "</a></td>\n</tr>\n"; }
/** The Theme Editor - Manage UI */ public static function display_theme_editor($theme_name) { global $aidlink, $locale; // sanitize theme exist $theme_name = self::verify_theme($theme_name) ? $theme_name : ""; if (!$theme_name) { redirect(clean_request("", array("aid"), TRUE)); } add_breadcrumb(array('link' => '', 'title' => $locale['theme_1018'])); // go with tabs $tab['title'] = array($locale['theme_1022'], $locale['theme_1023'], $locale['theme_1024']); $tab['id'] = array("dashboard", "widgets", "css"); $tab['icon'] = array("fa fa-edit fa-fw", "fa fa-cube fa-fw", "fa fa-css3 fa-fw"); if (isset($_GET['action'])) { $tab['title'][] = $locale['theme_1029']; $tab['id'][] = "close"; $tab['icon'][] = "fa fa-close fa-fw"; } if (isset($_POST['close_theme'])) { redirect(FUSION_SELF . $aidlink); } $_GET['section'] = isset($_GET['section']) && in_array($_GET['section'], $tab['id']) ? $_GET['section'] : "dashboard"; $tab_active = $_GET['section']; $atom = new \PHPFusion\Atom\Atom(); $atom->target_folder = $theme_name; $atom->theme_name = $theme_name; echo opentab($tab, $tab_active, "theme_admin", TRUE); // now include the thing as necessary switch ($_GET['section']) { case "dashboard": /** * Delete preset */ if (isset($_GET['delete_preset']) && isnum($_GET['delete_preset'])) { if (empty($_GET['theme'])) { redirect(FUSION_SELF . $aidlink); } $theme_name = stripinput($_GET['theme']); $file = dbarray(dbquery("SELECT theme_file FROM " . DB_THEME . " WHERE theme_name='" . $theme_name . "'\n\t\t\t\t\tand theme_id='" . intval($_GET['delete_preset']) . "'")); if (file_exists(THEMES . $theme_name . "/" . $file['theme_file'])) { unlink(THEMES . $theme_name . "/" . $file['theme_file']); } dbquery("DELETE FROM " . DB_THEME . " WHERE theme_id='" . intval($_GET['delete_preset']) . "'"); addNotice('success', $locale['theme_success_002']); redirect(clean_request("", array("section", "aid", "action", "theme"), TRUE)); } /** * Set active presets */ if (isset($_POST['load_preset']) && isnum($_POST['load_preset'])) { $result = dbquery("select theme_id FROM " . DB_THEME . " WHERE theme_active='1'"); if (dbrows($result) > 0) { $data = dbarray($result); $data = array("theme_id" => $data['theme_id'], "theme_active" => 0); dbquery_insert(DB_THEME, $data, "update"); } $data = array("theme_id" => $_POST['load_preset'], "theme_active" => 1); dbquery_insert(DB_THEME, $data, "update"); redirect(clean_request("", array("section", "aid", "action", "theme"), TRUE)); } $atom->display_theme_overview(); break; case "widgets": $atom->display_theme_widgets(); break; case "css": $atom->theme_editor(); break; case "close": redirect(FUSION_SELF . $aidlink); break; default: break; } echo closetab(); }
$gallery_tab['id'][] = "photo_form"; $gallery_tab['icon'][] = ""; $gallery_tab['title'][] = $album_edit ? $locale['gallery_0005'] : $locale['gallery_0004']; $gallery_tab['id'][] = "album_form"; $gallery_tab['icon'][] = ""; $gallery_tab['title'][] = $locale['gallery_0006']; $gallery_tab['id'][] = "settings"; $gallery_tab['icon'][] = ""; $gallery_tab['title'][] = $locale['gallery_0007']; $gallery_tab['id'][] = "submissions"; $gallery_tab['icon'][] = ""; $allowed_pages = array("album_form", "photo_form", "settings", "submissions", "actions"); $_GET['section'] = isset($_GET['section']) && in_array($_GET['section'], $allowed_pages) ? $_GET['section'] : "gallery"; $_GET['album'] = 0; opentable($locale['gallery_0001']); echo opentab($gallery_tab, $_GET['section'], "gallery_admin", TRUE, "m-t-20"); switch ($_GET['section']) { case "photo_form": // make breadcrumb add_breadcrumb(array("link" => "", "title" => $photo_edit ? $locale['gallery_0003'] : $locale['gallery_0002'])); // include file include "admin/photos.php"; break; case "album_form": add_breadcrumb(array("link" => '', "title" => $album_edit ? $locale['gallery_0005'] : $locale['gallery_0004'])); include "admin/gallery_cat.php"; break; case "actions": include "admin/gallery_actions.php"; break; case "settings":
if ($cat_sorting[0] == "weblink_id") { $data['cat_sort_by'] = "1"; } elseif ($cat_sorting[0] == "weblink_name") { $data['cat_sort_by'] = "2"; } else { $data['cat_sort_by'] = "3"; } $data['cat_sort_order'] = $cat_sorting[1]; } else { redirect(FUSION_SELF . $aidlink); } } $wlCatTab['title'] = array($locale['wl_0710'], $locale['wl_0004']); $wlCatTab['id'] = array("a", "b"); $tab_active = tab_active($wlCatTab, isset($_GET['cat_view']) ? 1 : 0); echo opentab($wlCatTab, $tab_active, "wlCat_tab", FALSE, "m-t-20"); echo opentabbody($wlCatTab['title'][0], $wlCatTab['id'][0], $tab_active); echo openform('addcat', 'post', FUSION_REQUEST, array("class" => "m-t-20")); echo form_hidden("weblink_cat_id", "", $data['weblink_cat_id']); echo form_text('weblink_cat_name', $locale['wl_0700'], $data['weblink_cat_name'], array('required' => TRUE, "error_text" => $locale['wl_0701'], "inline" => TRUE)); echo form_textarea('weblink_cat_description', $locale['wl_0702'], $data['weblink_cat_description'], array("html" => TRUE, "preview" => FALSE, "autosize" => TRUE, "inline" => TRUE)); echo form_select_tree("weblink_cat_parent", $locale['wl_0703'], $data['weblink_cat_parent'], array("disable_opts" => $cat_hidden, "hide_disabled" => TRUE, "inline" => TRUE), DB_WEBLINK_CATS, "weblink_cat_name", "weblink_cat_id", "weblink_cat_parent"); if (multilang_table("WL")) { echo form_select('weblink_cat_language', $locale['global_ML100'], $data['weblink_cat_language'], array('options' => fusion_get_enabled_languages(), "inline" => TRUE)); } else { echo form_hidden('weblink_cat_language', '', $data['weblink_cat_language']); } echo "<div class='row m-0'>\n"; echo "<label class='label-control col-xs-12 col-sm-3 p-l-0'>" . $locale['wl_0704'] . "</label>\n"; echo "<div class='col-xs-12 col-sm-3 p-l-0'>\n"; echo form_select('cat_sort_by', "", $data['cat_sort_by'], array("inline" => TRUE, "width" => "100%", 'options' => array('1' => $locale['wl_0705'], '2' => $locale['wl_0706'], '3' => $locale['wl_0707']), 'class' => 'pull-left m-r-10'));
if (dbrows($result) != 0) { while ($data = dbarray($result)) { $template[$data['template_id']] = $data['template_name']; } } $tab_title = array(); foreach ($template as $id => $tname) { $tab_title['title'][$id] = $tname; $tab_title['id'][$id] = $id; $tab_title['icon'][$id] = ''; } $tab_values = array_values($tab_title['id']); $_GET['section'] = isset($_GET['section']) && isnum($_GET['section']) && in_array($_GET['section'], $tab_values) ? $_GET['section'] : $tab_values[0]; opentable($locale['400']); add_breadcrumb(array('link' => ADMIN . $aidlink, 'title' => $locale['400'])); echo opentab($tab_title, $_GET['section'], "email-templates-tab", true); echo opentabbody($tab_title['title'][$_GET['section']], $tab_title['id'][$_GET['section']], $_GET['section'], true); $result = dbquery("SELECT * FROM " . DB_EMAIL_TEMPLATES . " WHERE template_id='" . intval($_GET['section']) . "' LIMIT 1"); if (dbrows($result)) { $data = dbarray($result); $html_helper = ""; $text_helper = ""; if ($data['template_active']) { if ($data['template_format'] == "html") { $text_helper = "class='display-none'"; $html_text = $locale['418']; } else { $html_helper = "class='display-none'"; $html_text = $locale['419']; } } else {
} elseif ($cat_sorting[0] == "download_datestamp") { $data['download_cat_sort_by'] = "3"; } $data['download_cat_sort_order'] = $cat_sorting[1]; } else { redirect(clean_request("", array("section", "aid"), TRUE)); } } $tab_title['title'][] = $locale['download_0023']; $tab_title['id'][] = "dlcats_form"; $tab_title['icon'][] = ""; $tab_title['title'][] = $locale['download_0020']; $tab_title['id'][] = "dlcats"; $tab_title['icon'][] = ""; $tab_active = tab_active($tab_title, isset($_GET['cat_view']) ? 1 : 0); echo opentab($tab_title, $tab_active, 'dcategory', FALSE, "m-t-20"); 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' => $locale['download_0307']), 'class' => 'pull-left', 'width' => '200px')); echo "</div>\n"; closeside(); echo "</div>\n<div class='col-xs-12 col-sm-4'>\n"; openside('');
function form_textarea($input_name, $label = '', $input_value = '', array $options = array()) { global $locale, $defender, $userdata; // for editor $title = $label ? stripinput($label) : ucfirst(strtolower(str_replace("_", " ", $input_name))); $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : ""; require_once INCLUDES . "bbcode_include.php"; require_once INCLUDES . "html_buttons_include.php"; include_once LOCALE . LOCALESET . "admin/html_buttons.php"; include_once LOCALE . LOCALESET . "error.php"; if (!empty($options['bbcode'])) { $options['type'] = "bbcode"; } elseif (!empty($options['html'])) { $options['type'] = "html"; } $options = array('input_id' => !empty($options['input_id']) ? $options['input_id'] : $input_name, "type" => !empty($options['type']) && in_array($options['type'], array("html", "bbcode", "tinymce")) ? $options['type'] : "", 'required' => !empty($options['required']) && $options['required'] == 1 ? '1' : '0', 'placeholder' => !empty($options['placeholder']) ? $options['placeholder'] : '', 'deactivate' => !empty($options['deactivate']) && $options['deactivate'] == 1 ? '1' : '', 'width' => !empty($options['width']) ? $options['width'] : '100%', 'height' => !empty($options['height']) ? $options['height'] : '80px', 'class' => !empty($options['class']) ? $options['class'] : '', 'inline' => !empty($options['inline']) && $options['inline'] == 1 ? '1' : '0', 'length' => !empty($options['length']) ? $options['length'] : '200', 'error_text' => !empty($options['error_text']) ? $options['error_text'] : $locale['error_input_default'], 'safemode' => !empty($options['safemode']) && $options['safemode'] == 1 ? '1' : '0', 'form_name' => !empty($options['form_name']) ? $options['form_name'] : 'input_form', 'tinymce' => !empty($options['tinymce']) && in_array($options['tinymce'], array(TRUE, 'simple', 'advanced')) ? $options['tinymce'] : "simple", 'no_resize' => !empty($options['no_resize']) && $options['no_resize'] == '1' ? '1' : '0', 'autosize' => !empty($options['autosize']) && $options['autosize'] == 1 ? '1' : '0', 'preview' => !empty($options['preview']) && $options['preview'] == TRUE ? TRUE : FALSE, 'path' => !empty($options['path']) && $options['path'] ? $options['path'] : IMAGES, 'maxlength' => !empty($options['maxlength']) && isnum($options['maxlength']) ? $options['maxlength'] : '', 'tip' => !empty($options['tip']) ? $options['tip'] : ''); if ($options['type'] == "tinymce") { $tinymce_list = array(); $image_list = makefilelist(IMAGES, ".|..|"); $image_filter = array('png', 'PNG', 'bmp', 'BMP', 'jpg', 'JPG', 'jpeg', 'gif', 'GIF', 'tiff', 'TIFF'); foreach ($image_list as $image_name) { $image_1 = explode('.', $image_name); $last_str = count($image_1) - 1; if (in_array($image_1[$last_str], $image_filter)) { $tinymce_list[] = array('title' => $image_name, 'value' => IMAGES . $image_name); } } $tinymce_list = json_encode($tinymce_list); $tinymce_smiley_vars = ""; if (!defined('tinymce')) { add_to_head("<style type='text/css'>.mceIframeContainer iframe{width:100%!important; height:30px;}</style>"); add_to_footer("<script type='text/javascript' src='" . INCLUDES . "jscripts/tinymce/tinymce.min.js'></script>"); define('tinymce', TRUE); // PHP-Fusion Parse Cache Smileys $smileys = cache_smileys(); $tinymce_smiley_vars = ""; if (!empty($smileys)) { $tinymce_smiley_vars = "var shortcuts = {\n"; foreach ($smileys as $params) { $tinymce_smiley_vars .= "'" . strtolower($params['smiley_code']) . "' : '<img alt=\"" . $params['smiley_text'] . "\" src=\"" . IMAGES . "smiley/" . $params['smiley_image'] . "\"/>',\n"; } $tinymce_smiley_vars .= "};\n"; $tinymce_smiley_vars .= "\n\t\t\t\ted.on('keyup load', function(e){\n\t\t\t\t\tvar marker = tinymce.activeEditor.selection.getBookmark();\n\t\t\t\t\t// Store editor contents\n\t\t\t\t\tvar content = tinymce.activeEditor.getContent({'format':'raw'});\n\t\t\t\t\t// Loop through all shortcuts\n\t\t\t\t\tfor(var key in shortcuts){\n\t\t\t\t\t\t// Check if the editor html contains the looped shortcut\n\t\t\t\t\t\tif(content.toLowerCase().indexOf(key) != -1) {\n\t\t\t\t\t\t\t// Escaping special characters to be able to use the shortcuts in regular expression\n\t\t\t\t\t\t\tvar k = key.replace(/[<>*()?']/ig, \"\\\$&\");\n\t\t\t\t\t\t\ttinymce.activeEditor.setContent(content.replace(k, shortcuts[key]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Now put cursor back where it was\n\t\t\t\t\ttinymce.activeEditor.selection.moveToBookmark(marker);\n\t\t\t\t});\n\t\t\t\t"; } } // Mode switching for TinyMCE switch ($options['tinymce']) { case 'advanced': add_to_jquery("\n tinymce.init({\n selector: '#" . $options['input_id'] . "',\n theme: 'modern',\n entity_encoding : 'raw',\n width: '100%',\n height: 300,\n plugins: [\n 'advlist autolink autoresize link image lists charmap print preview hr anchor pagebreak spellchecker',\n 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n 'save table contextmenu directionality template paste textcolor'\n ],\n image_list: {$tinymce_list},\n content_css: '" . THEMES . "admin_templates/" . fusion_get_settings("admin_theme") . "/acp_styles.css',\n toolbar1: 'insertfile undo redo | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | newdocument fullscreen preview cut copy paste pastetext spellchecker searchreplace code',\n toolbar2: 'styleselect formatselect removeformat | fontselect fontsizeselect bold italic underline strikethrough subscript superscript blockquote | forecolor backcolor',\n toolbar3: 'hr pagebreak insertdatetime | link unlink anchor | image media | table charmap visualchars visualblocks emoticons',\n image_advtab: true,\n style_formats: [\n {title: 'Bold text', inline: 'b'},\n {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},\n {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},\n {title: 'Example 1', inline: 'span', classes: 'example1'},\n {title: 'Example 2', inline: 'span', classes: 'example2'},\n {title: 'Table styles'},\n {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}\n ],\n setup: function(ed) {\n \t\t\t\t\t// add tabkey listener\n \t\t\t\t\ted.on('keydown', function(event) {\n \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n \t\t\t\t\t\tevent.preventDefault();\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n });\n "); break; case 'simple': add_to_jquery("\n tinymce.init({\n selector: '#" . $options['input_id'] . "',\n theme: 'modern',\n menubar: false,\n statusbar: false,\n content_css: '" . THEMES . "/templates/tinymce.css',\n image_list: {$tinymce_list},\n plugins: [\n 'advlist autolink autoresize link lists charmap print preview hr anchor pagebreak spellchecker',\n 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n 'contextmenu directionality template paste bbcode autoresize'\n ],\n height: 30,\n image_advtab: true,\n toolbar1: 'undo redo | bold italic underline | bullist numlist blockquote | hr media | fullscreen',\n entity_encoding : 'raw',\n language: '" . $locale['tinymce'] . "',\n object_resizing: false,\n resize: false,\n relative_urls: false,\n setup: function(ed) {\n \t\t\t\t\t// add tabkey listener\n \t\t\t\t\ted.on('keydown', function(event) {\n \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n \t\t\t\t\t\tevent.preventDefault();\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n });\n "); add_to_jquery("\n\t\t\t\t\$('#inject').bind('click', function() {\n\t\t\t\t\ttinyMCE.activeEditor.execCommand(\"mceInsertContent\", true, '[b]I am injecting in stuff..[/b]');\n\t\t\t\t\t});\n\t\t\t\t"); break; case 'default': add_to_jquery("\n tinymce.init({\n selector: '#" . $options['input_id'] . "',\n theme: 'modern',\n entity_encoding : 'raw',\n language:'" . $locale['tinymce'] . "',\n setup: function(ed) {\n \t\t\t\t\t// add tabkey listener\n \t\t\t\t\ted.on('keydown', function(event) {\n \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n \t\t\t\t\t\tevent.preventDefault();\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n });\n "); break; } } else { if (!defined('autogrow') && $options['autosize']) { define('autogrow', TRUE); add_to_footer("<script src='" . DYNAMICS . "assets/autosize/jquery.autosize.min.js'></script>"); } if ($options['autosize']) { add_to_jquery("\n\t\t \$('#" . $options['input_id'] . "').autosize();\n\t\t "); } } if ($input_value !== '') { $input_value = html_entity_decode(stripslashes($input_value), ENT_QUOTES, $locale['charset']); $input_value = str_replace("<br />", "", $input_value); } $error_class = ""; if ($defender->inputHasError($input_name)) { $error_class = "has-error "; if (!empty($options['error_text'])) { $new_error_text = $defender->getErrorText($input_name); if (!empty($new_error_text)) { $options['error_text'] = $new_error_text; } addNotice("danger", "<strong>{$title}</strong> - " . $options['error_text']); } } $html = "<div id='" . $options['input_id'] . "-field' class='form-group " . $error_class . $options['class'] . "' " . ($options['inline'] && $options['width'] && !$label ? "style='width: " . $options['width'] . " !important;'" : '') . ">\n"; $html .= $label ? "<label class='control-label " . ($options['inline'] ? "col-xs-12 col-sm-3 col-md-3 col-lg-3 p-l-0" : '') . "' for='" . $options['input_id'] . "'>{$label} " . ($options['required'] == 1 ? "<span class='required'>*</span>" : '') . " " . ($options['tip'] ? "<i class='pointer fa fa-question-circle' title='" . $options['tip'] . "'></i>" : '') . "</label>\n" : ''; $html .= $options['inline'] ? "<div class='col-xs-12 " . ($label ? "col-sm-9 col-md-9 col-lg-9 p-r-0" : "col-sm-12 p-l-0") . "'>\n" : ""; $tab_active = 0; $tab_title = array(); if ($options['preview'] && ($options['type'] == "html" || $options['type'] == "bbcode")) { $tab_title['title'][] = $locale['preview']; $tab_title['id'][] = "prw-" . $options['input_id']; $tab_title['icon'][] = ''; $tab_title['title'][] = $locale['texts']; $tab_title['id'][] = "txt-" . $options['input_id']; $tab_title['icon'][] = ''; $tab_active = tab_active($tab_title, 1); $html .= opentab($tab_title, $tab_active, $options['input_id'] . "-link", "", "editor-wrapper"); $html .= opentabbody($tab_title['title'][1], "txt-" . $options['input_id'], $tab_active); } $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "<div class='panel panel-default panel-txtarea m-b-0' " . ($options['preview'] ? "style='border-top:0 !important; border-radius:0 !important;'" : '') . ">\n<div class='panel-heading clearfix' style='padding-bottom:0 !important;'>\n" : ''; if ($options['type'] == "bbcode" && $options['form_name']) { $html .= display_bbcodes('90%', $input_name, $options['form_name']); } elseif ($options['type'] == "html" && $options['form_name']) { $html .= display_html($options['form_name'], $input_name, TRUE, TRUE, TRUE, $options['path']); } $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "</div>\n<div class='panel-body p-0'>\n" : ''; $html .= "<textarea name='{$input_name}' style='width:100%; height:" . $options['height'] . "; " . ($options['no_resize'] ? 'resize: none;' : '') . "' class='form-control p-15 m-0 " . $options['class'] . " " . ($options['autosize'] ? 'animated-height' : '') . " " . ($options['type'] == "html" || $options['type'] == "bbcode" ? "no-shadow no-border" : '') . " textbox ' placeholder='" . $options['placeholder'] . "' id='" . $options['input_id'] . "' " . ($options['deactivate'] ? 'readonly' : '') . ($options['maxlength'] ? "maxlength='" . $options['maxlength'] . "'" : '') . ">" . $input_value . "</textarea>\n"; if ($options['type'] == "html" || $options['type'] == "bbcode") { $html .= "</div>\n<div class='panel-footer clearfix'>\n"; $html .= "<div class='overflow-hide'><small>" . $locale['word_count'] . ": <span id='" . $options['input_id'] . "-wordcount'></span></small></div>"; add_to_jquery("\n\t\tvar init_str = \$('#" . $options['input_id'] . "').val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(init_str);\n\t\t\$('#" . $options['input_id'] . "').on('input propertychange paste', function() {\n\t\tvar str = \$(this).val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(str);\n\t\t});\n\t\t"); $html .= "</div>\n</div>\n"; } if ($options['preview'] && ($options['type'] == "bbcode" || $options['type'] == "html")) { $html .= closetabbody(); $html .= opentabbody($tab_title['title'][0], "prw-" . $options['input_id'] . "", $tab_active); $html .= "No Result"; $html .= closetabbody(); $html .= closetab(); add_to_jquery("\n\t\t// preview syntax\n\t\tvar form = \$('#" . $options['form_name'] . "');\n\t\t\$('#tab-prw-" . $options['input_id'] . "').bind('click',function(){\n\t\tvar text = \$('#" . $options['input_id'] . "').val();\n\t\tvar format = '" . ($options['type'] == "bbcode" ? 'bbcode' : 'html') . "';\n\t\tvar data = {\n\t\t\t" . (defined('ADMIN_PANEL') ? "'mode': 'admin', " : "") . "\n\t\t\t'text' : text,\n\t\t\t'editor' : format,\n\t\t\t'url' : '" . $_SERVER['REQUEST_URI'] . "',\n\t\t};\n\t\tvar sendData = form.serialize() + '&' + \$.param(data);\n\t\t\$.ajax({\n\t\t\turl: '" . INCLUDES . "dynamics/assets/preview/preview.ajax.php',\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'html',\n\t\t\tdata : sendData,\n\t\t\tsuccess: function(result){\n\t\t\t//console.log(result);\n\t\t\t\$('#prw-" . $options['input_id'] . "').html(result);\n\t\t\t},\n\t\t\terror: function(result) {\n\t\t\t\tnew PNotify({\n\t\t\t\t\ttitle: '" . $locale['error_preview'] . "',\n\t\t\t\t\ttext: '" . $locale['error_preview_text'] . "',\n\t\t\t\t\ticon: 'notify_icon n-attention',\n\t\t\t\t\tanimation: 'fade',\n\t\t\t\t\twidth: 'auto',\n\t\t\t\t\tdelay: '3000'\n\t\t\t\t});\n\t\t\t}\n\t\t\t});\n\t\t});\n\t\t"); } $html .= $options['required'] == 1 && $defender->inputHasError($input_name) || $defender->inputHasError($input_name) ? "<div id='" . $options['input_id'] . "-help' class='label label-danger p-5 display-inline-block'>" . $options['error_text'] . "</div>" : ""; $html .= $options['inline'] ? "</div>\n" : ''; $html .= "</div>\n"; $defender->add_field_session(array('input_name' => $input_name, 'type' => 'textarea', 'title' => $label, 'id' => $options['input_id'], 'required' => $options['required'], 'safemode' => $options['safemode'], 'error_text' => $options['error_text'])); return $html; }
<?php /** * Debonair Widget Console. * There must be two tabs. * First tab is to control widget * Second tab is to control theme settings */ include "locale/" . LOCALESET . "locale.php"; // this works too (same as above) $tab['title'] = array($locale['debonair_0200'], $locale['debonair_0201']); $tab['id'] = array("banner", "tsettings"); $tab_active = tab_active($tab, 0); echo opentab($tab, $tab_active, "debonair_widget"); echo opentabbody($tab['title'][0], $tab['id'][0], $tab_active); debonair_banner_widget(); echo closetabbody(); echo opentabbody($tab['title'][1], $tab['id'][1], $tab_active); debonair_theme_widget(); echo closetabbody(); echo closetab(); function debonair_banner_widget() { global $locale; $acceptedMode = array("edit", "new", "del"); echo "<a class='btn btn-default m-t-10 m-b-20' href='" . clean_request("slides=new", array(), false) . "'>" . $locale['debonair_0203'] . "</a>\n"; echo "<div class='alert alert-info'>" . $locale['debonair_0700'] . "</div>\n"; if (isset($_GET['slides']) && in_array($_GET['slides'], $acceptedMode)) { $_GET['id'] = isset($_GET['id']) && isnum($_GET['id']) ? $_GET['id'] : 0; $data = array(); $db_keys = fieldgenerator(DB_DEBONAIR);
$master_title['icon'] = ''; $master_title['title'][] = $edit ? $locale['articles_0003'] : $locale['articles_0002']; $master_title['id'][] = 'article_form'; $master_title['icon'] = ''; $master_title['title'][] = $edit_cat ? $locale['articles_0022'] : $locale['articles_0020']; $master_title['id'][] = 'article_category'; $master_title['icon'] = ''; $master_title['title'][] = $locale['articles_0030']; $master_title['id'][] = 'settings'; $master_title['icon'] = ''; $master_title['title'][] = $locale['articles_0040']; $master_title['id'][] = 'submissions'; $master_title['icon'] = ''; $tab_active = isset($_GET['section']) && in_array($_GET['section'], $master_title['id']) ? $_GET['section'] : "article"; opentable($locale['articles_0001']); echo opentab($master_title, $tab_active, 'article', 1); switch ($_GET['section']) { case "article_category": add_breadcrumb(array("link" => FUSION_REQUEST, "title" => $master_title['title'][2])); include "admin/article_cat.php"; break; case "settings": add_breadcrumb(array('link' => "", 'title' => $locale['articles_0030'])); include "admin/article_settings.php"; break; case "article_form": if (dbcount("(article_cat_id)", DB_ARTICLE_CATS, multilang_table("AR") ? "article_cat_language='" . LANGUAGE . "'" : "")) { add_breadcrumb(array('link' => '', 'title' => $edit ? $locale['articles_0003'] : $locale['articles_0002'])); include "admin/article.php"; } else { opentable($locale['articles_0001']);
/** * Display Forum Form */ public function display_forum_form() { require_once INCLUDES . 'photo_functions_include.php'; require_once INCLUDES . 'infusions_include.php'; $forum_settings = $this->get_forum_settings(); $language_opts = fusion_get_enabled_languages(); add_breadcrumb(array('link' => '', 'title' => self::$locale['forum_001'])); if (!isset($_GET['action']) && $_GET['parent_id']) { $data['forum_cat'] = $_GET['parent_id']; } $type_opts = array('1' => self::$locale['forum_opts_001'], '2' => self::$locale['forum_opts_002'], '3' => self::$locale['forum_opts_003'], '4' => self::$locale['forum_opts_004']); $forum_image_path = FORUM . "images/"; if (isset($_POST['remove_image']) && isset($_POST['forum_id'])) { $data['forum_id'] = form_sanitizer($_POST['forum_id'], '', 'forum_id'); if ($data['forum_id']) { $data = self::get_forum($data['forum_id']); if (!empty($data)) { $forum_image = $forum_image_path . $data['forum_image']; if (!empty($data['forum_image']) && file_exists($forum_image) && !is_dir($forum_image)) { @unlink($forum_image); $data['forum_image'] = ''; } dbquery_insert(DB_FORUMS, $data, 'update'); addNotice('success', self::$locale['forum_notice_8']); redirect(FUSION_REQUEST); } } } opentable(self::$locale['forum_001']); echo openform('inputform', 'post', FUSION_REQUEST, array('enctype' => 1)); echo "<div class='row'>\n<div class='col-xs-12 col-sm-8 col-md-8 col-lg-8'>\n"; echo form_text('forum_name', self::$locale['forum_006'], $this->data['forum_name'], array('required' => 1, 'error_text' => self::$locale['forum_error_1'])) . form_textarea('forum_description', self::$locale['forum_007'], $this->data['forum_description'], array('autosize' => 1, 'type' => 'bbcode', 'form_name' => 'inputform', 'preview' => TRUE)) . form_text('forum_alias', self::$locale['forum_011'], $this->data['forum_alias']); echo "</div><div class='col-xs-12 col-sm-4 col-md-4 col-lg-4'>\n"; openside(''); $self_id = $this->data['forum_id'] ? $this->data['forum_id'] : ''; echo form_select_tree('forum_cat', self::$locale['forum_008'], $this->data['forum_cat'], array('add_parent_opts' => 1, 'disable_opts' => $self_id, 'hide_disabled' => 1), DB_FORUMS, 'forum_name', 'forum_id', 'forum_cat', $self_id) . form_select('forum_type', self::$locale['forum_009'], $this->data['forum_type'], array("options" => $type_opts)) . form_select('forum_language', self::$locale['forum_010'], $this->data['forum_language'], array("options" => $language_opts)) . form_text('forum_order', self::$locale['forum_043'], $this->data['forum_order'], array('number' => 1)) . form_button('save_forum', $this->data['forum_id'] ? self::$locale['forum_000a'] : self::$locale['forum_000'], self::$locale['forum_000'], array('class' => 'btn btn-sm btn-success')); closeside(); echo "</div>\n</div>\n"; echo "<div class='row'>\n<div class='col-xs-12 col-sm-8 col-md-8 col-lg-8'>\n"; echo form_select('forum_meta', self::$locale['forum_012'], $this->data['forum_meta'], array('tags' => 1, 'multiple' => 1, 'width' => '100%')); if ($this->data['forum_image'] && file_exists(FORUM . "images/" . $this->data['forum_image'])) { openside(); echo "<div class='pull-left m-r-10'>\n"; echo thumbnail(FORUM . "images/" . $this->data['forum_image'], '80px', '80px'); echo "</div>\n<div class='overflow-hide'>\n"; echo "<span class='strong'>" . self::$locale['forum_013'] . "</span><br/>\n"; $image_size = @getimagesize(FORUM . "images/" . $this->data['forum_image']); echo "<span class='text-smaller'>" . sprintf(self::$locale['forum_027'], $image_size[0], $image_size[1]) . "</span><br/>"; echo form_hidden('forum_image', '', $this->data['forum_image']); echo form_button('remove_image', self::$locale['forum_028'], self::$locale['forum_028'], array('class' => 'btn-danger btn-sm m-t-10', 'icon' => 'fa fa-trash')); echo "</div>\n"; closeside(); } else { $tab_title['title'][] = self::$locale['forum_013']; $tab_title['id'][] = 'fir'; $tab_title['icon'][] = ''; $tab_title['title'][] = self::$locale['forum_014']; $tab_title['id'][] = 'ful'; $tab_title['icon'][] = ''; $tab_active = tab_active($tab_title, 0); echo opentab($tab_title, $tab_active, 'forum-image-tab', FALSE, "m-t-20 m-b-20"); // Upload Image echo opentabbody($tab_title['title'][0], 'fir', $tab_active); echo "<span class='display-inline-block m-t-10 m-b-10'>" . sprintf(self::$locale['forum_015'], parsebytesize($forum_settings['forum_attachmax'])) . "</span>\n"; $fileOptions = array("upload_path" => $forum_image_path, "thumbnail" => TRUE, "thumbnail_folder" => $forum_image_path, "type" => "image", "delete_original" => TRUE, "max_count" => $forum_settings['forum_attachmax']); echo form_fileinput('forum_image', "", '', $fileOptions); echo closetabbody(); // Upload image via Web Address echo opentabbody($tab_title['title'][1], 'ful', $tab_active); echo "<span class='display-inline-block m-t-10 m-b-10'>" . self::$locale['forum_016'] . "</strong></span>\n"; $header_opts = array('0' => 'Local Server', '1' => 'URL'); echo form_select('forum_image_header', self::$locale['forum_056'], '', array('inline' => TRUE, 'options' => $header_opts)); echo form_text('forum_image_url', self::$locale['forum_014'], '', array('placeholder' => 'images/forum/', 'inline' => TRUE)); echo closetabbody(); echo closetab(); } echo form_textarea('forum_rules', self::$locale['forum_017'], $this->data['forum_rules'], array('autosize' => 1, 'bbcode' => 1)); echo "</div><div class='col-xs-12 col-sm-4 col-md-4 col-lg-4'>\n"; openside(''); // need to get parent category echo form_select_tree('forum_permissions', self::$locale['forum_025'], $this->data['forum_branch'], array('no_root' => 1, 'deactivate' => $this->data['forum_id'] ? TRUE : FALSE), DB_FORUMS, 'forum_name', 'forum_id', 'forum_cat'); if ($this->data['forum_id']) { echo form_button('jp_forum', self::$locale['forum_029'], self::$locale['forum_029'], array('class' => 'btn-sm btn-default m-r-10')); } closeside(); openside(''); echo form_checkbox('forum_lock', self::$locale['forum_026'], $this->data['forum_lock'], array("reverse_label" => TRUE)) . form_checkbox('forum_users', self::$locale['forum_024'], $this->data['forum_users'], array("reverse_label" => TRUE)) . form_checkbox('forum_quick_edit', self::$locale['forum_021'], $this->data['forum_quick_edit'], array("reverse_label" => TRUE)) . form_checkbox('forum_merge', self::$locale['forum_019'], $this->data['forum_merge'], array("reverse_label" => TRUE)) . form_checkbox('forum_allow_attach', self::$locale['forum_020'], $this->data['forum_allow_attach'], array("reverse_label" => TRUE)) . form_checkbox('forum_allow_poll', self::$locale['forum_022'], $this->data['forum_allow_poll'], array("reverse_label" => TRUE)) . form_hidden('forum_id', '', $this->data['forum_id']) . form_hidden('forum_branch', '', $this->data['forum_branch']); closeside(); echo "</div>\n</div>\n"; echo form_button('save_forum', $this->data['forum_id'] ? self::$locale['forum_000a'] : self::$locale['forum_000'], self::$locale['forum_000'], array('class' => 'btn-sm btn-success')); echo closeform(); closetable(); }
} $result = dbquery("SELECT template_id, template_key, template_name, template_language FROM " . DB_EMAIL_TEMPLATES . " " . (multilang_table("ET") ? "WHERE template_language='" . LANGUAGE . "'" : "") . " ORDER BY template_id ASC"); if (dbrows($result) != 0) { $editlist = array(); while ($data = dbarray($result)) { $template[$data['template_id']] = $data['template_name']; } } foreach ($template as $id => $tname) { $tab_title['title'][$id] = $tname; $tab_title['id'][$id] = $id; $tab_title['icon'][$id] = ''; } $_GET['section'] = isset($_GET['section']) ? $_GET['section'] : 1; $tab_active = tab_active($tab_title, $_GET['section'], 1); echo opentab($tab_title, $tab_active, 'menu', 1); echo opentabbody($tab_title['title'][$_GET['section']], $_GET['section'], $tab_active); $template_id = isset($_GET['section']) && isnum($_GET['section']) ? $_GET['section'] : 0; $result = dbquery("SELECT * FROM " . DB_EMAIL_TEMPLATES . " WHERE template_id='" . $template_id . "' LIMIT 1"); if (dbrows($result)) { $data = dbarray($result); $template_id = $data['template_id']; $template_key = $data['template_key']; $template_format = $data['template_format']; $template_name = $data['template_name']; $template_subject = $data['template_subject']; $template_content = $data['template_content']; $template_sender_name = $data['template_sender_name']; $template_sender_email = $data['template_sender_email']; $template_language = $data['template_language']; if ($data['template_active'] == "1") {
} } $tab['title'][] = $edit_name == TRUE ? $edit_name : $locale['400']; $tab['id'][] = $default_section; $tab['icon'][] = ""; $tab['title'][] = $locale['401']; $tab['id'][] = "pl2"; $tab['icon'][] = ""; $tab['title'][] = "Permalink Settings"; $tab['id'][] = "pls"; $tab['icon'][] = ""; opentable($locale['428']); echo "<div class='well'>\n"; echo $locale['415']; echo "</div>\n"; echo opentab($tab, $_GET['section'], "permalinkTab", TRUE, "m-t-20 m-b-20"); switch ($_GET['section']) { case "pl": // edit if (!empty($edit_name) && !empty($driver)) { echo openform('editpatterns', 'post', FUSION_SELF . $aidlink); ob_start(); echo openmodal("permalinkHelper", $locale['408'], array("button_id" => "pButton")); if (!empty($regex)) { echo "<table class='table table-responsive table-striped'>\n"; foreach ($regex as $key => $values) { echo "<tr>\n"; echo "<td>" . $key . "</td>\n"; echo "<td>" . $values . "</td>\n"; echo "<td>\n"; echo isset($permalink_tags_desc[$key]) ? $permalink_tags_desc[$key] : $locale['na'];
function display_registerform($info) { global $locale; opentable($locale['u101']); // page navigation $open = ""; $close = ""; if (isset($info['section']) && count($info['section']) > 1) { foreach ($info['section'] as $page_section) { $tab_title['title'][$page_section['id']] = $page_section['name']; $tab_title['id'][$page_section['id']] = $page_section['id']; $tab_title['icon'][$page_section['id']] = ''; } $open = opentab($tab_title, $_GET['section'], 'user-profile-form', 1); $close = closetab(); } echo $open; if (empty($info['user_name']) && empty($info['user_field'])) { global $locale; echo "<div class='well text-center'>\n"; echo $locale['uf_108']; echo "</div>\n"; } else { echo "<!--editprofile_pre_idx-->"; echo "<div id='register_form' class='row m-t-20'>\n"; echo "<div class='col-xs-12 col-sm-12'>\n"; if (!empty($info['openform'])) { echo $info['openform']; } if (!empty($info['user_name'])) { echo $info['user_name']; } if (!empty($info['user_email'])) { echo $info['user_email']; } if (!empty($info['user_hide_email'])) { echo $info['user_hide_email']; } if (!empty($info['user_avatar'])) { echo $info['user_avatar']; } if (!empty($info['user_password'])) { echo $info['user_password']; } if (!empty($info['user_admin_password']) && iADMIN) { echo $info['user_admin_password']; } if (!empty($info['user_field'])) { foreach ($info['user_field'] as $field => $fieldData) { if (!empty($fieldData['title'])) { echo $fieldData['title']; } if (!empty($fieldData['fields']) && is_array($fieldData['fields'])) { foreach ($fieldData['fields'] as $cField => $cFieldData) { if (!empty($cFieldData)) { echo $cFieldData; } } } } } if (!empty($info['validate'])) { echo $info['validate']; } if (!empty($info['terms'])) { echo $info['terms']; } if (!empty($info['button'])) { echo $info['button']; } if (!empty($info['closeform'])) { echo $info['closeform']; } echo "</div>\n</div>\n"; echo "<!--editprofile_sub_idx-->"; } echo $close; closetable(); }
$data = array("faq_cat_name" => "", "faq_cat_description" => "", "faq_cat_language" => LANGUAGE); $faq_edit = isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['faq_id']) && isnum($_GET['faq_id']) ? TRUE : FALSE; $faqCat_edit = isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['cat_id']) && isnum($_GET['cat_id']) ? TRUE : FALSE; opentable($locale['faq_0100']); $faq_tab['title'][] = $locale['faq_0101']; $faq_tab['id'][] = "faq-list"; $faq_tab['icon'][] = ""; $faq_tab['title'][] = $faq_edit ? $locale['faq_0102c'] : $locale['faq_0102b']; $faq_tab['id'][] = "faqs"; $faq_tab['icon'][] = ""; $faq_tab['title'][] = $faqCat_edit ? $locale['faq_0102d'] : $locale['faq_0102']; $faq_tab['id'][] = "faq-category"; $faq_tab['icon'][] = ""; $allowed_pages = array("faq-list", "faq-category", "faqs"); $_GET['section'] = isset($_GET['section']) && in_array($_GET['section'], $allowed_pages) ? $_GET['section'] : "faq-list"; echo opentab($faq_tab, $_GET['section'], "faq_tab", "m-t-20"); switch ($_GET['section']) { case "faq-category": add_breadcrumb(array("link" => "", "title" => $faqCat_edit ? $locale['faq_0102d'] : $locale['faq_0102'])); include "admin/faq_cats.php"; break; case "faqs": add_breadcrumb(array("link" => "", "title" => $faq_edit ? $locale['faq_0102c'] : $locale['faq_0102b'])); include "admin/faqs.php"; break; default: faq_listing(); } echo closetab(); closetable(); if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['faq_id']) && isnum($_GET['faq_id'])) && (isset($_GET['t']) && $_GET['t'] == "faq")) {
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"; echo "<div class='well'>\n"; echo "<strong>" . $locale['download_0204'] . "</strong>\n"; echo "</div>\n"; echo opentab($tab_title, $tab_active, 'downloadtab'); echo opentabbody($tab_title['title'][0], 'dlf', $tab_active); $file_options = array("class" => "m-10 p-10", "inline" => TRUE, "required" => TRUE, "upload_path" => DOWNLOADS . "submissions/", "max_byte" => $dl_settings['download_max_b'], 'valid_ext' => $dl_settings['download_types'], 'error_text' => $locale['download_0115'], "width" => "100%", "thumbnail" => FALSE, "thumbnail2" => FALSE, "type" => "object", "preview_off" => TRUE); echo form_fileinput('download_file', $locale['download_0214'], '', $file_options); echo "<div class='text-right'>\n<small>\n"; echo sprintf($locale['download_0218'], parsebytesize($dl_settings['download_max_b']), str_replace(',', ' ', $dl_settings['download_types'])) . "<br />\n"; echo "</small>\n</div>\n"; echo closetabbody(); echo opentabbody($tab_title['title'][1], 'dll', $tab_active); echo form_text('download_url', $locale['download_0206'], "", array("class" => "m-10 p-10", "error_text" => $locale['download_0116'], "inline" => TRUE, "required" => TRUE, "placeholder" => "http://")); echo closetabbody(); echo closetab(); echo "</div>\n"; echo "</div>\n"; echo "</div>\n"; if ($dl_settings['download_screenshot']) {
function render_userprofile($info) { // Basic User Information $basic_info = isset($info['core_field']) && is_array($info['core_field']) ? $info['core_field'] : array(); //User Fields Module Information $field_info = isset($info['user_field']) && is_array($info['user_field']) ? $info['user_field'] : array(); $user_info = ''; $user_avatar = ''; $user_name = ''; $user_level = ''; foreach ($basic_info as $field_id => $data) { if ($field_id == 'profile_user_avatar') { $avatar['user_avatar'] = $data['value']; $avatar['user_status'] = $data['status']; $user_avatar = "<img src='" . $data['value'] . "' style='width:50px;' alt='" . $info['core_field']['profile_user_name']['value'] . "'/>\n"; } elseif ($field_id == 'profile_user_name') { $user_name = "<h4>" . $data['value'] . "</h4>\n"; } elseif ($field_id == 'profile_user_level') { $user_info .= "\n\t\t\t\t<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $data['title'] . "</span>\n\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text overflow-hide'>" . $data['value'] . "</div>\n\t\t\t\t</div>\n"; } else { $user_info .= !empty($data['value']) ? "\n\t\t\t\t\t<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $data['title'] . "</span>\n\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text'>" . $data['value'] . "</div>\n\t\t\t\t\t</div>\n" : ''; } } if (!empty($field_info)) { $user_field = ''; foreach ($field_info as $field_cat_id => $category_data) { if (!empty($category_data['fields'])) { $user_field .= $category_data['title']; $user_field .= "<div class='list-group-item'>"; if (isset($category_data['fields'])) { foreach ($category_data['fields'] as $field_id => $field_data) { $user_field .= "<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $field_data['title'] . "</span>\n\t\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text'>" . $field_data['value'] . "</div>\n\t\t\t\t\t\t</div>\n"; } } $user_field .= "</div>\n"; } } } else { global $locale; $user_field = "<div class='m-t-20 text-center well'>" . $locale['uf_108'] . "</div>\n"; } // buttons $user_buttons = ''; if (!empty($info['buttons'])) { $user_buttons = "<div class='btn-group m-t-10 m-b-10 col-sm-offset-3'>"; foreach ($info['buttons'] as $buttons) { $user_buttons .= "<a class='btn btn-sm button btn-default' href='" . $buttons['link'] . "'>" . $buttons['name'] . "</a>"; } $user_buttons .= "</div>\n"; } global $locale; opentable($locale['u104'] . " " . $user_name); ?> <!--userprofile_pre_idx--> <section id='user-profile' class='m-t-20'> <?php if (!empty($info['section'])) { $tab_title = array(); foreach ($info['section'] as $page_section) { $tab_title['title'][$page_section['id']] = $page_section['name']; $tab_title['id'][$page_section['id']] = $page_section['id']; $tab_title['icon'][$page_section['id']] = ""; } echo opentab($tab_title, $_GET['section'], "profile_tab", TRUE); } ?> <div class='clearfix m-t-20'> <div class='pull-left m-r-20'><?php echo $user_avatar; ?> </div> <div class='overflow-hide'> <?php echo $user_name; echo $user_level; echo $user_info; echo $user_buttons; echo $user_field; echo "<hr />"; if (!empty($info['admin'])) { echo $info['admin']; } ?> </div> </div> <?php echo closetab(); ?> </section> <!--userprofile_sub_idx--> <?php closetable(); }
require_once FORUM . "classes/Functions.php"; require_once INCLUDES . 'infusions_include.php'; $forum_settings = get_settings('forum'); $forum_admin = new PHPFusion\Forums\Admin(); opentable($locale['forum_000c']); $tab_title['title'][] = $locale['forum_admin_000']; $tab_title['id'][] = 'fm'; $tab_title['icon'][] = ''; $tab_title['title'][] = $locale['forum_admin_001']; $tab_title['id'][] = 'fr'; $tab_title['icon'][] = ''; $tab_title['title'][] = $locale['forum_admin_002']; $tab_title['id'][] = 'fs'; $tab_title['icon'][] = ''; $tab_active = tab_active($tab_title, isset($_GET['section']) ? $_GET['section'] : 'fm', true); echo opentab($tab_title, $tab_active, 'fmm', true); if (isset($_GET['section'])) { switch ($_GET['section']) { case 'fr': pageAccess('FR'); add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => $locale['404'])); echo opentabbody($tab_title['title'][1], $tab_title['id'][1], $tab_active, true, 'section'); include INFUSIONS . 'forum/admin/forum_ranks.php'; echo closetabbody(); break; case 'fs': pageAccess('F'); echo opentabbody($tab_title['title'][2], $tab_title['id'][2], $tab_active, true, 'section'); include INFUSIONS . 'forum/admin/settings_forum.php'; echo closetabbody(); break;