diff --git a/www/articles.php b/www/articles.php
index fefc14d..8ec3c8f 100644
--- a/www/articles.php
+++ b/www/articles.php
@@ -1,9 +1,13 @@
You don't have permission to use command '$op'!\n");
@@ -64,6 +96,35 @@ if ($argc)
exit();
}
+ if (($op == 'D' || $op == 'M') && $LOGIN_LEVEL < AUTH_DEVEL)
+ {
+ $result = db_query("SELECT * FROM article WHERE id = $id");
+ if (db_count($result) != 1)
+ {
+ db_free($result);
+
+ html_header("Article Error");
+ print("
Article #$id does not exist!\n");
+ html_footer();
+ exit();
+ }
+
+ $row = db_next($result);
+
+ if ($row['create_user'] != $LOGIN_USER &&
+ $row['create_user'] != $LOGIN_EMAIL)
+ {
+ db_free($result);
+
+ html_header("Article Error");
+ print("
You don't have permission to use command '$op'!\n");
+ html_footer();
+ exit();
+ }
+
+ db_free($result);
+ }
+
if ($op == 'N' && $id)
{
html_header("Article Error");
@@ -183,7 +244,7 @@ switch ($op)
."
Please use this form to post announcements, how-to's, "
- ."examples, and case studies showing how you use $PROJECT. "
+ ."examples, and case studies showing how you use $PROJECT_NAME. "
."We will proofread your article, and if we determine it is "
."appropriate for the site, we will make the article public "
- ."on the site. Thank you for supporting $PROJECT!
\n"
+ ."on the site. \n");
-
- $num_comments ++;
-
- $create_date = date("H:i M d, Y", $row['create_date']);
- $create_user = sanitize_email($row['create_user']);
- $contents = format_text($row['contents']);
-
- print("
From "
- ."$create_user, $create_date (score=$row[status])\n"
- ."$contents\n");
-
- html_start_links();
- html_link("Reply", "${path}comment.php?r$row[id]+p$safeurl");
-
- if ($modpoints > 0)
+ if ($row["status"] > 0)
{
- if ($row['status'] > 0)
- html_link("Moderate Down", "${path}comment.php?md$row[id]+p$safeurl");
+ if ($heading > 3 && !$div)
+ {
+ print("
\n");
+ $div = 1;
+ }
- if ($row['status'] < 5)
- html_link("Moderate Up", "${path}comment.php?mu$row[id]+p$safeurl");
+ $num_comments ++;
+
+ $create_date = date("H:i M d, Y", $row['create_date']);
+ $create_user = sanitize_email($row['create_user']);
+ $contents = format_text($row['contents']);
+
+ print("
From "
+ ."$create_user, $create_date (score=$row[status])\n"
+ ."$contents\n");
+
+ html_start_links();
+ html_link("Reply", "${path}comment.php?r$row[id]+p$safeurl");
+
+ if ($modpoints > 0)
+ {
+ if ($row['status'] > 0)
+ html_link("Moderate Down", "${path}comment.php?md$row[id]+p$safeurl");
+
+ if ($row['status'] < 5)
+ html_link("Moderate Up", "${path}comment.php?mu$row[id]+p$safeurl");
+ }
+
+ html_end_links();
}
- html_end_links();
-
$num_comments += show_comments($url, $path, $row['id'], $heading + 1);
}
db_free($result);
- if ($num_comments > 0 && $heading > 3)
+ if ($div)
print("
\n");
return ($num_comments);
@@ -636,6 +648,6 @@ show_comments($url, // I - URL for comment
//
-// End of "$Id: common.php,v 1.8 2004/05/19 16:34:54 mike Exp $".
+// End of "$Id: common.php,v 1.9 2004/05/19 21:17:47 mike Exp $".
//
?>
diff --git a/www/phplib/globals.php b/www/phplib/globals.php
index 3eaf06e..7d647dc 100644
--- a/www/phplib/globals.php
+++ b/www/phplib/globals.php
@@ -1,6 +1,6 @@
diff --git a/www/str.php b/www/str.php
index 6d39a98..a25b251 100644
--- a/www/str.php
+++ b/www/str.php
@@ -1,6 +1,6 @@
email, "$PROJECT STR #$id $what",
+ mail($ccrow->email, "$PROJECT_NAME STR #$id $what",
"Software trouble report #$id has been $what. You can check\n"
."the status of the report and add additional comments and/or files\n"
."at the following URL:\n"
."\n"
- ." $PHP_SELF?L$id\n"
+ ." $PHP_URL?L$id\n"
."\n"
." Summary: $row[summary]\n"
." Version: $row[str_version]\n"
@@ -152,7 +152,7 @@ notify_creator($id, // I - STR #
."Fix Version: $fix_version\n"
."\n$contents"
."________________________________________________________________\n"
- ."Thank you for using the $PROJECT Software Trouble Report page!",
+ ."Thank you for using the $PROJECT_NAME Software Trouble Report page!",
"From: noreply@easysw.com\r\n");
}
@@ -162,15 +162,15 @@ notify_creator($id, // I - STR #
if ($row['manager_email'] != "")
$manager = $row['manager_email'];
else
- $manager = "$EMAIL";
+ $manager = "$PROJECT_EMAIL";
if ($row['modify_user'] != $manager)
- mail($manager, "$PROJECT STR #$id $what",
+ mail($manager, "$PROJECT_NAME STR #$id $what",
"The software trouble report #$id assigned to you has been $what.\n"
."You can manage the report and add additional comments and/or files\n"
."at the following URL:\n"
."\n"
- ." $PHP_SELF?L$id\n"
+ ." $PHP_URL?L$id\n"
."\n"
." Summary: $row[summary]\n"
." Version: $row[str_version]\n"
@@ -186,6 +186,7 @@ notify_creator($id, // I - STR #
}
}
+
// Get command-line options...
//
// Usage: str.php [operation] [options]
@@ -660,7 +661,8 @@ switch ($op)
if ($LOGIN_LEVEL < AUTH_DEVEL)
{
- $query .= "${prefix}is_published = 1";
+ $query .= "${prefix}(is_published = 1 OR create_user = '"
+ . db_escape($LOGIN_USER) . "')";
$prefix = " AND ";
}
@@ -947,8 +949,9 @@ switch ($op)
print("
"
."MACH = Machine, "
."OS = Operating System, "
- ."STR = Software Trouble Report"
- ."
\n");
+ ."STR = Software Trouble Report, "
+ ."
= hidden from public view\n");
}
html_footer();
@@ -1553,7 +1556,9 @@ switch ($op)
$version = $_POST["VERSION"];
$contents = $_POST["CONTENTS"];
- if (array_key_exists("EMAIL", $_POST))
+ if ($LOGIN_USER != "" && $LOGIN_LEVEL < AUTH_DEVEL)
+ $email = $LOGIN_USER;
+ else if (array_key_exists("EMAIL", $_POST))
{
$email = $_POST["EMAIL"];
setcookie("FROM", "$email", time() + 90 * 86400, "/");
@@ -1578,7 +1583,9 @@ switch ($op)
}
else
{
- if (array_key_exists("FROM", $_COOKIE))
+ if ($LOGIN_USER != "")
+ $email = $LOGIN_USER;
+ else if (array_key_exists("FROM", $_COOKIE))
$email = $_COOKIE["FROM"];
else
$email = "";
@@ -1673,11 +1680,11 @@ switch ($op)
else
{
print("
Please use this form to report all bugs and request "
- ."features in the $PROJECT software. Be sure to include "
+ ."features in the $PROJECT_NAME software. Be sure to include "
."the operating system, compiler, sample programs and/or "
."files, and any other information you can about your "
."problem. Thank you for helping us to improve "
- ."$PROJECT!
\n");
+ ."$PROJECT_NAME!
\n");
$hstart = "";
$hend = "";
@@ -1865,6 +1872,6 @@ switch ($op)
}
//
-// End of "$Id: str.php,v 1.9 2004/05/19 14:02:38 mike Exp $".
+// End of "$Id: str.php,v 1.10 2004/05/19 21:17:47 mike Exp $".
//
?>
diff --git a/www/style.css b/www/style.css
index afa27f6..46d967e 100644
--- a/www/style.css
+++ b/www/style.css
@@ -35,15 +35,15 @@ TR.header, TR.header TH, TH.header {
}
TR.page {
- background-color: #f8f8f8;
+ background-color: #f4f4f4;
}
TR.data0, TD.data0 {
- background-color: #eeeeee;
+ background-color: #e8e8e8;
}
TR.data1, TD.data1 {
- background-color: #dddddd;
+ background-color: #e0e0e0;
}
INPUT[TYPE="TEXT"], TEXTAREA {