Thread: [Openfirst-cvscommit] guestbook emoticons.php,1.2,1.3 sign.php,1.2,1.3 signthanks.php,1.3,1.4 view.p
Brought to you by:
xtimg
From: <xt...@us...> - 2003-05-31 19:04:56
|
Update of /cvsroot/openfirst/guestbook In directory sc8-pr-cvs1:/tmp/cvs-serv4302 Modified Files: emoticons.php sign.php signthanks.php view.php Log Message: Switch to new database methods, use emoticon functions for emoticon listing, switch to more efficient variable usage Index: emoticons.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/emoticons.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** emoticons.php 13 Apr 2003 21:04:43 -0000 1.2 --- emoticons.php 31 May 2003 19:04:53 -0000 1.3 *************** *** 1,3 **** --- 1,31 ---- <?php + /* + * + * openFIRST.guestbook - emoticons.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"); *************** *** 9,21 **** <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 ! $equery = "SELECT * FROM emoticons;"; ! $eresult = mysql_db_query("$sqldatabase",$equery); ! if ($eresult) { ! echo("<ul>"); ! while ($er = mysql_fetch_array($eresult)) { ! echo("<li>" . $er["emoticon"] . " " . $er["substitution"] . "</li>"); ! } ! echo("</ul>"); ! } include("$footer"); --- 37,45 ---- <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"); Index: sign.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/sign.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sign.php 13 Apr 2003 21:04:44 -0000 1.2 --- sign.php 31 May 2003 19:04:53 -0000 1.3 *************** *** 1,3 **** --- 1,31 ---- <?php + /* + * + * openFIRST.guestbook - sign.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"); *************** *** 9,20 **** </p> <form method="post" action="signthanks.php"> ! <p><b>New Feature</b>: The full compliment of emoticons from ! <a href="http://www.trillian.cc/">Trillian</a> may ! be used in the comment area. In addition to this, there are a few icons ! like (tux) (win) (lin) (dos) and (mac). To insert a flag, use the ! country code followed by a -c, example for the Canadian flag: (ca-c). ! See <a href="emoticons.php">a complete listing of emoticons usable in ! the guestbook</a> for more information. ! </p> <p> <br /><img src="person.png" alt="Name: " /> Name <input type="text" name="guest" style="width: 300px;" /> --- 37,48 ---- </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;" /> Index: signthanks.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/signthanks.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** signthanks.php 4 May 2003 12:19:28 -0000 1.3 --- signthanks.php 31 May 2003 19:04:53 -0000 1.4 *************** *** 1,3 **** --- 1,31 ---- <?php + /* + * + * openFIRST.guestbook - signthanks.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"); *************** *** 27,44 **** } - $guest = $_POST["guest"]; - $email = $_POST["email"]; - $icq = $_POST["icq"]; - $aim = $_POST["aim"]; - $msn = $_POST["msn"]; - $yim = $_POST["yim"]; - $irc = $_POST["irc"]; - $webpage = $_POST["webpage"]; - $location = $_POST["location"]; - $comment = $_POST["comment"]; - $now = date("D M j G:i:s T Y"); $deletecode = RandomPassword(16); ! $query = "INSERT INTO ofirst_guestbook VALUES('$guest', '$email', '$icq', '$aim', '$msn', '$yim', '$irc', '$webpage', '$location', '$comment', '$now', '$deletecode');"; $result = mysql_db_query("$sqldatabase",$query); --- 55,61 ---- } $deletecode = RandomPassword(16); ! $query = "INSERT INTO ofirst_guestbook VALUES('" . $_POST["guest"] . "', '" . $_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] . "', '" . $_POST["msn"] . "', '" . $_POST["yim"] . "', '" . $_POST["irc"] . "', '" . $_POST["webpage"] . "', '" . $_POST["location"] . "', '" . $_POST["comment"] . "', '" . date("D M j G:i:s T Y") . "', '$deletecode');"; $result = mysql_db_query("$sqldatabase",$query); *************** *** 47,68 **** deletecode=$deletecode ! Guest: $guest ! Now: $now ! E-mail: $email ! ICQ: $icq ! AIM: $aim ! MSN: $msn ! YIM: $yim ! IRC: $irc ! Webpage: $webpage ! Location:$location Delete Code: $deletecode ! $comment", "From: $mailfrom\r\n" ! ."Reply-To: $email\r\n" ); ! mail("$email", "Your Guestbook Posting", "Dear Guest, Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! --- 64,85 ---- deletecode=$deletecode ! Guest: " . $_POST["guest"] . " ! Now: " . date("D M j G:i:s T Y") . " ! E-mail: " . $_POST["email"] . " ! ICQ: " . $_POST["icq"] . " ! AIM: " . $_POST["aim"] . " ! MSN: " . $_POST["msn"] . " ! YIM: " . $_POST["yim"] . " ! IRC: " . $_POST["irc"] . " ! Webpage: " . $_POST["webpage"] . " ! Location:" . $_POST["location"] . " Delete Code: $deletecode ! " . $_POST["comment"] . "", "From: $mailfrom\r\n" ! ."Reply-To: " . $_POST["email"] . "\r\n" ); ! mail("" . $_POST["email"] . "", "Your Guestbook Posting", "Dear Guest, Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! *************** *** 72,76 **** realize, or just want to delete your post, you can do so by going to the following address: ! http://$domain/guestbook/deleteentry.php?email=$email&deletecode=$deletecode Thank you once again, and be sure to check in often as we are constantly making updates --- 89,93 ---- 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 Index: view.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/view.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** view.php 4 May 2003 16:18:33 -0000 1.7 --- view.php 31 May 2003 19:04:53 -0000 1.8 *************** *** 1,6 **** <?php /* ! * Original author: Tim Ginn <tim...@po...> ! * GNU GPL Licensed. */ --- 1,29 ---- <?php /* ! * ! * openFIRST.guestbook - view.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 ! * */ *************** *** 12,47 **** 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 Port Perry FIRST Robotics. <br /><a href="<?php echo($home); ?>">Return to main page</a> <a href="sign.php">Sign Guest Book</a></p> <?php $query = "SELECT * FROM ofirst_guestbook ORDER BY guest;"; ! $result = mysql_db_query("$sqldatabase",$query); if ($result) { ! while ($r = mysql_fetch_array($result)) { ! echo("<hr /><p>" . $r["date"]); ! echo("<br /><img src=\"person.png\" alt=\"Guest: \" /> Guest: " . $r["guest"]); ! echo("<br /><img src=\"email.png\" alt=\"E-mail Address: \" /> E-mail: <a href=\"mailto: " . $r["email"] . "\">" . $r["email"] . "</a>"); ! echo("<br /><img src=\"icq.png\" alt=\"ICQ UIN: \" /> ICQ: " . $r["ICQ"]); ! 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"]); ! echo("<br /><img src=\"msmsgs.png\" alt=\"MSN Messenger Address: \" /> MSN: " . $r["MSN"]); ! echo("<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"]); ! echo("<br /><img src=\"webpage.png\" alt=\"Web Page\" /> Web Page: <a href=\"" . $r["webpage"] . "\">" . $r["webpage"] . "</a>"); ! echo("<br /><img src=\"world.png\" alt=\"Location: \" /> Location: " . $r["location"]); if (function_exists('emoticon_translate')) { ! $comment = emoticon_translate($r["comment"]); } else { ! $comment = $r["comment"]; } --- 35,73 ---- 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> <?php + mysql_select_db("$sqldatabase"); $query = "SELECT * FROM ofirst_guestbook ORDER BY guest;"; ! $result = mysql_query($query); if ($result) { ! while ($r = mysql_fetch_object($result)) { ! echo("<hr /><p>$r->date ! <br /><img src='person.png' alt='Guest: ' /> Guest: $r->guest ! <br /><img src='email.png' alt='E-mail Address: ' /> E-mail: <a href='mailto: $r->email'>$r->email</a> ! <br /><img src='icq.png' alt='ICQ UIN: ' /> ICQ: $r->ICQ"); ! ! 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 ! <br /><img src='msmsgs.png' alt='MSN Messenger Address: ' /> MSN: $r->MSN ! <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> ! <br /><img src='world.png' alt='Location: ' /> Location: $r->location"); if (function_exists('emoticon_translate')) { ! $comment = emoticon_translate($r->comment); } else { ! $comment = $r->comment; } |