Пример #1
0
 public function doin()
 {
     global $_M;
     if ($_M['form']['temname'] && $_M['form']['temname'] != '') {
         $query = "INSERT INTO {$_M['table']['skin_table']} SET skin_name='{$_M['form']['temname']}',skin_file='{$_M['form']['temname']}',skin_info='',devices='{$_M['form']['devices']}'";
         DB::query($query);
     } else {
         turnover("{$_M[url][own_name]}c=temtool&a=dotemlist", '操作失败!请填写模板文件夹名称!');
         die;
     }
     if (file_exists(PATH_WEB . "templates/{$_M['form']['temname']}/install/install.class.php")) {
         copy(PATH_WEB . "templates/{$_M['form']['temname']}/install/install.class.php", PATH_OWN_FILE . 'tmp/install.class.php');
         $ini = load::own_class('admin/tmp/install', 'new');
         $file = $_M['form']['temname'];
         $re = $ini->dosql();
         $query = "DELETE FROM {$_M['table']['templates']} WHERE no='{$file}'";
         DB::query($query);
         foreach ($_M['langlist']['web'] as $key => $val) {
             foreach ($re['sql'] as $ksql => $vsql) {
                 $query = "INSERT INTO {$_M['table']['templates']} SET no='{$file}',lang='{$key}',{$vsql}";
                 DB::query($query);
             }
         }
     } else {
         if (file_exists(PATH_WEB . "templates/{$_M['form']['temname']}/lang/language_cn.ini")) {
             $ini = load::own_class('admin/class/inc', 'new');
             $ini->ini($_M['form']['temname']);
         }
     }
     turnover("{$_M[url][own_name]}c=temtool&a=dotemlist");
 }
Пример #2
0
/**
* 获取COOKIE值
* @param  string  $key                             指定键值
* @return string  $_M['user']['cookie'][$key]	    返回当前管理员或会员的相关COOKIE值
* 例:get_met_cookie('metinfo_admin_name'):返回当前管理员的账号
	   get_met_cookie('metinfo_member_name'):返回当前会员的账号
	   get_met_cookie('metinfo_admin_pass'):返回当前管理员的密码
	   get_met_cookie('metinfo_member_pass'):返回当前会员的密码
*/
function get_met_cookie($key)
{
    global $_M;
    if (defined('IN_ADMIN')) {
        if ($key == 'metinfo_admin_name' || $key == 'metinfo_member_name') {
            $val = urldecode($_M['user']['cookie'][$key]);
            $val = sqlinsert($val);
            return $val;
        }
        return $_M['user']['cookie'][$key];
    } else {
        $userclass = load::sys_class('user', 'new');
        if (!$userclass->get_login_user_info()) {
            $userclass->login_by_auth($_M['form']['acc_auth'], $_M['form']['acc_key']);
        }
        $m = $userclass->get_login_user_info();
        $m['metinfo_admin_name'] = $m['username'];
        $m['metinfo_member_name'] = $m['username'];
        $m['metinfo_member_id'] = $m['id'];
        $m['metinfo_admin_id'] = $m['id'];
        $m['metinfo_admin_pass'] = $m['password'];
        $m['metinfo_member_pass'] = $m['password'];
        if ($key == 'metinfo_admin_name' || $key == 'metinfo_member_name') {
            $val = urldecode($m[$key]);
            $val = sqlinsert($val);
            return $val;
        }
        return $m[$key];
    }
}
Пример #3
0
 function __construct()
 {
     global $_M;
     parent::__construct();
     $this->moduleclass = load::mod_class('content/class/sys_article', 'new');
     $this->module = 2;
 }
