Example #1
0
function output_dot_from_parser_tree(sfEvent $ev)
{
    $node = $ev->getSubject();
    output_header();
    output_node_info($node);
    output_children($node);
    output_footer();
}
Example #2
0
function output_message($title, $msg)
{
    clear_buffer();
    output_header($title);
    output_block_start($title);
    echo $msg;
    output_block_end();
    output_footer();
    exit;
}
<?php

$relPath = '../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'faq.inc';
include_once $relPath . 'theme.inc';
include_once $relPath . 'misc.inc';
// undo_all_magic_quotes()
undo_all_magic_quotes();
output_header(_('Site Progress Snapshot'), NO_STATSBAR);
?>

<h1>Site Progress Snapshot</h1>

<p>The Site Progress Snapshot is a status dashboard of how many projects there are in the various stages of production and how well we're tracking to the page goals for the day.</p>

<p>Each row has three major components:
<ul>
  <li>General activity information: abbreviation, name, and your access to that activity.</li>
  <li>Project-specific details.</li>
  <li>Page-specific details.</li>
</ul>
</p>


<h2>Activity information</h2>
<p>Every row contains information about the activity, including an abbreviation and name. Hovering over the name also shows a description of the round. For example:
<ul>
  <li><b>Abbreviation:</b> <?php 
echo $ELR_round->id;
?>
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
    in the Random Rule for purposes of clarity/brevity.

    If you are updating this document, the above should be kept in mind.
