Update of /cvsroot/openfirst/emoticon
In directory sc8-pr-cvs1:/tmp/cvs-serv12504
Modified Files:
index.php
Added Files:
emoticonf.php
Log Message:
Add preview as index.php to emoticon, add include to MySQL setup file, move include functions to emoticonf.php
Index: index.php
===================================================================
RCS file: /cvsroot/openfirst/emoticon/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** index.php 8 Jun 2003 02:06:09 -0000 1.1
--- index.php 28 Jun 2003 15:46:27 -0000 1.2
***************
*** 26,79 ****
*
*/
!
! mysql_select_db($sqldatabase,$sqlconnection);
!
! // Switches all emoticon text for the
! // proper symbol and returns the
! // switched text.
!
! function emoticon_translate ($text)
! {
! $query = mysql_query("SELECT * FROM ofirst_emoticon");
!
! if (mysql_num_rows($query) != 0){
! while ($er = mysql_fetch_object($query)) {
! $text = str_replace($er->emoticon, $er->substitution, $text);
! }
! }
!
! return $text;
! }
!
! // Displays emoticons in a table.
! // Its a good function to place on a messaging system
! // or have as reference page.
!
! function emoticon_preview ()
! {
! $query = mysql_query("SELECT * FROM ofirst_emoticon LIMIT 0,5");
! echo "<table>";
! while ($emot = mysql_fetch_object($query)) {
! echo "<tr><td>".$emot->substitution."</td><td>".$emot->emoticon."</td></tr>";
! }
! echo "</table>";
! }
!
! // Analyzis database and compares slur words
! // then it replaces the slur words with its
! // substitution value.
!
! function slur_block ($text)
! {
! $query = mysql_query("SELECT * FROM ofirst_slurblock");
!
! if (mysql_num_rows($query) != 0){
! while ($er = mysql_fetch_object($query)) {
! $text = str_replace($er->slur, $er->substitution, $text);
! }
}
!
! return $text;
! }
!
?>
--- 26,36 ----
*
*/
! include("../config/globals.php");
! include($header);
! if(function_exists("emoticon_preview")) {
! emoticon_preview();
! } else {
! echo("Emoticon functions are not enabled");
}
! include($footer);
?>
|