Пример #4
0
 public function donews_info()
 {
     global $_M;
     $sval = $_M['form']['search_title'];
     $table = load::sys_class('tabledata', 'new');
     //加载表格数据获取类
     $where = "(lang='{$_M['lang']}' or lang='metinfo') ";
     //整理查询条件
     if ($_M['form']['search_type'] && $_M['form']['search_type'] != 'all') {
         $where .= " AND type like '%{$_M['form']['search_type']}%'";
     }
     if ($sval) {
         $where .= " AND member like '%{$sval}%'";
     }
     $order = "time DESC";
     //排序方式
     $array = $table->getdata($_M['table']['infoprompt'], '*', $where, $order);
     $j = 1;
     $url = '';
     foreach ($array as $key => $val) {
         if ($val['type'] == 'job') {
             $title = $val['newstitle'];
             $news_type = $_M['word']['recruitment_information'];
             $url = $_M['url']['site_admin'] . "content/job/cv_editor.php?anyid=29&lang={$_M['lang']}&id={$val['news_id']}";
         }
         if (strstr($val['type'], "feedback")) {
             $title = $_M['word']['news_prompt1'];
             $news_type = $_M['word']['physicalunread1'];
             $type = explode('-', $val['type']);
             $url = $_M['url']['site_admin'] . "content/feedback/editor.php?anyid=29&id={$val['news_id']}&lang={$_M['lang']}&class1={$type['1']}";
         }
         if (strstr($val['type'], "message")) {
             $title = $_M['word']['news_prompt'];
             $news_type = $_M['word']['physicalunread2'];
             $type = explode('-', $val['type']);
             $url = $_M['url']['site_admin'] . "message/editor.php?anyid=29&id={$val['news_id']}&lang={$_M['lang']}&class1={$type['1']}";
         }
         if ($val['type'] == 'official') {
             $title = $val['newstitle'];
             $news_type = $_M['word']['official_information'];
             $url = "{$_M['url']['own_form']}a=doofficial&id={$val['id']}";
         }
         $valinfo = $val['content'];
         $val['content'] = preg_replace('#^(?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,0}' . '((?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,30}).*#s', '$1', $valinfo);
         if ($valinfo != $val['content']) {
             $val['content'] .= '..';
         }
         $time = date("Y-m-d H:i:s", $val['time']);
         if ($val['see_ok'] == '0') {
             $color = '#656565';
         } else {
             $color = '#c5c5c9';
         }
         $list = array();
         $list[] = "<a href='{$_M['url']['own_form']}a=donews_jump&id={$val['id']}' style='color:{$color};' >{$title}</a>";
         $list[] = $time;
         $rarray[] = $list;
     }
     $table->rdata($rarray);
 }
Пример #5
0
 public function dopatch()
 {
     global $_M;
     $curl = load::sys_class('curl', 'new');
     $curl->set('file', '?n=platform&c=system&a=dopatch');
     $post_data = array('cmsver' => $_M['config']['metcms_v'], 'patch' => $_M['config']['met_patch']);
     $difilelist = $curl->curl_post($post_data, 10);
     $difilelists = stringto_array($difilelist, '|', '*', ':');
     if ($difilelists[0][0][0] == 'suc') {
         foreach ($difilelists[1] as $keylist => $vallist) {
             $met_patch = $vallist[0];
             unset($vallist[0]);
             foreach ($vallist as $key => $val) {
                 $dlfile = load::sys_class('dlfile', 'new');
                 $copydir = str_replace(':/admin/', ':/' . $_M['config']['met_adminfile'] . '/', ':/' . $val);
                 $copydir = str_replace(':/', '', $copydir);
                 $re = $dlfile->dlfile('file/v' . $_M['config']['metcms_v'] . '/file/' . $val, PATH_WEB . $copydir, 'metcms');
                 if ($re != 1) {
                     break;
                 }
             }
             $update_file = PATH_WEB . "{$_M['config'][met_adminfile]}/update/patch/v{$_M['config']['metcms_v']}_{$met_patch}.class.php";
             if (file_exists($update_file)) {
                 require_once $update_file;
             }
             @unlink($update_file);
             $query = "update {$_M['table']['config']} set value='{$met_patch}' where name='met_patch'";
             DB::query($query);
         }
         echo 1;
     } else {
         echo 2;
     }
     die;
 }
Пример #6
0
 public function json_list($where, $order)
 {
     global $_M;
     $this->table = load::sys_class('tabledata', 'new');
     $where = "lang='{$_M['lang']}' and (recycle = '0' or recycle = '-1') {$where}";
     $data = $this->table->getdata($this->tablename, '*', $where, $order);
     return $data;
 }
