<?php $relPath = "./../../pinc/"; include_once $relPath . 'base.inc'; include_once $relPath . 'theme.inc'; include_once $relPath . 'js_newpophelp.inc'; include_once $relPath . 'metarefresh.inc'; include_once '../includes/team.inc'; require_login(); $theme_extra_args = array("js_data" => get_newHelpWin_javascript("{$code_url}/pophelp.php?category=teams&name=edit_")); // Either the parameter is $_POST['tsid'] when coming from the edit form, // or it is $_GET['tid'] when using the link on top of the team summary. $tid = get_integer_param($_POST, 'tsid', null, 1, null, true); if (!isset($tid)) { $tid = get_integer_param($_GET, 'tid', null, 1, null); } $result = select_from_teams("id = {$tid}"); $curTeam = mysql_fetch_assoc($result); // Allow team owner and site administrators to edit the team if ($userP['u_id'] != $curTeam['owner'] && !user_is_a_sitemanager()) { $title = _("Authorization Failed"); $desc = _("You are not authorized to edit this team...."); metarefresh(4, "tdetail.php?tid={$tid}", $title, $desc); exit; } if (isset($_GET['tid'])) { $edit = _("Edit"); output_header($edit . " " . $curTeam['teamname'], SHOW_STATSBAR, $theme_extra_args); echo "<center><br>"; showEdit(unstripAllString($curTeam['teamname'], 0), unstripAllString($curTeam['team_info'], 1), unstripAllString($curTeam['webpage'], 1), 0, $tid); echo "</center>";
// Reload preferences to reflect changed active profile. dpsession_set_preferences_from_db(); // Bounce user back to the proofreading preferences tab. $selected_tab = 1; $url = "{$code_url}/userprefs.php?tab={$selected_tab}&origin=" . urlencode($origin); metarefresh(3, $url, _('Delete profile'), _('Reloading current tab....')); } else { // Show the same tab that was just saved $url = "{$code_url}/userprefs.php?tab={$selected_tab}&origin=" . urlencode($origin); metarefresh(0, $url, _('Saving preferences'), _('Reloading current tab....')); } } } // header, start of table, form, etc. common to all tabs $header = _("Personal Preferences"); $theme_extra_args["js_data"] = get_newHelpWin_javascript("{$code_url}/pophelp.php?category=prefs&name=set_") . "\n\n // function that can be used to check/uncheck a lot\n // of checkboxes at a time.\n // First parameter: true/false.\n // Following parameters: The name of the checkboxes.\n // The code checks that a checkbox really exists\n // before accessing it.\n function check_boxes(value) {\n var f = document.forms[0];\n for (var i = 1; i < arguments.length; i++) {\n var name = arguments[i];\n eval('if (f.'+name+') f.'+name+'.checked=value');\n }\n }"; output_header($header, SHOW_STATSBAR, $theme_extra_args); echo_stylesheet_for_tabs(); echo "<br><center>"; echo "<form action='userprefs.php' method='post'>"; echo "<table width='90%' bgcolor='#ffffff' border='1' cellspacing='0' cellpadding='0' style='border: 1px solid #111; border-collapse: collapse'>"; echo "<tr><td bgcolor='" . $theme['color_headerbar_bg'] . "' colspan='6' align='center'>"; echo "<font size=\"+2\" color='" . $theme['color_headerbar_font'] . "'><b>" . sprintf(_("Preferences Page for %s"), $pguser) . "</b></font>\n"; echo "<br><font color='" . $theme['color_headerbar_font'] . "'><i>" . _("Your preferences are grouped into tabs. Switch between the tabs by clicking on e.g. 'General' or 'Proofreading'.") . "</i></font>\n"; echo "<br><font color='" . $theme['color_headerbar_font'] . "'><i>" . _("(click the ? for help on that specific preference)") . "</i></font></td></tr>"; echo_tabs($tabs, $selected_tab); echo "<input type='hidden' name='tab' value='{$selected_tab}'>"; // display one of the tabs if ($selected_tab == 1) { echo_proofreading_tab(); } else {
include_once $relPath . 'metarefresh.inc'; include_once $relPath . 'misc.inc'; include_once $relPath . 'theme.inc'; include_once $relPath . 'MARCRecord.inc'; include_once $relPath . 'project_states.inc'; include_once $relPath . 'project_trans.inc'; include_once $relPath . 'DPage.inc'; include_once $relPath . 'Project.inc'; include_once $relPath . 'comment_inclusions.inc'; include_once 'edit_common.inc'; include_once $relPath . 'project_edit.inc'; include_once $relPath . 'project_events.inc'; include_once $relPath . 'wordcheck_engine.inc'; include_once $relPath . 'js_newpophelp.inc'; require_login(); $theme_args['js_data'] = get_newHelpWin_javascript("{$code_url}/faq/pophelp/project_manager/"); $return = array_get($_REQUEST, "return", "{$code_url}/tools/project_manager/projectmgr.php"); if (!user_is_PM()) { die('permission denied'); } $pih = new ProjectInfoHolder(); if (isset($_POST['saveAndQuit']) || isset($_POST['saveAndProject']) || isset($_POST['saveAndPreview'])) { $errors = $pih->set_from_post(); $pih->normalize_spaces(); if (empty($errors)) { $pih->save_to_db(); if (isset($_POST['saveAndQuit'])) { metarefresh(0, "projectmgr.php", _("Save and Go To PM Page"), ""); } elseif (isset($_POST['saveAndProject'])) { metarefresh(0, "{$code_url}/project.php?id={$pih->projectid}", _("Save and Go To Project"), ""); }