public static function CashIt($order) { if (!$order['state'] == 'pay') { return 0; } //update user money; $user = Table::Fetch('user', $order['user_id']); Table::UpdateCache('user', $order['user_id'], array('money' => moneyit($user['money'] - $order['credit']))); //update order Table::UpdateCache('order', $order['id'], array('state' => 'pay', 'service' => 'cash', 'money' => $order['origin'])); $order = Table::FetchForce('order', $order['id']); ZTeam::BuyOne($order); }
<label>排序</label> <input type="text" size="10" name="sort_order" id="team-create-sort_order" class="number" value="<?php echo $team['sort_order'] ? $team['sort_order'] : 0; ?>" datatype="number"/><span class="inputtip">请填写数字,数值大到小排序,主推团购应设置较大值</span> </div> <div class="field"> <label>代金券使用</label> <input type="text" size="10" name="card" id="team-create-card" class="number" value="<?php echo moneyit($team['card']); ?>" require="true" datatype="money" /> <span class="inputtip">可使用代金券最大面额</span> </div> <div class="field"> <label>邀请返利</label> <input type="text" size="10" name="bonus" id="team-create-bonus" class="number" value="<?php echo moneyit($team['bonus']); ?>" require="true" datatype="money" /> <span class="inputtip">邀请好友参与本单商品购买时的返利金额</span> </div> <div class="field"> <label>消费返利</label> <input type="text" size="10" name="credit" id="team-create-credit" class="number" value="<?php echo moneyit($team['credit']); ?>" datatype="money" require="true" /> <span class="inputtip">消费<?php echo $INI['system']['couponname']; ?>时,获得账户余额返利,单位CNY元</span> </div> <div class="field"> <label>免单数量</label> <input type="text" size="10" name="farefree" id="team-create-farefree" class="number" value="<?php echo intval($team['farefree']); ?>" maxLength="6" datatype="money" require="true" /> <span class="inputtip">快递费用,免单数量:0表示不免运费,2表示,购买2件免运费</span> </div> <div class="field"> <label>首页设置</label> <span style="width:105px;float:left;"><input type="checkbox" class="allowrefund" name="is_index" value="Y" <?php if($team['is_index']=='Y'){?>checked<?php }?>/>上首页</span> <span style="width:105px;float:left;"><input type="checkbox" class="allowrefund" name="is_ad" value="Y" <?php if($team['is_ad']=='Y'){?>checked<?php }?>/>广告单</span> <span style="width:105px;float:left;"><input type="checkbox" name="booking" value="1" <?php if($team['booking'] == '1'){?>checked<?php }?> />无需预约</span>
<div class="box-content"> <div class="head"> <h2>购买充值 (总金额:<span class="currency"><?php echo $currency; ?></span><?php echo abs($summary); ?>)</h2> <ul class="filter"> <li class="label">分类: </li> <?php echo mcurrent_misc_money($s); ?> </ul> </div> <div class="sect"> <table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table"> <tr><th width="200">Email/用户名</th><th width="100">动作</th><th width="160">金额</th><th width="200">支付方式</th><th width="200"><?php echo $action; ?>时间</th></tr> <?php if(is_array($flows)){foreach($flows AS $index=>$one) { ?> <tr <?php echo $index%2?'':'class="alt"'; ?>> <td nowrap><?php echo $users[$one['user_id']]['email']; ?><br/><?php echo $users[$one['user_id']]['username']; ?></td> <td nowrap>购买充值</td> <td nowrap><span class="money"><?php echo $currency; ?></span><?php echo moneyit(abs($one['money'])); ?></td> <td nowrap><?php echo $option_service[$pays[$one['detail_id']]['service']]; ?></td> <td nowrap><?php echo date('Y-m-d H:i', $one['create_time']); ?></td> </tr> <?php }}?> <tr><td colspan="5"><?php echo $pagestring; ?></td></tr> </table> </div> </div> <div class="box-bottom"></div> </div> </div> </div> </div> <!-- bd end --> </div> <!-- bdw end -->
$groups = option_category('group', false, false); $oa = array(); $si = array('sitename' => $INI['system']['sitename'], 'wwwprefix' => $INI['system']['wwwprefix'], 'imgprefix' => $INI['system']['imgprefix']); foreach ($teams as $one) { $city = Table::Fetch('category', $one['city_id']); $group = Table::Fetch('category', $one['group_id']); $item = array(); $item['loc'] = $si['wwwprefix'] . "/team.php?id={$one['id']}"; $item['data'] = array(); $item['data']['display'] = array(); $o = array(); $o['website'] = $INI['system']['sitename']; $o['siteurl'] = $INI['system']['wwwprefix']; ($o['city'] = $city['name']) || ($o['city'] = '全国'); $o['title'] = $one['title']; $o['class'] = $groups[$one['group_id']]; $o['image'] = $si['imgprefix'] . '/static/' . $one['image']; $o['startTime'] = $one['begin_time']; $o['endTime'] = $one['end_time']; $o['value'] = $one['market_price']; $o['price'] = $one['team_price']; if ($one['market_price'] > 0) { $o['rebate'] = moneyit(10 * $one['team_price'] / $one['market_price']); } else { $o['rebate'] = '0'; } $o['bought'] = abs(intval($one['now_number'])); $item['data']['display'] = $o; $oa[] = $item; } Output::XmlBaidu($oa);
<?php $one['state'] = team_state($one); ?> <tr <?php echo $index%2?'':'class="alt"'; ?> id="team-list-id-<?php echo $one['id']; ?>"> <td>ID: <?php echo $one['id']; ?><br /> XH: <?php echo $one['sort_order']; ?></a></a></td> <td> <?php echo $one['team_type']=='normal' ? '[团购]' : ''; ?> <?php echo $one['team_type']=='seconds' ? '[秒杀]' : ''; ?> <?php echo $one['team_type']=='goods' ? '[商品]' : ''; ?> <a class="deal-title" href="/team.php?id=<?php echo $one['id']; ?>" target="_blank"><?php echo $one['title']; ?></a> </td> <td nowrap><?php echo $cities[$one['city_id']]['name']; ?><br/><?php echo $groups[$one['group_id']]['name']; ?></td> <td nowrap><?php echo date('Y-m-d',$one['begin_time']); ?><br/><?php echo date('Y-m-d',$one['end_time']); ?></td> <td nowrap><?php echo $one['now_number']; ?>/<?php echo $one['min_number']; ?></td> <td nowrap><span class="money"><?php echo $currency; ?></span><?php echo moneyit($one['team_price']); ?><br/><span class="money"><?php echo $currency; ?></span><?php echo moneyit($one['market_price']); ?></td> <td class="op" nowrap> <?php if($login_user['id']=="1"){?><a href="/ajax/manage.php?action=teamdetail&id=<?php echo $one['id']; ?>" class="ajaxlink">详情</a>| <?php } else { ?> <?php }?><a href="/manage/team/edit.php?id=<?php echo $one['id']; ?>">编辑</a> <?php if($login_user['id']=="1"){?>|<a href="/ajax/manage.php?action=teamremove&id=<?php echo $one['id']; ?>" class="ajaxlink" ask="确定删除本项目吗?" >删除</a> <?php } else { ?> <?php }?> <?php if($login_user['id']=="1"){?> <?php if((in_array($one['state'],array('success','soldout')))){?>|<a href="/manage/team/down.php?id=<?php echo $one['id']; ?>" target="_blank">下载</a><?php }?><?php if($one['delivery']=='express'){?><br /><a href="/manage/team/ajax.php?action=smsexpress&id=<?php echo $one['id']; ?>" class="ajaxlink">短信快递单号</a><?php }?><br /><a href="/manage/team/downlucky.php?id=<?php echo $one['id']; ?>" target="_blank">下载幸运编号</a> <?php } else { ?> <?php }?> <br /> <a href="/manage/team/editzz.php?id=<?php echo $one['id']; ?>">杂项设置</a><br /> <a href="/manage/team/edit_map.php?id=<?php echo $one['id']; ?>">商户设置</a> </td> </tr> <?php }}?> <tr><td colspan="7"><?php echo $pagestring; ?></tr>
$item['data']['companys']['company'] = array(); $o = array(); $o['website'] = $INI['system']['sitename']; $o['siteurl'] = $INI['system']['wwwprefix']; ($o['city'] = $city) || ($o['city'] = ''); $o['title'] = $one['title']; $o['image'] = $si['imgprefix'] . '/static/' . $one['image']; $o['soldout'] = $team['now_number'] > $team['max_num'] && $team['max_num'] > 0 ? 'yes' : 'no'; $o['buyer'] = abs(intval($one['now_number'])); $o['start_date'] = $one['begin_time']; $o['end_date'] = $one['end_time']; $o['expire_date'] = $one['expire_time']; $o['oriprice'] = $one['market_price']; $o['curprice'] = $one['team_price']; if ($one['market_price'] > 0) { $o['discount'] = moneyit(10 * $one['team_price'] / $one['market_price']); } else { $o['discount'] = '0'; } $o['tip'] = $one['notice']; $item['data']['display'] = $o; $p = Table::Fetch('partner', $one['partner_id']); $pval = array(); $pval['name'] = $p['title']; $pval['contact'] = $p['tel']; $pval['address'] = $p['address']; if ($p['longlat']) { list($pval['longitude'], $pval['latitude']) = explode(',', $p['longlat']); } $item['data']['companys']['company'] = $pval; $oa[] = $item;
function get_price($team_price, $market_price) { return "团购价:¥" . moneyit($team_price) . "<br>原价:¥<lebel style='text-decoration:line-through'>" . moneyit($market_price) . "<label>"; }
} Table::Delete('card', $id); Session::Set('notice', "代金券 {$id} 删除成功!"); json(null, 'refresh'); } else { if ('userview' == $action) { $user = Table::Fetch('user', $id); $user['costcount'] = Table::Count('order', array('state' => 'pay', 'user_id' => $id)); $user['cost'] = Table::Count('flow', array('direction' => 'expense', 'user_id' => $id), 'money'); $html = render('manage_ajax_dialog_user'); json($html, 'dialog'); } else { if ('usermoney' == $action) { need_auth('admin'); $user = Table::Fetch('user', $id); $money = moneyit($_GET['money']); if ($money < 0 && $user['money'] + $money < 0) { json('提现失败 - 用户余额不足', 'alert'); } if (ZFlow::CreateFromStore($id, $money)) { $action = $money > 0 ? '线下充值' : '用户提现'; $money = abs($money); json(array(array('data' => "{$action}{$money}元成功", 'type' => 'alert'), array('data' => null, 'type' => 'refresh')), 'mix'); } json('充值失败', 'alert'); } else { if ('orderexpress' == $action) { need_auth('order'); $express_id = abs(intval($_GET['eid'])); $express_no = strval($_GET['nid']); if (!$express_id) {
<img src="/static/css/i/logo-footer.png" alt="<?php echo $INI['system']['sitename']; ?> " /><?php } ?> </a> </div> <div class="tot_board"> <div style="width:40px; float:left;border-right-width: 1px;border-right-style: dashed;border-right-color: #373536;padding: 0px 10px 0px 0px;"> <p><b>目前</b><br><br></p> </div> <div> <p class="total" style="float:right;"><?php echo $currency; echo moneyit($totalSavedMoney['tsm']); ?> </p><p>共节省金额: </p> <p class="total" style="float:right;"><?php echo $allteamcount; ?> </p><p>共组织团购次数: </p> </div> </div> </li> </ul> <div class="copyright"> <p>©<span>2010</span> <?php echo $INI['system']['sitename']; ?> (TuanGaLa.com)版权所有 <a href="/about/terms.php">使用<?php
</p> </li> <li class="list_price"> <div class="left"> <font class="arial font18px fontred"><?php echo $currency; ?> <?php echo moneyit($one['team_price']); ?> </font> </div> <div class="right"> 原价:<?php echo moneyit($one['market_price']); ?>元 </div> </li> <li class="list_address"> <!--<div class="left" style="position:relative;"> 已有<em><?php echo $one['now_number']; ?></em>人购买 </div>--> <div class="address_info"></div>
function team_discount($team, $save = false) { if ($team['market_price'] < 0 || $team['team_price'] < 0) { return '?'; } return moneyit(10 * $team['team_price'] / $team['market_price']); }
<p style="margin:5px 0;">申请日期:<input type="text" class="h-input" onFocus="WdatePicker({isShowClear:true})" name="cbday" value="<?php echo $cbday; ?>" /> - <input type="text" class="h-input" onFocus="WdatePicker({isShowClear:true})" name="ceday" value="<?php echo $ceday; ?>" /> 操作日期:<input type="text" class="h-input" onFocus="WdatePicker({isShowClear:true})" name="dbday" value="<?php echo $dbday; ?>" /> - <input type="text" class="h-input" onFocus="WdatePicker({isShowClear:true})" name="deday" value="<?php echo $deday; ?>" /> <input type="submit" value="筛选" class="formbutton" style="padding:1px 6px;"/></p> </form> </div> <div class="sect"> <table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table"> <tr><td colspan="10"><?php echo $pagestring; ?></tr> <tr><th width="50">ID</th><th width="200">申请用户</th><th width="80">用户余额</th><th width="80">申请金额</th><th width="100" nowrap>申请时间</th><th width="100" nowrap>提现方式</th><th width="100" nowrap>实际支付</th><th width="50" nowrap>操作</th></tr> <?php if(is_array($applys)){foreach($applys AS $index=>$one) { ?> <tr <?php echo $index%2?'':'class="alt"'; ?> id="dialog-apply-id" aid="<?php echo $one['id']; ?>"> <td><?php echo $one['id']; ?></td> <td><a href="/ajax/manage.php?action=userview&id=<?php echo $one['user_id']; ?>" class="ajaxlink"><?php echo $users[$one['user_id']]['email']; ?><br/><?php echo $users[$one['user_id']]['username']; ?></a><?php if(Utility::IsMobile($users[$one['user_id']]['mobile'])){?> » <a href="/ajax/misc.php?action=sms&v=<?php echo $users[$one['user_id']]['mobile']; ?>" class="ajaxlink">短信</a><?php }?> </td> <td><?php echo moneyit($users[$one['user_id']]['money']); ?></td> <?php if($one['status']=='ask'){?><td style="color:#FF0000">- <?php echo moneyit($one['money']); ?></td><?php } else { ?><td>- <?php echo moneyit($one['money']); ?></td><?php }?> <td nowrap><?php echo date('Y-m-d H:i', $one['create_time']); ?></td> <td nowrap><?php echo $one['withdraw_direction']; ?></td> <td nowrap><?php echo $one['withdrawpay']; ?></td> <td class="op" nowrap><!--<input type="text" class="h-input" id="dialog-withdraw-content" name="content" value="<?php echo $one['content']; ?>" /><br /><input type="submit" value="审核通过" onclick="return X.manage.be();"/> <input type="submit" value="拒绝提现" onclick="return X.manage.no();"/>--> <?php if($one['status']=='ask'){?> <!--<a href="/ajax/apply.php?action=withdraw_be&id=<?php echo $one['id']; ?>" class="ajaxlink">审核通过</a>--><a href="/ajax/apply.php?action=withdraw_do&id=<?php echo $one['id']; ?>" class="ajaxlink" style="font-weight:bold; color:#FF0000;">处理</a> | <a href="/ajax/apply.php?action=withdraw_no&id=<?php echo $one['id']; ?>" class="ajaxlink">拒绝提现</a><br /><a href="/ajax/apply.php?action=apply_cancel_admin&id=<?php echo $one['id']; ?>" class="ajaxlink">代客取消</a> | <?php } else if($one['status']=='no') { ?><font color="#FF0000">拒绝提现</font> By:<?php echo $one['admin_name']; ?><br /><?php echo date('Y-m-d H:i', $one['done_time']); ?> <?php } else if($one['status']=='cancel') { ?>取消提现 By:<?php echo $one['admin_name']; ?><br /><?php echo date('Y-m-d H:i', $one['done_time']); ?> <?php } else if($one['status']=='be') { ?>审核通过 By:<?php echo $one['admin_name']; ?>(<?php echo $one['admin_id']; ?>)<br /><?php echo date('Y-m-d H:i', $one['done_time']); ?> <?php }?> <a href="/ajax/apply.php?action=withdraw_view&id=<?php echo $one['id']; ?>" class="ajaxlink">详情</a></td> </tr>
need_login(); if (is_post() && isset($_POST['giftpay'])) { if (!$_POST['from'] || !$_POST['to'] || !$_POST['amount']) { Session::Set('error', 'Please do not submit it untill finished.'); } $table = new Table('gift_card', $_POST); $table->code = Utility::GenSecret(8, 'mix'); $table->email = $_POST['gift_card']['delivery']['email_address']; $table->create_time = time(); $table->user_id = $login_user_id; $order_id = $table->Insert(array('user_id', 'from', 'to', 'message', 'amount', 'code', 'email', 'create_time', 'paytype')); if (!$order_id || !($order = Table::Fetch('gift_card', $order_id))) { die('404 Not Found'); } $randno = rand(1000, 9999); $total_money = moneyit($order['amount']); /* micdim: paypal support */ if ($order['paytype'] == 'paypal') { /* credit pay $credit = moneyit($order['origin'] - $total_money); if ($order['credit']!=$credit) { Table::UpdateCache('order', $order_id, array('credit'=>$credit,)); } end */ $_input_charset = 'utf-8'; //$service = 'create_direct_pay_by_user'; // what does it mean?? $partner = $INI['paypal']['mid']; $security_code = $INI['paypal']['sec']; $seller_acc = $INI['paypal']['acc']; $sign_type = 'MD5'; $out_trade_no = "paypal-{$order['id']}-{$randno}";
<?php include template("wap_header");?> <h2><a href="index.php">今日主推</a> | <a href="now.php">正在团购</a> | 往期团购</h2> <?php if(is_array($teams)){foreach($teams AS $team) { ?> <p><?php echo ++$index; ?>. <a href="team.php?id=<?php echo $team['id']; ?>"><?php echo $team['title']; ?></a></p> <p>现价:<?php echo $currency; ?><?php echo moneyit($team['team_price']); ?> , 原价:<?php echo $currency; ?><?php echo moneyit($team['market_price']); ?> , 折扣:<?php echo team_discount($team); ?>折 , 节省:<?php echo $currency; ?><?php echo moneyit($team['market_price']-$team['team_price']); ?></p> <p><a href="team.php?id=<?php echo $team['id']; ?>"><img src="<?php echo team_image($team['image'], true); ?>" width="200" height="120" /></a></p> <?php }}?> <?php echo $pagestring; ?> <?php include template("wap_footer");?>
<?php include template("header");?> <div class="layout"> <div class="team_main" style="overflow:hidden"> <div class="box-content"> <div class="dashboard" id="dashboard"><ul><?php echo current_account('/credit/score.php'); ?></ul> </div> <div class="left"> <div class="head-mymlt"> <h2></h2> <ul><?php echo current_credit_index('records'); ?></ul> </div> <div class="credit-title size14-black">当前的账户积分是:<strong class="size24-red"><?php echo moneyit($login_user['score']); ?></strong>分</div> <div class="sect" style="border: 1px solid #E5E5E5;"> <table id="order-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table"> <tr><th width="150" height="36" align="left" bgcolor="#F8F7F7" class="b-bottom"><div class="left-10px">兑换时间</div></th><th width="398" align="center" bgcolor="#F8F7F7" class="b-bottom">详情</th><th width="150" align="center" bgcolor="#F8F7F7" class="b-bottom">状态</th></tr> <?php if(is_array($credits)){foreach($credits AS $index=>$one) { ?> <tr <?php echo $index%2?'':'class="alt"'; ?>><td height="32" style="text-align:left;" class="b-bottom"><div class="left-10px"><?php echo date('Y-m-d H:i', $one['create_time']); ?></div></td><td align="left" class="b-bottom"><?php echo ZCredit::Explain($one); ?></td><td align="center" class="b-bottom"><?php if(($one['state']=='unpay')){?>未发货<?php } else { ?>已发货<?php }?></td></tr> <?php }}?> <tr><td colspan="4"><div class="fanye"><?php echo $pagestring; ?></div></td></tr> </table> </div> </div> <div class="right"> <?php include template("block_side_score");?> </div> </div> </div> </div>
</span><?php echo moneyit($one['origin']); ?> </td> <td><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['credit']); ?> </td> <td><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['origin'] - $one['credit']); ?> </td> </tr> <?php } } ?> <tr><td colspan="8"><?php echo $pagestring; ?> </tr> </table> </div> </div> <div class="box-bottom"></div>
?> /<?php echo $one['min_number']; ?> </td> <td nowrap><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['team_price']); ?> <br/><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['market_price']); ?> </td> <td class="op" nowrap><a href="/ajax/manage.php?action=teamdetail&id=<?php echo $one['id']; ?> " class="ajaxlink">详情</a>|<a href="/manage/team/edit.php?id=<?php echo $one['id']; ?> ">编辑</a>|<a href="/ajax/manage.php?action=teamremove&id=<?php echo $one['id']; ?> " class="ajaxlink" ask="确定删除本项目吗?" >删除</a><?php if (in_array($one['state'], array('success', 'soldout'))) { ?> |<a href="/manage/team/down.php?id=<?php
?> <tr <?php echo $index % 2 ? '' : 'class="alt"'; ?> > <td><?php echo $one['deal_id']; ?> </td> <td><?php echo moneyit($one['dealamount']); ?> </td> <td> <?php echo moneyit($one['value'] * $one['dealamount'] / 100); ?> </td> </tr> <?php } } ?> <tr><td colspan="6"><?php echo $pagestring; ?> </td></tr> </table> </div> </div>
<table class="deal-discount"> <tr> <th>原价</th> <th>团购价</th> <th>折扣</th> </tr> <tr> <td><?php echo $currency; echo moneyit($team['market_price']); ?> </td> <td><?php echo $currency; echo moneyit($team['team_price']); ?> </td> <td><?php echo team_discount($team); ?> </td> </tr> </table> <?php } ?> <?php if ($team['close_time']) { ?>
</span><?php echo moneyit($one['origin']); ?> </td> <td><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['credit']); ?> </td> <td><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['money']); ?> </td> <td><?php echo $option_delivery[$teams[$one['team_id']]['delivery']]; echo $one['express_no'] && $one['express_id'] ? 'Y' : ''; ?> </td> <td class="op" nowrap><a href="/ajax/manage.php?action=orderview&id=<?php echo $one['id']; ?> " class="ajaxlink">详情</a></td> </tr> <?php } }
function column_item_value($key, &$data, $column_info, $length) { $display_value = $data[$key]; if ($length != 0) { $display_value = substr($display_value, 0, $length); } if ($column_info[$key]['type'] == 'select') { $options = $column_info[$key]['options']; if (is_list($options)) { $options = array_to_map($options); } if ($options[$display_value]) { $display_value = $options[$display_value]; } } if ($column_info[$key]['link']) { $link = $column_info[$key]['link']; $link_type = $link['link_type']; $column = $link['column']; if (empty($column)) { $column = $key; } if ($link_type == 'school' || $link_type == 'project' || $link_type == 'user') { $html = "<a target='_blank' href='/{$link_type}/detail/" . $data[$column] . "'>" . $display_value . "</a>"; } if ($link_type == 'mail') { $html = "<a target='_blank' href='mailto:" . $display_value . "'>" . $display_value . "</a>"; } if ($link_type == 'website') { $html = "<a target='_blank' href='" . $data[$column] . "'>" . $display_value . "</a>"; } if ($link_type == 'weibo') { $weibo_link = $data['weibo_link']; $weibo_name = $data['weibo_name']; if ($weibo_link && $weibo_name) { $html = "<a target='_blank' href='" . $weibo_link . "'>" . $weibo_name . "</a>"; } } if ($link_type == 'tag') { $html = display_tag_string($data['id'], $data['tags']); } return $html; } else { if ($column_info[$key]['extra_type'] == 'money') { return moneyit($display_value); } return $display_value; } }
?> </td></tr> <tr><td><b>UserName: </b></td><td><?php echo $user['username']; ?> </td></tr> <tr><td><b>RealName: </b></td><td><?php echo $user['realname']; ?> </td></tr> <tr><td><b>HandPhone: </b></td><td><?php echo $user['mobile']; ?> </td></tr> <tr><td><b>Balance: </b></td><td><b><?php echo moneyit($user['money']); ?> </b> dollars</td></tr> <tr><td><b>PostCode: </b></td><td><?php echo $user['zipcode']; ?> </td></tr> <tr><td><b>Address: </b></td><td><?php echo $user['address']; ?> </td></tr> <tr><td><b>Register IP: </b></td><td><?php echo $user['ip']; ?> </td></tr> <tr><td colspan="2"><hr /></td></tr>
<td style="text-align:left;"><a class="deal-title" href="/team.php?id=<?php echo $one['team_id']; ?> " target="_blank"><?php echo $teams[$one['team_id']]['title']; ?> </a></td> <td><?php echo $one['quantity']; ?> </td> <td><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($one['origin']); ?> </td> <td><?php if ($one['state'] == 'pay') { ?> Have paid<?php } else { if ($one['state'] == 'unpay' && $one['service'] == 'cash') { ?> Pending<?php } else { if ($teams[$one['team_id']]['state'] != 'none') { ?> Is expired<?php } else {
<div class="pic"> <a href="/team.php?id=<?php echo $one['id']; ?>" title="<?php echo $one['title']; ?>" target="_blank"><img alt="点击查看详情" src="<?php echo team_image($one['image']); ?>" width="285" height="170" align="middle" /></a> </div> <h4><b class="mlt_zs_mh"><?php echo team_discount($one); ?>折</b> <a href="/team.php?id=<?php echo $one['id']; ?>" title="<?php echo $one['title']; ?>" target="_blank"><?php echo mb_strimwidth($one['title'],0,66,'...'); ?></a></h4> <div class="info" > <p class="detail"> <em <?php if($one['state']=='soldout'){?> class="price price-453E44 num" <?php } else if($one['close_time']) { ?> class="price price-453E44 num" <?php } else { ?> class="price price-D9008D num" <?php }?>><?php echo $currency; ?><?php echo moneyit($one['team_price']); ?></em> <span class="bypast">原价 <span class="num"><span><?php echo $currency; ?></span><?php echo moneyit($one['market_price']); ?></span></span> </p> <p class="total"> <?php if($one['state']=='soldout'){?> <span class="partner-buy-hs">卖光了</span> <?php } else if($one['close_time']) { ?> <span class="partner-buy-hs">结束了</span> <?php } else { ?> <a rel="nofollow" class="buy" hidefocus="true" target="_blank" href="/team.php?id=<?php echo $one['id']; ?>" >去看看</a> <?php }?><span style="color:#999"><strong class="m_hongse num"><?php echo $one['now_number']; ?></strong>人已购买</span></p> </div></li> <?php }?> <?php }}?> </ul> <div><?php echo $pagestring; ?></div> </div> <?php }?>
echo $one['title']; ?> "><img src="<?php echo team_image($one['image'], true); ?> " alt="<?php echo $one['title']; ?> " title="<?php echo $one['title']; ?> "> </a> <span style="display: inline;"><p >现价: <font class="su1"><?php echo $currency; echo moneyit($one['team_price']); ?> </font> 售出:<font class="su1"><?php echo $one['now_number']; ?> </font>件</p></span> </div> <?php } } ?> </li> </ul> </div> </div>
<div class="order-pay-credit"> <h3>您的余额</h3> <p>账户余额:<strong><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($login_user['money']); ?> </strong> <?php if (false == $credityes) { ?> ,您的余额不够完成本次付款,还需支付 <strong><span class="money"><?php echo $currency; ?> </span><?php echo moneyit($order['origin'] - $login_user['money']); ?> </strong>。<?php if ($creditonly) { ?> 请赶紧去<a href="/credit/charge.php">充值</a>。<?php } else { ?> 请选择支付方式:<?php } } else { ?> ,您的余额足够本次购买,请直接确认订单,完成付款。<?php } ?> </p>
<menu> <ul> <li class="current" gaevent="InnerLink|Click|touch/orders/list/paid" ><a href="myorder.php">已付款</a></li><!-- --><li gaevent="InnerLink|Click|touch/orders/list/unpaid" ><a href="myorder.php?s=unpay">待付款</a></li><!-- --><!-- --><li gaevent="InnerLink|Click|touch/orders/list/unpaid" ><a href="mycoupon.php">未消费</a></li><!-- --><!-- --><li gaevent="InnerLink|Click|touch/orders/list/unpaid" ><a href="mycoupon.php?s=consumed">已消费</a></li><!-- --> </ul> </menu> <div class="body"> <div id="orders-list"> <?php if(is_array($orders)){foreach($orders AS $index=>$one) { ?> <div class="order-box"> <a href="order.php?id=<?php echo $one['id']; ?>"><img src="<?php echo $INI['system']['imgprefix']; ?>/static/<?php echo $teams[$one['team_id']]['image']; ?>" width="122px" height="74px" /><?php if($teams[$one['team_id']]['team_jybt']){?> <?php echo $teams[$one['team_id']]['team_jybt']; ?> <br /> 订单号:<?php echo $one['id']; ?> <?php } else { ?> 订单号:<?php echo $one['id']; ?><?php }?> <ul><li>数量:<?php echo moneyit($one['quantity']); ?> 总价:<?php echo $currency; ?><?php echo moneyit($one['origin']); ?></li></ul><p class="c-submit c-small"><input type="submit" value="详情" /></p> </a></div> <?php }}?> </div> </div> <table><td><?php echo $pagestring; ?></td></tr></table> <?php include template("wap_footer");?>
echo $team['delivery'] == 'voucher' ? 'checked' : ''; ?> /> 商户券 <input type="radio" name="delivery" class="delivery" value='express' <?php echo $team['delivery'] == 'express' ? 'checked' : ''; ?> /> 快递</div> </div> <div id="express-zone-coupon" style="display:<?php echo $team['delivery'] == 'coupon' ? 'block' : 'none'; ?> ;"> <div class="field"> <label>消费返利</label> <input type="text" size="10" name="credit" id="team-create-credit" class="number" value="<?php echo moneyit($team['credit']); ?> " datatype="money" require="true" /> <span class="inputtip">消费<?php echo $INI['system']['couponname']; ?> 时,获得账户余额返利,单位CNY元</span> </div> </div> <div id="express-zone-pickup" style="display:<?php echo $team['delivery'] == 'pickup' ? 'block' : 'none'; ?> ;"> <div class="field"> <label>联系电话</label> <input type="text" size="10" name="mobile" id="team-create-mobile" class="f-input" value="<?php
<?php require_once dirname(dirname(dirname(__FILE__))) . '/app.php'; /* 平台商密钥 */ $key = $INI['tenpay']['sec']; /* 创建支付应答对象 */ $resHandler = new MediPayResponseHandler(); $resHandler->setKey($key); //判断签名 if ($resHandler->isTenpaySign()) { //商家订单号 $v_oid = $resHandler->getParameter("mch_vno"); @(list($_, $order_id, $city_id, $_) = explode('-', $v_oid, 4)); //金额,以分为单位 $v_amount = moneyit($resHandler->getParameter("total_fee") * 0.01); //返回码 $retcode = $resHandler->getParameter("retcode"); //状态 $status = $resHandler->getParameter("status"); //返回码判断 if ("0" == $retcode) { $order = Table::Fetch('order', $order_id); if ($order['state'] == 'pay') { Session::Set('notice', "购买成功!"); } } else { Session::Set('notice', "支付失败!"); } } redirect(WEB_ROOT . "/order/pay.php?id={$order_id}");
if (option_yes('citypartner') && ($cid = abs(intval($city['id'])))) { $condition['city_id'] = $cid; } $count = Table::Count('partner', $condition); list($pagesize, $offset, $pagestring) = pagestring($count, 10); $partners = DB::LimitQuery('partner', array('condition' => $condition, 'order' => 'ORDER BY head DESC, id DESC', 'size' => $pagesize, 'offset' => $offset)); foreach ($partners as $id => $one) { team_state($one); if ($one['state'] == 'none') { $one['picclass'] = 'isopen'; } if ($one['state'] == 'soldout') { $one['picclass'] = 'soldout'; } $one['comment_num'] = $one['comment_good'] + $one['comment_bad'] + $one['comment_none']; $one['reputation'] = $one['comment_num'] > 0 ? moneyit(number_format(100 * ($one['comment_good'] / $one['comment_num']), 2)) : null; $partners[$id] = $one; } /* now_comments */ $now_cc = array('state' => 'pay', 'comment_display' => 'Y', 'comment_time > 0', 'partner_id > 0'); $now_comments = DB::LimitQuery('order', array('condition' => $now_cc, 'order' => 'ORDER BY comment_time DESC')); foreach ($now_comments as $k => $v) { $v['grade'] = 'A'; $v['grade'] = $v['comment_grade'] == 'none' ? 'P' : $v['grade']; $v['grade'] = $v['comment_grade'] == 'bad' ? 'F' : $v['grade']; $v['comment'] = htmlspecialchars($v['comment_content']); $v['timespan'] = $daytime - $v['comment_time']; $now_comments[$k] = $v; } $partner_ids = Utility::GetColumn($now_comments, 'partner_id'); $cpartners = Table::Fetch('partner', $partner_ids);