• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_extensions函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: message

if (!$download) {
    message($lang_common['No permission']);
}
if (($attachment['extension'] == 'jpg' || $attachment['extension'] == 'jpeg' || $attachment['extension'] == 'gif' || $attachment['extension'] == 'png') && !isset($_GET['download'])) {
    ($hook = get_extensions('attachment_image_view')) ? eval($hook) : null;
    $page_title = array($panther_config['o_board_title'], $lang_attach['Image view'], $attachment['filename']);
    define('PANTHER_ALLOW_INDEX', 1);
    define('PANTHER_ACTIVE_PAGE', 'index');
    require PANTHER_ROOT . 'header.php';
    $tpl = load_template('attachment.tpl');
    echo $tpl->render(array('lang_attach' => $lang_attach, 'lang_common' => $lang_common, 'name' => $attachment['filename'], 'download_link' => panther_link($panther_url['attachment_download'], array($id))));
    require PANTHER_ROOT . 'footer.php';
}
$data = array(':id' => $id);
$db->run('UPDATE ' . $db->prefix . 'attachments SET downloads=downloads+1 WHERE id=:id', $data);
($hook = get_extensions('attachment_before_output')) ? eval($hook) : null;
$db->end_transaction();
$fp = fopen($panther_config['o_attachments_dir'] . $attachment['location'], "rb");
if (!$fp) {
    message($lang_common['Bad request']);
}
$attachment['filename'] = rawurlencode($attachment['filename']);
// send some headers
header('Content-Disposition: attachment; filename=' . $attachment['filename']);
if (strlen($attachment['mime']) > 0) {
    header('Content-Type: ' . $attachment['mime']);
} else {
    header('Content-type: application/octet-stream');
}
header('Pragma: no-cache');
header('Expires: 0');
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:attachment.php


示例2: get_extensions

$start_from = $panther_user['disp_posts'] * ($p - 1);
($hook = get_extensions('online_before_header')) ? eval($hook) : null;
$page_title = array($panther_config['o_board_title'], $lang_online['viewing online']);
define('PANTHER_ACTIVE_PAGE', 'online');
require PANTHER_ROOT . 'header.php';
$bots = $online = array();
$ps = $db->run('SELECT o.user_id, o.ident, o.currently, o.logged, u.group_id FROM ' . $db->prefix . 'online AS o INNER JOIN ' . $db->prefix . 'users AS u ON o.user_id=u.id WHERE o.idle=0');
foreach ($ps as $panther_user_online) {
    if (strpos($panther_user_online['ident'], '[Bot]') !== false) {
        $name = explode('[Bot]', $panther_user_online['ident']);
        if (empty($bots[$name[1]])) {
            $bots[$name[1]] = 1;
        } else {
            ++$bots[$name[1]];
        }
        foreach ($bots as $online_name => $online_id) {
            $ident = $online_name . ' [Bot]';
        }
    } else {
        if ($panther_user_online['user_id'] == 1) {
            $ident = $lang_common['Guest'];
        } else {
            $ident = $panther_user_online['ident'];
        }
    }
    $online[] = array('username' => colourize_group($ident, $panther_user_online['group_id'], $panther_user_online['user_id']), 'location' => generate_user_location($panther_user_online['currently']), 'last_active' => format_time_difference($panther_user_online['logged'], $lang_online));
}
$tpl = load_template('online.tpl');
echo $tpl->render(array('pagination' => paginate($num_pages, $p, $panther_url['online']), 'lang_online' => $lang_online, 'lang_common' => $lang_common, 'users_online' => $online, 'num_pages' => $num_pages));
($hook = get_extensions('online_after_display')) ? eval($hook) : null;
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:online.php


示例3: extensions

    /**
     * Fix teh extensions
     */
    function extensions()
    {
        global $db;
        foreach ($this->db_cleaner->data->extensions as $group => $data) {
            $group_id = 0;
            $existing_extensions = get_extensions($group, $group_id);
            $extensions = array_unique(array_merge($data, $existing_extensions));
            sort($extensions);
            foreach ($extensions as $extension) {
                if (!in_array($extension, $data) && in_array($extension, $existing_extensions)) {
                    // Delete
                    $db->sql_query('DELETE FROM ' . EXTENSIONS_TABLE . '
						WHERE group_id = ' . (int) $group_id . "\n\t\t\t\t\t\t\tAND extension = '" . $db->sql_escape($extension) . '\'');
                } else {
                    if (in_array($extension, $data) && !in_array($extension, $existing_extensions)) {
                        $insert = array('group_id' => $group_id, 'extension' => $extension);
                        $db->sql_query('INSERT INTO ' . EXTENSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $insert));
                    }
                }
            }
        }
    }
