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


PHP response_text函数代码示例

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


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

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

示例2: db_response_news

function db_response_news($postObj, $newsid)
{
    /*
     * note:
     * 1 text
     * dfault and 2 :news
     *
     * */
    $params = array(array($newsid, SQLSRV_PARAM_IN));
    $sp = "{call app_get_news(?)}";
    $rs = sp_execute($sp, $params);
    if (count($rs) == 1) {
        $msgtype = $rs[0]["kind"];
        //is_numeric($rs[0]["type"])?intval($rs[0]["type"]):0;
        //
        if ($msgtype == 1) {
            //text mode
            response_text($postObj, $rs[0]["describle"]);
        } else {
            //2
            $newsContent = array("title" => $rs[0]["title"], "description" => $rs[0]["describle"], "picUrl" => $rs[0]["picurl"], "url" => $rs[0]["url"]);
            response_news($postObj, $newsContent);
        }
    } elseif (count($rs) > 1) {
        //多行新闻的方式
        $arr = array();
        foreach ($rs as $row) {
            $newsContent = array("title" => $row["title"], "description" => $row["describle"], "picUrl" => $row["picurl"], "url" => $row["url"]);
            array_push($arr, $newsContent);
        }
        response_multiNews($postObj, $arr);
    } else {
        response_text($postObj, "未定义的newsid[{$newsid}]");
    }
}
开发者ID:noikiy,项目名称:Bentley,代码行数:35,代码来源:db_weixin_funs.php

示例3: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         case 'follow':
             $this->follow();
             break;
         case 'fans':
             $this->fans();
             break;
         case 'blacklist':
             $this->blacklist();
             break;
         case 'add_follow':
             $this->addFollow();
             break;
         case 'del_follow':
             $this->delFollow();
             break;
         case 'check_follow':
             $this->checkFollow();
             break;
         case 'add_blacklist':
             $this->addBlacklist();
             break;
         case 'del_blacklist':
             $this->delBlacklist();
             break;
         case 'check_blacklist':
             $this->checkBlacklist();
             break;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:friend.mod.php

示例4: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         case 'getfilter':
             $this->getFilter();
             break;
         case 'keyword':
             $this->KeyWord();
             break;
         case 'xiami':
             $this->getXiaMimusic();
             break;
         case 'getsigntag':
             $this->getSignTag();
             break;
         case 'app_medal':
             $this->appMedal();
             break;
         case 'resultlist':
             $this->resultList();
             break;
         case 'sel':
             $this->makeSel();
             break;
         default:
             break;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:30,代码来源:class.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: handleClick

/**
 * @param $postObj
 */
function handleClick($postObj)
{
    //处理签到
    if ($postObj->EventKey == "3bd50cf09752dc08ab1d78ba0c6d4099") {
        response_text($postObj, "签到成功");
    } else {
    }
}
开发者ID:noikiy,项目名称:Bentley,代码行数:11,代码来源:handle_click.php

示例7: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         default:
             break;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:block.mod.php

示例8: auto_run

 function auto_run()
 {
     ob_start();
     if ($this->Code && method_exists('ModuleObject', $this->Code)) {
         $this->{$this->Code}();
     } else {
         exit('method ' . $this->Code . ' is not exists');
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:10,代码来源:master.mod.php

示例9: handleText

function handleText($postObj)
{
    $arr = explode(" ", $postObj->Content);
    //preview news 1
    $action = $arr[0];
    $param1 = $arr[1];
    if (count($arr) > 2) {
        $param2 = $arr[2];
    } else {
        $param2 = "";
    }
    //$param2 = $arr[2];
    //strcasecmp忽略字符串大小写
    if (strcasecmp($action, "set") == 0) {
        if (strcasecmp($param1, "master") == 0) {
            $ret = "                  ";
            $params = array(array("" . $postObj->FromUserName, SQLSRV_PARAM_IN), array($ret, SQLSRV_PARAM_INOUT));
            $sp = "{call app_set_master(?,?)}";
            $rs = sp_execute($sp, $params);
            if ($ret == "ok") {
                response_text($postObj, "您已成为[" . $rs[0]["cname"] . "]微信管理员");
            } else {
                response_text($postObj, "操作不成功,管理位置是不是另有他人了呢?");
            }
        } else {
            response_text($postObj, "我不明白,你想设置啥呢?");
        }
    } else {
        if (strcasecmp($action, "preview") == 0) {
            if (strcasecmp($param1, "news") == 0) {
                if (is_numeric($param2)) {
                    db_response_news($postObj, $param2);
                } else {
                    response_text($postObj, "您要预览的新闻编号[{$param2}]有误,请输入新闻编号");
                }
            } else {
                if (is_numeric($param1)) {
                    db_response_news($postObj, $param1);
                } else {
                    response_text($postObj, "未定义的预览类型[{$param1}]");
                }
            }
        } else {
            if (strcasecmp($action, "hqewm") == 0 || strcasecmp($action, "获取二维码") == 0 || strcasecmp($action, "dst") == 0 || strcasecmp($action, "大食堂") == 0) {
                response_image($postObj, "Tz7KKK4QFPZbEIclqnbhsWYy8keSL-3McoYu9I749Vk");
            } else {
                if (strcasecmp($action, "help") == 0) {
                    response_text($postObj, '欢迎关注大食堂<br>预览新闻 发"preview  新闻编号\\r\\n获取大食堂二维码,发送"hqewm"');
                } else {
                    response_text($postObj, "未定义action[{$action}]");
                }
            }
        }
    }
}
开发者ID:noikiy,项目名称:Bentley,代码行数:55,代码来源:handle_text.php

示例10: ModuleObject

 function ModuleObject($config)
 {
     $this->MasterObject($config);
     if (MEMBER_ID < 1) {
         response_text("请先登录或者注册一个帐号");
     }
     Load::logic('vote');
     $this->VoteLogic = new VoteLogic();
     $this->TopicLogic = jlogic('topic');
     $this->Execute();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:11,代码来源:app.mod.php

示例11: handleImage

function handleImage($postObj)
{
    //https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID
    $access_token = db_get_token_ticket(CFG_APPID, CFG_SECRET)["token"];
    $mediaId = $postObj->MediaId;
    $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token={$access_token}&media_id={$mediaId}";
    $fileinfo = downloadWeixinFile($url);
    //
    $uploadPath = dirname(__FILE__) . "/upload/weixin/";
    $tmpFile = time() . ".jpg";
    saveWeixinFile($uploadPath . $tmpFile, $fileinfo["body"]);
    response_text($postObj, "图片上传完成");
}
开发者ID:noikiy,项目名称:Bentley,代码行数:13,代码来源:handle_image.php

示例12: _init_uid

 function _init_uid($uid = 0)
 {
     $uid = max(0, (int) $uid);
     if (!defined('MEMBER_ID') && $uid > 0 && ($members = DB::fetch_first("select * from " . TABLE_PREFIX . "members where `uid`='{$uid}'"))) {
         define("MEMBER_ID", (int) $members['uid']);
         define("MEMBER_UCUID", (int) $members['ucuid']);
         define("MEMBER_NAME", $members['username']);
         define("MEMBER_NICKNAME", $members['nickname']);
         define("MEMBER_ROLE_TYPE", $members['role_type']);
     } else {
         response_text('');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:13,代码来源:schedule.mod.php

示例13: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         case 'login':
             $this->login();
             break;
         case 'register':
             $this->register();
             break;
         case 'edit_profile':
             $this->editProfile();
         case 'userinfo':
             $this->getUserInfo();
             break;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:18,代码来源:member.mod.php

示例14: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         case 'sign':
             $this->sign();
             break;
         case 'reminded':
             $this->reminded();
             break;
         case 'clear_reminded':
             $this->clearReminded();
             break;
         default:
             exit;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:18,代码来源:misc.mod.php

示例15: Execute

 function Execute()
 {
     ob_start();
     switch ($this->Code) {
         case 'onloadPic':
             $this->onloadPic();
             break;
         case 'create':
             $this->create();
             break;
         case 'publish_share':
             $this->publishShare();
             break;
         case 'simple_talk':
             $this->simpleTalk();
             break;
         case 'store':
             $this->store();
             break;
         case 'app':
             $this->app();
             break;
         case 'need_info':
             $this->need_info();
             break;
         case 'manage':
             $this->manage();
             break;
         case 'choose':
             $this->choose();
             break;
         case 'eventpost':
             $this->eventPost();
             break;
         case 'eventlist':
             $this->eventList();
             break;
         default:
             break;
     }
     response_text(ob_get_clean());
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:42,代码来源:event.mod.php


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