本文整理汇总了PHP中commonModel::getSysURL方法的典型用法代码示例。如果您正苦于以下问题:PHP commonModel::getSysURL方法的具体用法?PHP commonModel::getSysURL怎么用?PHP commonModel::getSysURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commonModel
的用法示例。
在下文中一共展示了commonModel::getSysURL方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sitemapXML
/**
* Output sitemap.xml.
*
* @access public
* @return void
*/
public function sitemapXML()
{
$this->loadModel('tree');
$this->loadModel('article');
$this->loadModel('product');
$this->loadModel('forum');
$this->loadModel('thread');
$bookAlias = $this->dao->select('id, alias')->from(TABLE_BOOK)->where('type')->eq('book')->fetchPairs('id', 'alias');
$nodes = $this->dao->select('id, title, type, path, alias, editedDate, addedDate')->from(TABLE_BOOK)->fetchAll();
$this->loadModel('book');
foreach ($nodes as $node) {
$bookID = $this->book->extractBookID($node->path);
$node->book = $bookAlias[$bookID];
}
$articles = $this->article->getList('article', $this->tree->getFamily(0, 'article'), 'id_desc');
$pages = $this->dao->select('id, title, alias')->from(TABLE_ARTICLE)->where('type')->eq('page')->andWhere('status')->eq('normal')->fetchAll('id');
$blogs = $this->article->getList('blog', $this->tree->getFamily(0, 'blog'), 'id_desc');
$products = $this->product->getList($this->tree->getFamily(0), 'id_desc');
$board = $this->tree->getFamily(0);
$threads = $this->dao->select('id, editedDate')->from(TABLE_THREAD)->beginIf($board)->where('board')->in($board)->orderBy('id desc')->fetchPairs();
$this->view->systemURL = commonModel::getSysURL();
$this->view->books = $nodes;
$this->view->articles = $articles;
$this->view->blogs = $blogs;
$this->view->products = $products;
$this->view->threads = $threads;
$this->view->pages = $pages;
$this->display();
}
示例2: index
/**
* Output the rss.
*
* @access public
* @return void
*/
public function index()
{
$type = $this->get->type != false ? $this->get->type : 'blog';
$this->loadModel('tree');
$this->loadModel('article');
$this->app->loadClass('pager', $static = true);
$pager = new pager(0, isset($this->config->rss->items) ? $this->config->rss->items : 10, 1);
$articles = $this->article->getList($type, $this->tree->getFamily(0, $type), 'id_desc', $pager);
$latestArticle = current((array) $articles);
$this->view->title = $this->config->site->name;
$this->view->desc = $this->config->site->desc;
$this->view->siteLink = $this->inlink('browse', "type={$type}");
$this->view->siteLink = commonModel::getSysURL();
$this->view->articles = $articles;
$this->view->lastDate = $latestArticle ? $latestArticle->addedDate : date('Y-m-d H:i:s') . ' +0800';
$this->display();
}
示例3: getEntry
/**
* Get content for entry block.
*
* @param object $block
* @access public
* @return string
*/
public function getEntry($block)
{
if (empty($block)) {
return false;
}
$entry = $this->loadModel('entry')->getByCode($block->source);
$http = $this->app->loadClass('http');
if (empty($block->params)) {
$block->params = new stdclass();
}
$block->params->account = $this->app->user->account;
$block->params->uid = $this->app->user->id;
$params = base64_encode(json_encode($block->params));
$query['mode'] = 'getblockdata';
$query['blockid'] = $block->block;
$query['hash'] = $entry->key;
$query['entry'] = $entry->id;
$query['app'] = 'sys';
$query['lang'] = $this->app->getClientLang();
$query['sso'] = base64_encode(commonModel::getSysURL() . helper::createLink('entry', 'visit', "entry={$entry->id}"));
$query['user'] = $this->app->user->account;
if (isset($params)) {
$query['param'] = $params;
}
$query = http_build_query($query);
$parsedUrl = parse_url($entry->block);
$parsedUrl['query'] = empty($parsedUrl['query']) ? $query : $parsedUrl['query'] . "&" . $query;
$link = '';
if (!isset($parsedUrl['scheme'])) {
$link = commonModel::getSysURL() . $parsedUrl['path'];
$link .= '?' . $parsedUrl['query'];
} else {
$link .= $parsedUrl['scheme'] . '://' . $parsedUrl['host'];
if (isset($parsedUrl['port'])) {
$link .= ':' . $parsedUrl['port'];
}
if (isset($parsedUrl['path'])) {
$link .= $parsedUrl['path'];
}
$link .= '?' . $parsedUrl['query'];
}
/* Send login request. */
$loginObj = "<iframe src=" . helper::createLink('sys.entry', 'visit', "entryID={$entry->id}") . "' class='hidden' />";
return $loginObj . $http->get($link);
}
示例4: isonlybody
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chu Jilu <chujilu@cnezsoft.com>
* @package order
* @version $Id: sendmail.html.php 867 2010-06-17 09:32:58Z yuren_@126.com $
* @link http://www.ranzhico.com
*/
$onlybody = isonlybody() ? true : false;
if ($onlybody) {
$_GET['onlybody'] = 'no';
}
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
ORDER #<?php
echo $order->id . "=>{$order->assignedTo} " . html::a(commonModel::getSysURL() . $this->createLink('crm.order', 'view', "orderID={$order->id}"), $order->title);
?>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend><?php
echo $lang->order->view;
?>
</legend>
<div class='content'>
<?php
$productName = count($order->products) > 1 ? current($order->products) . $lang->etc : current($order->products);
?>
<p><?php
示例5: createOAuthCallbackURL
/**
* Create the callback address for oauth.
*
* @param string $provider
* @param string $referer
* @access public
* @return string
*/
public function createOAuthCallbackURL($provider)
{
if ($this->config->requestType == 'GET' and $provider == 'qq') {
return commonModel::getSysURL() . '/index.php/user-oauthCallback-qq.html';
}
return commonModel::getSysURL() . helper::createLink('user', 'oauthCallback', "provider={$provider}");
}
示例6:
</th>
<td>
<?php
$callbackURL = commonModel::createFrontLink('user', 'oauthCallback', "provider=qq");
?>
<?php
if ($callbackURL == '/user-oauthCallback-qq.html') {
?>
<?php
echo commonModel::getSysURL() . $callbackURL;
?>
<?php
} else {
?>
<?php
echo commonModel::getSysURL() . '/index.php/user-oauthCallback-qq.html';
?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<th></th> <td><?php
echo html::submitButton() . html::hidden('provider', $providerCode);
?>
</td>
</tr>
示例7: isonlybody
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chu Jilu <chujilu@cnezsoft.com>
* @package task
* @version $Id: sendmail.html.php 867 2010-06-17 09:32:58Z yuren_@126.com $
* @link http://www.ranzhico.com
*/
$onlybody = isonlybody() ? true : false;
if ($onlybody) {
$_GET['onlybody'] = 'no';
}
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
TASK #<?php
echo $task->id . "=>{$task->assignedTo} " . html::a(commonModel::getSysURL() . $this->createLink('task', 'view', "taskID={$task->id}"), $task->name);
?>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend><?php
echo $lang->task->desc;
?>
</legend>
<div class='content'><?php
echo $task->desc;
?>
</div>
</fieldset>
示例8: createOAuthCallbackURL
/**
* Create the callback address for oauth.
*
* @param string $provider
* @param string $referer
* @access public
* @return string
*/
public function createOAuthCallbackURL($provider)
{
return commonModel::getSysURL() . helper::createLink('user', 'oauthCallback', "provider={$provider}");
}
示例9: nl2br
<div class='history'>
<div><?php
echo $this->action->printChanges($action->objectType, $action->history, $action->action);
?>
</div>
<?php
if ($action->comment and $action->history) {
echo '<br />';
}
echo nl2br($action->comment);
?>
</div>
<?php
}
?>
<div class='cnezsoft'><?php
if (isset($lang->mail->mailContentTip)) {
echo sprintf($lang->mail->mailContentTip, isset($config->company->name) ? $config->company->name : '', html::a(commonModel::getSysURL()));
}
?>
</div>
<style>
del {background:#fcc}
ins {background:#cfc; text-decoration:none}
table, tr, th, td {border:1px solid gray; font-size:12px; border-collapse:collapse}
tr, th, td {padding:5px}
.history {border:1px solid gray; padding:10px; margin-top:10px; margin-bottom:10px}
.header {background:#efefef}
.cnezsoft {font-size: 14px; background: #f0f0f0; line-height: 20px; margin-top: 10px;}
</style>
示例10: getBlockParams
/**
* Get block params.
*
* @param object $entry
* @param int $blockID
* @access public
* @return json
*/
public function getBlockParams($entry, $blockID)
{
$http = $this->app->loadClass('http');
if (empty($entry)) {
return array();
}
$parseUrl = parse_url($entry->block);
$formQuery = "mode=getblockform&blockid={$blockID}&hash={$entry->key}&lang=" . $this->app->getClientLang();
$parseUrl['query'] = empty($parseUrl['query']) ? $formQuery : $parseUrl['query'] . '&' . $formQuery;
$link = '';
if (!isset($parseUrl['scheme'])) {
$link = commonModel::getSysURL() . $parseUrl['path'];
$link .= '?' . $parseUrl['query'];
} else {
$link .= $parseUrl['scheme'] . '://' . $parseUrl['host'];
if (isset($parseUrl['port'])) {
$link .= ':' . $parseUrl['port'];
}
if (isset($parseUrl['path'])) {
$link .= $parseUrl['path'];
}
$link .= '?' . $parseUrl['query'];
}
$params = $http->get($link);
return json_decode($params, true);
}
示例11: isonlybody
* @version $Id: sendmail.html.php 867 2010-06-17 09:32:58Z yuren_@126.com $
* @link http://www.ranzhico.com
*/
$onlybody = isonlybody() ? true : false;
if ($onlybody) {
$_GET['onlybody'] = 'no';
}
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
<?php
echo "{$lang->refund->common}{$lang->refund->review}#{$refund->id}{$lang->colon}";
?>
<?php
echo html::a(commonModel::getSysURL() . $this->createLink('oa.refund', 'view', "id={$refund->id}"), $refund->name);
?>
</td>
</tr>
<tr>
<td>
<div class='content'>
<table>
<tr>
<th><?php
echo $lang->refund->date;
?>
</th>
<td><?php
echo $refund->date;
?>
示例12: isonlybody
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chu Jilu <chujilu@cnezsoft.com>
* @package customer
* @version $Id: sendmail.html.php 867 2010-06-17 09:32:58Z yuren_@126.com $
* @link http://www.ranzhico.com
*/
$onlybody = isonlybody() ? true : false;
if ($onlybody) {
$_GET['onlybody'] = 'no';
}
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
CUSTOMER #<?php
echo $customer->id . " => " . zget($users, $customer->assignedTo) . html::a(commonModel::getSysURL() . $this->createLink('crm.customer', 'view', "customerID={$customer->id}"), $customer->name);
?>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend><?php
echo $lang->customer->view;
?>
</legend>
<div class='content'>
<p><?php
echo $lang->customer->nextDate . ':' . $customer->nextDate;
?>
</p>
示例13: printBlock
/**
* Print buildin entry block.
*
* @param int $index
* @access public
* @return void
*/
public function printBlock($index)
{
$block = $this->loadModel('block')->getBlock($index);
if (empty($block)) {
return false;
}
if ($block->source == '') {
$this->locate($this->createLink('block', 'printBlock', "index={$index}"));
}
$entry = $this->loadModel('entry')->getByCode($block->source);
if (!$entry->buildin) {
$this->locate($this->createLink('block', 'printBlock', "index={$index}"));
}
$html = '';
$block->params->account = $this->app->user->account;
$block->params->uid = $this->app->user->id;
$params = base64_encode(json_encode($block->params));
$this->get->set('mode', 'getblockdata');
$this->get->set('blockid', $block->block);
$this->get->set('hash', $entry->key);
$this->get->set('entry', $entry->id);
$this->get->set('app', 'sys');
$this->get->set('lang', $this->app->getClientLang());
$this->get->set('sso', base64_encode(commonModel::getSysURL() . helper::createLink('entry', 'visit', "entry={$entry->id}")));
$this->get->set('param', $params);
$html = $this->fetch('block', 'index', array(), $entry->code);
die($html);
}