开发者ID:napus,项目名称:support-toolkit,代码行数:25,代码来源:database_cleaner_controller.php


示例4: check_forum_login_cookie

if ($cur_poll['password'] != '') {
    check_forum_login_cookie($cur_poll['id'], $cur_poll['password']);
}
$mods_array = $cur_poll['moderators'] != '' ? unserialize($cur_poll['moderators']) : array();
$is_admmod = $panther_user['is_admin'] || ($panther_user['g_moderator'] == '1' && $panther_user['g_global_moderator'] || array_key_exists($panther_user['username'], $mods_array)) ? true : false;
// Make sure we have permission to vote
if (($cur_poll['post_replies'] == '' && $panther_user['g_post_replies'] == '0' || $cur_poll['post_replies'] == '0' || $panther_user['is_guest'] || $cur_poll['closed'] == '1') && !$is_admmod || $cur_poll['archived'] == '1') {
    message($lang_common['No permission'], false, '403 Forbidden');
}
require PANTHER_ROOT . 'lang/' . $panther_user['language'] . '/poll.php';
if (isset($_POST['form_sent'])) {
    confirm_referrer('viewtopic.php');
    $options = $cur_poll['options'] != '' ? unserialize($cur_poll['options']) : array();
    $voters = $cur_poll['voters'] != '' ? unserialize($cur_poll['voters']) : array();
    $votes = $cur_poll['votes'] != '' ? unserialize($cur_poll['votes']) : array();
    ($hook = get_extensions('poll_vote_before_validation')) ? eval($hook) : null;
    if (in_array($panther_user['id'], $voters)) {
        message($lang_poll['Already voted']);
    }
    if ($cur_poll['type'] == '1') {
        $vote = isset($_POST['vote']) ? intval($_POST['vote']) : -1;
        if ($vote < 0) {
            message($lang_common['Bad request'], false, '404 Not Found');
        }
        // Increment the amount of votes for this option
        $votes[$vote] = isset($votes[$vote]) ? $votes[$vote]++ : 1;
    } else {
        $vote = isset($_POST['options']) && is_array($_POST['options']) ? array_map('intval', $_POST['options']) : array();
        if (empty($vote)) {
            message($lang_common['Bad request'], false, '404 Not Found');
        }
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:poll_vote.php


示例5: array

    $can_upload = true;
} else {
    $can_delete = ($is_admmod || $panther_user['g_delete_posts'] == '1') && ($cur_post['delete_files'] == '1' || $cur_post['delete_files'] == '') ? true : false;
    $can_upload = $panther_user['g_attach_files'] == '1' && ($cur_post['upload'] == '1' || $cur_post['upload'] == '') ? true : false;
}
$max_size = 1;
$attachments = array();
if ($can_delete || $can_upload) {
    $max_size = $panther_user['g_max_size'] == '0' && $panther_user['g_attach_files'] == '1' ? $panther_config['o_max_upload_size'] : $panther_user['g_max_size'];
    $data = array(':id' => $id);
    $ps = $db->select('attachments', 'id, owner, filename, extension, size, downloads', $data, 'post_id=:id');
    foreach ($ps as $attachment) {
        $attachments[] = array('id' => $attachment['id'], 'icon' => attach_icon($attachment['extension']), 'link' => panther_link($panther_url['attachment'], array($attachment['id'])), 'name' => $attachment['filename'], 'size' => sprintf($lang_post['Attachment size'], file_size($attachment['size'])), 'downloads' => sprintf($lang_post['Attachment downloads'], forum_number_format($attachment['downloads'])));
    }
}
($hook = get_extensions('edit_before_header')) ? eval($hook) : null;
$page_title = array($panther_config['o_board_title'], $lang_post['Edit post']);
$required_fields = array('req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']);
$focus_element = array('edit', 'req_message');
define('PANTHER_ACTIVE_PAGE', 'index');
require PANTHER_ROOT . 'header.php';
$checkboxes = array();
if ($can_edit_subject && $is_admmod) {
    $checkboxes[] = array('name' => 'stick_topic', 'title' => $lang_common['Stick topic'], 'checked' => isset($_POST['form_sent']) && isset($_POST['stick_topic']) || !isset($_POST['form_sent']) && $cur_post['sticky'] == '1' ? true : false);
}
if ($can_edit_subject && $cur_post['post_polls'] != '0' && $panther_user['g_post_polls'] == '1' && $panther_config['o_polls'] == '1') {
    $checkboxes[] = array('name' => 'add_poll', 'title' => $lang_post['Add poll'], 'checked' => isset($_POST['add_poll']) ? true : false);
}
if ($panther_config['o_smilies'] == '1') {
    $checkboxes[] = array('name' => 'hide_smilies', 'title' => $lang_post['Hide smilies'], 'checked' => isset($_POST['form_sent']) && isset($_POST['hide_smilies']) || !isset($_POST['form_sent']) && $cur_post['hide_smilies'] == '1' ? true : false);
}
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:edit.php