Пример #7
0
 /**
  * @func   void
  * @return void
  */
 public function __construct()
 {
     echo 'tss1 controller works<br/>';
     /*
     load::service('validator');
     
     $rules = array
     (
         'name' => 'alpha|required',
         'year' => 'num|required',
     );
     
     $Validation = new Validator();
     $Validation->validate($_POST, $rules);
     
     if (!$Validation->passed())
     {
         $Validation->goBackWithErrors();
     }
     
     if (!empty($Validation->getErrors()))
     {
         print_r($Validation->getErrors());
     }
     */
     load::library(SF::STRINGS);
     load::library(SF::NETWORK);
     #$test_string = Strings::generate_password(4);
     $test_string = Strings::generatePassword(4);
     var_dump($test_string);
     $numeric_test = (int) '-abc12.3edf';
     // this SHOULD FALL AND THROW AN ERROR
     #var_dump(Strings::strip_to_numeric($numeric_test));
     var_dump(Strings::StripToNumeric($numeric_test));
     #var_dump(Network::get_client_lang());
     var_dump(Network::getClientLang());
     exit;
     // database testing
     $data = Entries::getData();
     var_dump($data);
     /*
     load::library(SF::DEBUG);
     //load::library(SF::DEBUG)->func('pr'); // will only load clean_str()
     
     ExecuteTime::start();
     
     $parameters = array
     (
         'key'      => '1e46165dsa5ds4a',
         'action'   => 'push',
         'userid'   => 1234998,
         'keywords' => 'test'
     );
     
     ExecuteTime::end();
     echo ExecuteTime::display();
     */
 }
Пример #8
0
 public static function del($file, $type = 'php')
 {
     load::sys_func('file');
     if ($type == 'file') {
         @deldir(PATH_CACHE . $file);
     } else {
         @unlink(PATH_CACHE . $file . '.' . $type);
     }
 }
Пример #9
0
 static function config()
 {
     parent::config();
     // load the default panel config file
     self::file(c::get('root.panel') . '/defaults/config/config.php');
     $root = c::get('root.site') . '/' . c::get('panel.folder') . '/config';
     self::file($root . '/config.php');
     self::file($root . '/config.' . server::get('server_name') . '.php');
 }
Пример #10
0
 protected function __construct()
 {
     load::service('DB');
     // calling a connector class into an instance
     if (is_null($this->DB)) {
         $this->DB = new DB();
     }
     // returning the connector class
     return $this;
 }
Пример #11
0
 public function doauth()
 {
     global $_M;
     $auth = load::mod_class('system/class/auth', 'new');
     if ($auth->dl_auth($_M['form']['authpass'], $_M['form']['authcode'])) {
         turnover("{$_M['url']['own_form']}a=doindex");
     } else {
         turnover("{$_M['url']['own_form']}a=doindex", $_M['word']['authTip2']);
     }
 }
Пример #12
0
 function callClass($file, $class_name, $method)
 {
     if (file_exists($file)) {
         require_once $file;
         if (method_exists($class_name, $method)) {
             self::$log[] = $class_name . '::' . $method;
             call_user_func_array(array($class_name, $method), self::$params);
         }
     }
     self::$params = array();
 }
Пример #13
0
 public function __construct()
 {
     parent::__construct();
     global $_M;
     nav::set_nav(1, '会员列表', $_M['url']['own_name'] . 'c=admin_user&a=doindex');
     nav::set_nav(2, '会员组', $_M['url']['own_name'] . 'c=admin_group&a=doindex');
     nav::set_nav(3, '会员属性', $_M['url']['own_name'] . 'c=admin_set&a=douserfield');
     nav::set_nav(4, '会员功能设置', $_M['url']['own_name'] . 'c=admin_set&a=doindex');
     nav::set_nav(5, '社会化登录', $_M['url']['own_name'] . 'c=admin_set&a=doopen');
     $this->userclass = load::mod_class('user/class/sys_user', 'new');
 }
