当前位置: 首页>>代码示例>>PHP>>正文


PHP row2函数代码示例

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


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

示例1: edit_form

function edit_form($user, $team, $forum, $first)
{
    page_head(tra("Team Message Board"));
    echo "\n        <form action=team_forum.php method=post>\n        <input type=hidden name=teamid value={$team->id}>\n        <input type=hidden name=cmd value=edit_action>\n    ";
    echo form_tokens($user->authenticator);
    start_table();
    if (!strlen($forum->title)) {
        $forum->title = $team->name;
    }
    if (!strlen($forum->description)) {
        $forum->description = tra("Discussion among members of %1", $team->name);
    }
    row2(tra("Title"), "<input name=title size=80 value=\"{$forum->title}\">");
    row2(tra("Description"), "<textarea name=description>{$forum->description}</textarea>");
    row2(tra("Minimum time between posts (seconds)"), "<input name=post_min_interval value={$forum->post_min_interval}>");
    row2(tra("Minimum total credit to post"), "<input name=post_min_total_credit value={$forum->post_min_total_credit}>");
    row2(tra("Minimum average credit to post"), "<input name=post_min_expavg_credit value={$forum->post_min_expavg_credit}>");
    row2("", "<input class=\"btn btn-default\" type=submit value=" . tra("Submit") . ">");
    end_table();
    echo "\n        </form>\n    ";
    if (!$first) {
        echo "\n            <p>\n            <a href=team_forum.php?teamid={$team->id}&cmd=remove_confirm{$tokens}>\n            " . tra("Remove your team's message board.") . "</a>\n        ";
    }
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:25,代码来源:team_forum.php

示例2: show_app

function show_app($app)
{
    global $user;
    if ($app->bolt_course_id) {
        if ($user) {
            switch (bolt_course_status($app->bolt_course_id, $user->id)) {
                case BOLT_COURSE_NOT_STARTED:
                    $x = "<a href=bolt_sched.php?action=start&course_id={$app->bolt_course_id}>Take training course</a>";
                    break;
                case BOLT_COURSE_STARTED:
                    $x = "<a href=bolt_sched.php?action=resume&course_id={$app->bolt_course_id}>Finish training course</a>";
                    break;
                case BOLT_COURSE_FINISHED:
                    $x = "<a href=bossa_get_job.php?bossa_app_id={$app->id}>Get job</a>";
                    break;
            }
        } else {
            $x = "<a href=bolt_sched.php?action=start&course_id={$app->bolt_course_id}>Take training course</a>";
        }
    } else {
        $x = "<a href=bossa_get_job.php?bossa_app_id={$app->id}>Get job</a>";
    }
    $est = number_format($app->time_estimate / 60.0, 2);
    $limit = number_format($app->time_limit / 60.0, 2);
    row2("{$app->name}<br><span class=note>{$app->description}<br>Time: {$est} min. average, {$limit} min limit</span>", $x);
}
开发者ID:Turante,项目名称:boincweb,代码行数:26,代码来源:bossa_apps.php

示例3: edit_form

function edit_form($user, $team, $forum, $first)
{
    page_head("Team forum");
    echo '
		<form action="team_forum.php" method="post">
		<input type="hidden" name="teamid" value="$team->id">
		<input type="hidden" name="cmd" value="edit_action">
	';
    echo form_tokens($user->authenticator);
    start_table();
    if (!strlen($forum->title)) {
        $forum->title = $team->name;
    }
    if (!strlen($forum->description)) {
        $forum->description = "Discussion among members of {$team->name}";
    }
    row2('Title', '<input name="title" value="$forum->title">');
    row2('Description', '<textarea name="description">$forum->description</textarea>');
    row2('Minimum time between posts (seconds)', '<input name="post_min_interval" value="$forum->post_min_interval">');
    row2('Minimum total credit to post', '<input name="post_min_total_credit" value="$forum->post_min_total_credit">');
    row2('Minimum average credit to post', '<input name="post_min_expavg_credit" value="$forum->post_min_expavg_credit">');
    row2('', '<input type="submit" value="OK">');
    end_table();
    echo "</form>";
    if (!$first) {
        echo '<p><a href="team_forum.php?teamid=$team->id&amp;cmd=remove_confirm$tokens">Remove your team\'s message board.</a></p>';
    }
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:29,代码来源:team_forum.php

示例4: show_admins

function show_admins($user, $teamid)
{
    page_head("Add or remove Team Admins");
    echo "\n\t\tYou can select team members as 'Team Admins'.\n\t\tTeam Admins can:\n\t\t<ul>\n\t\t<li>Edit team information (name, URL, description, country).</li>\n\t\t<li>View the team's join/quit history.</li>\n\t\t<li>Moderate the team forum, if any (admins get emails notification of moderation events and red X reports).</li>\n\t\t</ul>\n\t\tTeam Admins cannot:\n\t\t<ul>\n\t\t<li>Change the team founder.</li>\n\t\t<li>Remove members.</li>\n\t\t<li>Add or remove Team Admins.</li>\n\t\t</ul>\n\t\tIf a Team Admin quits the team, they cease to be a Team Admin.\n\t\t<p>\n\t\tWe recommend that you select only people\n\t\tyou know and trust very well as Team Admins.\n\t";
    $admins = BoincTeamAdmin::enum("teamid={$teamid}");
    start_table();
    if (count($admins) == 0) {
        row1("There are currently no Team Admins");
    } else {
        row1("Current Team Admins", 3);
        table_header("Name", "Became Team Admin on", "");
        foreach ($admins as $admin) {
            show_admin($user, $admin);
        }
    }
    end_table();
    echo '
		<p>
		<form action="team_admins.php">
		<input type="hidden" name="action" value="add">
		<input type="hidden" name="teamid" value="$teamid">
	';
    echo form_tokens($user->authenticator);
    start_table();
    row1("Add Team Admin");
    row2('Email address of team member:', '<input name="email_addr">');
    row2('', '<input type="submit" action value="Add">');
    end_table();
    echo "</form>";
    page_tail();
}
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:team_admins.php

示例5: show_admins

function show_admins($user, $teamid)
{
    page_head(tra("Add or remove Team Admins"));
    echo tra("You can select team members as 'Team Admins'. Team Admins can:") . "\n        <ul>\n        <li>" . tra("Edit team information (name, URL, description, country)") . "\n        <li>" . tra("View the team's join/quit history") . "\n        <li>" . tra("Moderate the team forum, if any (admins get email notification of moderation events and red X reports)") . "\n        </ul>\n        " . tra("Team Admins cannot:") . "\n        <ul>\n        <li>" . tra("Change the team founder") . "\n        <li>" . tra("Remove members") . "\n        <li>" . tra("Add or remove Team Admins") . "\n        </ul>\n        " . tra("If a Team Admin quits the team, they cease to be a Team Admin.") . "\n        <br /><br />" . tra("We recommend that you select only people you know and trust very well as Team Admins.");
    $admins = BoincTeamAdmin::enum("teamid={$teamid}");
    start_table();
    if (count($admins) == 0) {
        row1(tra("There are currently no Team Admins"));
    } else {
        row1(tra("Current Team Admins"), 3);
        table_header(tra("Name"), tra("Became Team Admin on"), "");
        foreach ($admins as $admin) {
            show_admin($user, $admin);
        }
    }
    end_table();
    echo "\n        <p>\n        <form action=team_admins.php>\n        <input type=hidden name=action value=add>\n        <input type=hidden name=teamid value={$teamid}>\n    ";
    echo form_tokens($user->authenticator);
    start_table();
    row1(tra("Add Team Admin"));
    row2(tra("Email address of team member:"), "<input name=email_addr>");
    row2("", "<input type=submit action value=\"" . tra("Add") . "\">");
    end_table();
    echo "</form>";
    page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:26,代码来源:team_admins.php

示例6: show_stats

function show_stats($brand)
{
    switch ($brand) {
        case 1:
            $x = "HTC Power to Give";
            break;
        default:
            error_page("invalid brand");
    }
    $hosts = BoincHost::enum("os_name='Android' and serialnum like '%{$x}%'");
    $n = 0;
    $t = 0;
    $a = 0;
    foreach ($hosts as $h) {
        $t += $h->total_credit;
        $a += $h->expavg_credit;
        if ($h->expavg_credit > 0.1) {
            $n++;
        }
    }
    page_head("Stats for {$x}");
    start_table();
    row2("Active devices", $n);
    row2("Average daily credit", $a);
    row2("Total credit", $t);
    end_table();
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:28,代码来源:brand_stats.php

示例7: show_hav

function show_hav($hav)
{
    row1(av_desc($hav->app_version_id));
    row2(tra("Number of tasks completed"), $hav->et_n);
    row2(tra("Max tasks per day"), $hav->max_jobs_per_day);
    row2(tra("Number of tasks today"), $hav->n_jobs_today);
    row2(tra("Consecutive valid tasks"), $hav->consecutive_valid);
    $x = number_format($hav->turnaround_avg / 86400, 2);
    if ($hav->et_avg) {
        $gflops = number_format(1.0E-9 / $hav->et_avg, 2);
        row2(tra("Average processing rate"), $gflops . " GFLOPS");
    }
    row2(tra("Average turnaround time"), "{$x} days");
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:14,代码来源:host_app_versions.php

示例8: user_settings

function user_settings()
{
    global $user;
    $flags = $user->bolt->flags;
    echo "<form action=bolt_admin.php method=get>\n\t\t<input type=hidden name=action value=update_user>\n\t";
    start_table();
    row1("User settings");
    $x = $flags & BOLT_FLAGS_SHOW_ALL ? "checked" : "";
    row2("Show hidden courses?", "<input type=checkbox name=show_all {$x}>");
    $x = $flags & BOLT_FLAGS_DEBUG ? "checked" : "";
    row2("Show debugging output?", "<input type=checkbox name=debug {$x}>");
    row2("", "<input type=submit name=submit value=\"Update settings\">");
    end_table();
    echo "</form>";
}
开发者ID:Turante,项目名称:boincweb,代码行数:15,代码来源:bolt_admin.php

示例9: show_auth_form

function show_auth_form()
{
    $master_url = parse_config(get_config(), "<master_url>");
    $x = strstr($master_url, "//");
    $x = substr($x, 2);
    $x = rtrim($x, "/");
    $x = str_replace("/", "_", $x);
    $account_file = "account_{$x}.xml";
    echo "<p><h3>" . tra("2) If you forgot your account's email address, or you can't receive email there:") . "</h3>" . tra("If you have run BOINC under this account, you can still access it. Here's how:") . "\n\n    <ul>\n    <li> " . tra("Go to the BOINC data directory on your computer (its location is written to the Event Log at startup).") . "\n    <li> " . tra("Find your account file for this project; it will be named <b>%1</b>.", $account_file) . "\n    <li> " . tra("Open the file in a text editor like Notepad. You'll see something like") . "\n    <pre>\n    &lt;account>\n        &lt;master_url>{$master_url}&lt;/master_url>\n        &lt;authenticator>8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator>\n        &lt;project_name>" . PROJECT . "&lt;/project_name>\n        ...\n    &lt;/account>\n    </pre>\n\n    <li> " . tra("Select and Copy the string between %1 and %2 (%3 in the above example).", "&lt;authenticator>", "&lt;/authenticator>", "<b>8b8496fdd26df7dc0423ecd43c09a56b</b>") . "\n\n    <li> " . tra("Paste the string into the field below, and click OK.") . "\n    <li> " . tra("You will now be logged in to your account; update the email and password of your account.") . "\n    </ul>\n    ";
    start_table();
    echo "<form action=login_action.php method=post>\n";
    row2(tra("Log in with authenticator"), "<input type=\"text\" name=authenticator size=40>");
    row2(tra("Stay logged in on this computer"), "<input type=checkbox name=send_cookie checked>");
    row2("", "<input class=\"btn btn-default\" type=submit value=\"" . tra("OK") . "\">");
    echo "</form>";
    end_table();
}
开发者ID:privat1,项目名称:boinc,代码行数:17,代码来源:get_passwd.php

示例10: handle_create_form

function handle_create_form()
{
    global $project, $auth;
    page_head("Create app");
    echo "\n        This form lets you specify parameters for a new application.\n\n        <p>\n        <form action=submit_example_app.php>\n        <input type=hidden name=action value=create_action>\n    ";
    start_table();
    row2("Application name", "<input name=app_name value=\"enter name\">");
    row2("Replication level", "<input name=replication_level value=1>");
    row2("Beta flag", "<input name=is_beta type=checkbox checked=1>");
    row2("Validator", "<select name=validator_type><option value=1 selected=1>Trivial</option>\n                       <option value=2>Bitwise</option></select>");
    end_table();
    start_table();
    row2("Version number", "<input name=app_version value=\"1.0\">");
    //Get list of registered platforms
    //---
    //(tested on a local server)
    $link = mysql_connect("localhost", "boincadm", "") or die("Could not connect: " . mysql_error());
    $q = mysql_query("use test24");
    $q = mysql_query("select id,name from platform order by id");
    $options_platforms = "";
    while ($f = mysql_fetch_row($q)) {
        $options_platforms .= "<option value={$f['0']}>{$f['1']}</option>";
    }
    //---
    row2("Platform", "<select name=app_platform>" . $options_platforms . "</select>");
    row2("Plan class", "<input name=plan_class value=\"(none)\">");
    row2("Main program", "<input name=main_program type=file> <br/>\n                          <input name=is_boincapp type=checkbox checked> Native BOINC application");
    if (isset($_GET['add_file'])) {
        $add_file = $_GET['add_file'] + 1;
    } else {
        $add_file = 1;
    }
    for ($i = 0; $i < $add_file; $i++) {
        row2("Additional file", "<input name=additional_file_{$i} type=file><br/>\n                                 <input name=is_copyfile_{$i} type=checkbox checked>Copyfile");
    }
    row2("", "<a href=?action=create_form&add_file={$add_file}>(more additional files)</a>");
    row2("", "<input type=submit name=submit value=Submit>");
    end_table();
    echo "</form>\n";
    echo "<p><a href=submit_example.php>Return to job control page</a>\n";
    page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:42,代码来源:submit_app.php

示例11: search_form

function search_form()
{
    page_head("User search");
    echo "<form name=f method=get action=user_search.php>\n        <input type=hidden name=action value=search>\n    ";
    start_table();
    row1(tra("Filters"), 2, "heading");
    row2(tra("User name starts with"), "<input type=text name=search_string>");
    row2_init(tra("Country"), "<select name=country><option value=\"any\" selected>" . tra("Any") . "</option>");
    print_country_select("asdf");
    echo "</select></td></tr>";
    row2(tra("With profile?"), "<input type=radio name=profile value=either checked=1> " . tra("Either") . "\n        <input type=radio name=profile value=no> " . tra("No") . "\n        <input type=radio name=profile value=yes> " . tra("Yes") . "\n    ");
    row2(tra("On a team?"), "<input type=radio name=team value=either checked=1> " . tra("Either") . "\n        <input type=radio name=team value=no> " . tra("No") . "\n        <input type=radio name=team value=yes> " . tra("Yes") . "\n    ");
    row1(tra("Ordering"), 2, "heading");
    row2(tra("Decreasing sign-up time"), "<input type=radio name=search_type value=\"date\" checked>");
    row2(tra("Decreasing average credit"), "<input type=radio name=search_type value=\"rac\">");
    row2(tra("Decreasing total credit"), "<input type=radio name=search_type value=\"total\">");
    row2("", "<input type=submit name=action value=" . tra("Search") . ">");
    end_table();
    echo "\n        <script>document.f.search_string.focus()</script>\n    ";
    page_tail();
}
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:21,代码来源:user_search.php

示例12: showTableStatus

function showTableStatus($db)
{
    $size = 0;
    $out = "";
    start_table();
    row1($db, 15);
    row_array(array("Name", "Engine", "Version", "Row Format", "Rows", "Avg Row Length (KB)", "Data Length (MB)", "Max Data Length (MB)", "Index Length (MB)", "Data free (MB)", "Create Time", "Update Time", "Check Time", "Create Options", "Comment"));
    _mysql_select_db($db);
    $result = _mysql_query("show table status");
    while ($row = _mysql_fetch_array($result)) {
        $size += $row["Data_length"] + $row["Index_length"];
        $engine = $row["Engine"];
        if (!$engine) {
            $engine = $row["Type"];
        }
        row_array(array($row["Name"], $engine, $row["Version"], $row["Row_format"], $row["Rows"], round($row["Avg_row_length"] / 1024, 2), round($row["Data_length"] / (1024 * 1024), 2), round($row["Max_data_length"] / (1024 * 1024), 2), round($row["Index_length"] / (1024 * 1024), 2), round($row["Data_free"] / (1024 * 1024), 2), $row["Create_time"], $row["Update_time"], $row["Check_time"], $row["Create_options"], $row["Comment"]));
    }
    $size = round($size / 1024 / 1024, 1);
    row2("Total Table Sizes (MB)", $size);
    end_table();
    echo "<BR><BR>";
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:22,代码来源:sample_table_stats.php

示例13: mysql_free_result

                $workunitname = "<font color='red'>WORKUNIT NOT FOUND IN DATABASE</font>";
                $status = "<font color='red'>UNKNOWN</font>";
                $jobsubmittime = "<font color='red'>UNKNOWN</font>";
            }
            mysql_free_result($workunitquery);
        }
        $workunitstring = "<a href=workunit.php?wuid=" . $job->workunit . ">" . $job->workunit . "</a>";
        row5($jobindex + 1, $jobsubmittime, $status, $workunitname, $workunitstring);
    }
} else {
    row1("You have NO jobs listed !<br>");
}
end_table();
$max_jobs = max_nr_of_jobs_of_user($user);
if ($max_jobs > $njobs) {
    if ($max_jobs - $njobs > 1) {
        $line = 'You can submit ' . ($max_jobs - $njobs) . ' more jobs: ';
    } else {
        $line = 'You can submit one more job: ';
    }
    start_table();
    row1("Commands");
    row2($line, '<a href="queue_new_job_form.php">Submit a job</a>');
    row2("", '<a href="home.php">Your account</a>');
    row2("", '<a href="hosts_user.php">Your computers</a>');
    row2("", '<a href="logout.php">Log out</a>');
    end_table();
} else {
    exit_with_text("You cannot submit any more jobs, you have reached your limit, clean up first !");
}
page_tail();
开发者ID:maexlich,项目名称:boinc-igemathome,代码行数:31,代码来源:queue_show_queue.php

示例14: get_str

// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
// Users are taken here after creating an account via the Wizard.
// They've already entered an email address and password.
// Now get a name, country, and zip code
require_once '../inc/boinc_db.inc';
require_once '../inc/util.inc';
require_once '../inc/countries.inc';
require_once '../inc/translation.inc';
$auth = get_str("auth");
$user = lookup_user_auth($auth);
if (!$user) {
    error_page("no such account");
}
page_head("Finish account setup");
?>
<form action="account_finish_action.php" method="post"><?php 
start_table();
row2(tra("Name") . '<br /><span class="description">' . tra("Identifies you on our web site. Use your real name or a nickname.") . '</span>', '<input name="name" size="30" value="$user->name">');
row2_init(tra("Country") . '<br /><span class="description">' . tra("Select the country you want to represent, if any.") . '</span>', '<select name="country">');
print_country_select();
echo "</select></td></tr>\n";
row2(tra("Postal or ZIP Code") . '<br /><span class="description">' . tra("Optional") . '</span>', '<input name="postal_code" size="20">');
row2('', '<input type="submit" value="OK">');
end_table();
echo '
	<input type="hidden" name="auth" value="$auth">
	</form>
';
page_tail();
开发者ID:Turante,项目名称:boincweb,代码行数:31,代码来源:account_finish.php

示例15: get_int

// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
// show details of an app
require_once '../inc/util_ops.inc';
$appid = get_int("appid");
$app = BoincApp::lookup_id($appid);
if (!$app) {
    admin_error_page("no such app");
}
admin_page_head("Details for {$app->name} ({$app->user_friendly_name})");
start_table();
row2("Min average efficiency", $app->min_avg_pfc);
echo "\n    <p>\n    In the list below, 'Credit scale factor' should\n    be roughly 1 for CPU versions, 0.1 for GPU versions.\n    If values are far outside this range,\n    you may have bad FLOPs estimates.\n    In this case, you may want to\n    <ol>\n    <li> <a href=job_times.php?appid={$appid}>Get a better FLOPs estimate</a>\n    <li> <a href=app_reset.php?appid={$appid}>reset credit statistics for this application</a>.\n    </ol>\n";
end_table();
echo "<h2>App versions</h2>\n";
$avs = BoincAppVersion::enum("appid={$appid}");
$avs = current_versions($avs);
foreach ($avs as $av) {
    $platform = BoincPlatform::lookup_id($av->platformid);
    start_table();
    row2("ID", $av->id);
    row2("Platform", $platform->name);
    row2("Plan class", $av->plan_class);
    row2("Version num", $av->version_num);
    row2("Jobs validated", $av->pfc_n);
    row2("Average efficiency", $av->pfc_avg ? 1 / $av->pfc_avg : "---");
    row2("Credit scale factor", $av->pfc_scale);
    row2("Average credit", $av->expavg_credit);
    end_table();
}
admin_page_tail();
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:app_details.php


注:本文中的row2函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。