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


PHP closeside函数代码示例

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


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

示例1: render_admin_login

function render_admin_login()
{
    global $locale, $aidlink, $userdata, $defender;
    // TODO: Remove this, add the required styling to acp_styles.css
    add_to_head("<link rel='stylesheet' href='" . THEMES . "templates/setup_styles.css' type='text/css' />");
    echo "<aside class='block-container'>\n";
    echo "<div class='block'>\n";
    echo "<div class='block-content clearfix' style='font-size:13px;'>\n";
    echo "<h6><strong>" . $locale['280'] . "</strong></h6>\n";
    echo "<img src='" . IMAGES . "php-fusion-icon.png' class='pf-logo position-absolute' alt='PHP-Fusion'/>";
    echo "<p class='fusion-version text-right mid-opacity text-smaller'>" . $locale['version'] . fusion_get_settings('version') . "</p>";
    echo "<div class='row m-0'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>";
    $form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
    echo openform('admin-login-form', 'post', $form_action, array('max_tokens' => 1));
    openside('');
    if (!$defender->safe()) {
        setNotice('danger', $locale['global_182']);
    }
    // Get all notices
    $notices = getNotices();
    echo renderNotices($notices);
    echo "<div class='m-t-10 clearfix row'>\n";
    echo "<div class='col-xs-3 col-sm-3 col-md-3 col-lg-3'>\n";
    echo "<div class='pull-right'>\n";
    echo display_avatar($userdata, '90px');
    echo "</div>\n";
    echo "</div>\n<div class='col-xs-9 col-sm-9 col-md-8 col-lg-7'>\n";
    echo "<div class='clearfix'>\n";
    $label = "<span class='h5 display-inline' style='color: #222'><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</span>";
    add_to_head('<style>#admin_password-field .required {display:none}</style>');
    echo form_text('admin_password', $label, '', array('callback_check' => 'check_admin_pass', 'placeholder' => $locale['281'], 'autocomplete_off' => 1, 'type' => 'password', 'required' => 1));
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    closeside();
    echo form_button('admin_login', $locale['login'], 'Sign in', array('class' => 'btn-primary btn-block'));
    echo closeform();
    echo "</div>\n</div>\n";
    // .col-*, .row
    echo "</div>\n";
    // .block-content
    echo "</div>\n";
    // .block
    echo "<div class='copyright-note clearfix m-t-10'>" . showcopyright() . "</div>\n";
    echo "</aside>\n";
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:46,代码来源:acp_theme.php

示例2: render_admin_login

function render_admin_login()
{
    global $locale, $aidlink, $userdata;
    echo "<section class='login-bg'>\n";
    echo "<aside class='block-container'>\n";
    echo "<div class='block'>\n";
    echo "<div class='block-content clearfix' style='font-size:13px;'>\n";
    echo "<h6><strong>" . $locale['280'] . "</strong></h6>\n";
    echo "<img src='" . IMAGES . "php-fusion-icon.png' class='pf-logo position-absolute' alt='PHP-Fusion'/>";
    echo "<p class='fusion-version text-right mid-opacity text-smaller'>" . $locale['version'] . fusion_get_settings('version') . "</p>";
    echo "<div class='row m-0'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>";
    $form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
    // Get all notices
    $notices = getNotices();
    echo renderNotices($notices);
    echo openform('admin-login-form', 'post', $form_action);
    openside('');
    echo "<div class='m-t-10 clearfix row'>\n";
    echo "<div class='col-xs-3 col-sm-3 col-md-3 col-lg-3'>\n";
    echo "<div class='pull-right'>\n";
    echo display_avatar($userdata, '90px');
    echo "</div>\n";
    echo "</div>\n<div class='col-xs-9 col-sm-9 col-md-8 col-lg-7'>\n";
    echo "<div class='clearfix'>\n";
    add_to_head('<style>#admin_password-field .required {display:none}</style>');
    echo "<h5><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</h5>";
    echo form_text('admin_password', "", "", array('callback_check' => 'check_admin_pass', 'placeholder' => $locale['281'], 'error_text' => $locale['global_182'], 'autocomplete_off' => TRUE, 'type' => 'password', 'required' => TRUE));
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    closeside();
    echo form_button('admin_login', $locale['login'], $locale['login'], array('class' => 'btn-primary btn-block'));
    echo closeform();
    echo "</div>\n</div>\n";
    // .col-*, .row
    echo "</div>\n";
    // .block-content
    echo "</div>\n";
    // .block
    echo "<div class='copyright-note clearfix m-t-10'>" . showcopyright() . "</div>\n";
    echo "</aside>\n";
    echo "</section>\n";
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:43,代码来源:acp_theme.php

示例3: render_dashboard

function render_dashboard()
{
    global $members, $forum, $download, $news, $articles, $weblinks, $photos, $global_comments, $global_ratings, $global_submissions, $link_type, $submit_type, $comments_type, $locale, $aidlink, $settings, $infusions_count;
    $mobile = '12';
    $tablet = '12';
    $laptop = '6';
    $desktop = '3';
    opentable($locale['250']);
    echo "<!--Start Members-->\n";
    echo "<div class='row'>\n";
    echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['registered']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['251'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "'>" . $locale['255'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['cancelled']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['263'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=5'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['unactivated']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['252'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=2'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
    openside();
    echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n";
    echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['security_ban']) . "</h4>";
    echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['253'] . "</strong></span>\n";
    closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'><a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&amp;status=4'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . "");
    echo "</div>\n</div>\n";
    echo "<!--End Members-->\n";
    $mobile = '12';
    $tablet = '12';
    $laptop = '6';
    $desktop = '4';
    echo "<div class='row'>\n";
    if (db_exists(DB_FORUMS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['265'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_F") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['265'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['count']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['256'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['thread']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['259'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($forum['post']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['260'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . $forum['users'] . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_DOWNLOADS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['268'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_D") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['268'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['download']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['comment']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($download['submit']) . "</h4>\n";
        echo "</div>\n";
        echo "</div>\n";
        closeside();
        echo "</div>\n";
    }
    if (db_exists(DB_NEWS)) {
        echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n";
        openside("", "well");
        echo "<span class='text-smaller text-uppercase'><strong>" . $locale['269'] . " " . $locale['258'] . "</strong></span>\n<br/>\n";
        echo "<div class='clearfix m-t-10'>\n";
        echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_N") . "'/>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
        echo "<span class='text-smaller'>" . $locale['269'] . "</span>\n<br/>\n";
        echo "<h4 class='m-t-0'>" . number_format($news['news']) . "</h4>\n";
        echo "</div>\n";
        echo "<div class='pull-left display-inline-block m-r-10'>\n";
//.........这里部分代码省略.........
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:101,代码来源:functions.php

示例4: display_forum_permissions_form

 /**
  * Permissions Form
  */
 private function display_forum_permissions_form()
 {
     $data = $this->data;
     $data += array('forum_id' => !empty($data['forum_id']) && isnum($data['forum_id']) ? $data['forum_id'] : 0, 'forum_type' => !empty($data['forum_type']) ? $data['forum_type'] : '');
     $_access = getusergroups();
     $access_opts['0'] = self::$locale['531'];
     while (list($key, $option) = each($_access)) {
         $access_opts[$option['0']] = $option['1'];
     }
     $public_access_opts = $access_opts;
     unset($access_opts[0]);
     // remove public away.
     $selection = array(self::$locale['forum_041'], "10 " . self::$locale['forum_points'], "20 " . self::$locale['forum_points'], "30 " . self::$locale['forum_points'], "40 " . self::$locale['forum_points'], "50 " . self::$locale['forum_points'], "60 " . self::$locale['forum_points'], "70 " . self::$locale['forum_points'], "80 " . self::$locale['forum_points'], "90 " . self::$locale['forum_points'], "100 " . self::$locale['forum_points']);
     $options = fusion_get_groups();
     unset($options[0]);
     //  no public to moderate, unset
     unset($options[-101]);
     // no member group to moderate, unset.
     add_breadcrumb(array('link' => '', 'title' => self::$locale['forum_030']));
     opentable(self::$locale['forum_030']);
     echo openform('permissionsForm', 'post', FUSION_REQUEST);
     echo "<span class='strong display-inline-block m-b-20'>" . self::$locale['forum_006'] . " : " . $data['forum_name'] . "</span>\n";
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_000'] . "</span><br/>\n";
     echo form_select('forum_access', self::$locale['forum_031'], $data['forum_access'], array('inline' => TRUE, 'options' => $public_access_opts));
     $optionArray = array("inline" => TRUE, "options" => $access_opts);
     echo form_select('forum_post', self::$locale['forum_032'], $data['forum_post'], $optionArray);
     echo form_select('forum_reply', self::$locale['forum_033'], $data['forum_reply'], $optionArray);
     echo form_select('forum_post_ratings', self::$locale['forum_039'], $data['forum_post_ratings'], $optionArray);
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_001'] . "</span><br/>\n";
     echo form_select('forum_poll', self::$locale['forum_036'], $data['forum_poll'], $optionArray);
     echo form_select('forum_vote', self::$locale['forum_037'], $data['forum_vote'], $optionArray);
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_004'] . "</span><br/>\n";
     echo form_select('forum_answer_threshold', self::$locale['forum_040'], $data['forum_answer_threshold'], array('options' => $selection, 'inline' => TRUE));
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_002'] . "</span><br/>\n";
     echo form_select('forum_attach', self::$locale['forum_034'], $data['forum_attach'], array('options' => $access_opts, 'inline' => TRUE));
     echo form_select('forum_attach_download', self::$locale['forum_035'], $data['forum_attach_download'], array('options' => $public_access_opts, 'inline' => TRUE));
     closeside();
     openside();
     echo form_hidden('forum_id', '', $data['forum_id']);
     echo form_select("forum_mods[]", self::$locale['forum_desc_003'], $data['forum_mods'], array("multiple" => TRUE, "width" => "100%", "options" => $options, "delimiter" => ".", "inline" => TRUE));
     /*
     echo "<span class='text-dark strong display-inline-block m-b-20'>".self::$locale['forum_desc_003']."</span><br/>\n";
     $mod_groups = getusergroups();
     $mods1_user_id = array();
     $mods1_user_name = array();
     while (list($key, $mod_group) = each($mod_groups)) {
         if ($mod_group['0'] != USER_LEVEL_PUBLIC && $mod_group['0'] != USER_LEVEL_MEMBER && $mod_group['0'] != USER_LEVEL_SUPER_ADMIN) {
             if (!preg_match("(^{$mod_group['0']}$|^{$mod_group['0']}\.|\.{$mod_group['0']}\.|\.{$mod_group['0']}$)", $data['forum_mods'])) {
                 $mods1_user_id[] = $mod_group['0'];
                 $mods1_user_name[] = $mod_group['1'];
             } else {
                 $mods2_user_id[] = $mod_group['0'];
                 $mods2_user_name[] = $mod_group['1'];
             }
         }
     }
     echo "<div class='row'>\n<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<select multiple='multiple' size='10' name='modlist1' id='modlist1' class='form-control textbox m-r-10' onchange=\"addUser('modlist2','modlist1');\">\n";
     for ($i = 0; $i < count($mods1_user_id); $i++) {
         echo "<option value='".$mods1_user_id[$i]."'>".$mods1_user_name[$i]."</option>\n";
     }
     echo "</select>\n";
     echo "</div>\n<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<select multiple='multiple' size='10' name='modlist2' id='modlist2' class='form-control textbox' onchange=\"addUser('modlist1','modlist2');\">\n";
     if (isset($mods2_user_id) && is_array($mods2_user_id)) {
         for ($i = 0; $i < count($mods2_user_id); $i++) {
             echo "<option value='".$mods2_user_id[$i]."'>".$mods2_user_name[$i]."</option>\n";
         }
     }
     echo "</select>\n";
     //echo form_text('forum_mods', '', $data['forum_mods']);
     
     echo "</div>\n</div>\n";
     */
     closeside();
     echo form_button('save_permission', self::$locale['forum_042'], self::$locale['forum_042'], array('class' => 'btn-primary'));
     /*
     add_to_jquery(" $('#save').bind('click', function() { saveMods(); }); ");
     echo "<script type='text/javascript'>\n"."function addUser(toGroup,fromGroup) {\n";
     echo "var listLength = document.getElementById(toGroup).length;\n";
     echo "var selItem = document.getElementById(fromGroup).selectedIndex;\n";
     echo "var selText = document.getElementById(fromGroup).options[selItem].text;\n";
     echo "var selValue = document.getElementById(fromGroup).options[selItem].value;\n";
     echo "var i; var newItem = true;\n";
     echo "for (i = 0; i < listLength; i++) {\n";
     echo "if (document.getElementById(toGroup).options[i].text == selText) {\n";
     echo "newItem = false; break;\n}\n}\n"."if (newItem) {\n";
     echo "document.getElementById(toGroup).options[listLength] = new Option(selText, selValue);\n";
     echo "document.getElementById(fromGroup).options[selItem] = null;\n}\n}\n";
     echo "function saveMods() {\n"."var strValues = \"\";\n";
//.........这里部分代码省略.........
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:view.php

示例5: debonair_theme_widget

function debonair_theme_widget()
{
    global $locale;
    require_once "functions.php";
    $settings = get_theme_settings("debonair");
    /**
     * data parsing
     */
    $ubanner_col_1_data = uncomposeSelection($settings['ubanner_col_1']);
    $ubanner_col_2_data = uncomposeSelection($settings['ubanner_col_2']);
    $ubanner_col_3_data = uncomposeSelection($settings['ubanner_col_3']);
    $settings = array("main_banner_url" => $settings['main_banner_url'], "ubanner_col_1" => !empty($ubanner_col_1_data['selected']) ? $ubanner_col_1_data['selected'] : 0, "ubanner_col_2" => !empty($ubanner_col_2_data['selected']) ? $ubanner_col_2_data['selected'] : 0, "ubanner_col_3" => !empty($ubanner_col_3_data['selected']) ? $ubanner_col_3_data['selected'] : 0, "lbanner_col_1" => $settings['lbanner_col_1'], "lbanner_col_2" => $settings['lbanner_col_2'], "lbanner_col_3" => $settings['lbanner_col_3'], "lbanner_col_4" => $settings['lbanner_col_4'], "facebook_url" => $settings['facebook_url'], "twitter_url" => $settings['twitter_url']);
    if (isset($_POST['save_settings'])) {
        $inputArray = array("main_banner_url" => form_sanitizer($_POST['main_banner_url'], "", "main_banner_url"), "ubanner_col_1" => composeSelection(form_sanitizer($_POST['ubanner_col_1'], "", "ubanner_col_1")), "ubanner_col_2" => composeSelection(form_sanitizer($_POST['ubanner_col_2'], "", "ubanner_col_2")), "ubanner_col_3" => composeSelection(form_sanitizer($_POST['ubanner_col_3'], "", "ubanner_col_3")), "lbanner_col_1" => form_sanitizer($_POST['lbanner_col_1'], "", "lbanner_col_1"), "lbanner_col_2" => form_sanitizer($_POST['lbanner_col_2'], "", "lbanner_col_2"), "lbanner_col_3" => form_sanitizer($_POST['lbanner_col_3'], "", "lbanner_col_3"), "lbanner_col_4" => form_sanitizer($_POST['lbanner_col_4'], "", "lbanner_col_4"), "facebook_url" => form_sanitizer($_POST['facebook_url'], "", "facebook_url"), "twitter_url" => form_sanitizer($_POST['twitter_url'], "", "twitter_url"));
        foreach ($inputArray as $settings_name => $settings_value) {
            $sqlArray = array("settings_name" => $settings_name, "settings_value" => $settings_value, "settings_theme" => "debonair");
            dbquery_insert(DB_SETTINGS_THEME, $sqlArray, "update", array("primary_key" => "settings_name"));
        }
        if (defender::safe()) {
            redirect(FUSION_REQUEST);
        }
    }
    echo openform("debonair_theme_settings", "post", FUSION_REQUEST);
    $exclude_list = ".|..|.htaccess|.DS_Store|config.php|config.temp.php|.gitignore|LICENSE|README.md|robots.txt|reactivate.php|rewrite.php|maintenance.php|maincore.php|lostpassword.php|index.php|error.php";
    $list = array();
    $file_list = makefilelist(BASEDIR, $exclude_list);
    foreach ($file_list as $files) {
        $list[] = $files;
    }
    $include_list = array();
    $file_list = makefilelist(THEMES . "/debonair/include/", $exclude_list);
    foreach ($file_list as $files) {
        $include_list[$files] = str_replace(".php", "", str_replace("_", " ", ucwords($files)));
    }
    openside("");
    echo form_select("main_banner_url", $locale['debonair_0300'], $settings['main_banner_url'], array("options" => $list, "tags" => true, "multiple" => true, "width" => "100%", "inline" => false));
    echo "<p>" . $locale['debonair_0301'] . "</p>";
    closeside();
    openside("");
    echo form_text("facebook_url", $locale['debonair_0321'], $settings['facebook_url'], array("type" => "url", "inline" => true, "placeholder" => "http://www.facebook.com/your-page-id"));
    echo form_text("twitter_url", $locale['debonair_0322'], $settings['twitter_url'], array("type" => "url", "inline" => true, "placeholder" => "http://www.twitter.com/your-page-id"));
    closeside();
    $templateOpts[0] = $locale['debonair_0302'];
    /**
     * Article Selector
     */
    $articleOpts = array();
    if (db_exists(DB_ARTICLES)) {
        $article_result = dbquery("select article_id, article_subject, article_cat_language FROM " . DB_ARTICLES . " a\n\t \t\t\t\tleft join " . DB_ARTICLE_CATS . " ac on a.article_cat = ac.article_cat_id\n\t \t\t\t\torder by article_datestamp DESC\n\t \t\t\t\t");
        if (dbrows($article_result) > 0) {
            while ($data = dbarray($article_result)) {
                $articleOpts[$data['article_cat_language']][$data['article_id']] = $data['article_subject'];
            }
        }
        if (!empty($articleOpts)) {
            $templateOpts['articles'] = $locale['debonair_0303'];
        }
    }
    /**
     * News Selector
     */
    $newsOpts = array();
    if (db_exists(DB_NEWS)) {
        $news_result = dbquery("select news_id, news_subject, news_language FROM " . DB_NEWS . " order by news_datestamp DESC");
        if (dbrows($news_result) > 0) {
            while ($data = dbarray($news_result)) {
                $newsOpts[$data['news_language']][$data['news_id']] = $data['news_subject'];
            }
        }
        if (!empty($newsOpts)) {
            $templateOpts['news'] = $locale['debonair_0304'];
        }
    }
    /**
     * Blog Selector
     */
    $blogOpts = array();
    if (db_exists(DB_BLOG)) {
        $blog_result = dbquery("select blog_id, blog_subject, blog_language FROM " . DB_BLOG . "\n\t \t\t\t\torder by blog_datestamp DESC\n\t \t\t\t\t");
        if (dbrows($blog_result) > 0) {
            while ($data = dbarray($blog_result)) {
                $blogOpts[$data['blog_language']][$data['blog_id']] = $data['blog_subject'];
            }
        }
        if (!empty($blogOpts)) {
            $templateOpts['blog'] = $locale['debonair_0305'];
        }
    }
    /**
     * Custom Page Selector
     * Note: custom page has a different multilanguage setup.
     */
    $cpOpts = array();
    if (db_exists(DB_CUSTOM_PAGES)) {
        $cp_result = dbquery("select page_id, page_title, page_language FROM " . DB_CUSTOM_PAGES . " order by page_id ASC");
        if (dbrows($cp_result) > 0) {
            while ($data = dbarray($cp_result)) {
                $acceptedLang = stristr($data['page_language'], ".") ? explode(".", $data['page_language']) : array(0 => $data['page_language']);
                foreach (fusion_get_enabled_languages() as $lang) {
                    if (in_array($lang, $acceptedLang)) {
//.........这里部分代码省略.........
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:101,代码来源:widget.php

示例6: add_panel_form

 /**
  * The Panel Editor Form
  */
 public function add_panel_form()
 {
     global $locale;
     fusion_confirm_exit();
     if (isset($_POST['panel_preview'])) {
         $panel_title = form_sanitizer($_POST['panel_name'], "", "panel_name");
         if (\defender::safe()) {
             echo openmodal("cp_preview", $panel_title);
             if (fusion_get_settings("allow_php_exe")) {
                 ob_start();
                 eval("?>" . stripslashes($_POST['panel_content']) . "<?php ");
                 $eval = ob_get_contents();
                 ob_end_clean();
                 echo $eval;
             } else {
                 echo "<p>" . nl2br(parse_textarea($_POST['panel_content'])) . "</p>\n";
             }
             echo closemodal();
         }
         $this->data = array("panel_id" => form_sanitizer($_POST['panel_id'], 0, "panel_id"), "panel_name" => form_sanitizer($_POST['panel_name'], "", "panel_name"), "panel_filename" => form_sanitizer($_POST['panel_filename'], "", "panel_filename"), "panel_side" => form_sanitizer($_POST['panel_side'], "", "panel_side"), "panel_content" => form_sanitizer($_POST['panel_content'], "", "panel_content"), "panel_restriction" => form_sanitizer($_POST['panel_restriction'], "", "panel_restriction"), "panel_url_list" => form_sanitizer($_POST['panel_url_list'], "", "panel_url_list"), "panel_display" => form_sanitizer($_POST['panel_display'], "", "panel_display"), "panel_access" => form_sanitizer($_POST['panel_access'], iGUEST, "panel_access"), "panel_languages" => !empty($_POST['panel_languages']) ? form_sanitizer($_POST['panel_languages'], "", "panel_languages") : LANGUAGE);
     }
     echo "<div class='m-t-20'>\n";
     echo openform('panel_form', 'post', $this->formaction, array('max_tokens' => 1));
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-8'>\n";
     openside('');
     echo form_hidden('panel_id', '', $this->data['panel_id']);
     echo form_text('panel_name', $locale['452'], $this->data['panel_name'], array('inline' => 1, 'required' => 1));
     //'error_text'=>$locale['470']
     echo form_select('panel_filename', $locale['453'], $this->data['panel_filename'], array('options' => self::get_panelOpts(), 'inline' => 1));
     $grid_opts = self::get_panel_grid();
     echo form_select('panel_side', $locale['457'], $this->data['panel_side'], array('options' => $grid_opts, 'inline' => TRUE));
     closeside();
     openside('');
     add_to_jquery("\n\t\t" . ($this->data['panel_restriction'] == 3 || $this->data['panel_restriction'] == 2 ? "\$('#panel_url_list-grp').hide();" : '') . "\n\t\t\$('#panel_restriction').bind('change', function(e) {\n\t\t\tif (\$(this).val() == '3' || \$(this).val() == '2') { \$('#panel_url_list-grp').hide(); } else { \$('#panel_url_list-grp').show(); }\n\t\t});\n\t\t");
     echo form_select('panel_restriction', $locale['468'], $this->data['panel_restriction'], array('options' => self::get_includeOpts(), 'inline' => 1));
     echo "<div id='panel_url_list-grp'>\n";
     echo "<div class='text-smaller'></div>\n";
     echo form_select('panel_url_list', $locale['462'], $this->data['panel_url_list'], array('options' => self::get_panel_url_list(), 'inline' => 1, 'tags' => 1, 'multiple' => 1, 'width' => '100%'));
     echo "</div>\n";
     echo form_hidden('panel_display', '', $this->data['panel_display']);
     closeside();
     add_to_jquery("\n\t\t" . ($this->data['panel_filename'] > 0 ? "\$('#pgrp').hide();" : "\$('#pgrp').show();") . "\n\t\t\$('#panel_filename').bind('change', function(e) {\n\t\t\tif (\$(this).val() > 0) { \$('#pgrp').hide(); } else { \$('#pgrp').show(); }\n\t\t});\n\t\t");
     echo "<div id='pgrp'>\n";
     echo form_textarea('panel_content', $locale['455'], $this->data['panel_content'], array('html' => fusion_get_settings("allow_php_exe") ? FALSE : TRUE, 'form_name' => 'panel_form', 'autosize' => 1, 'preview' => fusion_get_settings("allow_php_exe") ? FALSE : TRUE));
     echo "</div>\n";
     echo "</div>\n<div class='col-xs-12 col-sm-4'>\n";
     openside('');
     echo form_select('panel_access', $locale['458'], $this->data['panel_access'], array("options" => self::get_accessOpts()));
     echo form_button('panel_save', $locale['461'], $locale['461'], array('class' => 'btn-primary'));
     echo form_button('panel_preview', $locale['preview'], $locale['preview'], array('input_id' => 'prev2', 'class' => 'm-l-10 btn-default'));
     closeside();
     openside('');
     echo "<label class='label-control m-b-10'>" . $locale['466'] . "</label>\n";
     $languages = !empty($this->data['panel_languages']) ? explode('.', $this->data['panel_languages']) : array();
     foreach (fusion_get_enabled_languages() as $language => $language_name) {
         echo form_checkbox('panel_languages[]', $language_name, in_array($language, $languages) ? 1 : 0, array('class' => 'm-b-0', 'value' => $language, "reverse_label" => TRUE, 'input_id' => 'panel_lang-' . $language));
     }
     closeside();
     echo "</div>\n";
     echo "</div>\n";
     echo form_button('panel_save', $locale['461'], $locale['460'], array('class' => 'btn-primary'));
     echo form_button('panel_preview', $locale['preview'], $locale['preview'], array('class' => 'm-l-10 btn-default'));
     echo closeform();
     echo "</div>\n";
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:69,代码来源:panels.php

示例7: closesidex

function closesidex()
{
    if (DEBUGING) {
        echo "<strong>old function " . __FUNCTION__ . " is used</strong><br />";
        //echo "<pre>".print_r(debug_backtrace(), true)."</pre>";
    }
    closeside();
}
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:8,代码来源:theme_functions_include.php

示例8: viewSettingsAdmin

 public function viewSettingsAdmin()
 {
     global $aidlink;
     pageAccess('F');
     $forum_settings = $this->get_forum_settings();
     add_breadcrumb(array('link' => ADMIN . 'settings_forum.php' . $aidlink, 'title' => self::$locale['forum_settings']));
     if (isset($_POST['recount_user_post'])) {
         $result = dbquery("SELECT post_author, COUNT(post_id) as num_posts FROM " . DB_FORUM_POSTS . " GROUP BY post_author");
         if (dbrows($result)) {
             while ($data = dbarray($result)) {
                 $result2 = dbquery("UPDATE " . DB_USERS . " SET user_posts='" . $data['num_posts'] . "' WHERE user_id='" . $data['post_author'] . "'");
             }
             addNotice('success', self::$locale['forum_061']);
         }
     }
     if (isset($_POST['savesettings'])) {
         $numofthreads = form_sanitizer($_POST['numofthreads'], 20, 'numofthreads');
         $threads_num = form_sanitizer($_POST['threads_per_page'], 20, 'threads_per_page');
         $posts_num = form_sanitizer($_POST['posts_per_page'], 20, 'posts_per_page');
         $forum_ips = form_sanitizer($_POST['forum_ips'], -103, 'forum_ips');
         $attachmax = form_sanitizer($_POST['calc_b'], 1, 'calc_b') * form_sanitizer($_POST['calc_c'], 1000000, 'calc_c');
         $attachmax_count = form_sanitizer($_POST['forum_attachmax_count'], 5, 'forum_attachmax_count');
         $attachtypes = form_sanitizer($_POST['forum_attachtypes'], '.pdf,.gif,.jpg,.png,.zip,.rar,.tar,.bz2,.7z', 'forum_attachtypes');
         $thread_notify = form_sanitizer($_POST['thread_notify'], '0', 'thread_notify');
         $forum_ranks = form_sanitizer($_POST['forum_ranks'], '0', 'forum_ranks');
         $forum_rank_style = form_sanitizer($_POST['forum_rank_style'], '0', 'forum_rank_style');
         $forum_edit_lock = form_sanitizer($_POST['forum_edit_lock'], '0', 'forum_edit_lock');
         $forum_edit_timelimit = form_sanitizer($_POST['forum_edit_timelimit'], '0', 'forum_edit_timelimit');
         $popular_threads_timeframe = form_sanitizer($_POST['popular_threads_timeframe'], '604800', 'popular_threads_timeframe');
         $forum_last_posts_reply = form_sanitizer($_POST['forum_last_posts_reply'], '0', 'forum_last_posts_reply');
         $forum_last_post_avatar = form_sanitizer($_POST['forum_last_post_avatar'], '0', 'forum_last_post_avatar');
         $forum_editpost_to_lastpost = form_sanitizer($_POST['forum_editpost_to_lastpost'], '0', 'forum_editpost_to_lastpost');
         if (\defender::safe()) {
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$numofthreads}' WHERE settings_name='numofthreads' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$threads_num}' WHERE settings_name='threads_per_page' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$posts_num}' WHERE settings_name='posts_per_page'  AND settings_inf='forum'");
             //".(isnum($_POST['forum_ips']) ? $_POST['forum_ips'] : "103")."
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ips}' WHERE settings_name='forum_ips' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax}' WHERE settings_name='forum_attachmax' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax_count}' WHERE settings_name='forum_attachmax_count' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachtypes}' WHERE settings_name='forum_attachtypes' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$thread_notify}' WHERE settings_name='thread_notify' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ranks}' WHERE settings_name='forum_ranks' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_rank_style}' WHERE settings_name='forum_rank_style' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_lock}' WHERE settings_name='forum_edit_lock' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_timelimit}' WHERE settings_name='forum_edit_timelimit' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$popular_threads_timeframe}' WHERE settings_name='popular_threads_timeframe' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_posts_reply}' WHERE settings_name='forum_last_posts_reply' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_post_avatar}' WHERE settings_name='forum_last_post_avatar' AND settings_inf='forum'");
             dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_editpost_to_lastpost}' WHERE settings_name='forum_editpost_to_lastpost' AND settings_inf='forum'");
             addNotice('success', self::$locale['900']);
             redirect(FUSION_SELF . $aidlink . '&section=fs');
         }
     }
     $yes_no_array = array('1' => self::$locale['yes'], '0' => self::$locale['no']);
     echo "<div class='well'>" . self::$locale['forum_description'] . "</div>";
     echo openform('forum_settings_form', '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 "<span class='small pull-right'>* " . self::$locale['506'] . "</span><br/>\n";
     echo form_text('numofthreads', self::$locale['505'], $forum_settings['numofthreads'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
     closeside();
     openside('');
     echo form_text('threads_per_page', self::$locale['forum_080'], $forum_settings['threads_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
     echo form_text('posts_per_page', self::$locale['forum_081'], $forum_settings['posts_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
     closeside();
     openside('');
     echo form_select('thread_notify', self::$locale['512'], $forum_settings['thread_notify'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     closeside();
     openside('');
     echo "<span class='pull-right position-absolute small' style='right:30px;'>" . self::$locale['537'] . "</span>\n";
     echo form_select('forum_edit_timelimit', self::$locale['536'], $forum_settings['forum_edit_timelimit'], array('options' => array('0', '10', '30', '45', '60'), 'max_length' => 2, 'width' => '100px', 'required' => 1, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_ips', self::$locale['507'], $forum_settings['forum_ips'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_ranks', self::$locale['520'], $forum_settings['forum_ranks'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_rank_style', self::$locale['forum_064'], $forum_settings['forum_rank_style'], array('options' => array(self::$locale['forum_063'], self::$locale['forum_062']), 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_last_post_avatar', self::$locale['539'], $forum_settings['forum_last_post_avatar'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_edit_lock', self::$locale['521'], $forum_settings['forum_edit_lock'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     echo form_select('forum_editpost_to_lastpost', self::$locale['538'], $forum_settings['forum_editpost_to_lastpost'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
     closeside();
     echo "</div>\n";
     echo "<div class='col-xs-12 col-sm-4'>\n";
     openside('');
     $calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
     $calc_c = self::calculate_byte($forum_settings['forum_attachmax']);
     $calc_b = $forum_settings['forum_attachmax'] / $calc_c;
     require_once INCLUDES . "mimetypes_include.php";
     $mime = mimeTypes();
     $mime_opts = array();
     foreach ($mime as $m => $Mime) {
         $ext = ".{$m}";
         $mime_opts[$ext] = $ext;
     }
     sort($mime_opts);
     echo "<div class='clearfix'>\n";
     echo "<span class='pull-right small'>" . self::$locale['509'] . "</span>";
     echo "<label for='calc_c'>" . self::$locale['508'] . "</label><br />\n";
     echo form_text('calc_b', '', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => self::$locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'm-r-10 pull-left'));
     echo form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'placeholder' => self::$locale['choose'], 'class' => 'pull-left', 'width' => '100%'));
     echo "</div>\n";
//.........这里部分代码省略.........
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:settings.php

示例9: 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

示例10: display_news_cat_form

/**
 * Displays News Category Form
 */
function display_news_cat_form()
{
    global $aidlink;
    $locale = fusion_get_locale();
    if (isset($_POST['cancel'])) {
        redirect(FUSION_SELF . $aidlink . "&section=news_category");
    }
    /**
     * Delete category images
     */
    if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['cat_id']) && isnum($_GET['cat_id']))) {
        $result = dbcount("(news_cat)", DB_NEWS, "news_cat='" . $_GET['cat_id'] . "'") || dbcount("(news_cat_id)", DB_NEWS_CATS, "news_cat_parent='" . $_GET['cat_id'] . "'");
        if (!empty($result)) {
            addNotice("success", $locale['news_0152'] . $locale['news_0153']);
        } else {
            $result = dbquery("DELETE FROM " . DB_NEWS_CATS . " WHERE news_cat_id='" . $_GET['cat_id'] . "'");
            addNotice("success", $locale['news_0154']);
        }
        // FUSION_REQUEST without the "action" gets
        redirect(clean_request("", array("action"), FALSE));
    }
    $data = array("news_cat_id" => 0, "news_cat_name" => "", "news_cat_hidden" => array(), "news_cat_parent" => 0, "news_cat_image" => "", "news_cat_draft" => FALSE, "news_cat_visibility" => iGUEST, "news_cat_sticky" => FALSE, "news_cat_featured" => FALSE, "news_cat_language" => LANGUAGE);
    $formAction = FUSION_REQUEST;
    $formTitle = $locale['news_0022'];
    // if edit, override $data
    if (isset($_POST['save_cat']) or isset($_POST['save_cat_and_close'])) {
        $inputArray = array("news_cat_id" => form_sanitizer($_POST['news_cat_id'], "", "news_cat_id"), "news_cat_name" => form_sanitizer($_POST['news_cat_name'], "", "news_cat_name"), "news_cat_parent" => form_sanitizer($_POST['news_cat_parent'], 0, "news_cat_parent"), "news_cat_visibility" => form_sanitizer($_POST['news_cat_visibility'], 0, "news_cat_visibility"), "news_cat_draft" => isset($_POST['news_cat_draft']) ? 1 : 0, "news_cat_sticky" => isset($_POST['news_cat_sticky']) ? 1 : 0, "news_cat_image" => form_sanitizer($_POST['news_cat_image'], "", "news_cat_image"), "news_cat_language" => form_sanitizer($_POST['news_cat_language'], LANGUAGE, "news_cat_language"));
        $categoryNameCheck = array("when_updating" => "news_cat_name='" . $inputArray['news_cat_name'] . "' and news_cat_id !='" . $inputArray['news_cat_id'] . "' " . (multilang_table("NS") ? "and news_cat_language = '" . LANGUAGE . "'" : ""), "when_saving" => "news_cat_name='" . $inputArray['news_cat_name'] . "' " . (multilang_table("NS") ? "and news_cat_language = '" . LANGUAGE . "'" : ""));
        if (defender::safe()) {
            // check category name is unique when updating
            if (dbcount("(news_cat_id)", DB_NEWS_CATS, "news_cat_id='" . $inputArray['news_cat_id'] . "'")) {
                if (!dbcount("(news_cat_id)", DB_NEWS_CATS, $categoryNameCheck['when_updating'])) {
                    dbquery_insert(DB_NEWS_CATS, $inputArray, "update");
                    addNotice("success", $locale['news_0151']);
                    if (isset($_POST['save_cat_and_close'])) {
                        redirect(clean_request("", array("action", "ref"), FALSE));
                    } else {
                        redirect(FUSION_REQUEST);
                    }
                } else {
                    addNotice('danger', $locale['news_0352']);
                }
            } else {
                // check category name is unique when saving new
                if (!dbcount("(news_cat_id)", DB_NEWS_CATS, $categoryNameCheck['when_saving'])) {
                    dbquery_insert(DB_NEWS_CATS, $inputArray, "save");
                    addNotice("success", $locale['news_0150']);
                    if (isset($_POST['save_cat_and_close'])) {
                        redirect(clean_request("", array("action", "ref"), FALSE));
                    } else {
                        redirect(FUSION_REQUEST);
                    }
                } else {
                    addNotice('danger', $locale['news_0352']);
                }
            }
        }
    } elseif (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_GET['cat_id']) && isnum($_GET['cat_id']))) {
        $result = dbquery("SELECT * FROM " . DB_NEWS_CATS . " " . (multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " news_cat_id='" . $_GET['cat_id'] . "'");
        if (dbrows($result)) {
            $data = dbarray($result);
            $data['news_cat_hidden'] = array($data['news_cat_id']);
            $formTitle = $locale['news_0021'];
        } else {
            // FUSION_REQUEST without the "action" gets
            redirect(clean_request("", array("action"), FALSE));
        }
    }
    add_breadcrumb(array('link' => "", 'title' => $formTitle));
    echo "<div class='m-t-20 m-b-20'>\n";
    echo openform("addcat", "post", $formAction);
    ?>
    <div class="row">
        <div class="col-xs-12 col-sm-8">
            <?php 
    echo form_hidden("news_cat_id", "", $data['news_cat_id']);
    echo form_text("news_cat_name", $locale['news_0300'], $data['news_cat_name'], array("required" => TRUE, "inline" => TRUE, "error_text" => $locale['news_0351']));
    echo form_select_tree("news_cat_parent", $locale['news_0305'], $data['news_cat_parent'], array("inline" => TRUE, "disable_opts" => $data['news_cat_hidden'], "hide_disabled" => TRUE, "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
    echo form_select("news_cat_image", $locale['news_0301'], $data['news_cat_image'], array("inline" => TRUE, "options" => newsCatImageOpts()));
    echo form_select('news_cat_visibility', $locale['news_0209'], $data['news_cat_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], "inline" => TRUE));
    ?>
        </div>
        <div class="col-xs-12 col-sm-4">
            <?php 
    if (multilang_table("NS")) {
        echo form_select("news_cat_language", $locale['global_ML100'], $data['news_cat_language'], array("inline" => TRUE, "options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose']));
    } else {
        echo form_hidden("news_cat_language", "", $data['news_cat_language']);
    }
    openside("");
    echo form_checkbox("news_cat_draft", "Save Category as Draft", $data['news_cat_draft'], array("reverse_label" => TRUE));
    echo form_checkbox("news_cat_sticky", "Make this Category Sticky", $data['news_cat_sticky'], array("reverse_label" => TRUE));
    echo form_button("cancel", $locale['cancel'], $locale['cancel'], array("class" => "btn-default"));
    echo form_button("save_cat", $locale['news_0302'], $locale['news_0302'], array("class" => "btn-success m-l-10"));
    echo form_button("save_cat_and_close", "Save and Close", "save_and_close", array("class" => "btn-primary m-l-10"));
    closeside();
    ?>
//.........这里部分代码省略.........
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:news_cat.php

示例11: nav_admin

 private function nav_admin()
 {
     global $locale;
     $width_options = array("width" => "100%", 'placeholder' => 'px');
     $color_options = array("placeholder" => $locale['theme_2009'], "width" => "100%", "format" => "hex");
     $fill_options = array("placeholder" => $locale['theme_2033'], "width" => "280px");
     openside('');
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_para($locale['theme_4001'], 'navbar-h');
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_text("navbar_height", $locale['theme_4002'], $this->data['navbar_height'], $width_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_text("navbar_border", $locale['theme_4003'], $this->data['navbar_border'], $width_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_text("navbar_radius", $locale['theme_4004'], $this->data['navbar_radius'], $width_options);
     echo "</div>\n</div>\n";
     closeside();
     openside('');
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_para($locale['theme_4005'], 'navbar-h2a');
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-9 col-lg-9'>\n";
     $fill_options['options'] = $this->fills;
     echo form_select("navbar_fill", $locale['theme_4006'], $this->data['navbar_fill'], $fill_options);
     echo "</div>\n</div>\n";
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_bg", $locale['theme_2031'], $this->data['navbar_bg'], $color_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_bg_hover", $locale['theme_3019'], $this->data['navbar_bg_hover'], $color_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_bg_active", $locale['theme_3020'], $this->data['navbar_bg_active'], $color_options);
     echo "</div>\n</div>\n";
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_para($locale['theme_4007'], 'navbar-h2');
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_text("navbar_link_border", $locale['theme_4008'], $this->data['navbar_link_border'], $width_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_text("navbar_link_radius", $locale['theme_4009'], $this->data['navbar_link_radius'], $width_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_link_border_color", $locale['theme_4010'], $this->data['navbar_link_border_color'], $color_options);
     echo "</div>\n</div>\n";
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_para($locale['theme_4011'], 'navbar-h3');
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_brand_color", $locale['theme_4012'], $this->data['navbar_brand_color'], $color_options);
     echo form_colorpicker("navbar_font_color", $locale['theme_4013'], $this->data['navbar_font_color'], $color_options);
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_select("navbar_brand_decoration", $locale['theme_4014'], $this->data['navbar_brand_decoration'], array("width" => "100%", "options" => $this->font_decoration_options));
     echo form_select("navbar_font_decoration", $locale['theme_2025'], $this->data['navbar_font_decoration'], array("width" => "100%", "options" => $this->font_decoration_options));
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo "</div>\n</div>\n";
     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_para($locale['theme_4015'], 'navbar-h4');
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_link_color", $locale['theme_4013'], $this->data['navbar_link_color'], $color_options);
     echo form_select("navbar_link_decoration", $locale['theme_4016'], $this->data['navbar_link_decoration'], array("width" => "100%", "options" => $this->font_decoration_options));
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_link_color_hover", $locale['theme_2028'], $this->data['navbar_link_color_hover'], $color_options);
     echo form_select("navbar_link_decoration_hover", $locale['theme_2025'], $this->data['navbar_link_decoration_hover'], array("width" => "100%", "options" => $this->font_decoration_options));
     echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-3 col-lg-3'>\n";
     echo form_colorpicker("navbar_link_color_active", $locale['theme_2034'], $this->data['navbar_link_color_active'], $color_options);
     echo form_select("navbar_link_decoration_active", $locale['theme_2035'], $this->data['navbar_link_decoration_active'], array("width" => "100%", "options" => $this->font_decoration_options));
     echo "</div>\n</div>\n";
     closeside();
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:71,代码来源:Atom.php

示例12: index

function index()
{
    global $HTTP_POST_VARS, $userdata, $locale, $settings, $golddata;
    table_top($locale['urg_index_100']);
    $rows = 2;
    if (UGLD_BANK_ENABLED) {
        $rows++;
    }
    if (UGLD_DISPLAY_USAGE_INDEX) {
        $rows++;
    }
    echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr>\n";
    echo "<td align='left' valign='top'><h3>" . sprintf($locale['urg_index_101'], $userdata['user_name']) . "</h3></td>\n";
    echo "<td rowspan='3' align='right' valign='bottom'><img src='" . GOLD_IMAGE . "logo_home.png' alt='logo_home' /></td>\n";
    echo "</tr>\n<tr>\n";
    echo "<td align='left' valign='top'>" . sprintf($locale['urg_index_102'], "<strong>" . formatMoney($golddata['cash']) . "</strong>") . "</td>\n";
    echo "</tr>\n";
    if (UGLD_BANK_ENABLED) {
        echo "<tr><td align='left' valign='top'>" . sprintf($locale['urg_index_103'], UGLD_BANKLINK, "<strong>" . UGLD_BANK_INTEREST . "</strong>", "<strong>" . formatMoney($golddata['bank']) . "</strong>", UGLD_BANKLINK) . "</td></tr>\n";
    }
    if (UGLD_DISPLAY_USAGE_INDEX) {
        echo "<tr><td align='left' valign='top'>" . panel_itemdisplay() . "</td></tr>\n";
    }
    echo "</table><br />\n";
    //This is a double sided table to contain some panels
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n<tr>\n";
    echo "<td style='vertical-align: top; width: 48%;'>\n";
    //Top Ten Chash
    openside($locale['urg_index_105']);
    echo "<table width='100%' cellpadding='5' cellspacing='1' border='0'>\n<tr>\n";
    echo "<td valign='top' width='100%'>";
    echo panel_topten_cash();
    echo "<br /></td></tr></table>\n";
    closeside();
    //Top Ten Chips
    openside($locale['urg_index_106']);
    echo "<table width='100%' cellpadding='5' cellspacing='1' border='0'>\n<tr>\n";
    echo "<td valign='top' width='100%'>\n";
    echo panel_topten_chips();
    echo "<br /></td></tr></table>\n";
    closeside();
    echo "</td>\n";
    echo "<td  valign='top' width='1%'></td>\n";
    echo "<td valign='top' width='48%'>\n";
    //Top Ten Bank
    if (UGLD_BANK_ENABLED) {
        openside($locale['urg_index_107']);
        echo "<table width='100%' cellpadding='5' cellspacing='1' border='0'>\n<tr>\n";
        echo "<td valign='top' width='100%'>\n";
        echo panel_topten_bank();
        echo "<br /></td></tr></table>\n";
        closeside();
    }
    //Top Ten Karma
    openside($locale['urg_index_108']);
    echo "<table width='100%' cellpadding='5' cellspacing='1' border='0'>\n<tr>\n";
    echo "<td valign='top' width='100%'>\n";
    echo panel_topten_karma();
    echo "<br /></td></tr></table>\n";
    closeside();
    echo "</td>\n</tr>\n</table>\n";
    closetable();
}
开发者ID:simplyianm,项目名称:clububer,代码行数:63,代码来源:index.php

示例13: display_administration


//.........这里部分代码省略.........
</a>
                    </div>
                    <span class='text-lighter'>generated by</span>

                    <div class='alert alert-info display-inline-block p-t-0 p-b-0 text-smaller'>
                        <strong><?php 
            echo $locale['412'] . "-" . $locale['416'];
            ?>
                            <?php 
            echo $data['error_user_level'];
            ?>
                            -- <?php 
            echo $locale['417'] . " " . $data['error_user_ip'];
            ?>
</strong>
                    </div>
                    <span class='text-lighter'><?php 
            echo lcfirst($locale['on']);
            ?>
</span>

                    <div class='alert alert-info display-inline-block p-t-0 p-b-0 text-smaller'><strong
                            class='m-r-10'><?php 
            echo showdate("longdate", $data['error_timestamp']);
            ?>
</strong></div>
                </div>
                <div class='m-t-10 display-inline-block' style='width:300px'>
                    <?php 
            echo openform('logform', 'post', FUSION_SELF . $aidlink . "&amp;rowstart=" . $_GET['rowstart'] . "&amp;error_id=" . $data['error_id'] . "#file", array('max_tokens' => 1));
            echo form_hidden('error_id', '', $data['error_id']);
            echo form_select('error_status', $locale['mark_as'], $data['error_status'], array("inline" => TRUE, "options" => self::get_logTypes()));
            echo closeform();
            ?>
                </div>
            </div>
            <div class='m-t-10'>
                <?php 
            openside('');
            ?>
                <table class='table table-responsive'>
                    <tr>
                        <td colspan='4' class='tbl2'><strong><?php 
            echo $locale['421'];
            ?>
</strong>
                            (<?php 
            echo $locale['415'] . " " . $line_start . " - " . $line_end;
            ?>
)
                        </td>
                    </tr>
                    <tr>
                        <td colspan='4'><?php 
            echo self::printCode($output, $line_start, $data['error_line'], array('time' => $data['error_timestamp'], 'text' => $data['error_message']));
            ?>
</td>
                    </tr>
                </table>
                <?php 
            closeside();
            ?>
            </div>
            <?php 
            echo closetabbody();
            echo opentabbody($tab_title['title'][2], $tab_title['id'][2], $tab_active);
            ?>
            <div class='m-t-10'>
                <?php 
            openside('');
            ?>
                <table class='table table-responsive'>
                    <tr>
                        <td class='tbl2'><a name='page'></a>
                            <strong><?php 
            echo $locale['411'];
            ?>
                                : <?php 
            echo self::getMaxFolders($data['error_page'], 3);
            ?>
</strong>
                        </td>
                    </tr>
                    <tr>
                        <td><?php 
            echo self::printCode($pageContent, "1");
            ?>
</td>
                    </tr>
                </table>
                <?php 
            closeside();
            ?>
            </div>
            <?php 
            echo closetabbody();
        }
        echo closetab();
        closetable();
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:Errors.php

示例14: render_main_news


//.........这里部分代码省略.........
                    }
                    $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'] . "&amp;" : '';
                $cat_start = isset($_GET['cat_id']) ? "cat_id=" . $_GET['cat_id'] . "&amp;" : '';
                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 
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:custom_news.php

示例15: customPage_form

 /**
  * The HTML form
  * @param $data
  */
 public static function customPage_form($data)
 {
     global $aidlink, $locale;
     if (isset($_POST['preview'])) {
         if (\defender::safe()) {
             echo openmodal("cp_preview", $locale['429']);
             echo "<h3>" . $data['page_title'] . "</h3>\n";
             if (fusion_get_settings("allow_php_exe")) {
                 ob_start();
                 eval("?>" . stripslashes($_POST['page_content']) . "<?php ");
                 $eval = ob_get_contents();
                 ob_end_clean();
                 echo $eval;
             } else {
                 echo "<p>" . nl2br(parse_textarea($_POST['page_content'])) . "</p>\n";
             }
             echo closemodal();
         }
         $data = array('page_id' => form_sanitizer($_POST['page_id'], 0, 'page_id'), 'link_id' => form_sanitizer($_POST['link_id'], 0, 'link_id'), 'link_order' => form_sanitizer($_POST['link_order'], 0, 'link_order'), 'page_link_cat' => form_sanitizer($_POST['page_link_cat'], 0, 'page_link_cat'), 'page_title' => form_sanitizer($_POST['page_title'], '', 'page_title'), 'page_access' => form_sanitizer($_POST['page_access'], 0, 'page_access'), 'page_content' => form_sanitizer($_POST['page_content'], "", "page_content"), 'page_keywords' => form_sanitizer($_POST['page_keywords'], '', 'page_keywords'), 'page_language' => implode('.', isset($_POST['page_language']) ? sanitize_array($_POST['page_language']) : array()), 'page_allow_comments' => isset($_POST['page_allow_comments']) ? 1 : 0, 'page_allow_ratings' => isset($_POST['page_allow_ratings']) ? 1 : 0);
     }
     echo openform('inputform', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
     if (isset($_POST['edit']) && isset($_POST['page_id'])) {
         echo form_hidden('edit', '', 'edit');
     }
     echo "<div class='row m-t-20' >\n";
     echo "<div class='col-xs-12 col-sm-8'>\n";
     echo form_text('page_title', $locale['422'], $data['page_title'], array('required' => 1));
     echo form_select('page_keywords', $locale['432'], $data['page_keywords'], array('max_length' => 320, 'width' => '100%', 'tags' => 1, 'multiple' => 1));
     $textArea_config = array('width' => '100%', 'height' => '260px', 'form_name' => 'inputform', 'type' => "html", 'class' => 'm-t-20');
     if (isset($_COOKIE['custom_pages_tinymce']) && $_COOKIE['custom_pages_tinymce'] == 1 && fusion_get_settings('tinymce_enabled')) {
         $textArea_config = array("type" => "tinymce", "tinymce" => "advanced", "class" => "m-t-20");
     }
     echo form_textarea('page_content', '', $data['page_content'], $textArea_config);
     echo "</div>\n";
     echo "<div class='col-xs-12 col-sm-4'>\n";
     openside("");
     echo form_button('save', $locale['430'], $locale['430'], array('class' => 'btn-primary m-r-10 m-t-10'));
     echo form_button('preview', $locale['429'], $locale['429'], array('class' => 'btn-default m-r-10 m-t-10'));
     closeside();
     if (fusion_get_settings('tinymce_enabled')) {
         openside('');
         $val = !isset($_COOKIE['custom_pages_tinymce']) || $_COOKIE['custom_pages_tinymce'] == 0 ? $locale['461'] . " TINYMCE" : $locale['462'] . " TINYMCE";
         echo form_button('tinymce_switch', $val, $val, array('class' => 'btn-default btn-block', 'type' => 'button'));
         add_to_jquery("\n\t\t\t\$('#tinymce_switch').bind('click', function() {\n\t\t\t\tSetTinyMCE(" . (!isset($_COOKIE['custom_pages_tinymce']) || $_COOKIE['custom_pages_tinymce'] == 0 ? 1 : 0) . ");\n\t\t\t});\n\t\t\t");
         closeside();
     }
     if (fusion_get_settings('comments_enabled') == "0" || fusion_get_settings('ratings_enabled') == "0") {
         echo "<div class='tbl2 well'>\n";
         if (fusion_get_settings('comments_enabled') == "0" && fusion_get_settings('ratings_enabled') == "0") {
             $sys = $locale['457'];
         } elseif (fusion_get_settings('comments_enabled') == "0") {
             $sys = $locale['455'];
         } else {
             $sys = $locale['456'];
         }
         echo sprintf($locale['454'], $sys);
         echo "</div>\n";
     }
     if (!$data['page_id']) {
         openside("");
         echo form_checkbox('add_link', $locale['426'], 1);
         echo "<div id='link_add_sel' style='display:none;'>\n";
         echo form_select_tree("page_link_cat", $locale['SL_0029'], $data['page_link_cat'], array("parent_value" => $locale['parent'], 'width' => '100%', 'query' => (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : '') . " link_position >= 2", 'disable_opts' => $data['link_id'], 'hide_disabled' => 1), DB_SITE_LINKS, "link_name", "link_id", "link_cat");
         echo "</div>\n";
         add_to_jquery("\n            var checked = \$('#add_link').is(':checked');\n            if (checked) {\n                \$('#link_add_sel').show();\n            } else {\n                \$('#link_add_sel').hide();\n            }\n            \$('#add_link').bind('click', function(e) {\n                var checked = \$(this).is(':checked');\n                if (checked) {\n                    \$('#link_add_sel').show();\n                } else {\n                    \$('#link_add_sel').hide();\n                }\n            });\n            ");
         closeside();
     }
     openside("");
     echo form_checkbox('page_allow_comments', $locale['427'], $data['page_allow_comments'], array('class' => 'm-b-0'));
     echo form_checkbox('page_allow_ratings', $locale['428'], $data['page_allow_ratings'], array('class' => 'm-b-0'));
     echo form_hidden('link_id', '', $data['link_id']);
     echo form_hidden('link_order', '', $data['link_order']);
     closeside();
     openside();
     if (multilang_table("CP")) {
         $page_lang = !empty($data['page_language']) ? explode('.', $data['page_language']) : array();
         foreach (fusion_get_enabled_languages() as $language => $language_name) {
             $isDisabled = LANGUAGE == $language ? TRUE : FALSE;
             echo form_checkbox('page_language[]', $language_name, in_array($language, $page_lang) ? TRUE : FALSE, array('class' => 'm-b-0', 'value' => $language, 'input_id' => 'page_lang-' . $language, "disabled" => $isDisabled ? TRUE : FALSE, "delimiter" => "."));
             if ($isDisabled) {
                 echo form_hidden("page_language[]", "", $language);
             }
         }
     } else {
         echo form_hidden('page_language', '', $data['page_language']);
     }
     closeside();
     openside();
     echo form_select('page_access', $locale['423'], $data['page_access'], array('options' => fusion_get_groups(), 'width' => '100%'));
     closeside();
     echo "</div></div>\n";
     echo form_hidden('page_id', '', $data['page_id']);
     echo form_button('save', $locale['430'], $locale['430'], array('class' => 'btn-primary m-r-10'));
     if (isset($_POST['edit'])) {
         echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
     }
//.........这里部分代码省略.........
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:101,代码来源:CustomPage.php


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