本文整理汇总了PHP中metarefresh函数的典型用法代码示例。如果您正苦于以下问题:PHP metarefresh函数的具体用法?PHP metarefresh怎么用?PHP metarefresh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了metarefresh函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: array
$difficulty_options = array('' => _('any'), 'beginner' => _('Beginner'), 'easy' => _('Easy'), 'average' => _('Average'), 'hard' => _('Hard'));
// ---------
$state_options[''] = _('any state');
foreach ($PROJECT_STATES_IN_ORDER as $proj_state) {
$state_options[$proj_state] = project_states_text($proj_state);
}
// ---------
define('DEFAULT_N_RESULTS_PER_PAGE', 100);
$widgets = array(new Widget(array('id' => 'title', 'label' => _('Title'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('nameofwork', 'LIKE'))), new Widget(array('id' => 'author', 'label' => _('Author'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('authorsname', 'LIKE'))), new Widget(array('id' => 'language', 'label' => _('Language'), 'type' => 'select', 'options' => $lang_options, 'can_be_multiple' => TRUE, 'initial_value' => '', 'q_part' => 'WHERE', 'q_contrib' => array('language', 'LIKE'))), new Widget(array('id' => 'genre', 'label' => _('Genre'), 'type' => 'select', 'options' => $genre_options, 'can_be_multiple' => TRUE, 'q_part' => 'WHERE', 'q_contrib' => array('genre', '='))), new Widget(array('id' => 'difficulty', 'label' => _('Difficulty'), 'type' => 'select', 'options' => $difficulty_options, 'can_be_multiple' => TRUE, 'q_part' => 'WHERE', 'q_contrib' => array('difficulty', '='))), new Widget(array('id' => 'special_day', 'label' => _('Special day'), 'type' => 'select', 'options' => $special_day_options, 'can_be_multiple' => TRUE, 'initial_value' => '', 'q_part' => 'WHERE', 'q_contrib' => array('special_code', '='))), new Widget(array('id' => 'projectid', 'label' => _('Project ID'), 'type' => 'text', 'size' => 45, 'can_be_multiple' => TRUE, 'separator' => '[\\s,;]+', 'q_part' => 'WHERE', 'q_contrib' => array('projectid', 'LIKE'))), new Widget(array('id' => 'project_manager', 'label' => _('Project Manager'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('username', 'LIKE'))), new Widget(array('id' => 'checkedoutby', 'label' => _('Checked Out By'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('checkedoutby', 'LIKE'))), new Widget(array('id' => 'pp_er', 'label' => _('Post-processor'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('postproofer', 'LIKE'))), new Widget(array('id' => 'ppv_er', 'label' => _('Post-processing Verifier'), 'type' => 'text', 'q_part' => 'WHERE', 'q_contrib' => array('ppverifier', 'LIKE'))), new Widget(array('id' => 'postednum', 'label' => _('PG etext number'), 'type' => 'text', 'can_be_multiple' => TRUE, 'separator' => '[\\s,;]+', 'q_part' => 'WHERE', 'q_contrib' => array('postednum', '='))), new Widget(array('id' => 'state', 'label' => _('State'), 'type' => 'select', 'options' => $state_options, 'can_be_multiple' => TRUE, 'q_part' => 'WHERE', 'q_contrib' => array('state', '='))), new Widget(array('id' => 'n_results_per_page', 'label' => _('Number of results per page'), 'type' => 'select', 'options' => array(30 => 30, 100 => 100, 300 => 300), 'can_be_multiple' => FALSE, 'initial_value' => DEFAULT_N_RESULTS_PER_PAGE, 'q_part' => 'LIMIT', 'q_contrib' => '{VALUE}')));
// -----------------------------------------------------------------------------
if (user_is_PM() && empty($_GET['show']) && empty($_GET['up_projectid'])) {
if ($userP['i_pmdefault'] == 0) {
metarefresh(0, "projectmgr.php?show=user_all", "", "");
exit;
} elseif ($userP['i_pmdefault'] == 1) {
metarefresh(0, "projectmgr.php?show=user_active", "", "");
exit;
}
}
output_header(_("Project Search"), NO_STATSBAR);
$PROJECT_IS_ACTIVE_sql = "(state NOT IN ('" . PROJ_SUBMIT_PG_POSTED . "','" . PROJ_DELETE . "'))";
if (!isset($_GET['show']) && !isset($_GET['up_projectid']) || $_GET['show'] == 'search_form' || $_GET['show'] == '' && $_GET['up_projectid'] == '') {
echo_manager_header();
// New proofreaders are having a hard time finding stuff because they
// end up on the Project Search page instead of the starting round page.
// See if we can't help them out by pointing them to the starting
// round page.
$pagesproofed = get_pages_proofed_maybe_simulated();
if ($pagesproofed < 100) {
echo "<div class='callout'>";
echo "<div class='calloutheader'>";
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:projectmgr.php
示例2: metarefresh
<?php
$relPath = '../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'metarefresh.inc';
// The contents of this file have been moved to the pgdp.net wiki.
metarefresh(0, "http://www.pgdp.net/wiki/DP_Code_Development");
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:8,代码来源:dev_process.php
示例3: undo_all_magic_quotes
// Translated by user babymag 18 Feb 2009
$relPath = '../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'faq.inc';
include_once $relPath . 'pg.inc';
include_once $relPath . 'theme.inc';
include_once $relPath . 'metarefresh.inc';
include_once $relPath . 'misc.inc';
// undo_all_magic_quotes()
undo_all_magic_quotes();
# SITE-SPECIFIC
# Redirect users to this document in the wiki
if (strpos($code_url, '://www.pgdp.')) {
$url = 'http://www.pgdp.net/wiki/DP_Official_Documentation:Formatting/Italian/Regole_di_Formattazione';
metarefresh(0, $url);
}
$theme_args["css_data"] = "p.backtotop {text-align:right; font-size:75%;margin-right:-5%;}";
output_header('Regole di Formattazione', NO_STATSBAR, $theme_args);
?>
<!-- NOTE TO MAINTAINERS AND DEVELOPERS:
There are now HTML comments interspersed in this document which are/will be
used by a script which automagically slices out the Random Rule text for the
database. It does this by copying:
1) All text from one h_3 to the next h_3
-OR-
2) All text from h_3 to the END_RR comment line.
This allows us to have "extra" information in the Guidelines, but leave it out
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:30,代码来源:formatting_guidelines_italian.php
示例4: logout_forum_user
<?php
//clear cookie if one is already set
$relPath = './../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'metarefresh.inc';
include_once $relPath . 'forum_interface.inc';
if ($user_is_logged_in) {
logout_forum_user();
dpsession_end();
}
metarefresh(0, "../default.php", _("Logout Complete"), "<a href=\"../default.php\">" . _("Return to DP Home Page.") . "</a>");
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:13,代码来源:logout.php
示例5: mysql_query
// Set the first remaining available profile to be active.
$result = mysql_query("SELECT * FROM user_profiles WHERE u_ref={$uid}");
$new_profile_name = mysql_result($result, 0, "profilename");
$new_profile_id = mysql_result($result, 0, "id");
echo sprintf(_("Active usersettings profile is now: %s"), $new_profile_name) . "\n<br>\n";
mysql_query(sprintf("\n UPDATE users\n SET u_profile='{$new_profile_id}'\n WHERE u_id='{$uid}' AND username='%s'", mysql_real_escape_string($pguser)));
// 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>";
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:userprefs.php
示例6: _
$title = _("Transferring...");
$body = "";
$refresh_url = prepare_url($transition->detour);
metarefresh(2, $refresh_url, $title, $body);
exit;
}
$extras = array();
// -------------------------------------------------------------------------
$error_msg = $transition->do_state_change($project, $pguser, $extras);
if ($error_msg == '') {
$title = _("Action Successful");
$body = sprintf(_("Your request ('%s') was successful."), $transition->action_name);
} else {
fatal_error(sprintf(_("Something went wrong, and your request ('%s') has probably not been carried out."), $transition->action_name) . "\n" . _("Error") . ":" . "\n" . $error_msg);
}
// Return the user to the screen they were at
// when they requested the state change.
$refresh_url = $return_uri;
metarefresh(2, $refresh_url, $title, $body);
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function prepare_url($url_template)
{
global $projectid, $return_uri;
$url = str_replace('<PROJECTID>', $projectid, $url_template);
// Pass $return_uri on to the next page, in hopes it can use it.
$connector = strpos($url, '?') === FALSE ? '?' : '&';
$encoded_return_uri = urlencode($return_uri);
$url .= "{$connector}return_uri={$encoded_return_uri}";
return $url;
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:changestate.php
示例7: output_header
if ($can_edit) {
$action = 'show_sources';
} else {
output_header('', NO_STATSBAR);
if ($new) {
$source->log_request_for_approval($pguser);
}
echo _("Your proposal has been successfully recorded. You will be\n notified by email once it has been approved.");
}
}
}
if ($action == 'show_sources') {
// The more detailed listing of Image Sources is only available
// to managers.
if (!$can_edit) {
metarefresh(0, "{$code_url}/tools/project_manager/show_image_sources.php");
}
output_header(_('List Image Sources'), NO_STATSBAR, $theme_args);
show_is_toolbar();
$result = mysql_query("SELECT code_name FROM image_sources ORDER BY display_name ASC");
echo "<br>";
echo "<table class='listing'>";
echo "<tr>";
echo "<th>" . _("ID") . "</th>";
echo "<th>" . _("Display Name") . "</th>";
echo "<th>" . _("Full Name") . "</th>";
echo "<th>" . _("Status") . "</th>";
echo "<th>" . _("Store Images") . "</th>";
echo "<th>" . _("Publish Images") . "</th>";
echo "<th>" . _("Source shown to") . "</th>";
echo "</tr>";
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:manage_image_sources.php
示例8: validate_userID
$ID = validate_userID('id', @$_GET['id']);
$result = mysql_query("SELECT * FROM non_activated_users WHERE id='{$ID}'");
if (mysql_num_rows($result) == 1) {
$user = mysql_fetch_assoc($result);
} else {
$user = NULL;
// If the user is already activated, and the activated user is the
// one that is logged in, redirect them to the Activity Hub. This can
// happen if they use the login form in the navbar and are redirected
// back here.
try {
$user_test = new User();
$user_test->load("id", $ID);
$existing_user = $user_test->username;
if ($pguser == $existing_user) {
metarefresh(0, "{$code_url}/activity_hub.php");
}
} catch (Exception $exception) {
$existing_user = NULL;
}
}
// A newly registered user has clicked the link in the welcoming e-mail and has thus
// proved that the e-mail is working. It is time to 'activate' the account, i.e.
// create a record in the users table, create a profile, stats data, etc.
// and send a welcome mail.
output_header(_('Activate account'));
if (!$user) {
echo "<p>\n";
echo sprintf(_("There is no account with the id '%s' waiting to be activated."), $ID);
if ($existing_user) {
echo "\n";
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:activate.php
示例9: get_enumerated_param
include_once '../includes/team.inc';
$order = get_enumerated_param($_GET, 'order', 'id', array('id', 'teamname', 'member_count'));
$direction = get_enumerated_param($_GET, 'direction', 'asc', array('asc', 'desc'));
$tname = array_get($_REQUEST, 'tname', null);
$texact = array_get($_REQUEST, 'texact', null);
$tstart = get_integer_param($_GET, 'tstart', 0, 0, null);
if ($tname) {
if ($texact) {
$where_body = "teamname='{$tname}'";
} else {
$where_body = "teamname LIKE '%{$tname}%'";
}
$tResult = select_from_teams($where_body, "ORDER BY {$order} {$direction} LIMIT {$tstart},20");
$tRows = mysql_num_rows($tResult);
if ($tRows == 1) {
metarefresh(0, "tdetail.php?tid=" . mysql_result($tResult, 0, "id") . "", '', '');
exit;
}
$tname = "tname=" . urlencode($tname) . "&";
} else {
$tResult = select_from_teams("", "ORDER BY {$order} {$direction} LIMIT {$tstart},20");
$tRows = mysql_num_rows($tResult);
$tname = "";
}
$name = _("Team List");
output_header($name);
echo "<center><br>";
//Display of user teams
echo "<table border='1' cellspacing='0' cellpadding='4' style='border: 1px solid #111; border-collapse: collapse' width='95%'>\n";
echo "<tr bgcolor='" . $theme['color_headerbar_bg'] . "'><td colspan='6' align='center'><b><font color='" . $theme['color_headerbar_font'] . "'>";
echo _("User Teams");
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:tlist.php
示例10: log_project_event
if ($weeks == "replace") {
log_project_event($projectid, $pguser, 'smooth-reading', 'text replaced');
} else {
log_project_event($projectid, $pguser, 'smooth-reading', 'text available', $deadline);
}
notify_project_event_subscribers($project, 'sr_available');
if ($auto_post_to_project_topic) {
// Add an auto-post to the project's discussion topic.
$project->ensure_topic();
topic_add_post($project->topic_id, "Project made available for smooth-reading", "The project has just been made available for smooth-reading for {$weeks} weeks." . "\n\n" . "(This post is automatically generated.)", '[Smooth Reading Monitor]', FALSE);
}
}
// let them know file uploaded and send back to the right place
$msg1 = _("File uploaded. Thank you!");
$msg2 = _("Project returned to pool");
if ($have_file && $returning_to_pool) {
$msg = $msg1 . "\n" . $msg2;
} else {
if ($have_file) {
$msg = $msg1;
} else {
if ($returning_to_pool) {
$msg = $msg2;
} else {
$msg = _("This shouldn't happen. No file upload and not returning to pool.");
}
}
}
metarefresh(1, $back_url, $msg, $msg);
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:upload_text.php
示例11: mysql_query
$result = mysql_query("SELECT metadata FROM {$projectid} WHERE image = '{$imagename}'");
$old_md = mysql_result($result, 0, "metadata");
//concat new metadata
$i = 0;
$new_md = '';
foreach ($_POST as $key => $val) {
if ($val == 'on') {
$new_md = $new_md . ',' . $key;
$i++;
}
$all_md = $old_md . $new_md;
$result = mysql_query("UPDATE {$projectid} SET metadata = '{$all_md}' WHERE image = '{$imagename}'");
}
//change page status and keep going
$result = mysql_query("UPDATE {$projectid} SET state = 'save_md_second' WHERE image = '{$imagename}'");
metarefresh(0, "md_phase2.php?projectid={$projectid}", "Image Metadata Collection", "");
}
$md_groups = array('Front Matter' => array('acknowledge' => 'Acknowledgement', 'dedication' => 'Dedication', 'ednotes' => "Editor's Notes", 'foreword' => 'Foreword', 'intro' => 'Introduction', 'loi' => 'List of Illustrations', 'preface' => 'Preface', 'prologue' => 'Prologue', 'toc' => 'Table of Contents', 'titlepage' => 'Title Page'), 'Body of Book' => array('abbreviation' => 'Abbreviation', 'division' => 'Chapter/Part/Book Heading', 'epigraph' => 'Dedication/Epigraph', 'footnote' => 'Footnote', 'illustration' => 'Illustration or Drawing', 'letter' => 'Letter', 'list' => 'List', 'math' => 'Symbolic Notation', 'poetry' => 'Poetry/Verse', 'sidenote' => 'Sidenote', 'verse' => 'Song/Music', 'table' => 'Table'), 'Back Matter' => array('appendix' => 'Appendix', 'afterword' => 'Afterword', 'biblio' => 'Bibliography', 'colophon' => 'Colophon', 'endnote' => 'End Note', 'epilogue' => 'Epilogue', 'index' => 'Index'));
output_header(_("Image Frame"));
//Start the outside table
echo "<table cols ='2' border = '1'>";
//Display image
if ($userP['i_layout'] == 1) {
$iWidth = $userP['v_zoom'];
} else {
$iWidth = $userP['h_zoom'];
}
$iWidth = round(1000 * $iWidth / 100);
// The outside table has a single row containing two cells.
echo "<tr>\n";
// The left cell contains the page image
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:md_phase2.php
示例12: _
} else {
include_once $relPath . 'theme.inc';
$title = _("Three Team Maximum");
output_header($title);
echo "<br><center>";
echo "<table border='1' cellspacing='0' cellpadding='3' style='border: 1px solid #111; border-collapse: collapse' width='95%'>";
echo "<tr bgcolor='" . $theme['color_headerbar_bg'] . "'><td colspan='3'><b><center><font face='" . $theme['font_headerbar'] . "' color='" . $theme['color_headerbar_font'] . "'>" . _("Three Team Maximum") . "</font></center></b></td></tr>";
echo "<tr bgcolor='" . $theme['color_mainbody_bg'] . "'><td colspan='3'><center><font face='" . $theme['font_mainbody'] . "' color='" . $theme['color_mainbody_font'] . "' size='2'>" . _("You have already joined three teams.<br>Which team would you like to replace?") . "</font></center></td></tr>";
echo "<tr bgcolor='" . $theme['color_navbar_bg'] . "'>";
$teamR = mysql_query("SELECT teamname FROM user_teams WHERE id='" . $userP['team_1'] . "'");
echo "<td width='33%'><center><b><a href='jointeam.php?tid={$tid}&otid=1'>" . mysql_result($teamR, 0, 'teamname') . "</a></b></center></td>";
$teamR = mysql_query("SELECT teamname FROM user_teams WHERE id='" . $userP['team_2'] . "'");
echo "<td width='33%'><center><b><a href='jointeam.php?tid={$tid}&otid=2'>" . mysql_result($teamR, 0, 'teamname') . "</a></b></center></td>";
$teamR = mysql_query("SELECT teamname FROM user_teams WHERE id='" . $userP['team_3'] . "'");
echo "<td width='34%'><center><b><a href='jointeam.php?tid={$tid}&otid=3'>" . mysql_result($teamR, 0, 'teamname') . "</a></b></center></td>";
echo "</tr><tr bgcolor='" . $theme['color_headerbar_bg'] . "'><td colspan='3'><center><b><a href='../teams/tdetail.php?tid={$tid}'><font face='" . $theme['font_headerbar'] . "' color='" . $theme['color_headerbar_font'] . "' size='2'>" . _("Do Not Join Team") . "</font></a></b></center></td></tr></table></center>";
$redirect_team = 0;
}
} else {
$title = _("Unable to Join the Team");
$desc = _("You are already a member of this team....");
metarefresh(4, "../teams/tdetail.php?tid={$tid}", $title, $desc);
$redirect_team = 0;
}
if ($redirect_team == 1) {
dpsession_set_preferences_from_db();
$title = _("Join the Team");
$desc = _("Joining the team....");
metarefresh(0, "../teams/tdetail.php?tid={$tid}", $title, $desc);
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:jointeam.php
示例13: _
echo "<p><b>" . _("Note") . ":</b> " . _("If this report causes a project to be marked bad you will be redirected to the Activity Hub.") . "</p>";
echo "</form>";
} else {
$reason = $_POST['reason'];
//See if they filled in a reason. If not tell them to go back
if ($reason == 0) {
include_once $relPath . 'theme.inc';
output_header(_("Incomplete Form!"), NO_STATSBAR);
echo "<br><center>" . _("You have not completely filled out this form! Please hit the <a href='javascript:history.back()'>back</a> button on your browser & fill out all fields.") . "</center>";
exit;
}
//Update the page the user was working on to reflect a bad page.
//This may cause the whole project to be marked bad.
$project_is_bad = $ppage->markAsBad($pguser, $reason);
// Redirect the user to either continue proofreading if project is still open
// or present a link back to the activity hub
if ($_POST['redirect_action'] == "proof" && !$project_is_bad) {
$frame1 = $ppage->url_for_do_another_page();
$title = _("Bad Page Report");
$body = _("Continuing to Proofread");
metarefresh(0, $frame1, $title, $body);
} else {
$frame1 = "../../activity_hub.php";
$title = _("Stop Proofreading");
$body = sprintf(_("Return to the <a %s>Activity Hub</a>."), "href='{$frame1}' target='_top'");
slim_header($title);
echo $body;
exit;
}
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:report_bad_page.php
示例14: elseif
echo "<br><h2 align='center'>{$page_title}</h2>\n";
if ($errors != '') {
echo "<br><center><font size='+1' color='#ff0000'><b>{$errors}</b></font></center>";
}
$pih->show_form();
if (isset($_POST['saveAndPreview'])) {
$pih->preview();
}
} elseif (isset($_POST['quit'])) {
// if return is empty for whatever reason take them to
// the PM page
if (empty($return)) {
$return = "{$code_url}/tools/project_manager/projectmgr.php";
}
// do the redirect
metarefresh(0, $return, _("Quit Without Saving"), "");
} else {
$requested_action = get_enumerated_param($_REQUEST, 'action', null, array('createnew', 'clone', 'createnewfromuber', 'create_from_marc_record', 'edit'));
if (in_array($requested_action, array('createnew', 'clone', 'createnewfromuber', 'create_from_marc_record'))) {
check_user_can_load_projects(true);
// exit if they can't
}
switch ($requested_action) {
case 'createnew':
$page_title = _("Create a Project");
$fatal_error = $pih->set_from_nothing();
break;
case 'clone':
$page_title = _("Clone a Project");
$fatal_error = $pih->set_from_db(FALSE);
break;
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:editproject.php
示例15: require_login
<?php
$relPath = "../../pinc/";
include_once $relPath . 'base.inc';
include_once $relPath . 'metarefresh.inc';
include_once $relPath . 'Project.inc';
include_once $relPath . 'project_trans.inc';
require_login();
$projectid = validate_projectID('projectid', @$_POST['projectid']);
$postcomments = @$_POST['postcomments'];
// Verify that it's the pp-er trying to perform this action.
$project = new Project($projectid);
if (!$project->PPer_is_current_user || $project->state != PROJ_POST_FIRST_CHECKED_OUT) {
echo _("The project is not checked out to you.");
exit;
}
$qry = mysql_query("\n UPDATE projects SET postcomments = '{$postcomments}'\n WHERE projectid = '{$projectid}'\n");
$msg = _("Comments added.");
metarefresh(1, "{$code_url}/project.php?id={$projectid}", $msg, $msg);
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:20,代码来源:postcomments.php
示例16: get_enumerated_param
include_once '../includes/member.inc';
$order = get_enumerated_param($_GET, 'order', 'u_id', array('u_id', 'username', 'date_created'));
$direction = get_enumerated_param($_GET, 'direction', 'asc', array('asc', 'desc'));
$mstart = get_integer_param($_GET, 'mstart', 0, 0, null);
$uname = @$_REQUEST['uname'];
$uexact = @$_REQUEST['uexact'];
if (!empty($uname)) {
if ($uexact == 'yes') {
$where_clause = "WHERE username='" . $uname . "'";
} else {
$where_clause = "WHERE username LIKE '%" . addcslashes($uname, "%_") . "%'";
}
$mResult = mysql_query("\n SELECT u_id, username, date_created, u_privacy\n FROM users\n {$where_clause}\n ORDER BY {$order} {$direction}\n LIMIT {$mstart},20\n ");
$mRows = mysql_num_rows($mResult);
if ($mRows == 1) {
metarefresh(0, "mdetail.php?id=" . mysql_result($mResult, 0, "u_id") . "", '', '');
exit;
}
$uname = "uname=" . $uname . "&";
} else {
$mResult = mysql_query("\n SELECT u_id, username, date_created, u_privacy\n FROM users\n ORDER BY {$order} {$direction}\n LIMIT {$mstart},20\n ");
$mRows = mysql_num_rows($mResult);
$uname = "";
}
output_header(_("Member List"));
echo "<center><br>";
//Display of user teams
echo "<table border='1' cellspacing='0' cellpadding='4' style='border: 1px solid #111; border-collapse: collapse' width='95%'>";
echo "<tr bgcolor='" . $theme['color_headerbar_bg'] . "'><td colspan='6' align='center'><b><font color='" . $theme['color_headerbar_font'] . "'>" . sprintf(_("%s Members"), $site_name) . "</font></b></td></tr>";
echo "<tr bgcolor='" . $theme['color_navbar_bg'] . "'>";
if ($order == "u_id" && $direction == "asc") {
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:mbr_list.php
示例17: array
$numeric_fields = array("open_month" => _("Open Month"), "open_day" => _("Open Day"), "close_month" => _("Close Month"), "close_day" => _("Close Day"));
foreach ($numeric_fields as $field => $string) {
if ($_POST[$field] == '' || !ctype_digit($_POST[$field])) {
$errmsgs .= sprintf(_("Field %s does not contain a valid number."), $string) . "<br>";
}
}
// validate the URLs
if ($_POST['info_url'] && !startswith($_POST['info_url'], "http")) {
$errmsgs .= _("Info URL is not a valid URL -- ensure it starts with http://.") . "<br>";
}
if ($_POST['image_url'] && !startswith($_POST['image_url'], "http")) {
$errmsgs .= _("Image URL is not a valid URL -- ensure it starts with http://.") . "<br>";
}
$source->save_from_post();
// Redisplay at the entry just added or edited
metarefresh(0, "{$page_url}#" . urlencode($spec_code));
}
}
if ($action == 'show_specials') {
output_header(_('Manage Special Days'), NO_STATSBAR, $theme_args);
$table_summary = _("Special Days Listing");
show_sd_toolbar();
$result = mysql_query("SELECT spec_code\n FROM special_days\n ORDER BY open_month, open_day");
echo "<br>\n\n";
echo "<table class='listing' summary='" . attr_safe($table_summary) . "'>\n";
$count = 0;
$current_month = -1;
while (list($source_name) = mysql_fetch_row($result)) {
$count++;
$source = new SpecialDay($source_name);
$current_month = $source->show_listing_row($count, $current_month);
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:manage_special_days.php
示例18: mysql_query
$result = mysql_query("SELECT id FROM user_teams WHERE id != " . $tid . " AND teamname = '" . addslashes(stripAllString(trim($_POST['teamname']))) . "'");
if (mysql_num_rows($result) > 0 || trim($_POST['teamname']) == '') {
$preview = _("Preview");
output_header($preview, SHOW_STATSBAR, $theme_extra_args);
$teamimages = uploadImages(1, $tid, "both");
$curTeam['avatar'] = $teamimages['avatar'];
if (trim($_POST['teamname']) == "") {
echo "<center><br>" . _("The team name must not be empty.") . "<br>";
} else {
echo "<center><br>" . _("The team name must be unique. Please make any changes and resubmit.") . "<br>";
}
showEdit(stripslashes($_POST['teamname']), stripslashes($_POST['text_data']), stripslashes($_POST['teamwebpage']), 0, $tid);
echo "<br></center><br>";
} else {
if (!empty($_POST['tavatar'])) {
mysql_query("UPDATE user_teams SET avatar='" . $_POST['tavatar'] . "' WHERE id = {$tid}");
} elseif (!empty($_FILES['teamavatar'])) {
uploadImages(0, $tid, "avatar");
}
if (!empty($_POST['ticon'])) {
mysql_query("UPDATE user_teams SET icon='" . $_POST['ticon'] . "' WHERE id = {$tid}");
} elseif (!empty($_FILES['teamicon'])) {
uploadImages(0, $tid, "icon");
}
mysql_query("UPDATE user_teams SET teamname='" . addslashes(stripAllString(trim($_POST['teamname']))) . "', team_info='" . addslashes(stripAllString($_POST['text_data'])) . "', webpage='" . addslashes(stripAllString($_POST['teamwebpage'])) . "' WHERE id='{$tid}'");
$title = _("Saving Team Update");
$desc = _("Updating team....");
metarefresh(0, "tdetail.php?tid={$tid}", $title, $desc);
}
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:tedit.php
示例19: elseif
$otid = 0;
if (!isset($_POST['teamall'])) {
if ($userP['team_1'] == $_POST['tteams']) {
$otid = 1;
} elseif ($userP['team_2'] == $_POST['tteams']) {
$otid = 2;
} else {
if ($userP['team_3'] == $_POST['tteams']) {
$otid = 3;
}
}
}
dpsession_set_preferences_from_db();
$title = _("Join the Team");
$desc = _("Creating the team....");
metarefresh(0, "../members/jointeam.php?tid={$tid}&otid={$otid}", $title, $desc);
}
} elseif (isset($_POST['mkQuit'])) {
$title = _("Quit Without Saving");
$desc = _("Quitting without saving...");
metarefresh(4, "{$code_url}/activity_hub.php", $title, $desc);
exit;
} else {
$name = _("Create a New Team");
output_header($name, SHOW_STATSBAR, $theme_extra_args);
echo "<center><br>";
showEdit("", "", "", 1, 0);
echo "</center>";
}
}
// vim: sw=4 ts=4 expandtab
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:new_team.php
示例20: switch_layout
switch_layout();
echo_proof_frame($ppage);
break;
case B_REVERT_TO_ORIGINAL:
$ppage->saveAsInProgress($text_data, $pguser);
$ppage->revertToOriginal();
echo_proof_frame($ppage);
break;
case B_REVERT_TO_LAST_TEMPSAVE:
$ppage->revertToSaved();
echo_proof_frame($ppage);
break;
case B_SAVE_AND_DO_ANOTHER:
$ppage->saveAsDone($text_data, $pguser);
$url = $ppage->url_for_do_another_page();
metarefresh(1, $url, _("Save as 'Done' & Proof Next"), _("Page Saved."));
break;
case B_SAVE_AND_QUIT:
$ppage->saveAsDone($text_data, $pguser);
leave_proofing_interface(_("Save as 'Done'"));
break;
case B_RETURN_PAGE_TO_ROUND:
$ppage->returnToRound($pguser);
leave_proofing_interface(_("Return to Round"));
break;
case B_REPORT_BAD_PAGE:
include 'report_bad_page.php';
break;
case B_RUN_SPELL_CHECK:
if (!is_dir($aspell_temp_dir)) {
mkdir($aspell_temp_dir);
开发者ID:cpeel,项目名称:dproofreaders-shadow,代码行数:31,代码来源:processtext.php
注:本文中的metarefresh函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论