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


PHP System::load_sys_class方法代码示例

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


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

示例1: edit

 public function edit()
 {
     $brandid = intval($this->segment(4));
     $brands = $this->db()->Getone("select * from `@#_brand` where id='{$brandid}'");
     if (!$brands) {
         _message("参数错误!");
     }
     $categorys = $this->db->GetList("SELECT * FROM `@#_category` WHERE 1 order by `parentid` ASC,`cateid` ASC", array('key' => 'cateid'));
     $tree = System::load_sys_class('tree');
     $tree->icon = array('│ ', '├─ ', '└─ ');
     $tree->nbsp = ' ';
     $categoryshtml = "<option value='\$cateid'>\$spacer\$name</option>";
     $tree->init($categorys);
     $categoryshtml = $tree->get_tree(0, $categoryshtml);
     $topcat = $this->db->GetOne("SELECT * FROM `@#_category` WHERE `cateid` = '{$brands['cateid']}'");
     $categoryshtml .= "<option value='{$topcat['cateid']}' selected>≡ {$topcat['name']} ≡</option>";
     if (isset($_POST['dosubmit'])) {
         $info = array();
         $info['cateid'] = intval($_POST['cateid']);
         if (!$info['cateid']) {
             _message("请选择所属栏目");
         }
         $info['name'] = htmlspecialchars($_POST['name']);
         $info['order'] = intval($_POST['order']) ? intval($_POST['order']) : 1;
         $sql = "UPDATE `@#_brand` SET `cateid`='{$info['cateid']}', `name`='{$info['name']}', `order`='{$info['order']}' WHERE (`id`='{$brandid}') LIMIT 1";
         $this->db->Query($sql);
         if ($this->db->affected_rows()) {
             _message("操作成功!", WEB_PATH . '/' . ROUTE_M . '/brand/lists');
         } else {
             _message("操作失败!");
         }
     }
     include $this->tpl(ROUTE_M, 'brand.edit');
 }
开发者ID:king3388,项目名称:king,代码行数:34,代码来源:brand.action.php

