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

PHP jlogic函数代码示例

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

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



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

示例1: wqueue

 function wqueue()
 {
     $do = $this->Get['do'];
     if ($do == 'run') {
         if ($this->Config['wqueue_enabled']) {
             $url = 'http:/' . '/' . $this->Config['wqueue']['host'] . '/?name=' . $this->Config['wqueue']['name'] . '&opt=get&auth=' . $this->Config['wqueue']['auth'];
             while (true) {
                 $r = dfopen($url);
                 if (!in_array($r, array('HTTPSQS_GET_END', 'HTTPSQS_ERROR'))) {
                     $data = unserialize(base64_decode($r));
                     $data['datas']['content'] = base64_decode($data['datas']['content']);
                     $r = jlogic('topic')->Add($data['datas'], $data['totid'], $data['imageid'], $data['attachid'], $data['from'], $data['type'], $data['uid'], $data['item'], $data['item_id'], true);
                     if (DEBUG) {
                         if (is_array($r) && $r['tid']) {
                             echo 'publish success' . "\n";
                         } else {
                             echo var_export($r, true) . "\n";
                         }
                         ob_flush();
                     }
                 } else {
                     sleep(1);
                 }
             }
         } else {
             exit('weibo.queue.close');
         }
     } else {
         exit('weibo.action.no');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:async.mod.php


示例2: TopicBbsLogic

 function TopicBbsLogic()
 {
     $this->MemberHandler =& Obj::registry("MemberHandler");
     $this->TopicLogic = jlogic('topic');
     if ($GLOBALS['_J']['config']['dzbbs_enable'] && ($config['dzbbs'] = jconf::get('dzbbs'))) {
         $this->BbsDatabase = new jishigou_mysql($config['dzbbs']['db_host'], $config['dzbbs']['db_port']);
         $this->BbsDatabase->Charset($config['dzbbs']['charset']);
         $this->BbsDatabase->doConnect($config['dzbbs']['db_user'], $config['dzbbs']['db_pass'], $config['dzbbs']['db_name'], $GLOBALS['_J']['config']['db_persist']);
         Obj::register('BbsDatabase', $this->BbsDatabase);
         define('BBS_TB_PRE', $config['dzbbs']['db_pre']);
         define('BBS_API_URL', $config['dzbbs']['db_url']);
         define('BBS_ENABLE', $config['dzbbs']['enable']);
         define('DZ_BBS_VER', $config['dzbbs']['dz_ver']);
         $this->BbsType = 'discuz';
     } elseif ($GLOBALS['_J']['config']['phpwind_enable'] && $GLOBALS['_J']['config']['pwbbs_enable']) {
         $config['phpwind'] = jconf::get('phpwind');
         $this->BbsDatabase = new jishigou_mysql($config['phpwind']['pw_db_host']);
         $this->BbsDatabase->Charset($config['phpwind']['pw_db_charset']);
         $this->BbsDatabase->doConnect($config['phpwind']['pw_db_user'], $config['phpwind']['pw_db_password'], $config['phpwind']['pw_db_name'], $GLOBALS['_J']['config']['db_persist']);
         Obj::register('BbsDatabase', $this->BbsDatabase);
         define('BBS_TB_PRE', $config['phpwind']['pw_db_table_prefix']);
         define('BBS_API_URL', $config['phpwind']['pw_api']);
         define('BBS_ENABLE', $config['phpwind']['enable']);
         $this->BbsType = 'phpwind';
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:26,代码来源:topic_bbs.logic.php


示例3: ModuleObject

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


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


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


示例6: hot_at

 function hot_at($uid = MEMBER_ID, $limit = 10, $day = 7, $key = 'uid', $field = 'tuid')
 {
     $rets = array();
     $uid = jfilter($uid, 'int');
     $limit = jfilter($limit, 'int');
     $day = jfilter($day, 'int');
     if ($uid > 0 && $limit > 0 && $day > 0) {
         $cache_id = $this->cache_id("hot_at-{$field}-{$key}-{$uid}-{$limit}-{$day}");
         if (false === ($rets = cache_db('mget', $cache_id))) {
             $gets = $this->get(array('sql_field' => " `{$field}`, COUNT(`{$field}`) AS `at_count` ", $key => $uid, '>@dateline' => TIMESTAMP - $day * 86400, 'sql_group' => " `{$field}` ", 'sql_order' => ' `at_count` DESC, `id` DESC ', 'result_count' => $limit, 'return_list' => 1));
             $uids = array();
             if ($gets) {
                 $at_counts = array();
                 foreach ($gets as $k => $v) {
                     $uid = (int) $v[$field];
                     if ($uid > 0) {
                         $uids[$uid] = $uid;
                         $at_counts[$uid] = $v['at_count'];
                     }
                 }
             }
             $rets = array();
             if ($uids) {
                 $rets = jlogic('topic')->GetMember($uids, "`uid`,`ucuid`,`username`,`nickname`,`face`,`face_url`,`fans_count`");
                 foreach ($rets as $k => $row) {
                     $row['at_count'] = $at_counts[$row['uid']];
                     $rets[$k] = $row;
                 }
             }
             cache_db('mset', $cache_id, $rets, 3600);
         }
     }
     return $rets;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:topic_mention.class.php


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


示例8: Out

 function Out()
 {
     $uid = max(0, (int) $this->Inputs['uid']);
     if ($uid > 0) {
         jlogic('ios')->loginout($uid);
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:ios.mod.php


示例9: TopicContentView

 function TopicContentView()
 {
     $TopicLogic = jlogic('topic');
     $tid = is_numeric($this->ID) ? $this->ID : 0;
     if ($tid < 1) {
         js_alert_output('ID 不能为空');
     }
     $topic_info = $TopicLogic->Get($tid);
     if (!$topic_info) {
         js_alert_output('内容已经不存在了');
     }
     $parent_list = array();
     if ($topic_info['parent_id']) {
         $parent_id_list = array($topic_info['parent_id'], $topic_info['top_parent_id']);
         if ($parent_id_list) {
             $parent_list = $TopicLogic->Get($parent_id_list);
         }
     }
     $sid = max(0, (int) ($this->Post['sid'] ? $this->Post['sid'] : $this->Get['sid']));
     if ($sid < 1 || $sid == $tid) {
         unset($sid);
     }
     $TPT_ = 'TPT_' != $this->Post['TPT_'] ? $this->Post['TPT_'] : '';
     $topic_view = $this->Post['topic_view'] ? 1 : 0;
     $together_view = 1;
     include template('topic_content_view_ajax');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:27,代码来源:view.mod.php


示例10: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->ID = $this->Get['id'] ? (int) $this->Get['id'] : (int) $this->Post['id'];
     $this->TopicLogic = jlogic('topic');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:tag.mod.php


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


示例12: Main

 function Main()
 {
     $uid = MEMBER_ID;
     if ($uid < 1) {
         $this->Messager("请先<a href='index.php?mod=login'>点此登录</a>或者<a href='index.php?mod=member'>点此注册</a>一个帐号", 'index.php?mod=login');
     }
     $member = jsg_member_info($uid);
     $sql = "select * from `" . TABLE_PREFIX . "blacklist` where `uid` = '" . MEMBER_ID . "' ";
     $query = $this->DatabaseHandler->Query($sql);
     $uids = array();
     while (false != ($row = $query->GetRow())) {
         $uids[$row['touid']] = $row['touid'];
     }
     if ($uids) {
         $where = "where `uid` in (" . jimplode($uids) . ")";
         $member_list = $this->_MemberList($where);
         if ($uids && MEMBER_ID > 0) {
             $sql = "select `uid`,`tid`,`content`,`dateline` from `" . TABLE_PREFIX . "topic` where `uid` in (" . jimplode($uids) . ") group by `uid` order by `dateline` desc";
             $query = $this->DatabaseHandler->Query($sql);
             $topic_list = array();
             while (false != ($row = $query->GetRow())) {
                 $row['content'] = cut_str($row['content'], 100);
                 $row['dateline'] = my_date_format2($row['dateline']);
                 $topic_list[] = $row;
             }
         }
     }
     $group_list = jlogic('buddy_follow_group')->get_my_group(MEMBER_ID);
     $this->Title = '黑名单';
     include template('social/blacklist');
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:blacklist.mod.php


示例13: get_at_my_topic

 public function get_at_my_topic($p)
 {
     $rets = array();
     $uid = isset($p['uid']) ? (int) $p['uid'] : MEMBER_ID;
     $member = jsg_member_info($uid);
     if ($member) {
         if ($member['at_new'] > 0) {
             jlogic('member')->clean_new_remind('at_new', $member['uid']);
         }
         $rets = $this->get_at_my_tid($p, 1);
         if ($rets && is_array($rets)) {
             if (!$rets['error']) {
                 $rets['member'] = $member;
                 $rets['list'] = $rets['count'] > 0 && $rets['ids'] ? jlogic('topic')->Get($rets['ids']) : array();
                 if ($rets['list']) {
                     if ($GLOBALS['_J']['config']['is_topic_user_follow'] && !$GLOBALS['_J']['disable_user_follow']) {
                         if (true === IN_JISHIGOU_WAP) {
                             $rets['list'] = buddy_follow_html($rets['list'], 'uid', 'wap_follow_html');
                         } else {
                             $rets['list'] = jlogic('buddy')->follow_html2($rets['list']);
                         }
                     }
                     $rets['parent_list'] = jlogic('topic')->get_parent_list($rets['list']);
                 }
                 if (true === IN_JISHIGOU_WAP) {
                     $rets = wap_iconv($rets);
                 }
             }
         }
     } else {
         return jerror('您无权查看该信息,请先登录', -1);
     }
     return $rets;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:topic_mention.logic.php


示例14: add

 public function add($postData)
 {
     $member = $this->is_jsg($postData['fromusername']);
     if ($member) {
         $imageID = 0;
         if ($postData['msgtype'] == "image") {
             $p = array('pic_url' => $postData['picurl'], 'uid' => $member['jsg_id']);
             $rets = jlogic('image')->upload($p);
             if ($rets['code'] < 0 && $rets['error']) {
                 jlog('wechat', $postData, 0);
                 jlog('wechat', $rets, 0);
             }
             $imageID = $rets['id'];
         }
         $r = jlogic("topic")->Add($postData['content'], 0, $imageID, 0, "wechat", "first", $member['jsg_id']);
         if (is_array($r) && $r['tid'] > 0) {
         } else {
             jlog('wechat', $postData, 0);
         }
         if ($r) {
             if (is_array($r)) {
                 return $this->wechatConfig['add_weibo_success'];
             } else {
                 return $r;
             }
         } else {
             return $this->wechatConfig['add_weibo_false'];
         }
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:30,代码来源:wechat.logic.php


示例15: ModuleObject

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


示例16: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     Load::logic('topic_recommend');
     $this->TopicRecommendLogic = new TopicRecommendLogic();
     $this->TopicLogic = jlogic('topic');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:8,代码来源:recdtopic.mod.php


示例17: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->TopicLogic = jlogic('topic');
     if (MEMBER_ID < 1) {
         exit("你需要先登录才能继续本操作");
     }
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:block.mod.php


示例18: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->TopicLogic = jlogic('topic');
     Load::logic('validate_category');
     $this->ValidateLogic = new ValidateLogic();
     $this->CacheConfig = jconf::get('cache');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:people.mod.php


示例19: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     $this->WallId = max(0, (int) $this->Get['wall_id']);
     Load::logic('wall');
     $this->WallLogic = new WallLogic();
     $this->TopicLogic = jlogic('topic');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:wall.mod.php


示例20: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     if (MEMBER_ID < 1) {
         $this->Messager(null, $this->Config['site_url'] . "/index.php?mod=login");
     }
     $this->TopicLogic = jlogic('topic');
     $this->Member = $this->TopicLogic->GetMember(MEMBER_ID);
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:10,代码来源:user_tag.mod.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP jobboard_option函数代码示例发布时间:2022-05-15
下一篇:
PHP jio函数代码示例发布时间: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