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

PHP jget函数代码示例

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

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



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

示例1: login

 public function login()
 {
     $username = jget('username', 'txt');
     $password = jget('password');
     $openid = jget('openid');
     if ($username == "" || $password == "") {
         json_error("无法登录,用户名或密码不能为空");
     }
     if ($this->Config['login_by_uid']) {
         is_numeric($username) && json_error("禁止使用UID登录");
     }
     if ($GLOBALS['_J']['plugins']['func']['login']) {
         hookscript('login', 'funcs', array('param' => $this->Post, 'step' => 'check'), 'login');
     }
     $rets = jsg_member_login($username, $password);
     $uid = (int) $rets['uid'];
     if ($uid < 1) {
         json_error(array_iconv($this->Config['charset'], 'utf-8', $rets['error']));
     }
     $r = false;
     if ($openid && $uid) {
         $r = jlogic('wechat')->do_bind($openid, $uid);
     }
     if ($r) {
         json_result("绑定成功!");
     } else {
         json_error("绑定失败!");
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:29,代码来源:wechat.mod.php


示例2: static_data_refresh

 function static_data_refresh()
 {
     $type = jget('type');
     if (!in_array($type, array('app', 'content', 'login', 'other', 'role', 'user', 'verify'))) {
         exit('type is invalid');
     }
     $ret = array();
     $other_logic = jlogic('other');
     $func = 'get' . ucfirst($type) . 'Statistics';
     if (method_exists($other_logic, $func)) {
         $cache_id = 'misc/' . $type . '_statistics';
         cache_file('rm', $cache_id);
         if ($type == 'other') {
             cache_file('rm', 'misc/data_length');
         }
         $ret = $other_logic->{$func}();
     }
     #生成html代码
     $head_html = "<tr class='altbg1'>";
     $body_html = "<tr class='altbg2'>";
     if ($ret) {
         foreach ($ret['data'] as $k => $v) {
             $head_html .= "<td>{$v['name']}</td>";
             $body_html .= "<td>{$v['num']}</td>";
         }
     }
     $head_html .= "</tr>";
     $body_html .= "</tr>";
     echo $head_html . $body_html;
     exit;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:ajax.mod.php


示例3: get_sub_menu

function get_sub_menu()
{
    if (defined('IN_GET_SUB_MENU_FUNC')) {
        return array();
    }
    define('IN_GET_SUB_MENU_FUNC', true);
    if (!@(include_once ROOT_PATH . "./setting/admin_page_menu.php")) {
        return false;
    }
    $mod = jget('mod', 'txt');
    $code = jget('code', 'txt');
    $admin_link2 = $admin_link = 'admin.php';
    if ($mod) {
        $admin_link .= '?mod=' . $mod;
        if (empty($code) || 'index' == $code) {
            $admin_link2 = $admin_link;
        }
        if ($code) {
            $admin_link .= '&code=' . $code;
        }
    }
    foreach ($menu_list as $menus) {
        foreach ($menus as $k => $v) {
            if (false !== strpos($v['link'], $admin_link) || $v['link'] == $admin_link2) {
                $v['current'] = 1;
                $menus[$k] = $v;
                return $menus;
            }
        }
    }
    return false;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:admincp.func.php


示例4: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = jget('id', 'int');
     $this->IDS = jget('ids');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:task.mod.php


示例5: Main

 function Main()
 {
     if (MEMBER_ID < 1) {
         response_text('登录后才能继续操作');
     }
     global $_J;
     if (!isset($_J['plugins'])) {
         jlogic('plugin')->loadplugincache();
     }
     $pluginid = jget('id');
     if (!empty($pluginid)) {
         list($identifier, $module) = explode(':', $pluginid);
         $module = $module !== NULL ? $module : $identifier;
     }
     if (!is_array($_J['plugins']['hookmod']) || !array_key_exists($pluginid, $_J['plugins']['hookmod'])) {
         response_text("插件不存在或已关闭");
     }
     if (empty($identifier) || !preg_match("/^[a-z]+[a-z0-9_]*[a-z]+\$/i", $identifier) || !preg_match("/^[a-z]+[a-z0-9_]*[a-z]+\$/i", $module)) {
         response_text("未定义的操作");
     }
     if (@(!file_exists($modfile = PLUGIN_DIR . '/' . $identifier . '/' . $module . '.mod.php'))) {
         response_text("插件模块文件(" . $modfile . ")不存在或者插件文件不完整");
     }
     if ($_J['plugins']['hookmod'][$pluginid]['role_id'] && 'admin' != MEMBER_ROLE_TYPE) {
         response_text("您没有权限进行该操作");
     }
     include $modfile;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:28,代码来源:plugin.mod.php


示例6: RewardDetail

 function RewardDetail()
 {
     $rid = jget('rid', 'int');
     $tid = jget('tid', 'int');
     if (!$rid || !$tid) {
         response_text('无效的有奖转发ID');
     }
     $reward = jlogic('reward')->getRewardInfo($rid);
     if (!$reward) {
         response_text('无效的有奖转发ID');
     }
     if ($reward['time_lesser'] > 0) {
         $hours = $reward['time_lesser'] % 86400;
         $day = floor($reward['time_lesser'] / 86400) ? floor($reward['time_lesser'] / 86400) . '天' : '';
         $i = $hours % 3600;
         $hours = floor($hours / 3600) ? floor($hours / 3600) . '时' : '';
         $i = floor($i / 60) ? floor($i / 60) . '分' : '';
         $reward['time_lesser'] = '距离转发结束还有 ' . $day . $hours . $i;
     } else {
         $reward['time_lesser'] = '有奖转发结束';
     }
     if ($reward['rules']['tag']) {
         $content = '#' . implode('##', $reward['rules']['tag']) . '#';
     }
     include template('widget/widget_reward_view');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:26,代码来源:reward.mod.php


示例7: topic

 function topic()
 {
     $id = jget('id', 'int');
     $infos = jlogic('image')->get_uploadimg_byid($id);
     $sql_wheres = array("item" => "`item` = 'topic_image'", "item_id" => "`item_id` = '" . $id . "'");
     $this->_topic_list('new', $sql_wheres, $order, array(), array('imageinfo' => $infos[$id]));
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:album.mod.php


示例8: fromJson

 public function fromJson($json)
 {
     if (!empty($json)) {
         parent::fromJson($json);
         $this->PaymentId = jget($json, 'PaymentId');
         $this->PaymentRequestId = jget($json, 'PaymentRequestId');
         $this->Status = jget($json, 'Status');
         $this->PaymentType = jget($json, 'PaymentType');
         $this->FundingSource = jget($json, 'FundingSource');
         $this->GuestCheckout = jget($json, 'GuestCheckout');
         $this->CreatedAt = jget($json, 'CreatedAt');
         $this->ValidUntil = jget($json, 'ValidUntil');
         $this->CompletedAt = jget($json, 'CompletedAt');
         $this->ReservedUntil = jget($json, 'ReservedUntil');
         $this->Total = jget($json, 'Total');
         $this->AllowedFundingSources = jget($json, 'AllowedFundingSources');
         $this->RecurrenceResult = jget($json, 'RecurrenceResult');
         $this->Transactions = array();
         if (!empty($json['Transactions'])) {
             foreach ($json['Transactions'] as $key => $value) {
                 $tr = new TransactionDetailModel();
                 $tr->fromJson($value);
                 array_push($this->Transactions, $tr);
             }
         }
     }
 }
开发者ID:zelding,项目名称:barion-web-php,代码行数:27,代码来源:PaymentStateResponseModel.php


示例9: Main

 function Main()
 {
     $cids = jget('cids');
     $id = jget('id');
     if (is_array($cids)) {
         foreach ($cids as $val) {
             if ($val) {
                 $cid = $val;
             }
         }
     } elseif ($id) {
         $rowd = $this->CpLogic->Getrow($id, 'department');
         $cid = $rowd['cid'];
         $row = $this->CpLogic->Getrow($rowd['cid'], 'company');
         if ($rowd['upid']) {
             $ids = $rowd['upid'];
         }
         $cids = explode(',', $row['upid']);
         if ($cids[0] > 0) {
             $cids[] = $cid;
         } else {
             $cids[0] = $cid;
         }
     } else {
         $cids = array(0);
         $cid = 0;
     }
     if (@is_file(ROOT_PATH . 'include/logic/cp.logic.php') && $this->Config['company_enable'] && $this->Config['department_enable']) {
         $selectco = '';
         $i = 0;
         foreach ($cids as $k => $v) {
             $j = $k + 1;
             if ($v || $i == 0) {
                 $company = $this->CpLogic->get_list_company($i, 'id ASC');
                 $selectco .= '<span id="nextcompany_' . $k . '"><select name="cids[]" onchange="listnextc(this,\'' . $j . '\');"><option value="">请选择...</option>';
                 foreach ($company as $val) {
                     if ($val['id'] == $v) {
                         $selectco .= '<option value="' . $val['id'] . '" selected>' . $val['name'] . '</option>';
                     } else {
                         $selectco .= '<option value="' . $val['id'] . '">' . $val['name'] . '</option>';
                     }
                 }
                 $selectco .= '</select></span>';
             }
             $i = $v;
         }
         if ($cid) {
             $lists = $this->CpLogic->GetTable('department', 0, $cid);
         } else {
             $lists = '';
         }
         $action = '';
         include template('admin/department');
     } else {
         if (!is_file(ROOT_PATH . 'include/logic/cp.logic.php')) {
             $cp_not_install = true;
         }
         include template('admin/cp_ad');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:60,代码来源:department.mod.php


示例10: delete

 function delete()
 {
     $ip = jget('ip', 'txt');
     if ($ip) {
         jtable('failedlogins')->delete(array('ip' => $ip));
     }
     $this->Messager('操作成功', 'admin.php?mod=failedlogins&code=index');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:8,代码来源:failedlogins.mod.php


示例11: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->TopicLogic = jlogic('topic');
     $this->ID = jget('id', 'int');
     $this->Member = $this->_member();
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:8,代码来源:tools.mod.php


示例12: TopNotice

 function TopNotice()
 {
     $type = jget('display', 'int', 'P');
     if ($type) {
         jsg_setcookie('topnotice', 'block');
     } else {
         jsg_setcookie('topnotice', 'none');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:view.mod.php


示例13: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = jget('id', 'int');
     $this->TopicLogic = jlogic('topic');
     $this->CacheConfig = jconf::get('cache');
     $this->ShowConfig = jconf::get('show');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:pm.mod.php


示例14: del

 function del()
 {
     $ids = jget('ids');
     if ($ids) {
         jlogic('feed')->delete_feed(array('ids' => $ids));
         $this->Messager("删除成功", 'admin.php?mod=feed');
     } else {
         $this->Messager("请选择要删除的对象", 'admin.php?mod=feed');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:10,代码来源:feed.mod.php


示例15: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = jget('id', 'int');
     Mobile::logic('mblog');
     $this->MblogLogic = new MblogLogic();
     $this->CacheConfig = jconf::get('cache');
     $this->ShowConfig = jconf::get('show');
     Mobile::is_login();
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:11,代码来源:search.mod.php


示例16: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = jget('id', 'int');
     Load::logic("topic");
     $this->TopicLogic = new TopicLogic();
     $this->ShowConfig = jconf::get('show');
     if ($this->Code != 'login') {
         Mobile::is_login();
     }
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:12,代码来源:member.mod.php


示例17: Domodfeature

 function Domodfeature()
 {
     $tid = jget('tid');
     $relateid = jget('replyid');
     $featureid = jget('featureid');
     if ($tid > 0) {
         jlogic('feature')->set_topic_feature($tid, $relateid, $featureid);
         json_result('操作成功');
     } else {
         json_result('没做任何处理');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:12,代码来源:feature.mod.php


示例18: fromJson

 public function fromJson($json)
 {
     if (!empty($json)) {
         $this->Name = jget($json, 'Name');
         $this->Description = jget($json, 'Description');
         $this->Quantity = jget($json, 'Quantity');
         $this->Unit = jget($json, 'Unit');
         $this->UnitPrice = jget($json, 'UnitPrice');
         $this->ItemTotal = jget($json, 'ItemTotal');
         $this->SKU = jget($json, 'SKU');
     }
 }
开发者ID:barion,项目名称:barion-web-php,代码行数:12,代码来源:ItemModel.php


示例19: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = jget('id', 'int');
     Load::logic('topic');
     $this->TopicLogic = new TopicLogic($this);
     Mobile::logic('tag');
     $this->MTagLogic = new MTagLogic();
     $this->CacheConfig = jconf::get('cache');
     $this->ShowConfig = jconf::get('show');
     Mobile::is_login();
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:13,代码来源:tag.mod.php


示例20: index

 function index()
 {
     $uid = jget('uid', 'int');
     $p = array('page_num' => 8, 'uid' => $uid);
     $p['page_url'] = 'index.php?mod=follow' . ($uid > 0 && MEMBER_ID != $uid ? '&uid=' . $uid : '');
     $rets = jlogic('buddy_follow')->get($p);
     if (is_array($rets) && $rets['error']) {
         $this->Messager($rets['result'], null);
     }
     $member = $rets['member'];
     $this->Title = "{$member['nickname']}关注的人";
     include template();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:13,代码来源:follow.mod.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP jgettext函数代码示例发布时间:2022-05-15
下一篇:
PHP jexit函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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