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

PHP getRate函数代码示例

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

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



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

示例1: create_dummy

function create_dummy($deptid, $cusnum)
{
    # Get selected customer info
    db_connect();
    $sql = "SELECT * FROM customers WHERE cusnum = '{$cusnum}' AND div = '" . USER_DIV . "'";
    $custRslt = db_exec($sql) or errDie("Unable to get customer information");
    $cust = pg_fetch_array($custRslt);
    $curr = getSymbol($cust['fcid']);
    $xrate = getRate($cust['fcid']);
    $trans_date_setting = getCSetting("USE_TRANSACTION_DATE");
    if (isset($trans_date_setting) and $trans_date_setting == "yes") {
        $trans_date_value = getCSetting("TRANSACTION_DATE");
        $date_arr = explode("-", $trans_date_value);
        $date_year = $date_arr[0];
        $date_month = $date_arr[1];
        $date_day = $date_arr[2];
    } else {
        $date_year = date("Y");
        $date_month = date("m");
        $date_day = date("d");
    }
    $odate = "{$date_year}-{$date_month}-{$date_day}";
    db_connect();
    # Insert purchase to DB
    $sql = "\n\t\tINSERT INTO nons_invoices (\n\t\t\tcusname, cusaddr, cusvatno, chrgvat, fcid, currency, \n\t\t\txrate, odate, sdate, subtot, balance, vat, total, done, username, prd, invnum, typ, ctyp, \n\t\t\ttval, location, div\n\t\t) VALUES (\n\t\t\t'{$cust['cusname']} {$cust['surname']}', '{$cust['addr1']}', '{$cust['vatnum']}', 'yes', '{$cust['fcid']}', '{$curr['symbol']}', \n\t\t\t'{$xrate}', '{$odate}', CURRENT_DATE, 0, 0, 0, 0, 'n', '" . USER_NAME . "', '" . PRD_DB . "', 0, 'inv', 's', \n\t\t\t'{$cusnum}', 'int', '" . USER_DIV . "'\n\t\t)";
    $rslt = db_exec($sql) or errDie("Unable to create template Non-Stock Invoice.", SELF);
    # Get next ordnum
    $invid = lastinvid();
    return $invid;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:30,代码来源:nons-intinvoice-new.php


示例2: create_dummy

function create_dummy($deptid, $supid)
{
    # Get selected supplier  info
    db_connect();
    $sql = "SELECT * FROM suppliers WHERE supid = '{$supid}' AND div = '" . USER_DIV . "'";
    $supRslt = db_exec($sql) or errDie("Unable to get supplier  information");
    $sup = pg_fetch_array($supRslt);
    # Dummy Vars
    $remarks = "";
    $supaddr = "";
    $terms = "0";
    $total = 0;
    $subtot = 0;
    //	$pdate = date("Y-m-d");
    $ddate = date("Y-m-d");
    $shipchrg = "0.00";
    $fcid = $sup['fcid'];
    $curr = getSymbol($fcid);
    $xrate = getRate($fcid);
    $purnum = divlastid("pur", USER_DIV);
    $trans_date_setting = getCSetting("USE_TRANSACTION_DATE");
    if (isset($trans_date_setting) and $trans_date_setting == "yes") {
        $trans_date_value = getCSetting("TRANSACTION_DATE");
        $date_arr = explode("-", $trans_date_value);
        $date_year = $date_arr[0];
        $date_month = $date_arr[1];
        $date_day = $date_arr[2];
    } else {
        $date_year = date("Y");
        $date_month = date("m");
        $date_day = date("d");
    }
    $pdate = "{$date_year}-{$date_month}-{$date_day}";
    # Insert Order to DB
    $sql = "\n\t\tINSERT INTO nons_purch_int (\n\t\t\tdeptid, supid, supplier, supaddr, terms, pdate, ddate, shipchrg, xrate, fcid, \n\t\t\tcurr, subtot, total, balance, tax, remarks, received, done, prd, \n\t\t\tdiv, purnum\n\t\t) VALUES (\n\t\t\t'{$deptid}', '{$supid}', '',  '{$supaddr}', '{$terms}', '{$pdate}', '{$ddate}', '{$shipchrg}', '{$xrate}', '{$fcid}', \n\t\t\t'{$curr['symbol']}', '{$subtot}', '{$total}', '{$total}', '0', '{$remarks}', 'n', 'n', '" . PRD_DB . "', \n\t\t\t'" . USER_DIV . "', '{$purnum}'\n\t\t)";
    $rslt = db_exec($sql) or errDie("Unable to insert Non-Stock Order to Cubit.", SELF);
    # Get next ordnum
    $purid = pglib_lastid("nons_purch_int", "purid");
    return $purid;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:40,代码来源:nons-purch-int-new.php


示例3: getRate

</div>
</div>





<div class="row">
   <div class="col-md-12 col-sm-12">
      <div class="panel panel-default">
         <div class="panel-heading">
            My Accounts      
         </div>
         <div class="panel-body">
            <?php 
$rate = getRate($_SESSION['package_id']);
$q = mysql_query("SELECT * FROM tbl_cycle WHERE account_link='" . $_SESSION['accounts_id'] . "' AND cycle_count=1");
?>
            <div class="table-responsive">
               <table class="table table-striped table-bordered table-hover">
                  <thead>
                     <tr>
                        <th>Account #</th>
                        <th>Cycle 1</th>
                        <th>Cycle 2</th>
                        <th>Cycle 3</th>
                     </tr>
                  </thead>
                  <tbody>
                     <?php 
while ($row = mysql_fetch_array($q)) {
开发者ID:araranga,项目名称:mono,代码行数:31,代码来源:dashboard.php


示例4: tr

if ($moderator) {
    $HTMLOUT .= tr("{$lang['details_banned']}", $torrents["banned"]);
}
if ($torrents["nuked"] == "yes") {
    $HTMLOUT .= "<tr><td class='rowhead'><b>Nuked</b></td><td align='left'><img src='{$INSTALLER09['pic_base_url']}nuked.gif' alt='Nuked' title='Nuked' /></td></tr>\n";
}
if (!empty($torrents["nukereason"])) {
    $HTMLOUT .= "<tr><td class='rowhead'><b>Nuke-Reason</b></td><td align='left'>" . htmlsafechars($torrents["nukereason"]) . "</td></tr>\n";
}
$torrents['cat_name'] = htmlsafechars($change[$torrents['category']]['name']);
if (isset($torrents["cat_name"])) {
    $HTMLOUT .= tr("{$lang['details_type']}", htmlsafechars($torrents["cat_name"]));
} else {
    $HTMLOUT .= tr("{$lang['details_type']}", "None");
}
$HTMLOUT .= tr("Rating", getRate($id, "torrent"), 1);
$HTMLOUT .= tr("{$lang['details_last_seeder']}", "{$lang['details_last_activity']}" . get_date($l_a['lastseed'], '', 0, 1));
$HTMLOUT .= tr("{$lang['details_size']}", mksize($torrents["size"]) . " (" . number_format($torrents["size"]) . " {$lang['details_bytes']})");
$HTMLOUT .= tr("{$lang['details_added']}", get_date($torrents['added'], "{$lang['details_long']}"));
$HTMLOUT .= tr("{$lang['details_views']}", (int) $torrents["views"]);
$HTMLOUT .= tr("{$lang['details_hits']}", (int) $torrents["hits"]);
$XBT_Or_Default = XBT_TRACKER == true ? 'snatches_xbt.php?id=' : 'snatches.php?id=';
$HTMLOUT .= tr("{$lang['details_snatched']}", $torrents["times_completed"] > 0 ? "<a href='{$INSTALLER09["baseurl"]}/{$XBT_Or_Default}{$id}'>{$torrents['times_completed']} {$lang['details_times']}</a>" : "0 {$lang['details_times']}", 1);
$HTMLOUT .= "<tr><td class='rowhead'>Status update</td><td><input type='button' onclick='status_showbox(\"{$CURUSER['username']} is viewing details for torrent {$INSTALLER09['baseurl']}/details.php?id=" . (int) $torrents['id'] . "\")' value='do it!'/></td></tr>";
$HTMLOUT .= "</table>\n<table align='center' class='table table-bordered span9'>";
//==Report Torrent Link
$HTMLOUT .= tr("Report Torrent", "<form action='report.php?type=Torrent&amp;id={$id}' method='post'><input class='btn btn-primary' type='submit' name='submit' value='Report This Torrent' />&nbsp;&nbsp;<strong><em class='label label-primary'>For breaking the&nbsp;<a href='rules.php'>rules</a></em></strong></form>", 1);
//== Tor Reputation by pdq
if ($torrent_cache['rep']) {
    $torrents = array_merge($torrents, $torrent_cache['rep']);
    $member_reputation = get_reputation($torrents, 'torrents', $torrents['anonymous']);
开发者ID:CharlieHD,项目名称:U-232-V4,代码行数:31,代码来源:details.php


示例5: ageage

function ageage($cusnum, $age, $fcid, $loc)
{
    $rate = getRate($fcid);
    $bal = "balance";
    if ($loc == 'int') {
        $bal = "fbalance";
        $rate = 1;
    }
    if ($rate == 0) {
        $rate = 1;
    }
    # Get the current oustanding
    $sql = "SELECT sum({$bal}) FROM invoices WHERE cusnum = '{$cusnum}' AND printed = 'y' AND age = '{$age}' AND div = '" . USER_DIV . "'";
    $rs = db_exec($sql) or errDie("Unable to access database");
    $sum = pg_fetch_array($rs);
    # Get the current oustanding on transactions
    $sql = "SELECT sum({$bal}) FROM custran WHERE cusnum = '{$cusnum}' AND age = '{$age}' AND div = '" . USER_DIV . "'";
    $rs = db_exec($sql) or errDie("Unable to access database");
    $sumb = pg_fetch_array($rs);
    # Take care of nasty zero
    return sprint($sum['sum'] + $sumb['sum'] + 0);
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:22,代码来源:cust-stmnt.php


示例6: write


//.........这里部分代码省略.........
    if (isset($printdel)) {
        $Sl = "SELECT * FROM settings WHERE constant='Delivery Note'";
        $Ri = db_exec($Sl) or errDie("Unable to get settings.");
        if (pg_num_rows($Ri) < 1) {
            $Sl = "INSERT INTO settings (constant,value,div) VALUES ('Delivery Note','Yes','" . USER_DIV . "')";
            $Ri = db_exec($Sl);
        } else {
            $Sl = "UPDATE settings SET value='Yes' WHERE constant='Delivery Note' AND div='" . USER_DIV . "'";
            $Ri = db_exec($Sl);
        }
    } else {
        $Sl = "UPDATE settings SET value='No' WHERE constant='Delivery Note' AND div='" . USER_DIV . "'";
        $Ri = db_exec($Sl);
    }
    # Get selected customer info
    db_connect();
    $sql = "SELECT * FROM customers WHERE cusnum = '{$cusnum}' AND div = '" . USER_DIV . "'";
    $custRslt = db_exec($sql) or errDie("Unable to get customer information");
    if (pg_numrows($custRslt) < 1) {
        $sql = "SELECT * FROM inv_data WHERE invid = '{$invid}' AND div = '" . USER_DIV . "'";
        $custRslt = db_exec($sql) or errDie("Unable to get customer information data");
        $cust = pg_fetch_array($custRslt);
        $cust['cusname'] = $cust['customer'];
        $cust['surname'] = "";
        $cust['addr1'] = "";
        # currency
        $currs = getSymbol($inv['fcid']);
    } else {
        $cust = pg_fetch_array($custRslt);
        # If customer was just selected/changed, get the following
        if ($inv['cusnum'] != $cusnum) {
            $traddisc = $cust['traddisc'];
            $terms = $cust['credterm'];
            $xrate = getRate($cust['fcid']);
        }
        # currency
        $currs = getSymbol($cust['fcid']);
    }
    # get department
    db_conn("exten");
    $sql = "SELECT * FROM departments WHERE deptid = '{$inv['deptid']}' AND div = '" . USER_DIV . "'";
    $deptRslt = db_exec($sql);
    if (pg_numrows($deptRslt) < 1) {
        $dept['deptname'] = "<i class=err>Not Found</i>";
    } else {
        $dept = pg_fetch_array($deptRslt);
    }
    # fix those nasty zeros
    $xrate += 0;
    if ($xrate == 0) {
        $xrate = 1;
    }
    $traddisc += 0;
    $delchrg += 0;
    $vatamount = 0;
    $showvat = TRUE;
    # insert invoice to DB
    db_connect();
    # begin updating
    pglib_transaction("BEGIN") or errDie("Unable to start a database transaction.", SELF);
    /* -- Start remove old items -- */
    # get selected stock in this invoice
    $sql = "SELECT * FROM inv_items  WHERE invid = '{$invid}' AND div = '" . USER_DIV . "'";
    $stktRslt = db_exec($sql);
    while ($stkt = pg_fetch_array($stktRslt)) {
        # update stock(alloc + qty)
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:67,代码来源:intinvoice-new.php


示例7: method

function method($_POST, $err = "")
{
    # get vars
    extract($_POST);
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($supid, "num", 1, 10, "Invalid supplier number.");
    $v->isOk($bankid, "num", 1, 10, "Invalid Bank Account number.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $confirm .= "<li class='err'>" . $e["msg"] . "</li>";
        }
        $confirm .= "<p><input type='button' onClick='JavaScript:history.back();' value='&laquo; Correct submission'>";
        return $confirm;
    }
    db_connect();
    # Supplier name
    $sql = "SELECT * FROM suppliers WHERE supid = '{$supid}' AND div = '" . USER_DIV . "'";
    $supRslt = db_exec($sql);
    $sup = pg_fetch_array($supRslt);
    $currs = getSymbol($sup['fcid']);
    $rate = getRate($sup['fcid']);
    # Get bank account name
    db_connect();
    $sql = "SELECT * FROM bankacct WHERE bankid = '{$bankid}' AND div = '" . USER_DIV . "'";
    $bankRslt = db_exec($sql);
    $bank = pg_fetch_array($bankRslt);
    if ($bank['btype'] == 'int') {
        $bcur = $currs['symbol'];
    } else {
        $bcur = CUR;
    }
    $alls = "\n\t\t\t<select name='all'>\n\t\t\t\t<option value='0' selected>Auto</option>\n\t\t\t\t<option value='1'>Allocate To Age Analysis</option>\n\t\t\t\t<option value='2'>Allocate To Each invoice</option>\n\t\t\t</select>";
    if (!isset($date_day)) {
        $date_year = date("Y");
        $date_month = date("m");
        $date_day = date("d");
    }
    // layout
    $add = "\n\t\t\t<h3>New International Bank Payment</h3>\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<form action='" . SELF . "' method='POST' name='form'>\n\t\t\t\t<input type='hidden' name='key' value='alloc'>\n\t\t\t\t<input type='hidden' name='supid' value='{$supid}'>\n\t\t\t\t<input type='hidden' name='bankid' value='{$bankid}'>\n\t\t\t\t<tr><th colspan='2'>Payment Details</th></tr>\n\t\t\t\t{$err}\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Account</td>\n\t\t\t\t\t<td>{$bank['accname']} - {$bank['bankname']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Date</td>\n\t\t\t\t\t<td>" . mkDateSelect("date", $date_year, $date_month, $date_day) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Paid To</td>\n\t\t\t\t\t<td valign='center'>({$sup['supno']}) {$sup['supname']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Description</td>\n\t\t\t\t\t<td valign='center'><textarea col='18' rows='3' name='descript'>{$descript}</textarea></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Cheque Number</td>\n\t\t\t\t\t<td valign='center'><input size='20' name='cheqnum' value='{$cheqnum}'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Amount</td>\n\t\t\t\t\t<td valign='center'>{$bcur} <input type='text' size='13' name='amt' value='{$amt}'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Exchange rate</td>\n\t\t\t\t\t<td valign='center'>" . CUR . " / {$sup['currency']} <input type='text' size='8' name='rate' value='{$rate}'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>Allocation</td>\n\t\t\t\t\t<td>{$alls}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><input type='button' value='< Cancel' onClick='javascript:history.back();'></td>\n\t\t\t\t\t<td valign='center'><input type='submit' value='Allocate >'></td>\n\t\t\t\t</tr>\n\t\t\t</form>\n\t\t\t</table>";
    $printCust = "\n\t\t\t<h3>Creditors Age Analysis</h3>\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Current</th>\n\t\t\t\t\t<th>30 days</th>\n\t\t\t\t\t<th>60 days</th>\n\t\t\t\t\t<th>90 days</th>\n\t\t\t\t\t<th>120 days</th>\n\t\t\t\t\t<th>Total Outstanding</th>\n\t\t\t\t</tr>";
    $curr = sage($supid, 29);
    $age30 = sage($supid, 59);
    $age60 = sage($supid, 89);
    $age90 = sage($supid, 119);
    $age120 = sage($supid, 149);
    $supttot = $curr + $age30 + $age60 + $age90 + $age120;
    #clean the vars
    $curr = sprint($curr);
    $age30 = sprint($age30);
    $age60 = sprint($age60);
    $age90 = sprint($age90);
    $age120 = sprint($age120);
    $supttot = sprint($supttot);
    # Alternate bgcolor
    $printCust .= "\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($curr) . "</td>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($age30) . "</td>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($age60) . "</td>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($age90) . "</td>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($age120) . "</td>\n\t\t\t\t\t<td>{$sup['currency']} " . sprint($supttot) . "</td>\n\t\t\t\t</tr>";
    $printCust .= "<tr><td><br></td></tr></table>";
    $OUTPUT = "\n\t\t\t<center>\n\t\t\t<table border='0' width='100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='65%' align='left'>{$add}</td>\n\t\t\t\t\t<td valign='top' align='center'>\n\t\t\t\t\t\t<table " . TMPL_tblDflts . " width='65%'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>Quick Links</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t\t<td><a href='bank-pay-supp.php'>Add supplier payment</a></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<script>document.write(getQuicklinkSpecial());</script>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</center>\n\t\t\t{$printCust}";
    return $OUTPUT;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:64,代码来源:bank-pay-supp-int.php


示例8: getRate

										<?php 
        }
        ?>
									
									</td>
                                     
                                </tr>
                              <?php 
    }
    ?>
                        </table>
                        <div class="cart-totals text-right">
                              Sub-total: &nbsp;  &nbsp;  &nbsp;  &nbsp;  
							  <strong>
									<?php 
    echo getRate(isset($coupon) ? $total_price - $coupon->discount : $total_price);
    ?>
								
								
							</strong> &nbsp; 
                             
                        </div>
						
						<?php 
} else {
    ?>
					
							<h1 style="color:#5BC5C4;font-size:20px;font-weight:bold;">Your cart is currently empty.</h1>
							<br />
							<a href="<?php 
    echo base_url();
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:31,代码来源:shopping_cart.php


示例9: getRate

                    <th class="center" style="font-weight:normal;">
						<?php 
    echo getRate($row->purchase);
    ?>
					</th>
					<th class="center" style="font-weight:normal;">
						Internet
					</th>
					<th style="font-weight:normal;text-align:left;" align="left">
						<?php 
    echo $row->product_name;
    ?>
					</th>
                  </tr>
                  <?php 
}
?>
                  <tfoot>
                    <tr style="background-color:#4A708B;">
                      <td colspan="3" style="color:#E5E5E5; font-weight:bold; font-size:15px; text-align:right;">Total</td>
                      <th class="center" style="color:#E5E5E5; font-weight:bold; font-size:15px;"><?php 
echo getRate($tot);
?>
</th>
                      <th colspan="2" class="center" style="color:#E5E5E5; font-weight:bold; font-size:18px;"></th>
                    </tr>
                  </tfoot>
                </tbody>
              </table>
                
              </body></html>
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:31,代码来源:export-sales_dignity.php


示例10: foreach

?>
                </table>
                <table class="dashboard-table table">
                  <tr>
                    <th colspan="3">Recently purchased items</th>
                  </tr>
                  <?php 
foreach ($recent_items as $item) {
    ?>
                  <tr>
                    <td><?php 
    echo $item->product_name;
    ?>
</td>
                    <td><?php 
    echo getRate($item->product_price);
    ?>
</td>
                    <td></td>                    
                  </tr>
                  <?php 
}
?>
                </table>
                
                          
                
              </div>
			  
			  
              <div class="span8" style="width:560px;">
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:31,代码来源:dashboard.php


示例11: isset

         </div>
		  <?php 
} else {
    ?>
       <div class="welcome-cus">&nbsp;</div>
        <?php 
}
?>
        <div class="cart-item"> <a href="/shop/cart">My Cart : <?php 
echo isset($tcart) ? $tcart->items : '0';
?>
  <?php 
echo lang('item(s)');
?>
: <?php 
echo isset($tcart) ? getRate($tcart->gtotal) : getRate(0);
?>
                      
                        </a></div>
        
        
        
        
       
        
        
        
        
        
      </div>
      <div class="claer"></div>
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:31,代码来源:header.php


示例12: getRate

                        <?php 
$discount = $billing->discount + $billing->coupon;
?>
                        <?php 
if ($discount > 0) {
    ?>
                        <li>Discount <span><?php 
    echo getRate($discount);
    ?>
</span></li>
                        <?php 
}
?>
                    </ul>
                    <div class="grandtotal">
                        Grand Total: <?php 
echo getRate($billing->amount + $billing->shipping + $billing->service + $billing->surcharge + $billing->tax - $discount);
?>
                    </div>
                    </div>
                </div><!-- My Order Wrapper //-->
               
                
            </div> <!-- main -->
            <div class="clear"></div>
            </div> <!-- content -->
        </div> <!-- content wrapper -->
<?php 
include_once 'footer.php';
?>
       
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:30,代码来源:view.php


示例13: cycleinc

function cycleinc($id)
{
    $user = loadcycle($id);
    $inc = $user['cycle_count'] + 1;
    exitlabel($id);
    $userpackage = getUserPackage($user['account_link']);
    $rate = getRate($userpackage);
    totalbalance($user['account_link'], $rate);
    if ($inc == 4) {
        addmoney($account_link, $rate * 3);
        $username = "adminbonus-" . randid();
        $account_link = 1;
        $cycle_count = 1;
        $cycle_link = 0;
        mysql_query("INSERT INTO tbl_cycle SET username='{$username}',account_link='{$account_link}',cycle_count='{$cycle_count}',cycle_link='{$cycle_link}'");
    } else {
        $username = $user['username'] . "-" . $inc;
        $account_link = $user['account_link'];
        $cycle_count = $inc;
        if ($user['cycle_link'] == 0) {
            $cycle_link = $id;
        } else {
            $cycle_link = $user['cycle_link'];
        }
        $q = mysql_fetch_assoc(mysql_query("SELECT COUNT(id) as chet FROM tbl_cycle WHERE username='{$username}' AND account_link='{$account_link}' AND cycle_count='{$cycle_count}' AND cycle_link='{$cycle_link}'"));
        if ($q['chet'] == 0) {
            mysql_query("INSERT INTO tbl_cycle SET username='{$username}',account_link='{$account_link}',cycle_count='{$cycle_count}',cycle_link='{$cycle_link}'");
        }
    }
}
开发者ID:araranga,项目名称:mono,代码行数:30,代码来源:function.php


示例14: mksize

$location_bar = '<a name="top"></a>' . $status_image . ' <a class="altlink" href="index.php">' . $INSTALLER09['site_name'] . '</a>  <img src="' . $INSTALLER09['pic_base_url'] . 'arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
			<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php">Forums</a> ' . $parent_forum_name . ' 
			<img src="' . $INSTALLER09['pic_base_url'] . 'arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
			<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_forum&amp;forum_id=' . $forum_id . '">' . $forum_name . $child . '</a>
			<img src="' . $INSTALLER09['pic_base_url'] . 'arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
			<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&amp;topic_id=' . $topic_id . '">' . $topic_name . '</a> ' . $status_image . '<br />' . $forum_desc . '
			<span style="text-align: center;">' . $mini_menu . ($topic_owner == $CURUSER['id'] && $arr['poll_id'] == 0 || $CURUSER['class'] >= UC_STAFF && $arr['poll_id'] == 0 ? '  |<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=poll&amp;action_2=poll_add&amp;topic_id=' . $topic_id . '" class="altlink">&nbsp;Add Poll</a>' : '') . '</span><br /><br />';
$HTMLOUT .= ($upload_errors_size > 0 ? $upload_errors_size === 1 ? '<div style="text-align: center;">One file was not uploaded. The maximum file size allowed is. ' . mksize($max_file_size) . '.</div>' : '<div style="text-align: center;">' . $upload_errors_size . ' file were not uploaded. The maximum file size allowed is. ' . mksize($max_file_size) . '.</div>' : '') . ($upload_errors_type > 0 ? $upload_errors_type === 1 ? '<div style="text-align: center;">One file was not uploaded. The accepted formats are zip and rar.</div>' : '<div style="text-align: center;">' . $upload_errors_type . ' files were not uploaded. The accepted formats are zip and rar.</div>' : '') . $location_bar . $topic_poll . '<br />' . $subscription_on_off . '<br />
		' . ($CURUSER['class'] < UC_STAFF ? '' : '<form action="' . $INSTALLER09['baseurl'] . '/forums.php?action=staff_actions" method="post" name="checkme" onsubmit="return SetChecked(this,\'post_to_mess_with\')" enctype="multipart/form-data">') . (isset($_GET['count']) ? '
		<div style="text-align: center;">' . intval($_GET['count']) . ' PMs Sent</div>' : '') . '
		<!--<table border="0" cellspacing="5" cellpadding="10" width="100%">-->
		<table border="0" cellspacing="0" cellpadding="4" width="100%">
		' . $the_top_and_bottom . '
		<tr><td class="forum_head_dark" align="left" width="100"> <img src="' . $INSTALLER09['pic_base_url'] . 'forums/topic_normal.gif" alt="Topic" title="Topic" />&nbsp;&nbsp;Author</td>
		<td class="forum_head_dark" align="left" colspan="2">&nbsp;&nbsp;Topic: ' . $topic_name . '  [ Read ' . $views . ' times ] </td></tr>
		<tr><td class="three" align="left" colspan="3">Topic rating: ' . getRate($topic_id, "topic") . '</td></tr>
      <tr><td class="three" align="left" colspan="3">' . $topic_users . '</td></tr>';
//=== lets start the loop \o/
while ($arr = mysqli_fetch_assoc($res)) {
    //=== change colors
    $colour = ++$colour % 2;
    $class = $colour == 0 ? 'one' : 'two';
    $class_alt = $colour == 0 ? 'two' : 'one';
    $moodname = isset($mood['name'][$arr['mood']]) ? htmlsafechars($mood['name'][$arr['mood']]) : 'is feeling neutral';
    $moodpic = isset($mood['image'][$arr['mood']]) ? htmlsafechars($mood['image'][$arr['mood']]) : 'noexpression.gif';
    $post_icon = $arr['icon'] !== '' ? '<img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . htmlsafechars($arr['icon']) . '.gif" alt="icon" title="icon" /> ' : '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/topic_normal.gif" alt="icon" title="icon" /> ';
    $post_title = $arr['post_title'] !== '' ? ' <span style="font-weight: bold; font-size: x-small;">' . htmlsafechars($arr['post_title'], ENT_QUOTES) . '</span>' : '';
    $stafflocked = $arr["staff_lock"] == 1 ? "<img src='{$INSTALLER09['pic_base_url']}locked.gif' border='0' alt='Post Locked' title='Post Locked' />" : "";
    $member_reputation = $arr['username'] != '' ? get_reputation($arr, 'posts') : '';
    $edited_by = '';
    if ($arr['edit_date'] > 0) {
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:view_topic.php


示例15: getRate

    $topic_users_cache['topic_users'] = 'There have been no active users in the last 15 minutes.';
}
//$topic_users = '&nbsp;('.$topic_users_cache['actcount'].')';
$topic_users = $topic_users_cache['topic_users'];
if ($topic_users != '') {
    $topic_users = 'Currently viewing this topic: ' . $topic_users;
}
$HTMLOUT .= "<a href='forums.php?action=viewunread' class='button new_reply_button'><span>Show New</span></a>&nbsp;";
if ($maypost) {
    $HTMLOUT .= "<a href='forums.php?action=reply&topicid=" . $topicid . "' class='button new_reply_button'><span>New Reply</span></a>&nbsp;";
}
// $HTMLOUT .="<strong class='float_left' style='padding-right: 10px;'>Thread Rating:</strong>" . (getRate($topicid, "topic")) . "";
$HTMLOUT .= "</div>";
$HTMLOUT .= "<br /><a name='top'></a>";
$HTMLOUT .= "<table border='0' cellspacing='0' cellpadding='5' class='tborder tfixed clear'>";
$HTMLOUT .= "<tr>\n            <td class='thead'>\n                <div class='float_right'>\n                    " . getRate($topicid, "topic") . "\n                </div>\n                <div>\n                <span class='smalltext'><strong><a href='{$INSTALLER09['baseurl']}/subscriptions.php?topicid={$topicid}&amp;subscribe=1'><b><font color='red'>Subscribe to Forum</font></b></a><br />\n                <span class='smalltext'><strong>{$topic_users}</strong></span> \n</div>\n            </td>\n        </tr>";
$HTMLOUT .= "\n             <script  type='text/javascript'>\n             /*<![CDATA[*/\n             function confirm_att(id)\n             {\n             if(confirm('Are you sure you want to delete this ?'))\n             {\n               window.open('{$INSTALLER09['baseurl']}/forums.php?action=attachment&amp;subaction=delete&amp;attachmentid='+id,'attachment','toolbar=no, scrollbars=yes, resizable=yes, width=600, height=250, top=50, left=50');\n               window.location.reload(true)\n             }\n             }\n             function popitup(url) {\n             newwindow=window.open(url,'./usermood.php','height=335,width=735,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n             if (window.focus) {newwindow.focus()}\n             return false;\n             }\n             /*]]>*/\n             </script>";
// ------ echo table
// $HTMLOUT .= begin_frame();
$res = sql_query("SELECT p.id, p.added, p.user_id, p.added, p.body, p.edited_by, p.edit_date, p.icon, p.anonymous as p_anon, p.user_likes, u.id AS uid, u.username as uusername, u.class, u.avatar, u.offensive_avatar, u.donor, u.title, u.username, u.reputation, u.mood, u.anonymous, u.country, u.enabled, u.warned, u.chatpost, u.leechwarn, u.pirate, u.king, u.uploaded, u.downloaded, u.signature, u.last_access, (SELECT COUNT(id)  FROM posts WHERE user_id = u.id) AS posts_count, u2.username as u2_username " . ($Multi_forum['configs']['use_attachment_mod'] ? ", at.id as at_id, at.filename as at_filename, at.postid as at_postid, at.size as at_size, at.downloads as at_downloads, at.owner as at_owner " : "") . ", (SELECT last_post_read FROM read_posts WHERE user_id = " . sqlesc((int) $CURUSER['id']) . " AND topic_id = p.topic_id LIMIT 1) AS last_post_read " . "FROM posts AS p " . "LEFT JOIN users AS u ON p.user_id = u.id " . ($Multi_forum['configs']['use_attachment_mod'] ? "LEFT JOIN attachments AS at ON at.postid = p.id " : "") . "LEFT JOIN users AS u2 ON u2.id = p.edited_by " . "WHERE p.topic_id = " . sqlesc($topicid) . " ORDER BY id LIMIT {$offset}, {$perpage}") or sqlerr(__FILE__, __LINE__);
$pc = mysqli_num_rows($res);
$pn = 0;
while ($arr = mysqli_fetch_assoc($res)) {
    ++$pn;
    // --------------- likes start------
    $att_str = '';
    if (!empty($arr['user_likes'])) {
        $likes = explode(',', $arr['user_likes']);
    } else {
        $likes = '';
    }
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:31,代码来源:view_topic.php


示例16: write


//.........这里部分代码省略.........
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $err .= "<li class='err'>" . $e["msg"] . "</li>";
        }
        $_POST['done'] = "";
        return details($_POST, $err);
    }
    # Get Order info
    db_connect();
    $sql = "SELECT * FROM purch_int WHERE purid = '{$purid}' AND div = '" . USER_DIV . "'";
    $purRslt = db_exec($sql) or errDie("Unable to get Order information");
    if (pg_numrows($purRslt) < 1) {
        return "<li>- Order Not Found</li>";
    }
    $pur = pg_fetch_array($purRslt);
    # check if Order has been printed
    if ($pur['received'] == "y") {
        $error = "<li class='err'> Error : Order number <b>{$purid}</b> has already been received.</li>";
        $error .= "<p><input type='button' onClick='JavaScript:history.back();' value='&laquo; Correct submission'>";
        return $error;
    }
    # Get selected customer info
    db_connect();
    $sql = "SELECT * FROM suppliers WHERE supid = '{$supid}' AND div = '" . USER_DIV . "'";
    $supRslt = db_exec($sql) or errDie("Unable to get customer information");
    if (pg_numrows($supRslt) < 1) {
        // code here
    } else {
        $sup = pg_fetch_array($supRslt);
    }
    $pur['deptid'] = $sup['deptid'];
    # If supplier was just selected/changed, get the following
    if ($pur['supid'] != $supid) {
        $xrate = getRate($sup['fcid']);
    }
    # currency
    $currs = getSymbol($sup['fcid']);
    $curr = $currs['symbol'];
    # get department
    db_conn("exten");
    $sql = "SELECT * FROM departments WHERE deptid = '{$pur['deptid']}' AND div = '" . USER_DIV . "'";
    $deptRslt = db_exec($sql);
    if (pg_numrows($deptRslt) < 1) {
        $dept['deptname'] = "<i class='err'>Not Found</i>";
    } else {
        $dept = pg_fetch_array($deptRslt);
    }
    # fix those nasty zeros
    $xrate += 0;
    if ($xrate == 0) {
        $xrate = 1;
    }
    $shipchrg += 0;
    $tax += 0;
    # insert Order to DB
    db_connect();
    # begin updating
    pglib_transaction("BEGIN") or errDie("Unable to start a database transaction.", SELF);
    /* -- Start remove old items -- */
    # get selected stock in this Order
    $sql = "SELECT * FROM purint_items  WHERE purid = '{$purid}' AND div = '" . USER_DIV . "'";
    $stktRslt = db_exec($sql);
    while ($stkt = pg_fetch_array($stktRslt)) {
        # update stock(ordered - qty)
        $sql = "UPDATE stock SET ordered = (ordered - '{$stkt['qty']}')  WHERE stkid = '{$stkt['stkid']}' AND div = '" . USER_DIV . "'";
        $rslt = db_exec($sql) or errDie("Unable to update stock to Cubit.", SELF);
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:67,代码来源:purch-int-new.php


示例17: getRate

    ?>
</th>
                      <th class="right" style="color:#E5E5E5; font-weight:bold; font-size:18px;"><?php 
    echo getRate($tax);
    ?>
</th>
                      <th class="right" style="color:#E5E5E5; font-weight:bold; font-size:18px;"><?php 
    echo getRate($other);
    ?>
</th>
                      <th class="right" style="color:#E5E5E5; font-weight:bold; font-size:18px;"><?php 
    echo getRate($total);
    ?>
</th>
                       <th class="right" style="color:#E5E5E5; font-weight:bold; font-size:18px;"><?php 
    echo getRate($commission);
    ?>
</th>
                    </tr>
                  </tfoot>
                </tbody>
              </table>
                
                <p class="text-center">Go To <a href="reports">Report Search</a> </p> 
              <?php 
} else {
    ?>
              
                <p class="text-center">Sorry No Results Found. Go Back To <a href="reports">Report Search</a></p>
              
              <?php 
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:31,代码来源:report-sales-3dec13n.php


示例18: getRate

        echo $row->product_picture;
        ?>
" style="width:100%;" class="orienta" ></a>
											</div>
                                            <p class="product-name">
                                                <a href="/<?php 
        echo $upath . $row->url;
        ?>
"><?php 
        echo $row->product_name;
        ?>
</a>
             

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getRating函数代码示例发布时间:2022-05-15
下一篇:
PHP getRandomString函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap