コード例 #1
0
ファイル: bolt_admin.php プロジェクト: Turante/boincweb
function show_course($course)
{
    $x = "<b>{$course->name}</b>\n\t\t\t<br>Description: {$course->description}\n\t\t\t<br>Created: " . date_str($course->create_time) . "\n\t";
    $y = "<a href=bolt_map.php?course_id={$course->id}>Map</a>\n\t\t<br><a href=bolt_compare.php?course_id={$course->id}>Experiments</a>\n\t\t<br>\n\t";
    row2_init($x, $y);
    if ($course->hidden) {
        show_button("bolt_admin.php?action=unhide&course_id={$course->id}", "Unhide", "Unhide this course");
    } else {
        show_button("bolt_admin.php?action=hide&course_id={$course->id}", "Hide", "Hide this course");
    }
    show_button("bolt_admin.php?action=clear_confirm&course_id={$course->id}", "Clear data", "Clear student data for this course");
    echo "</td></tr>";
}
コード例 #2
0
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();
}
コード例 #3
0
ファイル: bolt.php プロジェクト: maexlich/boinc-igemathome
$user = get_logged_in_user(false);
if ($user) {
    BoltUser::lookup($user);
}
$courses = BoltCourse::enum();
start_table();
table_header("Course", "Status");
foreach ($courses as $course) {
    if ($course->hidden && !($user->bolt->flags & BOLT_FLAG_SHOW_ALL)) {
        continue;
    }
    $e = $user ? BoltEnrollment::lookup($user->id, $course->id) : null;
    if ($e) {
        $start = date_str($e->create_time);
        $view = BoltView::lookup_id($e->last_view_id);
        $ago = time_diff(time() - $view->start_time);
        $pct = number_format($view->fraction_done * 100, 0);
        $status = "Started {$start}\n            <br>Last visit: {$ago} ago\n            <br>{$pct}% done\n        ";
        if ($view->fraction_done < 1) {
            $status .= "<br><a href=bolt_sched.php?course_id={$course->id}&action=resume>Resume</a>\n            ";
        }
        $status .= "<br><a href=bolt_sched.php?course_id={$course->id}&action=start>Restart</a>\n            | <a href=bolt_course.php?course_id={$course->id}>History</a>\n        ";
    } else {
        $status = "\n            <a href=bolt_sched.php?course_id={$course->id}&action=start>Start</a>\n        ";
    }
    row2_init("<b>{$course->name}</b>\n        <br><span class=note>{$course->description}</span>", $status);
    show_refreshes();
    echo "</td></tr>\n";
}
end_table();
page_tail();
コード例 #4
0
// 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/>.
// 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';
check_get_args(array("auth"));
$auth = get_str("auth");
$user = BoincUser::lookup_auth($auth);
if (!$user) {
    error_page("no such account");
}
page_head(tra("Finish account setup"));
echo "\n    <form action=account_finish_action.php method=post>\n";
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 "\n    <input type=hidden name=auth value={$auth}>\n    </form>\n";
page_tail();
コード例 #5
0
ファイル: account_finish.php プロジェクト: Turante/boincweb
// 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();
コード例 #6
0
// 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.inc";
require_once "../inc/countries.inc";
check_get_args(array("tnow", "ttok"));
$user = get_logged_in_user();
check_tokens($user->authenticator);
page_head(tra("Edit account information"));
echo "<form method=post action=edit_user_info_action.php>";
echo form_tokens($user->authenticator);
start_table();
row2(tra("Name %1 real name or nickname%2", "<br><span class=note>", "</span>"), "<input name=user_name type=text size=30 value='{$user->name}'>");
row2(tra("URL %1 of your web page; optional%2", "<br><span class=note>", "</span>"), "http://<input name=url type=text size=50 value='{$user->url}'>");
row2_init(tra("Country"), "<select name=country>");
print_country_select($user->country);
echo "</select></td></tr>\n";
row2(tra("Postal (ZIP) code %1 Optional%2", "<br><span class=note>", "</span>"), "<input name=postal_code type=text size=20 value='{$user->postal_code}'>");
row2("", "<input type=submit value='" . tra("Update info") . "'>");
end_table();
echo "</form>\n";
page_tail();
コード例 #7
0
// 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/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/db.inc";
require_once "../inc/util.inc";
require_once "../inc/countries.inc";
db_init();
$user = get_logged_in_user();
check_tokens($user->authenticator);
page_head("Edit account information");
echo "<form method=post action=edit_user_info_action.php>";
echo form_tokens($user->authenticator);
start_table();
row2("Name<br><font size=-2>real name or nickname</font>", "<input type=text name=user_name size=30 value='{$user->name}'>");
row2("URL<br><font size=-2>of your web page; optional</font>", "http://<input type=text name=url size=50 value='{$user->url}'>");
row2_init("Country", "<select name=country>");
print_country_select($user->country);
echo "</select></td></tr>\n";
row2("Postal (ZIP) code<br><font size=-2>Optional</font>", "<input type=text name=postal_code size=20 value='{$user->postal_code}'>");
row2("", "<input type=submit value='Update info'>");
end_table();
echo "</form>\n";
page_tail();
コード例 #8
0
ファイル: emUploadApp.php プロジェクト: rampxxxx/em
db_init();
function print_plataformas()
{
    $plataformas = get_mysql_model("SELECT name FROM platform   ");
    foreach ($plataformas as $plataforma) {
        $nombre = $plataforma["name"];
        echo "<option value=\"{$nombre}\" >{$nombre}</option>\n";
    }
}
admin_page_head(tra("Upload New App Version"));
echo " <script src=\"http://code.jquery.com/jquery-latest.js\"></script> ";
echo "\n  <style>\n  </style>\n\n<script> \n\n\n</script>";
echo "<form action=\"emUpload_file.php\" method=\"post\" enctype=\"multipart/form-data\">";
start_table();
row2(tra("NEW APPLICATION BINARY %1 Browse to select. %2", "<br><span class=note>", "</span>"), "<label for=\"file\">Filename:</label>");
row2_init(tra("PLATFORM %1 For which Operating System. %2", "<br><span class=note>", "</span>"), "<select name=platform  >");
print_plataformas();
echo "</select></td></tr>\n";
row2("", "<input type=\"file\" name=\"file\" id=\"file\" /> ");
row2("", "<input type=\"submit\" name=\"submit\" value=\"Submit\" />");
end_table();
echo "</form>\n";
/*
echo "<label for=\"tra\" id=\"tra\">Traza</label>";
echo "<td>
<a href=\"emLanzaForm.php\">". "Create Task" ."</a>
<a href=\"home.php\">". "Back Home " ."</a>
</td>
";
*/
admin_page_tail();
コード例 #9
0
ファイル: ramp_signup.php プロジェクト: happyj/qcn
if ($strMessage) {
    // print status/error message if any
    echo $strMessage . "\n";
}
if ($strRampType == "R" || $strRampType == "C" || $strRampType == "M") {
    echo "<center><h3>Apply for a free USB sensor if you are in a region of interest</h3></center>\n";
}
echo "<ul><p align=\"justify\">You can add yourself to QCN RAMP by submitting the following information,\n    or edit a previous submission.\n<BR>Please enter as much of the following information as you can:</p>\n         <form name=\"ramp_form\" method=\"post\" action=\"ramp_signup.php\">\n\n    <input name=\"db_id\" type=\"hidden\" id=\"db_id\" size=\"20\" value=\"" . $row["id"] . "\">\n    <input name=\"db_ramp_type\" type=\"hidden\" id=\"db_ramp_type\" size=\"20\" value=\"" . $row["ramp_type"] . "\">\n    <input name=\"lnm0\" type=\"hidden\" id=\"lnm0\" size=\"64\">\n\n<table>";
row_heading_array(array("Enter Your Postal Address (for UPS, Mail, or Hand Delivery)"));
row2("Name (First and Last/Surname)", "<input name=\"db_fname\" type=\"text\" id=\"db_fname\" size=\"30\" value=\"" . stripslashes($row["fname"]) . "\">" . "&nbsp;&nbsp;<input name=\"db_lname\" type=\"text\" id=\"db_lname\" size=\"60\" value=\"" . stripslashes($row["lname"]) . "\">");
row2("Street Address (Line 1)", "<input name=\"db_addr1\" type=\"text\" id=\"db_addr1\" size=\"60\" value=\"" . stripslashes($row["addr1"]) . "\">");
row2("Street Address (Line 2)", "<input name=\"db_addr2\" type=\"text\" id=\"db_addr2\" size=\"60\" value=\"" . stripslashes($row["addr2"]) . "\">");
row2("City", "<input name=\"db_city\" type=\"text\" id=\"db_city\" size=\"60\" value=\"" . stripslashes($row["city"]) . "\">");
row2("Region/State/Province", "<input name=\"db_region\" type=\"text\" id=\"db_region\" size=\"40\" value=\"" . stripslashes($row["region"]) . "\">");
row2("Post Code", "<input name=\"db_postcode\" type=\"text\" id=\"db_postcode\" size=\"20\" value=\"" . stripslashes($row["postcode"]) . "\">");
row2_init("Country", "<select name=db_country id=db_country>");
if (empty($row["country"]) && ($strRampType == "R" || $strRampType == "C")) {
    $row["country"] = "New Zealand";
}
if (empty($row["country"]) && $strRampType == "M") {
    $row["country"] = "Mexico";
}
print_country_select($row["country"]);
echo "</select></td></tr>";
echo "<tr><td colspan=2><hr></td></tr>";
row_heading_array(array("Enter Your Contact Information"));
row2("Phone Number (include country code)", "<input name=\"db_phone\" type=\"text\" id=\"db_phone\" size=\"40\" value=\"" . $row["phone"] . "\">");
row2("FAX Number (include country code)", "<input name=\"db_fax\" type=\"text\" id=\"db_fax\" size=\"40\" value=\"" . $row["fax"] . "\">");
$defEmail = $user->email_addr;
if (strlen($row["email_addr"]) > 0) {
    $defEmail = $row["email_addr"];
コード例 #10
0
ファイル: user_search.php プロジェクト: Turante/boincweb
function search_form()
{
    page_head("User search");
    echo "<form name=f method=get action=user_search.php>";
    start_table();
    row1("Search type", "top");
    row2("User name starts with <input type=text name=search_string>", "<input type=radio name=search_type value=\"name_prefix\" checked >");
    row2("Decreasing sign-up time", "<input type=radio name=search_type value=\"date\">");
    row2("Decreasing average credit", "<input type=radio name=search_type value=\"rac\">");
    row2("Decreasing total credit", "<input type=radio name=search_type value=\"total\">");
    row1("Filters");
    row2_init("Country", "<select name=country><option value=\"any\" selected>Any</option>");
    print_country_select("asdf");
    echo "</select></td></tr>";
    row2("With profile?", "<input type=radio name=profile value=either checked=1> Either\n\t\t<input type=radio name=profile value=no> No\n\t\t<input type=radio name=profile value=yes> Yes\n\t");
    row2("On a team?", "<input type=radio name=team value=either checked=1> Either\n\t\t<input type=radio name=team value=no> No\n\t\t<input type=radio name=team value=yes> Yes\n\t");
    row2("", "<input type=submit name=action value=Search>");
    end_table();
    echo "\n\t\t<script>document.f.search_string.focus()</script>\n\t";
    page_tail();
}
コード例 #11
0
ファイル: bolt.php プロジェクト: CalvinZhu/boinc
$user = get_logged_in_user(false);
if ($user) {
    BoltUser::lookup($user);
}
$courses = BoltCourse::enum();
start_table();
table_header("Course", "Status");
foreach ($courses as $course) {
    if ($course->hidden && !($user->bolt->flags & BOLT_FLAG_SHOW_ALL)) {
        continue;
    }
    $e = $user ? BoltEnrollment::lookup($user->id, $course->id) : null;
    if ($e) {
        $start = date_str($e->create_time);
        $view = BoltView::lookup_id($e->last_view_id);
        $ago = time_diff(time() - $view->start_time);
        $pct = number_format($view->fraction_done * 100, 0);
        $status = "Started {$start}\n            <br>Last visit: {$ago} ago\n            <br>{$pct}% done\n        ";
        if ($view->fraction_done < 1) {
            $status .= "<br><a href=bolt_sched.php?course_id={$course->id}&action=resume>Resume</a>\n            ";
        }
        $status .= "<br><a href=bolt_sched.php?course_id={$course->id}&action=start>Restart</a>\n            | <a href=bolt_course.php?course_id={$course->id}>History</a>\n        ";
    } else {
        $status = "\n            <a href=bolt_sched.php?course_id={$course->id}&action=start>Start</a>\n        ";
    }
    row2_init("<b>{$course->name}</b>\n        <br><p class=\"text-muted\">{$course->description}</p>", $status);
    show_refreshes();
    echo "</td></tr>\n";
}
end_table();
page_tail();
コード例 #12
0
ファイル: account_finish.php プロジェクト: CalvinZhu/boinc
// 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/>.
// 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';
check_get_args(array("auth"));
$auth = get_str("auth");
$user = BoincUser::lookup_auth($auth);
if (!$user) {
    error_page("no such account");
}
page_head(tra("Finish account setup"));
echo "\n    <form action=account_finish_action.php method=post>\n";
start_table();
row2(tra("Name") . "<br><p class=\"text-info\">" . tra("Identifies you on our web site. Use your real name or a nickname.") . "</p>", "<input name=\"name\" size=\"30\" value=\"{$user->name}\">");
row2_init(tra("Country") . "<br><p class=\"text-info\">" . tra("Select the country you want to represent, if any.") . "</p>", "<select name=\"country\">");
print_country_select();
echo "</select></td></tr>\n";
row2(tra("Postal or ZIP Code") . "<br><p class=\"text-info\">" . tra("Optional") . "</span>", "<input name=\"postal_code\" size=\"20\">");
row2("", "<input class=\"btn btn-primary\" type=\"submit\" value=\"OK\">");
end_table();
echo "\n    <input type=hidden name=auth value={$auth}>\n    </form>\n";
page_tail();
コード例 #13
0
ファイル: emLanzaForm.php プロジェクト: rampxxxx/em
            echo ",";
        } else {
            $haySiguiente = true;
        }
        $corriente_nombre = $current["nombre"];
        echo "'" . $corriente_nombre . "'";
        //parData['Ischemic Zone']=['v1','v2','G'];
    }
    echo "];";
}
echo "\nparams=parData[o.options[o.selectedIndex].text];\nparamsSave=parSave[o.options[o.selectedIndex].text];\ncurrents=parCurr[o.options[o.selectedIndex].text];\n//\tdocument.getElementById('tra').innerHTML += ' indice ' + o.selectedIndex + ' valor ' + o.options[o.selectedIndex].value + ' text ' + o.options[o.selectedIndex].text ; \n//\tdocument.getElementById('tra').innerHTML += ' Current size=>' + currents.length;\n//\tdocument.getElementById('tra').innerHTML += ' Params size=>' + params.length;\n}\n\n\n</script>";
echo "<form method=get action=emLanzaEjecucion.php>";
echo form_tokens($user->authenticator);
start_table();
row2(tra("ALIAS %1 Friendly name %2", "<br><span class=note>", "</span>"), "<input name=friendlyName type=text size=40 >");
row2_init(tra("#MODEL"), "<select name=model  onchange=\"populate(this)\">");
print_model_select();
echo "</select></td></tr>\n";
row2(tra("<parametro> ADD PARAMETERS </parametro> %1 Allow adding value to selected params  %2 ", "<br><span class=note>", "</span>"), "<sp > </sp> \n\n    <script>\n    \$(\"parametro\").click(function () {\naddParameterTable();\n});\n    </script>");
row2(tra("<burst>BURST</burst> %1 It allows create a sort of tasks by telling star,end and gap%2", "<br><span class=note>", "</span>"), "<sb > </sb> \n\n    <script>\n    \$(\"burst\").click(function () {\naddBurst();\n});\n    </script>");
row2(tra("#STEP %1 Defines total simulation time and time increment (time in msec)%2", "<br><span class=note>", "</span>"), "Simulation initiation at<input name=stepStart type=text size=10 >increment <input name=stepEnd type=text size=10>ending at <input name=stepIncrement type=text size=10>");
row2(tra("<stimulus>#STIMULUS</stimulus> %1 Defines the stimulation protocol %2", "<br><span class=note>", "</span>"), "<st > </st> \n\n    <script>\n    \$(\"stimulus\").click(function () {\naddStim();\n});\n    </script>");
row2(tra("#POST %1 Defines the output frequency and the first iteration at which data is saved %2", "<br><span class=note>", "</span>"), "First iteration saved is <input name=postFirst type=text size=10 >Saving frecuency <input name=postFrec type=text size=10 >");
row2(tra("<fileParameters>#FILE_PARAMETERS</fileParameters>%1 <allFileParameters>ADD ALL PARAMETERS TO DISK</allFileParameters> <br> Parameter that will be saved to file results.%2", "<br><span class=note>", "</span>"), "<ss> </ss>\n    <script>\n    \$(\"fileParameters\").click(function () {\naddParSave();\n});\n    \$(\"allFileParameters\").click(function () {\naddAllParSave();\n});\n    </script>");
row2(tra("<fileCurrents>#FILE_CURRENTS</fileCurrents> %1 <allFileCurrents>ADD ALL CURRENTS</allFileCurrents> <br> Currents that will be saved to file results.%2", "<br><span class=note>", "</span>"), "<sc> </sc>\n    <script>\n    \$(\"fileCurrents\").click(function () {\naddCurSave();\n});\n    \$(\"allFileCurrents\").click(function () {\naddAllCurSave();\n});\n    </script>");
row2("", "<input type=submit value='Go!'>");
end_table();
echo "</form>\n";
echo "<label for=\"tra\" id=\"tra\"></label>";
echo "<td>\n<a href=\"emListTaskForm.php\">" . "Check Created Task" . "</a>\n<a href=\"home.php\">" . "Back Home " . "</a>\n</td>\n";
page_tail();