switch ($cmd) {
    case 'login':
        output_header();
        form_login();
        output_footer();
        break;
    case 'process_login':
        output_header();
        process_login();
        output_footer();
        break;
    case 'publish':
        output_header();
        form_publish();
        output_footer();
        break;
    case 'create_album':
        output_header();
        create_album();
        output_footer();
        break;
    case 'add_picture':
        process_picture();
        break;
    case 'send_reg':
        send_reg_file();
        break;
    default:
        display_instructions();
}
// switch
Example #6
0
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/Formatting_Guidelines';
    metarefresh(0, $url);
}
$theme_args["css_data"] = "p.backtotop {text-align:right; font-size:75%;margin-right:-5%;}";
output_header('Formatting Guidelines', 'header', 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
    in the Random Rule for purposes of clarity/brevity.

    If you are updating this document, the above should be kept in mind.
<?php

$relPath = '../../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'theme.inc';
output_header(_('Basic Proofreading Tutorial'));
echo "<h2>" . sprintf(_("Basic Proofreading Tutorial, Step %d"), 2) . "</h2>\n";
echo "<h3>" . _("Paragraph Spacing/Indenting") . "</h3>\n";
echo "<p>" . _("Put a blank line before the start of a paragraph, even if it starts at the top of a page. You should not indent the start of the paragraph, but if it is already indented don't bother removing those spaces&mdash;that can be done automatically during post-processing.") . "</p>\n";
echo "<h3>" . _("End-of-line Dashes") . "</h3>\n";
echo "<p>" . _("As with end-of-line hyphenation, if an em-dash appears at the start or end of a line of your OCR'd text, join it with the other line so that there are no spaces or line breaks around it. See the examples below.") . "</p>\n";
echo "<h3>" . _("Dashes") . "</h3>\n";
echo "<p>" . _("<i>Em-dashes &amp; long dashes</i>. These serve as <b>separators</b> between words&mdash;sometimes for emphasis like this&mdash;or when a speaker gets a word caught in his throat&mdash;&mdash;!");
echo "<br>" . _("Proofread these as two hyphens if the dash is as long as 2-3 letters (an <i>em-dash</i>) and four hyphens if the dash is as long as 4-5 letters (a <i>long dash</i>). Don't leave a space before or after, even if it looks like there was a space in the original book image.") . "</p>\n";
echo "<table width='100%' align='center' border='1'  cellpadding='4' cellspacing='0' summary='" . _("Hyphens and Dashes") . "'>\n";
echo "  <tbody>\n    <tr>\n      <th valign='top' bgcolor='cornsilk'>" . _("Original Image:") . "</th>\n";
echo "      <th valign='top' bgcolor='cornsilk'>" . _("Correctly Proofread Text:") . "</th>\n    </tr>\n";
echo "    <tr>\n      <td valign='top'>sensations&mdash;sweet, bitter, salt, and sour<br>\n        &mdash;if even all of these are simple tastes. What</td>\n";
echo "      <td valign='top'><tt>sensations--sweet, bitter, salt, and sour--if<br>\n        even all of these are simple tastes. What</tt></td>\n    </tr>\n";
echo "    <tr>\n      <td valign='top'>senses&mdash;touch, smell, hearing, and sight&mdash;<br>\n        with which we are here concerned,</td>\n";
echo "      <td valign='top'><tt>senses--touch, smell, hearing, and sight--with<br>\n        which we are here concerned,</tt></td>\n    </tr>\n";
echo "    <tr>\n      <td valign='top'><img src='../../faq/dashes.png' width='300' height='28' alt=''></td>\n";
echo "      <td valign='top'><tt>how a--a--cannon-ball goes----\"</tt></td>\n";
echo "    </tr>\n  </tbody>\n</table>\n";
echo "<h3>" . _("End-of-page Hyphenation and Dashes") . "</h3>\n";
echo "<p>" . _("Proofread end-of-page hyphens or em-dashes by leaving the hyphen or em-dash at the end of the last line, and mark it with a <tt>*</tt> after the hyphen or dash.") . "</p>\n";
echo "<p><a href='../generic/main.php?quiz_page_id=p_basic_2'>" . _("Continue to quiz") . "</a></p>\n";
// vim: sw=4 ts=4 expandtab
        row(_("Default Scanner Credit (deprecated)"), 'text_field', $scannercredit, 'scannercredit');
    }
    row(_("Default Clearance Information"), 'text_field', $clearance, 'clearance');
    row(_("Default Project Comments"), 'proj_comments_field', $comments);
    echo "<tr><td bgcolor='{$bgcol}' colspan='2' align='center'><input type='submit' name='saveUberAndQuit' value='" . _("Save Uber Project and Quit") . "'><input type='submit' name='saveUberAndNewProject' value='" . _("Save Uber Project and Create \na New Project from this Uber Project") . "'><input type='submit' name='saveUberAndReturn' value='" . _("Save Uber Project\n and Refresh") . "'><input type='button' value='" . _("Quit Without Saving") . "' onclick='javascript:location.href=\"projectmgr.php\";'></td></tr>\n</table></center>";
    echo "</form>";
} elseif (isset($_POST['saveUberAndQuit']) || isset($_POST['saveUberAndNewProject'])) {
    $errorMsg = saveUberProject($_POST);
    if (empty($errorMsg)) {
        if (isset($_POST['saveUberAndQuit'])) {
            metarefresh(0, "projectmgr.php", _("Save Uber Project and Quit"), "");
        } else {
            metarefresh(0, "editproject.php?action=createnewfromuber&up_projectid=" . $up_projectid, _("Save Uber Project and Create New Project"), "");
        }
    } else {
        output_header(_("Uber Project Error!"));
        echo "<br><center><h3><font color='#ff0000'>{$errorMsg}<br><br>";
        echo _("Press browser Back button to return, edit, and try again");
        echo "</font></h3></center>";
    }
}
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function saveUberProject()
{
    //Let's check to make sure everything is correct & there are no errors
    if (empty($_POST['up_nameofwork'])) {
        $errormsg .= "Overall Name of Uber Project is required.<br>";
    }
    if (!empty($_POST['checkedoutby'])) {
        $checkedoutby = $_POST['checkedoutby'];
        $errormsg .= check_user_exists($checkedoutby, 'PPer/PPVer');
<?php

$relPath = './../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'theme.inc';
output_header(_("User Logon Statistics"));
echo "<center><h1><i>" . _("User Logon Statistics") . "</i></h1></center>";
echo "<center><img src=\"jpgraph_files/users_logging_on.php?past=day&preceding=hour\"></center><br>";
echo "<center><img src=\"jpgraph_files/users_logging_on.php?past=year&preceding=hour\"></center><br>";
echo "<center><img src=\"jpgraph_files/users_logging_on.php?past=year&preceding=day\"></center><br>";
echo "<center><img src=\"jpgraph_files/users_logging_on.php?past=year&preceding=week\"></center><br>";
echo "<center><img src=\"jpgraph_files/users_logging_on.php?past=year&preceding=fourweek\"></center><br>";
// vim: sw=4 ts=4 expandtab
Example #10
0
            dpsession_set_preferences_from_db();
            // Bounce user back to the proofreading preferences tab.
            $selected_tab = 1;
            $url = "{$code_url}/userprefs.php?tab={$selected_tab}&amp;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}&amp;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 {
    if ($selected_tab == 2 && user_is_PM()) {
Example #11
0
    output_header($preview . " " . $_POST['teamname'], SHOW_STATSBAR, $theme_extra_args);
    $teamimages = uploadImages(1, $tid, "both");
    $curTeam['teamname'] = stripAllString($_POST['teamname']);
    $curTeam['team_info'] = stripAllString($_POST['text_data']);
    $curTeam['webpage'] = stripAllString($_POST['teamwebpage']);
    $curTeam['avatar'] = $teamimages['avatar'];
    echo "<center><br>";
    showEdit(stripslashes($_POST['teamname']), stripslashes($_POST['text_data']), stripslashes($_POST['teamwebpage']), 0, $tid);
    echo "<br>";
    showTeamProfile($curTeam, TRUE);
    echo "</center><br>";
} elseif (isset($_POST['edMake'])) {
    $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");
        }
Example #12
0
<?php

$relPath = '../../../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'theme.inc';
output_header(_('Quiz Wizard'));
if ($_SESSION['quiz_data']['lastpage'] == 'output_quiz' || $_SESSION['quiz_data']['lastpage'] == 'start') {
    unset($_SESSION['quiz_data']['messages']);
    unset($_SESSION['quiz_data']['tests']);
}
echo "<h2>" . _("New Quiz Page") . "</h2>";
echo "<p>" . _("Please fill in the following fields. Don't be disturbed if they appear somewhat small. There is no limit for the length of the text you can insert. (At least none that would be relevant.)") . "</p>\n";
echo "<hr>\n<form method='post' action='./messages.php'>\n<p>";
echo _("Title of quiz page (will be displayed in browser title bar):");
echo " <input type='text' name='browser_title' size='50'></p>\n";
echo "<hr>\n<p>";
echo _("Welcome message (will be displayed initially on right hand side):");
echo " <input type='text' name='welcome' size='50'><br>";
echo _("HTML allowed. A typical value would be: &lt;h2&gt;Quiz, page 1&lt;/h2&gt; Try to correct the text ...") . "</p>\n";
echo "<hr>\n<p>";
echo _("Initial text the user will have to correct:");
echo "<br>\n<textarea name='initial_text' rows='12' cols='80' wrap='off'>\n</textarea></p>\n";
echo "<hr>\n<p>";
echo _("Corrected text the user is expected to leave:");
echo "<br>\n<textarea name='solution1' rows='12' cols='80' wrap='off'>\n</textarea><br>\n";
echo _("Use this solution if the following is present:");
echo " <input type='text' name='criterion1' size='20'><br>\n";
echo _("(Fill in <b>only</b> if you have a second solution below. Use \\n if needed for a line break.)") . "</p>\n";
echo "<p>";
echo _("Alternative corrected text the user is expected to leave (optional):");
echo "<br>\n<textarea name='solution2' rows='12' cols='80' wrap='off'>\n</textarea><br>\n";
Example #13
0
    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";
        echo _("It appears that the account has already been activated.");
        echo "\n";
        echo _("(Probably you just clicked the activation link more than once.)");
        echo "\n";
        echo _("There should be an introductory email message on its way to you.");
        echo "\n";
        if (!$pguser) {
            echo _("Please enter your username and password in the fields above to login to your account.");
            echo "\n";
        }
} else {
    // No 'select_by_user' parameter, so show all pages.
    $username_for_page_selection = NULL;
}
// this only has any effect if the user is set too.
$round_for_page_selection = NULL;
if (isset($_GET['select_by_round'])) {
    $sbr = $_GET['select_by_round'];
    if (!empty($sbr) && $sbr != 'ALL') {
        $round_for_page_selection = $sbr;
    }
}
$state = $project->state;
$title = $project->nameofwork;
$page_details_str = _('Page Detail');
output_header("{$page_details_str}: {$title}", NO_STATSBAR);
echo "<h1>{$title}</h1>\n";
echo "<h2>{$page_details_str}</h2>\n";
$url = "{$code_url}/project.php?id={$projectid}&amp;expected_state={$state}";
$label = _("Return to Project Page");
echo "<p><a href='{$url}'>{$label}</a></p>\n";
if ($project->pages_table_exists) {
    include_once 'detail_legend.inc';
    echo "<p>" . _("It is <b>strongly</b> recommended that you view page differentials by right-clicking on a diff link and opening the link in a new window or tab.") . "</p>";
    echo "<p>";
    if (!is_null($username_for_page_selection)) {
        if (is_null($round_for_page_selection)) {
            echo sprintf(_("Showing only the pages of user '%s'."), $username_for_page_selection);
        } else {
            echo sprintf(_("Showing only the pages of user '%s' in round %s."), $username_for_page_selection, $round_for_page_selection);
        }
Example #15
0
    } 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") {
    $newdirection = "desc";
} else {
    $newdirection = "asc";
}
echo "<td width='5%' align='center'><b><a href='mbr_list.php?" . $uname . "mstart={$mstart}&order=u_id&direction={$newdirection}'>" . _("ID") . "</a></b></td>";
if ($order == "username" && $direction == "asc") {
    $newdirection = "desc";
} else {
    $newdirection = "asc";
Example #16
0
    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
include __DIR__ . '/includes/__init__.php';
?>

<!DOCTYPE html>
<html lang="en">

<?php 
echo output_header($config['RootUrl']);
?>
<body>
<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    // init the FB JS SDK
    FB.init({
      appId      : '<?php 
echo $config['AppId'];
?>
', // App ID from the App Dashboard
      channelUrl : '<?php 
echo $config['ChannelUrl'];
?>
', // Channel File for x-domain communication
Example #17
0
<?php

$relPath = '../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'pg.inc';
include_once $relPath . 'theme.inc';
include_once $relPath . 'misc.inc';
// undo_all_magic_quotes()
undo_all_magic_quotes();
output_header('Proofreading Guidelines -- Copyright Renewal Books', NO_STATSBAR);
?>

  <style TYPE="text/css">
<!--
  tt {color: red}
  pre {color: red}
        -->
  </style>
<!--
  <style>
                @page { size: 21.59cm 27.94cm; margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm }
                P { margin-bottom: 0.21cm }
                TD P { margin-bottom: 0.21cm }
  </style>
        -->

<h2 align="center">Proofreading Guidelines -- Special Rules for Copyright Renewal Books</h2>
<p> These are special additions to the Proofreading Guidelines for Copyright Renewal books.
    They were created because of the specialized content of these books, and the need
    for them to be very consistently formatted to be useful to readers.</p>
<p> Those 'readers' for these books are mainly researchers, trying to determine if
Example #18
0
    }
} else {
    // Initialize variables referenced by the form.
    $real_name = '';
    $username = '';
    $email = '';
    $email2 = '';
    $email_updates = 1;
}
// This is the portion that shows up when no parameters are given to the file
// or an error occurs during registration.
//
// When users fill the form out below, it will submit the information back
// to this file & run the above commands.
$header = _("Create An Account");
output_header($header);
echo "<h1>" . _("Account Registration") . "</h1>";
echo sprintf(_("Thank you for your interest in %s. To create an account, please complete the form below."), $site_name);
echo "<h2>" . _("Registration Hints") . "</h2>";
echo "<ul>";
echo "<li>" . _("Please choose your User Name carefully. It will be visible to other users and cannot be changed. We suggest that you don't use your e-mail address as a User Name since e-mail addresses can change, and you may not want to make that address viewable.") . "</li>";
echo "<li>" . sprintf(_("Please ensure that the e-mail address you provide is correct. %s will e-mail a confirmation link for you to follow in order to activate your account."), $site_name) . "</li>";
echo "<li>" . sprintf(_("<b>Before</b> you submit this form, please add <i>%s</i> to your e-mail contacts list to avoid the activation e-mail being treated as spam."), $general_help_email_addr) . "</li>";
echo "</ul>";
if ($testing) {
    echo "<p style='color: red'>";
    echo _("Because this is a test site, you <b>don't</b> need to provide an email address and an email <b>won't</b> be sent to you. Instead, when you hit the 'Send E-mail ...' button below, the text of the would-be email will be displayed on the next screen. After the greeting, there's a line that ends 'please visit this URL:', followed by a confirmation URL. Copy and paste that URL into your browser's location field and hit return. <b>Your account won't be created until you access the confirmation link.</b>");
    echo "</p>";
}
// If the user filled out the form but there was an error during the
// data validation, print out the error here and let them resubmit.
Example #19
0
    } else {
        $activity_type = $so;
    }
    $intro = $quiz_type_intro[$activity_type];
    output_header($intro['title'], SHOW_STATSBAR, $theme_args);
    echo $intro['head'];
    $levels_for_current_type = array();
    foreach ($map_quiz_level_id_to_QuizLevel as $quiz_level_id => $quiz_level) {
        if ($quiz_level->activity_type == $activity_type) {
            array_push($levels_for_current_type, $quiz_level);
        }
    }
    foreach ($levels_for_current_type as $quiz_level) {
        if (count($levels_for_current_type) > 1) {
            echo "<h2>" . $quiz_level->level_name . "</h2>\n";
        }
        echo $quiz_level->info;
        foreach ($quiz_level->quizzes as $quiz) {
            $quiz->show_results_table($pguser);
        }
    }
} else {
    output_header(_('Interactive Quizzes and Tutorials'), SHOW_STATSBAR, $theme_args);
    echo "<h1>" . _("Interactive Quizzes and Tutorials") . "</h1>\n";
    echo "<p>" . sprintf(_("Welcome to %s's interactive quizzes! The following quizzes are available:"), $site_abbreviation) . "</p>\n<p>";
    foreach ($quiz_type_intro as $key => $intro) {
        echo "<a href='start.php?show_only={$key}'>" . $intro['title'] . "</a><br>";
    }
    echo "</p>\n";
}
// vim: sw=4 ts=4 expandtab
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:Proofreading/German/Korrekturlese-Richtlinien';
    metarefresh(0, $url);
}
$theme_args["css_data"] = "p.backtotop {text-align:right; font-size:75%;margin-right:-5%;}";
output_header('Korrekturlese-Richtlinien', NO_STATSBAR, $theme_args);
?>

