当前位置: 首页>>代码示例>>PHP>>正文


PHP fusion_get_enabled_languages函数代码示例

本文整理汇总了PHP中fusion_get_enabled_languages函数的典型用法代码示例。如果您正苦于以下问题:PHP fusion_get_enabled_languages函数的具体用法?PHP fusion_get_enabled_languages怎么用?PHP fusion_get_enabled_languages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fusion_get_enabled_languages函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: composeSelection

/**
 * Serialization of choices
 * @param $input
 * @return $string
 */
function composeSelection($input)
{
    $inputArray = "";
    if ($input !== "") {
        $inputArray['selected'] = $input;
        foreach (fusion_get_enabled_languages() as $lang) {
            $inputArray['options'][$lang] = isset($_POST[$input . '-' . $lang]) ? form_sanitizer($_POST[$input . '-' . $lang], 0, $input . '-' . $lang) : "";
        }
        return serialize($inputArray);
    }
    return $inputArray;
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:17,代码来源:functions.php

示例2: __construct

 private function __construct()
 {
     global $aidlink;
     $locale = fusion_get_locale("", LOCALE . LOCALESET . "admin/sitelinks.php");
     $this->language_opts = fusion_get_enabled_languages();
     $this->link_index = dbquery_tree(DB_SITE_LINKS, 'link_id', 'link_cat');
     $this->position_opts = array('1' => $locale['SL_0025'], '2' => $locale['SL_0026'], '3' => $locale['SL_0027'], '4' => $locale['custom'] . " ID");
     $_GET['link_id'] = isset($_GET['link_id']) && isnum($_GET['link_id']) ? $_GET['link_id'] : 0;
     $_GET['link_cat'] = isset($_GET['link_cat']) && isnum($_GET['link_cat']) ? $_GET['link_cat'] : 0;
     $_GET['action'] = isset($_GET['action']) ? $_GET['action'] : '';
     self::link_breadcrumbs($this->link_index);
     // must move this out.
     add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/jquery-ui.js'></script>");
     add_to_jquery("\n\t\t\$('#site-links').sortable({\n\t\t\thandle : '.handle',\n\t\t\tplaceholder: 'state-highlight',\n\t\t\tconnectWith: '.connected',\n\t\t\tscroll: true,\n\t\t\taxis: 'y',\n\t\t\tupdate: function () {\n\t\t\t\tvar ul = \$(this),\n                order = ul.sortable('serialize'),\n                i = 0;\n\t\t\t\t\$('#info').load('" . ADMIN . "includes/site_links_updater.php" . $aidlink . "&' +order+ '&link_cat=" . intval($_GET['link_cat']) . "');\n\t\t\t\tul.find('.num').each(function(i) {\n\t\t\t\t\t\$(this).text(i+1);\n\t\t\t\t});\n\t\t\t\tul.find('li').removeClass('tbl2').removeClass('tbl1');\n\t\t\t\tul.find('li:odd').addClass('tbl2');\n\t\t\t\tul.find('li:even').addClass('tbl1');\n\t\t\t\twindow.setTimeout('closeDiv();',2500);\n\t\t\t}\n\t\t});\n\n\t\tfunction checkLinkPosition( val ) {\n            if ( val == 4 ) {\n                \$('#link_position_id').prop('disabled', false).show();\n            } else {\n                \$('#link_position_id').prop('disabled', true).hide();\n            }\n        }\n\t\t");
     switch ($_GET['action']) {
         case 'edit':
             $this->data = self::load_sitelinks($_GET['link_id']);
             if (!$this->data['link_id']) {
                 redirect(FUSION_SELF . $aidlink);
             }
             $this->form_action = FUSION_SELF . $aidlink . "&amp;action=edit&amp;section=nform&amp;link_id=" . $_GET['link_id'] . "&amp;link_cat=" . $_GET['link_cat'];
             add_breadcrumb(array("link" => $this->form_action, "title" => $locale['SL_0011']));
             break;
         case 'delete':
             $result = self::delete_sitelinks($_GET['link_id']);
             if ($result) {
                 addNotice("success", $locale['SL_0017']);
                 redirect(FUSION_SELF . $aidlink);
             }
             break;
         default:
             $this->form_action = FUSION_SELF . $aidlink . "&amp;section=link_form";
             add_breadcrumb(array("link" => $this->form_action, "title" => $locale['SL_0010']));
             break;
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:36,代码来源:site_links.php

示例3: multilang_column

/**
 * SQL Language Value
 * @param $table_col - target
 * @param $as_new_col_name - output_target
 * @return string - calculated conditions
 * Usage: $result = dbquery("SELECT * FROM ".DB_NEWS." WHERE ".multilocale_col_select('news_subject')." = '".$data['news_subject']."'");
 * Usage: $tree_data = dbquery_tree_full(DB_NEWS_CATS, "news_cat_id", "news_cat_parent", "order by ".language_column("news_cat_name"));
 */
function multilang_column($table_col)
{
    $installed_lang = fusion_get_enabled_languages();
    $i = 1;
    $val_key = 2;
    // this is the first pair
    foreach ($installed_lang as $locale => $language) {
        if ($locale == LANGUAGE) {
            $val_key = $i * 2;
        }
        $i++;
    }
    return "replace(replace(replace(substring_index(substring_index({$table_col}, ';', " . $val_key . "),':',-1), '\"', ''), '{%sc%}', ':') , '{%dq%}', '')";
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:22,代码来源:sqlhandler.inc.php

示例4: array

            }
            $criteriaArray = array("article_subject" => form_sanitizer($_POST['article_subject'], "", "article_subject"), "article_cat" => form_sanitizer($_POST['article_cat'], 0, "article_cat"), "article_snippet" => form_sanitizer($article_snippet, "", "article_snippet"), "article_article" => form_sanitizer($article_article, "", "article_article"), "article_keywords" => form_sanitizer($_POST['article_keywords'], "", "article_keywords"), "article_language" => form_sanitizer($_POST['article_language'], "", "article_language"));
            $criteriaArray['article_snippet'] = parse_textarea($article_snippet);
            $criteriaArray['article_article'] = parse_textarea($article_article);
            opentable($criteriaArray['article_subject']);
            echo "<p class='text-bigger'>" . $criteriaArray['article_snippet'] . "</p>";
            echo $criteriaArray['article_article'];
            closetable();
        }
        add_to_title($locale['global_200'] . $locale['articles_0060']);
        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['articles_0063']) . "</div>\n";
        echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=a");
        echo form_text('article_subject', $locale['articles_0304'], $criteriaArray['article_subject'], array("required" => TRUE, "inline" => TRUE));
        if (multilang_table("AR")) {
            echo form_select('article_language', $locale['global_ML100'], $criteriaArray['article_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
        } else {
            echo form_hidden('article_language', '', $criteriaArray['article_language']);
        }
        echo form_select('article_keywords', $locale['articles_0204'], $criteriaArray['article_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['articles_0204a'], "width" => "100%", "error_text" => $locale['articles_0204a'], "tags" => TRUE, "multiple" => TRUE));
        echo form_select_tree("article_cat", $locale['articles_0201'], $criteriaArray['article_cat'], array("width" => "250px", "inline" => TRUE, "no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
        $textArea_opts = array("required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "simple", "autosize" => TRUE, "form_name" => "submit_form");
        echo form_textarea('article_snippet', $locale['articles_0202'], $criteriaArray['article_snippet'], $textArea_opts);
        $textArea_opts['required'] = $article_settings['article_extended_required'] ? TRUE : FALSE;
        echo form_textarea('article_article', $locale['articles_0203'], $criteriaArray['article_article'], $textArea_opts);
        echo fusion_get_settings("site_seo") ? "" : form_button('preview_article', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-primary m-r-10'));
        echo form_button('submit_article', $locale['articles_0060'], $locale['articles_0060'], array('class' => 'btn-primary'));
        echo closeform();
        echo "</div>\n</div>\n";
    }
} else {
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:article_submit.php

示例5: array

 if (fusion_get_settings("tinymce_enabled")) {
     $snippetSettings = array("required" => TRUE);
 }
 echo form_textarea('article_snippet', $locale['articles_0202'], $callback_data['article_snippet'], $snippetSettings);
 $extendedSettings = array();
 if (!fusion_get_settings("tinymce_enabled")) {
     $extendedSettings = array("preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "form_name" => "inputform");
 }
 echo form_textarea('article_article', $locale['articles_0203'], $callback_data['article_article'], $extendedSettings);
 echo "</div>\n";
 echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-4'>\n";
 openside("");
 echo form_select_tree("article_cat", $locale['articles_0201'], $callback_data['article_cat'], array("width" => "100%", "inline" => TRUE, "no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
 echo form_select('article_visibility', $locale['articles_0211'], $callback_data['article_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
 if (multilang_table("AR")) {
     echo form_select('article_language', $locale['global_ML100'], $callback_data['article_language'], array('options' => fusion_get_enabled_languages(), 'width' => '100%', "inline" => TRUE));
 } else {
     echo form_hidden('article_language', '', $callback_data['article_language']);
 }
 echo form_hidden('article_datestamp', '', $callback_data['article_datestamp']);
 echo form_button('preview', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-default m-r-10'));
 echo form_button('publish', $locale['articles_0242'], $locale['articles_0242'], array('class' => 'btn-primary m-r-10'));
 closeside();
 openside("");
 echo "<label><input type='checkbox' name='article_draft' value='1'" . ($callback_data['article_draft'] ? "checked='checked'" : "") . " /> " . $locale['articles_0205'] . "</label><br />\n";
 if (fusion_get_settings("tinymce_enabled") != 1) {
     echo "<label><input type='checkbox' name='article_breaks' value='1'" . ($callback_data['article_breaks'] ? "checked='checked'" : "") . " /> " . $locale['articles_0206'] . "</label><br />\n";
 }
 closeside();
 echo "</div></div>\n";
 echo form_button('preview', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-default m-r-10'));
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:article_submissions.php

示例6: dbquery

    $result = dbquery("select * from " . DB_FAQ_CATS . " WHERE faq_cat_id='" . intval($_GET['cat_id']) . "'");
    if (dbrows($result) > 0) {
        $data = dbarray($result);
    } else {
        redirect(FUSION_SELF . $aidlink);
    }
}
if (isset($_POST['save_cat'])) {
    $data = array("faq_cat_id" => form_sanitizer($_POST['faq_cat_id'], 0, "faq_cat_id"), "faq_cat_name" => form_sanitizer($_POST['faq_cat_name'], "", "faq_cat_name"), "faq_cat_description" => form_sanitizer($_POST['faq_cat_description'], "", "faq_cat_description"), "faq_cat_language" => form_sanitizer($_POST['faq_cat_language'], "", "faq_cat_language"));
    if (defender::safe()) {
        if (dbcount("(faq_cat_id)", DB_FAQ_CATS, "faq_cat_id='" . $data['faq_cat_id'] . "'")) {
            dbquery_insert(DB_FAQ_CATS, $data, "update");
            addNotice("success", $locale['faq_0205']);
        } else {
            dbquery_insert(DB_FAQ_CATS, $data, "save");
            addNotice("success", $locale['faq_0204']);
        }
        redirect(FUSION_SELF . $aidlink);
    }
}
echo openform('faqCat_form', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
echo form_hidden('faq_cat_id', "", $data['faq_cat_id']);
echo form_text('faq_cat_name', $locale['faq_0200'], $data['faq_cat_name'], array('error_text' => $locale['faq_0201'], 'required' => 1));
echo form_text('faq_cat_description', $locale['faq_0202'], $data['faq_cat_description']);
if (multilang_table("FQ")) {
    echo form_select("faq_cat_language", $locale['global_ML100'], $data['faq_cat_language'], array('options' => fusion_get_enabled_languages()));
} else {
    echo form_hidden("faq_cat_language", '', LANGUAGE);
}
echo form_button('save_cat', $locale['faq_0203'], $locale['faq_0203'], array('class' => 'btn-primary m-t-10'));
echo closeform();
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:faq_cats.php

示例7: display_forum_form

 /**
  * 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();
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:96,代码来源:view.php

示例8: openform

// add features to purge all album photos and it's administration
// add features to move all album photos to another album.
echo openform('albumform', 'post', FUSION_REQUEST, array('enctype' => TRUE, 'class' => 'm-t-20'));
echo "<div class='row'>\n<div class='col-xs-12 col-sm-8'>\n";
echo form_hidden('album_id', '', $data['album_id']);
echo form_text('album_title', $locale['album_0001'], $data['album_title'], array('placeholder' => $locale['album_0002'], 'inline' => TRUE, 'required' => TRUE, "error_text" => $locale['album_0015']));
echo form_select("album_keywords", $locale['album_0005'], $data['album_keywords'], array('max_length' => 320, 'width' => '100%', 'placeholder' => $locale['album_0006'], 'tags' => TRUE, 'multiple' => TRUE, "inline" => TRUE));
echo form_textarea('album_description', $locale['album_0003'], $data['album_description'], array('placeholder' => $locale['album_0004'], 'inline' => 1));
if ($data['album_image'] || $data['album_thumb1']) {
    echo "<div class='well col-sm-offset-3'>\n";
    echo form_hidden("album_image", "", $data['album_image']);
    echo form_hidden("album_thumb2", "", $data['album_thumb2']);
    echo form_hidden("album_thumb1", "", $data['album_thumb1']);
    echo "<label for='del_image'>\n";
    echo displayAlbumImage($data['album_image'], $data['album_thumb1'], $data['album_thumb2'], "");
    echo "</label>\n";
    echo form_checkbox("del_image", $locale['album_0016'], "");
    echo "</div>\n";
} else {
    $album_upload_settings = array("upload_path" => INFUSIONS . "gallery/photos/", 'thumbnail_folder' => 'thumbs', 'thumbnail' => TRUE, 'thumbnail_w' => $gll_settings['thumb_w'], 'thumbnail_h' => $gll_settings['thumb_h'], 'thumbnail_suffix' => '_t1', 'thumbnail2' => TRUE, 'thumbnail2_w' => $gll_settings['photo_w'], 'thumbnail2_h' => $gll_settings['photo_h'], 'thumbnail2_suffix' => '_t2', 'max_width' => $gll_settings['photo_max_w'], 'max_height' => $gll_settings['photo_max_h'], 'max_byte' => $gll_settings['photo_max_b'], 'multiple' => 0, 'delete_original' => FALSE, "inline" => TRUE, "template" => "modern", "class" => "m-b-0");
    echo form_fileinput('album_image', $locale['album_0009'], "", $album_upload_settings);
    echo "<div class='m-b-10 col-xs-12 col-sm-offset-3'>" . sprintf($locale['album_0010'], parsebytesize($gll_settings['photo_max_b']), str_replace(',', ' ', ".jpg,.gif,.png"), $gll_settings['photo_max_w'], $gll_settings['photo_max_h']) . "</div>\n";
}
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-4'>\n";
echo form_select('album_access', $locale['album_0007'], $data['album_access'], array('options' => fusion_get_groups(), 'inline' => TRUE));
echo form_select('album_language', $locale['album_0008'], $data['album_language'], array('options' => fusion_get_enabled_languages(), 'inline' => TRUE));
echo form_text('album_order', $locale['album_0011'], $data['album_order'], array("type" => "number", 'inline' => TRUE));
echo "</div>\n</div>\n";
echo form_button('save_album', $locale['album_0012'], $locale['album_0012'], array('class' => 'btn-success btn-sm m-r-10'));
echo closeform();
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:gallery_cat.php

示例9: displayRanksForm

 protected function displayRanksForm()
 {
     global $aidlink;
     if (isset($_POST['cancel_rank'])) {
         redirect(clean_request("", array("rank_id", "ref"), FALSE));
     }
     add_to_footer("<script src='" . FORUM . "admin/admin_rank.js'></script>");
     $this->data['rank_language'] = LANGUAGE;
     $array_apply_normal_opts = array(USER_LEVEL_MEMBER => self::$locale['424'], '104' => self::$locale['425'], USER_LEVEL_ADMIN => self::$locale['426'], USER_LEVEL_SUPER_ADMIN => self::$locale['427']);
     // Special Select
     $groups_arr = getusergroups();
     $groups_except = array(USER_LEVEL_PUBLIC, USER_LEVEL_MEMBER, USER_LEVEL_ADMIN, USER_LEVEL_SUPER_ADMIN);
     $group_opts = array();
     foreach ($groups_arr as $group) {
         if (!in_array($group[0], $groups_except)) {
             $group_opts[$group[0]] = $group[1];
         }
     }
     $language_opts = fusion_get_enabled_languages();
     $this->post_forum_ranks();
     $form_action = FUSION_SELF . $aidlink . '&section=fr';
     if (isset($_GET['rank_id']) && isnum($_GET['rank_id'])) {
         $result = dbquery("SELECT * FROM " . DB_FORUM_RANKS . " WHERE rank_id='" . intval($_GET['rank_id']) . "'");
         if (dbrows($result) > 0) {
             $this->data = dbarray($result);
             $form_action = FUSION_SELF . $aidlink . "&section=fr&rank_id=" . $_GET['rank_id'];
         } else {
             redirect(clean_request("", array("rank_id", "ref"), FALSE));
         }
     }
     $html = openform('rank_form', 'post', $form_action, array('class' => 'm-t-20')) . form_text('rank_title', self::$locale['420'], $this->data['rank_title'], array('required' => 1, 'error_text' => self::$locale['414'], "inline" => TRUE)) . form_select('rank_image', self::$locale['421'], $this->data['rank_image'], array('options' => $this->get_rank_images(), 'placeholder' => self::$locale['choose'], "inline" => TRUE));
     if (multilang_table("FR")) {
         $html .= form_select('rank_language', self::$locale['global_ML100'], $this->data['rank_language'], array('options' => $language_opts, 'placeholder' => self::$locale['choose'], "inline" => TRUE));
     } else {
         $html .= form_hidden('rank_language', '', $this->data['rank_language']);
     }
     $html .= form_checkbox('rank_type', self::$locale['429'], $this->data['rank_type'], array("options" => array(2 => self::$locale['429a'], 1 => self::$locale['429b'], 0 => self::$locale['429c']), "type" => "radio", "inline" => TRUE)) . form_text('rank_posts', self::$locale['422'], $this->data['rank_posts'], array('inline' => TRUE, 'type' => 'number', 'width' => '10%', 'disabled' => $this->data['rank_type'] != 0)) . "<span id='select_normal' " . ($this->data['rank_type'] == 2 ? "class='display-none'" : "") . " >" . form_select('rank_apply_normal', self::$locale['423'], $this->data['rank_apply'], array('options' => $array_apply_normal_opts, 'placeholder' => self::$locale['choose'], "inline" => TRUE)) . "</span>\n<span id='select_special'" . ($this->data['rank_type'] != 2 ? " class='display-none'" : "") . ">" . form_select('rank_apply_special', self::$locale['423'], $this->data['rank_apply'], array('options' => $group_opts, 'placeholder' => self::$locale['choose'], "inline" => TRUE)) . "</span>\n" . form_button('save_rank', self::$locale['428'], self::$locale['428'], array('class' => 'btn-primary m-r-10')) . form_button('cancel_rank', self::$locale['cancel'], self::$locale['cancel'], array('class' => 'btn-default')) . closeform();
     return $html;
     /* echo "<td class='tbl'><strong>".self::$locale['429']."</strong></td>\n";
        echo "<td class='tbl'>\n";
        echo "<label><input type='radio' name='rank_type' value='2'".($rank_type == 2 ? " checked='checked'" : "")." /> ".self::$locale['429a']."</label>\n";
        echo "<label><input type='radio' name='rank_type' value='1'".($rank_type == 1 ? " checked='checked'" : "")." /> ".self::$locale['429b']."</label>\n";
        echo "<label><input type='radio' name='rank_type' value='0'".($rank_type == 0 ? " checked='checked'" : "")." /> ".self::$locale['429c']."</label>\n";
        echo "</td>\n";
        echo "</tr>\n<tr>\n";
        */
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:47,代码来源:ranks.php

示例10: lang_switcher

/**
 * Language switcher function
 * Icon - True or False (True = Icon mode, False = Dropdown Selector)
 */
function lang_switcher($icon = TRUE)
{
    global $locale;
    $enabled_languages = fusion_get_enabled_languages();
    if (count($enabled_languages) <= 1) {
        return;
    }
    openside($locale['global_ML102']);
    echo "<h5><strong>" . $locale['UM101'] . "</strong></h5>\n";
    if ($icon) {
        $language_switch = fusion_get_language_switch();
        if (!empty($language_switch)) {
            $row = 0;
            foreach ($language_switch as $folder => $langData) {
                $icon = "<img class='display-block img-responsive' alt='" . $langData['language_name'] . "' src='" . $langData['language_icon'] . "' title='" . $langData['language_name'] . "' style='min-width:20px;'/>\n";
                if ($folder != LANGUAGE) {
                    $icon = "<a class='side pull-left display-block' href='" . $langData['language_link'] . "'>" . $icon . "</a>\n ";
                }
                echo ($row > 0 and $row % 4 === 0) ? '<br />' : '';
                echo "<div class='display-inline-block clearfix'>\n" . $icon . "</div>\n";
                $row++;
            }
        }
    } else {
        include_once INCLUDES . "translate_include.php";
        echo openform('lang_menu_form', 'post', FUSION_SELF, array('max_tokens' => 1));
        echo form_select('lang_menu', '', fusion_get_settings('locale'), array("options" => fusion_get_enabled_languages(), "width" => "100%"));
        echo closeform();
        add_to_jquery("\n\t\t\tfunction showflag(item){\n\t\t\t\treturn '<div class=\"clearfix\" style=\"width:100%; padding-left:10px;\"><img style=\"height:20px; margin-top:3px !important;\" class=\"img-responsive pull-left\" src=\"" . LOCALE . "' + item.text + '/'+item.text + '-s.png\"/><span class=\"p-l-10\">'+ item.text +'</span></div>';\n\t\t\t}\n\t\t\t\$('#lang_menu').select2({\n\t\t\tplaceholder: 'Switch Language',\n\t\t\tformatSelection: showflag,\n\t\t\tescapeMarkup: function(m) { return m; },\n\t\t\tformatResult: showflag,\n\t\t\t}).bind('change', function(item) {\n\t\t\t\twindow.location.href = '" . FUSION_REQUEST . "?lang='+\$(this).val();\n\t\t\t});\n\t\t");
    }
    closeside();
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:36,代码来源:core_functions_include.php

示例11: displayTagForm

 protected function displayTagForm()
 {
     global $aidlink;
     if (isset($_POST['cancel_tag'])) {
         redirect(clean_request("", array("tag_id", "ref"), FALSE));
     }
     $this->data['rank_language'] = LANGUAGE;
     // Special Select
     $groups_arr = getusergroups();
     $groups_except = array(USER_LEVEL_PUBLIC, USER_LEVEL_MEMBER, USER_LEVEL_ADMIN, USER_LEVEL_SUPER_ADMIN);
     $group_opts = array();
     foreach ($groups_arr as $group) {
         if (!in_array($group[0], $groups_except)) {
             $group_opts[$group[0]] = $group[1];
         }
     }
     $language_opts = fusion_get_enabled_languages();
     $this->post_tags();
     $form_action = FUSION_SELF . $aidlink . '&amp;section=ft&amp;ref=tag_form';
     if (isset($_GET['tag_id']) && isnum($_GET['tag_id'])) {
         $result = dbquery("SELECT * FROM " . DB_FORUM_TAGS . " WHERE tag_id='" . intval($_GET['tag_id']) . "'");
         if (dbrows($result) > 0) {
             $this->data = dbarray($result);
             $form_action = FUSION_SELF . $aidlink . "&amp;section=ft&amp;ref=tag_form&amp;tag_id=" . $_GET['tag_id'];
         } else {
             redirect(clean_request("", array("rank_id", "ref"), FALSE));
         }
     }
     $button_locale = $this->data['tag_id'] ? self::$locale['forum_tag_0208'] : self::$locale['forum_tag_0207'];
     $html = openform('tag_form', 'post', $form_action, array('class' => 'm-t-20')) . form_text('tag_title', self::$locale['forum_tag_0200'], $this->data['tag_title'], array('required' => 1, 'error_text' => self::$locale['414'], "inline" => TRUE)) . form_textarea('tag_description', self::$locale['forum_tag_0201'], $this->data['tag_description'], array('inline' => TRUE, 'type' => 'bbcode', 'autosize' => TRUE, 'preview' => TRUE)) . form_colorpicker('tag_color', self::$locale['forum_tag_0202'], $this->data['tag_color'], array('inline' => TRUE, 'required' => TRUE));
     if (multilang_table("FR")) {
         $html .= form_select('tag_language', self::$locale['forum_tag_0203'], $this->data['tag_language'], array('options' => $language_opts, 'placeholder' => self::$locale['choose'], "inline" => TRUE));
     } else {
         $html .= form_hidden('tag_language', '', $this->data['tag_language']);
     }
     $html .= form_checkbox('tag_status', self::$locale['forum_tag_0204'], $this->data['tag_status'], array("options" => array(1 => self::$locale['forum_tag_0205'], 0 => self::$locale['forum_tag_0206']), "type" => "radio", "inline" => TRUE)) . form_button('save_tag', $button_locale, $button_locale, array('class' => 'btn-primary m-r-10')) . form_button('cancel_tag', self::$locale['cancel'], self::$locale['cancel'], array('class' => 'btn-default')) . closeform();
     return $html;
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:38,代码来源:tags.php

示例12: redirect

     } 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'));
 echo "</div>\n";
 echo "<div class='col-xs-12 col-sm-2'>\n";
 echo form_select('cat_sort_order', '', $data['cat_sort_order'], array("inline" => TRUE, "width" => "100%", 'options' => array('ASC' => $locale['wl_0708'], 'DESC' => $locale['wl_0709'])));
 echo "</div>\n";
 echo "</div>\n";
 echo form_button('save_cat', $locale['wl_0711'], $locale['wl_0711'], array('class' => 'btn-primary m-t-10'));
 echo closeform();
 echo closetabbody();
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:weblinks_cats.php

示例13: display_news_cat_listing


//.........这里部分代码省略.........
        }
        addNotice("warning", "No news category item selected. Please check a news item and try again");
        redirect(FUSION_REQUEST);
    }
    if (isset($_POST['news_clear'])) {
        redirect(FUSION_SELF . $aidlink);
    }
    // Switch to post
    $sql_condition = "";
    $search_string = array();
    if (isset($_POST['p-submit-news_cat_name'])) {
        $search_string['news_cat_name'] = array("input" => form_sanitizer($_POST['news_cat_name'], "", "news_cat_name"), "operator" => "LIKE");
    }
    if (!empty($_POST['news_cat_status']) && isnum($_POST['news_cat_status'])) {
        switch ($_POST['news_cat_status']) {
            case 1:
                // is a draft
                $search_string['news_cat_draft'] = array("input" => 1, "operator" => "=");
                break;
            case 2:
                // is a sticky
                $search_string['news_cat_sticky'] = array("input" => 1, "operator" => "=");
                break;
        }
    }
    if (!empty($_POST['news_cat_visibility'])) {
        $search_string['news_cat_visibility'] = array("input" => form_sanitizer($_POST['news_cat_visibility'], "", "news_cat_visibility"), "operator" => "=");
    }
    if (!empty($_POST['news_cat_language'])) {
        $search_string['news_cat_language'] = array("input" => form_sanitizer($_POST['news_cat_language'], "", "news_cat_language"), "operator" => "=");
    }
    if (!empty($search_string)) {
        foreach ($search_string as $key => $values) {
            $sql_condition .= " AND `{$key}` " . $values['operator'] . ($values['operator'] == "LIKE" ? "'%" : "'") . $values['input'] . ($values['operator'] == "LIKE" ? "%'" : "'");
        }
    }
    $result = dbquery_tree_full(DB_NEWS_CATS, "news_cat_id", "news_cat_parent", "", "SELECT nc.*,\n                            count(n1.news_id) 'news_published',\n                            count(n2.news_id) 'news_draft',\n                            count(n3.news_id) 'news_sticky'\n                            FROM " . DB_NEWS_CATS . " nc\n                            LEFT JOIN " . DB_NEWS . " n1 ON n1.news_id=nc.news_cat_id AND n1.news_draft='0' AND (n1.news_start='0'|| n1.news_start<=NOW()) AND (n1.news_end='0'|| n1.news_end>=NOW())\n                            LEFT JOIN " . DB_NEWS . " n2 ON n2.news_id=nc.news_cat_id AND n2.news_draft='1'\n                            LEFT JOIN " . DB_NEWS . " n3 ON n2.news_id=nc.news_cat_id AND n3.news_sticky='1' AND (n3.news_start='0'|| n3.news_start<=NOW()) AND (n3.news_end='0'|| n3.news_end>=NOW())\n                            WHERE " . (multilang_table("NS") ? "news_cat_language='" . LANGUAGE . "'" : "") . "\n                            {$sql_condition}\n                            GROUP BY news_cat_id\n                            ORDER BY news_cat_parent ASC, news_cat_id ASC LIMIT " . intval($_GET['rowstart']) . ", 20");
    ?>
    <div class="m-t-15">
        <?php 
    echo openform("news_filter", "post", FUSION_REQUEST);
    echo "<div class='clearfix'>\n";
    echo "<div class='pull-right'>\n";
    echo "<a class='btn btn-success btn-sm m-r-10' href='" . clean_request("ref=news_cat_form", array("ref"), FALSE) . "'>Add New</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('publish');\"><i class='fa fa-check fa-fw'></i> Publish</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('unpublish');\"><i class='fa fa-ban fa-fw'></i> Unpublish</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('sticky');\"><i class='fa fa-sticky-note fa-fw'></i> Sticky</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('unsticky');\"><i class='fa fa-sticky-note-o fa-fw'></i> Unsticky</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('delete');\"><i class='fa fa-trash-o fa-fw'></i> Trash</a>";
    echo "</div>\n";
    ?>
        <script>
            function run_admin(action) {
                $('#table_action').val(action);
                $('#news_table').submit();
            }
        </script>

        <?php 
    $filter_values = array("news_cat_name" => !empty($_POST['news_cat_name']) ? form_sanitizer($_POST['news_cat_name'], "", "news_cat_name") : "", "news_cat_status" => !empty($_POST['news_cat_status']) ? form_sanitizer($_POST['news_cat_status'], "", "news_cat_status") : "", "news_cat_visibility" => !empty($_POST['news_cat_visibility']) ? form_sanitizer($_POST['news_cat_visibility'], "", "news_cat_visibility") : "", "news_cat_language" => !empty($_POST['news_cat_language']) ? form_sanitizer($_POST['news_cat_language'], "", "news_cat_language") : "");
    $filter_empty = TRUE;
    foreach ($filter_values as $val) {
        if ($val) {
            $filter_empty = FALSE;
        }
    }
    echo "<div class='display-inline-block pull-left m-r-10' style='width:300px;'>\n";
    echo form_text("news_cat_name", "", $filter_values['news_cat_name'], array("placeholder" => "News Category Name", "append_button" => TRUE, "append_value" => "<i class='fa fa-search'></i>", "append_form_value" => "search_news", "width" => "250px"));
    echo "</div>\n";
    echo "<div class='display-inline-block'>";
    echo "<a class='btn btn-sm " . ($filter_empty == FALSE ? "btn-info" : " btn-default'") . "' id='toggle_options' href='#'>Search Options\n        <span id='filter_caret' class='fa " . ($filter_empty == FALSE ? "fa-caret-up" : "fa-caret-down") . "'></span></a>\n";
    echo form_button("news_clear", "Clear", "clear");
    echo "</div>\n";
    echo "</div>\n";
    add_to_jquery("\n        \$('#toggle_options').bind('click', function(e) {\n            \$('#news_filter_options').slideToggle();\n            var caret_status = \$('#filter_caret').hasClass('fa-caret-down');\n            if (caret_status == 1) {\n                \$('#filter_caret').removeClass('fa-caret-down').addClass('fa-caret-up');\n                \$(this).removeClass('btn-default').addClass('btn-info');\n            } else {\n                \$('#filter_caret').removeClass('fa-caret-up').addClass('fa-caret-down');\n                \$(this).removeClass('btn-info').addClass('btn-default');\n            }\n        });\n\n        // Select change\n        \$('#news_status, #news_visibility, #news_category, #news_language, #news_author').bind('change', function(e){\n            \$(this).closest('form').submit();\n        });\n        ");
    unset($filter_values['news_text']);
    echo "<div id='news_filter_options'" . ($filter_empty == FALSE ? "" : " style='display:none;'") . ">\n";
    echo "<div class='display-inline-block'>\n";
    echo form_select("news_cat_status", "", $filter_values['news_cat_status'], array("allowclear" => TRUE, "placeholder" => "- Select Status -", "options" => array(0 => "All Status", 1 => "Draft", 2 => "Sticky")));
    echo "</div>\n";
    echo "<div class='display-inline-block'>\n";
    echo form_select("news_cat_visibility", "", $filter_values['news_cat_visibility'], array("allowclear" => TRUE, "placeholder" => "- Select Access -", "options" => fusion_get_groups()));
    echo "</div>\n";
    echo "<div class='display-inline-block'>\n";
    $language_opts = array(0 => "All Language");
    $language_opts += fusion_get_enabled_languages();
    echo form_select("news_cat_language", "", $filter_values['news_cat_language'], array("allowclear" => TRUE, "placeholder" => "- Select Language -", "options" => $language_opts));
    echo "</div>\n";
    echo "</div>\n";
    echo closeform();
    ?>
    </div>

    <?php 
    echo openform("news_table", "post", FUSION_REQUEST);
    echo form_hidden("table_action", "", "");
    display_news_category($result);
    echo closeform();
    echo "<div class='text-center'><a class='btn btn-primary' href='" . ADMIN . "images.php" . $aidlink . "&amp;ifolder=imagesnc'>" . $locale['news_0304'] . "</a><br /><br />\n</div>\n";
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:news_cat.php

示例14: render_page

function render_page($license = FALSE)
{
    global $locale, $data, $aidlink;
    include THEME . "/locale/" . LOCALESET . "locale.php";
    add_to_head('
	<!--[if lt IE 7]>
	<script type="text/javascript" src="' . THEME . 'js/ie-png.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/supersleight.js"></script>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/lt7.css" />
	<![endif]-->
	<!--[if IE]>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/ie.css" />
	<![endif]-->
	<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="' . THEME . 'css/ie7.css" />
	<![endif]-->
	<script type="text/javascript" src="' . THEME . 'js/jquery.cycle.all.min.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/cufon-yui.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/Debonair-Calibri.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/Cufon-Settings.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/slider-settings.js"></script>
	<script type="text/javascript" src="' . THEME . 'js/subnavie6.js"></script>
	');
    add_to_head("<link rel='stylesheet' href='" . THEME . "css/bootstrap_rewrite.css' type='text/css'/>");
    include THEME . "theme_db.php";
    $theme_settings = get_theme_settings("debonair");
    echo "<div id='wrapper'>\n";
    echo "<div class='container'>\n";
    echo "<div class='body-wrap'>\n";
    echo "<div class='body-inner-wrap'>\n";
    // start header ----
    $banner_path = fusion_get_settings("sitebanner");
    echo "<header class='clearfix m-t-10'>\n\t\t<a class='logo' href='" . BASEDIR . "index.php'><img src='" . ($banner_path !== "" ? BASEDIR . $banner_path : IMAGES . "php-fusion-logo.png") . "' alt='" . fusion_get_settings("sitename") . "'/></a>\n\t\t<div class='tagline'>Super Clean Web 2.0 Business Template</div>\n";
    echo "<div class='call-tag'>\n";
    if (iADMIN) {
        echo "<span class='display-inline-block m-r-10'><a href='" . ADMIN . $aidlink . "'>" . $locale['global_123'] . "</a></span>\n";
    }
    echo $locale['global_ML102'] . "\n";
    foreach (fusion_get_enabled_languages() as $lang => $lang_name) {
        echo "<a href='" . clean_request("lang=" . $lang, array(), FALSE) . "'>{$lang_name}</a>\n";
    }
    echo "<i id='theme_search' class='fa fa-search fa-fw'></i>";
    echo "</div>\n</header>\n";
    // end header ----
    // start nav ---
    echo showsublinks();
    // end nav --
    // Header Banner
    $banner_inclusion_url = explode(",", $theme_settings['main_banner_url']);
    if (in_array(START_PAGE, $banner_inclusion_url)) {
        // get the results of the banner
        $result = dbquery("SELECT * FROM " . DB_DEBONAIR . " where banner_language='" . LANGUAGE . "' order by banner_order ASC");
        // show banner
        echo "<aside class='banner'>\n";
        echo "<div id='slider-container'>\n";
        echo "<ul id='slider-box'>\n";
        if (dbrows($result)) {
            while ($data = dbarray($result)) {
                echo "<!--Slide " . $data['banner_id'] . "-->\n";
                echo "<li>\n";
                echo "<div class='inner-banner'>\n";
                echo "<div class='slider-corner'></div>\n";
                if ($data['banner_image']) {
                    echo "<div class='screen'><img src='" . THEME . "upload/" . $data['banner_image'] . "' alt='" . $data['banner_subject'] . "'/></div>\n";
                }
                if ($data['banner_description'] !== "") {
                    echo "<h2>" . $data['banner_subject'] . "</h2>\n";
                    echo "<p>" . parseubb(parsesmileys($data['banner_description'])) . "</p>\n";
                } else {
                    echo "<h1>" . $data['banner_subject'] . "</h1>\n";
                }
                if ($data['banner_link'] !== "") {
                    echo "<div class='button-position'>\n";
                    echo "<div class='btn-group'><a class='btn btn-success btn-sm' href='" . BASEDIR . $data['banner_link'] . "'>Learn more</a></div>\n";
                    echo "</div>\n";
                }
                echo "</div>\n</li>\n";
                echo "<!--End slide " . $data['banner_id'] . "-->\n";
            }
        } else {
            echo "<!--Slide Welcome-->\n\t\t\t <li>\n\t\t\t <div class='welcome-banner'><div class='slider-corner'></div>\n\t\t\t <h1>" . $locale['debonair_0500'] . "</h1>\n\t\t\t <h2>" . $locale['debonair_0501'] . "</h2>\n\t\t\t </div>\n\t\t\t </li>\n\t\t\t <!-- End Slide Welcome-->\n\t\t \t";
            echo "<!--Slide Customize-->\n\t\t\t <li>\n\t\t\t <div class='welcome-banner-2'><div class='slider-corner'></div>\n\t\t\t <h1>" . $locale['debonair_0502'] . "</h1>\n\t\t\t <h2>" . $locale['debonair_0502a'] . "</h2>\n\t\t\t <div class='button-position'>\n\t\t\t <p>" . $locale['debonair_0502c'] . "</p>\n\t\t\t </div></div>\n\t\t\t </li>\n\t\t\t <!-- End Slide Customize-->\n\t\t \t";
        }
        echo "</ul>\n";
        echo "<!-- Start Slider Nav-->\n<div class='slide-pager-container'>\n<div id='slide-pager'></div>\n</div>\n<!-- End Slider Nav-->\n</div>\n";
        echo "</aside>\n";
        // upperbanner
        echo "<div class='lower-banner'>\n<div class='row holder'>\n";
        // 3 columns
        for ($i = 1; $i <= 3; $i++) {
            echo "<div class='col-xs-12 col-sm-4 col'>\n";
            if ($theme_settings['ubanner_col_' . $i] !== "") {
                $data = uncomposeSelection($theme_settings['ubanner_col_' . $i]);
                if (!empty($data['selected']) && multilang_table("NS") ? !empty($data['options'][LANGUAGE]) : "") {
                    switch ($data['selected']) {
                        case "news":
                            if (db_exists(DB_NEWS) && isset($data['options'][LANGUAGE])) {
                                $result = dbquery("select * from " . DB_NEWS . "\n\t\t\t\t\t\t\t\t\t\t\t" . (multilang_table("NS") ? "WHERE news_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('news_visibility') . "\n\t\t\t\t\t\t\t\t\t\t\tAND (news_start='0'||news_start<=" . time() . ")\n\t\t\t\t\t\t\t\t\t\t\tAND (news_end='0'||news_end>=" . time() . ") AND news_draft='0'\n\t\t\t\t\t\t\t\t\t\t\tAND news_id='" . $data['options'][LANGUAGE] . "'\n\t\t\t\t\t\t\t\t\t\t\t");
                                if (dbrows($result) > 0) {
                                    $data = dbarray($result);
//.........这里部分代码省略.........
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:101,代码来源:theme.php

示例15: quantum_multilocale_fields

 /**
  * Multiple locale fields input
  * @param       $input_name
  * @param       $title
  * @param       $input_value
  * @param array $options
  * @return string
  */
 public function quantum_multilocale_fields($input_name, $title, $input_value, array $options = array())
 {
     $locale = fusion_get_locale();
     $html = '';
     $language_opts = fusion_get_enabled_languages();
     $input_value = self::is_serialized($input_value) ? unserialize($input_value) : $input_value;
     $options += array('function' => !empty($options['textarea']) && $options['textarea'] == 1 ? 'form_textarea' : 'form_text', 'required' => !empty($options['required']) && $options['required'] == 1 ? '1' : '0', 'placeholder' => !empty($options['placeholder']) ? $options['placeholder'] : '', 'deactivate' => !empty($options['deactivate']) && $options['deactivate'] == 1 ? '1' : '0', 'width' => !empty($options['width']) ? $options['width'] : '100%', 'class' => !empty($options['class']) ? $options['class'] : '', 'inline' => !empty($options['inline']) ? $options['inline'] : '', 'max_length' => !empty($options['max_length']) ? $options['max_length'] : '200', 'error_text' => !empty($options['error_text']) ? $options['error_text'] : '', 'safemode' => !empty($options['safemode']) && $options['safemode'] == 1 ? '1' : '0', 'icon' => !empty($options['icon']) ? $options['icon'] : '', 'input_id' => !empty($options['input_id']) ? $options['input_id'] : $input_name);
     $required = $options['required'];
     $html .= "<div id='" . $options['input_id'] . "-field' class='form-group m-t-10 " . $options['class'] . " " . ($options['icon'] ? 'has-feedback' : '') . "'>\n";
     $html .= $title ? "<label class='control-label " . ($options['inline'] ? "col-xs-12 col-sm-3 col-md-3 col-lg-3 p-l-0" : '') . "'>{$title} " . ($options['required'] == 1 ? "<span class='required'>*</span>" : '') . "</label>\n" : '';
     $html .= $options['inline'] ? "<div class='col-xs-12 " . ($title ? "col-sm-9 col-md-9 col-lg-9 p-l-15" : "col-sm-12 col-md-12 col-lg-12") . "'>\n" : "<div class='p-t-10 p-b-10'>";
     $main_html = '';
     $sub_html = '';
     foreach ($language_opts as $lang => $langNames) {
         $options['field_title'] = $title . " (" . $langNames . ")";
         $options['input_id'] = $input_name . "-" . $lang;
         if ($lang == LANGUAGE) {
             $options['required'] = $required;
             $options['prepend_value'] = $langNames;
             // Fix this
             $main_html .= $options['function']($input_name . "[{$lang}]", "", isset($input_value[$lang]) ? $input_value[$lang] : $input_value, $options);
         } else {
             $options['required'] = 0;
             $options['prepend_value'] = $langNames;
             $sub_html .= $options['function']($input_name . "[{$lang}]", "", isset($input_value[$lang]) ? $input_value[$lang] : '', $options);
         }
     }
     $html .= $main_html . $sub_html;
     if (count($language_opts) > 1) {
         $html .= "<div class='dropdown'>\n";
         $html .= "<button id='lang_dropdown' data-toggle='dropdown' class='dropdown-toggle btn btn-sm btn-default' type='button'>" . $locale['add_language'] . " <span class='caret'></span></button>\n";
         $html .= "<ul class='dropdown-menu'>\n";
         foreach ($language_opts as $Lang => $LangName) {
             if ($Lang !== LANGUAGE) {
                 $html .= "<li><a data-add='{$Lang}' data-input='{$input_name}' data-locale='{$LangName}' class='pointer data-add'><i class='fa fa-plus-circle fa-fw'></i> {$LangName}</a></li>\n";
                 if ($Lang !== LANGUAGE) {
                     add_to_jquery("\$('#" . $input_name . "-" . $Lang . "-field').hide();");
                 }
             }
         }
         $html .= "</ul>\n";
         $html .= "</div>\n";
         if (!defined('QUANTUM_MULTILOCALE_FIELDS')) {
             define('QUANTUM_MULTILOCALE_FIELDS', true);
             add_to_jquery("\n                \$('.data-add').bind('click', function(e) {\n                    var lang = \$(this).data('add');\n                    var langNames = \$(this).data('locale');\n                    var inputName = \$(this).data('input');\n                    var dom = \$('#'+ inputName +'-' + lang + '-field');\n                    if ( dom.is(':visible') ) {\n                        dom.hide();\n                        \$(this).html('<i class=\"fa fa-plus-circle fa-fw\"></i>'+langNames);\n                    } else {\n                        dom.show();\n                        \$(this).html('<i class=\"fa fa-minus-circle fa-fw\"></i>'+langNames);\n                    }\n                    e.stopPropagation();\n                });\n                ");
         }
     }
     $html .= "</div>\n";
     $html .= "</div>\n";
     return $html;
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:59,代码来源:QuantumFields.php


注:本文中的fusion_get_enabled_languages函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。