当前位置: 首页>>代码示例>>PHP>>正文


PHP pc_base::load_model方法代码示例

本文整理汇总了PHP中pc_base::load_model方法的典型用法代码示例。如果您正苦于以下问题:PHP pc_base::load_model方法的具体用法?PHP pc_base::load_model怎么用?PHP pc_base::load_model使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pc_base的用法示例。


在下文中一共展示了pc_base::load_model方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->reviews_db = pc_base::load_model('reviews_model');
     $this->reviews_setting_db = pc_base::load_model('reviews_setting_model');
     $this->reviews_data_db = pc_base::load_model('reviews_data_model');
     $this->reviews_table_db = pc_base::load_model('reviews_table_model');
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:7,代码来源:reviews_tag.class.php

示例2: __construct

 /**
  * 构造函数
  * 
  */
 public function __construct()
 {
     $this->db = pc_base::load_model('session_model');
     $this->lifetime = pc_base::load_config('system', 'session_ttl');
     session_set_save_handler(array(&$this, 'open'), array(&$this, 'close'), array(&$this, 'read'), array(&$this, 'write'), array(&$this, 'destroy'), array(&$this, 'gc'));
     session_start();
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:11,代码来源:session_mysql.class.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('sitemodel_field_model');
     $this->model_db = pc_base::load_model('sitemodel_model');
     $this->siteid = $this->get_siteid();
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:formguide_field.php

示例4: __construct

	function __construct() {
		parent::__construct();
		$this->siteid = $this->get_siteid();
		$this->db = pc_base::load_model('search_model');
		$this->module_db = pc_base::load_model('module_model');
		$this->type_db = pc_base::load_model('type_model');
	}
开发者ID:hxzyzz,项目名称:ddc,代码行数:7,代码来源:search_admin.php

示例5: update_cache_model

 /**
  * 更新模型缓存
  */
 public static function update_cache_model()
 {
     $sitemodel_db = pc_base::load_model('sitemodel_model');
     $data = $sitemodel_db->select(array('type' => 2), "*", 1000, 'sort', '', 'modelid');
     setcache('member_model', $data, 'commons');
     if (!defined('MODEL_PATH')) {
         //模型原型存储路径
         define('MODEL_PATH', PC_PATH . 'modules' . DIRECTORY_SEPARATOR . 'member' . DIRECTORY_SEPARATOR . 'fields' . DIRECTORY_SEPARATOR);
     }
     if (!defined('CACHE_MODEL_PATH')) {
         //模型缓存路径
         define('CACHE_MODEL_PATH', PHPCMS_PATH . 'caches' . DIRECTORY_SEPARATOR . 'caches_model' . DIRECTORY_SEPARATOR . 'caches_data' . DIRECTORY_SEPARATOR);
     }
     require MODEL_PATH . 'fields.inc.php';
     //更新内容模型类:表单生成、入库、更新、输出
     $classtypes = array('form', 'input', 'update', 'output');
     foreach ($classtypes as $classtype) {
         $cache_data = file_get_contents(MODEL_PATH . 'member_' . $classtype . '.class.php');
         $cache_data = str_replace('}?>', '', $cache_data);
         foreach ($fields as $field => $fieldvalue) {
             if (file_exists(MODEL_PATH . $field . DIRECTORY_SEPARATOR . $classtype . '.inc.php')) {
                 $cache_data .= file_get_contents(MODEL_PATH . $field . DIRECTORY_SEPARATOR . $classtype . '.inc.php');
             }
         }
         $cache_data .= "\r\n } \r\n?>";
         file_put_contents(CACHE_MODEL_PATH . 'member_' . $classtype . '.class.php', $cache_data);
         chmod(CACHE_MODEL_PATH . 'member_' . $classtype . '.class.php', 0777);
     }
     return true;
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:33,代码来源:member_cache.class.php

示例6: __construct

 function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('workflow_model');
     $this->admin_db = pc_base::load_model('admin_model');
     $this->siteid = $this->get_siteid();
 }
开发者ID:qingae,项目名称:huluphp,代码行数:7,代码来源:workflow.php

示例7: __construct

 /**
  * 构造函数
  */
 public function __construct()
 {
     $this->db = pc_base::load_model('member_model');
     pc_base::load_app_func('global');
     /*获取系统配置*/
     $this->settings = getcache('settings', 'admin');
     $this->applist = getcache('applist', 'admin');
     if (isset($_GET) && is_array($_GET) && count($_GET) > 0) {
         foreach ($_GET as $k => $v) {
             if (!in_array($k, array('m', 'c', 'a'))) {
                 $_POST[$k] = $v;
             }
         }
     }
     if (isset($_POST['appid'])) {
         $this->appid = intval($_POST['appid']);
     } else {
         exit('0');
     }
     if (isset($_POST['data'])) {
         parse_str(sys_auth($_POST['data'], 'DECODE', $this->applist[$this->appid]['authkey']), $this->data);
         if (!is_array($this->data)) {
             exit('0');
         }
     } else {
         exit('0');
     }
     if (isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
         $this->data['avatardata'] = $GLOBALS['HTTP_RAW_POST_DATA'];
         if ($this->applist[$this->appid]['authkey'] != $this->data['ps_auth_key']) {
             exit('0');
         }
     }
 }
开发者ID:pondyond,项目名称:phpcmsv9,代码行数:37,代码来源:phpsso.class.php

示例8: __construct

	function __construct() {
		$this->db = pc_base::load_model('sitemodel_model');
		$this->m_db = pc_base::load_model('sitemodel_field_model');
		$this->M = new_html_special_chars(getcache('formguide', 'commons'));
		$this->siteid = intval($_GET[siteid]) ? intval($_GET[siteid]) : get_siteid();
		$this->M = $this->M[$this->siteid];
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:index.php

示例9: init

 /**
  * 编辑专题首页模板
  */
 public function init()
 {
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $specialid = isset($_GET['specialid']) && intval($_GET['specialid']) ? intval($_GET['specialid']) : showmessage(L('illegal_action'), HTTP_REFERER);
     if (!$specialid) {
         showmessage(L('illegal_action'), HTTP_REFERER);
     }
     $info = $this->db->get_one(array('id' => $specialid, 'disabled' => '0', 'siteid' => $this->get_siteid()));
     if (!$info['id']) {
         showmessage(L('illegal_parameters'), HTTP_REFERER);
     }
     $id = $specialid;
     if ($info['css']) {
         $css_param = unserialize($info['css']);
     }
     if (!$info['ispage']) {
         $type_db = pc_base::load_model('type_model');
         $types = $type_db->select(array('module' => 'special', 'parentid' => $id), '*', '', '`listorder` ASC, `typeid` ASC');
     }
     extract($info);
     $css = get_css($css_param);
     $template = $info['index_template'] ? $info['index_template'] : 'index';
     pc_base::load_app_func('global', 'template');
     ob_start();
     include template('special', $template);
     $html = ob_get_contents();
     ob_clean();
     $html = visualization($html, 'default', 'test', 'block.html');
     include $this->admin_tpl('template_edit');
 }
开发者ID:boylzj,项目名称:omguitar,代码行数:33,代码来源:template.php

示例10: register

	 /**
	 *	申请友情链接 
	 */
	public function register() { 
 		$siteid = SITEID;
 		if(isset($_POST['dosubmit'])){
 			if($_POST['name']==""){
 				showmessage(L('sitename_noempty'),"?m=link&c=index&a=register&siteid=$siteid");
 			}
 			if($_POST['url']==""){
 				showmessage(L('siteurl_not_empty'),"?m=link&c=index&a=register&siteid=$siteid");
 			}
 			if(!in_array($_POST['linktype'],array('0','1'))){
 				$_POST['linktype'] = '0';
 			}
 			$link_db = pc_base::load_model(link_model);
 			$_POST['logo'] =new_html_special_chars($_POST['logo']);
 			
 			if($_POST['linktype']=='0'){
 				$sql = array('siteid'=>$siteid,'typeid'=>$_POST['typeid'],'linktype'=>$_POST['linktype'],'name'=>$_POST['name'],'url'=>$_POST['url']);
 			}else{
 				$sql = array('siteid'=>$siteid,'typeid'=>$_POST['typeid'],'linktype'=>$_POST['linktype'],'name'=>$_POST['name'],'url'=>$_POST['url'],'logo'=>$_POST['logo']);
 			}
 			$link_db->insert($sql);
 			showmessage(L('add_success'), "?m=link&c=index&siteid=$siteid");
 		} else {
  			$setting = getcache('link', 'commons');
			$setting = $setting[$siteid];
 			if($setting['is_post']=='0'){
 				showmessage(L('suspend_application'), HTTP_REFERER);
 			}
 			$this->type = pc_base::load_model('type_model');
 			$types = $this->type->get_types($siteid);//获取站点下所有友情链接分类
 			pc_base::load_sys_class('form', '', 0);
  			$SEO = seo(SITEID, '', L('application_links'), '', '');
   			include template('link', 'register');
 		}
	} 
开发者ID:hxzyzz,项目名称:ddc,代码行数:38,代码来源:index.php

示例11: __construct

	function __construct() {
		parent::__construct();
		$this->db = pc_base::load_model('linkage_model');
		$this->sites = pc_base::load_app_class('sites');
		pc_base::load_sys_class('form', '', 0);
		$this->childnode = array();
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:linkage.php

示例12: __construct

 function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('plugin_model');
     $this->db_var = pc_base::load_model('plugin_var_model');
     pc_base::load_app_func('global');
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:plugin.php

示例13: __construct

	public function __construct() {
		parent::__construct();
		$this->db = pc_base::load_model('release_point_model');
		if (function_exists('ftp_ssl_connect')) {
			$this->ssl = 1;
		}
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:release_point.php

示例14: get

	public function get() {
		$id = isset($_GET['id']) && intval($_GET['id']) ? intval($_GET['id']) : exit();
		if ($data = $this->db->get_one(array('id'=>$id))) {
			if (!$str = tpl_cache('dbsource_'.$id,$data['cache'])) {
				if ($data['type'] == 1) { //自定义SQL调用
					$get_db = pc_base::load_model("get_model");
					$sql = $data['data'].(!empty($data['num']) ? " LIMIT $data[num]" : '');
					$r= $get_db->query($sql);
					while(($s = $get_db->fetch_next()) != false) {
						$str[] = $s;
					}
				} else {
					$filepath = PC_PATH.'modules'.DIRECTORY_SEPARATOR.$data['module'].DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.$data['module'].'_tag.class.php';
					if (file_exists($filepath)) {
						$pc_tag = pc_base::load_app_class($data['module'].'_tag', $data['module']); 
						if (!method_exists($pc_tag, $data['action'])) {
							exit();
						}
						$sql = string2array($data['data']);
						$sql['action'] = $data['action'];
						$sql['limit'] = $data['num'];
						unset($data['num']);
						$str  = $pc_tag->$data['action']($sql);
						
					} else {
						exit();
					}
				}
				if ($data['cache']) setcache('dbsource_'.$id, $str, 'tpl_data');
			}
			echo $this->_format($data['id'], $str, $data['dis_type']);
		}
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:33,代码来源:call.php

示例15: __construct

	function __construct() {
		$this->db = pc_base::load_model('content_model');
		pc_base::load_app_class('rssbuilder','','','0');
		$this->siteid = $_GET['siteid'] ? intval($_GET['siteid']) : '1';
		$this->rssid = intval($_GET['rssid']);
		define('SITEID', $this->siteid);
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:rss.php


注:本文中的pc_base::load_model方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。