prepare("SELECT n.notifymsg,n.notifyurl,girls.mainpic,girls.username,girls.fname,n.whenpost FROM notifications n LEFT JOIN girls ON n.fromid=girls.ID WHERE n.toid=:mid ORDER BY n.ID desc LIMIT 20"); $stmt->bindParam(':mid', $_SESSION["uid"]); $stmt->execute(); if($stmt->rowCount() == 0){ echo 'no notifications yet'; } while($i2=$stmt->fetch()) { echo ''; echo '
'; echo '
'; if($i2["mainpic"] <> ""){ echo ''; }else{ echo ''; } echo '
'.nl2br(makeClickableLinks($i2["notifymsg"])).'
'; echo '
'.current(explode(' ',$i2["username"])).' · '.get_time_ago(strtotime($i2["whenpost"])).'
'; echo '
'; } $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET nnotify=0 WHERE ID=:pid"); $stmt->bindParam(':pid', $_SESSION["uid"]); $stmt->execute(); ?>