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


PHP set_title函数代码示例

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


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

示例1: s

 public function s($search_string)
 {
     $ajax = $this->input->is_ajax_request();
     $search_string = urldecode($search_string);
     $strs = explode(' ', $search_string);
     $keywords = array();
     if (count($strs) > 1) {
         array_push($keywords, $search_string);
     }
     foreach ($strs as $str) {
         array_push($keywords, $str);
     }
     $ids;
     $result = $this->search->search($keywords);
     if (count($result) > 0) {
         foreach ($result as $res) {
             $ids[] = $res['id'];
         }
         $data['pages'] = $this->page_handler->load_pages('', '', $ids);
         $data['results'] = TRUE;
     } else {
         $data['results'] = FALSE;
     }
     $data['ajax'] = $ajax;
     if ($ajax) {
         $data_json = array('body' => $this->load->view('main_pages/search_view', $data, TRUE), 'title' => 'Пребарување');
         $this->output->set_output(json_encode($data_json));
     } else {
         set_title('Пребарување');
         $this->load->view('main_pages/search_view', $data);
     }
 }
开发者ID:borka-s,项目名称:e-learning,代码行数:32,代码来源:Search.php

示例2: index

 public function index()
 {
     set_title('Main Page Onbeng - Online Bengkel');
     $this->load->view('meta');
     $this->load->view('script');
     $this->load->view('query_data');
     $this->load->view('main/view');
 }
开发者ID:utqinadhif,项目名称:onbeng,代码行数:8,代码来源:Main.php

示例3: load_page

 /**
  *
  * Load the apropriate page acording the given parametar
  *
  * @param name of the page
  *
  * @param page_arguments object
  *
  * @return Send the page to browser
  *
  *
  */
 public function load_page($page_name, $args)
 {
     $page = $this->page_handler->load_page($page_name);
     $shortcodes = $this->shortcodes;
     if ($page == FALSE) {
         show_404();
     } else {
         $page->content = $shortcodes->do_shortcode($page->content);
         $data['page'] = $page;
     }
     if (isset($page->category)) {
         $this->load->library('post_handler');
         if ($page_name == 'home' or $page->category == 1) {
             $this->load->library('user_agent');
             $data['browser'] = $this->agent->is_browser();
             $data['pages'] = $this->page_handler->load_pages($page->category, 'temi');
         } else {
             $data['posts'] = $this->post_handler->load_posts($page->category);
         }
     }
     set_active_page($page->name);
     set_title($page->title);
     foreach ($args as $key => $value) {
         $data[$key] = $value;
     }
     if ($data['ajax']) {
         if ($page_name == 'news' && isset($args[0])) {
             $data['post'] = $this->post_handler->load_post($args[0]);
             $data_json = array('body' => $this->load->view('templates/single', $data, true), 'title' => $data['post']->title);
             $this->output->set_output(json_encode($data_json));
         } else {
             if (file_exists(APPPATH . "views/templates/" . $page->template) && isset($page->template) && $page->template != 'default') {
                 $data_json = array('body' => $this->load->view('templates/' . $page->template, $data, true), 'title' => get_title());
                 $this->output->set_output(json_encode($data_json));
             } else {
                 $page->content = $shortcodes->do_shortcode($page->content);
                 $data_json = array('body' => $this->load->view('templates/page', $data, true), 'title' => get_title());
                 $this->output->set_output(json_encode($data_json));
             }
         }
     } else {
         if ($page_name == 'news' && isset($args[0])) {
             $data['post'] = $this->post_handler->load_post($args[0]);
             set_title($data['post']->title);
             $this->load->view('templates/single', $data);
         } else {
             if (file_exists(APPPATH . "views/templates/" . $page->template) && isset($page->template) && $page->template != 'default') {
                 $this->load->view('templates/' . $page->template, $data);
             } else {
                 $this->load->view('templates/page', $data);
             }
         }
     }
 }
开发者ID:borka-s,项目名称:e-learning,代码行数:66,代码来源:Pages.php

