本文整理汇总了PHP中get_deal函数的典型用法代码示例。如果您正苦于以下问题:PHP get_deal函数的具体用法?PHP get_deal怎么用?PHP get_deal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_deal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
global $tmpl;
$rel_table = addslashes(trim($_REQUEST['act']));
$message_type = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "message_type where type_name='" . $rel_table . "' and type_name <> 'supplier'");
if (!$message_type || $message_type['is_fix'] == 0) {
app_redirect(APP_ROOT . "/");
}
$rel_table = $message_type['type_name'];
$condition = '';
$id = intval($_REQUEST['id']);
if ($rel_table == 'deal') {
$deal = get_deal($id);
if ($deal['buy_type'] != 1) {
$GLOBALS['tmpl']->assign("deal", $deal);
}
$id = $deal['id'];
}
require APP_ROOT_PATH . 'app/Lib/side.php';
if ($id > 0) {
$condition = "rel_table = '" . $rel_table . "' and rel_id = " . $id;
} else {
$condition = "rel_table = '" . $rel_table . "'";
}
if (app_conf("USER_MESSAGE_AUTO_EFFECT") == 0) {
$condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
} else {
if ($message_type['is_effect'] == 0) {
$condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
}
}
$condition .= " and is_buy = " . intval($_REQUEST['is_buy']);
//message_form 变量输出
$GLOBALS['tmpl']->assign("post_title", $message_type['show_name']);
$GLOBALS['tmpl']->assign("page_title", $message_type['show_name']);
$GLOBALS['tmpl']->assign('rel_id', $id);
$GLOBALS['tmpl']->assign('rel_table', $rel_table);
$GLOBALS['tmpl']->assign('is_buy', intval($_REQUEST['is_buy']));
if (intval($_REQUEST['is_buy']) == 1) {
$GLOBALS['tmpl']->assign("post_title", $GLOBALS['lang']['AFTER_BUY']);
$GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['AFTER_BUY']);
}
if (!$GLOBALS['user_info']) {
$GLOBALS['tmpl']->assign("message_login_tip", sprintf($GLOBALS['lang']['MESSAGE_LOGIN_TIP'], url("shop", "user#login"), url("shop", "user#register")));
}
//分页
$page = intval($_REQUEST['p']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$message = get_message_list($limit, $condition);
$page = new Page($message['count'], app_conf("PAGE_SIZE"));
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
$GLOBALS['tmpl']->assign("message_list", $message['list']);
$GLOBALS['tmpl']->assign("user_auth", get_user_auth());
$GLOBALS['tmpl']->display("message.html");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:60,代码来源:messageModule.class.php
示例2: check_deal_time
/**
* 检测团购的时间状态
* $id 团购ID
*
*/
function check_deal_time($id)
{
$deal_info = get_deal($id);
$now = TIME_UTC;
//开始验证团购时间
if ($deal_info['begin_time'] != 0) {
//有开始时间
if ($now < $deal_info['begin_time']) {
$result['status'] = 0;
$result['data'] = DEAL_NOTICE;
//未上线
$result['info'] = $deal_info['sub_name'];
return $result;
}
}
if ($deal_info['end_time'] != 0) {
//有结束时间
if ($now >= $deal_info['end_time']) {
$result['status'] = 0;
$result['data'] = DEAL_HISTORY;
//过期
$result['info'] = $deal_info['sub_name'];
return $result;
}
}
//验证团购时间
$result['status'] = 1;
$result['info'] = $deal_info['name'];
return $result;
}
开发者ID:workplayteam,项目名称:P2P,代码行数:35,代码来源:deal.php
示例3: 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
示例4: index
public function index()
{
$root = array();
require_once APP_ROOT_PATH . "app/Lib/deal_func.php";
$id = intval($GLOBALS['request']['id']);
$minmoney = floatval($GLOBALS['request']['money']);
$number = floatval($GLOBALS['request']['number']);
$deal = $GLOBALS['cache']->get("MOBILE_DEAL_BY_ID_" . $id);
if ($deal === false) {
$deal = get_deal($id);
$GLOBALS['cache']->set("MOBILE_DEAL_BY_ID_" . $id, $deal, 300);
}
$parmas = array();
//$parmas['uloantype'] = 1;
$parmas['uloantype'] = $deal['uloadtype'];
if ($deal['uloadtype'] == 1) {
$parmas['minmoney'] = $minmoney;
$parmas['money'] = $number;
} else {
$parmas['money'] = $minmoney;
}
$parmas['loantype'] = $deal['loantype'];
$parmas['rate'] = $deal['rate'];
$parmas['repay_time'] = $deal['repay_time'];
$parmas['repay_time_type'] = $deal['repay_time_type'];
$parmas['user_loan_manage_fee'] = $deal['user_loan_manage_fee'];
$parmas['user_loan_interest_manage_fee'] = $deal['user_loan_interest_manage_fee'];
$root['profit'] = bid_calculate($parmas);
$root['profit'] = "¥" . $root['profit'];
$root['response_code'] = 1;
output($root);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:32,代码来源:calc_bid.action.php
示例5: index
public function index()
{
require_once APP_ROOT_PATH . 'app/Lib/deal.php';
/**
* has_attr: 0:无属性; 1:有属性
* 有商品属性在要购买时,要选择属性后,才能购买
* change_cart_request_server:
* 编辑购买车商品时,需要提交到服务器端,让服务器端通过一些判断返回一些信息回来(如:满多少钱,可以免运费等一些提示)
* 0:提交,1:不提交;
* image_attr_a_id_{$attr_a_id} 图片列表,可以根据属性ID值,来切换图片列表;默认为:0
* limit_num: 库存数量
*/
$id = intval($GLOBALS['request']['id']);
//商品ID
$item = get_deal($id);
$root = getGoodsArray($item);
$root['return'] = 1;
$root['attr'] = getAttrArray($id);
$images = array();
//image_attr_1_id_{$attr_1_id} 图片列表,可以根据属性ID值,来切换图片列表
$sql = "select img from " . DB_PREFIX . "deal_gallery where deal_id = " . intval($id);
$list = $GLOBALS['db']->getAll($sql);
$gallery = array();
$big_gallery = array();
foreach ($list as $k => $image) {
$gallery[] = get_abs_img_root(get_spec_image($image['img'], 320, 320, 0));
$big_gallery[] = get_abs_img_root(get_spec_image($image['img'], 0, 0, 0));
}
$root['gallery'] = $gallery;
$root['big_gallery'] = $big_gallery;
output($root);
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:goodsdesc.action.php
示例6: index
public function index()
{
$root = array();
$id = intval($GLOBALS['request']['id']);
$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['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal_collect WHERE deal_id = " . $id . " AND user_id=" . $user_id);
} else {
$root['is_faved'] = 0;
//0:未关注;>0:已关注
}
$root['response_code'] = 1;
$deal = get_deal($id);
//format_deal_item($deal,$email,$pwd);
//print_r($deal);
//exit;
$root['deal'] = $deal;
//data.deal.name
output($root);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:26,代码来源:deal.action.php
示例7: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$id = intval($GLOBALS['request']['id']);
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/deal.php';
$root['user_login_status'] = 1;
$deal = get_deal($id);
if (!$deal || $deal['user_id'] != $user_id || $deal['deal_status'] != 4) {
$root['show_err'] = "操作失败!";
$root['response_code'] = 0;
} else {
//还款列表
$loan_list = get_deal_load_list($deal);
$root['loan_list'] = $loan_list;
$root['deal'] = $deal;
$root['response_code'] = 1;
$root['show_err'] = '';
}
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:33,代码来源:uc_quick_refund.action.php
示例8: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$id = intval($GLOBALS['request']['id']);
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/deal.php';
$root['user_login_status'] = 1;
$deal = get_deal($id);
$root['deal'] = $deal;
//还款列表
$loan_list = $GLOBALS['db']->getAll("SELECT * FROM " . DB_PREFIX . "deal_repay where deal_id={$id} ORDER BY repay_time ASC");
$manage_fee = 0;
$impose_money = 0;
$repay_money = 0;
foreach ($loan_list as $k => $v) {
$manage_fee += $v['manage_money'];
$impose_money += $v['impose_money'];
$repay_money += $v['repay_money'];
//还款日
$loan_list[$k]['repay_time_format'] = to_date($v['repay_time'], 'Y-m-d');
$loan_list[$k]['true_repay_time_format'] = to_date($v['true_repay_time'], 'Y-m-d');
//待还本息
$loan_list[$k]['repay_money_format'] = format_price($v['repay_money']);
//借款管理费
$loan_list[$k]['manage_money_format'] = format_price($v['manage_money']);
//逾期费用
$loan_list[$k]['impose_money_format'] = format_price($v['impose_money']);
//状态
if ($v['status'] == 0) {
$loan_list[$k]['status_format'] = '提前还款';
} elseif ($v['status'] == 1) {
$loan_list[$k]['status_format'] = '准时还款';
} elseif ($v['status'] == 2) {
$loan_list[$k]['status_format'] = '逾期还款';
} elseif ($v['status'] == 3) {
$loan_list[$k]['status_format'] = '严重逾期';
}
}
$root['manage_fee'] = $manage_fee;
$root['impose_money'] = $impose_money;
$root['repay_money'] = $repay_money;
$root['loan_list'] = $loan_list;
$inrepay_info = $GLOBALS['db']->getRow("SELECT * FROM " . DB_PREFIX . "deal_inrepay_repay WHERE deal_id={$id}");
$root['inrepay_info'] = $inrepay_info;
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
$root['program_title'] = "提前还款";
output($root);
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:59,代码来源:uc_refund_detail.action.php
示例9: index
public function index()
{
$content = strim($GLOBALS['request']['content']);
//点评内容
$point = intval($GLOBALS['request']['point']);
//点评分数
$deal_id = intval($GLOBALS['request']['id']);
//团购或商品id //只有购买后,才能点评
//检查用户,用户密码
$user = $GLOBALS['user_info'];
$user_id = intval($user['id']);
$money = floatval($user['money']);
$root = array();
$root['return'] = 1;
if ($user_id > 0) {
$GLOBALS['user_info'] = $user;
$root['user_login_status'] = 1;
require_once APP_ROOT_PATH . "system/model/review.php";
require_once APP_ROOT_PATH . "system/model/deal.php";
$deal_info = get_deal($deal_id);
if ($deal_info['is_shop'] == 1) {
$cfg = load_dp_cfg(array("scate_id" => $deal_info['shop_cate_id']));
} else {
$cfg = load_dp_cfg(array("cate_id" => $deal_info['cate_id']));
}
$point_group = array();
foreach ($cfg['point_group'] as $row) {
$point_group[$row['id']] = $point;
}
$dp_img = array();
if (count($_FILES['file']['name']) > 9) {
$root['status'] = 0;
$root['info'] = '上传图片不能超过9张';
} else {
//同步图片
foreach ($_FILES['file']['name'] as $k => $v) {
$_files['file']['name'] = $v;
$_files['file']['type'] = $_FILES['file']['type'][$k];
$_files['file']['tmp_name'] = $_FILES['file']['tmp_name'][$k];
$_files['file']['error'] = $_FILES['file']['error'][$k];
$_files['file']['size'] = $_FILES['file']['size'][$k];
$res = upload_topic($_files);
if ($res['error'] == 0) {
$dp_img[] = $res['url'];
}
}
$result = save_review($user_id, array("deal_id" => $deal_id), $content, $point, $dp_img, array(), $point_group);
//$result = add_deal_dp($user_id, $content, $point, $deal_id);
$root['status'] = $result['status'];
$root['info'] = $result['info'];
}
} else {
$root['user_login_status'] = 0;
$root['status'] = 0;
$root['info'] = '请先登录';
}
output($root);
}
开发者ID:macall,项目名称:jsd,代码行数:58,代码来源:add_deal_dp.action.php
示例10: load
public function load($param)
{
$key = $this->build_key(__CLASS__, $param);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/");
$deal_info = $GLOBALS['fcache']->get($key);
if ($deal_info === false) {
$id = intval($param['id']);
$deal_info = get_deal($id);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/");
$GLOBALS['fcache']->set($key, $deal_info);
}
return $deal_info;
}
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:13,代码来源:cache_deal_cart.auto_cache.php
示例11: index
public function index()
{
$root = array();
$id = intval($GLOBALS['request']['id']);
$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['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal_collect WHERE deal_id = " . $id . " AND user_id=" . $user_id);
} else {
$root['is_faved'] = 0;
//0:未关注;>0:已关注
}
$root['response_code'] = 1;
$deal = get_deal($id);
//format_deal_item($deal,$email,$pwd);
//print_r($deal);
//exit;
$root['deal'] = $deal;
$root['open_ips'] = intval(app_conf("OPEN_IPS"));
$root['ips_acct_no'] = $user['ips_acct_no'];
$root['ips_bill_no'] = $deal['ips_bill_no'];
// function bid_calculate(){
// require_once APP_ROOT_PATH."app/Lib/deal_func.php";
// echo bid_calculate($_POST);
// }
if (!empty($root['ips_bill_no'])) {
//第三方托管标
if (!empty($user['ips_acct_no'])) {
$result = GetIpsUserMoney($user_id, 0);
$root['user_money'] = $result['pBalance'];
} else {
$root['user_money'] = 0;
}
} else {
$root['user_money'] = $user['money'];
}
$root['user_money_format'] = format_price($user['user_money']);
//用户金额
//data.deal.name
$root['program_title'] = "投标详情";
output($root);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:47,代码来源:deal.action.php
示例12: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$deal_id = intval($GLOBALS['request']['id']);
$l_key = intval($GLOBALS['request']['l_key']);
//$l_key = 2;
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/deal.php';
$root['user_login_status'] = 1;
$deal = get_deal($deal_id, 0);
$root['deal'] = $deal;
$page = intval($GLOBALS['request']['page']);
if ($page == 0) {
$page = 1;
}
$limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
$count = $GLOBALS['db']->getOne(" SELECT count(*) FROM " . DB_PREFIX . "deal_load_repay dlr where dlr.deal_id ='{$deal_id}' and dlr.l_key='{$l_key}' ");
// $load_user = $GLOBALS['db']->getAll("SELECT dlr.*,u.user_name FROM ".DB_PREFIX."deal_load_repay dlr left join ".DB_PREFIX."user u on dlr.user_id = u.id where dlr.deal_id ='$deal_id' and dlr.l_key='$l_key' order by dlr.id limit $limit ");
// $root['page'] = array("page"=>$page,"page_total"=>ceil($count/app_conf("PAGE_SIZE")),"page_size"=>app_conf("PAGE_SIZE"));
// foreach ($load_user as $k=>$v)
// {
// //$load_user[$k]['month_repay_money']=$v['self_money']+$v['interest_money'];
// $load_user[$k]['month_repay_money']=$v['repay_money'];
// }
//
// $root['load_user'] = $load_user;
$load_user = get_deal_user_load_list($deal, 0, $l_key, -1, 0, 0, 1, $limit);
$root['page'] = array("page" => $page, "page_total" => ceil($count / app_conf("PAGE_SIZE")), "page_size" => app_conf("PAGE_SIZE"));
$root['load_user'] = $load_user['item'];
$root['response_code'] = 1;
$root['show_err'] = '';
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
$root['program_title'] = "查看明细";
output($root);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:46,代码来源:uc_quick_refund_detail.action.php
示例13: 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;
$id = intval($GLOBALS['request']['id']);
$deal = get_deal($id);
$bid_money = floatval($GLOBALS['request']["bid_money"]);
$buy_number = $GLOBALS['request']["buy_number"];
if ($deal['uloadtype'] == 1 && $buy_number > 1) {
$bid_money = $buy_number * $bid_money;
}
$bid_paypassword = strim($GLOBALS['request']['bid_paypassword']);
$status = dobid2($id, $bid_money, $bid_paypassword);
$root['status'] = $status['status'];
if ($status['status'] == 2) {
$root['response_code'] = 1;
$root['app_url'] = $status['jump'];
} else {
if ($status['status'] != 1) {
$root['response_code'] = 0;
$root['show_err'] = $status['show_err'];
} else {
$root['response_code'] = 1;
$root['show_err'] = $GLOBALS['lang']['DEAL_BID_SUCCESS'];
$root['id'] = $id;
}
}
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:42,代码来源:deal_dobid.action.php
示例14: index
public function index()
{
$root = array();
$email = strim($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = strim($GLOBALS['request']['pwd']);
//密码
$id = intval($GLOBALS['request']['id']);
//检查用户,用户密码
$user = user_check($email, $pwd);
$user_id = intval($user['id']);
if ($user_id > 0) {
require APP_ROOT_PATH . 'app/Lib/deal.php';
$root['user_login_status'] = 1;
$deal = get_deal($id);
if (!$deal || $deal['user_id'] != $user_id || $deal['deal_status'] != 4) {
$root['show_err'] = "操作失败!";
$root['response_code'] = 0;
} else {
//还款列表
$loan_list = get_deal_load_list($deal);
$flag = 1;
foreach ($loan_list as $k => $v) {
if ($loan_list[$k]['has_repay'] == 0 && $flag == 1) {
$loan_list[$k]["flag"] = $flag;
$flag = 0;
}
}
$root['loan_list'] = $loan_list;
$root['deal'] = $deal;
$root['response_code'] = 1;
$root['show_err'] = '';
}
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
$root['program_title'] = "还款";
output($root);
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:41,代码来源:uc_quick_refund.action.php
示例15: 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;
$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 a.title,a.content,a.create_time,a.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 a.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;
$root['program_title'] = "详细信息";
output($root);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:40,代码来源:deal_mobile.action.php
示例16: load_msg
/**
* 加载相应的类型消息
* @param unknown_type $msg 数据集(即数据库中的对应消息行)
*
* 返回:array("id"=>"当前消息ID",title="标题",is_read=>"是否已读","icon"=>"相关数据的图片(可为空)","content"=>"内容","create_time"=>"时间","link"=>"(可为空)相关数据的跳转链接");
*/
public function load_msg($msg)
{
if (!$msg['data']) {
$data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "supplier_location_dp where id = " . $msg['data_id']);
if ($data['deal_id'] > 0) {
require_once APP_ROOT_PATH . "system/model/deal.php";
$data_info = get_deal($data['deal_id']);
$data['url'] = $data_info['url'];
$data['icon'] = $data_info['icon'];
$data['title'] = $data_info['name'];
} elseif ($data['youhui_id'] > 0) {
require_once APP_ROOT_PATH . "system/model/youhui.php";
$data_info = get_youhui($data['youhui_id']);
$data['url'] = $data_info['url'];
$data['icon'] = $data_info['icon'];
$data['title'] = $data_info['name'];
} elseif ($data['event_id'] > 0) {
require_once APP_ROOT_PATH . "system/model/event.php";
$data_info = get_event($data['event_id']);
$data['url'] = $data_info['url'];
$data['icon'] = $data_info['icon'];
$data['title'] = $data_info['name'];
} else {
require_once APP_ROOT_PATH . "system/model/supplier.php";
$data_info = get_location($data['supplier_location_id']);
$data['url'] = $data_info['url'];
$data['icon'] = $data_info['preview'];
$data['title'] = $data_info['name'];
}
$msg['data'] = serialize($data);
$GLOBALS['db']->autoExecute(DB_PREFIX . "msg_box", $msg, "UPDATE", "id=" . $msg['id'], "SILENT");
}
$data = unserialize($msg['data']);
$msg['icon'] = $data['icon'];
$msg['link'] = $data['url'];
$msg['title'] = "对 [" . $data['title'] . "] 的点评";
$msg['short_title'] = "对 [" . msubstr($msg['title']) . "] 的点评";
return $msg;
}
开发者ID:macall,项目名称:jsd,代码行数:45,代码来源:dp_msg.php
示例17: 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;
$id = intval($GLOBALS['request']['id']);
$deal = get_deal($id);
if ($deal) {
if ($deal['user_id'] == $GLOBALS['user_info']['id']) {
$root['response_code'] = 0;
$root['show_err'] = $GLOBALS['lang']['CANT_BID_BY_YOURSELF'];
//当response_code != 0 时,返回:错误内容
} else {
$root['deal'] = $deal;
$root['user_money'] = $user['money'];
//用户金额
$root['user_money_format'] = format_price($user['money']);
//用户金额
$root['response_code'] = 1;
}
} else {
$root['response_code'] = 0;
}
} else {
$root['response_code'] = 0;
$root['show_err'] = "未登录";
$root['user_login_status'] = 0;
}
output($root);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:37,代码来源:deal_bid.action.php
示例18: index
public function index()
{
require_once APP_ROOT_PATH . 'system/model/deal.php';
/**
* has_attr: 0:无属性; 1:有属性
* 有商品属性在要购买时,要选择属性后,才能购买
* change_cart_request_server:
* 编辑购买车商品时,需要提交到服务器端,让服务器端通过一些判断返回一些信息回来(如:满多少钱,可以免运费等一些提示)
* 0:提交,1:不提交;
* image_attr_a_id_{$attr_a_id} 图片列表,可以根据属性ID值,来切换图片列表;默认为:0
* limit_num: 库存数量
*/
$id = intval($GLOBALS['request']['id']);
//商品ID
$user = $GLOBALS['user_info'];
$user_id = intval($user['id']);
$is_collect = 0;
if ($user_id > 0) {
$sql2 = "select count(*) from " . DB_PREFIX . "deal_collect where deal_id = " . $id . " and user_id=" . $user_id;
if ($GLOBALS['db']->getOne($sql2) > 0) {
$is_collect = 1;
}
}
$ypoint = $m_latitude = doubleval($GLOBALS['request']['m_latitude']);
//ypoint
$xpoint = $m_longitude = doubleval($GLOBALS['request']['m_longitude']);
//xpoint
$city_name = strim($GLOBALS['request']['city_name']);
//城市名称
$item = get_deal($id);
//$item['origin_price_format'] = format_price2($item['origin_price']);
//$item['current_price_format'] = format_price2($item['current_price']);
//$item['save_price_format'] = format_price2($item['save_price']);
$root = getGoodsArray($item);
//$message_re=m_get_message_list(3," m.rel_table = 'deal' and m.rel_id=".$id." and m.is_buy = 1");/*购买评论*/
require_once APP_ROOT_PATH . "system/model/review.php";
require_once APP_ROOT_PATH . "system/model/user.php";
$message_re = get_dp_list(3, $param = array("deal_id" => $id, "youhui_id" => 0, "event_id" => 0, "location_id" => 0, "tag" => ""), "", "");
foreach ($message_re['list'] as $k => $v) {
$message_re['list'][$k]['width'] = $v['point'] / 5 * 100;
if ($v['point'] > 0) {
$str = "";
for ($i = 1; $i <= $v['point']; $i++) {
$str .= "★";
}
$message_re['list'][$k]['xing'] = $str;
}
$message_re['list'][$k]['reply_time_format'] = date("Y-m-d H:i:s", $v['reply_time']);
$uinfo = load_user($v['user_id']);
$message_re['list'][$k]['user_name'] = $uinfo['user_name'];
foreach ($message_re['list'][$k]['images'] as $kk => $vv) {
$message_re['list'][$k]['images'][$kk] = get_abs_img_root(get_spec_image($vv, 60, 60, 1));
$message_re['list'][$k]['oimages'][$kk] = get_abs_img_root($vv);
}
}
$root['message_list'] = $message_re['list'];
if (count($message_re['list']) > 0) {
$sql = "select count(*) from " . DB_PREFIX . "supplier_location_dp where " . $message_re['condition'];
$message_re['count'] = $GLOBALS['db']->getOne($sql);
}
$root['message_count'] = $message_re['count'];
$pi = 3.14159265;
//圆周率
$r = 6378137;
//地球平均半径(米)
$root['distance'] = ACOS(SIN($ypoint * $pi / 180) * SIN($item['supplier_address_info']['ypoint'] * $pi / 180) + COS($ypoint * $pi / 180) * COS($item['supplier_address_info']['ypoint'] * $pi / 180) * COS($xpoint * $pi / 180 - $item['supplier_address_info']['xpoint'] * $pi / 180)) * $r;
$root['return'] = 1;
$images = array();
//image_attr_1_id_{$attr_1_id} 图片列表,可以根据属性ID值,来切换图片列表
$sql = "select img from " . DB_PREFIX . "deal_gallery where deal_id = " . intval($id) . " order by sort asc";
$list = $GLOBALS['db']->getAll($sql);
$gallery = array();
$big_gallery = array();
foreach ($list as $k => $image) {
$gallery[] = get_abs_img_root(get_spec_image($image['img'], 460, 280, 1));
$big_gallery[] = get_abs_img_root(get_spec_image($image['img'], 0, 0, 0));
}
$root['gallery'] = $gallery;
$root['big_gallery'] = $big_gallery;
//支持的门店列表;
$sql = "select id,name,address,tel,xpoint,ypoint,supplier_id from " . DB_PREFIX . "supplier_location where id in (select location_id from " . DB_PREFIX . "deal_location_link where deal_id = " . $id . ")";
$supplier_location_list = $GLOBALS['db']->getAll($sql);
foreach ($supplier_location_list as $k => $sl) {
$supplier_location_list[$k]['distance'] = ACOS(SIN($ypoint * $pi / 180) * SIN($sl['ypoint'] * $pi / 180) + COS($ypoint * $pi / 180) * COS($sl['ypoint'] * $pi / 180) * COS($xpoint * $pi / 180 - $sl['xpoint'] * $pi / 180)) * $r;
}
$root['supplier_location_list'] = $supplier_location_list;
//其它团购
//if($GLOBALS['request']['from']=="wap"){
$time = get_gmtime();
$time_condition = ' and is_shop = 0 ';
$time_condition .= ' and (' . $time . '>=begin_time or begin_time = 0 ) and (' . $time . '< end_time or end_time = 0) and buy_type<>2 and is_recommend=1';
$time_condition .= ' and id<>' . $id;
/*
if($item['cate_id']>0)
{
$ids = load_auto_cache("deal_sub_parent_cate_ids",array("cate_id"=>$item['cate_id']));
$time_condition .= " and cate_id in (".implode(",",$ids).")";
}
//.........这里部分代码省略.........
开发者ID:macall,项目名称:jishida,代码行数:101,代码来源:goodsdesc.action.php
示例19: index
public function index()
{
if (trim($_REQUEST['search']) == "do") {
$start_time = trim($_REQUEST['start_time']);
if ($start_time == "") {
$this->error("请选择开始时间");
die;
}
$this->assign("start_time", $start_time);
$end_time = trim($_REQUEST['end_time']);
if ($end_time == "") {
$this->error("请选择结束时间");
die;
}
$this->assign("end_time", $end_time);
$start_time = to_timespan($start_time, "Y-m-d");
$end_time = to_timespan($end_time, "Y-m-d");
if ($end_time < $start_time) {
$this->error("结束时间必须大于开始时间");
die;
}
$now_time = to_timespan(to_date(TIME_UTC, "Y-m-d"), "Y-m-d");
if ($end_time > $now_time) {
$end_time = $now_time;
}
//开始时间跟结束时间差多少天
$day = ($end_time - $start_time) / 24 / 3600;
$list = array();
$day_time = $start_time;
//标分类
$deal_cate = load_auto_cache("cache_deal_cate");
/*foreach($deal_cate as $kk=>$vv){
if(strpos($vv['name'],"智能")!==false){
unset($deal_cate[$kk]);
}
}*/
$this->assign("deal_cate", $deal_cate);
//获取改时间段内所有的 还款中和 已还清的贷款
//$deals = $GLOBALS['db']->getAll("SELECT id FROM ".DB_PREFIX."deal where deal_status in(4,5) and is_effect=1 and is_delete=0 and publish_wait=0 AND success_time >= $start_time and ((loantype=1 and (success_time + repay_time*31*24*3600) >=$end_time) or (loantype=0 and (success_time + (repay_time+1)*24*3600)>=$end_time))");
$deals = $GLOBALS['db']->getAll("SELECT id FROM " . DB_PREFIX . "deal where deal_status in(4,5) and is_effect=1 and is_delete=0 and publish_wait=0 AND success_time >= {$start_time}
|
请发表评论