示例6: str_replace

// Fix the request URI (both IIS6 & IIS7 break it)
if (!isset($_SERVER['REQUEST_URI']) || isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['REQUEST_URI'], '?') === false) {
    // Workaround for a bug in IIS7
    if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
        $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
    } else {
        if ($panther_config['o_url_type'] == 'default.php') {
            $requested_page = str_replace(array('%26', '%3D', '%2F', '%3F'), array('&', '=', '/', '?'), rawurlencode($_SERVER['PHP_SELF']));
            $_SERVER['REQUEST_URI'] = $requested_page . (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
        } else {
            // Nothing can be done
            message($lang_common['Request URI error']);
        }
    }
}
($hook = get_extensions('rewrite_before_rewrite')) ? eval($hook) : null;
// If query string is not set properly, create one and set $_GET manually
if ((!isset($_SERVER['QUERY_STRING']) || empty($_SERVER['QUERY_STRING'])) && strpos($_SERVER['REQUEST_URI'], '?') !== false) {
    $_SERVER['QUERY_STRING'] = parse_url('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
    $_SERVER['QUERY_STRING'] = isset($_SERVER['QUERY_STRING']['query']) ? $_SERVER['QUERY_STRING']['query'] : '';
    parse_str($_SERVER['QUERY_STRING'], $_GET);
}
// We determine the path to the script, since we need to separate the path from the data to be rewritten
$path_to_script = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
if (substr($path_to_script, -1) != '/') {
    $path_to_script = $path_to_script . '/';
}
// We create our own request URI with the path removed and only the parts to rewrite included
$request_uri = substr(urldecode($_SERVER['REQUEST_URI']), strlen($path_to_script) - 8);
if (strpos($request_uri, '?') !== false) {
    $request_uri = substr($request_uri, 0, strpos($request_uri, '?'));
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:rewrite.php


示例7: db_json_sync

 // Initialize the admin components
 //-----------------------------------------------------------------
 if (is_admin()) {
     include_once 'core/admin-object.php';
     db_json_sync();
     check_theme_ID();
     prepare_translate_files();
 }
 load_data_types();
 load_framework_libraries();
 //-----------------------------------------------------------------
 // Extensions
 //-----------------------------------------------------------------
 // Get available extensions
 //................................................................
 $extensions = get_extensions();
 // Set filters on get option and update option for extensions
 //................................................................
 foreach ($extensions as $extension_name => $extension_path) {
     $key = $shortname . $extension_name;
     add_filter('pre_option_' . $key, 'theme_option_filter', 10, 1);
     add_action('update_option', 'theme_option_dual_save_filter', 10, 3);
 }
 // Set filters on get option and update option for all forms, which build with FormsBuilder
 //................................................................
 $forms = new FormsBuilder();
 if (!empty($forms->options_pages)) {
     foreach ($forms->options_pages as $key => $value) {
         $key = $shortname . $key;
         add_filter('pre_option_' . $key, 'theme_option_filter', 10, 1);
         add_action('update_option', 'theme_option_dual_save_filter', 10, 3);
开发者ID:ArnaudGuillou,项目名称:SiteESBVolley,代码行数:31,代码来源:load.php


示例8: array_search

                     $abuse['negative'][$rep['poster_id']] = '1';
                 }
             }
         }
         $positive = !empty($abuse['positive']) ? array_search(max(array_values($abuse['positive'])), $abuse['positive']) : '0';
         $negative = !empty($abuse['negative']) ? array_search(max(array_values($abuse['negative'])), $abuse['negative']) : '0';
         $rep_abuse = $positive < $negative ? array('user' => $negative, 'votes' => $abuse['negative'][$negative], 'type' => 'negative') : array('user' => $positive, 'votes' => $abuse['positive'][$positive], 'type' => 'positive');
         if ($rep_abuse['votes'] >= $panther_config['o_rep_abuse'] && $panther_config['o_mailing_list'] != '') {
             require PANTHER_ROOT . 'include/email.php';
             $info = array('message' => array('<abuser>' => $panther_user['username'], '<amount>' => $panther_config['o_rep_abuse'], '<type>' => $rep_abuse['type'], '<user>' => $cur_forum['poster'], '<profile_url>' => panther_link($panther_url['profile_rep_received'], array($rep_abuse['user']))));
             $mail_tpl = $mailer->parse(PANTHER_ROOT . 'lang/' . $panther_user['language'] . '/mail_templates/rep_abuse.tpl', $info);
             $mailer->send($panther_config['o_mailing_list'], $mail_tpl['subject'], $mail_tpl['message']);
         }
     }
 }
 ($hook = get_extensions('reputation_after_rep_abuse')) ? eval($hook) : null;
 // Has the user issue issued the opposite vote? If so, remove it first ...
 $opposite_rep = false;
 $data = array(':uid' => $panther_user['id'], ':id' => $id);
 $ps = $db->select('reputation', 1, $data, 'given_by=:uid AND post_id=:id');
 if ($ps->rowCount()) {
     $opposite_rep = true;
     $vote_add = $vote == '-1' ? '-1' : '+1';
     $data = array(':uid' => $panther_user['id'], ':id' => $id);
     $db->delete('reputation', 'given_by=:uid AND post_id=:id', $data);
     $data = array(':id' => $id);
     $db->run('UPDATE ' . $db->prefix . 'posts SET reputation=reputation' . $vote_add . ' WHERE id=:id', $data);
     $data = array(':id' => $cur_forum['poster_id']);
     $db->run('UPDATE ' . $db->prefix . 'users SET reputation=reputation' . $vote_add . ' WHERE id=:id', $data);
 }
 $insert = array('post_id' => $id, 'given_by' => $panther_user['id'], 'vote' => $vote == '-1' ? '-1' : '1', 'time_given' => time());
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:reputation.php