<!-- NOTE TO MAINTAINERS AND DEVELOPERS:

     There are now HTML comments interspersed in this document that are/will be
     used by a script that 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
    in the Random Rule for purposes of clarity/brevity.

    If you are updating this document, the above should be kept in mind.
<?php

$relPath = '../../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'theme.inc';
include_once '../generic/quiz_defaults.inc';
// $Greek_translit_url
output_header(_('Greek Transliteration Tutorial'));
echo "<h1>" . _("Proofreading Tutorial") . "</h1>\n";
echo "<h2>" . _("Intro") . "</h2>\n";
echo "<p>" . sprintf(_("In this tutorial you will be presented extracts from the Proofreading Guidelines and the %1\$s Wiki article on <a href='%2\$s' target='_blank'>Transliterating Greek</a>. After each part you will be led to a quiz page, where you can try out  the newly learned rules."), $site_abbreviation, $Greek_translit_url) . "</p>\n";
echo "<h2>" . sprintf(_("Greek Transliteration Tutorial, Page %d"), 1) . "</h2>\n";
echo "<h3>" . _("Non-Latin Characters") . "</h3>\n";
echo "<p>" . _("Some projects contain text printed in non-Latin characters; that is, characters other than the Latin A...Z&mdash;for example, Greek, Cyrillic (used in Russian, Slavic, and other languages), Hebrew, or Arabic characters.") . "</p>\n";
echo "<p>" . _("For Greek, you should attempt a transliteration. Transliteration involves converting each character of the foreign text into the equivalent Latin letter(s). A Greek transliteration tool is provided in the proofreading interface to make this task much easier.") . "</p>\n";
echo "<p>" . sprintf(_("Press the \"Greek Transliterator\" button near the bottom of the proofreading interface to open the tool. In the tool, click on the Greek characters that match the word or phrase you are transliterating, and the appropriate Latin-1 characters will appear in the text box. When you are done, simply cut and paste this transliterated text into the page you are proofreading. Surround the transliterated text with the Greek markers <tt>[Greek:&nbsp;</tt> and <tt>]</tt>. For example, <span style='font-size:115%%;'>&Beta;&iota;&beta;&lambda;&omicron;&sigmaf;</span> would become <tt>[Greek: Biblos]</tt>. (\"Book\"&mdash;so appropriate for %s!)"), $site_abbreviation) . "</p>\n";
echo "<p>" . sprintf(_("If the transliteration tool does not appear when you click on the button, your computer may be blocking pop-ups. Make sure that your software allows pop-ups from the %s site."), $site_abbreviation) . "</p>\n";
echo "<p><a href='../generic/main.php?quiz_page_id=p_greek_1'>" . _("Continue to quiz") . "</a></p>\n";
// vim: sw=4 ts=4 expandtab
Example #22
0
$user = mysqli_fetch_array(db_query('SELECT * FROM mybb_users WHERE uid="' . $id . '"'));
if (!$user) {
    output_message('Error', 'User not found.');
    exit;
} else {
    function show_left()
    {
        global $user, $count;
        output_block_start($user['username']);
        echo 'Member since ' . date('Y-m-d', $user['regdate']) . '<br/>' . number_format($count) . ' sequences';
        output_block_end();
    }
}
$gp = pager_init(66);
$where = ' WHERE owner="' . $id . '" AND deleted=0 ';
$order = "date DESC";
$countQuery = 'SELECT COUNT(*) AS count FROM sequences' . $where;
$count = db_result(db_query($countQuery), 0);
function display_seq($row)
{
    echo '<div class="game"><a href="/' . $row['id'] . '">' . preview($row['id'], $row['title']) . '</a></div>';
}
output_header('Profile for ' . $user['username']);
output_block_start('Sequences');
if ($count == 0) {
    echo 'No sequences found.';
}
pager_display($gp, 'SELECT * FROM sequences' . $where . ' ORDER BY ' . $order, $countQuery, 'count', 'display_seq');
output_clear();
output_block_end();
output_footer();
Example #23
0
include_once $relPath . 'Stage.inc';
//user_can_work_in_stage()
include_once $relPath . 'User.inc';
include_once $relPath . 'project_states.inc';
// get_project_status_descriptor()
include_once $relPath . 'misc.inc';
// undo_all_magic_quotes() array_get() startswith() attr_safe()
header_remove("Expires");
header_remove("Cache-Control");
require_login();
undo_all_magic_quotes();
// -------------------------------------
$theme_args['js_data'] = "\nfunction grow_textarea(textarea_id)\n{\n    textarea = document.getElementById(textarea_id);\n    textarea.rows = textarea.rows+2;\n}\n\nfunction shrink_textarea(textarea_id)\n{\n    textarea = document.getElementById(textarea_id);\n    if (textarea.rows > 2)\n    {\n        textarea.rows = textarea.rows-2;\n    }\n}";
$theme_args['css_data'] = "\n.single {\n    margin:0;\n    padding:0;\n    text-indent:-3em;\n    margin-left:3em;\n}    \n.single2 {\n    margin:0;\n    padding:0;\n    text-indent:-1.25em;\n    margin-left:1.25em;\n}    \ndiv.shrinker {float: right;}\ndiv.shrinker a {\n    font-size:200%; \n    font-weight: 900;\n    text-decoration: none!important;\n    color: #888;\n    cursor: pointer;\n}\ninput[type='text'], textarea {\n     background-color: #E2F2E1;\n}\n\np.form_problem {\n    color: red;\n    font-weight: bold;\n    margin-bottom: 0;\n}\np.form_problem:before {\n    content: '\\002193 '; /* down-arrow */\n}\n";
$page_title = _('Post-Processing Verification Reporting');
output_header($page_title, SHOW_STATSBAR, $theme_args);
echo "\n<h1>{$page_title}</h1>\n";
// -------------------------------------
// To make PPVer collaboration easier, allow any PPVer to fill in the summary.
// (The link is still only shown to the PPVer with the project checked-out.)
// All summaries are sent to the PPVers' list, signed by the person filling
// out the summary, so a mischievous PPVer couldn't get away with anything, anyway.
if (!user_can_work_in_stage($pguser, 'PPV')) {
    echo _("You're not recorded as a Post-Processing Verifier.\n            If you feel this is an error, please contact a Site Administrator.");
    exit;
}
// -------------------------------------
// When this script is invoked without a 'project' arg,
// just show a form that elicits a project ID
// and re-invokes this script with it.
if (!isset($_REQUEST['project'])) {
Example #24
0
<?php

output_header("Chat Logs");
output_block_start("Chat Logs");
?>
<style type="text/css">
td.left {
	width: 160px;
	background-color: rgba(107, 107, 107, 0.8);
	color: white;
	padding: 5px;
}
.left a {
	font-weight: bold;
	color: white;
}
#chat_table {
	background-color: rgba(107, 107, 107, 0.4);
	border: 1px solid #505050;
    margin-bottom: 10px;
}
#chat_table table {
	margin: 0;
	padding: 0;
}
#chat_table td {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
td.sendbar {
	background-color: #c0c0c0;
	padding: 5px;
Example #25
0
<?php

$relPath = "./../../pinc/";
include_once $relPath . 'base.inc';
include_once $relPath . 'theme.inc';
include_once $relPath . 'user_is.inc';
require_login();
if (!user_is_a_sitemanager()) {
    die("You are not authorized to access this page.");
}
$title = _("Site Administration");
output_header($title);
echo "<h1>{$title}</h1>";
echo "<p>" . _("This page provides access to site administration utilities.") . "</p>";
$pages = array("edit_mail_address_for_non_activated_user.php" => _("Send activation email for new user"), "manage_site_access_privileges.php" => _("Manage Site Access Privileges"), "manage_special_days.php" => _("Manage Special Days"), "sitenews.php" => _("Manage Site News"), "copy_pages.php" => _("Copy Pages from One Project to Another"), "rename_pages.php" => _("Rename pages"), "shared_postednums.php" => _("Detect duplicate postednum"), "displayrandrules.php" => _("Display Random Rules"), "manage_site_word_lists.php" => _("Manage site word lists"), "show_common_words_from_project_word_lists.php" => _("Show common words from project word lists"));
echo "<ul>";
foreach ($pages as $page => $label) {
    echo "<li><a href='{$page}'>{$label}</a></li>";
}
echo "</ul>";
// vim: sw=4 ts=4 expandtab
Example #26
0
        $sql = "INSERT INTO tuxcal (typ,datum,betreff) VALUES ('{$type}','{$date}','{$subject}')";
        $result = mysql_query($sql);
        if ($result) {
            $reply = "Thank you! Information entered.<br>";
            $max = count($tabelle);
            $tabelle[$max][0] = $type;
            $tabelle[$max][1] = $date;
            $tabelle[$max][2] = $subject;
        } else {
            $err = mysql_error();
            $reply = "Der Eintrag konnte nicht gespeichert werden!<br> SQL-Error: " . $err . "<br>";
        }
    }
}
if (!$export) {
    output_header($reply);
    output_tabelle($tabelle);
    output_formeingabe();
    output_formexport();
    output_footer();
}
// ===============================================================================================
function output_header($reply)
{
    echo <<<OUT

<html>
<body>
<h2 style="text-align:center; text-decoration:underline">DBox II Calender (TuxCal)</h2>
<p>Status: {$reply} </p>
OUT;
            echo "{$round_string}\r\n";
            echo "{$page_num_string}\r\n";
            foreach ($round_suggestions_w_freq[$round] as $word => $freq) {
                echo "{$word} - {$freq} - " . $round_suggestions_w_occurrences[$round][$word] . "\r\n";
            }
            echo "\r\n";
        }
    }
    // we're done here, exit
    exit;
} elseif ($format == "html") {
    // fall-through
} else {
    assert(false);
}
output_header($title, NO_STATSBAR);
echo_page_header($title, $projectid);
// how many instances (ie: frequency sections) are there?
$instances = count($rounds) + 1;
// what are the cutoff options?
$cutoffOptions = array(1, 2, 3, 4, 5, 10, 25, 50);
// what is the initial cutoff frequency?
$initialFreq = getInitialCutoff($freqCutoff, $cutoffOptions, $all_suggestions_w_freq);
// echo page support text, like JS and stylesheets
echo_cutoff_script($cutoffOptions, $instances);
echo_word_freq_style();
echo "<p>{$page_text}</p>";
echo_page_instruction_text("good", $format);
echo_any_warnings_errors($messages);
echo "<form action='show_good_word_suggestions.php' method='get'>";
echo "<p>{$time_cutoff_text} ";
<?php

