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

PHP output函数代码示例

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

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



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

示例1: iitems_crates_gypsy_run

function iitems_crates_gypsy_run()
{
    global $session;
    page_header("Crate Locations");
    $cost = get_module_setting("cost", "iitems_crates_gypsy");
    if ($cost == 1) {
        $p = "Cigarette";
    } else {
        $p = "Cigarettes";
    }
    if ($session['user']['gems'] >= $cost) {
        $session['user']['gems'] -= $cost;
        output("`5You hand over the %s and the old man chuckles.  \"`!Aaah, thank ye kindly.  Now, here we are!  I'd recommend you write these down.  And be quick about it - these crates tend to disappear `ifast!`i`5\"`n`nHe reaches under his desk and brings up a chalkboard with all the locations of the Island's crates written upon it, corresponding to the squares on your crudely-drawn World Map and laid out as X and Y co-ordinates.  You spend a few minutes studying the board.`n`n", $p);
        $crates = unserialize(get_module_setting("crates", "iitemcrates"));
        foreach ($crates as $key => $vals) {
            output("%s,%s`n", $vals['loc']['x'], $vals['loc']['y']);
        }
    } else {
        output("`5You enthusiastically agree to the price, before realising that you don't actually have that many cigarettes.  Whoops.");
    }
    addnav("Leave");
    addnav("Return to the Outpost", "village.php");
    page_footer();
    return true;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:iitems_crates_gypsy.php


示例2: pestle_cli

/**
* Creates a Route XML
* generate_route module area id 
* @command generate_route
*/
function pestle_cli($argv)
{
    $module_info = askForModuleAndReturnInfo($argv);
    $module = $module_info->name;
    $legend = ['frontend' => 'standard', 'adminhtml' => 'admin'];
    $areas = array_keys($legend);
    $area = inputOrIndex('Which area? [frontend, adminhtml]', 'frontend', $argv, 1);
    $router_id = $legend[$area];
    if (!in_array($area, $areas)) {
        throw new Exception("Invalid areas");
    }
    $frontname = inputOrIndex('Frontname/Route ID?', null, $argv, 2);
    $route_id = $frontname;
    $path = $module_info->folder . '/etc/' . $area . '/routes.xml';
    if (!file_exists($path)) {
        $xml = simplexml_load_string(getBlankXml('routes'));
        writeStringToFile($path, $xml->asXml());
    }
    $xml = simplexml_load_file($path);
    simpleXmlAddNodesXpath($xml, "router[@id={$router_id}]/" . "route[@id={$route_id},@frontName={$frontname}]/" . "module[@name={$module}]");
    writeStringToFile($path, formatXmlString($xml->asXml()));
    $class = str_replace('_', '\\', $module) . '\\Controller\\Index\\Index';
    $controllerClass = createControllerClass($class, $area);
    $path_controller = getPathFromClass($class);
    writeStringToFile($path_controller, $controllerClass);
    output($path);
    output($path_controller);
}
开发者ID:mrtuvn,项目名称:pestle,代码行数:33,代码来源:module.php


示例3: index

 public function index()
 {
     $merchant_id = intval($GLOBALS['request']['merchant_id']);
     /*商家ID*/
     $page = intval($GLOBALS['request']['page']);
     /*分页*/
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $root = array();
     $root['return'] = 1;
     $page = $page == 0 ? 1 : $page;
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $supplier_locationinfo = $GLOBALS['db']->getRow("select name,id,new_dp_count_time from " . DB_PREFIX . "supplier_location where id = " . $merchant_id);
     syn_supplier_locationcount($supplier_locationinfo);
     $condition = " dp.status = 1 and dp.supplier_location_id = " . $merchant_id . " ";
     $sql_count = "select count(*) from " . DB_PREFIX . "supplier_location_dp dp where " . $condition;
     $total = $GLOBALS['db']->getOne($sql_count);
     $page_total = ceil($total / $page_size);
     //$root['sql_count'] = $sql_count;
     $sql = "select dp.*,u.user_name from " . DB_PREFIX . "supplier_location_dp as dp left outer join " . DB_PREFIX . "user as u on u.id = dp.user_id  where " . $condition . " order by dp.is_top desc, dp.create_time desc limit " . $limit;
     $root['sql'] = $sql;
     $list = $GLOBALS['db']->getAll($sql);
     foreach ($list as $k => $v) {
         $list[$k]['merchant_id'] = $v['supplier_location_id'];
         $list[$k]['create_time_format'] = getBeforeTimelag($v['create_time']);
         $list[$k]['width'] = $v['point'] / 5 * 100;
     }
     //星级点评数
     $root['star_1'] = 0;
     $root['star_2'] = 0;
     $root['star_3'] = 0;
     $root['star_4'] = 0;
     $root['star_5'] = 0;
     $root['star_dp_width_1'] = 0;
     $root['star_dp_width_2'] = 0;
     $root['star_dp_width_3'] = 0;
     $root['star_dp_width_4'] = 0;
     $root['star_dp_width_5'] = 0;
     $buy_dp_sum = 0.0;
     $buy_dp_group = $GLOBALS['db']->getAll("select point,count(*) as num from " . DB_PREFIX . "supplier_location_dp where supplier_location_id = " . $merchant_id . " group by point");
     foreach ($buy_dp_group as $dp_k => $dp_v) {
         $star = intval($dp_v['point']);
         if ($star >= 1 && $star <= 5) {
             $root['star_' . $star] = $dp_v['num'];
             $buy_dp_sum += $star * $dp_v['num'];
             $root['star_dp_width_' . $star] = round($dp_v['num'] / $total, 1) * 100;
         }
     }
     //点评平均分
     $root['buy_dp_sum'] = $buy_dp_sum;
     $root['buy_dp_avg'] = round($buy_dp_sum / $total, 1);
     $root['buy_dp_width'] = round($buy_dp_sum / $total, 1) / 5 * 100;
     $root['page'] = array("page" => $page, "page_total" => $page_total, "page_size" => $page_size);
     $root['message_list'] = $list;
     $root['merchant_id'] = $merchant_id;
     $root['page_title'] = "点评列表";
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:60,代码来源:supplier_message_list.action.php


示例4: index

 public function index()
 {
     //分页
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $root = array();
     //$root['biz_article_cate_id'] = $GLOBALS['m_config']['biz_article_cate_id'];//我的消息,(文章分类ID)
     $cate_id = intval($GLOBALS['request']['cate_id']);
     if ($cate_id == 0) {
         $cate_id = intval($GLOBALS['m_config']['biz_article_cate_id']);
     }
     $cate_id = 19;
     //分页
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $sql = "select id,title from " . DB_PREFIX . "article where is_effect = 1 and cate_id = " . $cate_id . " order by sort";
     $sql .= " limit " . $limit;
     $sql_count = "select count(*) from " . DB_PREFIX . "article where is_effect = 1 and cate_id = " . $cate_id;
     $count = $GLOBALS['db']->getOne($sql_count);
     $list = $GLOBALS['db']->getAll($sql);
     $root['page'] = array("page" => $page, "page_total" => ceil($count / PAGE_SIZE), "page_size" => PAGE_SIZE);
     //$root['sql'] = $sql;
     $root['return'] = 1;
     $root['list'] = $list;
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:27,代码来源:biz_article_list.action.php


示例5: pestle_cli

/**
* Generates Magento 2 Observer
* This command generates the necessary files and configuration to add 
* an event observer to a Magento 2 system.
*
*    pestle.phar generate_observer Pulsestorm_Generate controller_action_predispatch pulsestorm_generate_listener3 'Pulsestorm\Generate\Model\Observer3'
*
* @command generate_observer
* @argument module Full Module Name? [Pulsestorm_Generate]
* @argument event_name Event Name? [controller_action_predispatch]
* @argument observer_name Observer Name? [<$module$>_listener]
* @argument model_name Class Name? [<$module$>\Model\Observer]
*/
function pestle_cli($argv)
{
    $module = $argv['module'];
    $event_name = $argv['event_name'];
    $observer_name = $argv['observer_name'];
    $model_name = $argv['model_name'];
    $method_name = 'execute';
    $path_xml_event = initilizeModuleConfig($module, 'events.xml', 'urn:magento:framework:Event/etc/events.xsd');
    $xml = simplexml_load_file($path_xml_event);
    $nodes = $xml->xpath('//event[@name="' . $event_name . '"]');
    $node = array_shift($nodes);
    $event = $node;
    if (!$node) {
        $event = $node ? $node : $xml->addChild('event');
        $event->addAttribute('name', $event_name);
    }
    $observer = $event->addChild('observer');
    $observer->addAttribute('name', $observer_name);
    $observer->addAttribute('instance', $model_name);
    // $observer->addAttribute('method',   $method_name);
    output("Creating: {$path_xml_event}");
    $path = writeStringToFile($path_xml_event, $xml->asXml());
    output("Creating: {$model_name}");
    $contents = createClassTemplate($model_name, false, '\\Magento\\Framework\\Event\\ObserverInterface');
    $contents = str_replace('<$body$>', "\n" . '    public function execute(\\Magento\\Framework\\Event\\Observer $observer){exit(__FILE__);}' . "\n", $contents);
    createClassFile($model_name, $contents);
}
开发者ID:cmykna,项目名称:pestle,代码行数:40,代码来源:module.php


示例6: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $email = addslashes($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = md5(addslashes($GLOBALS['request']['pwd']));
     //原始密码
     $user_info = user_check($email, $pwd);
     $user_id = intval($user_info['id']);
     if (!$user_info) {
         $root['status'] = 0;
         $root['message'] = "用户密码错误";
         output($root);
     } else {
         $new_password = addslashes($GLOBALS['request']['new_password']);
         if (strlen($new_password) < 4) {
             $root['status'] = 0;
             $root['message'] = "注册密码不能少于4位";
             output($root);
         }
         $sql = "update " . DB_PREFIX . "user set is_account = 1, user_pwd = '" . md5($new_password) . "' where id = {$user_id}";
         $GLOBALS['db']->query($sql);
         $rs = $GLOBALS['db']->affected_rows();
         $root['status'] = 1;
         $root['uid'] = $user_id;
         $root['user_name'] = $email;
         $root['password'] = md5($new_password);
         $root['is_account'] = 1;
         output($root);
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:editaccount.action.php


示例7: marriage_lovedrinks

function marriage_lovedrinks()
{
    $z = 2;
    $s = get_module_setting('loveDrinksAdd');
    if (is_module_installed('drinks') && $s < $z) {
        $sql = array();
        $ladd = array();
        if ($s < 1) {
            // We use 'lessthan' so more drinks can be packaged with this
            $sql[] = "INSERT INTO " . db_prefix("drinks") . " VALUES (0, 'Love Brew', 1, 25, 5, 0, 0, 0, 20, 0, 5, 15, 0.0, 0, 0, 'Cedrik reaches under the bar, pulling out a purple cupid shaped bottle... as he pours it into a crystalline glass, the glass shines and he puts a pineapple within the liquid... \"Here, have a Love Brew..\" says Cedrik.. and as you try it, you feel uplifted!', '`%Love Brew', 12, 'You remember love..', 'Despair sets in.', '1.1', '.9', '1.5', '0', '', '', '')";
            $ladd[] = "Love Brew";
        }
        if ($s < 2) {
            // We use 'lessthan' so more drinks can be packaged with this
            $sql[] = "INSERT INTO " . db_prefix("drinks") . " VALUES (0, 'Heart Mist', 1, 25, 5, 0, 0, 0, 20, 0, 5, 15, 0.0, 0, 0, 'Cedrik grabs for a rather garish looking bottle on the shelf behind him... as he pours it into a large yellow mug, the porcelain seems to dissolve.. ooh er.. he puts a tomato within the sweet smelling gunk... \"Here, have a Heart Mist..\" says Cedrik.. and as you try it, you see symbols of love!', '`\$Heart Mist', 18, '`%Misty hearts fly around you..', '`#The sky falls...', '1.1', '.9', '1.5', '0', '', '', '')";
            $ladd[] = "Heart Misy";
        }
        foreach ($sql as $val) {
            db_query($val);
        }
        foreach ($ladd as $val) {
            $sql = "SELECT * FROM " . db_prefix("drinks") . " WHERE name='{$val}' ORDER BY costperlevel";
            $result = db_query($sql);
            $row = db_fetch_assoc($result);
            set_module_objpref('drinks', $row['drinkid'], 'loveOnly', 1, 'marriage');
        }
        set_module_setting('loveDrinksAdd', $z);
        output("`n`c`b`^Marriage Module - Drinks have been added to the Loveshack`0`b`c");
    } elseif (!is_module_active('drinks')) {
        set_module_setting('loveDrinksAdd', 0);
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:lovedrinks.php


示例8: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['biz_email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['biz_pwd']);
     //密码
     //检查用户,用户密码
     $biz_user = biz_check($email, $pwd);
     $supplier_id = intval($biz_user['supplier_id']);
     $deal_id = intval($GLOBALS['request']['deal_id']);
     //团购商品id
     if ($supplier_id > 0) {
         $root['user_login_status'] = 1;
         //用户登陆状态:1:成功登陆;0:未成功登陆
         $sql = "update " . DB_PREFIX . "message set is_read = 1 where is_read = 0 and rel_id = " . $deal_id . " and rel_table = 'deal' and pid = 0 and is_buy = 1";
         //$root['sql'] = $sql;
         $GLOBALS['db']->query($sql);
         $root['return'] = 1;
     } else {
         $root['return'] = 0;
         $root['user_login_status'] = 0;
         //用户登陆状态:1:成功登陆;0:未成功登陆
         $root['info'] = "商户不存在或密码错误";
     }
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:27,代码来源:biz_tuan_msg_read.action.php


示例9: index

 public function index()
 {
     $root = array();
     $id = intval($GLOBALS['request']['id']);
     $deal = get_deal($id);
     //send_deal_contract_email($id,$deal,$deal['user_id']);  //发送电子协议邮件
     $root['deal'] = $deal;
     //借款列表
     $load_list = $GLOBALS['db']->getAll("SELECT deal_id,user_id,user_name,money,is_auto,create_time FROM " . DB_PREFIX . "deal_load WHERE deal_id = " . $id);
     $u_info = get_user("*", $deal['user_id']);
     //可用额度
     $can_use_quota = get_can_use_quota($deal['user_id']);
     $root['can_use_quota'] = $can_use_quota;
     $credit_file = get_user_credit_file($deal['user_id']);
     $deal['is_faved'] = 0;
     /*
     		if($GLOBALS['user_info']){
     			$deal['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM ".DB_PREFIX."deal_collect WHERE deal_id = ".$id." AND user_id=".intval($GLOBALS['user_info']['id']));
     				
     			if($deal['deal_status'] >=4){
     				//还款列表
     				$loan_repay_list = get_deal_load_list($deal);
     				
     				$root['loan_repay_list']= $loan_repay_list;
     				
     				
     				foreach($load_list as $k=>$v){
     					$load_list[$k]['remain_money'] = $v['money'] - $GLOBALS['db']->getOne("SELECT sum(self_money) FROM ".DB_PREFIX."deal_load_repay WHERE user_id=".$v['user_id']." AND deal_id=".$id);
     					if($load_list[$k]['remain_money'] <=0){
     						$load_list[$k]['remain_money'] = 0;
     						$load_list[$k]['status'] = 1;
     					}
     				}
     			}
     			
     		}*/
     $user_statics = sys_user_status($deal['user_id'], true);
     $root['user_statics'] = $user_statics;
     //借款笔数
     $root['load_list'] = $load_list;
     $root['credit_file'] = $credit_file;
     $root['u_info'] = $u_info;
     //工作认证是否过期
     $root['expire'] = user_info_expire($u_info);
     //留言
     $message_list = $GLOBALS['db']->getAll("SELECT title,content,a.create_time,rel_id,a.user_id,a.is_effect,b.user_name FROM " . DB_PREFIX . "message as a left join " . DB_PREFIX . "user as b on  a.user_id = b.id WHERE rel_id = " . $id);
     $root['message'] = $message_list;
     //seo
     if ($deal['type_match_row']) {
         $seo_title = $deal['seo_title'] != '' ? $deal['seo_title'] : $deal['type_match_row'] . " - " . $deal['name'];
     } else {
         $seo_title = $deal['seo_title'] != '' ? $deal['seo_title'] : $deal['name'];
     }
     $root['page_title'] = $seo_title;
     $seo_keyword = $deal['seo_keyword'] != '' ? $deal['seo_keyword'] : $deal['type_match_row'] . "," . $deal['name'];
     $root['page_keyword'] = $seo_keyword;
     $seo_description = $deal['seo_description'] != '' ? $deal['seo_description'] : $deal['name'];
     $root['seo_description'] = $seo_description;
     output($root);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:60,代码来源:deal_mobile.action.php


示例10: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $root['page_title'] = "发起项目";
         $region_lv2 = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "region_conf where region_level = 2 order by py asc");
         //二级地址
         $root['region_lv2'] = $region_lv2;
         $cate_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate order by sort asc");
         $root['cate_list'] = $cate_list;
         $deal_image = es_session::get("deal_image");
         $root['deal_image'] = $deal_image;
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:27,代码来源:project_add.action.php


示例11: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $page = intval($GLOBALS['request']['page']);
     $mode = strim($GLOBALS['request']['mode']);
     //index,invite,ing,over,bad
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $result = getInvestList($mode, $user_id, $page);
         $root['item'] = $result['list'];
         $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("DEAL_PAGE_SIZE")));
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:25,代码来源:invest2.action.php


示例12: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $id = strim($GLOBALS['request']['id']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $GLOBALS['db']->query("DELETE FROM " . DB_PREFIX . "user_bank where user_id=" . intval($GLOBALS['user_info']['id']) . " and id in (" . $id . ")");
         if ($GLOBALS['db']->affected_rows()) {
             $root['response_code'] = 1;
             $root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS'];
         } else {
             $root['response_code'] = 0;
             $root['show_err'] = "删除失败";
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:28,代码来源:uc_del_bank.action.php


示例13: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $page = intval($GLOBALS['request']['page']);
     //分页
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $page = $page == 0 ? 1 : $page;
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $url = get_domain() . APP_ROOT;
     $share_url = str_replace("sjmapi", "wap", $url);
     if ($user_id) {
         $share_url .= "?r=" . base64_encode(intval($user_id));
     }
     $root['share_url'] = $share_url;
     $root['city_name'] = $city_name;
     $root['page_title'] = "邀请链接";
     //fwb 2014-08-27
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:25,代码来源:uc_invite.action.php


示例14: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $mobile = trim($GLOBALS['request']['mobile']);
     $pwd = strim($GLOBALS['request']['password']);
     if ($mobile == '') {
         $root['status'] = 0;
         $root['info'] = '手机号码不能为空';
         output($root);
     }
     if (!check_mobile($mobile)) {
         $root['status'] = 0;
         $root['info'] = "请输入正确的手机号码";
         output($root);
     }
     if (strlen($pwd) < 4) {
         $root['status'] = 0;
         $root['info'] = "密码不能低于四位";
         output($root);
     }
     $db_code = $GLOBALS['db']->getRow("select id from " . DB_PREFIX . "sms_mobile_verify where status=1 and mobile_phone = '{$mobile}' and type=0 order by id desc");
     if (!$db_code) {
         $root['status'] = 0;
         $root['info'] = "手机号码未通过验证";
         output($root);
     }
     $root = mobile_reg($mobile, $pwd);
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:29,代码来源:register_do_phone.action.php


示例15: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $dltid = intval($GLOBALS['request']['dltid']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $GLOBALS['db']->query("UPDATE " . DB_PREFIX . "deal_load_transfer SET status=0,callback_count = callback_count+1 where id=" . $dltid . " AND t_user_id=0 and user_id = " . $user_id);
         if ($GLOBALS['db']->affected_rows()) {
             $root['response_code'] = 1;
             $root['show_err'] = "撤销操作成功";
         } else {
             $root['response_code'] = 0;
             $root['show_err'] = "撤销操作失败";
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:28,代码来源:uc_do_reback.action.php


示例16: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/uc_func.php';
         $root['user_login_status'] = 1;
         $paypassword = strim($GLOBALS['request']['paypassword']);
         $amount = floatval($GLOBALS['request']['amount']);
         $bid = intval($GLOBALS['request']['bid']);
         $result = getUcSaveCarry($amount, $paypassword, $bid);
         $root['response_code'] = $result['status'];
         $root['show_err'] = $result['show_err'];
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:26,代码来源:uc_save_carry.action.php


示例17: index

 public function index()
 {
     $root = array();
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     if ($user_id == 0) {
         $root['user_login_status'] = 0;
         //用户登陆状态:1:成功登陆;0:未成功登陆
         output($root);
     } else {
         $root['user_login_status'] = 1;
     }
     $userfrequented = array('uid' => $user_id, 'title' => $GLOBALS['request']['title'], 'addr' => $GLOBALS['request']['addr'], 'zoom_level' => floatval($GLOBALS['request']['zoom_level']), 'latitude_top' => floatval($GLOBALS['request']['latitude_top']), 'latitude_bottom' => floatval($GLOBALS['request']['latitude_bottom']), 'longitude_left' => floatval($GLOBALS['request']['longitude_left']), 'longitude_right' => floatval($GLOBALS['request']['longitude_right']), 'xpoint' => floatval($GLOBALS['request']['xpoint']), 'ypoint' => floatval($GLOBALS['request']['ypoint']));
     $GLOBALS['db']->autoExecute(DB_PREFIX . "user_frequented", $userfrequented, 'INSERT');
     $uid = $GLOBALS['db']->insert_id();
     $root['uid'] = $uid;
     if ($uid > 0) {
         $root['return'] = 1;
         $root['info'] = "添加成功";
     } else {
         $root['return'] = 0;
         $root['info'] = "添加失败";
     }
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:26,代码来源:saveuserfrequented.action.php


示例18: index

 public function index()
 {
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     if (app_conf("SMS_ON") == 0) {
         $root['response_code'] = 0;
         $root['show_err'] = $GLOBALS['lang']['SMS_OFF'];
         //短信未开启
         output($root);
     }
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     $root['user_id'] = $user_id;
     if ($user_id > 0) {
         $mobile = $user['mobile'];
         $code = intval($user['bind_verify']);
         if ($mobile == '') {
             $root['response_code'] = 0;
             $root['show_err'] = $GLOBALS['lang']['MOBILE_EMPTY_TIP'];
             output($root);
         }
         if (!check_mobile($mobile)) {
             $root['response_code'] = 0;
             $root['show_err'] = $GLOBALS['lang']['FILL_CORRECT_MOBILE_PHONE'];
             output($root);
         }
         if (!check_ipop_limit(get_client_ip(), "mobile_verify", 60, 0)) {
             $root['response_code'] = 0;
             $root['show_err'] = $GLOBALS['lang']['MOBILE_SMS_SEND_FAST'];
             //短信发送太快
             output($root);
         }
         //开始生成手机验证
         if ($code == 0) {
             //已经生成过了,则使用旧的验证码;反之生成一个新的
             $code = rand(1111, 9999);
             $GLOBALS['db']->query("update " . DB_PREFIX . "user set bind_verify = '" . $code . "',verify_create_time = '" . TIME_UTC . "' where id = " . $user_id);
         }
         //使用立即发送方式
         $result = send_verify_sms($mobile, $code, $user, true);
         //
         $root['response_code'] = $result['status'];
         if ($root['response_code'] == 1) {
             $root['show_err'] = $GLOBALS['lang']['MOBILE_VERIFY_SEND_OK'];
         } else {
             $root['show_err'] = $result['msg'];
             if ($root['show_err'] == null || $root['show_err'] == '') {
                 $root['show_err'] = "验证码发送失败";
             }
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:60,代码来源:send_reset_pay_code.action.php


示例19: index

 public function index()
 {
     $filenamezip = APP_ROOT_PATH . "public/mobile_goods_down_region_conf.zip";
     if (!file_exists($filenamezip)) {
         $sql = "select id,pid,name,'' as postcode,'' as py from " . DB_PREFIX . "delivery_region";
         $list = $GLOBALS['db']->getAll($sql);
         $root = array();
         $root['return'] = 1;
         $region_list = "";
         foreach ($list as $item) {
             $sql = "insert into region_conf(id,pid,name,postcode,py) values('{$item['id']}','{$item['pid']}','{$item['name']}','{$item['postcode']}','{$item['py']}');";
             if ($region_list == "") {
                 $region_list = $sql;
             } else {
                 $region_list = $region_list . "\n" . $sql;
             }
         }
         $ziper = new zipfile();
         $ziper->addFile($region_list, "region_conf.txt");
         $ziper->output($filenamezip);
     }
     $root = array();
     $root['return'] = 1;
     if (file_exists($filenamezip)) {
         $root['file_exists'] = 1;
     } else {
         $root['file_exists'] = 0;
     }
     $sql = "select count(*) as num from " . DB_PREFIX . "delivery_region";
     $root['region_num'] = $GLOBALS['db']->getOne($sql);
     //配置地区数量
     $root['file_url'] = get_domain() . APP_ROOT . "/../public/mobile_goods_down_region_conf.zip";
     $root['file_size'] = abs(filesize($filenamezip));
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:35,代码来源:down_region_conf.action.php


示例20: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $group_id = intval($_REQUEST['id']);
     $page = intval($GLOBALS['request']['page']);
     //分页
     $page = $page == 0 ? 1 : $page;
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     if ($user_id == 0) {
         $root['return'] = 0;
         $root['info'] = "请先登陆";
     }
     $group_id = intval($_REQUEST['id']);
     $group_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "topic_group where is_effect = 1 and id = " . $group_id . " limit " . $limit);
     if (!$group_item) {
         $root['return'] = 0;
         $root['info'] = "不存在该主题";
     }
     $count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic_group where is_effect = 1 and id = " . $group_id);
     $root['id'] = $group_id;
     $root['page'] = array("page" => $page, "page_total" => ceil($count / PAGE_SIZE), "page_size" => PAGE_SIZE);
     $root['page_title'] = "发表主题";
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:29,代码来源:addtopic.action.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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