示例4: join_am

 public function join_am()
 {
     set_active_page('join');
     set_title(t('title_join_am'));
     $ajax = $this->input->is_ajax_request();
     $data['ajax'] = $ajax;
     if ($ajax) {
         $data_json = array('body' => $this->load->view('main_pages/join_am', $data, true), 'title' => get_title());
         $this->output->set_output(json_encode($data_json));
     } else {
         // $data['post'] = $this->post_handler->load_post($args[0]);
         $this->load->view('main_pages/join_am', $data, FALSE);
     }
 }
开发者ID:borka-s,项目名称:e-learning,代码行数:14,代码来源:User.php

示例5: index

 public function index()
 {
     set_active_page('wastemap');
     $page = $this->page_handler->load_page('wastemap');
     set_title($page->title);
     $ajax = $this->input->is_ajax_request();
     $data['ajax'] = $ajax;
     if ($ajax) {
         $data_json = array('body' => $this->load->view('main_pages/wastemap' . $page->template, $data, true), 'title' => get_title());
         $this->output->set_output(json_encode($data_json));
     } else {
         $this->load->view('main_pages/wastemap', $data, FALSE);
     }
 }
开发者ID:borka-s,项目名称:ajde_makedonija,代码行数:14,代码来源:wastemap.php

示例6: __construct

 public function __construct()
 {
     global $locale, $admin_pages, $aidlink;
     @(list($title) = dbarraynum(dbquery("SELECT admin_title FROM " . DB_ADMIN . " WHERE admin_link='" . FUSION_SELF . "'")));
     set_title($locale['global_123'] . $locale['global_201'] . ($title ? $title . $locale['global_200'] : ""));
     $this->admin_pages = $admin_pages;
     // generate core sections
     $this->admin_sections = array(0 => $locale['ac00'], 1 => $locale['ac01'], 2 => $locale['ac02'], 3 => $locale['ac03'], 4 => $locale['ac04'], 5 => $locale['ac05']);
     $this->current_page = self::_currentPage();
     // Dashboard breadcrumb
     add_breadcrumb(array('link' => ADMIN . 'index.php' . $aidlink . '&pagenum=0', 'title' => $locale['ac10']));
     $activetab = isset($_GET['pagenum']) && isnum($_GET['pagenum']) ? $_GET['pagenum'] : $this->_isActive();
     if ($activetab != 0 && $activetab <= 5) {
         add_breadcrumb(array('link' => ADMIN . $aidlink . "&amp;pagenum=" . $activetab, 'title' => $locale['ac0' . $activetab]));
     }
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:16,代码来源:admin.php

示例7: page

 /**
  * 单独页面
  * @param $page
  */
 public function page($page)
 {
     if (\ULib\Router::$begin_status) {
         lib()->load('project', 'menu')->add("project", new \ULib\Project($page, 0));
         lib()->add('menu', new \ULib\Menu(true));
         set_title(project()->title(), site_title(false));
         theme()->header_add("<script>var PM_PAGE_ID = " . project()->id() . ";</script>", 40);
         theme()->set_desc(project()->desc());
         theme()->set_keywords(project()->keywords());
         header("Content-Type:text/html; charset=utf-8");
         $this->__view('comm/header.php');
         $this->__view('project/page.php');
         $this->__view('comm/footer.php');
     } else {
         $this->__load_404();
     }
 }
开发者ID:Wanyor,项目名称:ProjectManager,代码行数:21,代码来源:Page.php

示例8: index

 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -  
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in 
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function index()
 {
     set_title('Helpline');
     $offset = $this->uri->segment($this->config->item('paginiation_segment'));
     $list = $this->helpline_model->get_all_logs($this->config->item('pagination_per_page'), $offset, $this->input->get_post(NULL, TRUE));
     $p_config = array();
     $p_config['base_url'] = site_url('helpline/page');
     $p_config['total_rows'] = $list['num_rows'];
     $p_config['uri_segment'] = $this->config->item('paginiation_segment');
     $p_config['per_page'] = $this->config->item('pagination_per_page');
     $p_config['num_links'] = 10;
     $p_config['full_tag_open'] = '<div class="pagination"><span>Pages:</span>';
     $p_config['full_tag_close'] = '</div>';
     $p_config['cur_tag_open'] = '<strong class="ui-state-hover ui-corner-all">';
     $p_config['cur_tag_close'] = '</strong>';
     $p_config['anchor_class'] = 'class="ui-state-default ui-corner-all"';
     $p_config['suffix'] = '?' . http_build_query($_GET, '', "&");
     $p_config['first_link'] = FALSE;
     $p_config['last_link'] = FALSE;
     $data['callers'] = $list['rows'];
     $this->pagination->initialize($p_config);
     $this->load->view('helpline/list', $data);
 }
开发者ID:cmarkme,项目名称:zdzf-sphp,代码行数:38,代码来源:helpline.php

示例9: set_TagInfo

 /**
  * Fetches all Forum Tag Table records
  *
  * @param bool|TRUE $setTitle
  */
 public function set_TagInfo($setTitle = TRUE)
 {
     $locale = fusion_get_locale("", FORUM_LOCALE);
     $locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
     if ($setTitle == TRUE) {
         set_title($locale['forum_0000']);
         add_to_title($locale['global_201'] . $locale['forum_tag_0100']);
         add_breadcrumb(array('link' => FORUM . "index.php", 'title' => $locale['forum_0000']));
         add_breadcrumb(array('link' => FORUM . "tags.php", 'title' => $locale['forum_tag_0100']));
     }
     $thread_result = NULL;
     if (isset($_GET['tag_id']) && isnum($_GET['tag_id'])) {
         $tag_query = "SELECT * FROM " . DB_FORUM_TAGS . " WHERE tag_status=1 AND tag_id='" . intval($_GET['tag_id']) . "'\n            " . (multilang_table("FO") ? "AND tag_language='" . LANGUAGE . "'" : "") . "\n            ";
         $tag_result = dbquery($tag_query);
         if (dbrows($tag_result) > 0) {
             $data = dbarray($tag_result);
             add_to_title($locale['global_201'] . $data['tag_title']);
             add_breadcrumb(array('link' => FORUM . "tags.php?tag_id=" . $data['tag_id'], 'title' => $data['tag_title']));
             if (!empty($data['tag_description'])) {
                 set_meta('description', $data['tag_description']);
             }
             $data['tag_link'] = FORUM . "tags.php?tag_id=" . $data['tag_id'];
             $data['tag_active'] = isset($_GET['viewtags']) && isset($_GET['tag_id']) && $_GET['tag_id'] == $data['tag_id'] ? TRUE : FALSE;
             $this->tag_info['tags'][$data['tag_id']] = $data;
             $this->tag_info['tags'][0] = array('tag_id' => 0, 'tag_link' => FORUM . "tags.php", 'tag_title' => fusion_get_locale("global_700") . "&hellip;", 'tag_active' => '', 'tag_color' => '');
             $this->tag_info['filter'] = $this->filter()->get_FilterInfo();
             $filter_sql = $this->filter()->get_filterSQL();
             // get forum threads.
             $this->tag_info = array_merge_recursive($this->tag_info, self::get_tag_thread($_GET['tag_id'], array("condition" => $filter_sql['condition'], "order" => $filter_sql['order'])));
         } else {
             redirect(FORUM . "index.php");
         }
     } else {
         $this->cache_tags();
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:41,代码来源:tags.php

示例10: auto_set_params

<?php

auto_set_params(array('commit', 'query'));
set_title("Tag Implications");
create_page_params();
if (Request::$params->commit == "Search Aliases") {
    redirect_to("tag_alias#index", array('query' => Request::$params->query));
}
if (Request::$params->query) {
    $name = "%" . Request::$params->query . "%";
    $implications = TagImplication::find_all(array('calc_rows', 'order' => "is_pending DESC, (SELECT name FROM tags WHERE id = tag_implications.predicate_id), (SELECT name FROM tags WHERE id = tag_implications.consequent_id)", 'per_page' => 20, 'conditions' => array("predicate_id IN (SELECT id FROM tags WHERE name LIKE ?) OR consequent_id IN (SELECT id FROM tags WHERE name LIKE ?)", $name, $name), 'page' => Request::$params->page));
} else {
    $implications = TagImplication::find_all(array('calc_rows', 'order' => "is_pending DESC, (SELECT name FROM tags WHERE id = tag_implications.predicate_id), (SELECT name FROM tags WHERE id = tag_implications.consequent_id)", 'per_page' => 20, 'page' => Request::$params->page));
}
calc_pages();
respond_to_list("implications");
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:16,代码来源:index.php

示例11: set_title

<?php

set_title(site_name() . ' - Jocul');
$smarty->assign('content_tpl', 'content/main/thegame');
开发者ID:ionutmilica,项目名称:my-archive,代码行数:4,代码来源:thegame.php

示例12: redirect

if (!db_exists(DB_WEBLINKS)) {
    redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "weblinks/locale/" . LOCALESET . "weblinks.php")) {
    include INFUSIONS . "weblinks/locale/" . LOCALESET . "weblinks.php";
} else {
    include INFUSIONS . "weblinks/locale/English/weblinks.php";
}
include INFUSIONS . "weblinks/templates/weblinks.php";
$wl_settings = get_settings("weblinks");
$weblink_cat_index = dbquery_tree(DB_WEBLINK_CATS, 'weblink_cat_id', 'weblink_cat_parent');
add_breadcrumb(array('link' => INFUSIONS . 'weblinks/weblinks.php', 'title' => $locale['400']));
if (!isset($_GET['weblink_id']) || !isset($_GET['weblink_cat_id'])) {
    set_title($locale['400']);
}
if (isset($_GET['weblink_id']) && isnum($_GET['weblink_id'])) {
    $res = 0;
    $data = dbarray(dbquery("SELECT weblink_url,weblink_cat, weblink_visibility FROM " . DB_WEBLINKS . " WHERE weblink_id='" . intval($_GET['weblink_id']) . "'"));
    if (checkgroup($data['weblink_visibility'])) {
        $res = 1;
        dbquery("UPDATE " . DB_WEBLINKS . " SET weblink_count=weblink_count+1 WHERE weblink_id='" . intval($_GET['weblink_id']) . "'");
        redirect($data['weblink_url']);
    } else {
        redirect(FUSION_SELF);
    }
} elseif (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
    $info = array();
    $info['item'] = array();
    $result = dbquery("SELECT weblink_cat_name, weblink_cat_sorting FROM\n\t" . DB_WEBLINK_CATS . " " . (multilang_table("WL") ? "WHERE weblink_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " weblink_cat_id='" . intval($_GET['cat_id']) . "'");
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:weblinks.php

示例13: define

<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library');
set_page_power(array(1));
set_title("图书操作");
$all_user = new user_info();
$all_user->get_id_list();
$category = new library_category();
$category->get_id_list();
get_admin_header();
$status = NULL;
if (!isset($_POST['action'])) {
    if (isset($_GET['act'])) {
        switch ($_GET['act']) {
            case 'del':
                $book_del = new library_book_del();
                if (isset($_GET['id'])) {
                    $book_del->add($_GET['id']);
                    $status = $book_del->del();
                    if ($status == 'OK') {
                        print_successful_notice("图书删除成功");
                    } else {
                        print_err_notice($status);
                    }
                }
                library_category_up_all();
开发者ID:dalinhuang,项目名称:zxtd,代码行数:31,代码来源:library-action.php

示例14: define

<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('option', 'option_library');
set_page_power(array(1));
set_title("网站设置");
library_option();
//加载图书管理设置
get_admin_header();
?>
<div id="option-setting">

<h2 class="left">图书管理设置</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">成功更新设置信息</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form method="post" action="option-action.php">
<table align="center" cellspacing="1" class="list">
<tr>
<th>图书每页显示数目</th>
<td><input name="library-one-page" value="<?php 
开发者ID:dalinhuang,项目名称:zxtd,代码行数:31,代码来源:library-option.php

示例15: exit

<?php

if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Descarcare');
assign('content_tpl', 'content/download');
开发者ID:ionutmilica,项目名称:my-archive,代码行数:7,代码来源:download.php


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