Пример #14
0
 /**
  * Function start function server JSON RPC.
  * @access  public
  * @static
  */
 public static function start()
 {
     // checks if a JSON-RCP request has been received.
     if ($_SERVER['REQUEST_METHOD'] != 'POST' || empty($_SERVER['CONTENT_TYPE']) || !preg_match('/application\\/json/i', $_SERVER['CONTENT_TYPE'])) {
         // If cross Domain true.
         if (config::sys('crossDomain') == 1) {
             header('Access-Control-Allow-Origin: *');
             header('Access-Control-Request-Method: POST');
             header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
         }
         // class html startTmpl.
         html::startTmpl();
     } else {
         // reads the input data.
         $request = json_decode(file_get_contents('php://input'), true);
         // Gestion error.
         try {
             // Si app-maintenance.
             if (config::sys('off') != 1) {
                 // Exception.
                 throw new Exception('SERV-ERROR-OFFLINE-MESSAGE');
             }
             // method post.
             $reqConMethod = explode('_', $request['method']);
             // Controleur.
             $control = util::filtre($reqConMethod[0]);
             // Action.
             $action = util::filtre($reqConMethod[1]);
             // Load.
             load::auto('controleur_' . $control);
             // forward_static_call_array.
             if ($result = @forward_static_call_array(array($control, $action), $request['params'])) {
                 // Succes. Array.
                 $response = array('id' => $request['id'], 'result' => $result, 'jsonrpc' => $request['jsonrpc'], 'error' => NULL);
             } else {
                 throw new Exception('SERV-ERROR-INVALID-PARAM-OR-METHODE');
             }
         } catch (Exception $e) {
             // JSON RPC Error. Array.
             $response = array('id' => $request['id'], 'result' => NULL, 'jsonrpc' => $request['jsonrpc'], 'error' => $e->getMessage());
         }
         // output the response.
         header('content-type: text/javascript');
         // If cross Domain true.
         if (config::sys('crossDomain') == 1) {
             header('Access-Control-Allow-Origin: *');
             header('Access-Control-Request-Method: POST');
             header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
         }
         // Print request.
         print json_encode($response);
     }
 }
Пример #15
0
 /**
  * 初始化
  */
 public function __construct()
 {
     parent::__construct();
     global $_M;
     met_cooike_start();
     //读取已登陆管理员信息
     $this->load_language();
     //语言加载
     $this->check();
     //验证管理员
     load::plugin('doadmin');
     //插件加载
 }
Пример #16
0
 function __construct()
 {
     global $_M;
     parent::__construct();
     $this->moduleclass = load::mod_class('content/class/sys_product', 'new');
     //
     //$this->shop = load::app_class('shop/admin/class/sys_goods', 'new');
     if (!($this->shop = load::plugin('doproduct_plugin_class', '1'))) {
         $this->shop = load::mod_class('content/class/sys_shop', 'new');
     }
     $this->paraclass = load::mod_class('system/class/sys_para', 'new');
     $this->module = 3;
 }
Пример #17
0
/**
 * 获取当前会员信息;
 * @return array  $user 返回记录当前会员信息的数组
 */
function member_information()
{
    global $_M;
    $metinfo_member_name = get_met_cookie('metinfo_member_name');
    $user = load::sys_class('user', 'new')->get_user_by_username($metinfo_member_name);
    $user['usertype'] = $user['groupid'];
    $user['admin_id'] = $user['username'];
    $user['admin_pass'] = $user['password'];
    $query = "SELECT id,name FROM {$_M['table']['column']} WHERE access <= '{$user['groupid']}' AND lang = '{$_M['lang']}'";
    $column = DB::get_all($query);
    $user['column'] = $column;
    return $user;
}
Пример #18
0
 public function authinfo()
 {
     global $_M;
     $query = "SELECT * FROM {$_M['table']['otherinfo']} WHERE id='1'";
     $key_info = DB::get_one($query);
     $curl = load::sys_class('curl', 'new');
     $curl->set('file', "index.php?n=platform&c=authcheck&m=web&a=doauth_json&key={$key_info['authpass']}&code={$key_info['authcode']}&domain={$_M['url']['site']}&datatype=data&weblang=cn");
     $post = array('post' => '');
     $info = $curl->curl_post($post);
     $re = jsondecode($info);
     $query = "update {$_M['table']['otherinfo']} set info1='{$re['webtype_h']}' where id=1";
     DB::query($query);
     return $re;
 }
