本文整理汇总了PHP中formatVariable函数的典型用法代码示例。如果您正苦于以下问题:PHP formatVariable函数的具体用法?PHP formatVariable怎么用?PHP formatVariable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatVariable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show
function show()
{
if (!$this->queryresult) {
return false;
}
while ($therecord = $this->db->fetchArray($this->queryresult)) {
if ($therecord["name"] != "base") {
echo formatVariable($therecord["displayname"]) . ": v" . $therecord["version"] . "<br />";
} else {
echo '<strong>v' . $therecord["version"] . '</strong><br /><br />';
}
}
//endwhile
return true;
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:15,代码来源:index.php
示例2: htmlQuotes
<tbody>
<tr><td id="parenDiscount"><?php
if ($therecord["discountname"]) {
echo "(" . htmlQuotes($therecord["discountname"]) . ")";
} else {
echo " ";
}
?>
</td></tr>
<tr><td class="blanks"> </td></tr>
<tr><td id="parenTax">
<?php
if ($therecord["taxname"] || (int) $therecord["taxpercentage"] != 0) {
echo "(";
if ($therecord["taxname"]) {
echo formatVariable($therecord["taxname"]) . ": ";
}
echo $therecord["taxpercentage"] . "%)";
} else {
echo " ";
}
?>
</td></tr>
<tr><td id="parenShipping">
<?php
if ($therecord["shippingmethodid"]) {
echo "(" . htmlQuotes($shippingMethods[$therecord["shippingmethodid"]]["name"]) . ")";
} else {
echo " ";
}
?>
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:invoices_addedit.php
示例3: _getItems
function _getItems()
{
$querystatement = "\n\t\t\tSELECT\n\t\t\t\t`aritems`.`id`,\n\t\t\t\t`aritems`.`type`,\n\t\t\t\tIF(`invoices`.`id`,`invoices`.`id`,`receipts`.`id`) AS `relatedid`,\n\t\t\t\t`aritems`.`itemdate`,\n\t\t\t\t`aritems`.`amount`,\n\t\t\t\t`aritems`.`amount` - `aritems`.`paid` AS `due`\n\t\t\tFROM\n\t\t\t\t(`aritems` LEFT JOIN `invoices` ON `aritems`.`relatedid` = `invoices`.`uuid`) LEFT JOIN `receipts` ON `aritems`.`relatedid` = `receipts`.`uuid`\n\t\t\tWHERE\n\t\t\t\t`aritems`.`posted` =1\n\t\t\t\tAND `aritems`.`clientid` = '" . mysql_real_escape_string($this->clientrecord["clientid"]) . "'\n\t\t";
if (!$this->showClosed) {
$querystatement .= "\n\t\t\t\tAND `aritems`.`status` = 'open'";
}
$querystatement .= "\n\t\t\t\tAND `aritems`.itemdate <= '" . dateToString($this->statementDate, "SQL") . "'\n\t\t\tORDER BY\n\t\t\t\t`aritems`.itemdate,\n\t\t\t\t`aritems`.id";
$queryresult = $this->db->query($querystatement);
$returnArray = array();
$this->clientTotals = array("docamount" => 0, "current" => 0, "term1" => 0, "term2" => 0, "term3" => 0);
while ($therecord = $this->db->fetchArray($queryresult)) {
$itemdate = stringToDate($therecord["itemdate"], "SQL");
$therecord["current"] = " ";
$therecord["term1"] = " ";
$therecord["term2"] = " ";
$therecord["term3"] = " ";
if ($therecord["type"] != "invoice") {
$this->clientTotals["current"] += $therecord["due"];
$therecord["current"] = formatVariable($therecord["due"], "currency");
} else {
$daysover = floor(($this->statementDate - $itemdate) / 86400);
if ($daysover > TERM3_DAYS) {
$this->clientTotals["term3"] += $therecord["due"];
$therecord["term3"] = formatVariable($therecord["due"], "currency");
} elseif ($daysover > TERM2_DAYS) {
$this->clientTotals["term2"] += $therecord["due"];
$therecord["term2"] = formatVariable($therecord["due"], "currency");
} elseif ($daysover > TERM1_DAYS) {
$this->clientTotals["term1"] += $therecord["due"];
$therecord["term1"] = formatVariable($therecord["due"], "currency");
} else {
$this->clientTotals["current"] += $therecord["due"];
$therecord["current"] = formatVariable($therecord["due"], "currency");
}
}
//endif
$therecord["itemdate"] = formatFromSQLDate($therecord["itemdate"]);
$this->clientTotals["docamount"] += $therecord["amount"];
$therecord["amount"] = formatVariable($therecord["amount"], "currency");
$therecord["due"] = formatVariable($therecord["due"], "currency");
$returnArray[$therecord["itemdate"] . "-" . $therecord["id"]] = $therecord;
}
//endwhile
if ($this->showPayments != "none") {
//add in receipts in laste term1_days
$lastDays = dateToString(strtotime("-" . TERM1_DAYS . " days", $this->statementDate), "SQL");
$querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\tid,\n\t\t\t\t\treceiptdate,\n\t\t\t\t\tamount\n\t\t\t\tFROM\n\t\t\t\t\treceipts\n\t\t\t\tWHERE\n\t\t\t\t\tclientid = '" . mysql_real_escape_string($this->clientrecord["clientid"]) . "'\n\t\t\t";
if ($this->showPayments == "new") {
$querystatement .= "\n\t\t\t\tAND receiptdate <= '" . dateToString($this->statementDate, "SQL") . "'\n\t\t\t\tAND receiptdate >= '" . $lastDays . "'";
}
$querystatement .= "\n\t\t\t\tAND posted = 1";
$receiptresult = $this->db->query($querystatement);
while ($receiptrecord = $this->db->fetchArray($receiptresult)) {
$rcptRecord["itemdate"] = formatFromSQLDate($receiptrecord["receiptdate"]);
$rcptRecord["type"] = "payment";
$rcptRecord["relatedid"] = " ";
$rcptRecord["amount"] = "(" . formatVariable($receiptrecord["amount"], "currency") . ")";
$rcptRecord["current"] = " ";
$rcptRecord["term1"] = " ";
$rcptRecord["term2"] = " ";
$rcptRecord["term3"] = " ";
$rcptRecord["due"] = " ";
$returnArray[$receiptrecord["receiptdate"] . "-D" . $receiptrecord["id"]] = $rcptRecord;
}
//endwhile
}
//end if
ksort($returnArray);
return $returnArray;
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:70,代码来源:aritems_summary.php
示例4: login
+-------------------------------------------------------------------------+
*/
require_once "include/session.php";
require_once "include/login_include.php";
if (isset($_POST["name"]) && isset($_POST["password"])) {
$login = new login($db);
$failed = $login->verify($_POST["name"], $_POST["password"]);
} else {
$failed = "";
$_POST["name"] = "";
}
//endif
if (isset($_SESSION["userinfo"])) {
goURL(DEFAULT_LOAD_PAGE);
}
$pageTitle = formatVariable(APPLICATION_NAME) . " Log in";
$phpbms->cssIncludes[] = "pages/login.css";
$phpbms->jsIncludes[] = "common/javascript/login.js";
$phpbms->showMenu = false;
$phpbms->showFooter = false;
include "header.php";
?>
<div id="loginbox" class="bodyline" >
<h1><span><?php
echo APPLICATION_NAME;
?>
</span></h1>
<?php
if ($failed) {
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:index.php
示例5: display
function display($result)
{
// This function will spit out a JSON array of records
$output = "{totalRecords: " . $this->totalcount . ", resultRecords: [";
while ($therecord = $this->db->fetchArray($result)) {
$output .= "{display: '" . str_replace("'", "\\'", formatVariable($therecord["display"], "bbcode")) . "',";
$output .= "value: '" . str_replace("'", "\\'", formatVariable($therecord["value"])) . "',";
$output .= "secondary: '" . str_replace("'", "\\'", formatVariable($therecord["secondary"], "bbcode")) . "',";
$output .= "classname: '" . str_replace("'", "\\'", formatVariable($therecord["classname"])) . "'},";
}
//endwhile
if ($output != "{totalRecords: " . $this->totalcount . ", resultRecords: [") {
$output = substr($output, 0, strlen($output) - 1);
}
$output .= "] }";
header("Content-type: text/plain");
echo $output;
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:18,代码来源:smartsearch.php
示例6: display
function display()
{
?>
<div class="box widgets" id="<?php
echo $this->uuid;
?>
">
<div class="widgetOptions" id="<?php
echo $this->uuid;
?>
Options">
<button type="button" id="<?php
echo $this->uuid;
?>
RemoveButton" class="graphicButtons buttonMinus widgetRemoves" title="remove widget"><span>remove widget</span></button>
</div>
<h2 class="widgetTitles"><?php
echo formatVariable($this->title);
?>
</h2>
<?php
$this->displayMiddle();
?>
</div>
<?php
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:28,代码来源:snapshot_include.php
示例7: memo
</div>
<div id="leftSideDiv">
<fieldset>
<legend><label for="content">memo</label></legend>
<p id="timeStampP">
<button id="timeStampButton" type="button" class="graphicButtons buttonTimeStamp" accesskey="t" title="Add time stamp to memo (Access Key - t)">time stamp</button>
</p>
<p>
<textarea name="content" cols="45" rows="23" id="content"><?php
echo htmlQuotes($therecord["content"]);
?>
</textarea>
<input id = "username" type="hidden" value="<?php
echo formatVariable(trim($_SESSION["userinfo"]["firstname"] . " " . $_SESSION["userinfo"]["lastname"]));
?>
" />
</p>
</fieldset>
</div>
<div id="repeatDiv">
<div <?php
if ($therecord["parentid"]) {
echo 'style="display:none;"';
}
?>
>
<input type="hidden" id="bypass" name="bypass" value=""/>
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:30,代码来源:notes_addedit.php
示例8: _getItems
function _getItems()
{
$querystatement = "\n\t\t\tSELECT\n\t\t\t\t`aritems`.`id`,\n\t\t\t\t`aritems`.`type`,\n\t\t\t\tIF(`invoices`.`id`,`invoices`.`id`,`receipts`.`id`) AS `relatedid`,\n\t\t\t\t`aritems`.`itemdate`,\n\t\t\t\t`aritems`.`amount`,\n\t\t\t\t`aritems`.`amount` - `paid` AS due\n\t\t\tFROM\n\t\t\t\t(`aritems` LEFT JOIN `invoices` ON `aritems`.`relatedid` = `invoices`.`uuid`) LEFT JOIN `receipts` ON `aritems`.`relatedid` = `receipts`.`uuid`\n\t\t\tWHERE\n\t\t\t\t`aritems`.posted = 1\n\t\t\t\tAND `aritems`.clientid = '" . mysql_real_escape_string($this->clientrecord["clientid"]) . "'\n\t\t";
if (!$this->showClosed) {
$querystatement .= "\n\t\t\t\tAND `aritems`.`status` = 'open'";
}
$querystatement .= "\n\t\t\t\tAND `aritems`.itemdate <= '" . dateToString($this->statementDate, "SQL") . "'\n\t\t\tORDER BY\n\t\t\t\t`aritems`.itemdate,\n\t\t\t\t`aritems`.id";
$queryresult = $this->db->query($querystatement);
$returnArray = array();
$serviceChargeAmount = 0;
while ($therecord = $this->db->fetchArray($queryresult)) {
if ($therecord["type"] == "service charge") {
$serviceChargeAmount += $therecord["due"];
} else {
$itemdate = stringToDate($therecord["itemdate"], "SQL");
if ($therecord["type"] != "invoice") {
$therecord["dayspd"] = "";
} else {
$daysover = floor(($this->statementDate - $itemdate) / 86400) - TERM1_DAYS;
if ($daysover + TERM1_DAYS > TERM3_DAYS) {
$this->term3Total += $therecord["due"];
} elseif ($daysover + TERM1_DAYS > TERM2_DAYS) {
$this->term2Total += $therecord["due"];
} elseif ($daysover > 0) {
$this->term1Total += $therecord["due"];
} else {
$this->currentTotal += $therecord["due"];
$daysover = "";
}
//end if
if ($therecord["due"] > 0) {
$therecord["dayspd"] = $daysover;
} else {
$therecord["dayspd"] = "(paid in full)";
}
}
//endif
$keydate = $therecord["itemdate"];
$therecord["itemdate"] = formatFromSQLDate($therecord["itemdate"]);
$therecord["amount"] = formatVariable($therecord["amount"], "currency");
$therecord["due"] = formatVariable($therecord["due"], "currency");
$returnArray[$keydate . "-" . $therecord["id"]] = $therecord;
}
//end if
}
//endwhile
if ($serviceChargeAmount) {
$serviceRecord["itemdate"] = dateToString($this->statementDate);
$serviceRecord["dayspd"] = "";
$serviceRecord["type"] = "service charges";
$serviceRecord["relatedid"] = "";
$serviceRecord["amount"] = formatVariable($serviceChargeAmount, "currency");
$serviceRecord["due"] = formatVariable($serviceChargeAmount, "currency");
$this->currentTotal += $serviceChargeAmount;
$returnArray[dateToString($this->statementDate, "SQL") . "-XXX"] = $serviceRecord;
}
//endif
if ($this->showPayments) {
//add in receipts in laste term1_days
$lastDays = dateToString(strtotime("-" . TERM1_DAYS . " days", $this->statementDate), "SQL");
$querystatement = "SELECT\n\t\t\t\tid,\n\t\t\t\treceiptdate,\n\t\t\t\tamount\n\t\t\tFROM\n\t\t\t\treceipts\n\t\t\tWHERE\n\t\t\t\tclientid = '" . mysql_real_escape_string($this->clientrecord["clientid"]) . "'\n\t\t\t\tAND receiptdate <= '" . dateToString($this->statementDate, "SQL") . "'\n\t\t\t\tAND receiptdate >= '" . $lastDays . "'\n\t\t\t\tAND posted = 1";
$receiptresult = $this->db->query($querystatement);
while ($receiptrecord = $this->db->fetchArray($receiptresult)) {
$rcptRecord["itemdate"] = formatFromSQLDate($receiptrecord["receiptdate"]);
$rcptRecord["dayspd"] = "";
$rcptRecord["type"] = "payment";
$rcptRecord["relatedid"] = "";
$rcptRecord["amount"] = "(" . formatVariable($receiptrecord["amount"], "currency") . ")";
$rcptRecord["due"] = "";
$returnArray[$receiptrecord["receiptdate"] . "-D" . $receiptrecord["id"]] = $rcptRecord;
}
//endwhile
}
//end if
ksort($returnArray);
return $returnArray;
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:77,代码来源:aritems_clientstatement.php
示例9: showLineItems
function showLineItems($invoiceid, $indent)
{
$querystatement = "\n\t\t\tSELECT\n\t\t\t\t`products`.`partnumber`,\n\t\t\t\t`products`.`partname`,\n\t\t\t\t`quantity`,\n\t\t\t\t`lineitems`.`unitprice`,\n\t\t\t\t`quantity`*`lineitems`.`unitprice` AS `extended`\n\t\t\tFROM\n\t\t\t\t(`lineitems` LEFT JOIN `products` ON `lineitems`.`productid`=`products`.`uuid`)\n\t\t\tWHERE\n\t\t\t\t`lineitems`.`invoiceid`='" . $invoiceid . "'";
$queryresult = $this->db->query($querystatement);
if ($this->db->numRows($queryresult)) {
?>
<tr><td class="invoices" style="padding-left:<?php
echo $indent + 2;
?>
px;">
<table border="0" cellspacing="0" cellpadding="0" id="lineitems">
<tr>
<th width="65%" align="left">product</th>
<th width="24%" align="right" nowrap="nowrap">price</th>
<th width="12%" align="right" nowrap="nowrap">qty.</th>
<th width="24%" align="right" nowrap="nowrap">ext.</th>
</tr>
<?php
while ($therecord = $this->db->fetchArray($queryresult)) {
?>
<tr>
<td><?php
echo $therecord["partnumber"];
?>
<?php
echo $therecord["partname"];
?>
</td>
<td align="right" nowrap="nowrap"><?php
echo numberToCurrency($therecord["unitprice"]);
?>
</td>
<td align="right" nowrap="nowrap"><?php
echo formatVariable($therecord["quantity"], "real");
?>
</td>
<td align="right" nowrap="nowrap"><?php
echo numberToCurrency($therecord["extended"]);
?>
</td>
</tr>
<?php
}
// endwhile
?>
</table></td>
<?php
for ($i = 1; $i < count($this->selectcolumns); $i++) {
echo "<td> </td>";
}
?>
</tr><?php
}
// endif
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:55,代码来源:invoices_totals.php
示例10: _addTotals
function _addTotals()
{
$pdf =& $this->pdf;
$size = 0;
foreach ($this->totalsinfo as $column) {
switch ($column->fieldname) {
case "shipping":
case "discountamount":
if ($this->invoicerecord[$column->fieldname]) {
$size += $column->size;
}
break;
default:
$size += $column->size;
}
}
//endswitch
$this->totalsinfo[1]->size = $pdf->paperwidth - $pdf->leftmargin - $pdf->rightmargin - $size;
$height = 0.5;
$nextPos = $pdf->GetY() + $height + 0.125;
if (!$this->settings["templateFormatting"]) {
$pdf->Rect($pdf->GetX(), $pdf->GetY(), $pdf->paperwidth - $pdf->leftmargin - $pdf->rightmargin, $height);
$pdf->setStyle("header");
foreach ($this->totalsinfo as $column) {
switch ($column->fieldname) {
case "shipping":
case "discountamount":
if ($this->invoicerecord[$column->fieldname]) {
$pdf->Cell($column->size, 0.18, $column->title, 1, 0, $column->align, 1);
}
break;
default:
$pdf->Cell($column->size, 0.18, $column->title, 1, 0, $column->align, 1);
}
}
//endswitch
}
//endif
$pdf->setStyle("normal");
$pdf->SetFont("Arial", "B", 10);
$pdf->SetXY($pdf->leftmargin, $pdf->GetY() + 0.18 + 0.0625);
foreach ($this->totalsinfo as $column) {
if ($column->format != "") {
$value = formatVariable($this->invoicerecord[$column->fieldname], $column->format);
} else {
$value = $this->invoicerecord[$column->fieldname];
}
switch ($column->fieldname) {
case "shipping":
case "discountamount":
if ($this->invoicerecord[$column->fieldname]) {
$pdf->Cell($column->size, 0.18, $value, $pdf->borderDebug, 0, $column->align);
}
break;
default:
$pdf->Cell($column->size, 0.18, $value, $pdf->borderDebug, 0, $column->align);
}
//endswitch
}
//end foreach
$this->totalsinfo[1]->size = 0;
$pdf->SetXY($pdf->leftmargin, $nextPos);
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:63,代码来源:invoices_pdf_class.php
示例11: display
function display($record)
{
$output = "{";
foreach ($record as $key => $value) {
if (!is_array($value)) {
$output .= $key . ":'" . str_replace("'", "\\'", formatVariable($value)) . "',";
} else {
$output .= $key . ":{";
foreach ($value as $skey => $svalue) {
$output .= $skey . ":'" . str_replace("'", "\\'", formatVariable($svalue)) . "',";
}
$output = substr($output, 0, strlen($output) - 1);
$output .= "},";
}
//endif is_array
}
//endforeach - record
$output = substr($output, 0, strlen($output) - 1);
$output .= "}";
header("Content-type: text/plain");
echo $output;
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:22,代码来源:invoices_client_ajax.php
示例12: show
function show($itemslist, $receiptPosted, $receiptid)
{
$count = 1;
foreach ($itemslist as $therecord) {
$recID = "i" . $count;
if ($therecord["type"] == "invoice") {
$tempDate = stringToDate($therecord["itemdate"], "SQL");
$dueDate = dateToString(strtotime(TERM1_DAYS . " days", $tempDate));
} else {
$dueDate = " ";
}
if ($therecord["type"] == "credit" && $therecord["relatedid"] == $receiptid) {
$therecord["relatedid"] = "";
$therecord["amount"] = 0;
$therecord["aritemid"] = "";
$therecord["invoiceid"] = "";
}
if ($receiptPosted) {
$docDue = $therecord["amount"] - $therecord["paid"];
} elseif ($therecord["relatedid"]) {
$docDue = $therecord["amount"] - $therecord["paid"] - $therecord["applied"] - $therecord["discount"] - $therecord["taxadjustment"];
} else {
$docDue = 0;
}
?>
<tr id="<?php
echo $recID;
?>
" class="receiptTR">
<td>
<input type="hidden" id="<?php
echo $recID;
?>
ARID" value="<?php
echo $therecord["aritemid"];
?>
" />
<input type="hidden" id="<?php
echo $recID;
?>
RecID" value="<?php
echo $therecord["relatedid"];
?>
" />
<input id="<?php
echo $recID;
?>
DocRef" class="invisibleTextField" readonly="readonly" value="<?php
echo $therecord["invoiceid"];
?>
" size="4"/>
</td>
<td><input id="<?php
echo $recID;
?>
Type" class="invisibleTextField" readonly="readonly" value="<?php
echo $therecord["type"];
?>
" size="12" /></td>
<td><input id="<?php
echo $recID;
?>
DocDate" class="invisibleTextField" readonly="readonly" value="<?php
echo formatFromSQLDate($therecord["itemdate"]);
?>
" size="9" /></td>
<td><input id="<?php
echo $recID;
?>
DueDate" class="invisibleTextField" readonly="readonly" value="<?php
echo $dueDate;
?>
" size="9" /></td>
<td align="right">
<input type="hidden" id="<?php
echo $recID;
?>
DocPaid" value="<?php
echo $therecord["paid"];
?>
" />
<input id="<?php
echo $recID;
?>
DocAmount" class="invisibleTextField currency" readonly="readonly" value="<?php
echo formatVariable($therecord["amount"], "currency");
?>
" size="10" maxlength="12"/>
</td>
<td><input id="<?php
echo $recID;
?>
DocDue" class="invisibleTextField currency dueFields" readonly="readonly" value="<?php
echo formatVariable($docDue, "currency");
?>
" size="10" maxlength="12"/></td>
<td><input id="<?php
echo $recID;
?>
//.........这里部分代码省略.........
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:101,代码来源:receipts.php
示例13: showRecords
/**
* function showRecords
* @param array $recordArray
*/
function showRecords($recordArray)
{
global $phpbms;
?>
<table border="0" cellpadding="3" cellspacing="0" class="querytable">
<thead>
<tr>
<th nowrap="nowrap"align="left" width="100%">name</th>
<th nowrap="nowrap"align="center">allowed</th>
<th nowrap="nowrap"align="center">need select</th>
<th nowrap="nowrap"align="left">function name</th>
<th nowrap="nowrap"align="left">access</th>
<th nowrap="nowrap"align="right">display order</th>
<th nowrap="nowrap"> </th>
</tr>
</thead>
<tfoot>
<tr class="queryfooter">
<td colspan="7"> </td>
</tr>
</tfoot>
<tbody>
<?php
if (count($recordArray)) {
$row = 1;
$other = 4;
foreach ($recordArray as $therecord) {
$row = $row == 1 ? 2 : 1;
if ($therecord["commandtype"] !== $other) {
switch ($therecord["commandtype"]) {
case 1:
$title = "Integrated Features";
break;
case 2:
$title = "Additional Commands";
break;
case 3:
$title = "Api Commands";
break;
}
//end if
?>
<tr class="queryGroup"><td colspan="7"><?php
echo $title;
?>
</td></tr><?php
$other = $therecord["commandtype"];
}
//end if
?>
<tr class="qr<?php
echo $row;
?>
noselects">
<td nowrap="nowrap" class="important">
<?php
if ($therecord["othercommand"]) {
echo formatVariable($therecord["option"]);
} else {
echo formatVariable($therecord["name"]);
}
?>
</td>
<td nowrap="nowrap" align="center">
<?php
if ($therecord["othercommand"]) {
echo " ";
} else {
echo formatVariable($therecord["option"], "boolean");
}
?>
</td>
<td nowrap="nowrap" align="center">
<?php
if (!$therecord["othercommand"]) {
echo " ";
} else {
echo formatVariable($therecord["needselect"], "boolean");
}
?>
</td>
<td nowrap="nowrap" align="center">
<?php
if ($therecord["othercommand"]) {
echo formatVariable($therecord["displayname"]);
} else {
echo " ";
}
?>
//.........这里部分代码省略.........
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:101,代码来源:tabledefs_options_include.php
示例14: displayMiddle
function displayMiddle()
{
$querystatement = "\n SELECT\n SUM((1-(aged1 * aged2 * aged3)) * (amount-paid)) AS current,\n SUM((amount-paid)*aged1*(1-aged2)) AS term1,\n SUM((amount-paid)*aged2*(1-aged3)) AS term2,\n SUM((amount-paid)*aged3) AS term3,\n SUM(amount-paid) AS due\n FROM\n aritems\n WHERE\n `status` = 'open'\n AND posted=1";
$queryresult = $this->db->query($querystatement);
$therecord = $this->db->fetchArray($queryresult);
?>
<table>
<tbody>
<tr>
<td align="right"><p>current</p></td>
<td><p><?php
echo formatVariable($therecord["current"], "currency");
?>
</p></td>
</tr>
<tr>
<td align="right"><p><?php
echo TERM1_DAYS + 1 . " - " . TERM2_DAYS;
?>
</p></td>
<td><p><?php
echo formatVariable($therecord["term1"], "currency");
?>
</p></td>
</tr>
<tr>
<td align="right"><p><?php
echo TERM2_DAYS + 1 . " - " . TERM3_DAYS;
?>
</p></td>
<td><p><?php
echo formatVariable($therecord["term2"], "currency");
?>
</p></td>
</tr>
<tr>
<td align="right"><p><?php
echo TERM3_DAYS + 1 . "+";
?>
</p></td>
<td><p><?php
echo formatVariable($therecord["term3"], "currency");
?>
</p></td>
</tr>
<tr>
<td align="right" class="important"><p>total</p></td>
<td class="important"><p><?php
echo formatVariable($therecord["due"], "currency");
?>
</p></td>
</tr>
</tbody>
</table>
<?php
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:56,代码来源:class.php
示例15: showRecords
function showRecords()
{
$rownum = 1;
$this->db->seek($this->queryresult, 0);
//groupings
if ($this->showGroupings) {
for ($i = 0; $i < count($this->thegroupings); $i++) {
$this->thegroupings[$i]["theValue"] = "";
}
}
while ($therecord = $this->db->fetchArray($this->queryresult)) {
// more groupings
if ($this->showGroupings) {
for ($i = 0; $i < count($this->thegroupings); $i++) {
if ($this->thegroupings[$i]["theValue"] != $therecord["_group" . ($i + 1)]) {
$this->thegroupings[$i]["theValue"] = $therecord["_group" . ($i + 1)];
?>
<tr class="queryGroup"><td colspan = "<?php
echo count($this->thecolumns);
?>
" <?php
if ($i) {
echo 'style = "padding-left:' . $i * 15 . 'px"';
}
?>
>
<?php
if ($this->thegroupings[$i]["displayname"]) {
echo htmlQuotes($this->thegroupings[$i]["displayname"] . ": ");
}
echo $therecord["_group" . ($i + 1)];
?>
</td></tr><?php
$rownum = 1;
}
//endif
}
//endfor
}
//endif
?>
<tr id="<?php
echo $this->uniqueName . ":" . $therecord["theid"];
?>
" class="qr<?php
echo $rownum;
?>
"><?php
if ($rownum == 1) {
$rownum++;
} else {
$rownum = 1;
}
foreach ($this->thecolumns as $thecolumn) {
?>
<td align="<?php
echo $thecolumn["align"];
?>
" <?php
if (!$thecolumn["wrap"]) {
echo "nowrap=\"nowrap\"";
}
?>
><?php
echo $therecord[$thecolumn["name"]] !== "" ? formatVariable($therecord[$thecolumn["name"]], $thecolumn["format"]) : " ";
?>
</td><?php
}
//endforeach
?>
</tr><?php
}
//endwhile
}
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:74,代码来源:search_class.php
示例16: generate
/**
* function generate
*
* Creates the main part of the report (table)
*/
function generate()
{
$fromFields = "*";
$columns = array();
foreach ($this->settings as $key => $value) {
if (strpos($key, "column") === 0) {
$pos = substr($key, 6) - 1;
$columns[$pos]["field"] = $value;
if (isset($this->settings["titleColumn" . ($pos + 1)])) {
$columns[$pos]["title"] = $this->settings["titleColumn" . ($pos + 1)];
} else {
$columns[$pos]["title"] = "";
}
}
//endif
}
//endforeach
if (count($columns)) {
ksort($columns);
$columns = array_reverse($columns);
$fromFields = "";
foreach ($columns as $column) {
$fromFields .= ", " . $column["field"];
if ($column["title"]) {
$fromFields .= " AS `" . $column["title"] . "`";
}
$fromFields .= "\n";
}
//endforeach
$fromFields = substr($fromFields, 1);
}
//endif
if (isset($this->settings["fromTable"])) {
$querytable = $this->settings["fromTable"];
} else {
$querytable = $this->maintable;
}
$querystatement = "\n SELECT\n " . $fromFields . "\n FROM\n " . $querytable;
$querystatement = $this->assembleSQL($querystatement);
$queryresult = $this->db->query($querystatement);
$num_fields = $this->db->numFields($queryresult);
if (!isset($this->settings["reportTitle"])) {
$this->settings["reportTitle"] = $this->displayname;
}
ob_start();
?>
<div id="container">
<h1><?php
echo formatVariable($this->settings["reportTitle"]);
?>
</h1>
<table id="results">
<thead>
<tr>
<?php
for ($i = 0; $i < $num_fields; $i++) {
?>
<th <?php
if ($i == $num_fields - 1) {
echo 'id="lastHeader"';
}
?>
><?php
echo $this->db->fieldName($queryresult, $i);
?>
</th>
<?php
}
//end for
?>
</tr>
</thead>
<tbody>
<?php
while ($therecord = $this->db->fetchArray($queryresult)) {
?>
<tr><?php
foreach ($therecord as $value) {
?>
<td><?php
echo formatVariable($value);
?>
</td><?php
}
//end foreach
?>
</tr><?php
}
//endwhile
?>
</tbody>
</table>
</div>
<?php
//.........这里部分代码省略.........
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:101,代码来源:general_tableprint.php
-
PacktPublishing/Python-Machine-Learning-Second-Edition: Python Machine Learning
阅读:969|2022-08-18
-
sussillo/hfopt-matlab: A parallel, cpu-based matlab implemention of the Hessian
阅读:993|2022-08-17
-
win7系统电脑使用过程中有不少朋友表示遇到过win7系统USB驱动器RAM的状况,当出现win7
阅读:885|2022-11-06
-
emersion/go-ostatus: An OStatus library written in Go
阅读:751|2022-08-17
-
The vCenter Server contains a server-side request forgery (SSRF) vulnerability.
阅读:1064|2022-07-29
-
elipapa/markdown-cv: a simple template to write your CV in a readable markdown f
阅读:509|2022-08-17
-
zju-sclab/NDT-library: These is ndt library for ndt_mapping and ndt_localization
阅读:732|2022-08-16
-
Call Me Maybe 中英字幕 对于加拿大歌手卡莉·蕾·吉普森很多人有些陌生,她隶属于贾
阅读:628|2022-11-06
-
TComponent类TComponent类直接由TPersistent派生。TComponent的独特特征是它的属性能
阅读:892|2022-07-18
-
drac/Material-Design-Color-Palette-for-Inkscape: Google Material Design Color Pa
阅读:364|2022-08-17
|
请发表评论