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


PHP get_page_title函数代码示例

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


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

示例1: action_done

 /**
  * Standard actualisation stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action_done()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0') {
         return new ocp_tempcode();
     }
     $topic_id = post_param_integer('select_topic_id', -1);
     if ($topic_id == -1) {
         $_topic_id = post_param('manual_topic_id');
         $topic_id = intval($_topic_id);
     }
     $title = get_page_title('TOPIC_PINNING');
     // Check points
     $cost = intval(get_option($class));
     $points_left = available_points(get_member());
     if ($points_left < $cost && !has_specific_permission(get_member(), 'give_points_self')) {
         return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
     }
     // Actuate
     $GLOBALS['FORUM_DRIVER']->pin_topic($topic_id);
     require_code('points2');
     charge_member(get_member(), $cost, do_lang('TOPIC_PINNING'));
     $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'TOPIC_PINNING', 'details' => strval($topic_id), 'details2' => ''));
     // Show message
     $url = build_url(array('page' => '_SELF', 'type' => 'misc'), '_SELF');
     return redirect_screen($title, $url, do_lang_tempcode('ORDER_GENERAL_DONE'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:topic_pin.php

示例2: booking_do_next

/**
 * Get a do-next manager for bookings.
 *
 * @return tempcode	Booking do-next manager.
 */
function booking_do_next()
{
    require_lang('calendar');
    require_code('templates_donext');
    require_code('fields');
    return do_next_manager(get_page_title('BOOKINGS'), comcode_lang_string('DOC_BOOKING'), array(has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('bookable', array('_SELF', array('type' => 'ad'), '_SELF'), do_lang('ADD_BOOKABLE')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('bookable', array('_SELF', array('type' => 'ed'), '_SELF'), do_lang('EDIT_BOOKABLE')) : NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('supplement', array('_SELF', array('type' => 'av'), '_SELF'), do_lang('ADD_BOOKABLE_SUPPLEMENT')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('supplement', array('_SELF', array('type' => 'ev'), '_SELF'), do_lang('EDIT_BOOKABLE_SUPPLEMENT')) : NULL, has_specific_permission(get_member(), 'submit_cat_highrange_content', 'cms_booking') ? array('blacked', array('_SELF', array('type' => 'ac'), '_SELF'), do_lang('ADD_BOOKABLE_BLACKED')) : NULL, has_specific_permission(get_member(), 'edit_cat_highrange_content', 'cms_booking') ? array('blacked', array('_SELF', array('type' => 'ec'), '_SELF'), do_lang('EDIT_BOOKABLE_BLACKED')) : NULL, has_specific_permission(get_member(), 'submit_highrange_content', 'cms_booking') ? array('booking', array('_SELF', array('type' => 'ab'), '_SELF'), do_lang('ADD_BOOKING')) : NULL, has_specific_permission(get_member(), 'edit_highrange_content', 'cms_booking') ? array('booking', array('_SELF', array('type' => 'eb'), '_SELF'), do_lang('EDIT_BOOKING')) : NULL, has_actual_page_access(get_member(), 'calendar') ? array('calendar', array('calendar', array('type' => 'misc', 'view' => 'month'), '_SEARCH'), do_lang('CALENDAR')) : NULL), do_lang('BOOKINGS'));
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:12,代码来源:booking2.php

示例3: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_javascript('javascript_realtime_rain');
     require_javascript('javascript_ajax');
     require_javascript('javascript_more');
     require_lang('realtime_rain');
     require_css('realtime_rain');
     $title = get_page_title('REALTIME_RAIN');
     if (!has_js()) {
         // Send them to the page permissions screen
         $url = build_url(array('page' => 'admin_stats', 'type' => 'misc'), '_SELF');
         require_code('site2');
         assign_refresh($url, 5.0);
         return do_template('REDIRECT_SCREEN', array('URL' => $url, 'TITLE' => $title, 'TEXT' => do_lang_tempcode('NO_JS_REALTIME')));
     }
     $GLOBALS['TEMPCODE_SETGET']['chrome_frame'] = make_string_tempcode('1');
     if (browser_matches('ie6')) {
         attach_message(do_lang_tempcode('IE_OLD_PLEASE_UPGRADE'), 'warn');
     }
     if (!has_js()) {
         // Send them to the stats screen
         $url = build_url(array('page' => 'admin_stats', 'type' => 'misc'), '_SELF');
         require_code('site2');
         assign_refresh($url, 5.0);
         return do_template('REDIRECT_SCREEN', array('URL' => $url, 'TITLE' => $title, 'TEXT' => do_lang_tempcode('NO_JS_ADVANCED_SCREEN_REALTIME_RAIN')));
     }
     $min_time = $GLOBALS['SITE_DB']->query_value('stats', 'MIN(date_and_time)');
     if (is_null($min_time)) {
         $min_time = time();
     }
     return do_template('REALTIME_RAIN_OVERLAY', array('MIN_TIME' => strval($min_time)));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:37,代码来源:admin_realtime_rain.php

示例4: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_lang('leader_board');
     require_code('points');
     require_css('points');
     $title = get_page_title('POINT_LEADERBOARD');
     $start_date = intval(get_option('leaderboard_start_date'));
     $weeks = $GLOBALS['SITE_DB']->query('SELECT DISTINCT date_and_time FROM ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'leader_board WHERE date_and_time>=' . strval($start_date) . ' ORDER BY date_and_time DESC');
     if (count($weeks) == 0) {
         warn_exit(do_lang_tempcode('NO_ENTRIES'));
     }
     $first_week = $weeks[count($weeks) - 1]['date_and_time'];
     $weeks = collapse_1d_complexity('date_and_time', $weeks);
     $out = new ocp_tempcode();
     foreach ($weeks as $week) {
         $rows = collapse_2d_complexity('lb_member', 'lb_points', $GLOBALS['SITE_DB']->query_select('leader_board', array('lb_member', 'lb_points'), array('date_and_time' => $week)));
         $week_tpl = new ocp_tempcode();
         foreach ($rows as $member => $points) {
             $points_url = build_url(array('page' => 'points', 'type' => 'member', 'id' => $member), get_module_zone('points'));
             $profile_url = $GLOBALS['FORUM_DRIVER']->member_profile_url($member, false, true);
             $name = $GLOBALS['FORUM_DRIVER']->get_username($member);
             if (is_null($name)) {
                 $name = do_lang('UNKNOWN');
             }
             $week_tpl->attach(do_template('POINTS_LEADERBOARD_ROW', array('_GUID' => '6d323b4b5abea0e82a14cb4745c4af4f', 'POINTS_URL' => $points_url, 'PROFILE_URL' => $profile_url, 'POINTS' => integer_format($points), 'NAME' => $name, 'ID' => strval($member))));
         }
         $nice_week = intval(($week - $first_week) / (7 * 24 * 60 * 60) + 1);
         $out->attach(do_template('POINTS_LEADERBOARD_WEEK', array('_GUID' => '3a0f71bf20f9098e5711e85cf25f6549', 'WEEK' => integer_format($nice_week), 'ROWS' => $week_tpl)));
     }
     return do_template('POINTS_LEADERBOARD_SCREEN', array('_GUID' => 'bab5f7b661435b83800532d3eebd0d54', 'TITLE' => $title, 'WEEKS' => $out));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:36,代码来源:leader_board.php

示例5: ajax_tree

 /**
  * Get details for an ajax-tree-list of entries for the content covered by this search hook.
  *
  * @return array			A pair: the hook, and the options
  */
 function ajax_tree()
 {
     $catalogue_name = get_param('catalogue_name', '');
     if ($catalogue_name == '') {
         @ob_end_clean();
         $tree = nice_get_catalogues(NULL, true);
         if ($tree->is_empty()) {
             inform_exit(do_lang_tempcode('NO_ENTRIES'));
         }
         require_code('form_templates');
         $fields = form_input_list(do_lang_tempcode('NAME'), '', 'catalogue_name', $tree, NULL, true);
         if (running_script('iframe')) {
             $post_url = get_self_url_easy();
         } else {
             $post_url = get_self_url(false, false, NULL, false, true);
         }
         $submit_name = do_lang_tempcode('PROCEED');
         $hidden = build_keep_post_fields();
         $title = get_page_title('SEARCH');
         $tpl = do_template('FORM_SCREEN', array('_GUID' => 'a2812ac8056903811f444682d45ee448', 'TARGET' => '_self', 'GET' => true, 'SKIP_VALIDATION' => true, 'HIDDEN' => $hidden, 'TITLE' => $title, 'TEXT' => '', 'URL' => $post_url, 'FIELDS' => $fields, 'SUBMIT_NAME' => $submit_name));
         $echo = globalise($tpl, NULL, '', true);
         $echo->evaluate_echo();
         exit;
     }
     return array('choose_catalogue_category', array('catalogue_name' => $catalogue_name));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:31,代码来源:catalogue_entries.php

示例6: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_lang('bulkupload');
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/bulkuploadassistant';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_adv_comcode';
     $GLOBALS['HELPER_PANEL_TEXT'] = comcode_lang_string('DOC_BULK_UPLOAD');
     $title = get_page_title('BULK_UPLOAD');
     $parameter = post_param('parameter', '');
     require_code('form_templates');
     if ($parameter == '') {
         $post_url = build_url(array('page' => '_SELF'), '_SELF');
         $text = paragraph(do_lang_tempcode('BULK_UPLOAD_HELP'));
         $submit_name = do_lang_tempcode('BULK_UPLOAD');
         $fields = form_input_line(do_lang_tempcode('DIRECTORY'), do_lang_tempcode('DIRECTORY_BULK'), 'parameter', 'uploads/attachments/' . date('Y-m-d', utctime_to_usertime()), true);
         return do_template('FORM_SCREEN', array('_GUID' => '77a2ca460745145d8a1d18cf24971fea', 'SKIP_VALIDATION' => true, 'HIDDEN' => '', 'FIELDS' => $fields, 'URL' => $post_url, 'TITLE' => $title, 'TEXT' => $text, 'SUBMIT_NAME' => $submit_name));
     } else {
         breadcrumb_set_parents(array(array('_SELF:_SELF:misc', do_lang_tempcode('BULK_UPLOAD'))));
         breadcrumb_set_self(do_lang_tempcode('_RESULTS'));
         $out = $this->do_dir(get_custom_file_base() . '/' . filter_naughty($parameter, true));
         if ($out->is_empty()) {
             inform_exit(do_lang_tempcode('NO_FILES'));
         }
         return do_template('BULK_HELPER_RESULTS_SCREEN', array('_GUID' => '5d373553cf21a58f15006bd4e600a9ee', 'TITLE' => $title, 'RESULTS' => $out));
     }
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:30,代码来源:admin_bulkupload.php

示例7: action_done

 /**
  * Standard actualisation stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action_done()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0' || get_forum_type() != 'ocf') {
         return new ocp_tempcode();
     }
     if ($GLOBALS['FORUM_DRIVER']->get_member_row_field(get_member(), 'm_highlighted_name') == 1) {
         warn_exit(do_lang_tempcode('_ALREADY_HAVE'));
     }
     $title = get_page_title('NAME_HIGHLIGHTING');
     post_param_integer('confirm');
     // To make sure we're not being passed by a GET
     // Check points
     $cost = intval(get_option($class));
     $points_left = available_points(get_member());
     if ($points_left < $cost && !has_specific_permission(get_member(), 'give_points_self')) {
         return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
     }
     // Actuate
     $GLOBALS['FORUM_DB']->query_update('f_members', array('m_highlighted_name' => 1), array('id' => get_member()), '', 1);
     require_code('points2');
     charge_member(get_member(), $cost, do_lang('NAME_HIGHLIGHTING'));
     $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'NAME_HIGHLIGHTING', 'details' => '', 'details2' => ''));
     // Show message
     $url = build_url(array('page' => '_SELF', 'type' => 'misc'), '_SELF');
     return redirect_screen($title, $url, do_lang_tempcode('ORDER_GENERAL_DONE'));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:32,代码来源:highlight_name.php

示例8: run

 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_lang('unvalidated');
     $GLOBALS['HELPER_PANEL_PIC'] = 'pagepics/unvalidated';
     $GLOBALS['HELPER_PANEL_TUTORIAL'] = 'tut_censor';
     $_title = get_page_title('UNVALIDATED_RESOURCES');
     $out = new ocp_tempcode();
     require_code('form_templates');
     $_hooks = find_all_hooks('modules', 'admin_unvalidated');
     foreach (array_keys($_hooks) as $hook) {
         require_code('hooks/modules/admin_unvalidated/' . filter_naughty_harsh($hook));
         $object = object_factory('Hook_unvalidated_' . filter_naughty_harsh($hook), true);
         if (is_null($object)) {
             continue;
         }
         $info = $object->info();
         if (is_null($info)) {
             continue;
         }
         $identifier_select = is_array($info['db_identifier']) ? implode(',', $info['db_identifier']) : $info['db_identifier'];
         $db = array_key_exists('db', $info) ? $info['db'] : $GLOBALS['SITE_DB'];
         $rows = $db->query('SELECT ' . $identifier_select . (array_key_exists('db_title', $info) ? ',' . $info['db_title'] : '') . ' FROM ' . $db->get_table_prefix() . $info['db_table'] . ' WHERE ' . $info['db_validated'] . '=0', 100);
         $content = new ocp_tempcode();
         foreach ($rows as $row) {
             if (is_array($info['db_identifier'])) {
                 $id = '';
                 foreach ($info['db_identifier'] as $_id) {
                     if ($id != '') {
                         $id .= ':';
                     }
                     $id .= $row[$_id];
                 }
             } else {
                 $id = $row[$info['db_identifier']];
             }
             if (array_key_exists('db_title', $info)) {
                 $title = $row[$info['db_title']];
                 if ($info['db_title_dereference']) {
                     $title = get_translated_text($title, $db);
                 }
                 // May actually be comcode (can't be certain), but in which case it will be shown as source
             } else {
                 $title = '#' . (is_integer($id) ? strval($id) : $id);
             }
             if ($title == '') {
                 $title = '#' . strval($id);
             }
             $content->attach(form_input_list_entry(is_integer($id) ? strval($id) : $id, false, strip_comcode($title)));
         }
         $post_url = build_url(array('page' => $info['edit_module'], 'type' => $info['edit_type'], 'validated' => 1), get_module_zone($info['edit_module']), NULL, false, true);
         $fields = form_input_list(do_lang_tempcode('EDIT'), do_lang_tempcode('DESCRIPTION_EDIT'), $info['edit_identifier'], $content);
         if (!$content->is_empty()) {
             // Could debate whether to include "'TARGET'=>'_blank',". However it does redirect back, so it's a nice linear process like this. If it was new window it could be more efficient, but also would confuse people with a lot of new windows opening and not closing.
             $content = do_template('FORM', array('_GUID' => '51dcee39273a0fee29569190344f2e41', 'GET' => true, 'HIDDEN' => '', 'SUBMIT_NAME' => do_lang_tempcode('EDIT'), 'FIELDS' => $fields, 'URL' => $post_url, 'TEXT' => ''));
         }
         $out->attach(do_template('UNVALIDATED_SECTION', array('_GUID' => '838240008e190b9cbaa0280fbddd6baf', 'TITLE' => $info['title'], 'CONTENT' => $content)));
     }
     return do_template('UNVALIDATED_SCREEN', array('_GUID' => '4e971f1c8851b821af030b5c7bbcb3fb', 'TITLE' => $_title, 'SECTIONS' => $out));
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:64,代码来源:admin_unvalidated.php

示例9: plugin_qblog_recent_convert

function plugin_qblog_recent_convert()
{
    global $vars, $script, $qblog_page_re, $qblog_close;
    //閉鎖中は何も表示しない
    if ($qblog_close && !ss_admin_check()) {
        return '';
    }
    //---- キャッシュのための処理を登録 -----
    $qt = get_qt();
    if ($qt->create_cache) {
        $args = func_get_args();
        return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
    }
    //------------------------------------
    $display_num = PLUGIN_QBLOG_RECENT_DEFAULT_NUM;
    if (func_num_args()) {
        $args = func_get_args();
        $display_num = $args[0];
    }
    $recent_file = CACHEQBLOG_DIR . 'qblog_recent.dat';
    if (file_exists($recent_file)) {
        $recent_list = explode("\n", file_get_contents($recent_file));
    } else {
        $recent_list = array();
    }
    //件数を抜く
    $size = array_shift($recent_list);
    $list = '';
    $list .= '<ul class="qblog_recent">';
    foreach ($recent_list as $i => $line) {
        if ($i >= $display_num) {
            break;
        }
        if (rtrim($line) != '') {
            $pagename = rtrim($line);
            $title = get_page_title($pagename);
            if ($pagename == $title) {
                if (preg_match($qblog_page_re, $pagename, $mts)) {
                    $blog_date = "{$mts[1]}年{$mts[2]}月{$mts[3]}日";
                    $title = " No.{$mts[4]}";
                }
            }
            //! 表示方法 要検討
            $list .= '<li><a href="' . $script . '?' . rawurldecode($pagename) . '">' . $blog_date . $title . '</a></li>';
        }
    }
    $list .= '</ul>';
    if (!is_bootstrap_skin()) {
        $include_bs = '
<link rel="stylesheet" href="skin/bootstrap/css/bootstrap-custom.min.css" />
<script type="text/javascript" src="skin/bootstrap/js/bootstrap.min.js"></script>';
        $qt->appendv_once('include_bootstrap_pub', 'beforescript', $include_bs);
    }
    //qblog.css を読み込む
    $head = '
    <link rel="stylesheet" href="plugin/qblog/qblog.css" />';
    $qt->appendv_once('qblog_beforescript', 'beforescript', $head);
    return $list;
}
开发者ID:big2men,项目名称:qhm,代码行数:59,代码来源:qblog_recent.inc.php

示例10: ocw_refresh_with_message

/**
 * Show the current user a message. Function does not return.
 *
 * @param  tempcode	The message to show
 * @param  ID_TEXT	Code of message type to show
 * @set    warn inform fatal
 */
function ocw_refresh_with_message($message, $msg_type = 'inform')
{
    $url = build_url(array('page' => 'ocworld'), '_SELF');
    @ob_end_clean();
    $title = get_page_title('MESSAGE');
    $tpl = redirect_screen($title, $url, $message, false, $msg_type);
    $echo = globalise($tpl, NULL, '', true);
    $echo->evaluate_echo();
    exit;
}
开发者ID:erico-deh,项目名称:ocPortal,代码行数:17,代码来源:ocworld.php

示例11: action_done

 /**
  * Standard actualisation stage of pointstore item purchase.
  *
  * @return tempcode		The UI
  */
 function action_done()
 {
     $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));
     if (get_option('is_on_' . $class . '_buy') == '0') {
         return new ocp_tempcode();
     }
     $amount = post_param_integer('amount', -1);
     $title = get_page_title('GAMBLING');
     // Check points
     $cost = intval(get_option('minimum_gamble_amount'));
     $points_left = available_points(get_member());
     $max = min(intval(get_option('maximum_gamble_amount')), $points_left);
     if (!has_specific_permission(get_member(), 'give_points_self') || $amount < 0) {
         if ($amount < $cost || $amount > $max) {
             warn_exit(do_lang_tempcode('INVALID_GAMBLE_AMOUNT'));
         }
         if ($points_left < $amount) {
             return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', integer_format($cost), integer_format($points_left)));
         }
     }
     // Calculate
     $average_gamble_multiplier = floatval(get_option('average_gamble_multiplier')) / 100.0;
     $maximum_gamble_multiplier = floatval(get_option('maximum_gamble_multiplier')) / 100.0;
     $above_average = mt_rand(0, 10) < 5;
     if ($above_average) {
         //			$winnings=round($average_gamble_multiplier*$amount+mt_rand(0,round($maximum_gamble_multiplier*$amount-$average_gamble_multiplier*$amount)));	  Even distribution is NOT wise
         $peak = $maximum_gamble_multiplier * $amount;
         $under = 0.0;
         $number = intval(round($average_gamble_multiplier * $amount + mt_rand(0, intval(round($maximum_gamble_multiplier * $amount - $average_gamble_multiplier * $amount)))));
         for ($x = 1; $x < intval($peak); $x++) {
             $p = $peak * (1.0 / pow(floatval($x) + 0.4, 2.0) - 1.0 / pow($maximum_gamble_multiplier * floatval($amount), 2.0));
             // Using a 1/x^2 curve. 0.4 is a bit of a magic number to get the averaging right
             $under += $p;
             if ($under > floatval($number)) {
                 break;
             }
         }
         $winnings = intval(round($average_gamble_multiplier * $amount + $x * 1.1));
         // 1.1 is a magic number to make it seem a bit fairer
     } else {
         $winnings = mt_rand(0, intval(round($average_gamble_multiplier * $amount)));
     }
     // Actuate
     require_code('points2');
     charge_member(get_member(), $amount - $winnings, do_lang('GAMBLING'));
     $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'GAMBLING', 'details' => strval($amount), 'details2' => ''));
     // Show message
     if ($winnings > $amount) {
         $result = do_lang_tempcode('GAMBLE_CONGRATULATIONS', integer_format($winnings - $amount), integer_format($amount));
     } else {
         $result = do_lang_tempcode('GAMBLE_COMMISERATIONS', integer_format($amount - $winnings), integer_format($amount));
     }
     $url = build_url(array('page' => '_SELF', 'type' => 'misc'), '_SELF');
     return redirect_screen($title, $url, $result);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:60,代码来源:gambling.php

示例12: pre_import_tests

 /**
  * Do some tests, to make sure we're happy to continue importing.
  *
  * @param  object			The DB connection to import from
  * @param  string			The table prefix the target prefix is using
  * @param  PATH			The base directory we are importing from
  * @return ?tempcode		Error/warning UI (NULL: no error/warning)
  */
 function pre_import_tests($db, $table_prefix, $file_base)
 {
     $title = get_page_title('IMPORT');
     $bad = false;
     // Check actually is ocPortal DB (ERROR)
     $test = $db->query_value('zones', 'zone_name');
     if (is_null($test)) {
         return warn_screen($title, do_lang_tempcode('ERROR_NOT_CORRECT_DATABASE'));
     }
     // Check version (WARNING)
     $test = $db->query_value_null_ok('values', 'the_value', array('the_name' => 'version'));
     if (is_null($test) || intval($test) != ocp_version()) {
         attach_message(do_lang_tempcode('ERROR_NOT_CORRECT_VERSION'), 'warn');
         $bad = true;
     }
     // Check actually is ocPortal file path (ERROR)
     if (!file_exists($file_base . '/info.php') || !file_exists($file_base . '/sources_custom')) {
         attach_message(do_lang_tempcode('ERROR_NOT_CORRECT_FILES'), 'warn');
         if (isset($GLOBALS['FORUM_DB']) && $db->connection_write != $GLOBALS['FORUM_DB']->connection_write && !file_exists($file_base . '/info.php')) {
             attach_message(do_lang_tempcode('ERROR_NOT_CORRECT_LINKING_POSSIBLY'), 'warn');
         }
         $bad = true;
     }
     // Check is on same MSN or is OCF (WARNING)
     if (file_exists($file_base . '/info.php')) {
         global $SITE_INFO;
         $backup_site_info = $SITE_INFO;
         $SITE_INFO = NULL;
         @(include $file_base . '/info.php');
         if (is_null($SITE_INFO)) {
             $SITE_INFO = $backup_site_info;
             attach_message(do_lang_tempcode('ERROR_INACESSIBLE_DIR'), 'warn');
             if (isset($GLOBALS['FORUM_DB']) && $db->connection_write != $GLOBALS['FORUM_DB']->connection_write) {
                 attach_message(do_lang_tempcode('ERROR_NOT_CORRECT_LINKING_POSSIBLY'), 'warn');
             }
             $bad = true;
         } else {
             $this_site_info = $SITE_INFO;
             $SITE_INFO = $backup_site_info;
             if (!array_key_exists('db_forums_host', $SITE_INFO)) {
                 $SITE_INFO['db_forums_host'] = 'localhost';
             }
             $same_forum = $this_site_info['db_forums'] == $SITE_INFO['db_forums'] && $this_site_info['db_forums_host'] == $SITE_INFO['db_forums_host'] && $db->table_prefix;
             if ($this_site_info['forum_type'] != 'ocf' && !$same_forum) {
                 attach_message(do_lang_tempcode('ERROR_NOT_CORRECT_LINKING'), 'warn');
                 $bad = true;
             }
         }
     }
     // Show warning
     if ($bad) {
         return do_template('CONFIRM_SCREEN', array('_GUID' => '286928b79830cdff4ac506e4f4f00f3a', 'TITLE' => $title, 'PREVIEW' => do_lang_tempcode('IMPORT_WARNINGS_GIVEN'), 'FIELDS' => build_keep_post_fields(), 'URL' => get_self_url(false, false, array('happy' => 1))));
     }
     return NULL;
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:63,代码来源:ocp_merge.php

示例13: run

 /**
  * Standard modular run function for snippet hooks. Generates XHTML to insert into a page using AJAX.
  *
  * @return tempcode  The snippet
  */
 function run()
 {
     if (get_file_base() != get_custom_file_base()) {
         warn_exit(do_lang_tempcode('SHARED_INSTALL_PROHIBIT'));
     }
     if (has_actual_page_access(get_member(), 'admin_occle')) {
         require_code('occle');
         require_lang('occle');
         $title = get_page_title('OCCLE');
         return do_template('OCCLE_MAIN', array('COMMANDS' => '', 'SUBMIT_URL' => build_url(array('page' => 'admin_occle'), 'adminzone'), 'PROMPT' => do_lang_tempcode('COMMAND_PROMPT', escape_html($GLOBALS['FORUM_DRIVER']->get_username(get_member())))));
     }
     return new ocp_tempcode();
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:18,代码来源:occle.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->ecshop_init();
     // 微信oauth处理
     if (method_exists('WechatController', 'do_oauth')) {
         call_user_func(array('WechatController', 'do_oauth'));
     }
     /* 语言包 */
     $this->assign('lang', L());
     /* 页面标题 */
     $page_info = get_page_title();
     self::$view->assign('page_title', $page_info['title']);
     /* 模板赋值 */
     assign_template();
 }
开发者ID:sayi21cn,项目名称:ecshopAndEctouch,代码行数:16,代码来源:CommonController.class.php

示例15: plugin_qblog_recent_comments_convert

function plugin_qblog_recent_comments_convert()
{
    global $script, $qblog_date_format, $qblog_close;
    //閉鎖中は何も表示しない
    if ($qblog_close && !ss_admin_check()) {
        return '';
    }
    //---- キャッシュのための処理を登録 -----
    $qt = get_qt();
    if ($qt->create_cache) {
        $args = func_get_args();
        return $qt->get_dynamic_plugin_mark(__FUNCTION__, $args);
    }
    //------------------------------------
    $args = func_get_args();
    $nodate = in_array('nodate', $args);
    $datafile = CACHEQBLOG_DIR . 'qblog_recent_comments.dat';
    $comment_page_lines = explode("\n", file_get_contents($datafile));
    $comment_pages = array();
    foreach ($comment_page_lines as $line) {
        if (trim($line) === '') {
            continue;
        }
        list($time, $pagename) = explode("\t", $line);
        if (is_page($pagename)) {
            $comment_pages[$pagename] = $time;
        }
    }
    //calc num show
    $num = func_num_args() > 0 ? min(func_get_arg(0), PLUGIN_QBLOG_RECENT_COMMENTS_DEFAULT_NUM) : PLUGIN_QBLOG_RECENT_COMMENTS_DEFAULT_NUM;
    $num = min(count($comment_pages), $num);
    $html_str = '<ul class="qblog_recent_comments">';
    $cnt = 0;
    foreach ($comment_pages as $pagename => $time) {
        if ($cnt == PLUGIN_QBLOG_RECENT_COMMENTS_DEFAULT_NUM) {
            break;
        }
        $page_title = get_page_title($pagename);
        $page_title = ($nodate ? '' : date('m.d', $time) . ' ') . $page_title;
        $html_str .= '<li><a href="' . $script . '?' . rawurlencode($pagename) . '">' . h($page_title) . '</a></li>' . "\n";
        $cnt++;
    }
    $html_str .= '</ul>';
    return $html_str;
}
开发者ID:big2men,项目名称:qhm,代码行数:45,代码来源:qblog_recent_comments.inc.php


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