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(); }
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); }
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&cmd=remove_confirm$tokens">Remove your team\'s message board.</a></p>'; } page_tail(); }
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(); }
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(); }
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(); }
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"); }
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>"; }
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 <account>\n <master_url>{$master_url}</master_url>\n <authenticator>8b8496fdd26df7dc0423ecd43c09a56b</authenticator>\n <project_name>" . PROJECT . "</project_name>\n ...\n </account>\n </pre>\n\n <li> " . tra("Select and Copy the string between %1 and %2 (%3 in the above example).", "<authenticator>", "</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(); }
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(); }
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(); }
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>"; }
$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();
// 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();
// 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();
// 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/db.inc"; require_once "../inc/util.inc"; require_once "../inc/account.inc"; check_get_args(array("next_url")); $next_url = sanitize_local_url(get_str('next_url', true)); $next_url = urldecode($next_url); $u = "login_form.php?next_url=" . $next_url; redirect_to_secure_url($u); $user = get_logged_in_user(false); if ($user) { page_head("Already logged in"); row2("You are logged in as {$user->name}", ". <a href=\"logout.php?" . url_tokens($user->authenticator) . "\">Log out</a>"); page_tail(); exit; } page_head(tra("Log in")); if (0) { echo ' <a href="openid_login.php?openid_identifier=https://www.google.com/accounts/o8/id"><img src=img/google-button.png></a> <a href="openid_login.php?openid_identifier=http://yahoo.com"><img src=img/yahoo-button.png></a> <br> '; } login_form($next_url); $config = get_config(); if (!parse_bool($config, "disable_account_creation") && !parse_bool($config, "no_web_account_creation")) { echo tra("or %1create an account%2.", "<a href=\"create_account_form.php?next_url={$next_url}\">", "</a>");
$forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount); row1(tra("Message display")); row2(tra("What to display"), "<input type=\"checkbox\" name=\"forum_hide_avatars\" " . $forum_hide_avatars . "> " . tra("Hide avatar images") . "<br>\n <input type=\"checkbox\" name=\"forum_hide_signatures\" " . $forum_hide_signatures . "> " . tra("Hide signatures") . "<br>\n <input type=\"checkbox\" name=\"forum_images_as_links\" " . $forum_image_as_link . "> " . tra("Show images as links") . "<br>\n <input type=\"checkbox\" name=\"forum_link_popup\" " . $forum_link_popup . "> " . tra("Open links in new window/tab") . "<br>\n <input type=\"checkbox\" name=\"forum_highlight_special\" " . $forum_highlight_special . "> " . tra("Highlight special users") . "<br>\n <input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"" . $forum_display_wrap_postcount . "\"> " . tra("Display this many messages per page") . "<br />\n "); row2(tra("How to sort"), tra("Threads:") . " " . select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting) . "<br>" . tra("Posts:") . " " . select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting) . "<br>\n <input type=\"checkbox\" name=\"forum_jump_to_unread\" " . $forum_jump_to_unread . "> " . tra("Jump to first new post in thread automatically") . "<br>\n <input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" " . $forum_ignore_sticky_posts . ">" . tra("Don't move sticky posts to top") . "<br>\n "); } // DISABLE_FORUMS // ------------ Message filtering ----------- row1(tra("Message filtering")); $filtered_userlist = get_ignored_list($user); $forum_filtered_userlist = ""; for ($i = 0; $i < sizeof($filtered_userlist); $i++) { $id = (int) $filtered_userlist[$i]; if ($id) { $filtered_user = BoincUser::lookup_id($id); if (!$filtered_user) { echo "Missing user {$id}"; continue; } $forum_filtered_userlist .= "<input class=\"btn btn-default\" type=\"submit\" name=\"remove" . $filtered_user->id . "\" value=\"" . tra("Remove") . "\"> " . $filtered_user->id . " - " . user_links($filtered_user) . "<br>"; } } row2(tra("Filtered users") . "<br><p class=\"text-muted\">" . tra("Ignore message board posts and private messages from these users.") . "</p>", "{$forum_filtered_userlist}\n <input type=\"text\" name=\"forum_filter_user\" size=12> " . tra("User ID (For instance: 123456789)") . "\n <br><input class=\"btn btn-default\" type=\"submit\" name=\"add_user_to_filter\" value=\"" . tra("Add user to filter") . "\">\n "); row1(tra("Update")); row2(tra("Click here to update preferences"), "<input class=\"btn btn-primary\" type=submit value=\"" . tra("Update") . "\">"); echo "</form>\n"; row1(tra("Reset")); row2(tra("Or click here to reset preferences to the defaults"), "<form method=\"post\" action=\"edit_forum_preferences_action.php\"><input class=\"btn btn-warning\" type=\"submit\" value=\"" . tra("Reset") . "\"><input type=\"hidden\" name=\"action\" value=\"reset_confirm\"></form>"); end_table(); page_tail(); $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
row2_plain("<b>" . tra("Unknown") . "</b>", tra("The task was sent to a computer, but the computer has not yet completed the work and reported the outcome.")); row2_plain("<b>" . tra("Success") . "</b>", tra("A computer completed and reported the task successfully.")); row2_plain("<b>" . tra("Couldn't send") . "</b>", tra("The server wasn't able to send the task to a computer (perhaps because its resource requirements were too large)")); row2_plain("<b>" . tra("Client error") . "</b>", tra("The task was sent to a computer and an error occurred.")); row2_plain("<b>" . tra("No reply") . "</b>", tra("The task was sent to a computer and no reply was received within the time limit.")); row2_plain("<b>" . tra("Didn't need") . "</b>", tra("The task wasn't sent to a computer because enough other tasks were completed for this workunit.")); row2_plain("<b>" . tra("Validate error") . "</b>", tra("The task was reported but could not be validated, typically because the output files were lost on the server.")); break; case "result_client_state": page_head(tra("Client states")); echo "<p>" . tra("A result's <b>client state</b> indicates the stage of processing at which an error occurred.") . "\n <p>\n "; start_table(); row2_plain("<b>" . tra("New") . "</b>", tra("The computer has not yet completed the task.")); row2_plain("<b>" . tra("Done") . "</b>", tra("The computer completed the task successfully.")); row2_plain("<b>" . tra("Downloading") . "</b>", tra("The computer couldn't download the application or input files.")); row2_plain("<b>" . tra("Computing") . "</b>", tra("An error occurred during computation.")); row2_plain("<b>" . tra("Uploading") . "</b>", tra("The computer couldn't upload the output files.")); break; case "result_time": page_head(tra("Time reported and deadline")); echo "\n <p>\n " . tra("A task's <b>Time reported or deadline</b> field depends on whether the task has been reported yet:") . "\n <p>\n "; start_table(); row2(tra("Already reported"), tra("The date/time it was reported")); row2(tra("Not reported yet, deadline in the future"), tra("Deadline, shown in green.")); row2(tra("Not reported yet, deadline in the past"), tra("Deadline, shown in red.")); break; default: page_head(tra("Unknown field")); } end_table(); page_tail();
$xmldoc = $resultunit->xml_doc_out; $nroffiles = 0; $cursor = 0; while ($tempfileinfo = parse_next_element($xmldoc, "<file_info>", &$cursor)) { $outputfiles[$nroffiles++] = parse_element($tempfileinfo, "<name>"); } if ($nroffiles >= 1) { $fanoutnr = parse_config($config, "<uldl_dir_fanout>"); row1("Output of this job"); row2("Number of output files of job: ", $nroffiles); for ($index = 0; $index < $nroffiles; ++$index) { $filename = $outputfiles[$index]; $url = "upload/" . fan_out_dir($filename, $fanoutnr) . "/" . $filename; $outputfilelink = '<a href="' . $url . '">' . $filename . '</a>'; row2("Output file " . ($index + 1) . ": ", $outputfilelink); } } $jobstderr = parse_element($resultunit->stderr_out, "<stderr_txt>"); if ($jobstderr) { row1("Error output of this job"); row2("", $jobstderr); } } } $max_jobs = max_nr_of_jobs_of_user($user); $njobs = nr_of_jobs_of_user($user); row1("Commands"); row2("", '<a href="queue_remove_job.php?workunitid=' . $workunit->id . '">Kill or Remove this job</a>'); row2("", '<a href="queue_show_queue.php">Go back to queue</a>'); end_table(); admin_page_tail();
// 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();
} echo '<form action="forum_edit.php?id=' . $post->id . '" method="POST">\\n'; echo form_tokens($logged_in_user->authenticator); start_table(); row1("Edit your message"); if ($can_edit_title) { //If this is the user can edit the thread title display a way of doing so if ($preview) { row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($title) . '">'); } else { row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">'); } } if ($preview) { row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($content) . '</textarea>'); } else { row2(tra("Message") . html_info() . post_warning(), '<textarea name="content" rows="12" cols="80">' . htmlspecialchars($post->content) . '</textarea>'); } if ($post->signature) { $enable_signature = "checked=\"true\""; } else { $enable_signature = ""; } row2('', '<input id="add_signature" name="add_signature" value="1" ' . $enable_signature . ' type="checkbox"> <label for="add_signature">' . tra("Add my signature to this post") . '</label>'); row2("", "<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input type=\"submit\" name=\"submit\" value=\"OK\">"); end_table(); echo "</form>"; page_tail(); $cvs_version_tracker[] = "\$Id: forum_edit.php 15758 2008-08-05 22:43:14Z davea \$"; //Generated automatically - do not edit
echo "</div>\n"; } echo "<form action=\"forum_edit.php?id=" . $post->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; echo form_tokens($logged_in_user->authenticator); start_table(); row1(tra("Edit your message")); if ($can_edit_title) { //If this is the user can edit the thread title display a way of doing so if ($preview) { row2(tra("Title") . html_info(), "<input type=\"text\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">"); } else { row2(tra("Title") . html_info(), '<input type="text" name="title" value="' . htmlspecialchars($thread->title) . '">'); } } if ($preview) { row2(tra("Message") . html_info() . post_warning(), $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>"); } else { row2(tra("Message") . html_info() . post_warning(), $bbcode_html . '<textarea name="content" rows="12" cols="80" class="message_field">' . htmlspecialchars($post->content) . '</textarea>'); } if ($post->signature) { $enable_signature = "checked=\"true\""; } else { $enable_signature = ""; } row2("", "<input id=\"add_signature\" name=\"add_signature\" value=\"1\" " . $enable_signature . " type=\"checkbox\">\n <label for=\"add_signature\">" . tra("Add my signature to this post") . "</label>"); row2("", "<input class=\"btn btn-default\" type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\"><input class=\"btn btn-primary\" type=\"submit\" name=\"submit\" value=\"OK\">"); end_table(); echo "</form>"; page_tail(); $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
function show_simulation() { $scen = get_str("scen"); $sim = get_str("sim"); $dir = "scenarios/{$scen}/simulations/{$sim}"; if (!is_dir($dir)) { error_page("No such simulation"); } page_head("Simulation {$sim}"); start_table(); $userid = (int) file_get_contents("{$dir}/userid"); $user = BoincUser::lookup_id($userid); $date = date_str(filemtime($dir)); row2("Scenario", "<a href=sim_web.php?action=show_scenario&name={$scen}>{$scen}</a>"); row2("Who", $user->name); row2("When", $date); row2("Parameters", "<pre>" . file_get_contents("{$dir}/inputs.txt") . "</pre>"); row2("Results", "<pre>" . file_get_contents("{$dir}/results.txt") . "</pre>"); $x = file_get_contents("{$dir}/index.html"); $x = str_replace("<h3>Output files</h3>", "", $x); $x = str_replace("href=", "href=scenarios/{$scen}/simulations/{$sim}/", $x); row2("Output files", $x); $x = get_comments($dir); if ($x) { row2("Comments", $x); } echo "<form action=sim_web.php>\n <input type=hidden name=scen value={$scen}>\n <input type=hidden name=sim value={$sim}>\n <input type=hidden name=action value=add_comment>\n "; row2("<input type=submit value=\"Add comment\">", "<textarea name=comment></textarea>"); echo "</form>"; end_table(); page_tail(); }
// 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();
page_head('Banishment Vote'); echo "<form action=\"forum_banishment_vote_action.php?userid=" . $userid . "\" method=\"POST\">\n"; echo form_tokens($logged_in_user->authenticator); start_table(); row1("Banishment Vote"); if (get_str('action') == "start") { if (!$user) { error_page("no user"); } $x = $user->banished_until; if ($x > time()) { error_page("User is already banished"); } //display input that selects reason echo "<input type=hidden name=action value=start>"; echo "<input type=\"hidden\" name=\"userid\" value=\"" . $userid . "\">\n"; row1("Are you sure you want to banish " . $user->name . "?\n\t\tThis will prevent " . $user->name . " from posting for chosen time period.<br />\n\t\tIt should be done only if " . $user->name . "\n\t\thas consistently exhibited trollish behavior."); row2("", "Select the reason category, optionally write a longer description of why the user should be banished."); row2("Category", "<select name=\"category\">\n\t<option value=\"1\">Obscene</option>\n\t<option value=\"2\">Flame/Hate mail</option>\n\t<option value=\"3\">User Request</option>\n\t<option value=\"4\">Other</option>\n</select>"); row2("Reason<br>Mailed if nonempty", "<textarea name=\"reason\" rows=\"10\" cols=\"80\"></textarea>"); row2("", "<input type=\"submit\" name=\"submit\" value=\"Proceed with vote\">"); } elseif (get_str('action') == "yes") { vote_yes($config, $logged_in_user, $user); } elseif (get_str('action') == "no") { vote_no($config, $logged_in_user, $user); } else { error_page("Unknown action"); } end_table(); echo "</form>"; page_tail();
function show_message_row($thread, $parent_post) { global $g_logged_in_user; global $content; global $preview; $x1 = "Message:" . html_info() . post_warning(); $x2 = ""; if ($parent_post) { $x2 .= " reply to <a href=#" . $parent_post->id . ">Message ID " . $parent_post->id . "</a>:"; } $x2 .= "<form action=forum_reply.php?thread=" . $thread->id; if ($parent_post) { $x2 .= "&post=" . $parent_post->id; } $x2 .= " method=\"post\">\n"; $x2 .= form_tokens($g_logged_in_user->authenticator); $x2 .= "<textarea name=\"content\" rows=\"18\" cols=\"80\">"; $no_quote = get_int("no_quote", true) == 1; if ($preview) { $x2 .= htmlspecialchars($content); } else { if (!$no_quote) { if ($parent_post) { $x2 .= quote_text(htmlspecialchars($parent_post->content), 80) . "\n"; } } } if (!$g_logged_in_user->prefs->no_signature_by_default) { $enable_signature = "checked=\"true\""; } else { $enable_signature = ""; } $x2 .= "</textarea><p>\r\n\t\t<input type=\"submit\" name=\"preview\" value=\"" . tra("Preview") . "\">\r\n\t\t<input type=\"submit\" value=\"Post reply\">\r\n\t\t<input name=\"add_signature\" id=\"add_signature\" value=\"add_it\" " . $enable_signature . " type=\"checkbox\">\r\n\t\t<label for=\"add_signature\">Add my signature to this reply</label>\r\n\r\n\t\t</form>\r\n\t"; row2($x1, $x2); }
<?php require_once "../inc/countries.inc"; require_once "../inc/utilidades.inc"; require_once "../inc/util_ops.inc"; require_once "../inc/db_ops.inc"; db_init(); admin_page_head(tra("Simulation Model Creation/Deletion")); 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 method=get action=emLanzaFormModelo.php>"; start_table(); row1("CREATE / DELETE", '9'); row2(tra("MODEL NUMBER %1 to Create OR Delete %2", "<br><span class=note>", "</span>"), "<input name=modelNumber type=text size=10 >"); row2("", "<input type=submit value='Go!'>"); row1("List of Actual Models ", '9'); echo "<tr><td>Model ID</td>"; echo "<td width=\"15\">" . "Model Name " . "</td>\n"; echo "</tr>"; row1("", '9'); $models = get_mysql_model("SELECT modelo_id, nombre FROM modelo order by modelo_id ASC "); foreach ($models as $model) { $model_id = $model["modelo_id"]; $model_name = $model["nombre"]; echo "<tr><td>" . $model_id . "</td>"; echo "<td>\n\t\t\t<a href=\"emListModeloDetail.php?model=" . $model_id . "\">" . $model_name . "</a>\n\t\t\t</td>\n\t\t\t"; echo " </tr>"; } end_table(); echo "</form>\n"; /*
$user->has_profile = 1; } else { error_page(tra("This user has no profile")); } } $logged_in_user = get_logged_in_user(false); check_whether_to_show_profile($user, $logged_in_user); $cache_args = "userid={$userid}"; $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); if ($cacheddata) { // Already got a cached version of the information $community_links_object = unserialize($cacheddata); } else { // Need to generate a new bunch of data $community_links_object = get_community_links_object($user); set_cached_data(USER_PROFILE_TTL, serialize($community_links_object), $cache_args); } page_head(tra("Profile: %1", $user->name)); start_table(); echo "<tr><td valign=\"top\">"; start_table(); show_profile($user, $logged_in_user); end_table(); echo "</td><td valign=\"top\">"; start_table(); row2(tra("Account data"), "<a href=\"show_user.php?userid=" . $userid . "\">" . tra("View") . "</a>"); community_links($community_links_object, $logged_in_user); end_table(); echo "</td></tr>"; end_table(); page_tail();
// 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/user.inc"; page_head("Forgot your account info?"); echo "\r\n<h3>1) If you know your account's email address,\r\n\tand you can receive email there:</h3>\r\n<p>\r\nEnter the email address below, and click OK.\r\nYou will be sent email instructions for resetting your password.\r\n"; start_table(); echo "<form method=post action=mail_passwd.php>\n"; row2("Email address", "<input size=40 name=email_addr>"); row2("", "<input type=submit value=OK>"); echo "</form>"; end_table(); echo "\r\n<p>\r\n<h3>2) If you forgot your account's email address,\r\n\tor you can't receive email there:</h3>\r\n\r\nIf you have run BOINC under the account,\r\nyou can still access it.\r\nHere's how:\r\n\r\n<ul>\r\n<li> Go to the BOINC data directory on your computer\r\n(on Windows this is usually <b>C:\\Documents and Settings\\All Users\\Application Data\\BOINC</b> or <b>C:\\Program Files\\BOINC</b>.\r\n<li> Find your account file for this project;\r\nit will have a name like <b>account_lhcathome.cern.ch.xml</b>\r\n(where the project URL is <b>http://lhcathome.cern.ch</b>).\r\n<li> Open the file in a text editor like Notepad.\r\nYou'll see something like\r\n<pre>\r\n<account>\r\n\t<master_url>http://lhcathome.cern.ch/</master_url>\r\n\t<authenticator>8b8496fdd26df7dc0423ecd43c09a56b</authenticator>\r\n\t<project_name>lhcathome</project_name>\r\n\t...\r\n</account>\r\n</pre>\r\n\r\n<li> Select and Copy the string between <authenticator>\r\nand </authenticator>\r\n(<b>8b8496fdd26df7dc0423ecd43c09a56b</b> in the above example).\r\n\r\n<li> Paste the string into the field below, and click OK.\r\n<li> You will now be logged in to your account;\r\nupdate the email and password of your account.\r\n</ul>\r\n"; start_table(); echo "<form action=login_action.php method=post>\n"; row2("Log in with authenticator", "<input name=authenticator size=40>"); row2("Stay logged in on this computer", "<input type=checkbox name=send_cookie checked>"); row2("", "<input type=submit value=OK>"); echo "</form>"; end_table(); page_tail();
<?php if ($REQUEST_METHOD == 'POST') { if ($sidebarname) { $sidebarname = addslashes($sidebarname); $q = "INSERT INTO sidebars (title, contenttype, username) \n\t\t\t\tVALUES ('{$sidebarname}', '{$contenttype}', '" . JOURNAL_USERNAME . "')"; if (mysql_query($q)) { print "Added."; } else { print mysql_error(); } } else { print "You have to enter a title."; } } else { print "<form action='{$PHP_SELF}' method='POST'>"; print table(row2("Sidebar Title:", "<input type='text' name='sidebarname' />") . row2("Content-type:", "<input type='radio' name='contenttype' " . "value='text/wiki' / checked='checked'>WikiWiki " . "<input type='radio' name='contenttype' " . "value='text/html' /> HTML") . row2('', "<input type='submit' value='Add' />")); print "</form>"; }