Пример #19
0
 function load($file)
 {
     load::ext('getid3');
     // Initialize getID3 engine
     $getid3 = new getID3();
     $getid3->encoding = 'UTF-8';
     // Analyze file
     $info = $getid3->analyze($file);
     if (!isset($info['video'])) {
         self::$tags = array('time' => @$info['playtime_string'], 'bitrate' => round(@$info['bitrate'] / 1000), 'title' => self::getAudioTag(&$info, 'title'), 'artist' => self::getAudioTag(&$info, 'artist'), 'album' => self::getAudioTag(&$info, 'album'), 'year' => self::getAudioTag(&$info, 'year'), 'genre' => self::getAudioTag(&$info, 'genre'), 'mime_type' => @$info['mime_type'], 'filesize' => @$info['filesize']);
     } else {
         self::$tags = array('time' => @$info['playtime_string'], 'bitrate' => round(@$info['bitrate'] / 1000), 'x' => @$info['video']['resolution_x'], 'y' => @$info['video']['resolution_y'], 'mime_type' => @$info['mime_type'], 'filesize' => @$info['filesize']);
     }
 }
Пример #20
0
 public function query()
 {
     $conn = load::getConnection();
     $sql = $this->get_sql();
     $output = "";
     $result = pg_query($conn, $sql);
     if ($result && pg_num_rows($result) > 0) {
         while ($row = pg_fetch_array($result)) {
             $output .= $this->process_row($row);
         }
     }
     pg_close($conn);
     return $output;
 }
Пример #21
0
 function start()
 {
     db::connect();
     if (!router::get(1)) {
         return true;
     }
     self::$map = array('mode' => router::get(0), 'app' => router::get(1), 'module' => 'main', 'action' => router::get(2), 'id' => router::get(4));
     s::set('SYS_PATH', 'http://' . SERVER . SYS_DIR);
     define('APP', APPS . self::get('app') . '/');
     s::set('APP', APP);
     define('MODULE', APP . self::get('module') . '/');
     s::set('MODULE', MODULE);
     if (stristr(self::$map['mode'], 'admin')) {
         self::$map['mode'] = 'admin';
     } else {
         self::$map['mode'] = 'web';
     }
     if (self::$map['mode'] == 'admin') {
         if (defined('ADMIN_USER_SITE_ID')) {
             admin::observer();
             define('ADMIN_SITE_ID', ADMIN_USER_SITE_ID);
             s::set('ADMIN_SITE_ID', ADMIN_USER_SITE_ID);
             db::table('admin_sites');
             db::where('site_id', ADMIN_USER_SITE_ID);
             db::limit(1);
             $row = db::select();
             define('ADMIN_SITE', db::get('site_domain'));
             s::set('ADMIN_SITE', ADMIN_SITE);
         }
     } else {
         web::getSite();
         $lang = lang::gets(LANG_INDEX, SITE_ID);
         /*
         	Authentification webUser
         */
         web::observer();
     }
     /*
     	Set params
     */
     params::send();
     if (router::get(0) == 'feed' || router::get(0) == 'rss') {
         self::$map['module'] = 'feed';
     }
     if (self::$map['mode'] == 'admin') {
         load::module(self::get('app'), self::get('module'), self::get('action'));
     } else {
         load::handler(self::get('app'), self::get('module'), self::get('action'));
     }
 }
Пример #22
0
 public function get_info_by_curl($unionid)
 {
     global $_M;
     $data = $this->get_other_user($unionid);
     $url = "https://api.weixin.qq.com/sns/userinfo";
     $send['access_token'] = $data['access_token'];
     $send['openid'] = $data['openid'];
     $data = jsondecode(load::mod_class('user/class/curl_ssl', 'new')->curl_post($url, $send, 'get'));
     $data['username'] = $data['nickname'];
     if ($this->error_curl($data)) {
         return false;
     } else {
         return $data;
     }
 }
Пример #23
0
 public function get_info_by_curl($unionid)
 {
     global $_M;
     $data = $this->get_other_user($unionid);
     $url = "https://api.weibo.com/2/users/show.json";
     $send['access_token'] = $data['access_token'];
     $send['uid'] = $data['openid'];
     $send['source'] = $this->appkey;
     $data = jsondecode(load::mod_class('user/class/curl_ssl', 'new')->curl_post($url, $send, 'get'));
     $data['username'] = $data['screen_name'];
     if ($this->error_curl($data)) {
         return false;
     } else {
         return $data;
     }
 }
