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


PHP site_name函数代码示例

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


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

示例1: my_get_title

function my_get_title($len = 65)
{
    if (!Registry::get('article')) {
        $title = site_name();
    } else {
        $title = trim(Registry::prop('article', 'title'));
    }
    if (strlen($title) > $len) {
        $title = substr($title, 0, $len - 3) . '...';
    }
    return preg_replace('/[\\n\\r\\t]+/', ' ', preg_replace('/\\s+/', ' ', $title));
}
开发者ID:aravindanve,项目名称:anchor-maeby-light,代码行数:12,代码来源:functions.php

示例2: vapor_twitter_card

function vapor_twitter_card()
{
    $twitter = site_meta('twitter_account');
    if ($twitter != '' || $twitter != NULL) {
        $title = article_id() ? article_title() : site_name();
        $description = article_id() ? article_description() : site_description();
        echo '<meta name="twitter:card" content="summary" />
	<meta name="twitter:site" content="@' . str_replace('@', '', $twitter) . '" />
	<meta name="twitter:title" content="' . $title . '" />
	<meta name="twitter:description" content="' . $description . '" />';
    }
}
开发者ID:Rigter,项目名称:Vapor,代码行数:12,代码来源:functions.php

示例3: pm_title

/**
 * 输出标题
 * @param bool $out
 * @return mixed
 */
function pm_title($out = true)
{
    $title = hook()->apply('pm_title_title', cfg()->get('theme', 'title'));
    $desc = hook()->apply('pm_title_title', cfg()->get('theme', 'desc'));
    if ($title === null) {
        $title = site_title(false);
    }
    if ($desc === null) {
        $desc = site_desc(false);
    }
    if (empty($desc)) {
        $out = hook()->apply('pm_title', $title);
    } else {
        $out = hook()->apply('pm_title', $title . " | " . site_name(false));
    }
    if ($out) {
        echo $out;
    }
    return $out;
}
开发者ID:Wanyor,项目名称:ProjectManager,代码行数:25,代码来源:theme.php

示例4: set_title

<?php

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

示例5: exit

<?php

