本文整理汇总了PHP中printTable函数的典型用法代码示例。如果您正苦于以下问题:PHP printTable函数的具体用法?PHP printTable怎么用?PHP printTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printTable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: printModelInfo
function printModelInfo($table, $source, $relationships, $columns)
{
echo '<h2>Model Info</h2>';
printTable($table);
printSource($source);
printRelationships($relationships);
printColumns($columns);
}
开发者ID:nanotech,项目名称:recess,代码行数:8,代码来源:classInfo.html.php
示例2: printBallPopularity
function printBallPopularity($orderBy, $showTop)
{
$conn = connectToDatabase();
$query = "SELECT roll.Ball_ID, Count(roll.Ball_ID) as numOfRolls, ball.Color, ball.Weight, ball.Size\n FROM roll, ball\n WHERE roll.Ball_ID = ball.Ball_ID\n GROUP by Ball_ID\n ORDER BY COUNT(Ball_ID) {$orderBy} LIMIT {$showTop}";
$result = $conn->query($query);
printTable($result);
$conn->close();
}
开发者ID:robert-vo,项目名称:Bowling-Score-Tracking-System,代码行数:8,代码来源:ballReport.php
示例3: showSchedule
function showSchedule($array, $month, $teamName)
{
/*$exists = FALSE;
foreach($array as $value)
{
if($month!= 'NULL')
if($teamName !== 'NULL')
if($value['Visitor'] == $teamName || $value['Home'] == $teamName)
$exists = TRUE;
else
{
}
else
$exists = TRUE;
}
if($exists == TRUE)
{*/
echo '<table class = "table" style = "text-align:center; margin: 0 auto;" border="1">';
echo '<tr>';
echo "<td>Date</td>";
echo "<td>Logo</td>";
echo "<td>Visitor</td>";
echo "<td>PTS Away</td>";
echo "<td>Logo</td>";
echo "<td>Home</td>";
echo "<td>PTS Home</td>";
foreach ($array as $value) {
if ($month != 'NULL') {
if (strpos($value['Date'], $month) !== False) {
if ($teamName !== 'NULL') {
if ($value['Visitor'] == $teamName) {
printTable($value);
} else {
if ($value['Home'] == $teamName) {
printTable($value);
}
}
} else {
if (strpos($value['Visitor'], $month) !== False) {
} else {
printTable($value);
}
}
}
} else {
if ($value['Visitor'] == $teamName) {
printTable($value);
} else {
if ($value['Home'] == $teamName) {
printTable($value);
}
}
}
}
echo '</table>';
//}
}
开发者ID:TeamBall,项目名称:CapstoneProject,代码行数:58,代码来源:schedule.php
示例4: printTable
printTable($query, $prevparam, $nextparam, $search);
} else {
if ($request == "BAND") {
$id = $_GET['i'];
$prev = $start - $sizelimit;
if ($prev < 0) {
$prev = 0;
}
$prevparam = "r={$request}&i={$id}&s={$prev}";
$next = $start + $sizelimit;
$nextparam = "r={$request}&i={$id}&s={$next}";
$query = $basequery . "WHERE v.BandID = {$id} AND v.Approved = 1 ORDER BY BandYear DESC";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$search = $row['School'];
printTable($query, $prevparam, $nextparam, $search);
}
}
}
}
}
// Prints the actual interface for the user.
// @Input $query - The SQL query to get the list of Videos to display. Must return
// BandID, School, VideoURL, Title, Name, BandYear, and FestivalID
// @Input $prevparam - The GET parameter for the 'Previous Page' link. Specific to the query type
// @Input $nextparam - The GET parameter for the 'Next Page' link. Specific to the query type
// @Input $search - What terms were searched for. Specific to the query type.
function printTable($query, $prevparam, $nextparam, $search)
{
global $start, $sizelimit;
require "../connection.inc.php";
开发者ID:mover5,项目名称:imobackup,代码行数:31,代码来源:videopage.php
示例5: explode
$boardCells = explode('-', $boardRow);
if (count($boardCells) != 8) {
invalidBoard();
}
foreach ($boardCells as $piece) {
if (strpos("RHBKQP ", $piece) === false) {
invalidBoard();
}
if (empty($piecesCount[$piece])) {
$piecesCount[$piece] = 0;
}
$piecesCount[$piece]++;
}
$board[] = $boardCells;
}
printTable($board);
$pieceMapping = ['B' => "Bishop", 'H' => "Horseman", 'K' => "King", 'P' => "Pawn", 'Q' => "Queen", 'R' => "Rook"];
$piecesForPrint = [];
foreach ($pieceMapping as $pieceLetter => $pieceName) {
if (isset($piecesCount[$pieceLetter])) {
$piecesForPrint[$pieceName] = $piecesCount[$pieceLetter];
}
}
echo json_encode($piecesForPrint);
function printTable($matrix)
{
echo '<table>';
for ($row = 0; $row < count($matrix); $row++) {
echo '<tr>';
for ($col = 0; $col < count($matrix[$row]); $col++) {
echo '<td>' . htmlspecialchars($matrix[$row][$col]) . '</td>';
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:31,代码来源:PHPChess.php
示例6: getFiles
<?
$filesArray = getFiles();
// SORT according to links...
if ($_GET['sort'] == 'size'){
echo "sort by size";
/* usort($filesArray, function($a,$b){
if($a["size"] == $b["size"]) {
return 0;
}
return ($a["size"] < $b["size"]) ? -1 : 1;
}*/
}
printTable($filesArray);
function getFiles(){
$dirname = 'uploads/';
$dir = 'uploads/*';
$files = array();
$finfo = finfo_open(FILEINFO_MIME_TYPE);
foreach (glob($dir) as $file){
$t = date("M j, Y g:i a", filemtime($file));
$m = finfo_file($finfo, $file);
$m = getMime($m);
$s = filesize($file);
$n = basename($file);
$href = "$dirname$n";
echo $s;
$files[] = array("href"=>$href,"name"=>$n, "size"=>$s, "mime"=>$m, "time"=>$t);
开发者ID:rbirky1,项目名称:cmsc433-php-fileManager,代码行数:31,代码来源:index_2.php
示例7: json_decode
<?php
$input = json_decode($_GET['jsonTable']);
//$input = [["god","save","the","queen"],[7,2]];
$maxCols = 0;
//var_dump($input); //Uncomment this to see the input
foreach ($input[0] as $key => $line) {
$input[0][$key] = AffineEncrypt($line, $input[1][0], $input[1][1]);
$maxCols = max(strlen($line), $maxCols);
}
printTable($input, $maxCols);
function AffineEncrypt($plainText, $k, $s)
{
$cipherText = "";
// Put Plain Text (all capitals) into Character Array
$chars = str_split(strtoupper($plainText));
// Compute e(x) = (kx + s)(mod m) for every character in the Plain Text
foreach ($chars as $c) {
$x = ord($c) - 65;
if ($x < 0) {
$cipherText .= $c;
} else {
$cipherText .= chr(($k * $x + $s) % 26 + 65);
}
}
return $cipherText;
}
function printTable($input, $maxCol)
{
echo "<table border='1' cellpadding='5'>";
foreach ($input[0] as $key => $value) {
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:31,代码来源:affine-encoder.php
示例8: pg_connect
}
?>
<body>
<?php
require "../connectionStrings.php";
// create connection
$connection = pg_connect($pgConnectStr1);
if (!$connection) {
echo "Couldn't make a connection!";
exit;
}
// test connection
if (!$connection) {
echo "Couldn't make a connection!";
exit;
}
// create SQL statement
$sql = "select * from xmipp_users order by my_date";
// execute SQL query and get result
//$sql_result = pg_exec($connection,$sql);
if (!($result = pg_query($sql))) {
print "Query could not be executed.\n";
}
$r = printTable($result);
pg_close($connection);
?>
</body>
开发者ID:josegutab,项目名称:scipion,代码行数:30,代码来源:ver.php
示例9: printTable
function printTable($data, $fields, $row_classes, $cat, $child = 0)
{
foreach ($data as $count => $row) {
?>
<tr
class="
ds-list-item-new level-<?php
print $child;
?>
<?php
/* print ($child == 0?'ds-list-item-new':''); */
?>
">
<?php
printRow($row, $fields, $cat, $child + 1);
if (!empty($row['child'])) {
?>
</tr>
<?php
printTable($row['child'], $fields, $row_classes, $cat, $child + 1);
} else {
?>
</tr>
<?php
}
}
}
开发者ID:maduhu,项目名称:opengovplatform-beta,代码行数:28,代码来源:views-view-table--agency-wise-report--page-3.tpl.php
示例10: while
print "</mrow>\n\n";
} while ($row = pg_fetch_assoc($result));
print "</wholething>";
return true;
//close out the table:
}
// create connection
require "../connectionStrings.php";
$connection = pg_connect($pgConnectStr1);
if (!$connection) {
echo "Couldn't make a connection!";
exit;
}
// test connection
if (!$connection) {
echo "Couldn't make a connection!";
exit;
}
// create SQL statement
$sql = "select * from xmipp_users order by my_date limit 3";
// execute SQL query and get result
//$sql_result = pg_exec($connection,$sql);
if (!($result = pg_query($sql))) {
print "Query could not be executed.\n";
}
$Nrows = pg_num_rows($result);
$r = printTable($result, $Nrows);
pg_close($connection);
?>
开发者ID:josegutab,项目名称:scipion,代码行数:29,代码来源:xml.php
示例11: printTable
function printTable($data, $fields, $row_classes, $cat, $child = 0)
{
foreach ($data as $count => $row) {
?>
<tr class="<?php
print implode(' ', $row_classes[$count]);
?>
ds-list-item-new level-<?php
print $child;
?>
" >
<?php
printRow($row, $fields, $cat, $child + 1);
?>
</tr>
<?php
if (!empty($row['child'])) {
printTable($row['child'], $fields, $row_classes, $cat, $child + 1);
}
}
}
开发者ID:maduhu,项目名称:opengovplatform-beta,代码行数:22,代码来源:views-view-table--agency-wise-report--page-2.tpl.php
示例12: generateXML
function generateXML()
{
global $keywords, $from, $to, $condition, $seller, $buyingFormats, $handlingTime, $sortBy, $resultsPerPage, $url, $xml;
$length = 0;
$i = 0;
$keyword = "";
if (isset($_GET["search"])) {
$keywords = $_GET["keywords"];
$keyword = urlencode($keywords);
$string = "&keywords=" . $keyword;
if (isset($_GET["from"]) && $_GET["from"] != "") {
$from = $_GET["from"];
append($string, $i, "MinPrice", $from, 0);
}
if (isset($_GET["to"]) && $_GET["to"] != "") {
$to = $_GET["to"];
append($string, $i, "MaxPrice", $to, 0);
}
if (isset($_GET["condition"])) {
$condition = $_GET["condition"];
$length = count($condition);
append($string, $i, "Condition", $condition, $length);
}
if (isset($_GET["buyingFormats"])) {
$buyingFormats = $_GET["buyingFormats"];
$length = count($buyingFormats);
append($string, $i, "ListingType", $buyingFormats, $length);
}
if (isset($_GET["returnAccepted"])) {
append($string, $i, "ReturnsAcceptedOnly", "true", 0);
}
if (isset($_GET["freeShipping"])) {
append($string, $i, "FreeShippingOnly", "true", 0);
}
if (isset($_GET["expeditedShipping"])) {
append($string, $i, "ExpeditedShippingType", "Expedited", 0);
}
if (isset($_GET["handlingTime"]) && $_GET["handlingTime"] != "") {
$handlingTime = $_GET["handlingTime"];
append($string, $i, "MaxHandlingTime", $handlingTime, 0);
}
$sortBy = $_GET["sortBy"];
$string .= "&sortOrder=" . $sortBy;
$resultsPerPage = $_GET["resultsPerPage"];
$string .= "&paginationInput.entriesPerPage=" . $resultsPerPage;
$url .= $string;
$xml = simplexml_load_file($url);
//print_r($xml);
printTable();
}
}
开发者ID:saileshsidhwani,项目名称:WebTechnologies,代码行数:51,代码来源:hw6php.php
示例13: printTable
</div>
<div class="content">
<h1>Ingredients</h1>
<form action="addIngredient.php">
<button type="submit">Add Ingredient</button>
</form>
<br>
<form action="ingredients.php" method="post">
<input type="text" name="searchInput">
<button type="submit">SEARCH INGREDIENTS</button>
</form>
<br>
<?php
require_once 'functions.php';
$db = (require "../php/loadDB.php");
$notSearched = true;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$searchValue = $_POST["searchInput"];
$query = "SELECT * FROM ingredients WHERE name = \"{$searchValue}\"";
$notSearched = false;
} else {
$query = "SELECT * FROM ingredients";
}
printTable($db->query($query), "name", "unit_measure", $notSearched);
?>
</div>
</body>
</html>
开发者ID:madmandrew,项目名称:madmandrew.github.io,代码行数:30,代码来源:ingredients.php
示例14: elseif
// Get the table header
if (get_class($data) == "TE") {
$thead = $tableTE;
} elseif (get_class($data) == "PP") {
$thead = $tablePP;
}
$user = new User($review->user);
// Get the table data
if (get_class($data) == "TE") {
$tdata[] = array(1 => $user->real_name, 2 => $data->s1, 3 => $data->s2, 4 => $data->s3, 5 => $data->s4, 6 => $data->s6);
} elseif (get_class($data) == "PP") {
$tdata[] = array(1 => $user->real_name, 2 => $data->s1, 3 => $data->s2, 4 => $data->s3, 5 => $data->s4);
}
}
// Print table
printTable($thead, $tdata);
// Print comments
$comments = $submission->getComments();
echo "<br><br>";
echo "Student comment: ";
if (isset($comments[0])) {
echo $comments[0]->data;
}
echo "<br>Uploaded files: ";
echo "<br><br>";
//TODO Name of uploaded files regarding this submission
foreach ($submission->getReview() as $key => $value) {
// Get the review
$id = $submission->getLatestReview($key);
$review = $submission->getReview($id);
echo "<br>Overall comments and feedback: " . $review->data->feedback;
开发者ID:RosanderOliver,项目名称:DV1512_Projekt_HT2015,代码行数:31,代码来源:examinatorgrading.php
示例15: printTable
public function printTable($ladderkey)
{
printTable($this->connector->getStats($ladderkey));
return 1;
}
开发者ID:arihosu,项目名称:osu-ladders,代码行数:5,代码来源:Core.php
示例16: slots
<script src="https://gist.github.com/viion/8e419153efe929c1216e.js"></script>
<!-- Variables -->
<div class="docline"></div>
<h4>Variables</h4>
<table class="doctable" cellspacing="0" cellpadding="0" border="0">
<tr class="header">
<td>parameter</td>
<td>type</td>
<td>description</td>
</tr>
<?php
$table = [['AchievementCategories', 'array', 'Array containing a list of achievement categories.'], ['ClassList', 'array', '...'], ['ClassDisicpline', 'array', '...'], ['GearSlots', 'array', 'Array containing gear slots (as strings),'], ['Characters', 'array', 'Array containing Character objects for any characters searched.'], ['Achievements', 'array', 'Array containing character achievements, the list datatype is Achievement object'], ['Search', 'array', 'Array containing the results of any current search'], ['FreeCompanyList', 'array', 'Array containing Freecompany objects for any FCs searched.'], ['FreeCompanyMembersList', 'array', 'Array containing characters to an FC.'], ['Linkshells', 'array', 'Array containing Linkshell objects for any LSs searched.']];
printTable($table);
?>
</table>
<!-- Functions -->
<div class="docline"></div>
<h4>Functions</h4>
<table class="doctable" cellspacing="0" cellpadding="0" border="0">
<tr class="header">
<td>function</td>
<td>return</td>
<td>description / code gist</td>
</tr>
<?php
$table = [['__construct()', '-', '...'], 'Quick Functions <span style="opacity:0.5;">*recommended</span>', ['get()', '(object) Character', 'Get a Character object. Pass in an array containing either Name/Server OR id. <script src="https://gist.github.com/viion/ee039dffea7d43b59e1a.js"></script>'], ['getFC()', '(object) FreeCompany', 'Get a FreeCompany object. Pass in an array containing either Name/Server OR id. An $Options param can be parsed to state whether to fetch members or not. <script src="https://gist.github.com/viion/a3c884a133b408b88a3a.js"></script>'], ['getLS()', '(object) Linkshell', 'Get a Linkshell object. Pass in an array containing either Name/Server OR id. <script src="https://gist.github.com/viion/b6152fe131d12a84d865.js"></script>'], 'Access Functions', ['Lodestone()', '(object) Lodestone', 'Get access to the Lodestone class, for parsing specific stuff off the Lodestone Website. <script src="https://gist.github.com/viion/be3d73d69e687f1bd9b3.js"></script>'], ['Social()', '(object) Social', 'Get access to the Social class, for parsing Twitter and Youtube. <script src="https://gist.github.com/viion/78cf75b00a8853ba98a0.js"></script>'], 'Search', ['searchCharacter()', '(object) Character', 'Search a Character. <script src="https://gist.github.com/viion/44113b3a20e4f6a1a27b.js"></script>'], ['searchFreeCompany()', '(object) Freecompany', 'Search a Free Company. <script src="https://gist.github.com/viion/a5cf91ff0f94c78d69e0.js"></script>'], ['searchLinkshell()', '(object) Linkshell', 'Search a Linkshell. <script src="https://gist.github.com/viion/bf5f4b7e531bb91bcbac.js"></script>'], 'Search return', ['getSearch()', 'array', 'Get an array containing the latest search results. This is used in the previous 3 search<Type>() code examples above.'], ['errorPage()', 'boolean', 'This function is not recommended, a simple conditional check is more practical and readable: <script src="https://gist.github.com/viion/bccd377ac077cf43cd83.js"></script>'], 'Character', ['parseProfile()', '-', 'Parse a characters profile via their lodestone ID. <script src="https://gist.github.com/viion/0ebcca0c48b89f584ab6.js"></script>'], ['parseBiography()', '-', 'Parse a characters biography via their lodestone ID. <script src="https://gist.github.com/viion/c8611e5d9e56cbd5811a.js"></script>'], ['getCharacters()', 'array of (object) Character', 'Get an array containing Character objects for all parsed Characters.'], ['getCharacterByID()', '(object) Character', 'Get a Character object via its ID.'], 'Achievements', ['parseAchievements()', '-', 'Parse a characters achievements via their lodestone ID'], ['parseAchievementsByCategory()', '-', 'Parse an achievements catagory of a character via their lodestone ID'], ['getAchievements()', 'array of (object) Achievement', 'Get an array containing Character objects for all parsed Characters.'], ['getAchievementCategories()', '(object) Achievement', 'Get a list of achievement categories (an array of strings)'], 'FreeCompany', ['parseFreeCompany()', '-', 'Parse a FreeCompany via its lodestone ID'], ['getFreeCompanies()', 'array of (object) FreeCompany', 'Gets an array containing FreeCompany objects for all parsed Free Companies.'], ['getFreeCompanyByID()', '(object) FreeCompany', 'Gets a FreeCompany object via its ID.'], 'Linkshell', ['parseLinkshell()', '-', 'Parse a Linkshell via its lodestone ID'], ['getLinkshells()', 'array of (object) Linkshell', 'Gets an array containing Linkshell objects for all parsed Linkshells.'], ['getLinkshellByID()', '(object) Linkshell', 'Gets a Linkshell object via its ID.']];
printTable($table);
?>
</table>
开发者ID:petarfitzpatrick,项目名称:FinalFantasyAPI,代码行数:31,代码来源:api.php
示例17: minpp
function minpp()
{
$min = executePlainSQL("SELECT * FROM moves m1 WHERE m1.pp <= ALL (SELECT m2.pp FROM MOVES m2)");
printTable($min);
}
开发者ID:PrestonChang,项目名称:PokemonDatabase,代码行数:5,代码来源:moves.php
示例18: nzbmatrix
function nzbmatrix($item, $nzbusername, $nzbapi, $saburl, $sabapikey)
{
$type = !empty($_GET['type']) ? "&catid=" . $_GET['type'] : "";
$search = "https://api.nzbmatrix.com/v1.1/search.php?search=" . urlencode($item) . $type . "&num=50&username=" . $nzbusername . "&apikey=" . $nzbapi;
$content = file_get_contents($search);
$itemArray = explode('|', $content);
$table = "";
if ($itemArray["0"] != 'error:nothing_found') {
foreach ($itemArray as &$x) {
$item = explode(';', $x);
if (isset($item[1])) {
$id = "ID: " . substr($item[0], 6);
$name = substr($item[1], 9);
$link = "http://www." . substr($item[2], 6);
$size = 0 + substr($item[3], 6);
$size = $size;
$cat = substr($item[6], 10);
$addToSab = $saburl . "api?mode=addurl&name=http://www." . substr($link, 6) . "&nzbname=" . urlencode($name) . "&output=json&apikey=" . $sabapikey;
$indexdate = "Index Date: " . substr($item[4], 12);
$group = "Group: " . substr($item[7], 7);
$comments = "Comments: " . substr($item[8], 10);
$hits = "Hits: " . substr($item[9], 6);
$nfo = "NFO: " . substr($item[10], 5);
$weblink = substr($item[11], 9);
$image = substr($item[13], 7);
$item_desc = "<p>Name: " . $name . "</p><p>" . $id . "</p><p>" . $group . "</p><p>" . $comments . "</p><p>" . $hits . "</p><p>" . $nfo . "</p><p>" . $indexdate . "</p>";
$addToSab = addCategory($cat, $addToSab);
if (strlen($name) != 0) {
$table .= printTable($name, $cat, $size, $addToSab, $link, $item_desc, $image, $weblink);
}
}
}
}
return $table;
}
开发者ID:rodneyshupe,项目名称:mediafrontpage,代码行数:35,代码来源:query.php
示例19: json_decode
<?php
$input = json_decode($_GET['jsonTable']);
list($minRow, $minCol, $maxRow, $maxCol) = findLargestRectangularArea($input);
printTable($input, $minRow, $minCol, $maxRow, $maxCol);
function findLargestRectangularArea($input)
{
$maxArea = 0;
$result = false;
for ($minRow = 0; $minRow < count($input); $minRow++) {
for ($maxRow = $minRow; $maxRow < count($input); $maxRow++) {
for ($minCol = 0; $minCol < count($input[$minRow]); $minCol++) {
for ($maxCol = $minCol; $maxCol < count($input[$minRow]); $maxCol++) {
if (isRectangle($input, $minRow, $minCol, $maxRow, $maxCol)) {
$area = ($maxRow - $minRow + 1) * ($maxCol - $minCol + 1);
if ($area > $maxArea) {
$maxArea = $area;
$result = [$minRow, $minCol, $maxRow, $maxCol];
}
}
}
}
}
}
return $result;
}
function isRectangle($input, $minRow, $minCol, $maxRow, $maxCol)
{
$value = $input[$minRow][$minCol];
for ($col = $minCol; $col <= $maxCol; $col++) {
if ($input[$minRow][$col] != $value) {
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:31,代码来源:LargestRectangle.php
示例20: die
break;
case "Set On":
$fullURL = $baseURL . '/gpio/1';
break;
case "Set Off":
$fullURL = $baseURL . '/gpio/0';
break;
}
} else {
die('Something not right!');
}
} else {
die('Password is wrong!');
}
}
printTable($conn, getTable($conn));
?>
<div> Add Query to Schedule:
<form id="addQuery" action="dude.php" method="POST">
<input type="hidden" name="Command" value="Add">
Name:<input list="names" name="myName" value="Amir">
<datalist id="names">
<option value="Amir">
<option value="Batia">
</datalist> <br>
Repeat:<input list="toRepeat" name="myRepeat" value="Once">
<datalist id="toRepeat">
<option value="Once">
<option value="Daily">
</datalist> <br>
Starting Date: :<input type="date" name="startDate" value="<?php
开发者ID:deepweeb,项目名称:ESP8266-Water-Heater-Control,代码行数:31,代码来源:dude.php
注:本文中的printTable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论