[Openfirst-cvscommit] guestbook deleteentry.php,1.3,1.4 deleteyes.php,1.3,1.4 emoticons.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2003-06-28 01:35:45
|
Update of /cvsroot/openfirst/guestbook In directory sc8-pr-cvs1:/tmp/cvs-serv28802 Modified Files: deleteentry.php deleteyes.php emoticons.php index.php sign.php signthanks.php Log Message: Update guestbook module to comply with openFIRST coding standards, fix minor issue with sent e-mail, add copyright headers where required. Index: deleteentry.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/deleteentry.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** deleteentry.php 4 May 2003 12:19:28 -0000 1.3 --- deleteentry.php 28 Jun 2003 01:35:42 -0000 1.4 *************** *** 1,3 **** --- 1,30 ---- <?php + /* + * openFIRST.guestbook - deleteentry.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: Tim Ginn <tim...@po...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + include("../config/globals.php"); include("$header"); *************** *** 8,36 **** <?php ! $email = $_GET["email"]; ! $deletecode = $_GET["deletecode"]; ! $query = "SELECT * FROM ofirst_guestbook WHERE deletecode='$deletecode' and email='$email';"; ! $result = mysql_db_query("$sqldatabase",$query); ! ! if ($result) { ! while ($r = mysql_fetch_array($result)) { ! $date = $r["date"]; ! $email = $r["email"]; ! $deletecode = $r["deletecode"]; ! } ! ?> ! <form method="post" action="deleteyes.php"> <p>Are you sure you wish to delete the entry from <?php echo($email); ?> on <?php echo($date); ?> from the guestbook? <br /><input type="hidden" name="deletecode" value="<?php echo($deletecode); ?>" /> <br /><input type="hidden" name="email" value="<?php echo($email); ?>" /> <input type="submit" title="Submit" /> <input type="reset" title="Clear" /> ! </form> <?php ! } else { ! echo("No posting from you (<?php echo($email); ?>) with that delete code appears to exist."); ! } include("$footer"); --- 35,63 ---- <?php ! $email = $_GET["email"]; ! $deletecode = $_GET["deletecode"]; ! $query = "SELECT * FROM ofirst_guestbook WHERE deletecode='$deletecode' and email='$email';"; ! $result = mysql_db_query("$sqldatabase",$query); ! if ($result) { ! while ($r = mysql_fetch_array($result)) { ! $date = $r["date"]; ! $email = $r["email"]; ! $deletecode = $r["deletecode"]; ! } ! ?> ! ! <form method="post" action="deleteyes.php"> <p>Are you sure you wish to delete the entry from <?php echo($email); ?> on <?php echo($date); ?> from the guestbook? <br /><input type="hidden" name="deletecode" value="<?php echo($deletecode); ?>" /> <br /><input type="hidden" name="email" value="<?php echo($email); ?>" /> <input type="submit" title="Submit" /> <input type="reset" title="Clear" /> ! </form> <?php ! } else { ! echo("No posting from you (<?php echo($email); ?>) with that delete code appears to exist."); ! } include("$footer"); Index: deleteyes.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/deleteyes.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** deleteyes.php 4 May 2003 12:19:28 -0000 1.3 --- deleteyes.php 28 Jun 2003 01:35:42 -0000 1.4 *************** *** 1,3 **** --- 1,30 ---- <?php + /* + * openFIRST.guestbook - deleteyes.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: Tim Ginn <tim...@po...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + include("../config/globals.php"); include("$header"); *************** *** 15,21 **** ?> ! <p>The selected post has been removed.</p> <?php include("$footer"); ! ?> --- 42,48 ---- ?> ! <p>The selected post has been removed.</p> <?php include("$footer"); ! ?> \ No newline at end of file Index: emoticons.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/emoticons.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** emoticons.php 31 May 2003 19:04:53 -0000 1.3 --- emoticons.php 28 Jun 2003 01:35:42 -0000 1.4 *************** *** 33,46 **** <h1>Emoticons</h1> ! <p>This is the complete listing of emoticons and other symbols able to be used in the guest book. <br /><a href="<?php echo($home); ?>">Return to main page</a> <a href="sign.php">Sign Guest Book</a> <a href="view.php">View Guest Book</a></p> <?php ! if(function_exists(emoticon_preview)) { ! emoticon_preview(); ! } else { ! echo("<p>Emoticons (smilies) are disabled.</p>"); ! } ! include("$footer"); ! ?> --- 33,46 ---- <h1>Emoticons</h1> ! <p>This is the complete listing of emoticons and other symbols able to be used in the guest book. <br /><a href="<?php echo($home); ?>">Return to main page</a> <a href="sign.php">Sign Guest Book</a> <a href="view.php">View Guest Book</a></p> <?php ! if(function_exists(emoticon_preview)) { ! emoticon_preview(); ! } else { ! echo("<p>Emoticons (smilies) are disabled.</p>"); ! } ! include("$footer"); ! ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 8 Jun 2003 02:17:47 -0000 1.1 --- index.php 28 Jun 2003 01:35:42 -0000 1.2 *************** *** 32,40 **** ?> <h1>View Guest Book</h1> ! <p>Comments are arranged alphabetically by guest name. We are not ! responsible for the content contained in this guestbook. The comments and ! opinions expressed throughout the guestbook are those of the poster, and do not necessarily reflect those of our robotics team. ! <br /><a href="<?php echo($home); ?>">Return to main page</a> <a href="sign.php">Sign Guest Book</a></p> --- 32,40 ---- ?> <h1>View Guest Book</h1> ! <p>Comments are arranged alphabetically by guest name. We are not ! responsible for the content contained in this guestbook. The comments and ! opinions expressed throughout the guestbook are those of the poster, and do not necessarily reflect those of our robotics team. ! <br /><a href="<?php echo($home); ?>">Return to main page</a> <a href="sign.php">Sign Guest Book</a></p> *************** *** 53,57 **** if ($r->ICQ != "") { ! echo("<img src='http://wwp.icq.com/scripts/online.dll?icq=".$r->ICQ . "&img=5' alt='User status' />"); } echo("<br /><img src='aim.png' alt='AIM Screen name: ' /> AIM: $r->AIM --- 53,57 ---- if ($r->ICQ != "") { ! echo("<img src='http://wwp.icq.com/scripts/online.dll?icq=".$r->ICQ . "&img=5' alt='User status' />"); } echo("<br /><img src='aim.png' alt='AIM Screen name: ' /> AIM: $r->AIM *************** *** 59,65 **** <br /><img src='yahoo.png' alt='Yahoo! Messenger Address: ' /> YIM: $r->YIM"); if ($r->YIM != "") { ! echo("<img src='http://opi.yahoo.com/online?u=$r->YIM &m=g&t=1' alt='User Status' />"); } - echo("<br /><img src='irc.png' alt='IRC: ' /> IRC:$r->IRC <br /><img src='webpage.png' alt='Web Page' /> Web Page: <a href='$r->webpage'>$r->webpage</a> --- 59,64 ---- <br /><img src='yahoo.png' alt='Yahoo! Messenger Address: ' /> YIM: $r->YIM"); if ($r->YIM != "") { ! echo("<img src='http://opi.yahoo.com/online?u=$r->YIM &m=g&t=1' alt='User Status' />"); } echo("<br /><img src='irc.png' alt='IRC: ' /> IRC:$r->IRC <br /><img src='webpage.png' alt='Web Page' /> Web Page: <a href='$r->webpage'>$r->webpage</a> *************** *** 71,75 **** $comment = $r->comment; } ! echo("<br />Comment: </p><p>" . $comment . "</p>\n"); } --- 70,74 ---- $comment = $r->comment; } ! echo("<br />Comment: </p><p>" . $comment . "</p>\n"); } *************** *** 77,79 **** include("$footer"); ! ?> --- 76,78 ---- include("$footer"); ! ?> \ No newline at end of file Index: sign.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/sign.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sign.php 21 Jun 2003 11:56:27 -0000 1.4 --- sign.php 28 Jun 2003 01:35:42 -0000 1.5 *************** *** 1,3 **** ! <?php /* * --- 1,3 ---- ! <?php /* * *************** *** 33,49 **** <h1>Sign Guest Book</h1> ! <p><a href="./">View Guest Book</a> <a href="<?php echo($home); ?>">Return to main site</a> </p> ! <form method="post" action="signthanks.php"> <?php ! if(function_exists(emoticon_translate)) { ! echo("<p>Emoticons (smilies) are enabled in your message. See <a href='emoticons.php'>a complete listing of ! emoticons usable in the guestbook</a> for more information. about the emoticons you may use.</p>"); ! } else { ! echo("<p>Emoticons (smilies) are disabled in your message.</p>"); ! } ?> ! <p> <br /><img src="person.png" alt="Name: " /> Name <input type="text" name="guest" style="width: 300px;" value="<?php echo($user->firstname . ' ' . $user->lastname); ?>" /> <br /><img src="email.png" alt="E-mail Address: " /> E-mail Address <input type="text" name="email" style="width: 300px;" value="<?php echo($user->email); ?>" /> --- 33,49 ---- <h1>Sign Guest Book</h1> ! <p><a href="./">View Guest Book</a> <a href="<?php echo($home); ?>">Return to main site</a> </p> ! <form method="post" action="signthanks.php"> <?php ! if(function_exists("emoticon_translate")) { ! echo("<p>Emoticons (smilies) are enabled in your message. See <a href='emoticons.php'>a complete listing of ! emoticons usable in the guestbook</a> for more information. about the emoticons you may use.</p>"); ! } else { ! echo("<p>Emoticons (smilies) are disabled in your message.</p>"); ! } ?> ! <p> <br /><img src="person.png" alt="Name: " /> Name <input type="text" name="guest" style="width: 300px;" value="<?php echo($user->firstname . ' ' . $user->lastname); ?>" /> <br /><img src="email.png" alt="E-mail Address: " /> E-mail Address <input type="text" name="email" style="width: 300px;" value="<?php echo($user->email); ?>" /> *************** *** 59,68 **** <?php echo($user->signature); ?> </textarea> ! <br /> <input type="submit" title="Submit" /> <input type="reset" title="Clear" /> </p> ! </form> <?php include("$footer"); ! ?> --- 59,68 ---- <?php echo($user->signature); ?> </textarea> ! <br /> <input type="submit" title="Submit" /> <input type="reset" title="Clear" /> </p> ! </form> <?php include("$footer"); ! ?> \ No newline at end of file Index: signthanks.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/signthanks.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** signthanks.php 31 May 2003 19:04:53 -0000 1.4 --- signthanks.php 28 Jun 2003 01:35:42 -0000 1.5 *************** *** 37,57 **** <?php ! function RandomPassword( $passwordLength ) { ! ! $passwordChars = '0123456789' .'ABCDEFGHIJKLMNOPQRSTUVWXYZ' .'abcdefghijklmnopqrstuvwxyz'; ! $password = ""; ! for ($index = 1; $index <= $passwordLength; $index++) { ! // pick random number ! $randomNumber = rand(1,strlen($passwordChars)); ! $password .= substr($passwordChars,$randomNumber-1,1); ! } ! return $password; ! } $deletecode = RandomPassword(16); --- 37,56 ---- <?php ! function RandomPassword( $passwordLength ) { ! $passwordChars = '0123456789' .'ABCDEFGHIJKLMNOPQRSTUVWXYZ' .'abcdefghijklmnopqrstuvwxyz'; ! $password = ""; ! for ($index = 1; $index <= $passwordLength; $index++) { ! // pick random number ! $randomNumber = rand(1,strlen($passwordChars)); ! $password .= substr($passwordChars,$randomNumber-1,1); ! } ! return $password; ! } $deletecode = RandomPassword(16); *************** *** 60,65 **** $result = mysql_db_query("$sqldatabase",$query); ! mail("$mailnotify", "Guestbook Posting","Someone has posted a message ! in your guest book. deletecode=$deletecode --- 59,63 ---- $result = mysql_db_query("$sqldatabase",$query); ! mail("$mailnotify", "Guestbook Posting","Someone has posted a message in your guest book. deletecode=$deletecode *************** *** 83,93 **** mail("" . $_POST["email"] . "", "Your Guestbook Posting", "Dear Guest, ! Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! ! ! We have sent you this E-mail out of thanks and also to give you some information which ! you may later need. If in your guestbook posting, you make a mistake that you didn't inntially realize, or just want to delete your post, you can do so by going to the following address: ! http://$domain/guestbook/deleteentry.php?email=" . $_POST["email"] . "&deletecode=$deletecode Thank you once again, and be sure to check in often as we are constantly making updates --- 81,91 ---- mail("" . $_POST["email"] . "", "Your Guestbook Posting", "Dear Guest, ! Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! ! ! We have sent you this E-mail out of thanks and also to give you some information which ! you may later need. If in your guestbook posting, you make a mistake that you didn't inntially realize, or just want to delete your post, you can do so by going to the following address: ! http://" . $_SERVER["HTTP_HOST"] . " $basepath/guestbook/deleteentry.php?email=" . $_POST["email"] . "&deletecode=$deletecode Thank you once again, and be sure to check in often as we are constantly making updates *************** *** 103,105 **** <?php include("$footer"); ! ?> --- 101,103 ---- <?php include("$footer"); ! ?> \ No newline at end of file |