$relPath = '../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'faq.inc';
include_once $relPath . 'wordcheck_engine.inc';
include_once $relPath . 'theme.inc';
include_once $relPath . 'misc.inc';
// undo_all_magic_quotes()
undo_all_magic_quotes();
output_header('WordCheck FAQ', NO_STATSBAR);
?>
<style type="text/css">
span.mono
   { font-family: DPCustomMono2,monospace; }
</style>

<h1>WordCheck FAQ</h1>

<h2>Contents</h2>
<h3>General Questions</h3>
<ul>
  <li><a href="#new_interface">What's up with the new spellcheck interface?</a></li>
  <li><a href="#good_bad_words">What are 'Good', 'Bad', and 'Flagged' words?</a></li>
  <li><a href="#misspellings_from">Where do Flagged words come from?</a></li>
  <li><a href="#example">Can you give me a simple example of how the levels work to flag words for the proofreader to correct or accept?</a></li>
  <li><a href="#capitalization">How does capitalization affect the word lists?</a></li>
</ul>
<h3>Proofreader Questions</h3>
<ul>
  <li><a href="#why_spellcheck">Why should I use a spell-checker? I'm a good speller!</a></li>
Example #29
0
<?php

$relPath = "./../../pinc/";
include_once $relPath . 'base.inc';
include_once $relPath . 'prefs_options.inc';
include_once $relPath . 'misc.inc';
// xmlencode()
include_once $relPath . 'page_tally.inc';
include_once $relPath . 'forum_interface.inc';
// get_url_to_view_topic
include_once '../includes/team.inc';
include_once '../includes/member.inc';
if (empty($_GET["id"])) {
    include_once $relPath . 'theme.inc';
    output_header(_("Error!"));
    echo "<br><center>";
    echo sprintf(_("A team id must specified in the following format: %s"), "{$code_url}/stats/teams/teams_xml.php?id=*****");
    echo "</center>";
    exit;
}
$req_team_id = get_integer_param($_GET, 'id', null, 0, null);
//Try our best to make sure no browser caches the page
header("Content-Type: text/xml");
header("Expires: Sat, 1 Jan 2000 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
$result = select_from_teams("id = {$req_team_id}");
$curTeam = mysql_fetch_assoc($result);
$team_id = $curTeam['id'];
//Team info portion of $data
Example #30
0
    $result = db_query('SELECT * FROM sequences WHERE deleted=0 AND id="' . e_mysql($id) . '" LIMIT 1');
    if (mysqli_num_rows($result) == 0) {
        output_message('Error', 'Unknown sequence: ' . e_html($id));
        exit;
    }
    $row = mysqli_fetch_array($result);
    $title = formatSequenceTitle($row);
    $nav_right = formatSequenceInfo($row);
}
if ($id != 0) {
    $cname = $id;
}
if ($id == 0) {
    $showFeatured = true;
}
output_header($id == 0 ? 'Make music online' : $title, false, $id);
?>
<style type="text/css">
#main {
    bottom: 0;
}
</style>
<div id="middle">
<div id="frame_wrapper">
<?php 
show_sequencer($id, $autoplay);
?>
</div>
<?php 
if (!MOBILE_BROWSER) {
    ?>