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


PHP add_to_head函数代码示例

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


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

示例1: infuse_theme

 public function infuse_theme()
 {
     if (!empty($this->theme_data)) {
         add_to_head("<link href='" . THEMES . $this->theme_data['theme_file'] . "' rel='stylesheet' media='screen' />\n");
     } else {
         add_to_head("<link href='" . INCLUDES . "bootstrap/bootstrap.css' rel='stylesheet' media='screen' />\n");
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:8,代码来源:Atom.php

示例2: load_tablesorter

function load_tablesorter($id)
{
    // implementation: use in table();
    // to add: sortlist:[[0,0],[1,0]]
    add_to_head("<script type='text/javascript' src='" . DYNAMICS . "assets/tablesorter/jquery.tablesorter.min.js'></script>");
    add_to_jquery("\n        \$('#" . $id . "').tablesorter();\n        ");
    add_to_head("\n        <style>\n        /* tables */\n        table.tablesorter {}\n        table.tablesorter thead tr th, table.tablesorter tfoot tr th {}\n        table.tablesorter thead tr .header {\n        background-image: url(" . DYNAMICS . "assets/tablesorter/bg.gif);\n        background-repeat: no-repeat;\n        background-position: center right;\n        cursor: pointer;\n        }\n        table.tablesorter tbody td {}\n        table.tablesorter tbody tr.odd td {}\n        table.tablesorter thead tr .headerSortUp { background-image: url(" . DYNAMICS . "assets/tablesorter/asc.gif);    }\n        table.tablesorter thead tr .headerSortDown {\tbackground-image: url(" . DYNAMICS . "assets/tablesorter/desc.gif);    }\n        table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {    }\n        </style>\n        ");
    return "tablesorter";
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:9,代码来源:dynamics.inc.php

示例3: form_datepicker

function form_datepicker($title, $input_name, $input_id, $input_value, $array = FALSE)
{
    if (!defined('DATEPICKER')) {
        define('DATEPICKER', TRUE);
        add_to_head("<link href='" . DYNAMICS . "assets/datepicker/css/datepicker3.css' rel='stylesheet' />");
        add_to_head("<script src='" . DYNAMICS . "assets/datepicker/js/bootstrap-datepicker.js'></script>");
    }
    $title2 = isset($title) && !empty($title) ? stripinput($title) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
    $input_id = isset($input_id) && !empty($input_id) ? stripinput($input_id) : "";
    if ($input_value && strstr($input_value, "-")) {
        // then this is date.
        $input_value = $input_value;
    } else {
        $input_value = $input_value ? date("d-m-Y", $input_value) : '';
    }
    if (!is_array($array)) {
        $placeholder = "";
        $date_format = "dd-mm-yyyy";
        $width = "250px";
        $required = 0;
        $safemode = 0;
        $deactivate = 0;
        $icon = '';
        $inline = 0;
        $error_text = '';
        $class = '';
    } else {
        $icon = array_key_exists('icon', $array) ? $array['icon'] : "";
        $placeholder = array_key_exists("placeholder", $array) ? $array['placeholder'] : "";
        $width = array_key_exists("width", $array) ? $array['width'] : "250px";
        $date_format = array_key_exists("date_format", $array) ? $array['date_format'] : "dd-mm-yyyy";
        $class = array_key_exists('class', $array) ? $array['class'] : "";
        $error_text = array_key_exists("error_text", $array) ? $array['error_text'] : "";
        $required = array_key_exists('required', $array) && $array['required'] == 1 ? 1 : 0;
        $safemode = array_key_exists('safemode', $array) && $array['safemode'] == 1 ? 1 : 0;
        $deactivate = array_key_exists('deactivate', $array) && $array['deactivate'] == 1 ? 1 : 0;
        $inline = array_key_exists("inline", $array) ? 1 : 0;
    }
    $html = "<div id='{$input_id}-field' class='form-group m-b-0 {$class} " . ($icon ? 'has-feedback' : '') . "'>\n";
    $html .= $title ? "<label class='control-label " . ($inline ? "col-sm-3 col-md-3 col-lg-3" : '') . "' for='{$input_id}'>{$title} " . ($required == 1 ? "<span class='required'>*</span>" : '') . "</label>\n" : '';
    $html .= $inline ? "<div class='col-sm-9 col-md-9 col-lg-9'>\n" : "";
    $html .= "<div class='input-group date' " . ($width ? "style='width:{$width};'" : '') . ">\n";
    $html .= "<input type='text' name='" . $input_name . "' id='" . $input_id . "' value='" . $input_value . "' class='form-control textbox' placeholder='{$placeholder}' />\n";
    $html .= $icon ? "<div class='form-control-feedback'><i class='glyphicon {$icon}'></i></div>\n" : '';
    $html .= "<span class='input-group-addon'><i class='entypo calendar'></i></span>\n";
    $html .= "</div>\n";
    $html .= "<div id='{$input_id}-help' style='display:inline-block !important;'></div>";
    $html .= $inline ? "</div>\n" : "";
    $html .= "</div>\n";
    // Generate Defender Strings
    $html .= "<input type='hidden' name='def[{$input_name}]' value='[type=date],[title={$title2}],[id={$input_id}],[required={$required}],[safemode={$safemode}]" . ($error_text ? ",[error_text={$error_text}]" : '') . "' readonly />";
    if ($deactivate !== 1) {
        add_to_jquery("\n        \$('#{$input_id}-field .input-group.date').datepicker({\n        format: '" . $date_format . "',\n        todayBtn: 'linked',\n        autoclose: true,\n        todayHighlight: true\n        });\n        ");
    }
    return $html;
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:57,代码来源:form_datepicker.php

示例4: load_bootstrap

function load_bootstrap()
{
    define('bootstrapped', TRUE);
    require_once INCLUDES . "output_handling_include.php";
    add_to_head("<meta http-equiv='X-UA-Compatible' content='IE=edge' />");
    add_to_head("<meta name='viewport' content='width=device-width, initial-scale=1.0' />");
    add_to_head("<script type='text/javascript' src='" . INCLUDES . "bootstrap/bootstrap.min.js'></script>");
    add_to_head("<script type='text/javascript' src='" . INCLUDES . "bootstrap/holder.js'></script>");
    add_to_head("<link href='" . INCLUDES . "bootstrap/bootstrap.min.css' rel='stylesheet' media='screen' />");
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:10,代码来源:theme_functions_include.php

示例5: display_forum_postform

 function display_forum_postform($info)
 {
     $locale = fusion_get_locale();
     add_to_head("<link rel='stylesheet' type='text/css' href='" . INFUSIONS . "forum/templates/css/forum.css'>");
     echo render_breadcrumbs();
     opentable($info['title']);
     // New template
     echo "<!--pre_form-->\n";
     echo "<h4 class='m-b-20'>" . $info['description'] . "</h4>\n";
     echo $info['openform'];
     echo $info['forum_field'];
     echo $info['subject_field'];
     echo $info['tags_field'];
     echo $info['message_field'];
     echo $info['edit_reason_field'];
     echo $info['forum_id_field'];
     echo $info['thread_id_field'];
     echo $info['poll_form'];
     $tab_title['title'][0] = $locale['forum_0602'];
     $tab_title['id'][0] = 'postopts';
     $tab_title['icon'][0] = '';
     $tab_active = tab_active($tab_title, 0);
     $tab_content = opentabbody($tab_title['title'][0], 'postopts', $tab_active);
     // first one is guaranteed to be available
     $tab_content .= "<div class='well m-t-20'>\n";
     $tab_content .= $info['delete_field'];
     $tab_content .= $info['sticky_field'];
     $tab_content .= $info['notify_field'];
     $tab_content .= $info['lock_field'];
     $tab_content .= $info['hide_edit_field'];
     $tab_content .= $info['smileys_field'];
     $tab_content .= $info['signature_field'];
     $tab_content .= "</div>\n";
     $tab_content .= closetabbody();
     if (!empty($info['attachment_field'])) {
         $tab_title['title'][1] = $locale['forum_0557'];
         $tab_title['id'][1] = 'attach_tab';
         $tab_title['icon'][1] = '';
         $tab_content .= opentabbody($tab_title['title'][1], 'attach_tab', $tab_active);
         $tab_content .= "<div class='well m-t-20'>\n" . $info['attachment_field'] . "</div>\n";
         $tab_content .= closetabbody();
     }
     echo opentab($tab_title, $tab_active, 'newthreadopts');
     echo $tab_content;
     echo closetab();
     echo $info['post_buttons'];
     echo $info['closeform'];
     echo "<!--end_form-->\n";
     closetable();
     if (!empty($info['last_posts_reply'])) {
         echo "<div class='well m-t-20'>\n";
         echo $info['last_posts_reply'];
         echo "</div>\n";
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:55,代码来源:forum_input.php

示例6: form_fileinput

function form_fileinput($title = false, $input_name, $input_id, $upload_path, $input_value = false, $array = false)
{
    $title = isset($title) && !empty($title) ? stripinput($title) : "";
    $title2 = isset($title) && !empty($title) ? stripinput($title) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
    // ok, start
    if (!defined('form_fileinput')) {
        add_to_head("<link href='" . DYNAMICS . "assets/fileinput/css/fileinput.min.css' media='all' rel='stylesheet' type='text/css' />");
        add_to_footer("<script src='" . DYNAMICS . "assets/fileinput/js/fileinput.min.js' type='text/javascript'></script>");
        define('form_fileinput', true);
    }
    // 4 choices to sub-array
    // a. icon, b. button, c.dropdown list d.dropdown with modal
    if (!is_array($array)) {
        $array = array();
        $required = 0;
        $safemode = 1;
        $deactivate = "";
        $width = "";
        $label = 'Browse ...';
        $class = 'btn btn-primary btn-sm';
        $helper_text = '';
        $inline = '';
        $url = '';
        $type = 'image';
        $max_size = '';
    } else {
        $deactivate = array_key_exists('deactivate', $array) ? $array['deactivate'] : "";
        $label = array_key_exists('label', $array) ? $array['label'] : 'Browse ...';
        $class = array_key_exists('class', $array) ? $array['class'] : 'btn-primary';
        $required = array_key_exists('required', $array) && $array['required'] == 1 ? '1' : '0';
        $safemode = array_key_exists('safemode', $array) && $array['safemode'] == 1 ? '1' : '0';
        $width = array_key_exists('width', $array) ? $array['width'] : "";
        $helper_text = array_key_exists("helper", $array) ? $array['helper'] : "";
        $inline = array_key_exists('rowstart', $array) ? 1 : 0;
        $url = array_key_exists('url', $array) ? $array['url'] : '';
        // for ajax uplaod file path
        $type = array_key_exists('image', $array) && $array['image'] == 1 ? 'image' : 'files';
        // image only or all mimes.
        $max_size = array_key_exists('max_size', $array) && $array['max_size'] ? $array['max_size'] : '3145728';
        // defaults to 3mb
    }
    $html = '';
    $html .= "<div id='{$input_id}-field' class='form-group m-b-0'>\n";
    $html .= "<label class='control-label " . ($inline ? "col-sm-3 col-md-3 col-lg-3" : '') . "' for='{$input_id}'>{$title} " . ($required == 1 ? "<span class='required'>*</span>" : '') . "</label>\n";
    $html .= $inline ? "<div class='col-sm-9 col-md-9 col-lg-9'>\n" : "";
    $html .= "<input type='file' name='{$input_name}' id='{$input_id}' class='input-sm file-preview-image' >\n";
    $html .= "<input type='hidden' name='def[{$input_name}]' value='[type={$type}],[title={$title2}],[id={$input_id}],[required={$required}],[safemode={$safemode}],[path={$upload_path}],[maxsize={$max_size}]' readonly>";
    $html .= "<div id='{$input_id}-help'></div>";
    $html .= $inline ? "</div>\n" : "";
    $html .= "</div>\n";
    add_to_jquery("\n        \$('#" . $input_id . "').fileinput({\n        previewFileType: 'any',\n        browseClass: 'btn btn-sm {$class}',\n        uploadClass: 'btn btn-default btn-sm',\n        captionClass : 'input-sm',\n        removeClass : 'btn btn-sm btn-default',\n        browseLabel: '{$label}',\n        browseIcon: '<i class=\"entypo cloud  m-r-10\"></i>',\n        " . ($url ? "uploadUrl : '{$url}'," : '') . "\n        " . ($url ? '' : 'showUpload: false') . "\n        });\n    ");
    return $html;
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:54,代码来源:form_fileinput.php

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

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

示例9: form_colorpicker

function form_colorpicker($input_name, $label = '', $input_value = '', array $options = array())
{
    global $defender, $locale;
    if (!defined("COLORPICKER")) {
        define("COLORPICKER", TRUE);
        add_to_head("<link href='" . DYNAMICS . "assets/colorpick/css/bootstrap-colorpicker.css' rel='stylesheet' media='screen' />");
        add_to_head("<script src='" . DYNAMICS . "assets/colorpick/js/bootstrap-colorpicker.js'></script>");
    }
    $title = $label ? stripinput($label) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = stripinput($input_name);
    $input_value = stripinput($input_value);
    $default_options = array('input_id' => $input_name, 'required' => FALSE, 'placeholder' => '', 'deactivate' => FALSE, 'width' => '250px', 'class' => '', 'inline' => FALSE, 'error_text' => $locale['error_input_default'], 'safemode' => FALSE, 'icon' => "", "tip" => "", 'format' => 'hex');
    $options += $default_options;
    if (!$options['width']) {
        $options['width'] = $default_options['width'];
    }
    $input_id = $options['input_id'] ?: $default_options['input_id'];
    $error_class = "";
    if ($defender->inputHasError($input_name)) {
        $error_class = "has-error ";
        if (!empty($options['error_text'])) {
            $new_error_text = $defender->getErrorText($input_name);
            if (!empty($new_error_text)) {
                $options['error_text'] = $new_error_text;
            }
            addNotice("danger", "<strong>{$title}</strong> - " . $options['error_text']);
        }
    }
    $html = "<div id='{$input_id}-field' class='form-group clearfix m-b-10 " . $error_class . $options['class'] . " '>\n";
    $html .= $label ? "<label class='control-label " . ($options['inline'] ? "col-xs-12 col-sm-3 col-md-3 col-lg-3" : '') . "' for='{$input_id}'>{$label} " . ($options['required'] ? "<span class='required'>*</span>" : '') . "\n\t" . ($options['tip'] ? "<i class='pointer fa fa-question-circle' title='" . $options['tip'] . "'></i>" : '') . "\n\t</label>\n" : '';
    $html .= $options['inline'] ? "<div class='col-xs-12 col-sm-9 col-md-9 col-lg-9'>\n" : "<br/>\n";
    $html .= "<div id='{$input_id}' style='width: " . $options['width'] . "' class='input-group colorpicker-component bscp colorpicker-element m-b-10' data-color='{$input_value}' data-color-format='" . $options['format'] . "'>";
    $html .= "<input type='text' name='{$input_name}' class='form-control " . $options['class'] . "' id='" . $input_id . "' value='{$input_value}' data-color-format='" . $options['format'] . "' placeholder='" . $options['placeholder'] . "' " . ($options['deactivate'] ? "readonly" : "") . ">";
    $html .= "<span id='{$input_id}-cp' class='input-group-addon'>";
    $html .= "<i style='background: rgba(255,255,255,1);'></i>";
    $html .= "</span></div>";
    $html .= $options['inline'] ? "</div>\n" : "";
    $html .= "</div>\n";
    $defender->add_field_session(array('input_name' => $input_name, 'type' => 'color', 'title' => $title, 'id' => $input_id, 'required' => $options['required'], 'safemode' => $options['safemode'], 'error_text' => $options['error_text']));
    add_to_jquery("\$('#{$input_id}').colorpicker({ format : '" . $options['format'] . "'  });");
    return $html;
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:42,代码来源:form_colorpicker.php

示例10: __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

示例11: showcomments

function showcomments($ctype, $cdb, $ccol, $cid, $clink = "")
{
    global $settings, $userdata, $locale;
    include LOCALE . LOCALESET . "comments.php";
    require_once INCLUDES . "bbcode_include.php";
    add_to_head("<script type='text/javascript' src='" . INCLUDES . "comments_include/comments.js'></script>");
    add_to_head("<script type='text/javascript'>\n            var ctype = '" . $ctype . "';\n            if (ctype == 'MG') {\n                var cid = window.cidas;\n            } else {\n                var cid = '" . $cid . "';\n            }\n            var basedir = '" . BASEDIR . "';\n\t\t\tvar locale_noc = '" . $locale['c101'] . "';\n\t\t\tvar locale_edit = '" . $locale['c108'] . "';\n\t\t\tvar locale_del = '" . $locale['c109'] . "';\n    </script>");
    echo "<br /><br />";
    opentable($locale['c100']);
    echo "<div id='comments_load' style='display:none;text-align:center;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;' /></div><div id='comments'></div>";
    closetable();
    echo "<br /><br />";
    opentable($locale['c102']);
    if (iMEMBER) {
        echo "<div align='center'>";
        echo "<a id='edit_comment' name='edit_comment'></a>";
        echo "<form name='comment_form' method='post' action='#'>";
        echo "<input type='hidden' name='comment_name' value='" . $userdata['user_id'] . "' />";
        echo "<input type='hidden' name='cid' value='" . $cid . "' />";
        echo "<input type='hidden' name='ctype' value='" . $ctype . "' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'></textarea><br />";
        echo "<div align='center'>" . display_bbcodes("360px", "comment_message", "comment_form") . "</div>";
        echo "<input type='submit' name='post_comment' value='" . $locale['c102'] . "' class='button' /> ";
        echo "<input type='submit' name='edit_comment' value='" . $locale['c103'] . "' class='button' /> ";
        echo "</form>";
        echo "<div id='comment_load' style='display:none;text-align:center;height:140px;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;margin-top:50px;' /></div>";
        echo "<br />";
        echo "</div>";
    } else {
        echo "<div style='text-align:center'>" . $locale['c105'] . "</div><br />";
    }
    closetable();
    echo "<div style='text-align:center;width:100%;'>AL jQ comments <a href='http://fusion.annetlab.tk'>Fusion @ AnnetLab</a> &copy; 2011-2012</div>";
}
开发者ID:SymbolixDEV,项目名称:AL-PHP-Fusion-Addons,代码行数:36,代码来源:comments_include.php

示例12: set_ThreadJs

 private function set_ThreadJs()
 {
     $viewthread_js = '';
     //javascript to footer
     $highlight_js = "";
     $colorbox_js = "";
     $edit_reason_js = '';
     /** javascript **/
     // highlight jQuery plugin
     if (isset($_GET['highlight'])) {
         $words = explode(" ", urldecode($_GET['highlight']));
         $higlight = "";
         $i = 1;
         $c_words = count($words);
         foreach ($words as $hlight) {
             $hlight = htmlentities($hlight, ENT_QUOTES);
             $higlight .= "'" . $hlight . "'";
             $higlight .= $i < $c_words ? "," : "";
             $i++;
         }
         add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/jquery.highlight.js'></script>");
         $highlight_js .= "\$('.search_result').highlight([" . $higlight . "],{wordsOnly:true});";
         $highlight_js .= "\$('.highlight').css({backgroundColor:'#FFFF88'});";
         //better via theme or settings
     }
     $edit_reason_js .= "\n\t\t\t\$('.reason_div').hide();\n\t\t\t\$('div').find('.reason_button').css({cursor: 'pointer' });\n\t\t\t\$('.reason_button').bind('click', function(e) {\n\t\t\t\tvar target = \$(this).data('target');\n\t\t\t\t\$('#'+target).stop().slideToggle('fast');\n\t\t\t});\n\t\t\t";
     // viewthread javascript, moved to footer
     if (!empty($highlight_js) || !empty($colorbox_js) || !empty($edit_reason_js)) {
         $viewthread_js .= $highlight_js . $colorbox_js . $edit_reason_js;
     }
     $viewthread_js .= "\$('a[href=#top]').click(function(){";
     $viewthread_js .= "\$('html, body').animate({scrollTop:0}, 'slow');";
     $viewthread_js .= "return false;";
     $viewthread_js .= "});";
     $viewthread_js .= "});";
     // below functions could be made more unobtrusive thanks to jQuery, giving a more accessible cms
     $viewthread_js .= "function jumpforum(forum_id){";
     $viewthread_js .= "document.location.href='" . INFUSIONS . "forum/viewforum.php?forum_id='+forum_id;";
     $viewthread_js .= "}";
     if (iMOD) {
         // only moderators need this javascript
         $viewthread_js .= "function setChecked(frmName,chkName,val){";
         $viewthread_js .= "dml=document.forms[frmName];";
         $viewthread_js .= "len=dml.elements.length;";
         $viewthread_js .= "for(i=0;i<len;i++){";
         $viewthread_js .= "if(dml.elements[i].name==chkName){";
         $viewthread_js .= "dml.elements[i].checked=val;";
         $viewthread_js .= "}";
         $viewthread_js .= "}";
         $viewthread_js .= "}";
     }
     //$viewthread_js .= "/*]]>*/";
     //$viewthread_js .= "</script>";
     add_to_jquery($viewthread_js);
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:55,代码来源:Viewthread.php

示例13: author

| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
require_once THEMES . "templates/header.php";
define("EDOC", INFUSIONS . "edocs/");
define("EDOC_IMGS", EDOC . "imgs/");
define("EDOC_INC", EDOC . "inc/");
define("EDOC_LOC", EDOC . "locale/");
require EDOC_INC . "functions.php";
add_to_head("\r\n<script type='text/javascript' src='" . STATIC_DOMAIN . "js/scroll.js'></script>\r\n");
include LOCALE . LOCALESET . "admin/main.php";
if (file_exists(EDOC_LOC . "/" . $settings['locale'] . "/index.php")) {
    include EDOC_LOC . "/" . $settings['locale'] . "/header.php";
    include EDOC_LOC . "/" . $settings['locale'] . "/content_admin.php";
    include EDOC_LOC . "/" . $settings['locale'] . "/user_admin.php";
    include EDOC_LOC . "/" . $settings['locale'] . "/system_admin.php";
    include EDOC_LOC . "/" . $settings['locale'] . "/settings_admin.php";
} else {
    include EDOC_LOC . "English/header.php";
    include EDOC_LOC . "English/content_admin.php";
    include EDOC_LOC . "English/user_admin.php";
    include EDOC_LOC . "English/system_admin.php";
    include EDOC_LOC . "English/settings_admin.php";
}
$author = " Philip Daly | Johan Wilson";
开发者ID:xXxthebeastxXx,项目名称:addondb,代码行数:31,代码来源:getting_started.php

示例14: add_to_title

     } else {
         if ($data['photo_thumb2']) {
             $photo_thumb = "photo.php?photo_id=" . $_GET['photo_id'];
         }
         $photo_file = "photo.php?photo_id=" . $_GET['photo_id'] . "&amp;full";
     }
     $photo_size = @getimagesize(PHOTODIR . $data['photo_filename']);
 } else {
     $photo_thumb = $data['photo_thumb2'] ? PHOTODIR . $data['photo_thumb2'] : "";
     $photo_file = PHOTODIR . $data['photo_filename'];
     $photo_size = @getimagesize($photo_file);
 }
 add_to_title($locale['global_201'] . $data['photo_title']);
 add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
 add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
 add_to_head("<script type='text/javascript'>\n\n\t\t\t/* <![CDATA[ */\n\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('a.photogallery_photo_link').colorbox({\n\t\t\t\t\t\twidth:'80%', height:'80%', photo:true\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t/* ]]>*/\n\n\t\t</script>\n");
 echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='tbl2'>\n";
 echo "<a href='" . FUSION_SELF . "'>" . $locale['400'] . "</a> &gt;\n";
 echo "<a href='" . FUSION_SELF . "?album_id=" . $data['album_id'] . "'>" . $data['album_title'] . "</a>\n";
 echo ($data['photo_title'] ? " &gt; <strong>" . $data['photo_title'] . "</strong>" : "") . "\n</td>\n";
 if (isset($prev['photo_id']) && isnum($prev['photo_id']) || isset($next['photo_id']) && isnum($next['photo_id'])) {
     if (isset($prev) && isset($first)) {
         echo "<td width='1%' class='tbl2'><a href='" . FUSION_SELF . "?photo_id=" . $first['photo_id'] . "' title='" . $locale['459'] . "'>" . get_image("go_first", $locale['459'], "border:none;", "", "") . "</a></td>\n";
     }
     if (isset($prev)) {
         echo "<td width='1%' class='tbl2'><a href='" . FUSION_SELF . "?photo_id=" . $prev['photo_id'] . "' title='" . $locale['451'] . "'>" . get_image("go_previous", $locale['451'], "border:none;", "", "") . "</a></td>\n";
     }
     if (isset($next)) {
         echo "<td width='1%' class='tbl2'><a href='" . FUSION_SELF . "?photo_id=" . $next['photo_id'] . "' title='" . $locale['452'] . "'>" . get_image("go_next", $locale['452'], "border:none;", "", "") . "</a></td>\n";
     }
     if (isset($next) && isset($last)) {
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:photogallery.php

示例15: author

| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
if (!checkrights("P") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) {
    redirect("../index.php");
}
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/panels.php";
add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/jquery-ui.js'></script>");
add_to_head("<link rel='stylesheet' href='" . THEMES . "templates/panels.css' type='text/css' media='all' />");
add_to_head("<script type='text/javascript'>\n\$(document).ready(function() {\n\t\$('.pdisabled').fadeTo(0, .5);\n\t\$('.panels-list').sortable({\n\t\thandle : '.handle',\n\t\tplaceholder: 'state-highlight',\n\t\tconnectWith: '.connected',\n\t\tscroll: true,\n\t\taxis: 'y',\n\t\tupdate: function () {\n\t\t\tvar ul = \$(this),\n\t\t\t\torder = ul.sortable('serialize'),\n\t\t\t\ti = 0;\n\t\t\t\$('#info').load('panels_updater.php" . $aidlink . "&'+order);\n\t\t\tul.find('.num').each(function(i) {\n\t\t\t\t\$(this).text(i+1);\n\t\t\t});\n\t\t\tul.find('li').removeClass('tbl2').removeClass('tbl1');\n\t\t\tul.find('li:odd').addClass('tbl2');\n\t\t\tul.find('li:even').addClass('tbl1');\n\t\t\twindow.setTimeout('closeDiv();',2500);\n\t\t},\n\t\treceive: function () {\n\t\t\tvar ul = \$(this),\n\t\t\t\torder = ul.sortable('serialize'),\n\t\t\t\tpdata = ul.attr('data-side');\n\t\t\t\tif (pdata == 1) { var psidetext = '" . $locale['420'] . "'; }\n\t\t\t\tif (pdata == 2) { var psidetext = '" . $locale['421'] . "'; }\n\t\t\t\tif (pdata == 3) { var psidetext = '" . $locale['425'] . "'; }\n\t\t\t\tif (pdata == 4) { var psidetext = '" . $locale['422'] . "'; }\n\t\t\tul.find('.pside').each(function() {\n\t\t\t\t\$(this).text(psidetext);\n\t\t\t});\n\t\t\t\$('#info').load('panels_updater.php" . $aidlink . "&panel_side='+pdata+'&'+order);\n\t\t}\n\t});\n});\n</script>");
if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['panel_id']) && isnum($_GET['panel_id']))) {
    $data = dbarray(dbquery("SELECT panel_side, panel_order FROM " . DB_PANELS . " WHERE panel_id='" . $_GET['panel_id'] . "'"));
    $result = dbquery("DELETE FROM " . DB_PANELS . " WHERE panel_id='" . $_GET['panel_id'] . "'");
    $result = dbquery("UPDATE " . DB_PANELS . " SET panel_order=panel_order-1 WHERE panel_side='" . $data['panel_side'] . "' AND panel_order>='" . $data['panel_order'] . "'");
    redirect(FUSION_SELF . $aidlink);
}
if (isset($_GET['action']) && $_GET['action'] == "setstatus" && (isset($_GET['panel_id']) && isnum($_GET['panel_id']))) {
    $result = dbquery("UPDATE " . DB_PANELS . " SET panel_status='" . intval($_GET['status']) . "' WHERE panel_id='" . $_GET['panel_id'] . "'");
}
opentable($locale['400']);
echo "<div id='info'></div>\n";
$side = array("1" => $locale['420'], "2" => $locale['421'], "3" => $locale['425'], "4" => $locale['422']);
$panels = array("1" => array(), "2" => array(), "3" => array(), "4" => array());
$result = dbquery("SELECT panel_id, panel_name, panel_side, panel_order, panel_type, panel_access, panel_status\n\tFROM " . DB_PANELS . "\n\tORDER BY panel_side,panel_order");
while ($data = dbarray($result)) {
开发者ID:necrophcodr,项目名称:Muks,代码行数:31,代码来源:panels.php


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