本文整理汇总了PHP中moneyit函数的典型用法代码示例。如果您正苦于以下问题:PHP moneyit函数的具体用法?PHP moneyit怎么用?PHP moneyit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了moneyit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CashIt
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);
}
示例2: moneyit
<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>
示例3: abs
<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 -->
示例4: option_category
$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);
示例5: team_state
<?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>
示例6: array
$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;
示例7: get_price
function get_price($team_price, $market_price)
{
return "团购价:¥" . moneyit($team_price) . "<br>原价:¥<lebel style='text-decoration:line-through'>" . moneyit($market_price) . "<label>";
}
示例8: json
}
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) {
示例9: moneyit
<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
示例10: moneyit
</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>
示例11: team_discount
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']);
}
示例12: if
<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>
示例13: need_login
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}";
示例14: template
<?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");?>
示例15: template
<?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>