本文整理汇总了PHP中smarty_function_url函数的典型用法代码示例。如果您正苦于以下问题:PHP smarty_function_url函数的具体用法?PHP smarty_function_url怎么用?PHP smarty_function_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smarty_function_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content_54eb80f372ee31_63985461
function content_54eb80f372ee31_63985461($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include 'D:\\apache\\skully-admin\\vendor\\skullyframework\\skully\\Skully\\App\\smarty\\plugins\\function.url.php';
}
if (!is_callable('smarty_modifier_date_format')) {
include 'D:\\apache\\skully-admin\\vendor\\skullyframework\\skully\\Skully\\Library\\Smarty\\libs\\plugins\\modifier.date_format.php';
}
?>
<div class="widget-fluid userInfo clearfix">
<div class="name">Welcome, <?php
echo $_smarty_tpl->tpl_vars['adminUsername']->value;
?>
</div>
<ul class="menuList">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/admins/logout'), $_smarty_tpl);
?>
"><span class="icon-share-alt"></span> Logoff</a></li>
</ul>
<div class="text"><b><?php
echo smarty_modifier_date_format(time(), $_smarty_tpl->tpl_vars['clientConfig']->value['serverFormDateTimeFormat']);
?>
</b>
</div>
</div>
<?php
}
开发者ID:skullyframework,项目名称:skully-admin,代码行数:30,代码来源:11038a8d647c81616da95d3528ea5e6f2f641f4e.file._userInfo.tpl.php
示例2: content_53e1d74365ced3_36624953
function content_53e1d74365ced3_36624953($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include '/media/jay/Data/apache/skully-admin/vendor/skullyframework/skully/Skully/App/smarty/plugins/function.url.php';
}
if (!is_callable('smarty_modifier_date_format')) {
include '/media/jay/Data/apache/skully-admin/vendor/skullyframework/skully/Skully/Library/Smarty/libs/plugins/modifier.date_format.php';
}
?>
<div class="widget-fluid userInfo clearfix">
<div class="name">Welcome, <?php
echo $_smarty_tpl->tpl_vars['adminUsername']->value;
?>
</div>
<ul class="menuList">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/admins/logout'), $_smarty_tpl);
?>
"><span class="icon-share-alt"></span> Logoff</a></li>
</ul>
<div class="text"><b><?php
echo smarty_modifier_date_format(time(), $_smarty_tpl->tpl_vars['clientConfig']->value['serverFormDateTimeFormat']);
?>
</b>
</div>
</div>
<?php
}
开发者ID:skullyframework,项目名称:skully-admin,代码行数:30,代码来源:5edf9f42a301342cc135b44ef0080958fdfa8c57.file._userInfo.tpl.php
示例3: smarty_function_attachments
function smarty_function_attachments($params, &$smarty)
{
if (!isset($params['post_id'])) {
throw new Exception("Smarty function attachments missing 'post_id' parameter");
}
$id = $params['post_id'];
$folder = "uploads/{$id}";
if (!file_exists($folder)) {
return;
}
# Making an array containing the list of files:
$files = scandir($folder);
$list = array();
foreach ($files as $file) {
if ($file != '.' and $file != '..') {
$params['href'] = "get/{$file}/{$id}";
//TODO URL encode
$list[] = "<li><a href='" . smarty_function_url($params, &$smarty) . "'>" . $file . "</a></li>";
}
}
if (empty($list)) {
return;
}
// return empty if no attachments
array_unshift($list, "<ul>");
$list[] = "</ul>";
$smarty->assign('list', join('', $list));
$smarty->display('attachments.tpl');
}
示例4: copyToCache
/**
* Copy JS/CSS file to cache with replace code:
* ~~~URL~TYPE=<type>~MODULE=<module>~FILE=<file>~PRESET=<preset>~TAG=<tag>~ATTR=<attr>~~~
* @static
* @param string $origFile
* @param string $cachedFile
* @return int
*/
public static function copyToCache($origFile, $cachedFile)
{
//TODO: it's not a good method to extract theme name back from $cachedFile path
$_ = str_replace('\\', '\\\\', DS);
if (preg_match('~' . $_ . 'cache' . $_ . '(?:js|css|img)' . $_ . '([a-zA-Z][a-zA-Z0-9]{2,31})' . $_ . '~', $cachedFile, $matches)) {
$themeName = $matches[1];
} else {
throw new rad_exception("Incorrect cached file name: {$cachedFile} - cannot extract theme name!");
}
//TODO: maybe it'd be much better to process source file line by line to reduce memory cosumption.
$s = file_get_contents($origFile);
if (!function_exists('smarty_function_url')) {
rad_rsmarty::getSmartyObject()->loadPlugin('smarty_function_url');
}
$s = preg_replace_callback('/~~~URL~~(.+)~~~/iU', function ($match) {
$rows = explode('~~', trim($match[1], '~'));
$params = array('load' => 'inplace');
foreach ($rows as $row) {
$parts = explode('=', $row, 2);
if (count($parts) == 2) {
$key = strtolower($parts[0]);
if (!isset($params[$key])) {
$params[$key] = $parts[1];
}
}
}
return smarty_function_url($params, null);
}, $s);
$s = preg_replace('/~~~THEMENAME~~~/', $themeName, $s);
return file_put_contents($cachedFile, $s);
}
示例5: content_54f41c2860c555_85407330
function content_54f41c2860c555_85407330($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include 'D:\\apache\\skully\\Skully\\App\\smarty\\plugins\\function.url.php';
}
echo smarty_function_url(array('path' => "http://teguhwijaya.com"), $_smarty_tpl);
}
开发者ID:skullyframework,项目名称:skully,代码行数:7,代码来源:2f55b561510de03738839aa917c3f16fddf48dc2.file.ssl5.tpl.cache.php
示例6: content_54f41c285aa5a2_72449858
function content_54f41c285aa5a2_72449858($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include 'D:\\apache\\skully\\Skully\\App\\smarty\\plugins\\function.url.php';
}
echo smarty_function_url(array('path' => "home/ssltest"), $_smarty_tpl);
}
开发者ID:skullyframework,项目名称:skully,代码行数:7,代码来源:591a823ae85edd32e0f5bbf82af435dd9b2bdbad.file.ssl4.tpl.cache.php
示例7: test_smarty_function_url_emptypath
function test_smarty_function_url_emptypath()
{
$params = array('action' => 'test_empty_path', 'anchor' => '', 'scheme' => '', 'param1' => 'hoge', 'param2' => 'huga');
$dummy_smarty = null;
$expected = "?param1=hoge¶m2=huga";
$actual = smarty_function_url($params, $dummy_smarty);
$this->assertEquals($expected, $actual);
}
示例8: smarty_function_a
function smarty_function_a($params, &$smarty)
{
$tag = "<a href='" . smarty_function_url($params, &$smarty);
if (isset($params['title'])) {
$tag .= "' title='" . $params['title'];
}
$tag .= "'>";
return $tag;
}
示例9: content_54f1fed4301153_22470296
function content_54f1fed4301153_22470296($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include 'D:\\apache\\skully-admin\\vendor\\skullyframework\\skully\\Skully\\App\\smarty\\plugins\\function.url.php';
}
if (!is_callable('smarty_block_form')) {
include 'D:\\apache\\skully-admin\\vendor\\skullyframework\\skully\\Skully\\App\\smarty\\plugins\\block.form.php';
}
?>
<?php
ob_start();
echo smarty_function_url(array('path' => $_smarty_tpl->tpl_vars['destroyPath']->value), $_smarty_tpl);
$_tmp1 = ob_get_clean();
$_smarty_tpl->smarty->_tag_stack[] = array('form', array('method' => "POST", 'action' => $_tmp1));
$_block_repeat = true;
echo smarty_block_form(array('method' => "POST", 'action' => $_tmp1), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
?>
<input type="hidden" name="<?php
echo $_smarty_tpl->tpl_vars['instanceName']->value;
?>
[id]" value="<?php
echo $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['instanceName']->value]->value['id'];
?>
"/>
<div class="block-fluid">
<div class="row-form">
<div class="span12 largerText">Delete this <?php
echo $_smarty_tpl->tpl_vars['instanceName']->value;
?>
?</div>
</div>
<?php
if (!$_smarty_tpl->tpl_vars['isAjax']->value) {
?>
<div class="toolbar bottom TAR">
<button class="btn btn-primary" id="submitForm" type="submit">Submit</button>
</div>
<?php
}
?>
</div>
<?php
$_block_content = ob_get_clean();
$_block_repeat = false;
echo smarty_block_form(array('method' => "POST", 'action' => $_tmp1), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
?>
<?php
}
开发者ID:skullyframework,项目名称:skully-admin,代码行数:54,代码来源:90fc2010de8a4eab02d6027deebc5f0b808ff0bf.file._deleteForm.tpl.php
示例10: smarty_block_a
function smarty_block_a($params, $content, $template, &$repeat)
{
if ($open) {
$tag = "<a href='" . smarty_function_url(array('link' => $params['href']), &$smarty);
if (isset($params['title'])) {
$tag .= "' title='" . $params['title'];
}
$tag .= "'>";
return $tag;
} else {
return "</a>";
}
}
示例11: smarty_block_mi
function smarty_block_mi($params, $content, &$smarty, &$repeat)
{
if (is_null($content)) {
return;
} else {
$tag = "<a href='" . smarty_function_url($params, &$smarty);
if (isset($params['title'])) {
$tag .= "' title='" . $params['title'];
}
$tag .= "'>";
return "<li>" . $tag . $content . "</a></li>";
}
}
示例12: smarty_function_form
function smarty_function_form($params, &$smarty)
{
if (!isset($params['method'])) {
$params['method'] = "POST";
}
if (isset($params['action'])) {
$params['link'] = $params['action'];
$params['action'] = smarty_function_url($params, &$smarty);
unset($params['link']);
}
$tag = array("<form");
foreach ($params as $key => $val) {
$tag[] = "{$key}='{$val}'";
}
$tag[] = ">";
return join(" ", $tag);
}
示例13: content_53e1d743638683_38413837
function content_53e1d743638683_38413837($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include '/media/jay/Data/apache/skully-admin/vendor/skullyframework/skully/Skully/App/smarty/plugins/function.url.php';
}
?>
<ul class="main">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/home/index'), $_smarty_tpl);
?>
"><span class="icom-screen"></span><span class="text">Main</span></a></li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/admins/index'), $_smarty_tpl);
?>
"><span class="icom-user3"></span><span class="text">Admins</span></a></li>
<li>
<a href="<?php
echo smarty_function_url(array('path' => 'admin/cRUDImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images</span></a>
<ul class="main">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/cRUDImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images (CRUD)</span></a></li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/settingImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images (Settings)</span></a></li>
</ul>
</li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/settings/index'), $_smarty_tpl);
?>
"><span class="icom-cog"></span><span class="text">Settings</span></a></li>
</ul><?php
}
开发者ID:skullyframework,项目名称:skully-admin,代码行数:37,代码来源:73731bd5204d468ab658af16f1038ede0b7dfab1.file._mainMenu.tpl.php
示例14: content_54feaedb239000_00461935
function content_54feaedb239000_00461935($_smarty_tpl)
{
if (!is_callable('smarty_function_url')) {
include 'D:\\apache\\skully-amazon-s3\\vendor\\skullyframework\\skully\\Skully\\App\\smarty\\plugins\\function.url.php';
}
?>
<ul class="main">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/home/index'), $_smarty_tpl);
?>
"><span class="icom-screen"></span><span class="text">Main</span></a></li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/admins/index'), $_smarty_tpl);
?>
"><span class="icom-user3"></span><span class="text">Admins</span></a></li>
<li>
<a href="<?php
echo smarty_function_url(array('path' => 'admin/cRUDImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images</span></a>
<ul class="main">
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/cRUDImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images (CRUD)</span></a></li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/settingImages/index'), $_smarty_tpl);
?>
"><span class="icom-images"></span><span class="text">Images (Settings)</span></a></li>
</ul>
</li>
<li><a href="<?php
echo smarty_function_url(array('path' => 'admin/settings/index'), $_smarty_tpl);
?>
"><span class="icom-cog"></span><span class="text">Settings</span></a></li>
</ul><?php
}
开发者ID:skullyframework,项目名称:skully-amazon-s3,代码行数:37,代码来源:e841ac86e32424929d4e8c6881fbbf1a8ea957a4.file._mainMenu.tpl.php
示例15: smarty_core_load_plugins
<?php
/* Smarty version 2.6.20, created on 2015-10-26 18:27:37
compiled from links/block/top_index.html */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'url', 'links/block/top_index.html', 2, false))), $this);
?>
<!--<div id="link">
<div class="tit"><span><a href="<?php
echo smarty_function_url(array('url' => '/links/'), $this);
?>
">友情链接</a></span></div>
<div class="piclink">
<ul>
<?php
$_from = $this->_tpl_vars['arrLinkText'];
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
if (count($_from)) {
foreach ($_from as $this->_tpl_vars['arrTxt']) {
?>
<li>
<a href="<?php
echo $this->_tpl_vars['arrTxt']['webhost'];
?>
" title="<?php
echo $this->_tpl_vars['arrTxt']['summary'];
?>
" target="_blank"><?php
echo $this->_tpl_vars['arrTxt']['webname'];