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


PHP load::sys_class方法代码示例

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


在下文中一共展示了load::sys_class方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dopatch

 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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:35,代码来源:patch.class.php

示例2: donews_info

 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);
 }
开发者ID:nanfs,项目名称:lt,代码行数:60,代码来源:news.class.php

示例3: dotable_temset_json

 public function dotable_temset_json()
 {
     global $_M;
     $table = load::sys_class('tabledata', 'new');
     //加载表格数据获取类
     $where = "no='{$_M['form']['no']}' and pos='{$_M['form']['pos']}' and lang='{$_M['form']['lang']}'";
     $order = "no_order";
     //排序方式
     $array = $table->getdata($_M['table']['templates'], '*', $where, $order);
     foreach ($array as $key => $val) {
         $list = array();
         $list[] = "<input name=\"id\" type=\"checkbox\" value=\"{$val[id]}\" />";
         $list[] = '<i class="fa fa-caret-right"></i>';
         $list[] = $this->select($val['type'], $val[id]);
         $list[] = "<input type=\"text\" name=\"name-{$val[id]}\" class=\"ui-input\" placeholder=\"变量名\" data-norepeat='namenopt' value=\"{$val['name']}\" >";
         $list[] = "<input type=\"text\" name=\"defaultvalue-{$val[id]}\" class=\"ui-input\"  placeholder=\"默认值\" value=\"{$val['defaultvalue']}\" >";
         $list[] = "<input type=\"text\" name=\"valueinfo-{$val[id]}\" class=\"ui-input\" value=\"{$val['valueinfo']}\" placeholder=\"标题\" data-required=\"1\">";
         $list[] = "<input type=\"text\" name=\"tips-{$val[id]}\" class=\"ui-input\" placeholder=\"说明\" value=\"{$val['tips']}\" >";
         $list[] = "\n\t\t\t\t<select name='pos-{$val[id]}' data-checked='{$val[pos]}'>\n\t\t\t\t\t<option value='0'>全局</option>\n\t\t\t\t\t<option value='1'>首页</option>\n\t\t\t\t\t<option value='2'>列表页</option>\n\t\t\t\t\t<option value='3'>详细页</option>\n\t\t\t\t</select>\n\t\t\t";
         $list[] = "\n\t\t\t\t<a href=\"{$_M[url][own_form]}a=dosetlist\" class='selectd'>设置选项</a>\n\t\t\t\t<span class=\"line selectd\">|</span>\n\t\t\t\t<a href=\"{$_M[url][own_form]}a=dotable_add&pos={$_M['form']['pos']}\" class='nowaddlist'>添加子选项</a>\n\t\t\t\t<span class=\"line nowaddlist\">|</span>\n\t\t\t\t<input type='hidden' name='selectd-{$val[id]}' value='{$val['selectd']}' />\n\t\t\t\t<input type='hidden' name='style-{$val[id]}' value='{$val['style']}' />\n\t\t\t\t<a href=\"{$_M['url']['own_form']}a=dosetsave&allid={$val[id]},&submit_type=del&no={$_M['form']['no']}&pos={$_M['form']['pos']}\" data-confirm=\"您确定要删除该信息吗?删除之后无法再恢复。<br/>如果删除分区,分区下的子选项不会被删除。\">删除</a>";
         //{$_M['url']['own_name']}c=setedit&a=dosetedit&id={$val[id]}
         if ($val['type'] == 1) {
             $list['toclass'] = 'fenqu';
         } else {
             $list['toclass'] = 'xuanxiang';
         }
         $rarray[] = $list;
     }
     $table->rdata($rarray);
 }
开发者ID:nanfs,项目名称:lt,代码行数:30,代码来源:temset.class.php

示例4: get_met_cookie