Пример #24
0
 public function json_group_list()
 {
     global $_M;
     $table = load::sys_class('tabledata', 'new');
     $order = "access";
     $where = "lang='{$_M['lang']}'";
     $grouplist = $table->getdata($_M['table']['user_group'], '*', $where, $order);
     foreach ($grouplist as $val) {
         $list = array();
         $list[] = "<input name=\"id\" type=\"checkbox\" value=\"{$val[id]}\">";
         $list[] = "<input type=\"text\" name=\"name-{$val[id]}\" data-required=\"1\" class=\"ui-input listname\" value=\"{$val[name]}\">";
         $list[] = "<input type=\"text\" name=\"access-{$val[id]}\" data-required=\"1\" class=\"ui-input met-center\" value=\"{$val['access']}\">";
         $rarray[] = $list;
     }
     $table->rdata($rarray);
 }
Пример #25
0
 public function get_tel($tel)
 {
     global $_M;
     $session = load::sys_class('session', 'new');
     if ($session->get("phonetime") && time() < $session->get("phonetime") - 220) {
         return false;
         die;
     }
     $code = random(6, 1);
     $time = time() + 300;
     $session->set("phonecode", $code);
     $session->set("phonetime", $time);
     $session->set("phonetel", $tel);
     $sms = load::sys_class('sms', 'new');
     $ret = $sms->sendsms($tel, "验证码为 {$code} ,请及时输入验证。({$_M['config']['met_webname']})");
     return $ret;
 }
Пример #26
0
 public function json_list($where, $order)
 {
     global $_M;
     $this->table = load::sys_class('tabledata', 'new');
     $p = $this->tablename;
     $s = $_M['table']['shopv2_product'];
     if ($_M['config']['shopv2_open']) {
         //开启在线订购时
         $table = $p . ' Left JOIN ' . $s . " ON ({$p}.id = {$s}.pid)";
         $where = "{$p}.lang='{$_M['lang']}' and ({$p}.recycle = '0' or {$p}.recycle = '-1') {$where}";
     } else {
         $table = $p;
         $where = "lang='{$_M['lang']}' and (recycle = '0' or recycle = '-1') {$where}";
     }
     $data = $this->table->getdata($table, '*', $where, $order);
     return $data;
 }
Пример #27
0
 public function query($sql, $orm = FALSE)
 {
     // If SQL statement is a SELECT statement
     if (preg_match('/^SELECT/is', $sql)) {
         $res = $this->con->prepare($sql);
         //$res->setFetchMode(PDO::FETCH_ASSOC);
         if ($orm) {
             load::orm_class($orm);
             $res->setFetchMode(PDO::FETCH_CLASS, $orm . '_orm');
         } else {
             $res->setFetchMode(PDO::FETCH_CLASS, 'dingo');
         }
         $res->execute();
         $this->last_result = $res->fetchAll();
     } else {
         $this->last_result = $this->con->exec($sql);
     }
     return $this->last_result;
 }
Пример #28
0
 public function doappdetail()
 {
     global $_M;
     $return_this = 1;
     $appdetail['type'] = $_M['form']['type'];
     $appdetail['no'] = $_M['form']['no'];
     //$appdetail['appid'] = $_M['form']['appid'];
     if ($appdetail['type'] == 'app') {
         nav::select_nav(2);
         $getapp = load::mod_class('myapp/class/getapp', 'new');
         $app = $getapp->get_oneapp($appdetail['no']);
         if ($app) {
             $app['url'] = "<a href=\"{$app['url']}\">{$_M['word']['dlapptips5']}</a>";
         }
         $buy_Explain = $_M['word']['langshuom'];
         $buy_Explain1 = $_M['word']['purchase_application'];
         $demonstration = "<span class='demo_url'></span>";
     }
     if ($appdetail['type'] == 'tem') {
         nav::select_nav(3);
         $query = "SELECT * FROM {$_M['table']['skin_table']} WHERE skin_file ='{$appdetail['no']}'";
         $app = DB::get_one($query);
         if ($app) {
             $app['ver'] = '1.0';
             $app['url'] = "<a target=\"_blank\" href=\"{$_M['url']['adminurl']}n=theme&c=theme&a=doindex&mobile={$app['devices']}&anyid=70&lang={$_M['lang']}\">{$_M['word']['configuratio_template']}</a>";
         }
         $appdetail['no'] = $_M['form']['appid'];
         $buy_Explain = $_M['word']['template_domain'];
         $buy_Explain1 = $_M['word']['buy_template_must'];
     }
     if ($app) {
         $appdetail['download'] = 1;
     } else {
         $appdetail['download'] = 0;
     }
     $appdetail['ver'] = $app['ver'];
     $appdetail['url'] = $app['url'];
     $query = "SELECT * FROM {$_M['table']['otherinfo']} where id=1";
     $th = DB::get_one($query);
     $authkey = $th['authpass'];
     $authcode = $th['authcode'];
     require $this->template('tem/appdetail');
 }
