New/Pending\n");
$email = db_escape($_COOKIE["FROM"]);
print("
New/Pending Articles:
\n");
$result = db_query("SELECT * FROM article WHERE is_published = 0 "
."ORDER BY modify_date");
$count = db_count($result);
if ($count == 0)
print("No new/pending articles found.
\n");
else
{
html_start_table(array("Id", "Title", "Last Updated"));
while ($row = db_next($result))
{
$id = $row['id'];
$title = htmlspecialchars($row['title'], ENT_QUOTES);
$abstract = htmlspecialchars($row['abstract'], ENT_QUOTES);
$date = date("M d, Y", $row['modify_date']);
html_start_row();
print("$id | "
."$title | "
."$date | ");
html_end_row();
html_start_row();
print(" | $abstract | ");
html_end_row();
}
html_end_table();
}
db_free($result);
print("New/Pending STRs:
\n");
$result = db_query("SELECT * FROM str WHERE status >= $STR_STATUS_PENDING "
."AND (manager_email == '' OR manager_email = '$email') "
."ORDER BY status DESC, priority DESC, scope DESC, "
."modify_date");
$count = db_count($result);
if ($count == 0)
print("No new/pending STRs found.
\n");
else
{
html_start_table(array("Id", "Priority", "Status", "Scope",
"Summary", "Version", "Last Updated",
"Assigned To"));
while ($row = db_next($result))
{
$date = date("M d, Y", $row['modify_date']);
$summary = htmlspecialchars($row['summary'], ENT_QUOTES);
$summabbr = htmlspecialchars(abbreviate($row['summary'], 80), ENT_QUOTES);
$prtext = $priority_text[$row['priority']];
$sttext = $status_text[$row['status']];
$sctext = $scope_text[$row['scope']];
html_start_row();
print(""
.""
."$row[id] | "
."$prtext | "
."$sttext | "
."$sctext | "
."$summabbr | "
."$row[str_version] | "
."$date | ");
if ($row['manager_email'] != "")
$email = sanitize_email($row['manager_email']);
else
$email = "Unassigned";
print("$email | ");
html_end_row();
}
html_end_table();
}
db_free($result);
html_footer();
break;
case 'P' :
// Change password
html_header("Change Password");
html_start_links(1);
html_link("New/Pending", "$PHP_SELF?L");
html_link("Change Password", "$PHP_SELF?P");
html_link("Logout", "$PHP_SELF?X");
html_end_links();
print("Change Password
\n");
if ($REQUEST_METHOD == "POST" &&
array_key_exists("PASSWORD", $_POST) &&
array_key_exists("PASSWORD2", $_POST) &&
$_POST["PASSWORD"] == $_POST["PASSWORD2"])
{
// Store new password and re-login...
print("Password changed successfully!
\n");
}
else
{
print("\n");
}
html_footer();
break;
}
//
// End of "$Id: account.php,v 1.4 2004/05/18 21:26:52 mike Exp $".
//
?>