本文整理汇总了PHP中table_row函数的典型用法代码示例。如果您正苦于以下问题:PHP table_row函数的具体用法?PHP table_row怎么用?PHP table_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了table_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_submit
function show_submit()
{
row1(tra("Submit profile"));
$config = get_config();
$publickey = parse_config($config, "<recaptcha_public_key>");
if ($publickey) {
table_row(recaptcha_get_html($publickey));
}
table_row("<p><input class=\"btn btn-primary\" type=\"submit\" value=\"" . tra("Create/edit profile") . "\" name=\"submit\">");
}
示例2: show_submit
function show_submit()
{
row1(tra("Submit profile"));
echo "<script>var RecaptchaOptions = { theme : 'white' };</script>";
$config = get_config();
$publickey = parse_config($config, "<recaptcha_public_key>");
if ($publickey) {
table_row(tra("Please enter the words shown in the image.") . "<br>\n" . recaptcha_get_html($publickey, null, is_https()));
}
table_row("<p><input type=\"submit\" value=\"" . tra("Create/edit profile") . "\" name=\"submit\">");
}
示例3: show_item
function show_item($name, $c)
{
$s = $c[1];
$f = $c[3];
$n = $s + $f;
if ($n == 0) {
return;
}
$pct = number_format(100 * $s / $n, 0) . "%";
table_row($name, $s, $f, $pct);
}
示例4: show_submit
function show_submit()
{
row1(tra("Submit profile"));
echo "<script>var RecaptchaOptions = { theme : 'white' };</script>";
$config = get_config();
$publickey = parse_config($config, "<recaptcha_public_key>");
if ($publickey) {
table_row(tra("To protect the project's webpages from spam, we kindly ask you to type in the two words shown in the image:<br>\n") . recaptcha_get_html($publickey));
}
table_row("<p><input type=\"submit\" value=\"" . tra("Create/edit profile") . "\" name=\"submit\">");
}
示例5: list_files
function list_files($user, $err_msg)
{
$dir = sandbox_dir($user);
$d = opendir($dir);
if (!$d) {
error_page("Can't open sandbox directory");
}
page_head("file sandbox for {$user->name}");
echo "\n <form action=sandbox.php method=post ENCTYPE=\"multipart/form-data\">\n <input type=hidden name=action value=upload_file>\n Upload a file to your sandbox:\n <p><input size=80 type=file name=new_file>\n <p> <input type=submit value=Upload>\n </form>\n <hr>\n ";
if (strcmp($err_msg, "") != 0) {
echo "<p>{$err_msg}<hr>";
}
$files = array();
while (($f = readdir($d)) !== false) {
if ($f == '.') {
continue;
}
if ($f == '..') {
continue;
}
$files[] = $f;
}
if (count($files) == 0) {
echo "Your sandbox is currently empty.";
} else {
sort($files);
start_table();
table_header("Name<br><span class=note>(click to view)</span>", "Modified", "Size (bytes)", "MD5", "Delete", "Download");
foreach ($files as $f) {
$path = "{$dir}/{$f}";
list($error, $size, $md5) = sandbox_parse_link_file($path);
if ($error) {
table_row($f, "Can't parse link file", "", "<a href=sandbox.php?action=delete_files&name={$f}>delete</a>");
continue;
}
$p = sandbox_physical_path($user, $md5);
if (!is_file($p)) {
table_row($f, "Physical file not found", "", "");
continue;
}
$ct = time_str(filemtime($path));
table_row("<a href=sandbox.php?action=view_file&name={$f}>{$f}</a>", $ct, $size, $md5, button_text("sandbox.php?action=delete_file&name={$f}", "Delete"), button_text("sandbox.php?action=download_file&name={$f}", "Download"));
}
end_table();
}
page_tail();
}
示例6: table_row
$error[] = $post['name'];
}
}
if (!empty($error)) {
$responce['send'] = false;
$responce['text'] = '{%error_empty_data%}';
$responce['fields'] = $error;
} else {
$from = $config->get('sitename') . ' <noreply@' . $HTTP_HOST . '>';
$to = $config->get('mailfrom');
$subject = 'Сообщение с сайта ' . $config->get('sitename');
$message = '<table style="border-collapse: collapse;" border="1"><tbody>';
$message .= table_row('type', $posts['type']);
$message .= table_row('date', date('d.m.Y H:i:s'));
foreach ($posts as $post) {
$message .= table_row($post['name'], $post['value']);
}
$message .= '</tbody></table>';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: ' . $from . "\r\n";
if (mail($to, $subject, $message, $headers)) {
$responce['send'] = true;
$responce['text'] = '{%success_send_data%}';
}
}
echo json_encode($responce);
function table_row($label, $value)
{
$lang = array('type' => 'Тип сообщения', 'date' => 'Время отправки', 'name' => 'Имя отправителя', 'email' => 'email', 'phone' => 'Номер телефона', 'address' => 'Адрес', 'message' => 'Текст сообщения');
if (!isset($lang[$label])) {
示例7: handle_query_job
function handle_query_job($user)
{
$wuid = get_int('wuid');
$wu = BoincWorkunit::lookup_id($wuid);
if (!$wu) {
error_page("no such job");
}
page_head("Job {$wuid}");
echo "\n <a href=workunit.php?wuid={$wuid}>Workunit details</a> ·\n <a href=submit.php?action=query_batch&batch_id={$wu->batch}>Batch {$wu->batch}</a>\n ";
// show input files
//
echo "<h2>Input files</h2>\n";
$x = "<in>" . $wu->xml_doc . "</in>";
$x = simplexml_load_string($x);
start_table();
table_header("Logical name<br><p class=\"text-muted\">(click to view)</p>", "Size (bytes)", "MD5");
foreach ($x->workunit->file_ref as $fr) {
$pname = (string) $fr->file_name;
$lname = (string) $fr->open_name;
foreach ($x->file_info as $fi) {
if ((string) $fi->name == $pname) {
table_row("<a href={$fi->url}>{$lname}</a>", $fi->nbytes, $fi->md5_cksum);
break;
}
}
}
end_table();
echo "<h2>Instances</h2>\n";
start_table();
table_header("Instance ID<br><p class=\"text-muted\">click for result page</p>", "State", "Output files<br><p class=\"text-muted\">click to view the file</p>");
$results = BoincResult::enum("workunitid={$wuid}");
$upload_dir = parse_config(get_config(), "<upload_dir>");
$fanout = parse_config(get_config(), "<uldl_dir_fanout>");
foreach ($results as $result) {
echo "<tr>\n <td><a href=result.php?resultid={$result->id}>{$result->id} · {$result->name} </a></td>\n <td>" . state_string($result) . "</td>\n <td>\n";
$i = 0;
if ($result->server_state == 5) {
$names = get_outfile_names($result);
$i = 0;
foreach ($names as $name) {
$url = boinc_get_output_file_url($user, $result, $i++);
$path = dir_hier_path($name, $upload_dir, $fanout);
$s = stat($path);
$size = $s['size'];
echo "<a href={$url}>{$name} </a> (" . number_format($size) . " bytes)<br/>";
}
$i++;
}
echo "</td></tr>\n";
}
end_table();
echo "<p><a href=submit.php>Return to job control page</a>\n";
page_tail();
}
示例8: Verkff
function Verkff($functjs = '', $ClassObj = '')
{
$anpid = $ClassObj->anpid;
//$this=$ClassObj->$this;
//$anpid=$_SESSION['anp']['idanp'];
$query = new Consulta($sql = $ClassObj->set_sql("m.id_mes, m.nombre_mes", "", "m.id_mes"));
//echo $sql;
?>
<style type="text/css">
<!--
.Estilo1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Estilo3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
body,td,th {
color: #000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
body {
background-color: #00CCCC;
}
-->
</style>
<br>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#00CCCC">
<tr>
<td colspan="4" align="center"><span class="Estilo1"><br />
<span class="Estilo3">Seleccione el Mes </span></span></td>
</tr>
<tr>
<td height="46" colspan="4" align="center"><p class="Estilo1">
<select name="idmes" >
<option value="">Elija el Mes</option>
<?php
while ($row_ffs = $query->ConsultaVerRegistro()) {
if ($_POST[idmes] == $row_ffs['id_mes']) {
$select = "selected";
} else {
$select = "";
}
?>
<option value="<?php
echo $row_ffs['id_mes'];
?>
"><?php
echo $row_ffs['nombre_mes'];
?>
</option><?php
}
?>
</select>
</p> </td>
</tr>
<?php
/*$queryfte=new Consulta($row_ffs=$ClassObj->set_sql("ff.id_fuentefinanciamiento", " and m.id_mes='".$_POST[idmes]."'","ff.id_fuentefinanciamiento"));*/
$queryfte = new Consulta($row_ffs = $ClassObj->set_sql("ff.id_fuentefinanciamiento", " ", "ff.id_fuentefinanciamiento"));
if ($queryfte->numregistros()) {
while ($row = $queryfte->ConsultaVerRegistro()) {
$row_ff = table_row($row['id_fuentefinanciamiento'], "fuentefinanciamiento");
?>
<tr>
<td width="9%" align="right"> </td>
<td colspan="3" align="left">
<em><strong><?php
echo $row_ff[nombre_fuentefinanciamiento];
?>
</strong></em></td>
</tr>
<?php
////$querryject=new Consulta ($sqlejct= $ClassObj->set_sql("ff.id_ff,ff.nombre_ff"," AND ff.id_fuentefinanciamiento='".$row[id_fuentefinanciamiento]."' and m.id_mes='".$_POST[idmes]."'","ff.id_ff","ff.id_ff"));
$querryject = new Consulta($sqlejct = $ClassObj->set_sql("ff.id_ff,ff.nombre_ff", " AND ff.id_fuentefinanciamiento='" . $row[id_fuentefinanciamiento] . "' ", "ff.id_ff", "ff.id_ff"));
//echo $sqlejct;
while ($rowej = $querryject->ConsultaVerRegistro()) {
?>
<tr>
<td colspan="2" align="right">
<!-- <input type="checkbox" name="checkbox" value="checkbox" /> -->
<input name="S2[]" type="checkbox" value="<?php
echo $rowej[id_ff];
?>
" /></td>
<td width="2%"> </td>
<td width="76%"><?php
echo $rowej[nombre_ff];
?>
</td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"> </td>
//.........这里部分代码省略.........
示例9: COUNT
$cpu_string[20] = "AMD Turion";
$cpu_string[21] = "Intel Core2";
$query = "SELECT COUNT(workunit.id) AS count FROM workunit LEFT JOIN result ON workunit.id=result.workunitid WHERE result.server_state=2 AND workunit.hr_class=";
function get_mysql_count($hr_class)
{
$result = _mysql_query("select count(id) as count from workunit where hr_class=" . $hr_class);
$count = _mysql_fetch_object($result);
_mysql_free_result($result);
return $count->count;
}
function make_reset_url($hr_class)
{
return "<a href=ops_reset_hrclass.php?hr_class=" . $hr_class . ">" . $hr_class . "</a>";
}
db_init();
$timestr = time_str(time(0));
$title = "hr_class summary list at " . $timestr;
admin_page_head($title);
start_table();
table_header("hr_class", "System", "CPU", "# unsent results");
$unsentresults = get_mysql_count(0);
table_row(make_reset_url(0), $system_string[128], $cpu_string[0], $unsentresults);
for ($system = 2; $system < 6; ++$system) {
for ($cpu = 1; $cpu < 22; ++$cpu) {
$hr_class = 128 * $system + $cpu;
$unsentresults = get_mysql_count($hr_class);
table_row(make_reset_url($hr_class), $system_string[$system * 128], $cpu_string[$cpu], $unsentresults);
}
}
end_table();
admin_page_tail();
示例10: time
if (!empty($roles)) {
$roles .= ", ";
}
$roles .= $special_user_bitfield[$i];
}
}
}
if (!empty($roles)) {
$roles = "<small>[{$roles}]</small>";
}
// Banished?
if (!empty($user->banished_until)) {
$dt = $user->banished_until - time();
if ($dt > 0) {
$x = "<span style=\"color: #ff0000\">Currently banished</span>";
} else {
$x = "<span style=\"color: #ff9900\">Previously banished</span>";
}
$roles .= $x;
}
if ($email_validated) {
$email = "<span style=\"color: #ffff00\">" . $email . "</span>\n";
} else {
$email = "<span style=\"color: #ff0000\">" . $email . "</span>\n";
}
table_row($id, "<a href=\"manage_user.php?userid=" . $id . "\">" . $name . "</a> " . $roles, $email, $team_name, $country, $joined);
}
end_table();
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
示例11: db_init
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util_ops.inc";
db_init();
admin_page_head("Failure summary by (app version, error)");
$query_appid = $_GET['appid'];
$query_received_time = time() - $_GET['nsecs'];
$q = new SqlQueryString();
$q->process_form_items();
$main_query = "\nSELECT\n app_version_id,\n app_version.plan_class,\n case\n when INSTR(host.os_name, 'Darwin') then 'Darwin'\n when INSTR(host.os_name, 'Linux') then 'Linux'\n when INSTR(host.os_name, 'Windows') then 'Windows'\n when INSTR(host.os_name, 'SunOS') then 'SunOS'\n when INSTR(host.os_name, 'Solaris') then 'Solaris'\n when INSTR(host.os_name, 'Mac') then 'Mac'\n else 'Unknown'\n end AS OS_Name,\n exit_status,\n COUNT(*) AS error_count\nFROM result\n left join host on result.hostid = host.id\n left join app_version on result.app_version_id = app_version.id\nWHERE\n result.appid = '{$query_appid}' and\n server_state = '5' and\n outcome = '3' and\n received_time > '{$query_received_time}'\nGROUP BY\n app_version_id,\n exit_status\norder by error_count desc\n";
$urlquery = $q->urlquery;
$result = _mysql_query($main_query);
start_table();
table_header("App version", "Exit Status", "Error Count");
while ($res = _mysql_fetch_object($result)) {
$exit_status_condition = "exit_status={$res->exit_status}";
table_row(app_version_desc($res->app_version_id), link_results(exit_status_string($res->exit_status), $urlquery, "{$exit_status_condition}", ""), $res->error_count);
}
_mysql_free_result($result);
end_table();
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
示例12: table_row
<img src="" alt="">
</div>
<?php
//echo "<pre>";
//var_dump($array[4][3]);
function table_row($col = 10, $row = 10)
{
$array = array();
$html = "";
$html .= "<table border = '1'><thead><tbody>";
for ($i = 0; $i <= $col; $i++) {
$html .= "<tr>";
for ($j = 0; $j <= 10; $j++) {
if ($i == 2 && $j == 4) {
$html .= "<td>";
$html .= "0";
$html .= "</td>";
} else {
$html .= "<td>";
$html .= "1";
$html .= "</td>";
}
}
$html .= "</tr>";
}
$html .= "</thead></tbody></table>";
return $html;
}
echo table_row();
示例13: show_bossa_user
function show_bossa_user()
{
$user_id = get_int('user_id');
$app_id = get_int('app_id');
$user = BoincUser::lookup_id("{$user_id}");
BossaUser::lookup($user);
$app = BossaApp::lookup_id($app_id);
include_app_file($app_id);
admin_page_head("{$user->name} ({$app->name})");
$x = user_summary($user);
if ($x) {
echo "User info: {$x}<br>";
}
$insts = BossaJobInst::enum("user_id={$user_id}");
start_table();
table_header("Job", "Calibration?", "Start", "Duration", "Response");
foreach ($insts as $inst) {
$job = BossaJob::lookup_id($inst->job_id);
table_row("{$inst->job_id} <a href=bossa_admin.php?action=job_show_insts&job_id={$inst->job_id}>(details)</a><br>" . job_summary($job), calibration_job_string($inst, $job), time_str($inst->create_time), job_duration($inst), instance_summary($inst->get_opaque_data()));
}
end_table();
admin_page_tail();
}
示例14: db_init
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util_ops.inc";
db_init();
admin_page_head("Failures grouped by app version and host");
$query_appid = $_GET['appid'];
$query_received_time = time() - $_GET['nsecs'];
$main_query = "\nSELECT\n app_version_id,\n app_version_num,\n hostid AS Host_ID,\n case\n when INSTR(host.os_name, 'Darwin') then 'Darwin'\n when INSTR(host.os_name, 'Linux') then 'Linux'\n when INSTR(host.os_name, 'Windows') then 'Windows'\n when INSTR(host.os_name, 'SunOS') then 'SunOS'\n when INSTR(host.os_name, 'Solaris') then 'Solaris'\n when INSTR(host.os_name, 'Mac') then 'Mac'\n else 'Unknown'\n end AS OS_Name,\n case\n when INSTR(host.os_name, 'Linux') then \n case\n when INSTR(LEFT(host.os_version, 6), '-') then LEFT(host.os_version, (INSTR(LEFT(host.os_version, 6), '-') - 1))\n else LEFT(host.os_version, 6)\n end\n else host.os_version\n end AS OS_Version,\n host.nresults_today AS Results_Today, \n COUNT(*) AS error_count\nFROM result\n left join host on result.hostid = host.id \nWHERE\n appid = '{$query_appid}' and\n server_state = '5' and\n outcome = '3' and \n received_time > '{$query_received_time}'\nGROUP BY\n app_version_id,\n hostid\norder by error_count desc\n";
$result = mysql_query($main_query);
start_table();
table_header("App version", "Host ID", "OS Version", "Results today", "Error count");
while ($res = mysql_fetch_object($result)) {
$av = BoincAppVersion::lookup_id($res->app_version_id);
$p = BoincPlatform::lookup_id($av->platformid);
table_row(sprintf("%.2f", $res->app_version_num / 100) . " {$p->name} [{$av->plan_class}]", $res->Host_ID, $res->OS_Version, $res->Results_Today, "<a href=db_action.php?table=result&detail=low&hostid={$res->Host_ID}&app_version_id={$res->app_version_id}&server_state=5&outcome=3>{$res->error_count}</a>");
}
mysql_free_result($result);
end_table();
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
示例15: get_int
$plain = get_int("plain", true);
$team = BoincTeam::lookup_id($teamid);
if (!$team) {
error_page(tra("no such team"));
}
require_founder_login($user, $team);
if ($plain) {
header("Content-type: text/plain");
} else {
page_head(tra("%1 Email List", $team->name));
start_table();
table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\""));
table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country"));
}
$users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}");
foreach ($users as $user) {
if ($plain) {
$e = $user->send_email ? "<{$user->email_addr}>" : "";
echo "{$user->name} {$e}\n";
} else {
$e = $user->send_email ? "{$user->email_addr}" : "";
table_row(user_links($user), $e, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country);
}
}
if (!$plain) {
end_table();
echo "<p><a href=\"team_email_list.php?teamid=" . $teamid . "&plain=1\">" . tra("Show as plain text") . "</a></p>";
page_tail();
}
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit