echo "</tr>\n";
    }
    echo "</table>\n";
} else {
    $imso_code = $_GET['name'];
    $imso = mysql_fetch_assoc(mysql_query("\n        SELECT\n            full_name,\n            display_name,\n            public_comment,\n            internal_comment,\n            info_page_visibility,\n            concat('<a href=\"',url,'\">',url,'</a>') as 'info_url'\n        FROM image_sources\n        WHERE code_name = '{$imso_code}'\n    "));
    $visibility = $imso['info_page_visibility'];
    // info page visibility
    //  0 = Image Source Managers and SAs
    //  1 = also any PM
    //  2 = also any logged-in user
    //  3 = anyone
    // layout below intended to make logic easier to follow:
    // see it as a tree lying on it's side, the root node the "or"
    // on the third line
    $can_see = ($visibility == 3 or $logged_in and ($visibility == 2 or user_is_PM() and $visibility == 1 or user_is_image_sources_manager()));
    if ($can_see) {
        $base_link = "<a href='show_image_sources.php?name=%s&which=%s'>%s</a>";
        $all_link = sprintf($base_link, $imso_code, "ALL", _("All"));
        $inprog_link = sprintf($base_link, $imso_code, "INPROG", _("In-Progress"));
        $done_link = sprintf($base_link, $imso_code, "DONE", _("Completed"));
        switch ($which) {
            case 'ALL':
                $where_cls = " AND state != 'project_delete'";
                $title = sprintf(_("All Ebooks being produced with images from %s"), $imso['full_name']);
                $links_list = $inprog_link . ", " . $done_link . ".";
                break;
            case 'INPROG':
                $where_cls = " AND state != 'project_delete' AND state != 'proj_submit_pgposted'";
                $title = sprintf(_("In-Progress Ebooks being produced with images from %s"), $imso['full_name']);
                $links_list = $all_link . ", " . $done_link . ".";
// * 'self' means they get their own home directory
// * 'disabled' means they have no upload access.
// Otherwise, the default policy is that PMs, PFs & SAs
// get their own home dir, and other users have no upload access.
$access_mode = get_access_mode($pguser);
if ($access_mode == 'common') {
    $home_dirname = $commons_rel_dir;
    $autoprefix_message = "<b>" . _("Uploaded files will automatically be prefixed with your username and an underscore.") . "</b>";
} else {
    if ($access_mode == 'self') {
        $home_dirname = "{$users_rel_dir}/{$despecialed_username}";
    } else {
        if ($access_mode == 'disabled') {
            $home_dirname = NULL;
        } else {
            if (user_is_PM() || user_is_proj_facilitator() || user_is_a_sitemanager()) {
                $home_dirname = "{$users_rel_dir}/{$despecialed_username}";
            } else {
                $home_dirname = NULL;
            }
        }
    }
}
if (is_null($home_dirname)) {
    $page_title = _("Manage your uploads folder");
    output_header($page_title);
    echo "<h1>{$page_title}</h1>\n";
    echo "<p>" . _("Your user permissions do not allow access to this script.") . "</p>";
    echo "<p>" . sprintf(_("If you are a Content Provider, please email %s with the subject 'project upload access request' and request access to the 'common' project uploads area in the body of your message."), "<a href='mailto:{$db_requests_email_addr}'>{$db_requests_email_addr}</a>") . "</p>";
    echo "<p>" . sprintf(_("If you are a Missing Pages Provider, please email %s with the subject 'project uploads access request' and request 'self' access in the body of your message."), "<a href='mailto:{$db_requests_email_addr}'>{$db_requests_email_addr}</a>") . "</p>";
    exit;
示例#3
0
function _show_credits_wanted_adhoc()
{
    global $userSettings;
    $cp_credit_checked = $userSettings->get_boolean('cp_anonymous') ? '' : 'checked ';
    $ip_credit_checked = $userSettings->get_boolean('ip_anonymous') ? '' : 'checked ';
    $tp_credit_checked = $userSettings->get_boolean('tp_anonymous') ? '' : 'checked ';
    $pm_credit_checked = $userSettings->get_boolean('pm_anonymous') ? '' : 'checked ';
    $pp_credit_checked = $userSettings->get_boolean('pp_anonymous') ? '' : 'checked ';
    echo "<input type='checkbox' name='cp_credit' value='yes' {$cp_credit_checked}/> CP\n";
    echo "<input type='checkbox' name='ip_credit' value='yes' {$ip_credit_checked}/> IP\n";
    echo "<input type='checkbox' name='tp_credit' value='yes' {$tp_credit_checked}/> TP\n";
    if (user_is_PM()) {
        echo "<input type='checkbox' name='pm_credit' value='yes' {$pm_credit_checked}/> PM\n";
    }
    echo "<input type='checkbox' name='pp_credit' value='yes' {$pp_credit_checked}/> PP\n";
    echo "<br />";
    echo "<a href='#' onClick=\"check_boxes(true, 'cp_credit', 'ip_credit', 'tp_credit', 'pm_credit', 'pp_credit');\">Check all</a>";
    echo " | ";
    echo "<a href='#' onClick=\"check_boxes(false, 'cp_credit', 'ip_credit', 'tp_credit', 'pm_credit', 'pp_credit');\">Uncheck all</a>";
}
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"), "");
        }
    }
    if (isset($pih->projectid)) {
示例#5
0
$message = @$_GET['message'];
if (isset($message)) {
    echo '<center>' . html_safe($message) . '</center><br />';
}
$sortUtility = new SortUtility('authors_listing');
prepare_search();
echo_search_form();
?>

<h2 align="center"><?php 
echo get_search_title();
?>
</h2>

<?php 
$can_edit = user_is_PM() || user_is_authors_db_manager();
$result = search();
$browseUtility = new BrowseUtility($result);
// "Displaying entries x-y of z"
echo '<p align="center">' . $browseUtility->getDisplayingString() . '</p>';
// "Previous" and/or "Next" links?
$prev_next_links = '';
if ($browseUtility->isPreviousBrowseAvailable()) {
    $prev_next_links = "<a href='listing.php?{$query}" . $browseUtility->getPreviousBrowseQueryString() . "'>&lt;- " . _('Previous') . '</a> &nbsp; &nbsp; &nbsp; ';
}
if ($browseUtility->isNextBrowseAvailable()) {
    $prev_next_links .= "<a href='listing.php?{$query}" . $browseUtility->getNextBrowseQueryString() . "'>" . _('Next') . ' -&gt;</a>';
}
if ($prev_next_links != '') {
    echo "<p align='center'>{$prev_next_links}</p>";
}
<?php

$relPath = '../../pinc/';
include_once $relPath . 'base.inc';
include_once $relPath . 'dpsql.inc';
include_once $relPath . 'theme.inc';
require_login();
$title = _("Details of Special Days/Weeks/Months");
$theme_args['css_data'] = "\ntable.listing { border-collapse: collapse; width: 90%; margin: auto; }\ntable.listing td,th { border: 1px solid #999; padding: 2px; }\ntable.listing td.center { text-align: center; }\ntable.listing th { border-top: solid black 2px; background-color: #eeeeee; }\ntable.listing tr.month > td { border: none; }\ntable.listing h2 { margin: 1em auto auto auto; text-align: left; }";
output_header($title, NO_STATSBAR, $theme_args);
echo "<br><h1>{$title}</h1>\n";
echo _("The Name column shows what the colour looks like with a link on top, the Comment with ordinary text.") . "<br><br>";
if (user_is_PM()) {
    echo "<a href='projectmgr.php'>" . _("Back to your PM page") . "</a><br><br>";
}
$result = mysql_query("SELECT * FROM special_days ORDER BY open_month, open_day");
echo "<br>\n";
echo "<table class='listing'>";
$current_month = -1;
while ($row = mysql_fetch_assoc($result)) {
    $month = $row['open_month'];
    // This handles the exceptions for the 'special' special days which aren't really
    // associated with specific dates, but are defined solely to create a queue.
    if ($month == 0 && $current_month != 0) {
        $current_month = $month;
        echo "<tr class='month'><td><h2>" . _("Undated Entries") . "</h2></td></tr>\n";
        output_column_headers();
    }
    if ($month != $current_month) {
        $current_month = $month;
        echo "<tr class='month'><td><h2>";
示例#7
0
         $prev_offset = max(0, $results_offset - $n_results_per_page);
         $url = $url_base . "results_offset={$prev_offset}";
         echo "<a href='{$url}'>{$t}</a> | ";
     }
     echo sprintf(_("Projects %1\$d to %2\$d of %3\$d"), $results_offset + 1, $results_offset + $numrows, $num_found_rows);
     echo "\n";
     if ($results_offset + $numrows < $num_found_rows) {
         $t = _('Next');
         $next_offset = $results_offset + $n_results_per_page;
         $url = $url_base . "results_offset={$next_offset}";
         echo " | <a href='{$url}'>{$t}</a>";
     }
 }
 results_navigator();
 $user_can_see_download_links = user_can_work_in_stage($pguser, 'PP');
 $show_options_column = $user_can_see_download_links || user_is_PM();
 echo "<center><table border=1 width='99%' cellpadding=0 cellspacing=0 style='border: 1px solid #111; border-collapse: collapse'>";
 function echo_header_cell($width, $text)
 {
     global $theme;
     echo "<td width='{$width}' align='center' bgcolor='{$theme['color_headerbar_bg']}'>";
     echo "<font color='{$theme['color_headerbar_font']}'>";
     echo "<b>{$text}</b>";
     echo "</font>";
     echo "</td>";
     echo "\n";
 }
 echo "<tr>";
 echo_header_cell(175, _("Title"));
 echo_header_cell(100, _("Author"));
 // TRANSLATORS: Abbreviation for difficulty
示例#8
0
echo html_safe($name);
?>
 
<a href='<?php 
echo $code_url;
?>
/tools/authors/bioxml.php?bio_id=<?php 
echo $id;
?>
'><img src='<?php 
echo $code_url;
?>
/graphics/xml.gif' border='0' width='36' height='14' style='vertical-align:middle'></a>
</h2>
<?php 
if (user_is_PM() || user_is_authors_db_manager()) {
    echo _('To include this biography into the project comments of a project, insert the following snippet into the project comments:');
    echo " <b>[biography={$id}]</b>";
}
?>
<br /><br />
<table align="center" border="1">
<tr><td>
<?php 
echo html_safe($bio);
?>
</td></tr>
</table>
<?php 
echo_menu();
// vim: sw=4 ts=4 expandtab