/**
* 获取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];
    }
}
开发者ID:nanfs,项目名称:lt,代码行数:39,代码来源:power.func.php

示例5: json_list

 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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:8,代码来源:sys_article.class.php

示例6: member_information

/**
 * 获取当前会员信息;
 * @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;
}
开发者ID:nanfs,项目名称:lt,代码行数:17,代码来源:web.func.php

示例7: authinfo

 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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:14,代码来源:auth.class.php

示例8: json_group_list

 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);
 }
开发者ID:nanfs,项目名称:lt,代码行数:16,代码来源:sys_user.class.php

示例9: get_tel

 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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:17,代码来源:valid.class.php

示例10: json_product_list

 public function json_product_list($where, $order)
 {
     global $_M;
     $this->table = load::sys_class('tabledata', 'new');
     $p = $_M['table']['product'];
     $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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:17,代码来源:sys_shop_new.class.php

示例11: dotable_temlist_json

 public function dotable_temlist_json()
 {
     global $_M;
     $table = load::sys_class('tabledata', 'new');
     //加载表格数据获取类
     $where = "";
     $order = "";
     //排序方式
     $array = $table->getdata($_M['table']['skin_table'], '*', $where, $order);
     foreach ($array as $key => $val) {
         $list = array();
         $list[] = "<img src='{$_M[url][site]}templates/{$val['skin_file']}/view.jpg' width='150' style='padding:5px; background:#fff; border:1px solid #ddd;' />";
         $list[] = $val['skin_file'];
         $list[] = $val['devices'] ? '手机模板' : '电脑模板';
         $list[] = "\n\t\t\t\t\t\t<a href=\"{$_M['url']['own_name']}c=temset&a=doset&no={$val[skin_file]}\">自定义标签</a>\n\t\t\t\t\t\t<span class=\"line\">|</span>\n\t\t\t\t\t\t<a href=\"{$_M['url']['own_name']}c=temtool&a=dode&id={$val[id]}&no={$val[skin_file]}\" data-confirm=\"您确定要删除该信息吗?删除之后无法再恢复。\">删除</a>\n\t\t\t";
         $rarray[] = $list;
     }
     $table->rdata($rarray);
 }
开发者ID:nanfs,项目名称:lt,代码行数:19,代码来源:temtool.class.php

示例12: json_para_list

 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;
 }
开发者ID:nanfs,项目名称:lt,代码行数:20,代码来源:sys_para.class.php

示例13: __construct

 /**
  * 初始化
  */
 public function __construct()
 {
     global $_M;
     parent::__construct();
     $this->check();
     $this->userclass = load::sys_class('user', 'new');
     $query = "SELECT * FROM {$_M['table']['column']} WHERE module='10' AND lang='{$_M['lang']}'";
     $member = DB::get_one($query);
     if ($_M['config']['met_title_type'] == 0) {
         $_M['tem_data']['title'] = $member['name'];
     } else {
         if ($_M['config']['met_title_type'] == 1) {
             $_M['tem_data']['title'] = $member['name'] . '-' . $_M['config']['met_keywords'];
         } else {
             if ($_M['config']['met_title_type'] == 2) {
                 $_M['tem_data']['title'] = $member['name'] . '-' . $_M['config']['met_webname'];
             } else {
                 if ($_M['config']['met_title_type'] == 3) {
                     $_M['tem_data']['title'] = $member['name'] . '-' . $_M['config']['met_keywords'] . '-' . $_M['config']['met_webname'];
                 }
             }
         }
     }
     $query = "SELECT * FROM {$_M['table']['ifmember_left']}";
     $navigation = DB::get_all($query);
     foreach ($navigation as $key => $val) {
         if ($val[columnid]) {
             //$column = $class_list[$val[columnid]];
             $query = "SELECT * FROM {$_M['table']['column']} WHERE id = '{$val[columnid]}'";
             $column = DB::get_one($query);
             $val['foldername'] = $val['foldername'] ? $val['foldername'] : $column['foldername'];
             $val['filename'] = $val['filename'] ? $val['filename'] : 'index.php';
             $list['url'] = "../{$val['foldername']}/{$val['filename']}";
             $list['title'] = $column['name'];
         } else {
             $list['url'] = "../{$val['foldername']}/{$val['filename']}";
             $list['title'] = $val['title'];
         }
         $_M['html']['app_sidebar'][] = $list;
     }
 }
开发者ID:nanfs,项目名称:lt,代码行数:44,代码来源:userweb.class.php

示例14: dousercsv

 function dousercsv()
 {
     global $_M;
     $groupid = $_M['form']['groupid'];
     $keyword = $_M['form']['keyword'];
     $search = $groupid ? "and groupid = '{$groupid}'" : '';
     $search .= $keyword ? "and (username like '%{$keyword}%' || email like '%{$keyword}%' || tel like '%{$keyword}%')" : '';
     /*查询表*/
     $query = "SELECT * FROM {$_M['table']['user']} WHERE lang='{$_M['lang']}' {$search} ORDER BY login_time DESC,register_time DESC";
     //mysql语句
     $array = DB::get_all($query);
     $paralist = $this->paraclass->get_para_list(10);
     foreach ($array as $key => $val) {
         switch ($val['source']) {
             case 'weixin':
                 $val['source'] = '微信登录';
                 break;
             case 'weibo':
                 $val['source'] = '微博登录';
                 break;
             case 'qq':
                 $val['source'] = 'QQ登录';
                 break;
             default:
                 $val['source'] = '注册';
                 break;
         }
         if (!$val['login_time']) {
             $val['login_time'] = $val['register_time'];
         }
         $list = array();
         $list[] = $val['username'];
         $list[] = $user_group[$val['groupid']];
         $list[] = date('Y-m-d H:i:s', $val['register_time']);
         $list[] = date('Y-m-d H:i:s', $val['login_time']);
         $list[] = $val['login_count'];
         $list[] = $val['valid'] ? '已激活' : '未激活';
         $list[] = $val['source'];
         $list[] = $val['email'];
         $list[] = $val['tel'];
         if ($paralist) {
             $para = $this->paraclass->get_para($val['id'], 10);
             foreach ($paralist as $vals) {
                 $list[] = $para['info_' . $vals['id']];
             }
         }
         $rarray[] = $list;
     }
     $filename = "USER_" . date('Y-m-d', time()) . "_ACCLOG";
     $head = array('用户名', '会员组', '注册时间', '最后活跃', '登录次数', '是否激活', '来源', '绑定邮箱', '绑定手机');
     if ($paralist) {
         foreach ($paralist as $val) {
             $head[] = $val['name'];
         }
     }
     $csv = load::sys_class('csv', 'new');
     $csv->get_csv($filename, $rarray, $head);
 }
开发者ID:nanfs,项目名称:lt,代码行数:58,代码来源:admin_user.class.php

示例15: dosafety_teladd

 public function dosafety_teladd()
 {
     global $_M;
     $session = load::sys_class('session', 'new');
     if ($_M['form']['code'] != $session->get("phonecode")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['membercode']);
     }
     if (time() > $session->get("phonetime")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['codetimeout']);
     }
     if ($_M['form']['tel'] != $session->get("phonetel")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['telcheckfail']);
     }
     $session->del('phonecode');
     $session->del('phonetime');
     $session->del('phonetel');
     if ($this->userclass->editor_uesr_tel($_M['user']['id'], $_M['form']['tel'])) {
         okinfo($_M['url']['profile_safety'], $_M['word']['bindingok']);
     } else {
         okinfo($_M['url']['profile_safety'], $_M['word']['opfail']);
     }
 }
开发者ID:nanfs,项目名称:lt,代码行数:22,代码来源:profile.class.php


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