示例9: array

                if ($panther_config['o_feed_type'] == '2') {
                    $feed = array('type' => 'atom', 'link' => panther_link($panther_url['forum_atom'], array($id)), 'lang' => $lang_common['Atom forum feed']);
                }
            }
            break;
        case 'viewtopic':
            if ($panther_config['o_feed_type'] == '1') {
                $feed = array('type' => 'rss', 'link' => panther_link($panther_url['topic_rss'], array($id)), 'lang' => $lang_common['RSS topic feed']);
            } else {
                if ($panther_config['o_feed_type'] == '2') {
                    $feed = array('type' => 'atom', 'link' => panther_link($panther_url['topic_atom'], array($id)), 'lang' => $lang_common['Atom topic feed']);
                }
            }
            break;
    }
    ($hook = get_extensions('footer_feedsr')) ? eval($hook) : null;
}
// Display debug info (if enabled/defined)
if ($panther_config['o_debug_mode'] == '1') {
    // Calculate script generation time
    $time_diff = sprintf('%.3f', microtime(true) - $panther_start);
    $debug_info = sprintf($lang_common['Querytime'], $time_diff, $db->get_num_queries());
    if (function_exists('memory_get_usage')) {
        $debug_info .= ' - ' . sprintf($lang_common['Memory usage'], file_size(memory_get_usage()));
        if (function_exists('memory_get_peak_usage')) {
            $debug_info .= ' ' . sprintf($lang_common['Peak usage'], file_size(memory_get_peak_usage()));
        }
    }
} else {
    $debug_info = '';
}
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:footer.php


示例10: array

            $type = 'positive';
            break;
        case $cur_announcement['reputation'] < '0':
            $type = 'negative';
            break;
        default:
            $type = 'zero';
            break;
    }
    $cur_announcement['reputation'] = array('type' => $type, 'title' => sprintf($lang_topic['reputation'], forum_number_format($cur_announcement['reputation'])));
}
if ($cur_announcement['g_image'] != '') {
    $image_dir = $panther_config['o_image_group_dir'] != '' ? $panther_config['o_image_group_dir'] : get_base_url() . '/' . $panther_config['o_image_group_path'] . '/';
    $img_size = @getimagesize($panther_config['o_image_group_path'] . '/' . $cur_announcement['group_id'] . '.' . $cur_announcement['g_image']);
    $group_image = array('src' => $image_dir . $cur_announcement['group_id'] . '.' . $cur_announcement['g_image'], 'size' => $img_size[3], 'alt' => $cur_announcement['g_user_title']);
} else {
    $group_image = array();
}
$announcement_type = $afid != '0' ? 'announcement_fid' : 'announcement';
($hook = get_extensions('announcement_before_header')) ? eval($hook) : null;
$page_title = array($panther_config['o_board_title'], $cur_announcement['forum_name'], $cur_announcement['subject']);
define('PANTHER_ACTIVE_PAGE', 'index');
require PANTHER_ROOT . 'header.php';
$render = array('index_link' => panther_link($panther_url['index']), 'lang_common' => $lang_common, 'forum_link' => panther_link($panther_url['forum'], array($cur_announcement['fid'], url_friendly($cur_announcement['forum_name']))), 'announce_link' => panther_link($panther_url[$announcement_type], array($id, $cur_announcement['fid'], url_friendly($cur_announcement['subject']))), 'cur_announcement' => $cur_announcement, 'username' => colourize_group($cur_announcement['username'], $cur_announcement['group_id'], $cur_announcement['user_id']), 'user_title' => get_title($cur_announcement), 'user_avatar' => $user_avatar, 'message' => $parser->parse_message($cur_announcement['message'], 0), 'panther_config' => $panther_config, 'post_actions' => $post_actions, 'user_info' => $user_info, 'user_contacts' => $user_contacts, 'group_image' => $group_image);
if ($cur_announcement['parent']) {
    $render['parent_link'] = panther_link($panther_url['forum'], array($cur_announcement['parent_forum'], url_friendly($cur_announcement['parent'])));
}
$tpl = load_template('announcement.tpl');
echo $tpl->render($render);
($hook = get_extensions('announcement_after_display')) ? eval($hook) : null;
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:announcement.php


示例11: load_template

            require PANTHER_ROOT . 'header.php';
            $tpl = load_template('forgot_password.tpl');
            echo $tpl->render(array('lang_login' => $lang_login, 'form_url' => panther_link($panther_url['request_password']), 'csrf_token' => generate_csrf_token(), 'lang_common' => $lang_common, 'errors' => $errors));
            require PANTHER_ROOT . 'footer.php';
        }
    }
}
if (!$panther_user['is_guest']) {
    header('Location: ' . panther_link($panther_url['index']));
    exit;
}
// Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login)
if (!empty($_SERVER['HTTP_REFERER'])) {
    $redirect_url = validate_redirect($_SERVER['HTTP_REFERER'], null);
}
if (!isset($redirect_url)) {
    $redirect_url = panther_link($panther_url['index']);
} else {
    if (preg_match('%viewtopic\\.php\\?pid=(\\d+)$%', $redirect_url, $matches)) {
        $redirect_url .= '#p' . $matches[1];
    }
}
$page_title = array($panther_config['o_board_title'], $lang_common['Login']);
$required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']);
$focus_element = array('login', 'req_username');
($hook = get_extensions('login_before_header')) ? eval($hook) : null;
define('PANTHER_ACTIVE_PAGE', 'login');
require PANTHER_ROOT . 'header.php';
$tpl = load_template('login.tpl');
echo $tpl->render(array('lang_login' => $lang_login, 'lang_common' => $lang_common, 'form_action' => panther_link($panther_url['login_in']), 'redirect_url' => $redirect_url, 'register' => panther_link($panther_url['register']), 'request_password' => panther_link($panther_url['request_password']), 'errors' => $errors));
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:login.php


示例12: extensions

 /**
  * Validate the extensions
  */
 function extensions()
 {
     global $user;
     $user->add_lang('acp/attachments');
     // Build the output
     $last_extension_group = '';
     foreach ($this->db_cleaner->data->extensions as $group => $data) {
         $group_ids = array();
         $existing_extensions = get_extensions($group, $group_ids);
         $extensions = array_unique(array_merge($data, $existing_extensions));
         sort($extensions);
         foreach ($extensions as $extension) {
             if (!in_array($extension, $data) && in_array($extension, $existing_extensions) || in_array($extension, $data) && !in_array($extension, $existing_extensions)) {
                 // Output the table block if it's not been done yet
                 if ($last_extension_group != $group) {
                     $last_extension_group = $group;
                     $this->_section_data[$group] = array('NAME' => user_lang($group), 'TITLE' => 'COLUMNS');
                 }
                 // Add the data
                 $this->_section_data[$group]['ITEMS'][] = array('NAME' => $extension, 'FIELD_NAME' => $group . '_' . $extension, 'MISSING' => !in_array($extension, $existing_extensions) ? true : false);
                 if ($this->_has_changes === false) {
                     $this->_has_changes = true;
                 }
             }
         }
     }
     $this->success_message = 'EXTENSION_GROUPS_SUCCESS';
 }
开发者ID:melvingb,项目名称:phpbb3.1-STK,代码行数:31,代码来源:database_cleaner_views.php


示例13: die

<?php

END_MODULE != 'admin' && die('Access Denied');
load_modules_config();
$view_data['modules'] = $end_module;
$action = $_GET['action'];
$module = $_GET['module'];
$extension = $_GET['extension'];
if ($module) {
    get_extensions('end_' . $module);
    $view_data['page_name'] = $end_module[$module]['name'];
} else {
    get_extensions();
    $view_data['page_name'] = lang('all_extension');
}
if ($action == 'edit') {
    if ($_GET['delete']) {
        if ($ext = $end_extension[$_GET['delete']]) {
            if (end_rmdir(END_ROOT . $ext['path'])) {
                end_exit(lang('delete_success'), 'admin.php?p=extension&action=edit', 1);
            } else {
                end_exit(lang('delete_failed'), 'admin.php?p=extension&action=edit', 3);
            }
        }
    }
} else {
    if ($action == 'running') {
        if ($hid = intval($_GET['pause'])) {
            if (model('hook')->update($hid, array('status' => 'pause'))) {
                $view_data['info'] = lang('Success');
            } else {
开发者ID:WSKINGS,项目名称:chat_tickets,代码行数:31,代码来源:extension.php


示例14: define

 * License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
 */
if (!defined('PANTHER')) {
    define('PANTHER_ROOT', __DIR__ . '/');
    require PANTHER_ROOT . 'include/common.php';
}
if ($panther_user['g_read_board'] == '0') {
    message($lang_common['No view'], false, '403 Forbidden');
}
// Load the help.php language file
require PANTHER_ROOT . 'lang/' . $panther_user['language'] . '/help.php';
$page_title = array($panther_config['o_board_title'], $lang_help['Help']);
define('PANTHER_ACTIVE_PAGE', 'help');
require PANTHER_ROOT . 'header.php';
// Display the smiley set
require PANTHER_ROOT . 'include/parser.php';
$smiley_groups = array();
foreach ($parser->smilies as $smiley_text => $smiley_img) {
    $smiley_groups[$smiley_img][] = $smiley_text;
}
($hook = get_extensions('help_before_display')) ? eval($hook) : null;
$ps = $db->select('topics', 'subject, id', array(), '', 'id ASC LIMIT 1');
$cur_topic = $ps->fetch();
$ps = $db->select('posts', 'id', array(), '', 'id ASC LIMIT 1');
$cur_post = $ps->fetchColumn();
$ps = $db->select('users', 'id, username, group_id', array(), 'id>1', 'id ASC LIMIT 1');
$user = $ps->fetch();
$forum = $panther_forums[key($panther_forums)];
$tpl = load_template('help.tpl');
echo $tpl->render(array('lang_help' => $lang_help, 'panther_config' => $panther_config, 'lang_common' => $lang_common, 'base_url' => panther_link($panther_url['index']), 'help_page' => panther_link($panther_url['help'], array('url')), 'topic_link' => panther_link($panther_url['topic'], array($cur_topic['id'], url_friendly($cur_topic['subject']))), 'topic_id' => $cur_topic['id'], 'post_id' => $cur_post, 'post_link' => panther_link($panther_url['post'], array($cur_post)), 'forum_id' => $forum['id'], 'forum_link' => panther_link($panther_url['forum'], array($forum['id'], url_friendly($forum['forum_name']))), 'formatted_username' => colourize_group($user['username'], $user['group_id'], $user['id']), 'username' => $user['username'], 'smiley_path' => $panther_config['o_smilies_dir'] != '' ? $panther_config['o_smilies_dir'] : get_base_url() . '/' . $panther_config['o_smilies_path'] . '/', 'smiley_groups' => $smiley_groups));
$db->end_transaction();
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:help.php


示例15: load_template

                    require PANTHER_ROOT . 'header.php';
                    $tpl = load_template('recent_warnings.tpl');
                    echo $tpl->render(array('lang_warnings' => $lang_warnings, 'lang_common' => $lang_common, 'warnings' => $warnings, 'num_pages' => $num_pages, 'pagination' => paginate($num_pages, $p, $panther_url['warnings_recent'])));
                } else {
                    $ps = $db->select('warning_types', 'id, title, description, points, expiration_time', array(), '', 'points, id');
                    $ps1 = $db->select('warning_levels', 'id, points, period', array(), '', 'points, id');
                    // If neither have been configured
                    if (!$ps->rowCount() && !$ps1->rowCount()) {
                        message($lang_common['Bad request']);
                    }
                    $warning_types = array();
                    foreach ($ps as $cur_type) {
                        $warning_types[] = array('title' => $cur_type['title'], 'description' => $cur_type['description'], 'points' => $cur_type['points']);
                    }
                    $warning_levels = array();
                    foreach ($ps1 as $cur_level) {
                        $ban_title = $cur_level['period'] == '0' ? $lang_warnings['Permanent ban'] : format_expiration_time($cur_level['period']);
                        $warning_levels[] = array('title' => $ban_title, 'points' => $cur_level['points']);
                    }
                    ($hook = get_extensions('view_warnings_before_header')) ? eval($hook) : null;
                    define('PANTHER_ACTIVE_PAGE', 'index');
                    require PANTHER_ROOT . 'header.php';
                    $tpl = load_template('warnings.tpl');
                    echo $tpl->render(array('lang_warnings' => $lang_warnings, 'warning_levels' => $warning_levels, 'warning_types' => $warning_types));
                }
            }
        }
    }
}
$footer_style = 'warnings';
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:warnings.php


