cvs: php-bugs-web / report.php

From: Date: Fri, 19 Oct 2001 22:46:47 +0000
Subject: cvs: php-bugs-web / report.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-7103@lists.php.net to get a copy of this message
sniper Fri Oct 19 18:46:47 2001 EDT Modified files: /php-bugs-web report.php Log: Thought I fixed it yesterday..but introduced a bug doing it. :) Index: php-bugs-web/report.php diff -u php-bugs-web/report.php:1.3 php-bugs-web/report.php:1.4 --- php-bugs-web/report.php:1.3 Thu Oct 18 21:26:31 2001 +++ php-bugs-web/report.php Fri Oct 19 18:46:47 2001 @@ -17,8 +17,6 @@ or die("Unable to connect to SQL server."); @mysql_select_db("php3"); -commonHeader("Report"); - if ($cmd == "send") { if (incoming_details_are_valid(1,1)) { $ret = mysql_query("INSERT INTO bugdb (bug_type,email,sdesc,ldesc,php_version,php_os,status,ts1,passwd) VALUES ('$bug_type','$email','$sdesc','$ldesc','$php_version','$php_os','Open',NOW(),'$passwd')"); @@ -30,22 +28,6 @@ $ldesc = stripslashes($ldesc); $sdesc = stripslashes($sdesc); - echo "<pre>\n"; - - $report .= "From: $email\n"; - $report .= "Operating system: $php_os\n"; - $report .= "PHP version: $php_version\n"; - $report .= "PHP Bug Type: $bug_type\n"; - $report .= "Bug description: "; - - echo $report; - - echo htmlspecialchars($sdesc), "\n\n"; - - echo wordwrap(htmlspecialchars($ldesc)); - - echo "</pre>\n"; - $ascii_report = "$report$sdesc\n\n".wordwrap($ldesc); $ascii_report.= "\n-- \nEdit bug report at: http://bugs.php.net/?id=$cid&edit=1\n"; @@ -57,6 +39,25 @@ header("Location: report.php?cmd=thankyou&cid=$cid&mailto=".urlencode($mailto)); } else { + + commonHeader("Report - Error"); + + echo "<pre>\n"; + + $report .= "From: $email\n"; + $report .= "Operating system: $php_os\n"; + $report .= "PHP version: $php_version\n"; + $report .= "PHP Bug Type: $bug_type\n"; + $report .= "Bug description: "; + + echo $report; + + echo htmlspecialchars($sdesc), "\n\n"; + + echo wordwrap(htmlspecialchars($ldesc)); + + echo "</pre>\n"; + echo "<p><h2>Mail not sent!</h2>\n"; echo "Please send this page in a mail to " . "<a href=\"mailto:$mailto\">$mailto</a> manually.</p>\n"; @@ -64,6 +65,8 @@ } } elseif ($cmd == 'thankyou') { + commonHeader("Report - Thank you"); + echo "<p><h2>Mail sent to $mailto...</h2></p>\n"; echo "<p>Thank you for your help!</p>"; echo "If the status of the bug report you submitted\n"; @@ -72,6 +75,7 @@ echo "http://bugs.php.net/?id=$cid</a></p>\n"; } elseif (!isset($cmd)) { + commonHeader("Report - New"); ?> <p>Before you report a bug, make sure to search for similar bugs using the form

« previous php.mirrors (#7103) next »