• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pc_base类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_keywords

function get_keywords($data, $number = 3)
{
    $data = trim(strip_tags($data));
    if (empty($data)) {
        return '';
    }
    /*if(CHARSET != 'utf-8') {
    		$data = iconv('utf-8', CHARSET, $data);
    	} else {
    		$data = iconv('utf-8', 'gbk', $data);
    	}*/
    $segment = pc_base::load_sys_class('segment');
    return $segment->get_keyword($data);
    /*
    $http = pc_base::load_sys_class('http');
    $http->post(API_URL_GET_KEYWORDS, array('siteurl'=>SITE_URL, 'charset'=>CHARSET, 'data'=>$data, 'number'=>$number));
    	if($http->is_ok()) {
    		if(CHARSET != 'utf-8') {
    			return $http->get_data();
    		} else {
    			return iconv('gbk', 'utf-8', $http->get_data());
    		}
    	}
    	return '';
    */
}
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:26,代码来源:get_keywords.php


示例2: system_information

function system_information($data)
{
    $update = pc_base::load_sys_class('update');
    $notice_url = $update->notice();
    $string = base64_decode('PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPiQoIiNtYWluX2ZyYW1laWQiKS5yZW1vdmVDbGFzcygiZGlzcGxheSIpOzwvc2NyaXB0PjxkaXYgaWQ9InBocGNtc19ub3RpY2UiPjwvZGl2PjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBzcmM9Ik5PVElDRV9VUkwiPjwvc2NyaXB0Pg==');
    echo $data . str_replace('NOTICE_URL', $notice_url, $string);
}
开发者ID:ahmatjan,项目名称:huluphp,代码行数:7,代码来源:admin.func.php


示例3: get_api

 /**
  * 获取api操作实例
  * @param string $classname 接口调用的类文件名
  * @param sting  $module	 模块名
  * @return object	 
  */
 public function get_api($module = 'admin')
 {
     if (!isset($this->api_list[$module]) || !is_object($this->api_list[$module])) {
         $this->api_list[$module] = pc_base::load_app_class('push_api', $module);
     }
     return $this->api_list[$module];
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:13,代码来源:push_factory.class.php


示例4: right

 public function right()
 {
     $this->member_db = pc_base::load_model('member_model');
     $this->messagequeue_db = pc_base::load_model('messagequeue_model');
     $total_member = $this->member_db->count();
     //会员总数
     $todaytime = strtotime(date('Y-m-d', SYS_TIME));
     //今日会员数
     $today_member = $this->member_db->count("`regdate` > '{$todaytime}'");
     $total_messagequeue = $this->messagequeue_db->count();
     //消息总数
     $mysql_version = $this->member_db->get_version();
     //mysql版本
     $mysql_table_status = $this->member_db->get_table_status();
     $mysql_table_size = $mysql_table_index_size = '';
     foreach ($mysql_table_status as $table) {
         $mysql_table_size += $table['Data_length'];
         $mysql_table_index_size += $table['Index_length'];
     }
     $mysql_table_size = sizecount($mysql_table_size);
     $mysql_table_index_size = sizecount($mysql_table_index_size);
     //应用个数
     $applist = getcache('applist');
     $appnum = empty($applist) ? 0 : count($applist);
     include $this->admin_tpl('right');
 }
开发者ID:ahmatjan,项目名称:huluphp,代码行数:26,代码来源:index.php


示例5: edit

 /**
  * 修改公告
  */
 public function edit()
 {
     $_GET['aid'] = intval($_GET['aid']);
     if (!$_GET['aid']) {
         showmessage(L('illegal_operation'));
     }
     if (isset($_POST['dosubmit'])) {
         $_POST['announce'] = $this->check($_POST['announce'], 'edit');
         if ($this->db->update($_POST['announce'], array('aid' => $_GET['aid']))) {
             showmessage(L('announced_a'), HTTP_REFERER, '', 'edit');
         }
     } else {
         $where = array('aid' => $_GET['aid']);
         $an_info = $this->db->get_one($where);
         pc_base::load_sys_class('form', '', 0);
         //获取站点模板信息
         pc_base::load_app_func('global', 'admin');
         $template_list = template_list($this->siteid, 0);
         foreach ($template_list as $k => $v) {
             $template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
             unset($template_list[$k]);
         }
         $show_header = $show_validator = $show_scroll = 1;
         include $this->admin_tpl('announce_edit');
     }
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:29,代码来源:admin_announce.php


示例6: __construct

 function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'dianping_type';
     parent::__construct();
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:dianping_type_model.class.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: oauth

		public function oauth() {
			pc_base::load_plugin_class('weibooauth','',0);
			$setting = getcache('weibo_var','plugins');			
			if(!isset($_REQUEST['oauth_verifier']) || $_REQUEST['oauth_verifier'] == '') {
				if($this->auth_db->get_one(array('source'=>'sina'))) {
					$txt = '授权成功,<a href="?m=zl_admin&c=plugin&a=config&pluginid='.$this->pluginid.'&module=removeauth&pc_hash='.$_SESSION['pc_hash'].'">解除绑定</a>';
				} else {
					$o = new WeiboOAuth( $setting['wb_akey'] , $setting['wb_skey']);
					$keys = $o->getRequestToken();
					print_r($keys);
					$aurl = $o->getAuthorizeURL( $keys['oauth_token'] ,false , get_url());
					$_SESSION['keys'] = $keys;
					$txt = '<a href="'.$aurl.'">点击进行授权</a>';
				}
				
			} else {
				$o = new WeiboOAuth( $setting['wb_akey'] , $setting['wb_skey'] , $_SESSION['keys']['oauth_token'] , $_SESSION['keys']['oauth_token_secret']  );
				$last_key = $o->getAccessToken(  $_REQUEST['oauth_verifier'] ) ;				
				$c = new WeiboClient( $setting['wb_akey'] , $setting['wb_skey'] , $last_key['oauth_token'] , $last_key['oauth_token_secret']  );
				$ms  = $c->home_timeline(); // done
				$me = $c->verify_credentials();	
				$this->auth_db->insert(array('uid'=>$me['id'],'token'=>$last_key['oauth_token'],'tsecret'=>$last_key['oauth_token_secret'],'source'=>'sina'));
				$txt = '授权成功,'.$me['name'].'<a href="?m=zl_admin&c=plugin&a=config&pluginid='.$this->pluginid.'&module=removeauth&pc_hash='.$_SESSION['pc_hash'].'">解除绑定</a>';
			}
			include $this->op->plugin_tpl('oauth',PLUGIN_ID);
		}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:26,代码来源:plugin_admin.class.php


示例9: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'comment';
     $this->table_name = 'comment_setting';
     parent::__construct();
 }
开发者ID:ahmatjan,项目名称:huluphp,代码行数:7,代码来源:comment_setting_model.class.php


示例10: __construct

	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'model';
		parent::__construct();
		$this->charset = $this->db_config[$this->db_setting]['charset'];
	}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:sitemodel_model.class.php


示例11: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'reviews';
     $this->table_name = $this->old_table_name = 'reviews_check';
     parent::__construct();
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:7,代码来源:reviews_check_model.class.php