示例16: get_extensions

                        }
                        ($hook = get_extensions('pms_delete_folder_before_deletion')) ? eval($hook) : null;
                        $update = array('folder_id' => 2);
                        $update_data = array(':id' => $id);
                        $db->update('pms_data', $update, 'folder_id=:id', $update_data);
                        $db->delete('folders', 'id=:id AND user_id=:uid', $data);
                        redirect(panther_link($panther_url['pms_folders']), $lang_pm['Folder del redirect']);
                    }
                }
            }
            $data = array(':uid' => $panther_user['id']);
            $folders = array();
            $ps = $db->select('folders', 'name, id', $data, 'user_id=:uid');
            foreach ($ps as $cur_folder) {
                $folders[] = array('id' => $cur_folder['id'], 'name' => $cur_folder['name']);
            }
            $required_fields = array('req_folder' => $lang_pm['Folder']);
            $focus_element = array('folder', 'req_folder');
            ($hook = get_extensions('pms_message_folders_before_header')) ? eval($hook) : null;
            $page_title = array($panther_config['o_board_title'], $lang_common['PM'], $lang_pm['My folders 2']);
            define('PANTHER_ALLOW_INDEX', 1);
            define('PANTHER_ACTIVE_PAGE', 'pm');
            require PANTHER_ROOT . 'header.php';
            $tpl = load_template('message_folders.tpl');
            echo $tpl->render(array('errors' => $errors, 'lang_pm' => $lang_pm, 'lang_common' => $lang_common, 'pm_menu' => generate_pm_menu('folders'), 'form_action' => panther_link($panther_url['pms_folders']), 'folder' => isset($folder) ? $folder : '', 'folders' => $folders));
            require PANTHER_ROOT . 'footer.php';
        } else {
            message($lang_common['Bad request']);
        }
    }
}
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:pms_misc.php


示例17: SQL

}
// get the extensions which have a default page template defined
// active template
$sql = "select page_ttyyp_id from keel where on_default = '1'";
$result = new SQL($sql);
$active_template_id = $result->fetchsingle();
// extensions with page templates
$extensions = array();
if ($site->fdat['extension']) {
    $where = $site->db->prepare('and templ_tyyp.extension = ?', $site->fdat['extension']);
}
$sql = "select * from templ_tyyp where on_page_templ = '1' and is_default = 1 {$where}";
$result = new SQL($sql);
while ($template = $result->fetch('ASSOC')) {
    if ($template['extension']) {
        $extension = get_extensions('DB', false, $template['extension']);
        $extension = $extension[$template['extension']];
        // for sorting
        $extension_titles[$extension['extension_id']] = $extension['title'];
        // preview
        if ($template['preview']) {
            if (strpos($template['preview'], 'http') !== 0) {
                // relative, add site url
                $template['preview'] = $site->CONF['wwwroot'] . '/' . $extension['path'] . $template['preview'];
            }
        } else {
            $template['preview'] = $site->CONF['wwwroot'] . $site->CONF['styles_path'] . '/gfx/general/no_preview.gif';
        }
        // preview thumb
        if ($template['preview_thumb']) {
            if (strpos($template['preview_thumb'], 'http') !== 0) {
开发者ID:ragulka,项目名称:Saurus-CMS-Community-Edition,代码行数:31,代码来源:designs.php


示例18: array

                                    }
                                    $categories = $forums = array();
                                    $render['can_delete'] = $admins[$panther_user['id']]['admin_users'] == '1' ? true : false;
                                    if ($user['g_moderator'] == '1' || $user['g_id'] == PANTHER_ADMIN) {
                                        $render['user_is_moderator'] = true;
                                        $ps = $db->run('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.moderators FROM ' . $db->prefix . 'categories AS c INNER JOIN ' . $db->prefix . 'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position');
                                        foreach ($ps as $cur_forum) {
                                            if (!isset($categories[$cur_forum['cid']])) {
                                                $categories[$cur_forum['cid']] = array('name' => $cur_forum['cat_name'], 'cid' => $cur_forum['cid']);
                                            }
                                            $moderators = $cur_forum['moderators'] != '' ? unserialize($cur_forum['moderators']) : array();
                                            $forums[] = array('id' => $cur_forum['fid'], 'name' => $cur_forum['forum_name'], 'category_id' => $cur_forum['cid'], 'checked' => in_array($id, $moderators) ? true : false);
                                        }
                                        $render['categories'] = $categories;
                                        $render['forums'] = $forums;
                                    }
                                }
                                $tpl = load_template('profile_admin.tpl');
                                echo $tpl->render($render);
                                ($hook = get_extensions('profile_admin_after_form')) ? eval($hook) : null;
                            } else {
                                message($lang_common['Bad request'], false, '404 Not Found');
                            }
                        }
                    }
                }
            }
        }
    }
    require PANTHER_ROOT . 'footer.php';
}
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:profile.php