/**
 * @todo Un update major pentru clasament
 * @info Acesta functioneaza de minune, dar trebuie simplificat algoritmul          
**/
if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Clasament jucatori');
$players = array();
$where = '';
$plain_args = Vars::get('plain_args');
$page = 1;
if (preg_match('/page-([0-9]+)/i', $plain_args, $match)) {
    $page = (int) $match[1] > 0 ? $match[1] : 1;
}
$name = '';
if (preg_match('/name-([a-zA-Z|\\[\\]]+)/i', $plain_args, $match)) {
    $name = isset($match[1]) ? $DB->escape($match[1]) : '';
}
$class = -1;
if (preg_match('/class-(-?[0-9]+)/i', $plain_args, $match)) {
    $class = (int) $match[1] > -1 ? $match[1] : -1;
}
if (isset($_POST['classchoice']) || isset($_POST['characterchoice']) || $name != '') {
    $name = isset($_POST['characterchoice']) ? $_POST['characterchoice'] : $name;
    if ($name != '') {
        $where = "WHERE name LIKE '%" . $DB->escape($name) . "%'";
    }
    $class = isset($_POST['classchoice']) ? $_POST['classchoice'] : $class;
开发者ID:ionutmilica,项目名称:my-archive,代码行数:31,代码来源:highscore.php

示例6: exit

<?php

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

示例7: check_login

<?php

check_login();
if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Caracterele mele');
$data = $DB->query("SELECT * FROM " . PLAYER_DATABASE . ".player WHERE account_id = '" . $_SESSION['user_data']['id'] . "'");
$users = array();
$i = 0;
while ($row = $DB->fetch($data)) {
    $users[$i]['id'] = $row['id'];
    $users[$i]['name'] = $row['name'];
    $users[$i]['level'] = $row['level'];
    $users[$i]['time'] = $row['playtime'] > 0 ? duration($row['playtime'] * 60) : 'nedeterminat';
    $users[$i]['class'] = char_class($row['job']);
    $i++;
}
$smarty->assign('users', $users);
assign('content_tpl', 'content/character');
开发者ID:ionutmilica,项目名称:my-archive,代码行数:20,代码来源:character.php

示例8: header

<!DOCTYPE html>
<?php 
header('Expires: ' . date('r', time() - 86400));
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
?>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<?php 
$postfix = isset($meta_data['title']) ? ' - ' . $meta_data['title'] : '';
?>
		<title><?php 
echo site_name() . $postfix;
?>
</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Stylesheets -->
		<?php 
echo $this->dynamic_load->load_files('header');
?>
        
		<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<script>
			var urls = '<?php 
echo json_encode(array('base_url' => base_url(), 'backend_url' => backend_view(), 'assets' => array('base' => asset_url(), 'js' => asset_url('js'), 'css' => asset_url('css'), 'images' => asset_url('images'))));
?>
';
开发者ID:ArpanTanna,项目名称:seo,代码行数:31,代码来源:template_leads.php

示例9: exit

<?php

if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Logare');
$logged_in = false;
$login_failed = false;
if (isset($_SESSION['logged_in'])) {
    $logged_in = true;
}
if (!empty($_POST['username']) && !empty($_POST['password'])) {
    $DB = Mysql::init();
    $username = $DB->escape($_POST['username']);
    $password = $DB->escape($_POST['password']);
    $captcha = isset($_POST['captcha']) ? $_POST['captcha'] : null;
    if (Session::read('login_attempts') > 3) {
        if (isset($_SESSION['security_code']) && $_SESSION['security_code'] != $captcha) {
            $login_failed = true;
        }
    }
    if (!$login_failed) {
        $data = $DB->select("*", ACCOUNT_DATABASE . ".account", "login LIKE '" . $username . "' AND password LIKE PASSWORD('" . $password . "')");
        if (is_array($data)) {
            if ($data['status'] == 'BLOCK') {
                $smarty->assign('blocked_account', true);
                $smarty->assign('active', $data['active']);
            } else {
                $_SESSION['logged_in'] = true;
                $_SESSION['user_data'] = $data;
                $logged_in = true;
开发者ID:ionutmilica,项目名称:my-archive,代码行数:31,代码来源:login.php

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

示例11: exit

<?php

/**
 * @todo Un update major pentru clasament
 * @info Acesta functioneaza de minune, dar trebuie simplificat algoritmul          
**/
if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Clasament bresle');
$players = array();
$where = '';
$plain_args = Vars::get('plain_args');
$page = 1;
if (preg_match('/page-([0-9]+)/i', $plain_args, $match)) {
    $page = (int) $match[1] > 0 ? $match[1] : 1;
}
$name = '';
if (preg_match('/name-([a-zA-Z|\\[\\]]+)/i', $plain_args, $match)) {
    $name = isset($match[1]) ? $DB->escape($match[1]) : '';
}
$empire = -1;
if (preg_match('/empire-(-?[0-9]+)/i', $plain_args, $match)) {
    $empire = (int) $match[1] > -1 ? $match[1] : -1;
}
if (isset($_POST['empirechoice']) || isset($_POST['guildchoice']) || $name != '') {
    $name = isset($_POST['guildchoice']) ? $_POST['guildchoice'] : $name;
    if ($name != '') {
        $where = "WHERE name LIKE '%" . $DB->escape($name) . "%'";
    }
    $empire = isset($_POST['empirechoice']) ? $_POST['empirechoice'] : $empire;
开发者ID:ionutmilica,项目名称:my-archive,代码行数:31,代码来源:guildhighscore.php

示例12: user_alert

     echo user_alert(sprintf($strThereAreXcontractsAssignedToThisPerson, $totalcontracts), E_USER_WARNING);
 }
 if ($totalincidents > 0 || $totalcontracts > 0) {
     echo "<form action='{$_SERVER['PHP_SELF']}' onsubmit=\"return confirm_action('{$strAreYouSureDelete}')\" method='post'>\n";
     echo "<p align='center'>{$strBeforeDeleteContact}</p>";
     $sql = "SELECT id, forenames, surname, siteid FROM `{$dbContacts}` ORDER BY surname ASC";
     $result = mysql_query($sql);
     echo "<p align='center'>";
     echo "<select name='newcontact'>";
     if ($id == 0) {
         echo "<option selected='selected' value='0'>Select A Contact\n";
     }
     while ($contacts = mysql_fetch_array($result)) {
         $site = '';
         if ($contacts['siteid'] != '' && $contacts['siteid'] != 0) {
             $site = " of " . site_name($contacts['siteid']);
         }
         if ($contacts['id'] != $id) {
             echo "<option value=\"{$contacts['id']}\">";
             echo htmlspecialchars($contacts['surname'] . ', ' . $contacts['forenames'] . $site);
             echo "</option>\n";
         }
     }
     echo "</select><br />";
     echo "<br />";
     echo "<input type='hidden' name='id' value='{$id}' />";
     echo "<input type='hidden' name='process' value='true' />";
     echo "<input type='submit' value='{$strDelete}' />";
     echo "</p>";
     echo "</form>";
 } else {
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:contact_delete.php

示例13: exit

<?php

if (!defined('BASEPATH')) {
    exit('Nu poti accesa acest fisier direct.');
}
set_title(site_name() . ' - Cod stergere caractere');
check_login();
$step = 'request';
$data = $DB->select("id, login, email, social_id, socialid_token, socialid_expire", ACCOUNT_DATABASE . ".account", "`id`='" . $_SESSION['user_data']['id'] . "'");
if ($data['socialid_expire'] != 0) {
    $step = 'wait';
} else {
    if (isset($_POST['sendSocialcodeDisplayLink'])) {
        if (is_array($data)) {
            $token = sha1(microtime() . $data['email'] . rand(123151, 999999));
            $expire = time() + 24 * 60 * 60;
            $ok = $DB->query("UPDATE " . ACCOUNT_DATABASE . ".account SET `socialid_token`='" . $token . "', `socialid_expire`='" . $expire . "' WHERE `id`='" . $data['id'] . "'");
            if ($ok) {
                // trimitem email
                $arr = array('login' => $data['login'], 'token' => $token, 'site_name' => site_name(), 'site_url' => site_url());
                $email_ses = email()->load('displaycode/displaycode');
                $email_ses->assign($arr);
                $email_ses->set('noreply@' . rtrim(site_name(), '/'), '', $data['email'], 'Metin2 - Afiseaza codul');
                $email_ses->send();
            }
        }
        $step = 'sent';
    }
}
assign('content_tpl', 'content/displaycode/' . $step);
开发者ID:ionutmilica,项目名称:my-archive,代码行数:30,代码来源:displaycode.php

示例14: html_redirect

require 'core.php';
require APPLICATION_LIBPATH . 'functions.inc.php';
require APPLICATION_LIBPATH . 'auth.inc.php';
$title = "{$strInventory} - {$strSite}";
include APPLICATION_INCPATH . 'htmlheader.inc.php';
if (!$CONFIG['inventory_enabled']) {
    html_redirect('index.php', FALSE);
    exit;
}
if (is_numeric($_GET['id'])) {
    //View site inventory
    $siteid = $_GET['id'];
    if (!empty($_REQUEST['filter'])) {
        $filter = cleanvar($_REQUEST['filter']);
    }
    echo "<h2>" . icon('site', 32) . " " . site_name($siteid) . "</h2>";
    echo "<p align='center'>";
    echo "<a href='inventory_add.php?site={$siteid}'>";
    echo icon('add', 16) . " {$strAddNew}</a> | ";
    echo "<a href='inventory.php'>" . icon('site', 16) . " {$strBackToSites}</a></p>";
    $sql = "SELECT *, i.name AS name , i.id AS id, ";
    $sql .= "i.notes AS notes, ";
    $sql .= "i.active AS active ";
    $sql .= "FROM `{$dbInventory}` AS i, `{$dbSites}` AS s ";
    $sql .= "WHERE siteid='{$siteid}' ";
    $sql .= "AND siteid=s.id ";
    if (!empty($filter)) {
        $sql .= "AND type='{$filter}' ";
    }
    $sql .= "ORDER BY i.active DESC, ";
    $sql .= "i.modified DESC";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:inventory_site.php

示例15: get_url

	<nav class="container" role="navigation">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="<?php 
echo get_url();
?>
" title="返回 <?php 
site_title();
?>
 首页"><?php 
site_name();
?>
</a>
		</div>
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<?php 
admin_top_menu();
?>
			</ul>
		</div>
	</nav>
</header>
<div class="container">
	<div class="col-md-2">
		<ul class="nav nav-pills nav-stacked">
开发者ID:Wanyor,项目名称:ProjectManager,代码行数:31,代码来源:header.php


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