Update of /cvsroot/openfirst/emoticon
In directory sc8-pr-cvs1:/tmp/cvs-serv10717
Modified Files:
emoticonf.php
Log Message:
Add support for multiple database types
Index: emoticonf.php
===================================================================
RCS file: /cvsroot/openfirst/emoticon/emoticonf.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** emoticonf.php 19 Aug 2003 22:44:39 -0000 1.8
--- emoticonf.php 23 Aug 2003 20:06:38 -0000 1.9
***************
*** 33,40 ****
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);
}
--- 33,40 ----
function emoticon_translate ($text) {
! $query = ofirst_dbquery("SELECT * FROM ofirst_emoticon");
if (mysql_num_rows($query) != 0){
! while ($er = ofirst_dbfetch_object($query)) {
$text = str_replace($er->emoticon, $er->substitution, $text);
}
***************
*** 50,56 ****
function emoticon_preview ($limit = 5, $start = 0) {
global $basepath;
! $query = mysql_query("SELECT * FROM ofirst_emoticon LIMIT $start,$limit");
echo "<table><th>Emoticons</th><th></th>";
! while ($emot = mysql_fetch_object($query)) {
echo "<tr><td>".$emot->substitution."</td><td>".$emot->emoticon."</td></tr>";
}
--- 50,56 ----
function emoticon_preview ($limit = 5, $start = 0) {
global $basepath;
! $query = ofirst_dbquery("SELECT * FROM ofirst_emoticon LIMIT $start,$limit");
echo "<table><th>Emoticons</th><th></th>";
! while ($emot = ofirst_dbfetch_object($query)) {
echo "<tr><td>".$emot->substitution."</td><td>".$emot->emoticon."</td></tr>";
}
***************
*** 63,70 ****
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);
}
--- 63,70 ----
function slur_block ($text) {
! $query = ofirst_dbquery("SELECT * FROM ofirst_slurblock");
if (mysql_num_rows($query) != 0){
! while ($er = ofirst_dbfetch_object($query)) {
$text = str_replace($er->slur, $er->substitution, $text);
}
|