Пример #29
0
 public function json_para_list($where, $order, $module)
 {
     global $_M;
     $this->table = load::sys_class('tabledata', 'new');
     $where = "lang='{$_M['lang']}' and module = '{$module}' {$where}";
     $data = $this->table->getdata($_M['table']['parameter'], '*', $where, $order);
     foreach ($data as $key => $val) {
         $val['id_html'] = "<input name=\"id\" type=\"checkbox\" value=\"{$val[id]}\">";
         $val['no_order_html'] = "<input type=\"text\" name=\"no_order-{$val[id]}\" data-required=\"1\" class=\"ui-input met-center\" value=\"{$val['no_order']}\">";
         $val['name_html'] = "<input type=\"text\" name=\"name-{$val[id]}\" data-required=\"1\" class=\"ui-input listname\" value=\"{$val['name']}\">";
         $val['paratype_html'] = $this->para_type($val['id'], $val['type']);
         $val['wr_oks_html'] = "<input name=\"wr_oks-{$val[id]}\" type=\"checkbox\" data-checked=\"{$val['wr_oks']}\" value=\"1\">";
         $val['wr_ok_html'] = "<input name=\"wr_ok-{$val[id]}\" type=\"checkbox\" data-checked=\"{$val['wr_ok']}\" value=\"1\">";
         $val['description_html'] = "<input type=\"text\" name=\"description-{$val[id]}\" class=\"ui-input listname\" value=\"{$val[description]}\">";
         $none = $val['type'] == 2 || $val['type'] == 4 || $val['type'] == 6 ? '' : ' none';
         $val['options_html'] = "<button type=\"button\" class=\"btn btn-info{$none} paraoption\" data-id=\"{$val[id]}\">设置选项</button><input name=\"options-{$val[id]}\" type=\"hidden\" value=\"{$val['options']}\">";
         $datas[] = $val;
     }
     return $datas;
 }
Пример #30
0
 function Topic()
 {
     if (MEMBER_ID < 1) {
         response_text('您是游客,没有权限举报');
     }
     $tid = jget('totid', 'int', 'P');
     $report_reason = $this->Post['report_reason'];
     $report_content = $this->Post['report_content'];
     $data = array('uid' => MEMBER_ID, 'username' => MEMBER_NICKNAME, 'ip' => $GLOBALS['_J']['client_ip'], 'reason' => (int) $report_reason, 'content' => strip_tags($report_content), 'tid' => (int) $tid, 'dateline' => time());
     $result = jtable('report')->insert($data);
     if ($notice_to_admin = $this->Config['notice_to_admin']) {
         $message = "用户" . MEMBER_NICKNAME . "举报了微博ID:{$tid}(" . $data['content'] . "),<a href='admin.php?mod=report&code=report_manage' target='_blank'>点击</a>进入管理。";
         $pm_post = array('message' => $message, 'to_user' => str_replace('|', ',', $notice_to_admin));
         $admin_info = DB::fetch_first('select `uid`,`username`,`nickname` from `' . TABLE_PREFIX . 'members` where `uid` = 1');
         load::logic('pm');
         $PmLogic = new PmLogic();
         $PmLogic->pmSend($pm_post, $admin_info['uid'], $admin_info['username'], $admin_info['nickname']);
     }
     response_text('举报成功');
 }