code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php /** * 文件上传类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Upload { public $maxSize = 0; public $maxWidth = 0; public $maxHeight = 0; public $allowedTypes = ""; pub...
PHP
<?php /** * 验证 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Filter { /** * 检查Email地址 * * @param string $value * @return bool */ public static function isEma...
PHP
<?php /** * 动态分页类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Pagination { public $baseUrl = ''; public $totalRows = ''; public $pageSize = 20; public $numLinks = 5; public ...
PHP
<?php /** * 数据库常规动作类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Action { public $goUrl; private $data; private $id; private $Base; private $stayTime; private $te...
PHP
<?php /** * 程序测试类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Test { public $startTime = 0; public $stopTime = 0; public $spentTime = 0; /** * 初始化 * * @return void * @access ...
PHP
<?php /** * 控制器基类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Controller extends Base { function __construct () { parent::__construct(); $this->Load = & $GLOBALS['Load']; $this->U...
PHP
<?php /** * URI分析类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Uri { private $className; private $methodName; private $param; private $uriString; function __construct () { if (! emp...
PHP
<?php /** * 文档模型 - 模型类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class ChannelModel { public $id; public $data; /** * 调用getAddData()方法后,文档分页内容的总页数会缓存到这个属性 * * @var ...
PHP
<?php /** * 系统设置模型类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class HtmlModel { private $Db; function __construct () { $this->Db = model('Db'); } /** * 获取HTML ...
PHP
<?php /** * 用户抽像模型 - 模型类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ abstract class UserAbstractModel { private $error; protected $prefix; protected $Db; public $fields; ...
PHP
<?php /** * 文档 - 数据模型 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class ArchiveModel { public $id; public $data; private $Db; function __construct ($id = 0) { $thi...
PHP
<?php /** * 文档栏目 - 数据模型 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class CategoryModel { public $id; public $data; /** * 栏目递归获取父类目时,栏目数据累加到这个属性 * * @var int */...
PHP
<?php /** * 数据库 - 模型类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class DbModel extends Base { public $debug = FALSE; public $prefix; public $insertId = 0; public $table; public $...
PHP
<?php /** * 通用控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class CommonController extends Controller { function __construct () { parent::__construct(); } /** * 验证...
PHP
<?php /** * 前台访问控制器类 * * @package 01CMS * @subpackage www * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class DataController extends Controller { public $keyWord; public $templateDir; function __construct() { pa...
PHP
<?php /** * 前台动态访问首页 - 入口文件 * * 入口文件须定义以下常量(_PATH后缀表示物理路径,_DIR和_URL表示用于访问的地址): * * ROOT_PATH 安装路径 * ROOT_DIR 安装目录 * BOOT_DIR 入口目录 * BOOT_URL 入口地址 * PUBLIC_PATH 公共静态资源路径 * PUBLIC_DIR 公共静态资源目录 * APP_PATH 定义APP路径 * SYS_PATH 定义01MVC框架路径 * * @package 01CMS * @s...
PHP
<?php /** * 前台动态访问首页 - 入口文件 * * 入口文件须定义以下常量(_PATH后缀表示物理路径,_DIR和_URL表示用于访问的地址): * * ROOT_PATH 安装路径 * ROOT_DIR 安装目录 * BOOT_DIR 入口目录 * BOOT_URL 入口地址 * PUBLIC_PATH 公共静态资源路径 * PUBLIC_DIR 公共静态资源目录 * APP_PATH 定义APP路径 * SYS_PATH 定义01MVC框架路径 * * @package 01CMS * @s...
PHP
<?php /** * 后台 - 入口文件 * * 入口文件须定义以下常量: * * ROOT_PATH 服务器上的安装路径 * ROOT_DIR 用于访问的安装目录 * BOOT_DIR 用于访问的入口目录 * BOOT_URL 用于访问的入口地址 * PUBLIC_PATH 服务器上的站点公共静态资源路径 * PUBLIC_DIR 用于访问的站点公共静态资源目录 * APP_PATH 定义APP路径 * SYS_PATH 定义01MVC框架路径 * * @package 01CMS * @subpack...
PHP
<?php /** * HTML生成控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class HtmlController extends Controller { public $title = '更新内容'; public $Db; public $Model; public $all = FALSE; ...
PHP
<?php /** * 通用控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class CommonController extends Controller { function __construct () { parent::__construct(); } /** * 验证...
PHP
<?php /** * 默认控制器 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class IndexController extends Controller { function index () { redirect('admin'); } } //END
PHP
<?php /** * 后台系统管理 - 控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class AdminController extends Controller { public $title = '后台系统管理'; public $User; function __construct () { ...
PHP
<?php /** * 文件上传控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class FileController extends Controller { public $title = '文件管理'; function __construct () { parent::__construct();...
PHP
<?php /** * 文档系统 - 控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class ArchiveController extends Controller { public $title = '文档系统'; public $Db; function __construct () { ...
PHP
<?php /** * 系统设置控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class SettingController extends Controller { public $title = '全局设置'; function __construct () { parent::__construct...
PHP
<?php /** * 数据库管理控制器类 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class DatabaseController extends Controller { public $title = '数据库管理'; private $outputNum = 0; function __construct () ...
PHP
<?php /** * 列出模型自定义字段 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_block_field ($params, $content, $smarty, &$repeat) { static $fields; if (is_null($content)) { ...
PHP
<?php /** * FCKeditor * * @package 01CMS * @subpackage admin * @return bool */ function FCKeditor_IsCompatibleBrowser () { if (isset($_SERVER)) { $sAgent = $_SERVER['HTTP_USER_AGENT']; } else { global $HTTP_SERVER_VARS; if (isset($HTTP_SERVE...
PHP
<?php /** * 文档 - 函数 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Archive { public static function check($status) { } }
PHP
<?php /** * 后台用户模型 * * @package 01CMS * @subpackage admin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class UserModel extends UserAbstractModel { /** * 设置用户类型前缀 * * @return void */ protected function setUser...
PHP
<?php header('Content-type: text/html; charset=utf-8'); // The following variables values must reflect your installation needs. $aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows) //$aspell_prog = 'aspell'; // by FredCK (for Linux) $lang = 'en_US'; $aspell_opts =...
PHP
<?php if ( !isset( $_SERVER ) ) { $_SERVER = $HTTP_SERVER_VARS ; } if ( !isset( $_GET ) ) { $_GET = $HTTP_GET_VARS ; } if ( !isset( $_FILES ) ) { $_FILES = $HTTP_POST_FILES ; } if ( !defined( 'DIRECTORY_SEPARATOR' ) ) { define( 'DIRECTORY_SEPARATOR', strtoupper(substr(PHP_OS, 0, ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") ...
PHP
<?php /** * 安装程序入口文件 * * @package 01CMS * @subpackage install * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ //开发期间去掉以下两行注释 ini_set('display_errors', 'on'); error_reporting(E_ALL); //设定编码 header('Content-Type: text/html; charset=utf-8'); //...
PHP
<?php /** * 01CMS安装程序 * * @package 01CMS * @subpackage install * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class IndexController extends Controller { function __construct () { parent::__construct(); if (fi...
PHP
<?php /** * 全局配置文件 * * secret:安装时自动生成的加密字符串,请勿修改 * urlSuffix:URL伪后缀,用于URL重写时去掉入口文件名 */ return array ( 'secret' => 'f0767113f405339ff7c22055c7bd000a', 'urlSuffix' => '', 'mysql' => array ( 'hostname' => 'localhost', 'username' => 'root', 'password' => 'feawadsx', 'database' => '01cmsv10',...
PHP
<?php return array ( 'siteName' => '01CMS 网站内容管理系统', 'pageDelimiter' => '<div style="page-break-after: always;"><span style="display: none;">01cms</span></div>', 'pagesContentChannel' => 'article', 'pageSize' => '20', 'htmlSaveDir' => '/html', 'homepageTemplateName' => 'index.tpl', 'homepageFileName' => '...
PHP
<?php return array ( 'uploadPath' => 'Y/md', 'allowedTypes' => 'jpg|png|gif|rar|zip|doc|txt', 'maxSize' => '2048', 'createThumb' => '1', 'thumbWidth' => '200', 'thumbHeight' => '150', 'thumbPadColor' => '#FFFFFF', 'thumbMarker' => '_thumb', 'width' => '1024', 'height' => '768', 'wmText' => 'www.01...
PHP
<?php return array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel')...
PHP
<?php return array ( 1 => array ( 'name' => '办事指南', 'isHidden' => '0', 'type' => '1', 'alias' => 'banshizhinan', 'channelId' => '1', 'pageSize' => '20', 'categoryTemplateName' => 'articleList.tpl', 'archiveTemplateName' => 'articleShow.tpl', 'archiveUrl' => '/html/[alias]/%Y/%m%...
PHP
<?php return array ( 1 => array ( 'name' => '文章', 'tableId' => 'article', 'fieldList' => 'content|文章内容不能为空', 'categoryIds' => '1,2,3,4,5,6,8,9,10,11', ), 2 => array ( 'name' => '图集', 'tableId' => 'picture', 'fieldList' => 'content|图片内容不能为空', 'categoryIds' => '', ), 3 => ...
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>01CMS 提示信息</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <style> body { font-family: Verdana; font-size:13px; } h1...
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>01CMS ERROR</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <style> body { font-family: Verdana; font-size:13px; } h...
PHP
<?php /** * 系统引导文件 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ if (! defined('SYS_PATH')) { exit('SYS_PATH ERROR'); } try { require (SYS_PATH . '/lib/Load.php'); $Load = new Load(...
PHP
<?php /** * 全局函数和设置 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ //设定编码 header('Content-Type: text/html; charset=utf-8'); //设置时区 if (function_exists('date_default_timezone_set')) { date_default_ti...
PHP
<?php /** * 栏目列表 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_block_category ($params, $content, $smarty, &$repeat) { static $category = array(); if (is_null($content)) ...
PHP
<?php /** * 列出所有栏目的文档 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_block_block ($params, $content, $smarty, &$repeat) { static $category = array(); if (is_null($content)) { ...
PHP
<?php /** * 调用文档 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_block_archive ($params, $content, $smarty, &$repeat) { static $data = array(); if (is_null($content)) { ...
PHP
<?php /** * 打印HTML * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_modifier_printHtml ($string) { return htmlspecialchars(stripslashes($string)); }
PHP
<?php /** * 当前位置 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_function_categoryPosition ($params) { if (! isset($params['isLink'])) { $params['isLink'] = 1; } ...
PHP
<?php /** * 获取缩略图地址 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_modifier_thumb ($url) { return getThumb($url); }
PHP
<?php /** * 输出应用于title里的HTML * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_modifier_tipHtml ($string) { return nl2br(str_replace('"','\'',$string)); }
PHP
<?php /** * 栏目别名 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_modifier_alias ($id) { $category = Base::i()->Load->data('category'); return $category[$id]['alias']; }
PHP
<?php /** * 转换ID * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_modifier_translateId ($id,$var) { if (isset(Base::i()->{$var}[$id])) { return Base::i()->{$var}[$id]; } ...
PHP
<?php /** * 当前位置 * * @package 01CMS * @subpackage plugin * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ function smarty_function_categoryInfo ($params) { $Category = model('Category', $params['id']); if ($Category->type > 0) { ...
PHP
<?php /** * 加载数据类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Load { public $config = array(); public $var = array(); private $object = array(); private $conf = array(); ...
PHP
<?php /** * 静态分页类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class StaticPages { public $baseUrl = ''; public $firstFileName = ''; public $fileId = ''; public $fileExt = '.html'; ...
PHP
<?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * Converts to and from JSON format. * * JSON (JavaScript Object Notation) is a lightweight data-interchange * format. It is easy for humans to read and write. It is easy for machines * to parse and generate. It is based on a subset o...
PHP
<?php class String { private static $pinyins; function pinyin ($string, $head = 0, $close = 1) { $string = iconv('utf-8', 'gbk//ignore', $string); $returnString = ''; $string = trim($string); $slen = strlen($string); if ($slen < 2) { ...
PHP
<?php /** * 会话类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Session { /** * 写入Cookie * * @param string $key * @param string $value * @param int $keepTime 有效...
PHP
<?php /** * 文件写操作类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class Write { /** * 将PHP数组写入文件 * * @param string $filePath 文件路径 * @param array $array 数组值 * @param stri...
PHP
<?php /** * 图片处理类 * * @package 01CMS * @subpackage system * @author rolong at vip.qq.com * @version 1.0.0 * @link http://www.01cms.com */ class ImageLib { public $imageLibrary = 'gd2'; public $libraryPath = ''; public $dynamicOutput = FALSE; public $sourceImag...
PHP
<?php /** * Project: Smarty: the PHP compiling template engine * File: Smarty.class.php * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 ...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty debug_console function plugin * * Type: core<br> * Name: display_debug_console<br> * Purpose: display the javascript debug console window * @param array Format: null * @param Smarty */ function smarty_core_display_de...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * create full directory structure * * @param string $dir */ // $dir function smarty_core_create_dir_structure($params, &$smarty) { if (!file_exists($params['dir'])) { $_open_basedir_ini = ini_get('open_basedir'); if...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * determines if a resource is trusted or not * * @param string $resource_type * @param string $resource_name * @return boolean */ // $resource_type, $resource_name function smarty_core_is_trusted($params, &$smarty) { $_smarty_tru...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Extract non-cacheable parts out of compiled template and write it * * @param string $compile_path * @param string $template_compiled * @return boolean */ function smarty_core_write_compiled_include($params, &$smarty) ...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * load a resource plugin * * @param string $type */ // $type function smarty_core_load_resource_plugin($params, &$smarty) { /* * Resource plugins are not quite like the other ones, so they are * handled differently. The fi...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * delete a dir recursively (level=0 -> keep root) * WARNING: no tests, it will try to remove what you tell it! * * @param string $dirname * @param integer $level * @param integer $exp_time * @return boolean */ // $d...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Retrieves PHP script resource * * sets $php_resource to the returned resource * @param string $resource * @param string $resource_type * @param $php_resource * @return boolean */ function smarty_core_get_php_resource(&$params, &$s...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Replace cached inserts with the actual results * * @param string $results * @return string */ function smarty_core_process_cached_inserts($params, &$smarty) { preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * called for included php files within templates * * @param string $smarty_file * @param string $smarty_assign variable to assign the included template's * output into * @param boolean $smarty_once uses include_once if thi...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * delete an automagically created file by name and id * * @param string $auto_base * @param string $auto_source * @param string $auto_id * @param integer $exp_time * @return boolean */ // $auto_base, $auto_source = n...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * assemble filepath of requested plugin * * @param string $type * @param string $name * @return string|false */ function smarty_core_assemble_plugin_filepath($params, &$smarty) { static $_filepaths_cache = array(); $_plugin_fil...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * write out a file to disk * * @param string $filename * @param string $contents * @param boolean $create_dirs * @return boolean */ function smarty_core_write_file($params, &$smarty) { $_dirname = dirname($params['...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Get path to file from include_path * * @param string $file_path * @param string $new_file_path * @return boolean * @staticvar array|null */ // $file_path, &$new_file_path function smarty_core_get_include_path(&$params, &$smarty) {...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Replace nocache-tags by results of the corresponding non-cacheable * functions and return it * * @param string $compiled_tpl * @param string $cached_source * @return string */ function smarty_core_process_compiled_include($params, &...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Get seconds and microseconds * @return double */ function smarty_core_get_microtime($params, &$smarty) { $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = (double)($mtime[1]) + (double)($mtime[0]); return ($mt...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty assign_smarty_interface core plugin * * Type: core<br> * Name: assign_smarty_interface<br> * Purpose: assign the $smarty interface variable * @param array Format: null * @param Smarty */ function smarty_core_assign_s...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Prepend the cache information to the cache file * and write it * * @param string $tpl_file * @param string $cache_id * @param string $compile_id * @param string $results * @return true|null */ // $tpl_file, $cache_id, $compile_id...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Load requested plugins * * @param array $plugins */ // $plugins function smarty_core_load_plugins($params, &$smarty) { foreach ($params['plugins'] as $_plugin_info) { list($_type, $_name, $_tpl_file, $_tpl_line, $_delayed...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * read a cache file, determine if it needs to be * regenerated or not * * @param string $tpl_file * @param string $cache_id * @param string $compile_id * @param string $results * @return boolean */ // $tpl_file, $cache_id, $compile...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * determines if a resource is secure or not. * * @param string $resource_type * @param string $resource_name * @return boolean */ // $resource_type, $resource_name function smarty_core_is_secure($params, &$smarty) { if (!$smarty-...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Handle insert tags * * @param array $args * @return string */ function smarty_core_run_insert_handler($params, &$smarty) { require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); if ($smarty->debugging) { $_params = ...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * write the compiled resource * * @param string $compile_path * @param string $compiled_content * @return true */ function smarty_core_write_compiled_resource($params, &$smarty) { if(!@is_writable($smarty->compile_dir)) { //...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty {config_load} function plugin * * Type: function<br> * Name: config_load<br> * Purpose: load config file vars * @link http://smarty.php.net/manual/en/language.function.config.load.php {config_load} * (Smarty onl...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty {html_table} function plugin * * Type: function<br> * Name: html_table<br> * Date: Feb 17, 2003<br> * Purpose: make an html table from an array of data<br> * Input:<br> * - loop = array t...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty {assign} compiler function plugin * * Type: compiler function<br> * Name: assign<br> * Purpose: assign a value to a template variable * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCT...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty count_words modifier plugin * * Type: modifier<br> * Name: count_words<br> * Purpose: count the number of words in a text * @link http://smarty.php.net/manual/en/language.modifier.count.words.php * count_wor...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty count_sentences modifier plugin * * Type: modifier<br> * Name: count_sentences * Purpose: count the number of sentences in a text * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php * ...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty {html_checkboxes} function plugin * * File: function.html_checkboxes.php<br> * Type: function<br> * Name: html_checkboxes<br> * Date: 24.Feb.2003<br> * Purpose: Prints out a list of checkbox input t...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty wordwrap modifier plugin * * Type: modifier<br> * Name: wordwrap<br> * Purpose: wrap a string of text at a given length * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php * wordwrap (Smar...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty {cycle} function plugin * * Type: function<br> * Name: cycle<br> * Date: May 3, 2002<br> * Purpose: cycle through given values<br> * Input: * - name = name of cycle (optional) * - values = comma ...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty strip_tags modifier plugin * * Type: modifier<br> * Name: strip_tags<br> * Purpose: strip html tags from text * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php * strip_tags (Smarty onl...
PHP