• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP load类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doin

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


示例2: 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


示例3: __construct

 function __construct()
 {
     global $_M;
     parent::__construct();
     $this->moduleclass = load::mod_class('content/class/sys_article', 'new');
     $this->module = 2;
 }
开发者ID:nanfs,项目名称:lt,代码行数:7,代码来源:article_admin.class.php


示例4: 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


示例5: 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


示例6: 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


示例7: __construct

 /**
  * @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();
     */
 }
开发者ID:tfont,项目名称:skyfire,代码行数:62,代码来源:index.php


示例8: del

 public static function del($file, $type = 'php')
 {
     load::sys_func('file');
     if ($type == 'file') {
         @deldir(PATH_CACHE . $file);
     } else {
         @unlink(PATH_CACHE . $file . '.' . $type);
     }
 }
开发者ID:nanfs,项目名称:lt,代码行数:9,代码来源:cache.class.php


示例9: config

 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');
 }
开发者ID:nilshendriks,项目名称:kirbycms-panel,代码行数:9,代码来源:load.php


示例10: __construct

 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;
 }
开发者ID:tfont,项目名称:skyfire,代码行数:10,代码来源:abstract.model.php


示例11: doauth

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


示例12: __construct

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


示例13: start

 /**
  * 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);
     }
 }
开发者ID:iloveyou416068,项目名称:Server-RPC-Framework,代码行数:58,代码来源:app.php


示例14: __construct

 /**
  * 初始化
  */
 public function __construct()
 {
     parent::__construct();
     global $_M;
     met_cooike_start();
     //读取已登陆管理员信息
     $this->load_language();
     //语言加载
     $this->check();
     //验证管理员
     load::plugin('doadmin');
     //插件加载
 }
开发者ID:nanfs,项目名称:lt,代码行数:16,代码来源:admin.class.php


示例15: __construct

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


示例16: 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


示例17: 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


示例18: load

 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']);
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:14,代码来源:media.php


示例19: query

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


示例20: start

 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'));
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:50,代码来源:loader.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP loader类代码示例发布时间:2022-05-23
下一篇:
PHP lms_steam类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap