code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php function underscore_replace($soap_data){ $replacement = array('cpp_header_image' => 'cpp-header-image'); foreach ($replacement as $key => $value) { $soap_data = str_replace($key,$value,$soap_data); } return $soap_data; } ?>
PHP
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | /...
PHP
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | /...
PHP
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | /...
PHP
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | /...
PHP
<?php /** * @package PayPal * * $Id: Error.php,v 1.1 2011/09/18 05:16:15 iling Exp $ */ /** * Load parent class. */ require_once 'PEAR.php'; /** * A standard PayPal Error object * * @package PayPal */ class PayPal_Error extends PEAR_Error { /** * Standard error constructor * ...
PHP
<?php /**************************************************** SDKProxyProperties.php This is the configuration file for the Proxy setup. This file defines the parameters needed to make an API call through Proxy. Called by HTTP.php. ****************************************************/ /** USE_PROXY: Set this...
PHP
<?php /** * File containing the API calling code. Partially generated from the * WSDL - CallerServices.php.in contains the base file with a * placeholder for generated functions and the WSDL version. * * @package PayPal */ /** * Load files we depend on. */ require_once 'PayPal.php'; require_once 'PayPal/SOAP/C...
PHP
<?php /* * Created on Dec 2, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class CartProduct { private $id; private $name; private $price; private $finalPrice; private $model; private $quantity; private ...
PHP
<?php /* * Created on Dec 2, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class OrdersAccount { private $allTotal; private $taxTotal; private $shippingTotal; private $saveOff; private $productTotal; public functio...
PHP
<?php /* * Created on Dec 2, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class CartProductAttribute { private $id; // value ID private $key; private $value; private $price; private $pricePrefix; public func...
PHP
<?php /* * Created on Dec 2, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("CouponImpl.php"); //--> coupon impl include_once("CouponCustomer.php"); include_once("CouponDomain.php"); //--> coupon domain ...
PHP
<?php /* * Created on Dec 3, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class OrdersInfo { const EXPRESS_CHECKOUT = "ExpressCheckout"; const DIRECT_PAYMENT = "DirectPayment"; const MONEY_ORDER = "moneyOrder"; p...
PHP
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); inc...
PHP
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); inc...
PHP
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); inc...
PHP
<?php sleep(1); ?> <p><strong>This content was loaded via ajax, though it took a second.</strong></p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec turpis justo, et facilisis ligula. In congue interdum odio, a scelerisque eros posuere ac. Aenean massa tellus, dictum sit amet laoreet ut, aliquam...
PHP
<?php header("HTTP/1.0 404 Not Found"); ?>
PHP
<?php sleep( 3 ); // no term passed - just exit early with no response if (empty($_GET['term'])) exit ; $q = strtolower($_GET["term"]); // remove slashes if they were magically added if (get_magic_quotes_gpc()) $q = stripslashes($q); $items = array( "Great Bittern"=>"Botaurus stellaris", "Little Grebe"=>"Tachybaptus ...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta...
PHP
<?php session_start(); $password=$_POST['password']; $email=$_POST['email']; if($_POST['submit']) { if($email!="" && $password!="") { $con=mysql_connect("localhost", "root", ""); mysql_select_db("pv-gallery"); $sql = "SELECT * FROM `admin_users` where`email`='$email' and `password`='$passwo...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <?php $con=mysql_connect("localhost", "root", ""); mysql_select_db("pv-gallery"); $id=$_GET['id']; $sql = "SELECT * FROM `users` where `id`=$id"; $result=mysql_query($sql); $row=mysql_fetch_assoc($result); ?> <h...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login.php"); ?> <?php //step 1 (connection) $con=mysql_connect("localhost", "root", ""); //step 2 (database) mysql_select_db("test"); $id=$_GET['id']; $sql="delete from `test`.`table`where`table`.`id`=$id"; mysql_query($sql); //ec...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login.php"); ?> <?php //step 1 (connection) $con=mysql_connect("localhost", "root", ""); //step 2 (database) mysql_select_db("test"); $password=$_POST['password']; $f_name=$_POST['f_name']; $l_name=$_POST['l_name']; $email=$_POST['email'];...
PHP
<?php session_start(); $password=$_POST['password']; $email=$_POST['email']; //echo"log in success!"; //set session $_SESSION['login']=0; $_SESSION['email']=""; session_destroy(); header("location: login_r.php"); ?>
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>pv-gallery</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login_r.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta...
PHP
<?php session_start(); if(!$_SESSION['login']) header("location: login.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta n...
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 AppController extends Controller { public $title = '应用程序'; public $Db; function __construct () { par...
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 ProgramController extends Controller { public $title = '程序管理'; public $Db; public $modulesPath; public $modules...
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' => '01cms', ...
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