Posted on: 10/05/06 08:36am
By: Robin
Posted on: 10/05/06 09:37pm
By: Blaine
if($_USER['uid'] > 1 ) { $query = DB_query("SELECT pid,forum FROM {$_TABLES['gf_topic']} WHERE id={$showtopicid}"); list ($showtopicpid,$forumid) = DB_fetchArray($query); if ($showtopicpid == 0 ) { $showtopicpid = $showtopicid; } $log_sql = DB_query("SELECT * FROM {$_TABLES['gf_log']} WHERE uid=$_USER[uid] AND topic=$showtopicpid"); $lrows = DB_numRows($log_sql); $logtime = time(); if ($lrows < 1) { DB_query("INSERT INTO {$_TABLES['gf_log']} (uid,forum,topic,time) VALUES ('$_USER[uid]','$forumid','$showtopicpid','$logtime')"); } else { DB_query("UPDATE {$_TABLES['gf_log']} SET time=$logtime WHERE uid=$_USER[uid] AND topic=$showtopicpid"); } }