示例2: upimage

 public function upimage()
 {
     //System::load_app_class('Uploader','','no');
     //上传图片框中的描述表单名称,
     //$title = htmlspecialchars($_POST['pictitle'], ENT_QUOTES);
     //$path = htmlspecialchars($_POST['dir'], ENT_QUOTES);
     if (!isset($_POST['pictitle']) && !isset($_FILES['upfile'])) {
         exit;
     }
     $title = $_POST['pictitle'];
     $path = G_UPLOAD . 'shopimg/';
     System::load_sys_class('upload', 'sys', 'no');
     upload::upload_config(array('png', 'jpg', 'jpeg', 'gif'), 500000, 'shopimg');
     upload::go_upload($_FILES['upfile']);
     if (!upload::$ok) {
         $url = '';
         $title = $title;
         $originalName = '';
         $state = upload::$error;
     } else {
         $url = G_UPLOAD_PATH . '/shopimg/' . upload::$filedir . "/" . upload::$filename;
         $title = $title;
         $originalName = '';
         $state = 'SUCCESS';
     }
     echo "{'url':'" . $url . "','title':'" . $title . "','original':'" . $originalName . "','state':'" . $state . "'}";
     //{'url':'upload/20130728/13749880933714.jpg','title':'梨花.jpg','original':'梨花.jpg','state':'SUCCESS'}
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:28,代码来源:ueditor.action.php

示例3: insert

 public function insert()
 {
     $msg = array();
     $path = isset($_POST['path']) ? _encrypt($_POST['path'], 'DECODE') : '';
     $size = isset($_POST['size']) ? _encrypt($_POST['size'], 'DECODE') : 0;
     $type = isset($_POST['type']) ? _encrypt($_POST['type'], 'DECODE') : 'image';
     $type = explode(',', $this->getUPtype($type, true));
     if (!is_dir(G_UPLOAD . $path)) {
         $msg['ok'] = 'no';
         $msg['text'] = $path . "文件夹不存在";
         echo json_encode($msg);
         exit;
     }
     if (is_array($_FILES['Filedata'])) {
         System::load_sys_class('upload', 'sys', 'no');
         upload::upload_config($type, $size, $path);
         upload::go_upload($_FILES['Filedata']);
         if (!upload::$ok) {
             $msg['ok'] = 'no';
             $msg['text'] = upload::$error;
         } else {
             $msg['ok'] = 'yes';
             $msg['text'] = $path . '/' . upload::$filedir . "/" . upload::$filename;
         }
         echo json_encode($msg);
     }
 }
开发者ID:king3388,项目名称:king,代码行数:27,代码来源:uploadify.action.php

示例4: adminuser

 public function adminuser()
 {
     $curtime = time();
     $ruleinfo = $this->db->GetOne("select * from `@#_egglotter_rule` where `starttime`<='{$curtime}' and `endtime`>='{$curtime}' and `startusing`=1");
     $rule_id = $ruleinfo['rule_id'];
     $spoilinfo = $this->db->GetList("select * from `@#_egglotter_spoil` where `rule_id`='{$rule_id}'");
     $spoil_id = $spoilinfo[2]['spoil_id'];
     //分页
     $num = 30;
     $total = $this->db->GetCount("select * from `@#_egglotter_award` where `spoil_id`!='{$spoil_id}' ");
     $page = System::load_sys_class('page');
     if (isset($_GET['p'])) {
         $pagenum = $_GET['p'];
     } else {
         $pagenum = 1;
     }
     $page->config($total, $num, $pagenum, "0");
     if ($pagenum > $page->page) {
         $pagenum = $page->page;
     }
     $award = $this->db->GetPage("select * from `@#_egglotter_award` where `spoil_id`!='{$spoil_id}'  order by `award_id` DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
     $rule = $this->db->GetList("select * from `@#_egglotter_rule`");
     $slinfo = $this->db->GetList("select * from `@#_egglotter_spoil` ");
     $member = $this->db->GetList("select * from `@#_member`");
     //print_r($award);
     include "tpl/egglotter_user.adminuser.php";
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:27,代码来源:egglotter.admin.php

示例5: config_jsdz

 private function config_jsdz()
 {
     $this->db = System::load_sys_class('model');
     $param = array("version" => "1.0", "token" => "", "merchantNum" => ConfigUtil::get_val_by_key('merchantNum'), "merchantRemark" => $this->config['shouname'], "tradeNum" => $this->config['code'], "tradeName" => $this->config['title'], "tradeDescription" => $this->config['title'], "tradeTime" => date('Y-m-d H:i:s', time()), "tradeAmount" => $this->config['money'] * 100, "currency" => "CNY", "notifyUrl" => $this->config['NotifyUrl'], "successCallbackUrl" => $this->config['ReturnUrl'], "failCallbackUrl" => $this->config['ReturnUrl']);
     $sign = SignUtil::sign($param);
     $param["merchantSign"] = $sign;
     if ($param["version"] == "1.0") {
         //敏感信息未加密
     } else {
         if ($param["version"] == "2.0") {
             //敏感信息加密
             //获取商户 DESkey
             //对敏感信息进行 DES加密
             $desUtils = new DesUtils();
             $key = ConfigUtil::get_val_by_key("desKey");
             $param["merchantRemark"] = $desUtils->encrypt($param["merchantRemark"], $key);
             $param["tradeNum"] = $desUtils->encrypt($param["tradeNum"], $key);
             $param["tradeName"] = $desUtils->encrypt($param["tradeName"], $key);
             $param["tradeDescription"] = $desUtils->encrypt($param["tradeDescription"], $key);
             $param["tradeTime"] = $desUtils->encrypt($param["tradeTime"], $key);
             $param["tradeAmount"] = $desUtils->encrypt($param["tradeAmount"], $key);
             $param["currency"] = $desUtils->encrypt($param["currency"], $key);
             $param["notifyUrl"] = $desUtils->encrypt($param["notifyUrl"], $key);
             $param["successCallbackUrl"] = $desUtils->encrypt($param["successCallbackUrl"], $key);
             $param["failCallbackUrl"] = $desUtils->encrypt($param["failCallbackUrl"], $key);
         }
     }
     $cbjpaySubmit = new CbjpaySubmit($param);
     $this->url = $cbjpaySubmit->buildRequestForm($param, 'POST', 'submit');
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:30,代码来源:cbjpay.class.php

示例6: config

 public static function config($config = array())
 {
     if (!is_array($config)) {
         return false;
     }
     self::$config = $config;
     self::$mail = System::load_sys_class("phpmailer");
     self::$mail->IsSMTP();
     // 启用SMTP
     self::$mail->Host = $config['stmp_host'];
     //SMTP服务器
     self::$mail->SMTPAuth = true;
     //开启SMTP认证
     self::$mail->Username = $config['user'];
     // SMTP用户名
     self::$mail->Password = $config['pass'];
     // SMTP密码
     self::$mail->From = $config['from'];
     //发件人地址
     self::$mail->FromName = $config['fromName'];
     //发件人
     self::$mail->AddReplyTo($config['from'], $config['fromName']);
     //回复地址
     self::$mail->WordWrap = 50;
     //设置每行字符长度
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:26,代码来源:email.class.php

示例7: insert

 public function insert()
 {
     $msg = array();
     $path = isset($_POST['path']) ? _encrypt($_POST['path'], 'DECODE') : '';
     $size = isset($_POST['size']) ? _encrypt($_POST['size'], 'DECODE') : 0;
     $type = isset($_POST['type']) ? _encrypt($_POST['type'], 'DECODE') : 'image';
     $type = explode(',', $this->getUPtype($type, true));
     $watermark = $_POST['iswatermark'] == "true" ? "yes" : "no";
     if (!is_dir(G_UPLOAD . $path)) {
         $msg['ok'] = 'no';
         $msg['text'] = $path . "文件夹不存在";
         echo json_encode($msg);
         exit;
     }
     System::load_app_class("admin", G_ADMIN_DIR, "no");
     $admincheck = admin::StaticCheckAdminInfo() ? 1 : 0;
     if (is_array($_FILES['Filedata'])) {
         System::load_sys_class('upload', 'sys', 'no');
         upload::upload_config($type, $size, $path);
         upload::go_upload($_FILES['Filedata'], $watermark);
         if (!upload::$ok) {
             $msg['ok'] = 'no';
             $msg['text'] = upload::$error;
         } else {
             $msg['ok'] = 'yes';
             $msg['text'] = $path . '/' . upload::$filedir . "/" . upload::$filename;
         }
         echo json_encode($msg);
     }
 }
开发者ID:think-css,项目名称:yungou,代码行数:30,代码来源:uploadify.action.php

示例8: view

 protected final function view($module = '', $template = '', $StyleTheme = '')
 {
     if (empty($StyleTheme)) {
         $style = G_STYLE . DIRECTORY_SEPARATOR . G_STYLE_HTML;
     } else {
         $templates = System::load_sys_config('templates', $style);
         $style = $templates['dir'] . DIRECTORY_SEPARATOR . $templates['html'];
     }
     $FileTpl = G_CACHES . 'caches_template' . DIRECTORY_SEPARATOR . dirname($style) . DIRECTORY_SEPARATOR . md5($module . '.' . $template) . '.tpl.php';
     $FileHtml = G_TEMPLATES . $style . DIRECTORY_SEPARATOR . $module . '.' . $template . '.html';
     if (file_exists($FileHtml)) {
         if (file_exists($FileTpl) && @filemtime($FileTpl) >= @filemtime($FileHtml)) {
             return include $FileTpl;
         } else {
             $template_cache = System::load_sys_class('template_cache');
             if (!is_dir(dirname(dirname($FileTpl)))) {
                 mkdir(dirname(dirname($FileTpl)), 0777, true) or die("Not Dir");
                 chmod(dirname(dirname($FileTpl)), 0777);
             }
             if (!is_dir(dirname($FileTpl))) {
                 mkdir(dirname($FileTpl), 0777, true) or die("Not Dir");
                 chmod(dirname($FileTpl), 0777);
             }
             $PutFileTpl = $template_cache->template_init($FileTpl, $FileHtml, $module, $template);
             if ($PutFileTpl) {
                 return include $FileTpl;
             } else {
                 _error('template message', 'The "' . $module . '.' . $template . '" template file does not exist');
             }
         }
     }
     _error('template message', 'The "' . $module . '.' . $template . '" template file does not exist');
 }
开发者ID:think-css,项目名称:yungou,代码行数:33,代码来源:SystemAction.class.php

示例9: tag

 public function tag()
 {
     $search = $this->segment_array();
     array_shift($search);
     array_shift($search);
     array_shift($search);
     $search = implode('/', $search);
     if (!$search) {
         _message("输入搜索关键字");
     }
     $search = urldecode($search);
     $search = safe_replace($search);
     if (!_is_utf8($search)) {
         $search = iconv("GBK", "UTF-8", $search);
     }
     $mysql_model = System::load_sys_class('model');
     $search = str_ireplace("union", '', $search);
     $search = str_ireplace("select", '', $search);
     $search = str_ireplace("delete", '', $search);
     $search = str_ireplace("update", '', $search);
     $search = str_ireplace("/**/", '', $search);
     $title = $search . ' - ' . _cfg('web_name');
     $shoplist = $mysql_model->GetList("select title,thumb,id,sid,zongrenshu,canyurenshu,shenyurenshu,money from `@#_shoplist` WHERE shenyurenshu !=0 and `title` LIKE '%" . $search . "%' order by shenyurenshu desc");
     $list = count($shoplist);
     include templates("search", "search");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:26,代码来源:index.action.php

示例10: config

 public function config($config = null)
 {
     include_once dirname(__FILE__) . "/wxpay/WxPayPubHelper.php";
     //引入文件需求
     /*echo "<pre/>";
     		print_r($config);exit;*/
     $this->config = $config;
     $this->db = System::load_sys_class('model');
     $pay_type = $this->db->GetOne("SELECT * from `@#_pay` where `pay_class` = 'wxpay' and `pay_start` = '1'");
     $pay_type_key = unserialize($pay_type['pay_key']);
     WxPayConf_pub::$APPID = $pay_type_key['APPID']['val'];
     //微信的APPID
     WxPayConf_pub::$MCHID = $pay_type_key['MCHID']['val'];
     //微信商户号
     WxPayConf_pub::$KEY = $pay_type_key['KEY']['val'];
     //微信支付秘钥
     WxPayConf_pub::$APPSECRET = $pay_type_key['APPSECRET']['val'];
     WxPayConf_pub::$NOTIFY_URL = $config['NotifyUrl'];
     if ($config['type'] == 1) {
         $this->config_jsdz();
     }
     if ($config['type'] == 2) {
         $this->config_dbjy();
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:25,代码来源:wxpay.class.php

示例11: send_insert

 private function send_insert($uid, $gid, $username, $shoptitle, $send_type)
 {
     $db = System::load_sys_class("model");
     $time = time();
     $sql = "INSERT INTO `@#_send` (`uid`,`gid`,`username`,`shoptitle`,`send_type`,`send_time`) VALUES ";
     $sql .= "('{$uid}','{$gid}','{$username}','{$shoptitle}','{$send_type}','{$time}')";
     $db->Query($sql);
 }
开发者ID:king3388,项目名称:king,代码行数:8,代码来源:send.action.php

示例12: buyrecordbai

 public function buyrecordbai()
 {
     $this->db = System::load_sys_class("model");
     $res = $this->db->GetOne("select sum(gonumber) gonumber from `@#_member_go_record`");
     $this->db->query("update `@#_caches` set value='{$res['gonumber']}' where `key`='goods_count_num'");
     $RecordList = $this->db->GetList("select username,uid,shopid,shopname,shopqishu,gonumber,time from `@#_member_go_record` where 1 order by id desc limit 0,100");
     include templates("index", "buyrecordbai");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:databuyrecord.action.php

示例13: init

 public function init()
 {
     $mysql_model = System::load_sys_class('model');
     $title = "友情链接";
     $link_size = $mysql_model->GetList("select * from `@#_link` where `type`='1'");
     $link_img = $mysql_model->GetList("select * from `@#_link` where `type`='2'");
     include templates("link", "link");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:link.action.php

示例14: __construct

 public function __construct()
 {
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma:no-cache");
     $this->Cartlist = _getcookie('Cartlist');
     $this->db = System::load_sys_class("model");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:8,代码来源:cart.action.php

示例15: init

 public function init()
 {
     $this->db = System::load_sys_class("model");
     $e_id = intval($this->segment(4));
     $this->db->Query("UPDATE  `@#_encourage_award`  SET  `e_get`='Y'  where `e_id`='{$e_id}'");
     //_message("修改成功");
     echo "<script>alert('修改成功!');window.location.href='" . WEB_PATH . "/encourage_award/encourage_award/init';</script>";
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:encourageqtget.action.php


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