本文整理汇总了PHP中formatMoney函数 的典型用法代码示例。如果您正苦于以下问题:PHP formatMoney函数的具体用法?PHP formatMoney怎么用?PHP formatMoney使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatMoney函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: onUse
function onUse()
{
global $db_prefix, $context, $item_info;
// If an amount was not defined by the admin, assume defaults
if (!isset($item_info[1]) || $item_info[1] == '') {
$item_info[1] = -190;
}
if (!isset($item_info[2]) || $item_info[2] == '') {
$item_info[2] = 190;
}
$amount = mt_rand($item_info[1], $item_info[2]);
// Did we lose money?
if ($amount < 0) {
$result = db_query("\n\t\t\t\tSELECT money\n\t\t\t\tFROM {$db_prefix}members\n\t\t\t\tWHERE ID_MEMBER = {$context[user][id]}", __FILE__, __LINE__);
$row = mysql_fetch_assoc($result);
$amountLoss = abs($amount);
// If the user has enough money to pay for it out of his/her pocket
if ($row['money'] > $amountLoss) {
updateMemberData($context['user']['id'], array('money' => 'money - ' . $amountLoss));
return 'You lost ' . formatMoney($amountLoss) . '!';
} else {
updateMemberData($context['user']['id'], array('memberBank' => 'moneyBank - ' . $amountLoss));
return 'You lost ' . formatMoney($amountLoss) . '!<br /><br />You didn\'t have enough money in your pocket, so the money was taken from your bank! :(';
}
} else {
updateMemberData($context['user']['id'], array('money' => 'money + ' . $amount));
return 'You got ' . formatMoney($amount) . '!';
}
}
开发者ID:VBGAMER45, 项目名称:SMFMods, 代码行数:29, 代码来源:RandomMoney.php
示例2: panel_topten_bank
function panel_topten_bank()
{
//Top ten . gives top ten bank members
$topbankq = dbquery("SELECT g.owner_id, g.bank, u.user_name as owner_name\n\t\tFROM " . DB_UG3 . " g\n\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\tORDER BY g.bank DESC, owner_name ASC\n\t\tLIMIT 10");
$content = "";
while ($topbank = dbarray($topbankq)) {
$content .= goldmod_user($topbank['owner_id'], $topbank['owner_name']) . " - " . formatMoney($topbank['bank']) . "<br />";
}
return $content;
}
开发者ID:simplyianm, 项目名称:clububer, 代码行数:10, 代码来源:panels.inc.php
示例3: sendTransactionEmail
function sendTransactionEmail($transid, $emailtemplate, $testonly = false)
{
//exit($transid . " " . $emailtemplate);
dieLog("SHOULD NOT BE USED!");
$transactionInfo = getTransactionInfo($transid);
$data = array();
switch ($emailtemplate) {
case "customer_rebill_decline_confirmation":
case "customer_expire_confirmation":
$data['site_URL'] = $transactionInfo['cs_URL'];
$data['process_msg'] = $transactionInfo['td_process_msg'];
$data['reference_number'] = $transactionInfo['reference_number'];
$data['full_name'] = $transactionInfo['surname'] . ", " . $transactionInfo['name'];
$data['customer_email'] = $transactionInfo['email'];
$data['amount'] = "\$" . formatMoney($transactionInfo['amount'] - $transactionInfo['td_customer_fee']) . " USD";
$data['customer_fee'] = "\$" . formatMoney($transactionInfo['td_customer_fee']) . " USD";
$data['final_amount'] = "\$" . formatMoney($transactionInfo['amount']) . " USD";
$data['transaction_date'] = date("F j, Y", strtotime($transactionInfo['transactionDate']));
$data['customer_support_email'] = $transactionInfo['cs_support_email'];
$data['password'] = $transactionInfo['td_password'];
$data['payment_schedule'] = $transactionInfo['payment_schedule'];
$data["gateway_select"] = $transactionInfo['gateway_id'];
$sendto['email'][] = array("email" => $transactionInfo['email']);
break;
case "customer_cancel_confirmation":
$data['site_URL'] = $transactionInfo['cs_URL'];
$data['reference_number'] = $transactionInfo['reference_number'];
$data['full_name'] = $transactionInfo['name'] . " " . $transactionInfo['surname'];
$data['cancel_reference_number'] = $transactionInfo['cancel_refer_num'];
$data["gateway_select"] = $transactionInfo['gateway_id'];
$sendto['email'][] = array("email" => $transactionInfo['email'], "copy" => "");
break;
case "customer_refund_confirmation":
$data['site_URL'] = $transactionInfo['cs_URL'];
$data['reference_number'] = $transactionInfo['reference_number'];
$data['full_name'] = $transactionInfo['name'] . " " . $transInfo['surname'];
$data['cancel_reference_number'] = $transactionInfo['cancel_refer_num'];
$data["gateway_select"] = $transactionInfo['gateway_id'];
$sendto['email'][] = array("email" => $transactionInfo['email'], "copy" => "");
$sendto['email'][] = array("email" => $bankInfo['bank_email'], "copy" => "( Bank Copy )");
break;
}
if ($transactionInfo['cd_recieve_order_confirmations']) {
$sendto['email'][] = array("email" => $transactionInfo['cd_recieve_order_confirmations'], "copy" => "( Merchant Copy )");
}
//$sendto['email'][] = array("email" => "[email protected] ", "copy" => "( Merchant Copy )");
foreach ($sendto['email'] as $email) {
$data['email'] = $email['email'];
if (!$testonly) {
send_email_template($emailtemplate, $data, $email['copy']);
}
// Send Customer Email.
}
}
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:54, 代码来源:email.php
示例4: render_shop
function render_shop($field, $table, $conditions, $sortQuery, $sortDirQuery, $rowstart)
{
global $aidlink, $locale, $settings, $golddata, $_REQUEST, $_POST, $_GET;
echo "<table width='100%'>\n<tr valign='top' class='tbl1'>\n";
echo "<td><strong>" . $locale['urg_shop_115'] . "</strong></td>\n";
echo "<td><strong>" . $locale['urg_shop_110'] . "</strong></td>\n";
echo "<td style='width: 18%;'><strong>" . $locale['urg_shop_116'] . "</strong></td>\n";
echo "</tr>\n";
$i = 0;
$result = dbquery("SELECT {$field} FROM {$table} WHERE {$conditions} ORDER BY {$sortQuery} {$sortDirQuery}");
$rows = dbrows($result);
if ($rows != 0) {
while ($row = dbarray($result)) {
if ($i % 2 == 0) {
$alternating = "tbl2";
} else {
$alternating = "tbl1";
}
echo "<tr valign='top' class='" . $alternating . "'>\n";
echo "<td><img border='0' width='" . UGLD_IMAGE_WIDTH . "' height='" . UGLD_IMAGE_HEIGHT . "' src='images/item_images/" . $row['image'] . "' title='" . $row['name'] . "' alt='" . $row['name'] . "' border='0' /></td>\n";
echo "<td>" . $row['description'] . "</td>\n";
echo "<td style='width: 18%;'>" . $locale['urg_shop_109'] . " " . formatMoney($row['cost']) . "<br />" . $locale['urg_shop_117'] . " " . $row['stock'] . "<br />\n";
if ($golddata['cash'] >= $row['cost']) {
echo "<a href='index.php?op=shop_finalise&id=" . $row['id'] . "'>" . $locale['urg_shop_119'] . "</a>\n";
} elseif ($row['stock'] == 0) {
echo "<strong>" . $locale['urg_shop_120'] . "</strong>\n";
} else {
echo "<strong>" . sprintf($locale['urg_shop_121'] . " %s", formatMoney($row['cost'] - $golddata['cash'])) . "</strong>\n";
}
echo "</td>\n";
echo "</tr>\n";
$i++;
}
} else {
echo "<tr><td colspan='3'>" . $locale['urg_shop_120'] . "</td></tr>\n";
}
echo "</table>\n";
}
开发者ID:simplyianm, 项目名称:clububer, 代码行数:38, 代码来源:template.php
示例5: get_merchant_quick_status
function get_merchant_quick_status($id)
{
$sql = "SELECT cd.userId, companyname, \n\t\tsum( amount*(status='A') ) AS Sales, \n\t\tsum( amount*(status='A' AND transactionDate > now() - interval 1 DAY)) AS Sales_Today, \n\t\tsum( amount*(status='A' AND transactionDate > now() - interval cd_payperiod DAY)) AS Sales_ThisPeriod, \n\t\tsum( amount*(status='A' AND transactionDate between now() - interval cd_payperiod*2 DAY AND now() - interval cd_payperiod DAY )) AS Sales_LastPeriod, \n\t\tsum( amount*(status='A' AND transactionDate between now() - interval cd_payperiod*3 DAY AND now() - interval cd_payperiod*2 DAY )) AS Sales_Last2Period, \n\t\tsum( amount ) AS Total, \n\t\tcount(*) AS Total_Cnt,\n\t\tsum( amount*(cancelstatus='Y') ) AS Refunds, \n\t\tmax( `transactionDate` ) AS last_transaction, \n\t\tmin( `transactionDate` ) AS first_transaction, \n\t\t(UNIX_TIMESTAMP( max( `transactionDate` ) ) - UNIX_TIMESTAMP( min( `transactionDate` ) )) / ( 24 *60 *60 )+1 AS Days_Processing\n\t\t\n\t\tFROM `cs_companydetails` AS cd\n\t\tLEFT JOIN `cs_transactiondetails` AS td ON td.`userId` = cd.`userId`\n\t\twhere cd.`userId` = '{$id}'\n\t\tGROUP BY cd.`userId`\n\t\tLIMIT 1";
$result = mysql_query($sql) or dieLog(mysql_errno() . ": " . mysql_error() . " ~ {$sql}");
$list = mysql_fetch_assoc($result);
$score = array();
$score['actual'] = 0;
$score['possible'] = 0;
$score['summmary'] = "Score Summary:\n";
// Is processing?
if ($list['Total_Cnt'] && $list['Days_Processing'] > 0) {
$avg = $list['Total'] / $list['Days_Processing'];
if ($avg > 0) {
$cur_score = $list['Sales_Today'] / $avg;
$score['summmary'] .= "Today Company is processing at %" . formatMoney($cur_score * 100) . " of Daily Average.\n";
if ($cur_score > 1) {
$cur_score = 1;
}
$score['possible'] += 30;
$score['actual'] += intval(30 * $cur_score);
}
$tot = $list['Sales_ThisPeriod'] + $list['Sales_LastPeriod'] + $list['Sales_Last2Period'];
if ($tot) {
$cur_score = $list['Sales_ThisPeriod'] * 3 / ($list['Sales_ThisPeriod'] + $list['Sales_LastPeriod'] + $list['Sales_Last2Period']);
$score['summmary'] .= "For This Sales Period, Company is processing at %" . formatMoney($cur_score * 100) . " of 3 Period Average.\n";
if ($cur_score > 1) {
$cur_score = 1;
}
$score['possible'] += 50;
$score['actual'] += intval(50 * $cur_score);
}
}
$score['percent'] = 0;
if ($score['possible']) {
$score['percent'] = 100 * formatMoney($score['actual'] / $score['possible']);
}
return $score;
}
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:38, 代码来源:report.php
示例6: user_inventory_start
function user_inventory_start()
{
//Entry Screen Includes list of current items
global $userdata, $locale, $settings, $golddata;
table_top($locale['urg_user_100']);
echo "<table width='100%' cellpadding='5' cellspacing='0' border='0'>\n<tr valign='top' class='tbl1'>\n";
echo "<td width='32px'><strong>" . $locale['urg_user_104'] . "</strong></td>\n";
echo "<td><strong>" . $locale['urg_user_105'] . "</strong></td>\n";
echo "<td><strong>" . $locale['urg_user_106'] . "</strong></td>\n";
echo "<td width='18%'><strong>" . $locale['urg_user_107'] . "</strong></td>\n";
echo "</tr>\n";
$i = 0;
//color
$result = dbquery("SELECT it.name, it.description, it.purchase, it.cost, it.image, it.active, inv.amtpaid, inv.id, inv.trading, inv.tradecost \n\tFROM " . DB_UG3_INVENTORY . " AS inv, " . DB_UG3_USAGE . " AS it WHERE inv.ownerid = " . $userdata['user_id'] . " \n\tAND inv.itemid = it.id ORDER BY it.name ASC");
while ($row = dbarray($result)) {
if ($i % 2 == 0) {
$alternating = "tbl2";
} else {
$alternating = "tbl1";
}
echo "<tr valign='top' class='" . $alternating . "'>\n";
echo "<td><img style='border: 0; width: " . UGLD_IMAGE_WIDTH . "; height: " . UGLD_IMAGE_HEIGHT . ";' src='images/item_images/" . $row['image'] . "' title='" . $row['name'] . "' alt='" . $row['name'] . "' /></td>\n";
echo "<td style='padding-bottom: 2px; width: 20%;'>" . $row['name'] . "</td>\n";
echo "<td>" . $row['description'] . "</td>\n";
echo "<td width='18%'>" . $locale['urg_user_107'] . ": " . formatMoney($row['amtpaid']) . "<br />\n";
echo "<form action='index.php' method='post'>\n";
$startTrade = "<br />\n\t\t<input type='hidden' name='op' value='trade_sell' />\n\t\t<input type='hidden' name='id' value='" . $row['id'] . "' />\n\t\t<input type='submit' value='" . $locale['urg_user_108'] . "' class='button' />";
$endTrade = "<i>" . sprintf("Trading for %s", formatMoney($row['tradecost'])) . "</i><br />\n\t\t<input type='hidden' name='op' value='trade_stop' />\n\t\t<input type='hidden' name='id' value='" . $row['id'] . "' />\n\t\t<input type='submit' value='" . $locale['urg_user_109'] . "' class='button' />";
if ('UGLD_ALLOWTRADE') {
echo "" . ($row['trading'] == 1 ? $endTrade : $startTrade) . "";
}
echo "</form>\n</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
closetable();
}
开发者ID:simplyianm, 项目名称:clububer, 代码行数:37, 代码来源:user.inc.php
示例7: formatMoney
?>
</td>
<td class="centered"><?php
echo $credit['dueDate'];
?>
</td>
<td class="rightAligned"><?php
echo formatMoney($credit['totalPrice']);
?>
</td>
<td class="rightAligned"><?php
echo formatMoney($credit['totalAmountPaid']);
?>
</td>
<td class="rightAligned"><?php
echo formatMoney($credit['totalPrice'] - $credit['totalAmountPaid']);
?>
</td>
<td class="centered">
<?php
if ($credit['isFullyPaid'] == 0) {
?>
<a href="/credit/creditpaymentform/<?php
echo $credit['salesTransactionId'];
?>
"><img src="/public/images/icons/money_add.png" title="add payment"/></a>
<?php
} else {
?>
<span class="fullyPaid">fully paid</span>
<?php
开发者ID:noikiy, 项目名称:vis, 代码行数:31, 代码来源:listcredits.php
示例8: viewmember
function viewmember()
{
// view the members inventory
global $locale, $aidlink;
$searchfor = stripinput($_POST['searchfor']);
opentable(sprintf($locale['urg_a_inventry_104'], $searchfor), '');
$id_searchq = dbquery("SELECT user_id \n\tFROM " . DB_USERS . " WHERE user_name = '" . $searchfor . "'");
$id_searchr = dbarray($id_searchq);
$id_search = $id_searchr['user_id'];
if ($id_searchr == 0) {
$context['shop_inventory_search'] = 2;
echo sprintf($locale['urg_a_inventry_105'], $searchfor);
} else {
echo "<br /><strong>Owns</strong><br />\n";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n<tr valign='top' class='tbl1'>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_106'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_107'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_108'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_109'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_110'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_111'] . "</strong></td>\n";
echo "</tr>\n";
$i = 0;
//color
$OwnedResult = dbquery("SELECT it.name, it.description, it.purchase, it.cost, it.image, it.active, inv.amtpaid, inv.id, inv.trading, inv.tradecost \n\t\tFROM " . DB_UG3_INVENTORY . " AS inv, " . DB_UG3_USAGE . " AS it WHERE inv.ownerid = '" . $id_search . "' \n\t\tAND inv.itemid = it.id ORDER BY it.name ASC");
while ($OwnedRow = dbarray($OwnedResult)) {
if ($i % 2 == 0) {
$OwnedAlternating = "tbl2";
} else {
$OwnedAlternating = "tbl1";
}
echo "<tr valign='top' class='" . $OwnedAlternating . "'>\n";
echo "<td align='center'><img border='0' width='" . UGLD_IMAGE_WIDTH . "' height='" . UGLD_IMAGE_HEIGHT . "' src='../images/item_images/" . $OwnedRow['image'] . "' /></td>\n";
echo "<td style='padding: 2px;'>" . $OwnedRow['name'] . "</td>\n";
echo "<td style='padding: 2px;'>" . $OwnedRow['description'] . "</td>\n";
echo "<td style='padding: 2px;'>" . formatMoney($OwnedRow['amtpaid']) . "</td>\n";
echo "<td style='padding: 2px;' align='center'>\n";
if ($OwnedRow['trading'] == "1") {
echo $locale['urg_a_inventry_112'] . "</td>\n";
} else {
echo $locale['urg_a_inventry_113'] . "</td>\n";
}
echo "<td align='center' style='padding: 2px;'>\n";
echo "<a href='index.php" . $aidlink . "&op=admin_sell&id=" . $OwnedRow['id'] . "&username=" . $searchfor . "&userid=" . $id_search . "&amtpaid=" . $OwnedRow['amtpaid'] . "'>\n";
echo $locale['urg_a_inventry_114'] . "</a></td></tr>\n";
$i++;
}
echo "</table>\n";
echo "<br /><hr /><br /><strong>" . $locale['urg_a_inventry_116'] . "</strong><br />\n";
$AvailResult = dbquery("SELECT name, description, cost, image, active \n\t\tFROM " . DB_UG3_USAGE . " WHERE purchase > 1 \n\t\tAND id NOT IN (SELECT itemid FROM " . DB_UG3_INVENTORY . " WHERE ownerid = '" . $id_search . "') \n\t\tORDER BY name ASC");
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n<tr valign='top' class='tbl1'>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_106'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_107'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_108'] . "</strong></td>\n";
echo "<td style='padding: 2px;'><strong>" . $locale['urg_a_inventry_115'] . "</strong></td>\n";
echo "</tr>\n";
$j = 0;
//color
while ($AvailRow = dbarray($AvailResult)) {
if ($j % 2 == 0) {
$AvailAlternating = "tbl2";
} else {
$AvailAlternating = "tbl1";
}
echo "<tr valign='top' class='" . $AvailAlternating . "'>\n";
echo "<td align='center'><img border='0' width='" . UGLD_IMAGE_WIDTH . "' height='" . UGLD_IMAGE_HEIGHT . "' src='../images/item_images/" . $AvailRow['image'] . "' alt='' /></td>\n";
echo "<td style='padding: 2px;'>" . $AvailRow['name'] . "</td>\n";
echo "<td style='padding: 2px;'>" . $AvailRow['description'] . "</td>\n";
echo "<td style='padding: 2px;'>" . formatMoney($AvailRow['cost']) . "</td>\n";
echo "</tr>\n";
$j++;
}
echo "</table>\n";
$EditResult = dbquery("SELECT * FROM " . DB_UG3 . " WHERE owner_id = '" . $id_search . "' LIMIT 1");
$EditRow = dbarray($EditResult);
if ($EditRow == 0) {
//If this member doesn't exist
echo sprintf($locale['urg_a_inventry_105'], $searchfor);
} else {
echo "<br /><hr /><br /><strong>" . $locale['urg_a_inventry_117'] . "</strong><br />\n";
echo "<form action='index.php" . $aidlink . "&op=admineditmoney' method='post'>\n";
echo "<input type='hidden' name='userid' value='" . $EditRow['owner_id'] . "' />\n";
echo "<input type='hidden' name='username' value='" . $searchfor . "' />\n";
echo "<table width='100%' border='0' cellspacing='3' cellpadding='3'>\n<tr>\n";
echo "<td>" . $locale['urg_a_inventry_118'] . "</td>\n";
echo "<td><input class='textbox' type='text' value='" . $EditRow['cash'] . "' name='money_pocket' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td>" . $locale['urg_a_inventry_119'] . "</td>\n";
echo "<td><input class='textbox' type='text' value='" . $EditRow['bank'] . "' name='money_bank' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td>" . $locale['urg_a_inventry_120'] . "</td>\n";
echo "<td><input class='textbox' type='text' value='" . $EditRow['chips'] . "' name='chips' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td>" . $locale['urg_a_inventry_121'] . "</td>\n";
echo "<td><input class='textbox' type='text' value='" . $EditRow['karma'] . "' name='karma' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td>" . $locale['urg_a_inventry_122'] . "</td>\n";
echo "<td><input class='textbox' type='text' value='" . $EditRow['ribbon'] . "' name='ribbon' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td></td>\n";
//.........这里部分代码省略.........
开发者ID:simplyianm, 项目名称:clububer, 代码行数:101, 代码来源:inventry.php
示例9: formatMoney
</tr>
<tr>
<td><span class="cl1"><font face="verdana" size="1"><strong>T<font face="verdana" size="1"><strong>ransaction fee <font face="verdana" size="1"><strong>(USD)</strong></font></strong></font></strong></font></span></td>
<td><span class="cl1">
<input name="cc_total_trans_fees" type="text" disabled id="cc_total_trans_fees" style="border:0; color:#000000; background-color:#FFFFFF; text-align:right;" value="<?php
echo formatMoney($companyInfo['cc_total_trans_fees']);
?>
" size="3" maxlength="5">
</span></td>
<td align="left" valign="center" class="cl1"><input type="text" maxlength="5" name="cc_reseller_trans_fees" id="cc_reseller_trans_fees" value="<?php
echo formatMoney($companyInfo['cc_reseller_trans_fees']);
?>
" onChange="addRatesFees();" ></td>
<td><span class="cl1">
<input name="cc_merchant_trans_fees" type="text" disabled id="cc_merchant_trans_fees" style="border:0; color:#000000; background-color:#FFFFFF; text-align:right;" value="<?php
echo formatMoney($companyInfo['cc_merchant_trans_fees']);
?>
" size="3">
</span></td>
</tr>
<tr>
<td height="50" align="center" valign="middle" colspan="4"><p>
<input type="image" src="../images/submit.jpg">
</p>
<p><font size="-1">*Please Update the Merchant's rates with this form. <?php
echo $_SESSION["gw_title"];
?>
's rate + Your Marked up rate = Merchant's Final Rate. </font></p></td>
</tr>
</table>
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:30, 代码来源:requestMarkup.php
示例10: getRebillInfo
function getRebillInfo($rd_subaccount, $time, $is_trial)
{
global $cnn_cs;
$sql = "SELECT * FROM `cs_rebillingdetails` WHERE `rd_subaccount` = '{$rd_subaccount}'";
$result = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<BR>{$sql}<BR>");
if (!mysql_num_rows($result)) {
return -1;
}
$subAcc = mysql_fetch_assoc($result);
$subAccountName = $subAcc['rd_subName'];
$schedule = "";
$subAcc['chargeAmount'] = 0;
$subAcc['td_enable_rebill'] = 0;
$subAcc['td_one_time_subscription'] = 0;
if (!$subAcc['rd_initial_amount'] || !$is_trial) {
if ($subAcc['recur_day'] > 1 && $subAcc['recur_charge']) {
$subAcc['td_enable_rebill'] = 1;
$nextRecurDate = time() + 60 * 60 * 24 * $subAcc['recur_day'];
$nextDateInfo = date("F j, Y", $nextRecurDate) . " for \$" . formatMoney($subAcc['recur_charge']);
$schedule = "Recurring Payments of \$" . formatMoney($subAcc['recur_charge']) . " once every " . $subAcc['recur_day'] . " day(s)";
$subAcc['chargeAmount'] = $subAcc['recur_charge'];
} else {
$subAcc['td_enable_rebill'] = -1;
$schedule = "No Payment Schedule";
$nextDateInfo = "No Recuring Payments";
$nextRecurDate = -1;
$subAcc['rd_subName'] = "Independent Pricing";
}
} else {
$nextRecurDate = time() + 60 * 60 * 24 * $subAcc['rd_trial_days'];
$schedule = "One Time Charge of \$" . formatMoney($subAcc['rd_initial_amount']);
$subAcc['chargeAmount'] = $subAcc['rd_initial_amount'];
if ($subAcc['recur_day'] && $subAcc['recur_charge']) {
$subAcc['td_enable_rebill'] = 1;
$nextDateInfo = date("F j, Y", $nextRecurDate) . " for \$" . formatMoney($subAcc['recur_charge']);
$schedule .= ",\n and then every (" . $subAcc['recur_day'] . ") days for \$" . formatMoney($subAcc['recur_charge']);
} else {
$subAcc['td_enable_rebill'] = 0;
$subAcc['td_one_time_subscription'] = 1;
$nextDateInfo = $schedule;
}
}
if ($nextRecurDate != -1) {
$subAcc['td_recur_next_date'] = date("Y-m-d", $nextRecurDate);
}
$subAcc['nextDateInfo'] = $nextDateInfo;
$subAcc['nextRecurDate'] = $nextRecurDate;
$subAcc['payment_schedule'] = $schedule;
return $subAcc;
}
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:50, 代码来源:transaction.php
示例11: formatMoney
if ($mi_pay_info['NewBalance'] !== NULL) {
?>
<tr>
<td class="infoBold">New Sales</td>
<td class="infoBold"><?php
echo $mi_pay_info['NewBalance'] == 0 ? "- None -" : formatMoney($mi_pay_info['NewBalance']);
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="infoBold">Balance</td>
<td class="infoBold"><?php
echo $invoiceDetails['mi_balance'] == 0 ? "- None -" : formatMoney($invoiceDetails['mi_balance']);
?>
</td>
</tr>
<?php
if ($_REQUEST['focus'] != 'projSet') {
?>
<tr height="25">
<td class="infoBold">Status</td>
<td class='<?php
echo $invoiceDetails['mi_status'];
?>
'><?php
echo $invoiceDetails['mi_status'];
?>
</td>
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:31, 代码来源:viewCompanyInvoice.php
示例12: funcSendMail
function funcSendMail($iCompanyId, $qryCondition, $cnn_cs, $iTemplatId)
{
//*********** Opening the mail template content ***********
$show_sql = "select template_content from cs_mailtemplate where template_id = " . $iTemplatId;
$file_content = funcGetValueByQuery($show_sql, $cnn_cs);
/* if(!($file = fopen("csv/mailtemplate.htm", "r")))
{
print("Can not open file");
exit();
}
$content = fread($file, filesize("csv/mailtemplate.htm"));
$content = explode("\r\n", $content);
fclose($file);
$file_content = "";
for($i=0;$i<count($content);$i++)
{
$file_content .= $content[$i];
} */
//************* ends here *********************************
$qry_email_template = "SELECT merchantName,tollFreeNumber,retrievalNumber,securityNumber,processor FROM cs_companydetails where userid =" . $iCompanyId;
if (!($rst_email_template = mysql_query($qry_email_template, $cnn_cs))) {
print "Can not execute query";
exit;
}
$str_merchant_name = "";
$str_toll_free_number = "";
$str_retrieval_number = "";
$str_security_number = "";
$str_processor = "";
if (mysql_num_rows($rst_email_template) > 0) {
$str_merchant_name = mysql_result($rst_email_template, 0, 0);
$str_toll_free_number = mysql_result($rst_email_template, 0, 1);
$str_retrieval_number = mysql_result($rst_email_template, 0, 2);
$str_security_number = mysql_result($rst_email_template, 0, 3);
$str_processor = mysql_result($rst_email_template, 0, 4);
}
$file_content = str_replace("[MerchantName]", $str_merchant_name . ",", $file_content);
$file_content = str_replace("[MerchantTollFreeNumber]", $str_toll_free_number, $file_content);
$file_content = str_replace("[RetrievalNumber]", $str_retrieval_number, $file_content);
$file_content = str_replace("[SecurityCode]", $str_security_number, $file_content);
$file_content = str_replace("[Processor]", $str_processor, $file_content);
$qrySelect = $qryCondition;
// print($qrySelect);
if (!($show_sql = mysql_query($qrySelect, $cnn_cs))) {
print "<br>";
print "Can not execute select query";
print "<br>";
exit;
}
for ($i_loop = 0; $i_loop < mysql_num_rows($show_sql); $i_loop++) {
$str_date_of_sale = mysql_result($show_sql, $i_loop, 0);
$str_date_of_sale = funcFormatDate($str_date_of_sale);
$str_customer_first_name = mysql_result($show_sql, $i_loop, 1);
$str_customer_last_name = mysql_result($show_sql, $i_loop, 2);
$str_curstomer_name = $str_customer_first_name . " " . $str_customer_last_name;
$charge_type = mysql_result($show_sql, $i_loop, 3);
if ($charge_type == "H") {
$charge_type = "credit card";
}
if ($charge_type == "C") {
$charge_type = "check";
}
$str_telephone = mysql_result($show_sql, $i_loop, 4);
$str_charge = mysql_result($show_sql, $i_loop, 5);
$str_voice_code = mysql_result($show_sql, $i_loop, 6);
$str_email_content = $file_content;
$str_email_content = str_replace("[Dateofsale]", $str_date_of_sale, $str_email_content);
$str_email_content = str_replace("[CustomerName]", $str_curstomer_name, $str_email_content);
$str_email_content = str_replace("[ChargeType]", $charge_type, $str_email_content);
$str_email_content = str_replace("[CustomerTelephoneNumber]", $str_telephone, $str_email_content);
$str_email_content = str_replace("[Charge]", formatMoney($str_charge), $str_email_content);
$str_email_content = str_replace("[VoiceCode]", $str_voice_code, $str_email_content);
print $str_email_content;
?>
<span style='font-size:12.0pt;font-family:"Times New Roman";mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA'><br clear=all style='mso-special-character:line-break;page-break-before:always'></span>
<?php
}
}
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:78, 代码来源:printemails.php
示例13: is_array
?>
" /> </span>
<span class="slvt" style="display:inline-block; height:10px; width:82px; margin:0px; text-align:right;"><span class="slv"><?php
echo is_array($_tmp = $this->_tpl_vars['invoiceData'][$this->_sections['i']['index']]['fSubVat']) ? $this->_run_mod_handler('formatMoney', true, $_tmp, true) : formatMoney($_tmp, true);
?>
</span></span>
<span class="slot" style="display:inline-block; height:10px; width:50px; margin:0px; text-align:right;display:none;"><span class="slo"><?php
echo is_array($_tmp = $this->_tpl_vars['invoiceData'][$this->_sections['i']['index']]['fSubOtherTax']) ? $this->_run_mod_handler('toFixed', true, $_tmp, true) : toFixed($_tmp, true);
?>
</span></span>
<span class="slwt" style="display:inline-block; height:10px; width:82px; margin:0px; text-align:right;"><span class="slw"><?php
echo is_array($_tmp = $this->_tpl_vars['invoiceData'][$this->_sections['i']['index']]['fSubWHTax']) ? $this->_run_mod_handler('toFixed', true, $_tmp, true) : toFixed($_tmp, true);
?>
</span></span>
<span class="sltt" style="display:inline-block; height:10px; width:157px; margin:0px; text-align:right;"><span class="slf"><?php
echo is_array($_tmp = $this->_tpl_vars['invoiceData'][$this->_sections['i']['index']]['fSubTotal']) ? $this->_run_mod_handler('formatMoney', true, $_tmp, true) : formatMoney($_tmp, true);
?>
</span></span>
<!---->
</div>
</div>
<?php
}
?>
<div> </div>
<?php
}
} else {
?>
<div id="nli" align="center"><br /><b><?php
echo $this->_tpl_vars['LBL_NO_LINE_ITEMS'];
开发者ID:nstungxd, 项目名称:F2CA5, 代码行数:31, 代码来源:%%-58^%%-582381766^invoiceviewitems.tpl.php
示例14: callrates
if (isset($_REQUEST['use_callrates']) && $_REQUEST['use_callrates'] == 'true') {
$rates = callrates($row['dst'], $row['billsec'], $callrate_csv_file);
$rate_total += $rates[4];
formatMoney($rates[4]);
echo "<td>" . htmlspecialchars($rates[2]) . "</td>\n";
}
echo " <td></td>\n";
echo " <td></td>\n";
echo " </tr>\n";
}
} catch (PDOException $e) {
print $e->getMessage();
}
if (isset($_REQUEST['use_callrates']) && $_REQUEST['use_callrates'] == 'true') {
echo "<tr><td colspan='{$total_rows}' align='right'>Total: </td>";
formatMoney($rate_total);
echo "</b></td></tr>\n";
}
echo "</table>";
$sth = NULL;
}
}
?>
<!-- Display Call Usage Graph -->
<?php
echo '<a id="Graph"></a>';
//NEW GRAPHS
$group_by_field = $group;
// ConcurrentCalls
$group_by_field_php = array('', 32, '');
开发者ID:kosenka, 项目名称:asterisk-cdr-viewer, 代码行数:31, 代码来源:index.php
示例15: currencyformat
function currencyformat($val)
{
return '$' . formatMoney($val);
}
开发者ID:juliogallardo1326, 项目名称:proc, 代码行数:4, 代码来源:quickstats2.php
示例16: zget
?>
<tr class='text-center'>
<td><?php
echo $contract->id;
?>
</td>
<td><?php
echo $contract->code;
?>
</td>
<td class='text-left actions'><?php
echo html::a($this->createLink('crm.contract', 'view', "id={$contract->id}"), $contract->name);
?>
</td>
<td class='text-right'><?php
echo zget($currencySign, $contract->currency, '') . formatMoney($contract->amount);
?>
</td>
<td class='visible-lg'><?php
echo substr($contract->createdDate, 0, 10);
?>
</td>
<td><?php
echo substr($contract->begin, 0, 10);
?>
</td>
<td><?php
echo substr($contract->end, 0, 10);
?>
</td>
<td><?php
开发者ID:leowh, 项目名称:colla, 代码行数:31, 代码来源:contract.html.php
示例17: formatMoney
?>
<?php
if (count($otherExpenses) == 0) {
?>
<tr>
<td colspan="5">No other expenses for this date.</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div id="totalContainer">
<strong>Total Expenses: </strong>₱ <?php
echo formatMoney($total);
?>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#datepicker").datepicker({
dateFormat: 'yy-mm-dd',
onSelect: function(dateText, inst) {
document.location = '/expense/dailyexpense/' + dateText;
}
});
});
</script>
开发者ID:noikiy, 项目名称:vis, 代码行数:31, 代码来源:dailyexpense.php
unicodeveloper/laravel-hackathon-starter: A hackathon/MVP boilerplate for larave
阅读:1730| 2022-08-12
solegalli/feature-selection-for-machine-learning: Code repository for the online
阅读:945| 2022-08-18
win7系统电脑使用过程中有不少朋友表示遇到过win7系统重装系统初始设置的状况,当出现
阅读:874| 2022-11-06
%分解%regexps='ab/c/d.png'file_name=regexp(s,'/','split');%'d.png'%splitfraction
阅读:580| 2022-07-18
hchunhui/librime-lua: Extending RIME with Lua scripts
阅读:462| 2022-08-16
Vulnerability of pointers being incorrectly used during data transmission in the
阅读:721| 2022-07-29
tboronczyk/localization-middleware: PSR-15 middleware to assist primarily with l
阅读:518| 2022-08-16
由于人们消费水平的提高,人们越来越多的追求美的享受,瓷砖美缝就是一种让瓷砖缝隙变
阅读:672| 2022-11-06
md-5/Bukkit-MinecraftServer: Bukkit's tools to make our custom normalized mi
阅读:591| 2022-08-17
jjg/agentalpha: Experimental mastodon bot
阅读:602| 2022-08-18
请发表评论