Пример #1
0
 function __construct()
 {
     parent::__construct();
     $this->api = pc_base::load_app_class('guestbook_api');
     $this->db = pc_base::load_model('guestbook_model');
     $this->user_db = pc_base::load_model('member_detail_model');
 }
Пример #2
0
 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);
 }
Пример #3
0
 function __construct()
 {
     $this->comment_data_db = pc_base::load_model('comment_data_model');
     $this->comment_check_db = pc_base::load_model('comment_check_model');
     parent::__construct();
     $this->comment = pc_base::load_app_class('comment');
 }
Пример #4
0
 /**
  * 获取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];
 }
Пример #5
0
	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']);
		}
	}
Пример #6
0
 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');
     }
 }
Пример #7
0
	/**
	 * 模块卸载
	 */
	public function uninstall() {
		if(!isset($_GET['module']) || empty($_GET['module'])) showmessage(L('illegal_parameters'));
		
		$module_api = pc_base::load_app_class('module_api');
		if(!$module_api->uninstall($_GET['module'])) showmessage($module_api->error_msg, 'blank');
		else showmessage(L('uninstall_success'), '?m=zl_admin&c=module&a=cache&pc_hash='.$_SESSION['pc_hash']);
	}
Пример #8
0
 /**
  * 创建索引
  */
 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');
     }
 }
Пример #9
0
	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);
	}
Пример #10
0
 function __construct()
 {
     parent::__construct();
     $this->sites = pc_base::load_app_class('sites', 'admin');
     $this->db = pc_base::load_model('wap_model');
     $this->type_db = pc_base::load_model('wap_type_model');
 }
Пример #11
0
 /**
  * 服务器端 POST形式响应
  */
 public function respond_post()
 {
     $_POST['code'] = $_POST['code'] ? $_POST['code'] : $_GET['code'];
     if ($_POST['code']) {
         $payment = $this->get_by_code($_POST['code']);
         if (!$payment) {
             error_log(date('m-d H:i:s', SYS_TIME) . '| POST: payment is null |' . "\r\n", 3, CACHE_PATH . 'pay_error_log.php');
         }
         $cfg = unserialize_config($payment['config']);
         $pay_name = ucwords($payment['pay_code']);
         pc_base::load_app_class('pay_factory', '', 0);
         $payment_handler = new pay_factory($pay_name, $cfg);
         $return_data = $payment_handler->notify();
         if ($return_data) {
             if ($return_data['order_status'] == 0) {
                 $this->update_member_amount_by_sn($return_data['order_id']);
             }
             $this->update_recode_status_by_sn($return_data['order_id'], $return_data['order_status']);
             $result = TRUE;
         } else {
             $result = FALSE;
         }
         $payment_handler->response($result);
     }
 }
Пример #12
0
/**
 * 模板风格列表
 * @param integer $siteid 站点ID,获取单个站点可使用的模板风格列表
 * @param integer $disable 是否显示停用的{1:是,0:否}
 */
function template_list($siteid = '', $disable = 0)
{
    $list = glob(PC_PATH . 'templates' . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);
    $arr = $template = array();
    if ($siteid) {
        $site = pc_base::load_app_class('sites', 'admin');
        $info = $site->get_by_id($siteid);
        if ($info['template']) {
            $template = explode(',', $info['template']);
        }
    }
    foreach ($list as $key => $v) {
        $dirname = basename($v);
        if ($siteid && !in_array($dirname, $template)) {
            continue;
        }
        if (file_exists($v . DIRECTORY_SEPARATOR . 'config.php')) {
            $arr[$key] = (include $v . DIRECTORY_SEPARATOR . 'config.php');
            if (!$disable && isset($arr[$key]['disable']) && $arr[$key]['disable'] == 1) {
                unset($arr[$key]);
                continue;
            }
        } else {
            $arr[$key]['name'] = $dirname;
        }
        $arr[$key]['dirname'] = $dirname;
    }
    return $arr;
}
Пример #13
0
	function __construct() {
		parent::__construct();
		$this->db = pc_base::load_model('position_model');
		$this->db_data = pc_base::load_model('position_data_model');
		$this->db_content = pc_base::load_model('content_model');			
		$this->sites = pc_base::load_app_class('sites');
	}
Пример #14
0
	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();
	}
Пример #15
0
 public function __construct()
 {
     pc_base::load_app_class('ku6api', 'video', 0);
     $this->userid = param::get_cookie('userid');
     $this->setting = getcache('video');
     if (empty($this->setting)) {
         showmessage(L('module_not_exists'));
     }
     $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
 }
Пример #16
0
function ask_cat_url($catid)
{
    $catid = intval($catid);
    if (!$catid) {
        return false;
    }
    $url = pc_base::load_app_class('ask_url', 'ask');
    $urls = $url->category_url($catid);
    return $urls;
}
Пример #17
0
	public function __construct() {
		parent::__construct();
		$this->db = pc_base::load_model('release_point_model');
		$this->siteid = $this->get_siteid();
		$site = pc_base::load_app_class('sites', 'zl_admin');
		$this->site = $site->get_by_id($this->siteid);
		$this->point = explode(',', $this->site['release_point']);
		pc_base::load_app_func('global');
		del_queue();
	}
Пример #18
0
 public function __construct()
 {
     $this->db = pc_base::load_model('video_store_model');
     pc_base::load_app_class('ku6api', 'video', 0);
     $this->userid = param::get_cookie('_userid');
     pc_base::load_app_class('v', 'video', 0);
     $this->v = new v($this->db);
     $this->setting = getcache('video', 'video');
     $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
 }
Пример #19
0
 /**
  * 构造适配器
  * @param  $adapter_name 支付模块code
  * @param  $adapter_config 支付模块配置
  */
 public function set_adapter($adapter_name, $adapter_config = array())
 {
     if (!is_string($adapter_name)) {
         return false;
     } else {
         $class_name = ucwords($adapter_name);
         pc_base::load_app_class($class_name, '', '0');
         $this->adapter_instance = new $class_name($adapter_config);
     }
     return $this->adapter_instance;
 }
Пример #20
0
 public function init()
 {
     $allow_visitor = htmlspecialchars($_GET['allow_visitor']);
     $auth = sys_auth($allow_visitor, 'DECODE');
     if (strpos($auth, '|') === false) {
         showmessage(L('illegal_operation'));
     }
     $auth_str = explode('|', $auth);
     $flag = $auth_str[0];
     if (!preg_match('/^([0-9]+)|([0-9]+)/', $flag)) {
         showmessage(L('illegal_operation'));
     }
     $readpoint = intval($auth_str[1]);
     $paytype = intval($auth_str[2]);
     $http_referer = urldecode($_GET['http_referer']);
     if (!$readpoint) {
         showmessage(L('illegal_operation'));
     }
     pc_base::load_app_class('spend', 'pay', 0);
     $flag_arr = explode('_', $flag);
     $catid = $flag_arr[0];
     $siteids = getcache('category_content', 'commons');
     $siteid = $siteids[$catid];
     $CATEGORYS = getcache('category_content_' . $siteid, 'commons');
     if (isset($CATEGORYS[$catid])) {
         $setting = string2array($CATEGORYS[$catid]['setting']);
         $repeatchargedays = intval($setting['repeatchargedays']);
         if ($repeatchargedays) {
             $fromtime = SYS_TIME - 86400 * $repeatchargedays;
             $r = spend::spend_time($this->userid, $fromtime, $flag);
             if ($r) {
                 showmessage(L('have_pay'), $http_referer, 1000);
             }
         }
     }
     if ($paytype) {
         if (spend::amount($readpoint, L('msg_readpoint'), $this->userid, $this->username, '', '', $flag) == false) {
             $msg = spend::get_msg();
             $http_referer = APP_PATH . 'index.php?m=pay&c=deposit&a=pay';
         } else {
             $msg = L('readpoint_pay', array('readpoint' => $readpoint));
         }
     } else {
         if (spend::point($readpoint, L('msg_readpoint'), $this->userid, $this->username, '', '', $flag) == false) {
             $msg = spend::get_msg();
             $http_referer = APP_PATH . 'index.php?m=pay&c=deposit&a=pay';
         } else {
             $msg = L('readpoint_pay_point', array('readpoint' => $readpoint));
         }
     }
     showmessage($msg, $http_referer, 3000);
 }
Пример #21
0
/**
 * 获取模型PC标签配置相信
 * @param $module 模型名
 */
function pc_tag_class ($module) {
	$filepath = PC_PATH.'modules'.DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.$module.'_tag.class.php';
	if (file_exists($filepath)) {
		$pc_tag = pc_base::load_app_class($module.'_tag', $module); 
		if (!method_exists($pc_tag, 'pc_tag')) {
			showmessage(L('the_module_will_not_support_the_operation'));
		}
		$html  = $pc_tag->pc_tag();
	} else {
		showmessage(L('the_module_will_not_support_the_operation'), HTTP_REFERER);
	}
	return $html;
}
Пример #22
0
 public function __construct()
 {
     parent::__construct();
     $this->userid = $_SESSION['userid'];
     pc_base::load_app_class('ku6api', 'video', 0);
     $this->setting = getcache('video');
     if (empty($this->setting['sn']) || empty($this->setting['skey'])) {
         header("Location: " . APP_PATH . "index.php?m=video&c=video&a=open&meunid=" . $_GET['meunid'] . '&pc_hash=' . $_GET['pc_hash']);
     }
     $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
     if (!$this->ku6api->testapi()) {
         header("Location: " . APP_PATH . "index.php?m=video&c=video&a=open&meunid=" . $_GET['meunid'] . '&pc_hash=' . $_GET['pc_hash']);
     }
 }
Пример #23
0
/**
 * 通过API接口调用标题和URL数据
 * @param string $reviewsid    评论ID
 * @return array($title, $url)   返回数据
 */
function get_comment_api($reviewsid)
{
    list($modules, $contentid, $siteid) = id_decode($reviewsid);
    if (empty($modules) || empty($siteid) || empty($contentid)) {
        return false;
    }
    $comment_api = '';
    $module = explode('_', $modules);
    $comment_api = pc_base::load_app_class('comment_api', $module[0]);
    if (empty($comment_api)) {
        return false;
    }
    return $comment_api->get_info($modules, $contentid, $siteid);
}
Пример #24
0
 public function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('video_store_model');
     $this->module_db = pc_base::load_model('module_model');
     $this->userid = $_SESSION['userid'];
     pc_base::load_app_class('ku6api', 'video', 0);
     pc_base::load_app_class('v', 'video', 0);
     $this->v = new v($this->db);
     //获取短信平台配置信息
     $this->setting = getcache('video');
     if (empty($this->setting) && ROUTE_A != 'setting') {
         showmessage(L('video_setting_not_succfull'), 'index.php?m=video&c=video&a=setting&meunid=' . $_GET['meunid']);
     }
     $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
 }
Пример #25
0
 public function public_name()
 {
     $tousername = isset($_GET['tousername']) && trim($_GET['tousername']) ? pc_base::load_config('system', 'charset') == 'gbk' ? iconv('utf-8', 'gbk', trim($_GET['tousername'])) : trim($_GET['tousername']) : exit('0');
     //判断用户名是否存在
     $member_interface = pc_base::load_app_class('member_interface', 'member');
     if ($tousername) {
         $data = $member_interface->get_member_info($tousername, 2);
         if ($data != '-1') {
             exit('1');
         } else {
             exit('0');
         }
     } else {
         exit('0');
     }
 }
Пример #26
0
 function __construct()
 {
     $this->log_db = pc_base::load_model('sms_report_model');
     $this->module_db = pc_base::load_model('module_model');
     $this->member_db = pc_base::load_model('member_model');
     //获取短信平台配置信息
     $siteid = get_siteid();
     $this->sms_setting_arr = getcache('sms');
     if (!empty($this->sms_setting_arr[$siteid])) {
         $this->sms_setting = $this->sms_setting_arr[$siteid];
     } else {
         $this->sms_setting = array('userid' => '', 'productid' => '', 'sms_key' => '');
     }
     //初始化smsapi
     pc_base::load_app_class('smsapi', '', 0);
     $this->smsapi = new smsapi($this->sms_setting['userid'], $this->sms_setting['productid'], $this->sms_setting['sms_key']);
 }
