www.gusucode.com > mcms手机网站系统 v3.1源码程序 > mcms_v3.1.0/upload/app/admin/weixin.follow.php
<?php /* * MCMS Copyright (c) 2012-2013 ZhangYiYeTai Inc. * * http://www.mcms.cc * * The program developed by loyjers core architecture, individual all rights reserved, * if you have any questions please contact loyjers@126.com */ require_once(dirname(__FILE__) . "/../../init.php"); //公用引导启动文件 check_login(); check_level('D03',AJAX); $time_start = H :: getmicrotime(); //开始时间 // 动作处理 call_mfunc(); // 模板处理 require_once(assign_tpl(basename(__FILE__), 'admin')); // ******************************************************* 函数方法 ******************************************************* function m__list() { global $dbm,$result,$global_global; $params = array( 'key'=>'weixin.follow', 'time'=>0, 'cache_type'=>CACHE_TYPE, 'server'=>$global_global['mem_server'], 'path'=>'cache/weixin' ); $cache_path = dirname(__FILE__).'/../config/' . $params['path']; $file_path = $cache_path . '/' . $params['key'] .'.php'; $a = H :: cache($params); if ($a == 'timeout') { if(file_exists($file_path)){ $params['val'] = @require_once($file_path); }else{ $params['val'] = array(); } $a = H :: cache($params); } $result = $a; } /** * 保存关注回复 */ function m__save(){ global $dbm,$global_global; check_level('D0301',AJAX); $_POST=H::sqlxss($_POST); $data = array(); $data['wx_default_text'] = isset($_POST['wx_default_text'])?trim($_POST['wx_default_text']):''; $data['wx_auto_linkurl'] = isset($_POST['wx_auto_linkurl'])?trim($_POST['wx_auto_linkurl']):''; $data['wx_cover'] = isset($_POST['wx_cover'])?trim($_POST['wx_cover']):''; $data['wx_title'] = isset($_POST['wx_title'])?trim($_POST['wx_title']):''; $params = array( 'key'=>'weixin.follow', 'time'=>0, 'cache_type'=>CACHE_TYPE, 'server'=>$global_global['mem_server'], 'path'=>'cache/weixin' ); $params['val'] = $data; H :: cache($params); die('{"code":"0","msg":"保存成功"}'); } ?>