本文整理匯總了PHP中printRow函數的典型用法代碼示例。如果您正苦於以下問題:PHP printRow函數的具體用法?PHP printRow怎麽用?PHP printRow使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了printRow函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: printDerangement
function printDerangement($derangement, $settings)
{
foreach ($settings->derangements as $m) {
if ($derangement->id == $m->id) {
printRow($derangement, $m);
}
}
}
示例2: printBalanceStatements
function printBalanceStatements($net)
{
$receipts = sprintf("%.2f", runQuery("Select SUM(r_amount) as amt from f_receivables where r_date like '%2015%'", 'amt'));
$payables = sprintf("%.2f", runQuery("Select SUM(p_amount) as amt from f_payables where p_date like '%2015%'", 'amt'));
$gross = $net + $receipts - $payables;
echo "<table class=ptables>\n";
printRow("Mini Balance Sheet", '', '', 'H');
printRow("Cash and Equivalents", '', $net);
printRow("Accounts Receivables", '', $receipts);
printRow("Accounts Payables", $payables, '');
printRow("Net Assets", '', $gross, 'H');
echo "</table>";
}
示例3: echoInitialVersionRows
function echoInitialVersionRows($version)
{
if ($version < 1) {
printRow('Pre-v1.4.0');
}
if ($version < 140) {
printRow('v1.4.0');
}
if ($version < 141) {
printRow('v1.4.1');
}
if ($version < 150) {
printRow('v1.5.0');
}
if ($version < 160) {
printRow('v1.6.0');
}
if ($version < 161) {
printRow('v1.6.1');
}
if ($version < 170) {
printRow('v1.7.0');
}
if ($version < 200) {
printRow('v2.0.0');
}
if ($version < 201) {
printRow('v2.0.1');
}
if ($version < 210) {
printRow('v2.1.0');
}
if ($version < 211) {
printRow('v2.1.1');
}
if ($version < 220) {
printRow('v2.2.0');
}
if ($version < 221) {
printRow('v2.2.1');
}
if ($version < 230) {
printRow('v2.3.0');
}
if ($version < 231) {
printRow('v2.3.1');
}
if ($version < 232) {
printRow('v2.3.2');
}
}
示例4: printRow
printRow($e_vals['HUMIDIFIER:ELECTRICITY']);
?>
</tr>
<tr class="table-row-even">
<th> Regrigeration
</th>
<?php
printRow($e_vals['HEATRECOVERY:ELECTRICITY']);
?>
</tr>
<tr class="table-row-even">
<th> Generation
</th>
<?php
printRow($e_vals['HEATRECOVERY:ELECTRICITY']);
?>
</tr>
</table>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- load highchart libs -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/Highcharts-3.0.4/js/highcharts.js"></script>
<script src="js/Highcharts-3.0.4/js/modules/exporting.js"></script>
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
示例5: printRowHeader
<?php
printRowHeader();
?>
<?php
printRow($bees, 'workers');
?>
</table>
</div>
<div class="col-md-4">
<h2>Drones</h2>
<table class="table table-bordered table-responsive" width="100%">
<?php
printRowHeader();
?>
<?php
printRow($bees, 'drone');
?>
</table>
</div>
</div>
<div class="text-center">
<form action="javascript:void(0)" method="post" role="form">
<button type="button" id="hit-button" class="btn btn-primary">Hit!</button>
<button type="button" id="reset-button" class="btn btn-danger">Reset</button>
</form>
</div>
<br>
<div id="result"></div>
示例6: htmlPrinter
function htmlPrinter($endpoints)
{
global $options;
$a = '<html>
<head>
<title>Bio2RDF Release ' . $options['r'] . '</title>
<link rel="stylesheet" type="text/css" href="http://134.117.53.12/lib/datatables/css/jquery.dataTables.css"/>
<link rel="stylesheet" type="text/css" href="http://134.117.53.12/lib/datatables/css/code.css"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://134.117.53.12/lib/datatables/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("table").dataTable({
"bInfo":false,
"bPaginate":false,
"aaSorting":[[0,"asc"]]
});
});
</script>
<style type="text/css">
#logo{
display:block;
margin-left:auto;
margin-right:auto;
}
#release{
margin-left:20%;
margin-right:20%;
font-size: 120%;
color:#039;
font-weight:bold;
}
body {
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 10px;
color:#174e74;
}
#links{
background: #fff;
margin-left:auto;
margin-right:auto;
text-align: center;
}
#tableContainer {
margin:0 auto;
padding-bottom: 20px;
padding-top: 50px;
width: 80%;
}
</style>
</head>
<body>
<a href="http://bio2rdf.org"><img alt="Bio2RDF Homepage" id="logo" src="https://googledrive.com/host/0B3GgKfZdJasrRnB0NDNNMFZqMUk/bio2rdf_logo.png" height="80px"/></a>
<div id="links">
<h3>Linked Data for the Life Sciences</h3>
<h2>-Release ' . $options['r'] . '-</h2>
<h2>[<a href="http://bio2rdf.org" target="_blank">website</a>]
[<a href="http://download.bio2rdf.org/release/' . $options['r'] . '/release.html" target="_blank">datasets</a>]
[<a href="http://github.com/bio2rdf/bio2rdf-scripts/wiki" target="_blank">documentation</a>]
</h2>
</div>
<div id="tableContainer">
<table class=\\"hor-minimalist-a\\">
<thead>
<tr>
<th width=\\"40\\"></th>
<th width=\\"300\\">Dataset</th>
<th width=\\"100\\">Date generated</th>
<th width=\\"100\\"># of triples</th>
<th width=\\"100\\"># of unique entities</th>
<th width=\\"100\\"># of unique subjects</th>
</tr>
</thead>
';
$i = 0;
// initialize totals
$options['totals']['triples'] = 0;
$options['totals']['entities'] = 0;
$options['totals']['subjects'] = 0;
ksort($endpoints);
foreach ($endpoints as $e => $endpoint_details) {
if ($options['endpoint'] && $options['endpoint'] != $e) {
continue;
}
$i++;
$a .= printRow($endpoint_details, $i);
}
$a .= "\n <tr class=\"total\">\n\t<td></td>\n\t<td></td>\t\n\t<td></td>\n\t<td>" . $options['totals']['triples'] . "</td>\n\t<td>" . $options['totals']['entities'] . "</td>\n\t<td>" . $options['totals']['subjects'] . "</td>\n </tr>";
$a .= "\n</table>\n<br>last updated on " . date("d-m-Y", mktime()) . "\n</body>\n</html>";
return $a;
//.........這裏部分代碼省略.........
示例7: printRow
<?php
printRow($gas_tariff['Adjustment (~~$~~)']);
?>
</tr>
<tr class="table-row-odd">
<th> Taxes ($)
</th>
<?php
printRow($gas_tariff['Taxes (~~$~~)']);
?>
</tr>
<tr class="table-row-odd">
<th> Total ($)
</th>
<?php
printRow($gas_tariff['Total (~~$~~)']);
?>
</tr>
</table>
</div>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- load highchart libs -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/Highcharts-3.0.4/js/highcharts.js"></script>
示例8: addColumn
function addColumn($table, $column_name, $column_info = '', $after = '')
{
global $mainframe;
$database =& JFactory::getDBO();
$db_prefix = $mainframe->getCfg('dbprefix');
$database->setQuery('SHOW COLUMNS FROM #__mt_' . $table . ' LIKE "' . $column_name . '"');
$tmp = $database->loadResult();
if ($tmp == $column_name) {
printRow('Skipped column:' . $column_name . ' already exists.', 0);
return false;
} else {
$sql = 'ALTER TABLE #__mt_' . $table . ' ADD `' . $column_name . '` ' . $column_info;
if (!empty($after)) {
$sql .= ' AFTER `' . $after . '`';
}
$database->setQuery($sql);
if ($database->query()) {
printRow('Added column:' . $column_name . ' to table: ' . $db_prefix . 'mt_' . $table);
return true;
} else {
printRow($database->getErrorMsg() . -1);
return false;
}
}
}
示例9: session_start
<?php
# This form allows to enter a date. After submitting, all Bank and Cash Account-balances get
# printed seperated by Projects.
session_start();
require "accrp.php";
require "security/secure.php";
beginDocument("list Cash and Bank", $sess_user);
if ($date) {
$ac1 = get_ac_array(1);
foreach ($ac1 as $key => $prj_desc) {
$accounts = new BankAndCashAccounts_byProject($key, $date, "c");
beginPrettyTable(4, "{$prj_desc}");
printRow(array("Account", "Balance"));
while ($row = $accounts->getNext()) {
printRow(array($row["AC5_DESC"], $accounts->getActualBalance() . " "), "irgendwas");
}
printRow(array("Sum", $accounts->getSum()));
endPrettyTable();
}
} else {
openForm("enter Date", $PHP_SELF);
beginPrettyTable("2", "list bank and cash");
makeTextField("date", get_today_hrd_string(), "Date:");
makeSubmitter();
endPrettyTable();
closeForm();
}
endDocument();
示例10: Exception
echo " {$v->value};\n";
}
try {
$client->get($t, $row, "entry:foo");
throw new Exception("shouldn't get here! ");
} catch (NotFound $nf) {
# blank
}
}
$columns = array();
foreach ($client->getColumnDescriptors($t) as $col => $desc) {
echo "column with name: {$desc->name}\n";
$columns[] = $desc->name . ":";
}
echo "Starting scanner...\n";
$scanner = $client->scannerOpenWithStop($t, "00020", "00040", $columns);
try {
while (true) {
printRow($client->scannerGet($scanner));
}
} catch (NotFound $nf) {
$client->scannerClose($scanner);
echo "Scanner finished\n";
}
$transport->close();
?>
</pre>
</body>
</html>
示例11: get_month_name
echo get_month_name($ref_date) . " " . get_year($ref_date) . "</div>";
if ($type == "PF") {
$loan_table = "PF_LOAN";
} else {
if ($type == "CUF") {
$loan_table = "CUF_LOAN";
} else {
die("Loantype unspecified !");
}
}
$result = mysql_query("select * from {$loan_table}", $db);
checkMySQLError();
beginPrettyTable("4", "{$loan_table}");
printRow(array("Emp_ID3", "Emp. Name", "LoanStart", "LoanEnd", "Loan-Amt", "Instalment", "Tot_Amt", "Due", "Balance"));
while ($row = mysql_fetch_array($result)) {
$name = $personal_array[$row["EMP_ID3"]];
$rest_inst_no = datediff("m", $ref_date, $row["LOAN_END"]);
$rest_amount = $rest_inst_no * $row["INT_RATE"];
if ($rest_inst_no < 0) {
continue;
}
$inst_sum += $rest_inst_no;
$rest_amount_sum += $rest_amount;
$loan_amount_sum += $row["LOAN_AMT"];
printRow(array($row["EMP_ID3"], $name, conv_to_hrd($row["LOAN_START"]), conv_to_hrd($row["LOAN_END"]), $row["LOAN_AMT"], $row["INT_RATE"], $row["TOT_AMT"], $rest_inst_no, $rest_amount), "fluct");
}
printRow(array("", "", "Loan-Amt-Sum: ", $loan_amount_sum), "", "3,2");
printRow(array("", "", "Inst-Sum: ", "", $inst_sum), "", "3,2");
printRow(array("", "", "Balance-Sum: ", "", "", "", "", $rest_amount_sum), "", "3,2");
endPrettyTable();
endDocument();
示例12: mysql_query
$orderby = "EMP_ID3";
}
# calculate received money by Employees
$result = mysql_query("select SUM(AMOUNT),AC_ID5 from TRANS WHERE AC_ID3=30 AND DR_CR='C' GROUP BY AC_ID5 order by PARTY", $db);
checkMySQLError();
while ($row = mysql_fetch_array($result)) {
$receive_array[$row["AC_ID5"]] = $row["SUM(AMOUNT)"];
}
# calculate paid_back money
$result = mysql_query("select SUM(AMOUNT),PARTY, AC_ID5 from TRANS WHERE AC_ID3=30 AND DR_CR='D' GROUP BY PARTY order by PARTY", $db);
checkMySQLError();
while ($row = mysql_fetch_array($result)) {
if (array_key_exists($row["AC_ID5"], $receive_array)) {
$receive_array[$row["AC_ID5"]] -= $row["SUM(AMOUNT)"];
}
}
beginPrettyTable("1", "Schedule of Advance as on " . get_today_hrd_string());
if (isset($receive_array)) {
printRow(array("Code", "Employer's name", "Amount"));
foreach ($receive_array as $key => $value) {
if ($value != 0) {
printRow(array("{$key}", get_ac5_desc_of($key), 0 - $value), "something");
}
$sum += 0 - $value;
}
printRow(array("", "Sum", $sum));
} else {
printRow(array("No Advance-money at anybody!"), "");
}
endPrettyTable();
endDocument();
示例13: printf
++$j;
}
if (STATUS_INV != $recv_status) {
++$j;
}
++$i;
printf($template, $i, $a, $b, $c, $d, $e, $send_color, $send_status, $recv_color, $recv_status, $comment);
}
/* ---------------------------------------------------------------------- */
}
/* main --------------------------------------------------------------------- */
$i = 0;
$stats = array();
foreach ($openpgp as $a) {
foreach ($smime as $b) {
foreach ($message as $c) {
foreach ($attachment as $d) {
foreach ($receiver as $e) {
printRow($a, $b, $c, $d, $e, &$i, &$stats, &$result);
}
}
}
}
}
/* -------------------------------------------------------------------------- */
echo "\n";
echo " * Seems to work (<font color='" . COLOR_OK . "'>" . STATUS_OK . "</font>): " . $stats[STATUS_OK] . "\n";
echo " * To be tested (<font color='" . COLOR_TBT . "'>" . STATUS_TBT . "</font>): " . $stats[STATUS_TBT] . "\n";
echo " * Has issues (<font color='" . COLOR_ISSUE . "'>" . STATUS_ISSUE . "</font>): " . $stats[STATUS_ISSUE] . "\n";
//echo " * Not yet implemented (<font color='". COLOR_NYI ."'>" . STATUS_NYI ."</font>): ". $stats[STATUS_NYI] ."\n";
echo " * Combination not possible, out of scope or no testing needed (<font color='" . COLOR_INV . "'>" . STATUS_INV . "</font>): " . $stats[STATUS_INV] . "\n";
示例14: array
<?php
$userInfo = array('Име' => 'Николай Иванов', 'Потребителско Име' => 'mraiur', 'Email' => 'mraiur@gmail.com', 'ID' => '123');
echo "<table border=\"1\">";
foreach ($userInfo as $key => $value) {
printRow($key, $value);
}
echo "</table>";
function printRow($key, $value)
{
echo "<tr>";
echo "<td>" . $key . "</td>";
echo "<td>" . $value . "</td>";
echo "</tr>";
}
示例15: printRow
printRow(array("<hr>"), "", "1,6");
printRow(array("VR No", "VR Date", "Vr Type", "Particulars", "Debit", "Credit"));
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$row["VR_DT"] = conv_to_hrd($row["VR_DT"]);
if ($row["DR_CR"] == "D") {
$row["DR_CR"] = $row["AMOUNT"];
$row["AMOUNT"] = " ";
} else {
$row["DR_CR"] = " ";
}
printRow($row, "fluct");
}
printRow(array("", "", "DebitSum:", get_debit_sum("AC_ID5={$ac_name}", $enddate_srd, $startdate_srd)), "", "1,2");
printRow(array("", "", "CreditSum:", get_credit_sum("AC_ID5={$ac_name}", $enddate_srd, $startdate_srd)), "", "1,3");
printRow(array("<hr>"), "", "1,6");
printRow(array("closing Balance: " . get_closing_balance("AC_ID5={$ac_name}", $enddate_srd)), "", "1,3");
endPrettyTable();
mysql_close($db);
} else {
$ac_array = get_ac5_sc_array("5(1/2)");
?>
<table cellpadding=5 cellspacing=0 border=0 width='100%'>
<tr>
<td valign=top width='15%'>
<?php
beginPrettyTable("1");
?>
<tr>
<?php