示例12: init

 public function init()
 {
     if (isset($_POST['dosubmit']) || isset($_GET['dosubmit'])) {
         $page = $_GET['page'] ? intval($_GET['page']) : 0;
         $modules = array(array('name' => L('module'), 'function' => 'module'), array('name' => L('sites'), 'mod' => 'admin', 'file' => 'sites', 'function' => 'set_cache'), array('name' => L('category'), 'function' => 'category'), array('name' => L('downservers'), 'function' => 'downservers'), array('name' => L('badword_name'), 'function' => 'badword'), array('name' => L('ipbanned'), 'function' => 'ipbanned'), array('name' => L('keylink'), 'function' => 'keylink'), array('name' => L('linkage'), 'function' => 'linkage'), array('name' => L('position'), 'function' => 'position'), array('name' => L('admin_role'), 'function' => 'admin_role'), array('name' => L('urlrule'), 'function' => 'urlrule'), array('name' => L('sitemodel'), 'function' => 'sitemodel'), array('name' => L('type'), 'function' => 'type', 'param' => 'content'), array('name' => L('workflow'), 'function' => 'workflow'), array('name' => L('dbsource'), 'function' => 'dbsource'), array('name' => L('member_setting'), 'function' => 'member_setting'), array('name' => L('member_group'), 'function' => 'member_group'), array('name' => L('membermodel'), 'function' => 'membermodel'), array('name' => L('member_model_field'), 'function' => 'member_model_field'), array('name' => L('search_type'), 'function' => 'type', 'param' => 'search'), array('name' => L('search_setting'), 'function' => 'search_setting'), array('name' => L('update_vote_setting'), 'function' => 'vote_setting'), array('name' => L('update_link_setting'), 'function' => 'link_setting'), array('name' => L('special'), 'function' => 'special'), array('name' => L('setting'), 'function' => 'setting'), array('name' => L('database'), 'function' => 'database'), array('name' => L('update_formguide_model'), 'mod' => 'formguide', 'file' => 'formguide', 'function' => 'public_cache'), array('name' => L('cache_file'), 'function' => 'cache2database'), array('name' => L('cache_copyfrom'), 'function' => 'copyfrom'), array('name' => L('clear_files'), 'function' => 'del_file'), array('name' => L('video_category_tb'), 'function' => 'video_category_tb'));
         $this->cache_api = pc_base::load_app_class('cache_api', 'admin');
         $m = $modules[$page];
         if ($m['mod'] && $m['function']) {
             if ($m['file'] == '') {
                 $m['file'] = $m['function'];
             }
             $M = getcache('modules', 'commons');
             if (in_array($m['mod'], array_keys($M))) {
                 $cache = pc_base::load_app_class($m['file'], $m['mod']);
                 $cache->{$m}['function']();
             }
         } else {
             if ($m['target'] == 'iframe') {
                 echo '<script type="text/javascript">window.parent.frames["hidden"].location="index.php?' . $m['link'] . '";</script>';
             } else {
                 $this->cache_api->cache($m['function'], $m['param']);
             }
         }
         $page++;
         if (!empty($modules[$page])) {
             echo '<script type="text/javascript">window.parent.addtext("<li>' . L('update') . $m['name'] . L('cache_file_success') . '..........</li>");</script>';
             showmessage(L('update') . $m['name'] . L('cache_file_success'), '?m=admin&c=cache_all&page=' . $page . '&dosubmit=1&pc_hash=' . $_SESSION['pc_hash'], 0);
         } else {
             echo '<script type="text/javascript">window.parent.addtext("<li>' . L('update') . $m['name'] . L('site_cache_success') . '..........</li>")</script>';
             showmessage(L('update') . $m['name'] . L('site_cache_success'), 'blank');
         }
     } else {
         include $this->admin_tpl('cache_all');
     }
 }
开发者ID:jiangwuzhang,项目名称:phpcms,代码行数:35,代码来源:cache_all.php


示例13: sys_auth

function sys_auth($string, $operation = 'ENCODE', $key = '', $expiry = 0)
{
    $key_length = 4;
    $key = md5($key != '' ? $key : pc_base::load_config('system', 'auth_key'));
    $fixedkey = md5($key);
    $egiskeys = md5(substr($fixedkey, 16, 16));
    $runtokey = $key_length ? $operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length) : '';
    $keys = md5(substr($runtokey, 0, 16) . substr($fixedkey, 0, 16) . substr($runtokey, 16) . substr($fixedkey, 16));
    $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $egiskeys), 0, 16) . $string : base64_decode(substr($string, $key_length));
    $i = 0;
    $result = '';
    $string_length = strlen($string);
    for ($i = 0; $i < $string_length; $i++) {
        $result .= chr(ord($string[$i]) ^ ord($keys[$i % 32]));
    }
    if ($operation == 'ENCODE') {
        return $runtokey . str_replace('=', '', base64_encode($result));
    } else {
        if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $egiskeys), 0, 16)) {
            return substr($result, 26);
        } else {
            return '';
        }
    }
}
开发者ID:Hacker-One,项目名称:exp,代码行数:25,代码来源:php+authkey加密构成.php