示例19: ON

    $ps = $db->run('SELECT p.poster, p.message, p.hide_smilies, p.posted, u.group_id FROM ' . $db->prefix . 'posts AS p LEFT JOIN ' . $db->prefix . 'users AS u ON (p.poster=u.username) WHERE p.topic_id=:id ORDER BY p.id DESC LIMIT ' . $panther_config['o_topic_review'], $data);
    foreach ($ps as $cur_post) {
        $posts[] = array('username' => colourize_group($cur_post['poster'], $cur_post['group_id']), 'posted' => format_time($cur_post['posted']), 'message' => $parser->parse_message($cur_post['message'], $cur_post['hide_smilies']));
    }
}
$render = array('lang_common' => $lang_common, 'lang_post' => $lang_post, 'posts' => $posts, 'errors' => $errors, 'index_link' => panther_link($panther_url['index']), 'forum_link' => panther_link($panther_url['forum'], array($cur_posting['id'], url_friendly($cur_posting['forum_name']))), 'cur_posting' => $cur_posting, 'POST' => $_POST, 'action' => $action, 'fid' => $fid, 'tid' => $tid, 'csrf_token' => generate_csrf_token(), 'panther_config' => $panther_config, 'message' => isset($_POST['req_message']) ? $orig_message : (isset($quote) ? $quote : ''), 'panther_user' => $panther_user, 'can_upload' => $can_upload, 'checkboxes' => $checkboxes, 'quickpost_links' => array('bbcode' => panther_link($panther_url['help'], array('bbcode')), 'url' => panther_link($panther_url['help'], array('url')), 'img' => panther_link($panther_url['help'], array('img')), 'smilies' => panther_link($panther_url['help'], array('smilies'))));
if (isset($cur_posting['subject'])) {
    $render['topic_link'] = panther_link($panther_url['topic'], array($tid, url_friendly($cur_posting['subject'])));
}
if (isset($_POST['preview'])) {
    require_once PANTHER_ROOT . 'include/parser.php';
    $render['preview'] = $parser->parse_message($message, $hide_smilies);
}
if ($panther_user['is_guest']) {
    $email_form_name = $panther_config['p_force_guest_email'] == '1' ? 'req_email' : 'email';
    $render['username'] = isset($username) ? $username : '';
    $render['email'] = isset($_POST[$email_form_name]) ? $email : '';
    $render['email_form_name'] = $email_form_name;
}
if ($can_upload) {
    $render['max_size'] = $max_size;
}
if (!empty($panther_robots) && $panther_user['g_robot_test'] == '1') {
    $id = array_rand($panther_robots);
    $render['robot_id'] = $id;
    $render['test'] = $panther_robots[$id];
}
($hook = get_extensions('post_before_submit')) ? eval($hook) : null;
$tpl = load_template('post.tpl');
echo $tpl->render($render);
require PANTHER_ROOT . 'footer.php';
开发者ID:mtechnik,项目名称:pantherforum,代码行数:31,代码来源:post.php


示例20: edit_objekt


//.........这里部分代码省略.........

					$editor->Value = str_replace('value="'.$matches[1].'|||', 'value="'.$mail.'|||', $editor->Value);
				}
			}
		}
		// /form allowed mails check/insert
	}

	$editor->Height = '100%';
	$editor->Width = '100%';
	$editor->ToolbarSet = '';

	$editor->BasePath = (empty($_SERVER['HTTPS']) ? 'http://': 'https://').$site->CONF['hostname'].$site->CONF['wwwroot'].$site->CONF['js_path'].'/fckeditor/';

	// create config array
	$Config['CustomConfigurationsPath'] = $editor->BasePath.'scms_config.js';
	$Config['SkinPath'] = $editor->BasePath.'editor/skins/scms/';
	$Config['ToolbarCanCollapse'] = false;

	$Config['SCMSFormName'] = $site->CONF['feedba 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_extra_user_fields函数代码示例发布时间:2022-05-15
下一篇:
PHP get_extension_goods函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap