本文整理汇总了PHP中get_page_title函数 的典型用法代码示例。如果您正苦于以下问题:PHP get_page_title函数的具体用法?PHP get_page_title怎么用?PHP get_page_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_page_title函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: render_profile_tabset
/**
* Render a member profile.
*
* @param MEMBER The ID of the member who is being viewed
* @param ?MEMBER The ID of the member who is doing the viewing (NULL: current member)
* @param ?ID_TEXT The username of the member who is being viewed (NULL: work out from member_id_of)
* @return tempcode The rendered profile
*/
function render_profile_tabset($member_id_of, $member_id_viewing = NULL, $username = NULL)
{
if (is_null($member_id_viewing)) {
$member_id_viewing = get_member();
}
$username = $GLOBALS['FORUM_DRIVER']->get_username($member_id_of);
if (is_null($username) || is_guest($member_id_of)) {
warn_exit(do_lang_tempcode('USER_NO_EXIST'));
}
$tabs = array();
$hooks = find_all_hooks('systems', 'profiles_tabs');
if (isset($hooks['edit'])) {
$hooks = array('edit' => $hooks['edit']) + $hooks;
}
foreach (array_keys($hooks) as $hook) {
require_code('hooks/systems/profiles_tabs/' . $hook);
$ob = object_factory('Hook_Profiles_Tabs_' . $hook);
if ($ob->is_active($member_id_of, $member_id_viewing)) {
$tabs[$hook] = $ob->render_tab($member_id_of, $member_id_viewing, !browser_matches('ie6') && !browser_matches('ie7') && has_js());
}
}
global $M_SORT_KEY;
$M_SORT_KEY = 2;
uasort($tabs, 'multi_sort');
require_javascript('javascript_profile');
require_javascript('javascript_ajax');
load_up_all_self_page_permissions($member_id_viewing);
if (addon_installed('awards')) {
require_code('awards');
$awards = find_awards_for('member', strval($member_id_of));
} else {
$awards = array();
}
$username = $GLOBALS['FORUM_DRIVER']->get_username($member_id_of);
// Get it again, in case it changed
$title = get_page_title('MEMBER_PROFILE', true, array(escape_html($username)), NULL, $awards);
$_tabs = array();
$i = 0;
foreach ($tabs as $hook => $tab) {
$_tabs[] = array('TAB_TITLE' => $tab[0], 'TAB_CODE' => $hook, 'TAB_CONTENT' => $tab[1], 'TAB_FIRST' => $i == 0, 'TAB_LAST' => !array_key_exists($i + 1, $tabs));
$i++;
}
return do_template('OCF_MEMBER_PROFILE_SCREEN', array('TITLE' => $title, 'TABS' => $_tabs, 'MEMBER_ID' => strval($member_id_of)));
}
开发者ID:erico-deh, 项目名称:ocPortal, 代码行数:52, 代码来源:ocf_profiles.php
示例17: plugin_list_array
function plugin_list_array($pages)
{
$qm = get_qm();
$symbol = ' ';
$other = 'zz';
$list = array();
$cnd = 0;
//並び替える
foreach ($pages as $file => $page) {
$pgdata = array();
$pgdata['urlencoded'] = rawurlencode($page);
$pgdata['sanitized'] = htmlspecialchars($page, ENT_QUOTES);
$pgdata['passage'] = get_pg_passage($page, FALSE);
$pgdata['mtime'] = date('Y年m月d日 H時i分s秒', filemtime(get_filename($page)));
$pgdata['title'] = get_page_title($page);
$pgdata['title'] = $pgdata['title'] == $pgdata['sanitized'] ? '' : '(' . $pgdata['title'] . ')';
$pgdata['filename'] = htmlspecialchars($file);
$head = preg_match('/^([A-Za-z])/', $page, $matches) ? $matches[1] : (preg_match('/^([ -~])/', $page, $matches) ? $symbol : $other);
$list[$head][$page] = $pgdata;
$cnt++;
}
ksort($list);
$tmparr = isset($list[$symbol]) ? $list[$symbol] : null;
unset($list[$symbol]);
$list[$symbol] = $tmparr;
$retlist = array();
foreach ($list as $head => $pages) {
if (is_null($pages)) {
continue;
}
ksort($pages);
if ($head === $symbol) {
$head = $qm->m['func']['list_symbol'];
} else {
if ($head === $other) {
$head = $qm->m['func']['list_other'];
}
}
$retlist[$head] = $pages;
}
return $retlist;
}
开发者ID:big2men, 项目名称:qhm, 代码行数:42, 代码来源:list.inc.php
示例18: add_bookmark_form
/**
* Get the form to add a bookmark / set breadcrumbs.
*
* @param mixed Where the form should go to
* @return tempcode The form
*/
function add_bookmark_form($post_url)
{
$title = get_page_title('ADD_BOOKMARK');
require_lang('zones');
require_code('character_sets');
$url = base64_decode(get_param('url', '', true));
$url = convert_to_internal_encoding($url, 'UTF-8');
// Note that this is intentionally passed in to not be a short URL
$page_link = convert_to_internal_encoding(url_to_pagelink($url, false, false), 'UTF-8');
$default_title = get_param('title', '', true);
$default_title = convert_to_internal_encoding($default_title, 'UTF-8');
$default_title = preg_replace('#\\s.\\s' . str_replace('#', '\\#', preg_quote(get_site_name())) . '$#s', '', $default_title);
$default_title = preg_replace('#^' . str_replace('#', '\\#', preg_quote(get_site_name())) . '\\s.\\s#s', '', $default_title);
$default_title_2 = @preg_replace('#\\s.\\s' . str_replace('#', '\\#', preg_quote(get_site_name())) . '$#su', '', $default_title);
$default_title_2 = @preg_replace('#^' . str_replace('#', '\\#', preg_quote(get_site_name())) . '\\s.\\s#su', '', $default_title_2);
if ($default_title_2 !== false) {
$default_title = $default_title_2;
}
if (!is_string($default_title)) {
$default_title = '';
}
require_code('form_templates');
$rows = $GLOBALS['SITE_DB']->query_select('bookmarks', array('DISTINCT b_folder'), array('b_owner' => get_member()), 'ORDER BY b_folder');
$list = new ocp_tempcode();
$list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));
$list->attach(form_input_list_entry('!', true, do_lang_tempcode('ROOT_EM')));
foreach ($rows as $row) {
if ($row['b_folder'] != '') {
$list->attach(form_input_list_entry($row['b_folder']));
}
}
$fields = new ocp_tempcode();
$fields->attach(form_input_list(do_lang_tempcode('OLD_BOOKMARK_FOLDER'), do_lang_tempcode('DESCRIPTION_OLD_BOOKMARK_FOLDER'), 'folder', $list, NULL, false, false));
$fields->attach(form_input_line(do_lang_tempcode('ALT_FIELD', do_lang_tempcode('NEW_BOOKMARK_FOLDER')), do_lang_tempcode('DESCRIPTION_NEW_BOOKMARK_FOLDER'), 'folder_new', '', false));
$fields->attach(form_input_line(do_lang_tempcode('TITLE'), do_lang_tempcode('DESCRIPTION_TITLE'), 'title', $default_title == '' ? '' : substr($default_title, 0, 200), true));
$fields->attach(form_input_line(do_lang_tempcode('PAGE_LINK'), do_lang_tempcode('DESCRIPTION_PAGE_LINK_BOOKMARK'), 'page_link', $page_link, true));
$submit_name = do_lang_tempcode('ADD_BOOKMARK');
breadcrumb_set_parents(array(array('_SELF:_SELF:misc', do_lang_tempcode('MANAGE_BOOKMARKS'))));
$javascript = 'standardAlternateFields(\'folder\',\'folder_new\'); var title=document.getElementById(\'title\'); if (((title.value==\'\') || (title.value==\'0\')) && (window.opener)) title.value=getInnerHTML(window.opener.document.getElementsByTagName(\'title\')[0]); ';
return do_template('FORM_SCREEN', array('_GUID' => '7e94bb97008de4fa0fffa2b5f91c95eb', 'TITLE' => $title, 'HIDDEN' => '', 'TEXT' => '', 'FIELDS' => $fields, 'URL' => $post_url, 'SUBMIT_NAME' => $submit_name, 'JAVASCRIPT' => $javascript));
}
开发者ID:erico-deh, 项目名称:ocPortal, 代码行数:47, 代码来源:bookmarks.php
示例19: do_next_manager_hooked
/**
* Get the tempcode for a do next manager. A do next manager is a series of linked icons that are presented after performing an action. Modules that do not use do-next pages, usually use REFRESH_PAGE's.
*
* @param ID_TEXT The title of what we are doing (a language string)
* @param ?mixed The language code for the docs of the hook defined do-next manager that we're creating OR tempcode for it (NULL: none)
* @param ID_TEXT The menu 'type' we are doing (filters out any icons that don't match it)
* @param ?string The title to use for the main links (a language string) (NULL: same as title)
* @return tempcode The do next manager
*/
function do_next_manager_hooked($title, $text, $type, $main_title = NULL)
{
$links = array();
if (is_null($main_title)) {
$main_title = $title;
}
breadcrumb_set_self(do_lang_tempcode($title));
$hooks = find_all_hooks('systems', 'do_next_menus');
foreach (array_keys($hooks) as $hook) {
require_code('hooks/systems/do_next_menus/' . filter_naughty_harsh($hook));
$object = object_factory('Hook_do_next_menus_' . filter_naughty_harsh($hook), true);
if (is_null($object)) {
continue;
}
$info = $object->run(true);
foreach ($info as $i) {
if (is_null($i)) {
continue;
}
if ($i[0] == $type) {
array_shift($i);
$links[] = $i;
}
}
}
global $M_SORT_KEY;
$M_SORT_KEY = 2;
@usort($links, 'multi_sort');
if (!is_null($text)) {
if (strpos($text, ' ') === false) {
$_text = comcode_lang_string($text);
} else {
$_text = make_string_tempcode($text);
}
} else {
$_text = new ocp_tempcode();
}
return do_next_manager(is_null($text) ? NULL : get_page_title($title), $_text, $links, do_lang($main_title));
}
开发者ID:erico-deh, 项目名称:ocPortal, 代码行数:48, 代码来源:templates_donext.php
libSVM下载:amp;#160;http://www.csie.ntu.edu.tw/~cjlin/libsvm/ 或github(建议git
阅读:586| 2022-07-18
solegalli/feature-selection-for-machine-learning: Code repository for the online
阅读:947| 2022-08-18
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This ca
阅读:561| 2022-07-08
tianli/matlab_offscreen: Matlab offscreen rendering toolbox.
阅读:1086| 2022-08-17
win7系统电脑使用过程中有不少朋友表示遇到过win7系统重装系统初始设置的状况,当出现
阅读:877| 2022-11-06
Snilda/Font-Library: Check Readme
阅读:543| 2022-08-15
これがマストドンだ! 使い方からインスタンスの作り方まで | 電子書籍とプリントオン
阅读:877| 2022-08-17
matlab常用函数 基本运算与函数 下表即为MATLAB常用的基本数学函数及三角函数:
阅读:1349| 2022-07-18
raichen/LinuxServerCodes: Linux高性能服务器编程源码
阅读:436| 2022-08-15
由于人们消费水平的提高,人们越来越多的追求美的享受,瓷砖美缝就是一种让瓷砖缝隙变
阅读:677| 2022-11-06
请发表评论