示例14: create_table

 /**
  * 按月份创建表
  */
 private function create_table()
 {
     $data_info = pc_base::load_config('database', $this->db_setting);
     $charset = $data_info['charset'];
     $sql = "CREATE TABLE IF NOT EXISTS `" . $this->table_name . "` (\r\n  \t\t`id` int(10) unsigned NOT NULL auto_increment,\r\n  \t\t`pid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`siteid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`spaceid` smallint(5) unsigned NOT NULL default '0',\r\n  \t\t`username` char(20) NOT NULL,\r\n  \t\t`area` char(40) NOT NULL,\r\n  \t\t`ip` char(15) NOT NULL,\r\n  \t\t`referer` char(120) NOT NULL,\r\n  \t\t`clicktime` int(10) unsigned NOT NULL default '0',\r\n  \t\t`type` tinyint(1) unsigned NOT NULL default '1',\r\n  \t\tPRIMARY KEY  (`id`),\r\n  \t\tKEY `pid` (`pid`,`type`,`ip`)\r\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=" . $charset . " ;";
     $this->db->query($sql);
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:10,代码来源:poster_stat_model.class.php


示例15: __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


示例16: __construct

 function __construct()
 {
     $this->db = pc_base::load_model('content_model');
     $this->_userid = param::get_cookie('_userid');
     $this->_username = param::get_cookie('_username');
     $this->_groupid = param::get_cookie('_groupid');
 }
开发者ID:hw18708118867,项目名称:htmlmoban,代码行数:7,代码来源:demo.php


示例17: _format

 private function _format($id, $data, $type)
 {
     switch ($type) {
         case '1':
             //json
             if (CHARSET == 'gbk') {
                 $data = array_iconv($data, 'gbk', 'utf-8');
             }
             return json_encode($data);
             break;
         case '2':
             //xml
             $xml = pc_base::load_sys_class('xml');
             return $xml->xml_serialize($data);
             break;
         case '3':
             //js
             pc_base::load_app_func('global');
             ob_start();
             include template_url($id);
             $html = ob_get_contents();
             ob_clean();
             return format_js($html);
             break;
     }
 }
开发者ID:boylzj,项目名称:omguitar,代码行数:26,代码来源:call.php


示例18: createindex

 /**
  * 创建索引
  */
 public function createindex()
 {
     if (isset($_GET['dosubmit'])) {
         //重建索引首先清空表所有数据,然后根据搜索类型接口重新全部重建索引
         if (!isset($_GET['have_truncate'])) {
             $db_tablepre = $this->db->db_tablepre;
             //删除该站点全文索引
             $this->db->delete(array('siteid' => $this->siteid));
             $types = $this->type_db->select(array('siteid' => $this->siteid, 'module' => 'search'));
             setcache('search_types', $types, 'search');
         } else {
             $types = getcache('search_types', 'search');
         }
         //$key typeid 的索引
         $key = isset($_GET['key']) ? intval($_GET['key']) : 0;
         foreach ($types as $_k => $_v) {
             if ($key == $_k) {
                 $typeid = $_v['typeid'];
                 if ($_v['modelid']) {
                     if ($_v['typedir'] !== 'yp') {
                         $search_api = pc_base::load_app_class('search_api', 'content');
                     } else {
                         $search_api = pc_base::load_app_class('search_api', $_v['typedir']);
                     }
                     if (!isset($_GET['total'])) {
                         $total = $search_api->total($_v['modelid']);
                     } else {
                         $total = intval($_GET['total']);
                         $search_api->set_model($_v['modelid']);
                     }
                 } else {
                     $module = trim($_v['typedir']);
                     $search_api = pc_base::load_app_class('search_api', $module);
                     if (!isset($_GET['total'])) {
                         $total = $search_api->total();
                     } else {
                         $total = intval($_GET['total']);
                     }
                 }
                 $pagesize = $_GET['pagesize'] ? intval($_GET['pagesize']) : 50;
                 $page = max(intval($_GET['page']), 1);
                 $pages = ceil($total / $pagesize);
                 $datas = $search_api->fulltext_api($pagesize, $page);
                 foreach ($datas as $id => $r) {
                     $this->db->update_search($typeid, $id, $r['fulltextcontent'], $r['title'], $r['adddate'], 1);
                 }
                 $page++;
                 if ($pages >= $page) {
                     showmessage("正在更新 <span style='color:#ff0000;font-size:14px;text-decoration:underline;' >{$_v['name']}</span> - 总数:{$total} - 当前第 <font color='red'>{$page}</font> 页", "?m=search&c=search_admin&a=createindex&menuid=909&page={$page}&total={$total}&key={$key}&pagesize={$pagesize}&have_truncate=1&dosubmit=1");
                 }
                 $key++;
                 showmessage("开始更新: <span style='color:#ff0000;font-size:14px;text-decoration:underline;' >{$_v['name']}</span> - 总数:{$total}条", "?m=search&c=search_admin&a=createindex&menuid=909&page=1&key={$key}&pagesize={$pagesize}&have_truncate=1&dosubmit=1");
             }
         }
         showmessage('全站索引更新完成', 'blank');
     } else {
         $big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=search&c=search_type&a=add\', title:\'' . L('add_search_type') . '\', width:\'580\', height:\'240\', lock:true}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('add_search_type'));
         include $this->admin_tpl('createindex');
     }
 }
开发者ID:ahmatjan,项目名称:huluphp,代码行数:63,代码来源:search_admin.php


示例19: lists

 /**
  * 按照模型搜索
  */
 public function lists()
 {
     $tag = safe_replace(addslashes($_GET['tag']));
     $keyword_data_db = pc_base::load_model('keyword_data_model');
     //获取标签id
     $r = $this->keyword_db->get_one(array('keyword' => $tag, 'siteid' => $this->siteid), 'id');
     if (!$r['id']) {
         showmessage('不存在此关键字!');
     }
     $tagid = intval($r['id']);
     $page = max($_GET['page'], 1);
     $pagesize = 20;
     $where = '`tagid`=\'' . $tagid . '\' AND `siteid`=' . $this->siteid;
     $infos = $keyword_data_db->listinfo($where, '`id` DESC', $page, $pagesize);
     $pages = $keyword_data_db->pages;
     $total = $keyword_data_db->number;
     if (is_array($infos)) {
         $datas = array();
         foreach ($infos as $info) {
             list($contentid, $modelid) = explode('-', $info['contentid']);
             $this->db->set_model($modelid);
             $res = $this->db->get_one(array('id' => $contentid), 'title, description, url, inputtime, style');
             $res['title'] = str_replace($tag, '<font color="#f00">' . $tag . '</font>', $res['title']);
             $res['description'] = str_replace($tag, '<font color="#f00">' . $tag . '</font>', $res['description']);
             $datas[] = $res;
         }
     }
     $SEO = seo($siteid, '', $tag);
     include template('content', 'tag_list');
 }
开发者ID:shenhua4286,项目名称:gxw,代码行数:33,代码来源:tag.php


示例20: __construct

 public function __construct($appid, $appkey, $callback)
 {
     $this->appid = $appid;
     $this->appkey = $appkey;
     $this->callback = $callback;
     pc_base::load_app_func('utils');
 }
开发者ID:pondyond,项目名称:phpcmsv9,代码行数:7,代码来源:qqapi.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pdf类代码示例发布时间:2022-05-23
下一篇:
PHP pb_backupbuddy_settings类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap