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 user_permissions_form() { global $special_user_bitfield; page_head('Manage user privileges'); start_table(); row1("Current special users", 99); echo "<tr><th>User</th>"; for ($i = 0; $i < S_NFLAGS; $i++) { echo "<th>" . $special_user_bitfield[$i] . "</th>\n"; } echo "<th> </th></tr>"; $result = _mysql_query("SELECT prefs.userid, prefs.special_user, user.id, user.name \n FROM forum_preferences as prefs, user \n WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"); $i = 0; while ($foo = _mysql_fetch_object($result)) { echo "<tr class=row{$i}>\n <td>{$foo->name} ({$foo->id})</td>\n <form action=\"user_permissions.php\" method=\"POST\">\n <input type=\"hidden\" name=\"userid\" value=\"{$foo->userid}\">\n "; for ($j = 0; $j < S_NFLAGS; $j++) { $bit = substr($foo->special_user, $j, 1); $c = $bit == 1 ? "checked" : ""; echo "<td>\n <input type=\"checkbox\" name=\"role" . $j . "\" value=\"1\" {$c}>\n </td>\n "; } echo "<td><input class=\"btn btn-default\" type=\"submit\" value=\"Update\"></td>"; echo "</form></tr>\n"; $i = 1 - $i; } echo "\n <tr class=row{$i}>\n <form action=\"user_permissions.php\" method=\"POST\">\n <td>Add User ID:<input type=\"text\" name=\"userid\" size=\"6\"></td>\n "; for ($j = 0; $j < S_NFLAGS; $j++) { echo "<td>\n <input type=\"checkbox\" name=\"role" . $j . "\" value=\"1\">\n </td>\n "; } echo "<td>\n <input class=\"btn btn-default\" type=\"submit\" value=\"Update\">\n </td>\n </form>\n </tr>\n "; 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 user_settings() { global $user; $flags = $user->bossa->flags; echo "<form action=bossa_admin.php method=get>\n <input type=hidden name=action value=update_user>\n "; start_table(); row1("User settings"); $x = $flags & BOLT_FLAGS_SHOW_ALL ? "checked" : ""; row2("Show hidden apps?", "<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 class=\"btn btn-default\" type=submit value=\"Update user\">"); end_table(); echo "</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(); }
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>"; }
function show_manage_user_form($user) { global $special_user_bitfield; $Nbf = sizeof($special_user_bitfield); admin_page_head("Management {$user->name}"); if (!defined("POST_REPORT_EMAILS")) { echo "<p><font color='RED'>\n There is no administrative email address defined for reporting problems\n or abuse in the forums. Please define POST_REPORT_EMAILS in project.inc\n </font></p>\n"; } echo "<form name='manage_user' action=manage_user.php method='POST'>\n <input type='hidden' name='userid' value='" . $user->id . "'>\n "; start_table(); row1("<b>User: </b> {$user->name} <div align='right'>\n <input name=\"delete_user\" type=\"submit\" value=\"Delete user\">\n </div>"); show_user_summary_public($user); show_profile_link_ops($user); row2("Email:", "{$user->email_addr}"); project_user_summary($user); end_table(); project_user_page_private($user); echo "</form>\n"; // Special User status: echo "\n\n<P>\n <table width='100%'><tr>\n <td width='50%' valign='TOP'> \n"; echo "<form name='special_user' action=manage_user.php method=\"POST\">\n <input type='hidden' name='userid' value='" . $user->id . "'>\n "; start_table(); row1("Special User Status"); echo "<tr>\n"; for ($i = 0; $i < $Nbf; $i++) { $bit = substr($user->prefs->special_user, $i, 1); echo "<tr><td><input type='checkbox'' name='special_user_" . $i . "' value='1'"; if ($bit == 1) { echo " checked='checked'"; } echo ">" . $special_user_bitfield[$i] . "</td></tr>\n"; } echo "</tr>"; echo "</tr><td colspan={$Nbf} align='RIGHT'>\n <input name='special_user' type='SUBMIT' value='Update'>\n </td></tr>\n "; end_table(); echo "</form>\n"; echo "\n\n</td><td valign='TOP'>\n\n"; // Suspended posting privileges echo "<form name='banishment' action=manage_user.php method=\"POST\">\n <input type='hidden' name='userid' value='" . $user->id . "'>\n "; start_table(); row1("Suspension"); if ($user->prefs->banished_until) { $dt = $user->prefs->banished_until - time(); if ($dt > 0) { $x = " Suspended until " . time_str($user->prefs->banished_until) . "<br/> (Expires in " . time_diff($dt) . ")"; } else { $x = " last suspended " . time_str($user->prefs->banished_until); } row1($x); } else { $dt = 0; } echo "<tr><td>\n Suspend user for:\n <blockquote>\n <input type='radio' name='suspend_for' value='3600'> 1 hour <br/>\n <input type='radio' name='suspend_for' value='7200'> 2 hours <br/>\n <input type='radio' name='suspend_for' value='18000'> 6 hours <br/>\n <input type='radio' name='suspend_for' value='36000'> 12 hours <br/>\n <input type='radio' name='suspend_for' value='86400'> 24 hours <br/>\n "; echo "\n <input type='radio' name='suspend_for' value='172800'> 48 hours <br/>\n <input type='radio' name='suspend_for' value='", 86400 * 7, "'> 1 week <br/>\n <input type='radio' name='suspend_for' value='", 86400 * 14, "'> 2 weeks <br/>\n "; if ($dt > 0) { echo "\n <input type='radio' name='suspend_for' value='-1'> <b>unsuspend</b> <br/>"; } echo "\n </blockquote>\n\n "; echo "<P>Reason (required):\n"; echo "<textarea name='suspend_reason' cols='40' rows='4'></textarea>"; echo "<br><font size='-2' >The reason will be sent to both the user\n and to the project administrators.</font>\n"; echo "<p align='RIGHT'><input name='suspend_submit' type='SUBMIT' value='Update'></P>\n"; echo " </td></tr>\n"; end_table(); echo "</form>\n"; echo "</td></tr> </table>\n"; admin_page_tail(); }
break; case 1: show_team_forum_title($forum, $thread); break; } if ($preview == tra("Preview")) { $options = null; echo "<h2>" . tra("Preview") . "</h2>\n"; echo "<div class=pm_preview>"; echo output_transform($content, $options); 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\"";
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();
$user = BoincUser::lookup_id($profile->userid); echo uotd_thumbnail($profile, $user); echo user_links($user) . "<br>"; $resp = output_transform($profile->response1); $resp = sanitize_tags($resp); echo sub_sentence($resp, ' ', 150, true); } echo "</td></tr>"; row1(tra("User Profile Explorer")); echo "<tr><td>\n <ul>\n <li>" . tra("View the %1User Picture Gallery%2.", "<a href=\"" . URL_BASE . "user_profile/user_gallery_1.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1by country%2.", "<a href=\"" . URL_BASE . "user_profile/profile_country.html\">", "</a>") . "</li>\n <li>" . tra("Browse profiles %1at random%2, %3at random with pictures%2, or %4at random without pictures%2.", "<a href=\"?cmd=rand&pic=-1\">", "</a>", "<a href=\"?cmd=rand&pic=1\">", "<a href=\"?cmd=rand&pic=0\">") . "</li>\n"; if (file_exists(PROFILE_PATH . "profile_alpha.html")) { echo "<li>" . tra("Alphabetical profile listings:") . "<br>"; include PROFILE_PATH . "profile_alpha.html"; } echo "</ul></td></tr>"; row1(tra("Search profile text")); rowify("\n <form action=\"profile_search_action.php\" method=\"GET\">\n <input type=\"text\" name=\"search_string\">\n <input type=\"submit\" value=\"" . tra("Search") . "\">\n </form>\n"); end_table(); page_tail(); function select_profile($cmd) { // Request for a random profile. // if ($cmd == "rand") { $profiles = array(); $pic = get_int('pic'); if ($pic == 0) { $profiles = BoincProfile::enum("has_picture=0", "limit 1000"); } else { if ($pic == 1) { $profiles = BoincProfile::enum("has_picture=1", "limit 1000");
break; case 1: show_team_forum_title($forum, $thread); break; } if ($preview == tra("Preview")) { $options = null; echo '<div id="preview">\\n'; echo '<div class="header">' . tra("Preview") . '</div>\\n'; echo output_transform($content, $options); echo "</div>\n"; } 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\"";
$forumid = get_str("forumid"); } $forumlist = "<option value=\"-1\">" . tra("All") . "</option>"; $categories = BoincCategory::enum(); foreach ($categories as $category) { $forums = BoincForum::enum("parent_type=0 and category={$category->id}"); foreach ($forums as $forum) { if ($forum->id == $forumid) { $forumlist .= "<option selected value=\"" . $forum->id . "\">" . $forum->title . "</option>"; } else { $forumlist .= "<option value=\"" . $forum->id . "\">" . $forum->title . "</option>"; } } } row2(tra("Forum") . "<br />\n <span class=\"smalltext\">" . tra("Only display posts from this forum") . "</span>", '<select name="search_forum">' . $forumlist . '</select'); $sortlist = null; foreach ($thread_sort_styles as $id => $style) { if ($id == CREATE_TIME_NEW) { $sortlist .= "<option selected value=\"" . $id . "\">" . $style . "</option>"; } else { $sortlist .= "<option value=\"" . $id . "\">" . $style . "</option>"; } } row2(tra("Sort by"), '<select name="search_sort">' . $sortlist . '</select'); row1(" "); row2("", "<input type=\"submit\" value=\"" . tra("Start the search") . "\">"); echo "</form>"; end_table(); page_tail(); $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
} else { $cancelacionTrabajos = false; } } else { $tablaParametros[$name] = $value; } } if ($cancelacionTrabajos == true) { row1("Work Canceling .", '9'); foreach ($tablaParametros as $work_id => $alias) { $salida = shell_exec('cd ../..;bin/cancel_jobs ' . $work_id . ' ' . $work_id . ' >> /tmp/php.out 2>>/tmp/php.out '); $result = mysql_query("delete from user_workunit where workunit_id = " . $work_id); row2("Canceled Work " . $work_id, $alias); } } else { row1("Data Deleting.", '9'); $contador = 1; foreach ($tablaParametros as $work_id => $name) { //echo "key : " . $key . " value : " . $value . "<br/>"; $pathBorrado = "../../sample_results/"; $fichero0 = $pathBorrado . $name . "_0.gz"; $fichero1 = $pathBorrado . $name . "_1.gz"; $salida = shell_exec('rm -f ' . $fichero0 . " " . $fichero1); row2("Deleted File", $fichero0); row2("Deleted File", $fichero1); $result = mysql_query("delete from user_workunit where workunit_id = " . $work_id); $contador += 1; } row2("", " Deleted Database References "); } end_table();
### FIN : FUNCTIONS SELECT ############################# db_init(); foreach ($_REQUEST as $name => $value) { $modelo_id = $value; $nombre = $name; } $result_ok = mysql_query("delete from modelo where modelo_id=" . $modelo_id); admin_page_head(tra("Simulation Model Deletion")); echo " <script src=\"http://code.jquery.com/jquery-latest.js\"></script> "; echo "\n <style>\n parametro { color:blue; margin:5px; cursor:pointer; }\n parametro:hover { background:green; }\n </style>\n\n<script> \n////////////////////////////////////////////////////\n/// Declaracion, inicializacion de variables /////\n////////////////////////////////////////////////////\n\n</script>"; start_table(); if ($result_ok) { row1("Model DELETED! ", '9'); } else { row1("ERROR deleting model!!! ", '9'); } echo "<tr><td width=\"15\">Model ID</td>"; echo "<td width=\"15\">" . "Name " . "</td>\n"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo $modelo_id; echo "</td>"; echo "<td>"; echo $nombre; echo "</td>"; echo "</tr>"; end_table(); /* echo "<label for=\"tra\" id=\"tra\">Traza</label>";
} end_table(); echo "</form>\n"; echo "\n\n</td><td valign='TOP'>\n\n"; // Suspended posting privileges echo "<form name='banishment' action=manage_user.php method=\"POST\">\n <input type='hidden' name='userid' value='" . $user->id . "'>\n"; start_table(); row1("Suspension: {$user->name}"); if ($user->prefs->banished_until) { $dt = $user->prefs->banished_until - time(); if ($dt > 0) { $x = " Suspended until " . time_str($user->prefs->banished_until) . "<br/> (Expires in " . time_diff($dt) . ")"; } else { $x = " last suspended " . time_str($user->prefs->banished_until); } row1($x); } else { $dt = 0; } echo "<tr><td>\nSuspend user for:\n <blockquote>\n <input type='radio' name='suspend_for' value='3600'> 1 hour <br/>\n <input type='radio' name='suspend_for' value='7200'> 2 hours <br/>\n <input type='radio' name='suspend_for' value='18000'> 6 hours <br/>\n <input type='radio' name='suspend_for' value='36000'> 12 hours <br/>\n <input type='radio' name='suspend_for' value='86400'> 24 hours <br/>\n"; if ($is_admin) { // in case we are only a moderator echo "\n <input type='radio' name='suspend_for' value='172800'> 48 hours <br/>\n <input type='radio' name='suspend_for' value='", 86400 * 7, "'> 1 week <br/>\n <input type='radio' name='suspend_for' value='", 86400 * 14, "'> 2 weeks <br/>\n"; } if ($dt > 0) { echo "\n <input type='radio' name='suspend_for' value='-1'> <b>unsuspend</b> <br/>"; } echo "\n </blockquote>\n\n"; echo "<P>Reason (required):\n"; echo "<textarea name='suspend_reason' cols='40' rows='4'></textarea>"; echo "<br><font size='-2' >The reason will be sent to both the user\n and to the project administrators.</font>\n";
// 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"; check_get_args(array()); page_head(tra("BBCode tags")); echo "<p>\n" . tra("BBCode tags let you format text in your profile and message-board postings.\nIt's similar to HTML, but simpler. The tags start with a [ (where you would\nhave used %1 in HTML) and end with ] (where you would have used %2 in\nHTML).", "<", ">") . "</p>"; start_table(); row1(tra("Examples")); row2_plain("[b]" . tra("Bold") . "[/b]", "<b>" . tra("Bold") . "</b>"); row2_plain("[i]" . tra("Italic") . "[/i]", "<i>" . tra("Italic") . "</i>"); row2_plain("[u]" . tra("Underline") . "[/u]", "<u>" . tra("Underline") . "</u>"); row2_plain("[s]" . tra("Strikethrough") . "[/s]", "<s>" . tra("Strikethrough") . "</s>"); row2_plain("[sup]" . tra("Superscript") . "[/sup]", "X<sup>" . tra("Superscript") . "</sup>"); row2_plain("[size=15]" . tra("Big text") . "[/size]", "<span style=\"font-size: 15px\">" . tra("Big text") . "</span>"); row2_plain("[color=red]" . tra("Red text") . "[/color]", "<font color=\"red\">" . tra("Red text") . "</font></li>"); row2_plain("[url=https://google.com/]" . tra("link to website") . "[/url]", "<a href=\"https://google.com/\">" . tra("link to website") . "</a>"); row2_plain("[quote]" . tra("Quoted text") . "[/quote]", tra("use for quoted blocks of text")); row2_plain("[img]http://example.com/pic.jpg[/img]", tra("use to display an image")); row2_plain("[code]" . tra("Code snippet here") . "[/code]", tra("use to display some code")); row2_plain("[pre]" . tra("Pre-formatted text") . "[/pre]", tra("use to display pre-formatted (usually monospaced) text")); row2_plain("[list]<br>* " . tra("Item 1") . "<br>* " . tra("Item2") . "<br>[/list]", "<ul><li>" . tra("Item 1") . "</li><li>" . tra("Item 2") . "</li></ul>"); row2_plain("[github]#1392[/github] or [github]ticket:1392[/github]", tra("link to an issue on the BOINC Github repository") . ": <a href=\"https://github.com/BOINC/boinc/issues/1392\">#1392</a>"); row2_plain("[github]wiki:WebForum[/github]", tra("link to a Wiki page on the BOINC Github repository") . ": <a href=\"https://github.com/BOINC/boinc-dev-doc/wiki/BoincIntro\">BoincIntro</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
$estimated .= "<option value=144>Tonga Pa\\anga</option>\n"; $estimated .= "<option value=145>Trinidad Dollar</option>\n"; $estimated .= "<option value=146>Tunisia Dinar</option>\n"; $estimated .= "<option value=147>Turkish Lira</option>\n"; $estimated .= "<option value=148>Turkmenistan Manat</option>\n"; $estimated .= "<option value=149>Uganda Shilling</option>\n"; $estimated .= "<option value=150>Ukrainian Hryvnia</option>\n"; $estimated .= "<option value=151>Uruguayan Peso</option>\n"; $estimated .= "<option value=152>Utd. Arab Emir. Dirham</option>\n"; $estimated .= "<option value=153>Uzbekistan Sum</option>\n"; $estimated .= "<option value=154>Vanuatu Vatu</option>\n"; $estimated .= "<option value=155>Venezuelan Bolivar</option>\n"; $estimated .= "<option value=156>Vietnamese Dong</option>\n"; $estimated .= "<option value=157>Yemen Rial</option>\n"; $estimated .= "<option value=158>Zambia Kwacha</option>\n"; $estimated .= "<option value=159>Zimbabwe Dollar</option>\n"; $estimated .= "</select>\n"; $estimated .= "<input name=\"outV\" value=\"0.00\" style=\"text-align: right; width: 80px;\" disabled=\"disabled\">\n"; echo row2(tra("Amount you would like to donate"), $amount); echo row2(tra("Estimated value in"), $estimated); if ($user_id) { $tmp_user_name = $user_id . " (" . $logged_in_user->name . ")"; echo row2(tra("Anonymous donation") . "<br><span class=\"smalltext\">" . tra("Select this if you dont want your name and account number displayed in\ndonator lists.<br>If not checked, you will be recorded as user ID %1", $tmp_user_name) . "</span>", "<input type=\"checkbox\" name=\"anonymous\" id=\"anonymous\" value=\"1\"><label for=\"anonymous\">" . tra("Yes") . "</label>"); } else { echo row2(tra("Anonymous donation") . "<br><span class=\"smalltext\">" . tra("To assign the donation with your user ID, please log in."), "<input type=\"checkbox\" name=\"anonymous\" id=\"anonymous\" value=\"1\" checked=\"checked\" disabled=\"disabled\">\n <label for=\"anonymous\">" . tra("Yes") . "</label>"); } echo row2("", "<input type=\"submit\" value=\"" . tra("Proceed") . "\">"); echo row1(tra("Donations are accepted through") . "<br><img src=\"img/paypal_logo.png\" alt=\"PayPal\">"); end_table(); echo "</form>\n"; page_tail();
<?php if ($REQUEST_METHOD == 'POST') { if ($data) { $q = "REPLACE INTO sidebars (title, data, username) \n\t\t\t\tVALUES ('{$sidebar}', '{$data}', '" . JOURNAL_USERNAME . "')"; if (mysql_query($q)) { print "Updated."; } else { print mysql_error(); } } else { print "You have to enter /something/."; } } else { $r = mysql_fetch_all(mysql_query("SELECT * FROM sidebars WHERE username = '******' \n\t\t\t\tAND title = '{$sidebar}'")); extract($r[0]); print "<form action='{$PHP_SELF}' method='POST'>"; print table(row1(heading(2, $sidebar)) . row1(textarea('data', $data)) . row1("<input type='submit' value='Add' />")); print "</form>"; }
$u = "login_form.php?next_url=" . urlencode($next_url); redirect_to_secure_url($u); $user = get_logged_in_user(false); 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> '; } echo "\n <form name=\"f\" method=\"post\" action=\"" . secure_url_base() . "/login_action.php\">\n <input type=\"hidden\" name=\"next_url\" value=\"{$next_url}\">\n"; start_table(); row2(tra("Email address:") . '<br><span class="note"><a href="get_passwd.php">' . tra("forgot email address?") . "</a></span>", "<input name=email_addr type=\"text\" size=40 tabindex=1>"); row2(tra("Password:"******"note"><a href="get_passwd.php">' . tra("forgot password?") . "</a></span>", '<input type="password" name="passwd" size="40" tabindex="2">'); row2(tra("Stay logged in"), '<input type="checkbox" name="stay_logged_in" checked>'); $x = urlencode($next_url); $config = get_config(); if (parse_bool($config, "disable_account_creation") || parse_bool($config, "no_web_account_creation")) { $create_acct = ""; } else { $create_acct = tra("or %1create an account%2.", "<a href=\"create_account_form.php?next_url={$x}\">", "</a>"); } row2("", "<input type=\"submit\" name=\"mode\" value=\"" . tra("Log in") . "\" tabindex=\"3\"><br><br>" . $create_acct); if ($user) { row1("Log out"); row2("You are logged in as {$user->name}", "<a href=\"logout.php?" . url_tokens($user->authenticator) . "\">Log out</a>"); } end_table(); echo "\n </form>\n <script type=\"text/javascript\">\n document.f.email_addr.focus();\n </script>\n"; page_tail();
// 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/forum.inc'; require_once '../inc/util_ops.inc'; db_init(); admin_page_head('Manage special users'); start_table("align=\"center\""); row1("Current special users", '9'); echo "<tr><td>User</td>"; for ($i = 0; $i <= 6; $i++) { echo "<td width=\"15\">" . $special_user_bitfield[$i] . "</td>\n"; } echo "</tr>"; $result = mysql_query("SELECT prefs.userid, prefs.special_user, user.id, user.name \n FROM forum_preferences as prefs, user \n WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"); for ($i = 1; $i <= mysql_num_rows($result); $i++) { $foo = mysql_fetch_object($result); echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n"; echo "<input type=\"hidden\" name=\"userid\" value=\"{$foo->userid}\"\n <tr><td>{$foo->name} ({$foo->id})</td>\n "; for ($j = 0; $j <= 6; $j++) { $bit = substr($foo->special_user, $j, 1); echo "<td><input type=\"checkbox\" name=\"role" . $j . "\" value=\"1\""; if ($bit == 1) { echo " checked=\"checked\"";
// 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"; check_get_args(array()); $user = get_logged_in_user(false); page_head(tra("Change password")); echo "\n <form method=post action=" . secure_url_base() . "edit_passwd_action.php>\n"; if ($user) { echo "\n <input type=hidden name=auth value={$user->authenticator}>\n "; start_table(); } else { start_table(); row1(tra("You can identify yourself using either") . "<ul>" . "<li>" . tra("your email address and old password") . "<li>" . tra("your account key") . "</ul>"); row2(tra("Email address"), "<input name=email_addr size=40>"); row2(tra("Current password"), "<input type=password name=old_passwd size=40>"); row2(tra("<b>OR</b>: Account key") . "<br><font size=-2><a href=get_passwd.php>" . tra("Get account key by email") . "</a>", "<input name=auth size=40>"); } row2(tra("New password"), "<input type=password name=passwd size=40>"); row2(tra("New password, again"), "<input type=password name=passwd2 size=40>"); row2("", "<input type=submit value='" . tra("Change password") . "'>"); end_table(); echo "</form>\n"; page_tail();
$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();
start_table(); if ($_FILES["file"]["error"] > 0) { row1("ERROR uploading file ", '9'); echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; $file = $_FILES["file"]; row2("Size", $file['size']); row2("Error", $file['error']); row2("Name", $file['name']); row2("Type", $file['type']); row2("Temporal Name", $file['tmp_name']); } else { if (strcmp($_FILES["file"]["name"], ".htaccess") == 0) { row1("SECURITY filter !THIS FILE IS NOT ALLOWED TO UPLOAD!", '9'); row2("File Upload", $_FILES["file"]["name"]); } else { row1("SUCCESS uploading and creationg new app version", '9'); row2("File Upload", $_FILES["file"]["name"]); row2("File Type", $_FILES["file"]["type"]); row2("File Size (Kb)", $_FILES["file"]["size"] / 1024); //row2("Temp File ", $_FILES["file"]["tmp_name"] ); $dataDir = "../../backupEm/"; $programName = "emProgramName"; move_uploaded_file($_FILES["file"]["tmp_name"], $dataDir . $programName); //row2("Stored in ", $dataDir . $programName ); $versiones = get_mysql_lastVersion("select max(version_num) from app_version,platform where platform.id=app_version.platformid"); foreach ($versiones as $version) { $lastVersion = $version["max(version_num)"]; } //row2("Last Version", $lastVersion); $queryMyVersion = "select max(version_num) from app_version,platform where app_version.platformid=platform.id and platform.name='" . $_REQUEST["platform"] . "'"; $myVersions = get_mysql_myVersion($queryMyVersion);
touch("../../reread_db"); } /***************************************************\ * Display the DB contents in a form \***************************************************/ admin_page_head("Manage Application Versions"); if ($commands) { echo $commands; } // show the last DB commands given $self = $_SERVER['PHP_SELF']; echo "<form action='{$self}' method='POST'>\n"; // Application Version table: echo "<P>\n"; start_table("center"); row1("<b>" . PROJECT . " Application Versions</b>", 8); echo "<TR><TH>ID #</TH>\r\n\t <TH>Appllication</TH>\r\n\t <TH>Version</TH>\r\n\t <TH>Platform</TH>\r\n\t <TH>minimum<br>core version</TH>\r\n\t <TH>maximum<br>core version</TH>\r\n\t <TH>deprecated?</TH>\r\n\t <TH>DELETE?<sup>*</sup>\r\n\t</TH>\r\n\t </TR>\n"; $q = "SELECT * FROM app_version ORDER BY appid, version_num, platformid"; $result = mysql_query($q); $Nrow = mysql_num_rows($result); for ($j = 1; $j <= $Nrow; $j++) { $item = mysql_fetch_object($result); $id = $item->id; // grey-out deprecated versions $f1 = $f2 = ''; if ($item->deprecated == 1) { $f1 = "<font color='GREY'>"; $f2 = "</font>"; } echo "<tr> "; echo " <TD align='center'>{$f1} {$id} {$f2}</TD>\n";
// 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/email.inc"; check_get_args(array()); redirect_to_secure_url("edit_email_form.php"); $user = get_logged_in_user(); page_head(tra("Change email address")); $email_text = ""; if (is_valid_email_addr($user->email_addr)) { $email_text = $user->email_addr; } echo "<form method=post action=" . secure_url_base() . "/edit_email_action.php>\n"; start_table(); row1(tra("Change the email address of your account")); row2(tra("New email address") . "<br><p class=\"text-muted\">" . tra("Must be a valid address of the form 'name@domain'") . "</p>", "<input name=email_addr size=50 type=text value='{$email_text}'>"); // we need the password here not for verification, // but because we store it salted with email address, // which is about to change. row2(tra("Password") . "<br><a href=" . secure_url_base() . "/edit_passwd_form.php><p class=\"text-muted\">" . tra("No password?") . "</p></a>", "<input type=password name=passwd>"); row2("", "<input class=\"btn btn-default\" type=submit value='" . tra("Change email address") . "'>"); end_table(); echo "</form>\n"; page_tail();
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"; /* echo "<label for=\"tra\" id=\"tra\">Traza</label>"; echo "<td> <a href=\"emLanzaForm.php\">". "Create Task" ."</a> <a href=\"home.php\">". "Back Home " ."</a>
break; case 1: show_team_forum_title($forum); break; } if ($preview == tra("Preview")) { $options = null; echo "<h2>" . tra("Preview") . "</h2>\n"; echo "<div class=\"pm_preview\">"; echo output_transform($content, $options); echo "</div>\n"; } echo "<form action=\"forum_post.php?id=" . $forum->id . "\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; echo form_tokens($logged_in_user->authenticator); start_table(); row1(tra("Create a new thread")); $submit_help = ""; $body_help = ""; if ($content && !$title) { $submit_help = "<br /><font color=\"red\">" . tra("Remember to add a title") . "</font>"; } if ($force_title && $title) { row2(tra("Title"), htmlspecialchars($title) . "<input type=\"hidden\" name=\"title\" value=\"" . htmlspecialchars($title) . "\">"); } else { row2(tra("Title") . $submit_help, "<input type=\"text\" name=\"title\" size=80 value=\"" . htmlspecialchars($title) . "\">"); } row2(tra("Message") . html_info() . post_warning() . $body_help, $bbcode_html . "<textarea name=\"content\" rows=\"12\" cols=\"80\" class=\"message_field\">" . htmlspecialchars($content) . "</textarea>"); if (!$logged_in_user->prefs->no_signature_by_default) { $enable_signature = "checked=\"true\""; } else { $enable_signature = "";