Пример #27
0
 /**
  * pc标签初始方法
  */
 public function pc_tag()
 {
     //获取站点
     $sites = pc_base::load_app_class('sites', 'admin');
     $sitelist = $sites->pc_tag_list();
     $result = getcache('special', 'commons');
     if (is_array($result)) {
         $specials = array(L('please_select', '', 'announce'));
         foreach ($result as $r) {
             if ($r['siteid'] != get_siteid()) {
                 continue;
             }
             $specials[$r['id']] = $r['title'];
         }
     }
     return array('action' => array('lists' => L('lists', '', 'announce')), 'lists' => array('siteid' => array('name' => L('sitename', '', 'announce'), 'htmltype' => 'input_select', 'defaultvalue' => get_siteid(), 'data' => $sitelist)));
 }
Пример #28
0
 /**
  * Function __construct
  * 初始化数据模型
  */
 public function __construct()
 {
     parent::__construct();
     $this->special_api = pc_base::load_app_class('special_api', 'special');
     $this->db = pc_base::load_model('special_model');
     pc_base::load_app_func('global', 'video');
     //读取视频库的配置信息
     $this->setting = getcache('video', 'video');
     if (!module_exists('video')) {
         showmessage(L('please_setting_video_info'), 'index.php?m=admin&c=module&a=init');
     }
     if (!$this->setting) {
         showmessage(L('please_not_setting_info'), 'index.php?m=video&c=video&a=setting');
     }
     pc_base::load_app_class('ku6api', 'video', 0);
     $this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
 }
Пример #29
0
 function posid($field, $value)
 {
     if (!empty($value) && is_array($value)) {
         if ($_GET['a'] == 'add') {
             $position_data_db = pc_base::load_model('position_data_model');
             $textcontent = array();
             foreach ($value as $r) {
                 if ($r != '-1') {
                     if (empty($textcontent)) {
                         foreach ($this->fields as $_key => $_value) {
                             if ($_value['isposition']) {
                                 $textcontent[$_key] = $this->data[$_key];
                             }
                         }
                         $textcontent = array2string($textcontent);
                     }
                     $thumb = $this->data['thumb'] ? 1 : 0;
                     $position_data_db->insert(array('id' => $this->id, 'catid' => $this->data['catid'], 'posid' => $r, 'thumb' => $thumb, 'module' => 'content', 'modelid' => $this->modelid, 'data' => $textcontent, 'listorder' => $this->id, 'siteid' => get_siteid()));
                 }
             }
         } else {
             $posids = array();
             $catid = $this->data['catid'];
             $push_api = pc_base::load_app_class('push_api', 'admin');
             foreach ($value as $r) {
                 if ($r != '-1') {
                     $posids[] = $r;
                 }
             }
             $textcontent = array();
             foreach ($this->fields as $_key => $_value) {
                 if ($_value['isposition']) {
                     $textcontent[$_key] = $this->data[$_key];
                 }
             }
             //颜色选择为隐藏域 在这里进行取值
             $textcontent['style'] = $_POST['style_color'] ? strip_tags($_POST['style_color']) : '';
             $textcontent['inputtime'] = strtotime($textcontent['inputtime']);
             if ($_POST['style_font_weight']) {
                 $textcontent['style'] = $textcontent['style'] . ';' . strip_tags($_POST['style_font_weight']);
             }
             $push_api->position_update($this->id, $this->modelid, $catid, $posids, $textcontent, 0);
         }
     }
 }
Пример #30
0
 public function public_name()
 {
     $username = isset($_GET['username']) && trim($_GET['username']) ? pc_base::load_config('system', 'charset') == 'gbk' ? iconv('utf-8', 'gbk', trim($_GET['username'])) : trim($_GET['username']) : exit('0');
     $member_interface = pc_base::load_app_class('member_interface', 'member');
     if ($username) {
         $username = safe_replace($username);
         //判断收件人不能为自己
         if ($username == $this->_username) {
             exit('0');
         }
         $data = $member_interface->get_member_info($username, 2);
         if ($data != '-1') {
             exit('1');
         } else {
             exit('0');
         }
     } else {
         exit('0');
     }
 }