code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php defined('IN_PHPCMS') or exit('No permission resources.');?> <table cellpadding="2" cellspacing="1" width="98%"> <tr> <td width="100">文本框长度</td> <td><input type="text" name="setting[size]" value="<?php echo $setting['size'];?>" size="10" class="input-text"></td> </tr> <tr> <td>默认值<...
PHP
<?php class formguide_output { var $fields; var $data; function __construct($formid) { $this->formid = $formid; $this->fields = getcache('formguide_field_'.$formid, 'model'); $this->siteid = get_siteid(); } function get($data) { $this->data = $data; $this->id = $data['id']; $info = arr...
PHP
function box($field, $value, $fieldinfo) { $setting = string2array($fieldinfo['setting']); if($value=='') $value = $this->fields[$field]['defaultvalue']; $options = explode("\n",$this->fields[$field]['options']); foreach($options as $_k) { $v = explode("|",$_k); $k = trim($v[1]); $option[$k] = ...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); $field_type = 'int'; //字段数据库类型 $field_allow_index = 1; //是否允许建立索引 $field_minlength = 1; //字符长度默认最小值 $field_maxlength = ''; //字符长度默认最大值 $field_allow_search = 1; //作为搜索条件 $field_allow_isunique = 0; //是否允许值唯一 ?>
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.');?> <table cellpadding="2" cellspacing="1" width="98%"> <tr> <td width="100">选项列表</td> <td><textarea name="setting[options]" rows="2" cols="20" id="options" style="height:100px;width:200px;"><?php echo $setting['options'];?></textarea></td>...
PHP
function box($field, $value) { extract(string2array($this->fields[$field]['setting'])); if($outputtype) { return $value; } else { $options = explode("\n",$this->fields[$field]['options']); foreach($options as $_k) { $v = explode("|",$_k); $k = trim($v[1]); $option[$k] = $v[0]; }...
PHP
function box($field, $value) { if($this->fields[$field]['boxtype'] == 'checkbox') { if(!is_array($value) || empty($value)) return false; array_shift($value); $value = implode(',', $value); return $value; } elseif($this->fields[$field]['boxtype'] == 'multiple') { if(is_array($value) && count($...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); $this->db->query("ALTER TABLE `$tablename` DROP `$field`"); ?>
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); $defaultvalue = isset($_POST['setting']['defaultvalue']) ? $_POST['setting']['defaultvalue'] : ''; $minnumber = isset($_POST['setting']['minnumber']) ? $_POST['setting']['minnumber'] : 1; $decimaldigits = isset($_POST['setting']['decimaldigits']) ? $_PO...
PHP
function datetime($field, $value, $fieldinfo) { extract(string2array($fieldinfo['setting'])); $isdatetime = 0; if($fieldtype=='int') { if(!$value) $value = SYS_TIME; $format_txt = $format == 'm-d' ? 'm-d' : $format; $value = date($format_txt,$value); $isdatetime = strlen($format) > 6 ? 1 : 0; ...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); $field_type = 'int'; //字段数据库类型 $field_allow_index = 1; //是否允许建立索引 $field_minlength = 1; //字符长度默认最小值 $field_maxlength = ''; //字符长度默认最大值 $field_allow_search = 1; //作为搜索条件 $field_allow_isunique = 0; //是否允许值唯一 ?>
PHP
<table cellpadding="2" cellspacing="1" bgcolor="#ffffff"> <tr> <td><strong>时间格式:</strong></td> <td> <input type="radio" name="setting[fieldtype]" value="date" checked>日期(<?php echo date('Y-m-d')?>)<br /> <input type="radio" name="setting[fieldtype]" value="datetime">日期+时间(<?php echo date('Y-m-d...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.');?> <table cellpadding="2" cellspacing="1" bgcolor="#ffffff"> <tr> <td><strong>时间格式:</strong></td> <td> <input type="radio" name="setting[fieldtype]" value="date" <?php if($setting['fieldtype']=='date') echo 'checked';?>>日期(<?=date('Y-m...
PHP
function datetime($field, $value) { $setting = string2array($this->fields[$field]['setting']); extract($setting); if($fieldtype=='date' || $fieldtype=='datetime') { return $value; } else { $format_txt = $format; } if(strlen($format_txt)<6) { $isdatetime = 0; } else { $isdatetime = ...
PHP
function datetime($field, $value) { $setting = string2array($this->fields[$field]['setting']); if($setting['fieldtype']=='int') { $value = strtotime($value); } return $value; }
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); ?>
PHP
<?php error_reporting(E_ALL); defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $parentid = $menu_db->insert(array('name'=>'formguide', 'parentid'=>29, 'm'=>'formguide', 'c'=>'formguide', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true); $menu_db->insert(a...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $module = 'formguide'; $modulename = '表单向导模块'; $introduce = '独立模块'; $author = 'phpcms Team'; $authorsite = 'http://www.phpcms.cn'; $authoremail = ''; ?>
PHP
<?php /*Language Format: Add a new file(.lang.php) with your module name at /phpcms/languages/ translation save at the array:$LANG */ //add field $LANG['formguide'] = '表单向导'; $LANG['input_form_title'] = '请输入表单向导名称!'; $LANG['title_min_3_chars'] = '表单向导至少3个汉字以上'; $LANG['right'] = '输入正确!'; $LAN...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('UNINSTALL') or exit('Access Denied'); ?>
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_app_class('admin', 'admin', 0); class index extends admin { private $config; public function __construct() { $this->config = getcache('cnzz', 'commons'); } public function init() { if (empty($this->config)) { showmessa...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); return false; ?>
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $menu_db->insert(array('name'=>'cnzz', 'parentid'=>'977', 'm'=>'cnzz', 'c'=>'index', 'a'=>'init', 'data'=>'', 'listorder'=>16, 'display'=>'1')); $language = array('cnzz'=>'CNZZ统计'); ?>
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $module = 'cnzz'; $modulename = 'cnzz统计'; $introduce = '由国内领先的统计提供商cnzz,提供的全景统计。'; $author = 'phpcms team'; $authorsite = 'http://www.phpcms.cn'; $authoremail = ''; ?>
PHP
<?php $LANG['reg_msg'] = '您还的网站还没有申请CNZZ统计,是否现在申请?<br><br><input type="button" onclick="location.href=\'?m=cnzz&c=index&a=public_regcnzz\'" value=" 马 上 开 通 "> <input type="button" onclick="history.back();" value=" 暂 不 开 通 ">'; $LANG['application_fails'] = '申请失败,请稍候再试。'; $LANG['donot_connect_server'] = '无法成功连接cnzz服务器...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('UNINSTALL') or exit('Access Denied'); return array('wap'); ?>
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('UNINSTALL') or exit('Access Denied'); ?>
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header', 'admin'); ?> <div class="pad-10"> <form action="?m=wap&c=wap_admin&a=add" method="post" id="myform"> <input type="hidden" value='<?php echo $siteid?>' name="siteid"> <fieldset> <legend><?php echo L('basic_confi...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header','admin');?> <div class="pad-lr-10"> <form name="myform2" action="?m=wap&c=wap_admin&a=type_manage&siteid=<?php echo $siteid?>" method="post"> <table width="100%" cellspacing="0" class="search-form"> <tbody> <tr...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header','admin');?> <div class="pad-lr-10"> <div class="table-list"> <table width="100%" cellspacing="0"> <thead> <tr> <th width="10%" align="left">SITEID</th> <th width="">...
PHP
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header', 'admin'); ?> <div class="pad-10"> <form action="?m=wap&c=wap_admin&a=edit" method="post" id="myform"> <input type="hidden" value='<?php echo $siteid?>' name="siteid"> <fieldset> <legend><?php echo L('basic_conf...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_app_func('global'); pc_base::load_sys_class('format', '', 0); class index { function __construct() { $this->db = pc_base::load_model('content_model'); $this->siteid = isset($_GET['siteid']) && (intval($_GET['siteid']) > 0) ? in...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); class wap_url{ private $urlrules,$categorys,$html_root; public function __construct() { self::set_siteid(); } /** * WAP内容页链接 */ public function show($id, $page = 0, $catid = 0, $typeid = 0, $prefix = '',$data = '',$action = 'edit') { ...
PHP
<?php class wap_tag { //数据库连接 private $db; public function __construct() { $this->db = pc_base::load_model('content_model'); $this->position = pc_base::load_model('position_data_model'); } /** * 初始化模型 * @param $catid 栏目id */ public function set_modelid($catid) { $siteids = getcache('ca...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); return array('wap'); ?>
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $parentid = $menu_db->insert(array('name'=>'wap', 'parentid'=>29, 'm'=>'wap', 'c'=>'wap_admin', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true); $menu_db->insert(array('name'=>'wap_add', 'parentid'=>$...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); defined('INSTALL') or exit('Access Denied'); $module = 'wap'; $modulename = '手机门户'; $introduce = '独立模块'; $author = 'phpcms Team'; $authorsite = 'http://www.phpcms.cn'; $authoremail = ''; ?>
PHP
<?php /*Language Format: Add a new file(.lang.php) with your module name at /phpcms/languages/ translation save at the array:$LANG */ $LANG['wap_del_cofirm'] = '确认删除?'; $LANG['phpcms_friends'] = '手机网友'; $LANG['confirm_delete'] = '确认删除选择的分类吗?'; $LANG['wap_add_site'] = '添加手机站点'; $LANG['parameter_error'] = '参...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_app_class('admin','admin',0); pc_base::load_sys_class('form', '', 0); class wap_admin extends admin { private $db,$type_db; function __construct() { parent::__construct(); $this->sites = pc_base::load_app_class('sites','admin'...
PHP
<?php /** * 输出xml头部信息 */ function wmlHeader() { echo "<?xml version=\"1.0\" encoding=\"".CHARSET."\"?>\n"; } /** * 解析分类url路径 */ function list_url($typeid) { return WAP_SITEURL."&amp;a=lists&amp;typeid=$typeid"; } function bigimg_url($url,$w='') { return WAP_SITEURL.'&amp;a=big_image&amp;url='....
PHP
<?php return array ( 'name' => '108wo室内设计数据资源中心模板', 'author' => '领域互动', 'dirname' => '108wo', 'homepage' => '#', 'version' => '1.0', 'disable' => 0, 'file_explan' => array ( 'templates|default|content' => array ( 'category.html' => '文章频道页', 'category_download.html' => '下载频道页', ...
PHP
<?php return array ( 'name' => '默认模板', 'author' => 'PHPCMS TEAM', 'dirname' => 'default', 'homepage' => 'http://www.phpcms.cn/', 'version' => '1.0', 'disable' => 1, 'file_explan' => array ( 'templates|default|content' => array ( 'category.html' => '文章频道页', 'category_download.html' ...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); class plugin_admin { function __construct($pluginid) { $this->pluginid = $pluginid; $this->op = pc_base::load_app_class('plugin_op'); $this->auth_db = pc_base::load_plugin_model('weibo_auth_info_model'); } public function o...
PHP
<?php /** * cache_factory.class.php 缓存工厂类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ final class cache_factory { /** * 当前缓存工厂类静态实例 */ private static $cache_factory; /** * 缓存配置列表 */ protected $cache_config = arr...
PHP
<?php /** * mysql.class.php 数据库实现类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ final class mysql { /** * 数据库配置信息 */ private $config = null; /** * 数据库连接资源句柄 */ public $link = null; /** * 最近一次查询资源句柄 */ ...
PHP
<?php /** * access.class.php 数据库实现类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ final class db_access { /** * 数据库配置信息 */ private $config = null; /** * 数据库连接资源句柄 */ public $link = null; /** * 最近一次查询资源句柄 ...
PHP
<?php class hook { static function glogal_header() {} static function glogal_footer() {} static function glogal_menu() {} static function admin_content_init() {} static function admin_top_left_menu() {} } ?>
PHP
<?php class cache_file { /*缓存默认配置*/ protected $_setting = array( 'suf' => '.cache.php', /*缓存文件后缀*/ 'type' => 'array', /*缓存格式:array数组,serialize序列化,null字符串*/ ); /*缓存路径*/ protected $filepath = ''; /** * 构造函数 * @param array $setting 缓存配置 * @return void */ public function __const...
PHP
<?php class import_test { /** * 通用数据转换程序 * * @param $timestamp * @param $showtime */ var $con; /* * 测试数据库连接 */ public static function testdb($dbtype, $dbhost, $dbuser, $dbpw, $dbname) { global $con; $db_conf = array(); $db_conf['import_array'] = array(); $db_conf['im...
PHP
<?php class form { /** * 编辑器 * @param int $textareaid * @param int $toolbar * @param string $module 模块名称 * @param int $catid 栏目id * @param int $color 编辑器颜色 * @param boole $allowupload 是否允许上传 * @param boole $allowbrowser 是否允许浏览文件 * @param string $alowuploadexts 允许上传类型 * @param string $...
PHP
<?php class cache_memcache { private $memcache = null; public function __construct() { $this->memcache = new Memcache; $this->memcache->connect(MEMCACHE_HOST, MEMCACHE_PORT, MEMCACHE_TIMEOUT); } public function memcache() { $this->__construct(); } public function get($name) { $value = ...
PHP
<?php /** * 通用的树型类,可以生成任何树型结构 */ class tree { /** * 生成树型结构所需要的2维数组 * @var array */ public $arr = array(); /** * 生成树型结构所需修饰符号,可以换成图片 * @var array */ public $icon = array('│','├','└'); public $nbsp = "&nbsp;"; /** * @access private */ public $ret = ''; /** * 构造函数,初始化类 * @para...
PHP
<?php /** * db_factory.class.php 数据库工厂类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ final class db_factory { /** * 当前数据库工厂类静态实例 */ private static $db_factory; /** * 数据库配置列表 */ protected $db_config = array(); ...
PHP
<?php /** * 模板解析缓存 */ final class template_cache { /** * 编译模板 * * @param $module 模块名称 * @param $template 模板文件名 * @param $istag 是否为标签模板 * @return unknown */ public function template_compile($module, $template, $style = 'default') { if(strpos($module, '/')=== false) { $tplfile ...
PHP
<?php /** * param.class.php 参数处理类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-7 */ class param { //路由配置 private $route_config = ''; public function __construct() { if(!get_magic_quotes_gpc()) { $_POST = new_addslashes($_POST);...
PHP
<?php /** * 中文分词操作类 * @author wangcanjia * */ class segment { public $rank_dic = array(); public $one_name_dic = array(); public $two_name_dic = array(); public $new_word = array(); public $source_string = ''; public $result_string = ''; public $split_char = ' '; //分隔符 public $SplitLen = 4; //...
PHP
<?php /** * application.class.php PHPCMS应用程序创建类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-7 */ class application { /** * 构造函数 */ public function __construct() { $param = pc_base::load_sys_class('param'); define('ROUTE_M', $...
PHP
<?php defined('IN_PHPCMS') or exit('Access Denied'); class access{ var $querynum = 0; var $conn; var $insertid = 0; var $cursor = 0; //var $ADODB_FETCH_MODE = ADODB_FETCH_BOTH; /** * 最近一次查询资源句柄 */ public $lastqueryid = null; function connect($dbhost, $dbuser = '', $dbpw = '', $dbname = '', $pc...
PHP
<?php /** * 图像处理 */ class image { var $w_pct = 100; var $w_quality = 80; var $w_minwidth = 300; var $w_minheight = 300; var $thumb_enable; var $watermark_enable; var $interlace = 0; var $siteinfo = array(); function __construct($thumb_enable = 0 ,$siteid) { $this->thumb_enable = $thum...
PHP
<?php class attachment { var $contentid; var $module; var $catid; var $attachments; var $field; var $imageexts = array('gif', 'jpg', 'jpeg', 'png', 'bmp'); var $uploadedfiles = array(); var $downloadedfiles = array(); var $error; var $upload_root; var $siteid; var $site = array(); functio...
PHP
<?php class session_files { function __construct() { $path = pc_base::load_config('system', 'session_n') > 0 ? pc_base::load_config('system', 'session_n').';'.pc_base::load_config('system', 'session_savepath') : pc_base::load_config('system', 'session_savepath'); ini_set('session.save_handler', 'files'); ...
PHP
<?php class format { /** * 日期格式化 * * @param $timestamp * @param $showtime */ public static function date($timestamp, $showtime = 0) { $times = intval($timestamp); if(!$times) return true; $lang = pc_base::load_config('system','lang'); if($lang == 'zh-cn') { $str = $showtime ? date('...
PHP
<?php /** * session mysql 数据库存储类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-8 */ class session_mysql { var $lifetime = 1800; var $db; var $table; /** * 构造函数 * */ public function __construct() { $this->db = pc_base::load_m...
PHP
<?php class http { var $method; var $cookie; var $post; var $header; var $ContentType; var $errno; var $errstr; function __construct() { $this->method = 'GET'; $this->cookie = ''; $this->post = ''; $this->header = ''; $this->errno = 0; $this->errstr = ''; } function pos...
PHP
<?php /** * model.class.php 数据模型基类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-7 */ pc_base::load_sys_class('db_factory', '', 0); class model { //数据库配置 protected $db_config = ''; //数据库连接 protected $db = ''; //调用数据库的配置项 protec...
PHP
<?php class update { var $modules; var $update_url; var $http; function __construct() { $this->update_url = 'http://update.v9.phpcms.cn/index.php'; $this->http = pc_base::load_sys_class('http','',1); $this->uuid = $this->check_uuid(); } function check(){ $url = $this->url('check'); ...
PHP
<?php /** * FTP操作类 * @author chenzhouyu * *使用$ftps = pc_base::load_sys_class('ftps');进行初始化。 *首先通过 $ftps->connect($host,$username,$password,$post,$pasv,$ssl,$timeout);进行FTP服务器连接。 *通过具体的函数进行FTP的操作。 *$ftps->mkdir() 创建目录,可以创建多级目录以“/abc/def/higk”的形式进行多级目录的创建。 *$ftps->put()上传文件 *$ftps->rmdir()删除目录 *$ftps...
PHP
<?php /** * ip_area.class.php 根据ip地址获取ip所在地区的类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-7 */ class ip_area { public $fp = NULL; //定义文件指针 public $func; //处理的方法 private $offset; private $index; /** * 构造函数 * */ ...
PHP
<?php /** * @author wangtiecheng(jim_@live.cn) * @link http://www.phpcms.cn http://www.ku6.cn * @copyright 2005-2009 PHPCMS/KU6 Software LLCS * @license http://www.phpcms.cn/license/ * @datetime Wed Aug 05 18:37:10 CST 2009 * @lastmodify Wed Aug 05 18:37:10 CST 2009 * ---------------------...
PHP
<?php /** * push_factory.class.php 推送信息工厂类 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-8-2 */ final class push_factory { /** * 推送信息工厂类静态实例 */ private static $push_factory; /** * 接口实例化列表 */ protected $api_list = array(...
PHP
<?php /** * 生成验证码 * @author chenzhouyu * 类用法 * $checkcode = new checkcode(); * $checkcode->doimage(); * //取得验证 * $_SESSION['code']=$checkcode->get_code(); */ class checkcode { //验证码的宽度 public $width=130; //验证码的高 public $height=50; //设置字体的地址 private $font; //设置字体色 public $font_...
PHP
<?php define('CODETABLEDIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'encoding'.DIRECTORY_SEPARATOR); /** * utf8转gbk * @param $utfstr */ function utf8_to_gbk($utfstr) { global $UC2GBTABLE; $okstr = ''; if(empty($UC2GBTABLE)) { $filename = CODETABLEDIR.'gb-unicode.table'; $fp = fopen($filename, 'rb');...
PHP
<?php /** * 转化 \ 为 / * * @param string $path 路径 * @return string 路径 */ function dir_path($path) { $path = str_replace('\\', '/', $path); if(substr($path, -1) != '/') $path = $path.'/'; return $path; } /** * 创建目录 * * @param string $path 路径 * @param string $mode 属性 * @return string 如果已经存在则返回true,否则...
PHP
<?php /** * global.func.php 公共函数库 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ /** * 返回经addslashes处理过的字符串或数组 * @param $string 需要处理的字符串或数组 * @return mixed */ function new_addslashes($string){ if(!is_array($string)) return addsla...
PHP
<?php /** * 邮件发送函数 * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ function runlog($mode = 'SMTP',$b = '',$c = '',$d='') { } /** * 发送邮件 * @param $toemail 收件人email * @param $subject 邮件主题 * @param $message 正文 * @param $from 发件人 * @...
PHP
<?php /** * plugin.func.php 公共函数库 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-6-1 */ function pluginkey_check($key) { return preg_match("/^[a-z]+[a-z0-9_]*$/i", $key); } /** * 插件语言包 * Enter description here ... * @param unknown_type...
PHP
<?php /** * extention.func.php 用户自定义函数库 * * @copyright (C) 2005-2010 PHPCMS * @license http://www.phpcms.cn/license/ * @lastmodify 2010-10-27 */ /** * 获取指定分类下的产品数量 */ function getProductNum($catids, $modelid, $bid="") { $db = pc_base::load_model('content_model'); $db->set_model($model...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class comment_model extends model { public $table_name; public $old_table_name; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'comment'; $...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class comment_check_model extends model { public $table_name; public $old_table_name; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'comment'...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class sitemodel_field_model extends model { public $table_name = ''; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_n...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class workflow_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'workflow'; parent::__con...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class attachment_index_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'attachment_index'; ...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class position_model extends model { public $table_name = ''; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = '...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class sso_members_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'sso_members'; parent:...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class extend_setting_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'extend_setting'; p...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); if(!defined('CACHE_MODEL_PATH')) define('CACHE_MODEL_PATH',CACHE_PATH.'caches_model'.DIRECTORY_SEPARATOR.'caches_data'.DIRECTORY_SEPARATOR); /** * 内容模型数据库操作类 */ pc_base::load_sys_class('model', '', 0); class MY_content_model extends model { pu...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class poster_stat_model extends model { function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'poster_'.date('Ym'); parent:...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class hits_model extends model { public $table_name = ''; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'hits...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class attachment_model extends model { private $att_index_db; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = '...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class tag_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'tag'; parent::__construct(); ...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class plugin_model extends model { public $table_name; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'plug...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class times_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'times'; parent::__construct...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class myhelp_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'myhelp'; parent::__construct(); }...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class block_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'block'; parent::__construct...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class message_data_model extends model { function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'message_data'; $this->_user...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class admin_role_priv_model extends model { public $table_name = ''; function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = '...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class vote_data_model extends model { function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'vote_data'; parent::__construc...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class ps_members_model extends model { public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'phpsso'; $this->table_name = 'members'; parent::__con...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class copyfrom_model extends model { function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'copyfrom'; parent::__construct(...
PHP
<?php defined('IN_PHPCMS') or exit('No permission resources.'); pc_base::load_sys_class('model', '', 0); class badword_model extends model { public $table_name = ''; public function __construct() { $this->db_config = pc_base::load_config('database'); $this->db_setting = 'default'; $this->table_name = 'b...
PHP