本文整理汇总了PHP中pc_base::load_sys_class方法的典型用法代码示例。如果您正苦于以下问题:PHP pc_base::load_sys_class方法的具体用法?PHP pc_base::load_sys_class怎么用?PHP pc_base::load_sys_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pc_base
的用法示例。
在下文中一共展示了pc_base::load_sys_class方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* 附件列表
*/
public function init() {
$where = '';
if($_GET['dosubmit']){
if(is_array($_GET['info'])&&!empty($_GET['info']))extract($_GET['info']);
if($filename) $where = "AND `filename` LIKE '%$filename%' ";
if($start_uploadtime && $end_uploadtime) {
$start = strtotime($start_uploadtime);
$end = strtotime($end_uploadtime);
if($start > $end) showmessage(L('range_not_correct'),HTTP_REFERER);
$where .= "AND `uploadtime` >= '$start' AND `uploadtime` <= '$end' ";
}
if($fileext) $where .= "AND `fileext`='$fileext' ";
$status = trim($_GET['status']);
if($status!='' && ($status==1 ||$status==0)) $where .= "AND `status`='$status' ";
$module = trim($_GET['module']);
if(isset($module) && $module!='') $where .= "AND `module`='$module' ";
}
$where .="AND `siteid`='".$this->siteid."'";
if($where) $where = substr($where, 3);
pc_base::load_sys_class('form');
$category = getcache('category_content_'.$this->siteid,'commons');
$modules = getcache('modules','commons');
$page = $_GET['page'] ? $_GET['page'] : '1';
$infos = $this->db->listinfo($where, 'uploadtime DESC', $page, $pagesize = 20);
$pages = $this->db->pages;
include $this->admin_tpl('attachment_list');
}
示例2: addart
function addart($catid, $title, $content)
{
$info = array();
$info['catid'] = 3;
$info['title'] = "api push";
$info['content'] = "absolutelu api push";
$db_config = pc_base::load_config('database');
pc_base::load_sys_class('mysql', '', 0);
pc_base::load_sys_class('param', '', 0);
$db = pc_base::load_model('content_model');
$categorys = getcache('category_content_1', 'commons');
$category = $categorys[3];
//var_dump($categorys);
$modelid = $category['modelid'];
//var_dump($modelid);
//die;
$db->set_model($modelid);
$setting = string2array($category['setting']);
$workflowid = $setting['workflowid'];
$info['status'] = 99;
$info['keywords'] = "";
$info['description'] = str_cut(str_replace(array("\r\n", "\t", '[page]', '[/page]', '“', '”', ' '), '', strip_tags($info['content'])), 200);
$info['username'] = "sumuya";
$info['inputtime'] = '';
echo "1";
if ($db->add_content($info)) {
return true;
}
return false;
}
示例3: 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');
}
}
示例4: edit
public function edit()
{
$id = isset($_GET['id']) && intval($_GET['id']) ? intval($_GET['id']) : showmessage('ID' . L('empty'));
$data = $this->db->get_one(array('id' => $id));
if (!$data) {
showmessage(L('notfound'));
}
if (isset($_POST['dosubmit'])) {
$host = isset($_POST['host']) && trim($_POST['host']) ? trim($_POST['host']) : showmessage(L('server_address') . L('empty'));
$port = isset($_POST['port']) && intval($_POST['port']) ? intval($_POST['port']) : showmessage(L('server_port') . L('empty'));
$username = isset($_POST['username']) && trim($_POST['username']) ? trim($_POST['username']) : showmessage(L('username') . L('empty'));
$password = isset($_POST['password']) && trim($_POST['password']) ? trim($_POST['password']) : showmessage(L('password') . L('empty'));
$dbname = isset($_POST['dbname']) && trim($_POST['dbname']) ? trim($_POST['dbname']) : showmessage(L('database') . L('empty'));
$dbtablepre = isset($_POST['dbtablepre']) && trim($_POST['dbtablepre']) ? trim($_POST['dbtablepre']) : '';
$charset = isset($_POST['charset']) && in_array(trim($_POST['charset']), array('gbk', 'utf8', 'gb2312', 'latin1')) ? trim($_POST['charset']) : showmessage(L('charset') . L('illegal_parameters'));
$siteid = $this->get_siteid();
$sql = array('siteid' => $siteid, 'host' => $host, 'port' => $port, 'username' => $username, 'password' => $password, 'dbname' => $dbname, 'dbtablepre' => $dbtablepre, 'charset' => $charset);
if ($this->db->update($sql, array('id' => $id))) {
dbsource_cache();
showmessage('', '', '', 'edit');
} else {
showmessage(L('operation_failure'));
}
} else {
pc_base::load_sys_class('form', '', 0);
$show_header = $show_validator = true;
include $this->admin_tpl('dbsource_edit');
}
}
示例5: __construct
function __construct() {
parent::__construct();
$this->userid = $_SESSION['userid'];
pc_base::load_sys_class('db_factory');
pc_base::load_sys_class('form');
pc_base::load_sys_func('dir');
}
示例6: addart
function addart($catid, $title, $content)
{
$info = array();
$info['catid'] = $catid;
$info['title'] = $title;
$info['content'] = $content;
$db_config = pc_base::load_config('database');
pc_base::load_sys_class('mysql', '', 0);
pc_base::load_sys_class('param', '', 0);
$db = pc_base::load_model('content_model');
$category = $categorys[3];
$modelid = $category['modelid'];
$db->set_model($modelid);
$setting = string2array($category['setting']);
$workflowid = $setting['workflowid'];
$info['status'] = 99;
$info['keywords'] = get_keywords($info['title'], 3);
$info['description'] = str_cut(str_replace(array("\r\n", "\t", '[page]', '[/page]', '“', '”', ' '), '', strip_tags($info['content'])), 200);
$info['username'] = "admin";
$info['inputtime'] = '';
if ($db->add_content($info)) {
return true;
}
return false;
}
示例7: 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');
}
}
示例8: __construct
/**
* 构造函数
*/
public function __construct() {
$param = pc_base::load_sys_class('param');
define('ROUTE_M', $param->route_m());
define('ROUTE_C', $param->route_c());
define('ROUTE_A', $param->route_a());
$this->init();
}
示例9: __construct
function __construct()
{
$this->db = pc_base::load_model('copyfrom_model');
pc_base::load_sys_class('form', '', 0);
parent::__construct();
$this->siteid = $this->get_siteid();
}
示例10: manage
/**
* node list
*/
public function manage() {
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$nodelist = $this->db->listinfo(array('siteid'=>$this->get_siteid()), 'nodeid DESC', $page, 15);
$pages = $this->db->pages;
pc_base::load_sys_class('format', '', 0);
include $this->admin_tpl('node_list');
}
示例11: init
/**
* 专题列表
*/
public function init()
{
$page = max(intval($_GET['page']), 1);
$infos = $this->db->listinfo(array('siteid' => $this->get_siteid()), '`listorder` DESC, `id` DESC', $page, 6);
pc_base::load_sys_class('format', '', 0);
include $this->admin_tpl('special_list');
}
示例12: __construct
function __construct()
{
parent::__construct();
$this->db = pc_base::load_model('extend_setting_model');
$this->sites = pc_base::load_app_class('sites');
pc_base::load_sys_class('form', '', 0);
}
示例13: 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 '';
*/
}
示例14: 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);
}
示例15: __construct
function __construct()
{
$this->db = pc_base::load_model('admin_model');
$this->update_url = 'http://update.v9.phpcms.cn/index.php';
$this->http = pc_base::load_sys_class('http', '', 1);
$this->uuid = $this->check_uuid();
}