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


PHP pc_base类代码示例

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


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


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