query_first("SELECT * FROM iworks_tracking WHERE target='$user[userid]' AND user='$user_info[userid]'"); if($user['accesslevel'] == "0") { $usersymbol="~"; $status="Member"; } //Regular user... if($user['accesslevel'] == "1") { $usersymbol="@"; $status="Administrator"; } //Administrator... if($user['accesslevel'] == "2") { $usersymbol="="; $status="Beta Tester"; } //Beta Tester... if($user['accesslevel'] == "3") { $usersymbol="^"; $status="Developer"; } //Developer... //$bannedlist = explode("\n",trim($user['blocklist'])); if(is_array($bannedlist)) { while(list($key,$val)=each($bannedlist)) { if(strlower($user_info['username']) == strlower($val)) { // if they aren't an admin, block them... if($adminstatus != true) { eval("dooutput(\"".gettemplate("BlockedUser")."\");"); exit(); } } } } if($adminstatus == true) { if($_REQUEST['action'] == "clearprofile") { $sql->query("UPDATE iworks_users SET profileinfo='' WHERE userid='$user[userid]'"); header("LOCATION: user.fpd?name=$_REQUEST[name]"); } if($_REQUEST['action'] == "forcelock") { $sql->query("UPDATE iworks_users SET maturelocked='1' WHERE userid='$user[userid]'"); $output="Account locked from adult artwork."; $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['action'] == "forceunlock") { $sql->query("UPDATE iworks_users SET maturelocked='0' WHERE userid='$user[userid]'"); $output="Account unlocked from adult artwork."; $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['action'] == "removeshout") { $sql->query("DELETE FROM iworks_shouts WHERE rowid='$_REQUEST[rowid]'"); $output="Shout removed..."; $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($user['maturelocked'] == 1) { $forcelock = "[Force unlock mature artwork]"; } else { $forcelock = "[Force lock mature artwork]"; } $clearprofile = "[Clear Profile]"; } if($trackchk['username']) { $strwatch = "-Watch"; } else { $strwatch = "+Watch"; } if(!$user['userid']) { $output="No user by this name exists on this site."; $link="index.fpd"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['action'] == "buddylist") { //tracking users... $result = $sql->query("SELECT * FROM iworks_tracking WHERE target='$_REQUEST[id]' ORDER BY strlower ASC"); while ($row = $sql->fetch_array($result)) { $list .= ""; } $sql->free_result($result); eval("dooutput(\"".gettemplate("user_buddylist")."\");"); exit(); } if($_REQUEST['action'] == "remove") { $imagedata = $sql->query_first("SELECT * from iworks_submissions WHERE date='$_REQUEST[i]' AND strlower='$_REQUEST[name]'"); if($imagedata['user'] != $user_info['userid'] && $adminstatus == false) { header("LOCATION: index.fpd"); exit(); } if($_REQUEST['confirm'] == "Yes") { deletesubmission($_REQUEST['i'],$_REQUEST['name']); $output="Your submission has been removed from our database and the images have been removed from our server."; $link="user.fpd?name=$_REQUEST[name]"; header("LOCATION: $link"); exit(); } if($_REQUEST['confirm'] == "No") { $output="You have chosen to cancel deletion of your piece."; $link="gallery.fpd?name=$_REQUEST[name]&i=$_REQUEST[i]"; header("LOCATION: $link"); exit(); } eval("dooutput(\"".gettemplate("confirm_deletion")."\");"); exit(); } if($_REQUEST['action'] == "trackartist") { if($username == "Guest") { $output="Please log in!"; $link="login.fpd"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($config['readonly'] == true) { $output="Fur Affinity is read-only mode, you cannot watch $user[username]."; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['name'] == $user_info['strlower']) { $output="You cannot watch yourself"; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($trackchk['username']) { header("LOCATION: watchlist.fpd"); exit(); } $output="$user[username] has been added to your watch list!"; $sql->query("INSERT INTO iworks_tracking (user,username,strlower,target,targetusername) VALUES ('$user_info[userid]','$user_info[username]','$user_info[strlower]','$user[userid]','$user[username]') "); send_message($user['userid'],$user['username'],$user_info['username'],"Watches","has added you to their watch list!",time(),"user.fpd"); $sql->query("UPDATE iworks_users SET watchcount=watchcount+1 WHERE userid='$user[userid]'"); $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['action'] == "remfav") { if($username == "Guest") { $output="Please log in!"; $link="login.fpd"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($config['readonly'] == true) { $output="Fur Affinity is read-only mode, you cannot add $user[username]'s submission to your favorites list."; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } $favdata = $sql->query_first("SELECT * FROM iworks_favorites WHERE rowid='$_REQUEST[uniqueid]'"); $favcount = $sql->get_count("rowid","iworks_favorites","date='$favdata[date]'"); $sql->query("UPDATE iworks_submissions SET numtracked='$favcount' WHERE date='$favdata[date]' AND strlower='$favdata[strlower]'"); if($adminstatus == true || $_REQUEST['name'] == $user_info['strlower']) { $output="Entry removed..."; $sql->query("DELETE FROM iworks_favorites WHERE rowid='$_REQUEST[uniqueid]'"); $link="gallery.fpd?browse=favorites&name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } else { $output="Access error!"; $link="gallery.fpd?browse=favorites&name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } } if($_REQUEST['action'] == "track") { if($username == "Guest") { $output="Please log in!"; $link="login.fpd"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($config['readonly'] == true) { $output="Fur Affinity is read-only mode, you cannot add $user[username]'s submission to your favorites list."; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['name'] == $user_info['strlower']) { $output="You cannot add your own submission to your favorites list."; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } $imagedata = $sql->query_first("SELECT * FROM iworks_submissions WHERE strlower='$_REQUEST[name]' AND date = '$_REQUEST[i]'"); $chk = $sql->query_first("SELECT * FROM iworks_favorites WHERE user='$user_info[userid]' AND strlower='$_REQUEST[name]' AND date = '$_REQUEST[i]'"); if($chk['date'] == $_REQUEST['i']) { $output="$imagedata[title] has been removed from your favorites list."; $sql->query("DELETE FROM iworks_favorites WHERE date='$_REQUEST[i]' AND user='$user_info[userid]'"); $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } $sql->query("INSERT INTO iworks_favorites (date,user,username,strlower,title,smallerurl,thumbnail,adultsubmission) VALUES ('$imagedata[date]','$user_info[userid]','$imagedata[username]','$imagedata[strlower]','".addslashes($imagedata[title])."','$imagedata[smallerurl]','$imagedata[thumbnail]','$imagedata[adultsubmission]')"); favtosub($_REQUEST['i']); favtouser($_REQUEST['name'],$user_info['strlower']); send_message($imagedata['user'],$imagedata['username'],$user_info['username'],"Favorites",$imagedata['title'],$_REQUEST['i'],"gallery.fpd"); $output="$imagedata[title] by $imagedata[username] has been added to your favorites list."; $link="gallery.fpd?name=$_REQUEST[name]&i=$_REQUEST[i]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($_REQUEST['action'] == "shout") { if($username == "Guest") { $output="Please log in!"; $link="login.fpd"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($config['readonly'] == true) { $output="Fur Affinity is read-only mode, you cannot shout to $user[username]."; $link="user.fpd?name=$name"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } if($username!="Guest") { $shout = addslashes($shout); if(!$subject) $subject = "Submission reply"; $sql->query("INSERT INTO iworks_shouts (user,strlower,username,date,message) VALUES ('$user[userid]','".strlower($username)."','$username','".time()."','$shout') "); send_message($user['userid'],$user['username'],$user_info['username'],"Shouts","","","","$_REQUEST[shout]"); $sql->query("UPDATE iworks_users SET commentsgiven=commentsgiven+1 WHERE userid='$user_info[userid]'"); $sql->query("UPDATE iworks_users SET commentcount=commentcount+1, commentsrecieved=commentsrecieved+1 WHERE userid='$user[userid]'"); $output="Your shout has been made!"; $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } else { $output="You must be registered to shout."; $link="user.fpd?name=$_REQUEST[name]"; require ("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } } $featured = $sql->query_first("SELECT title, smallerurl, strlower, date FROM iworks_submissions WHERE rowid='$user[featured]' $seemature"); if(!$featured['title']) $featured['title'] = "No feature chosen!"; if($featured['title']) $featured['title'] = htmlspecialchars($featured['title']); //$featuredlink = "
$featured[title]"; $featuredlink = "
$featured[title]"; //Smilie data... if(is_array($smilies)) { while(list($key,$val)=each($smilies)) { $smilielist .= " "; } } //Submissions $i=1; $result = $sql->query("SELECT * FROM iworks_submissions WHERE user='$user[userid]' $seemature ORDER BY date DESC LIMIT 10"); while ($row = $sql->fetch_array($result)) { $thisdate = XBdate($config['today'],$row['date']); $row['title'] = htmlspecialchars($row['title']); if($i == 1) { eval ("\$latestsubmissions .= \"".gettemplate("latestsubmissions_first")."\";"); } else { eval ("\$latestsubmissions .= \"".gettemplate("latestsubmissions")."\";"); } $i++; } $sql->free_result($result); //Favorites $i=1; $result = $sql->query("SELECT * FROM iworks_favorites WHERE user='$user[userid]' $seemature ORDER BY rowid DESC LIMIT 10"); while ($row = $sql->fetch_array($result)) { $thisdate = XBdate($config['today'],$row['date']); $row['title'] = htmlspecialchars($row['title']); if($i == 1) { eval ("\$latestfavorites .= \"".gettemplate("latestfavorites_first")."\";"); } else { eval ("\$latestfavorites .= \"".gettemplate("latestfavorites")."\";"); } $i++; } $sql->free_result($result); //journals... $result = $sql->query("SELECT * FROM iworks_journals WHERE user='$user[userid]' ORDER BY date DESC LIMIT 1"); while ($row = $sql->fetch_array($result)) { //$row['message'] = htmlspecialchars($row['message']); $user['journalheader'] = nohtml($user['journalheader']); $user['journalheader'] = nl2br($user['journalheader']); $user['journalheader'] = docode($user['journalheader']); $user['journalfooter'] = nohtml($user['journalfooter']); $user['journalfooter'] = nl2br($user['journalfooter']); $user['journalfooter'] = docode($user['journalfooter']); $row['message'] = nohtml($row['message']); $row['message'] = nl2br($row['message']); $row['message'] = docode($row['message']); $row['message'] = stripslashes($row['message']); $date = XBdate($config['longdateformat'],$row['date'],1); eval ("\$journals .= \"".gettemplate("journal_first")."\";"); } $sql->free_result($result); $listcount = $sql->get_count("rowid","iworks_tracking","target='$user[userid]'"); //tracking users... $result = $sql->query("SELECT * FROM iworks_tracking WHERE target='$user[userid]' ORDER BY rowid DESC LIMIT 25"); while ($row = $sql->fetch_array($result)) { eval ("\$trackedusers .= \"".gettemplate("trackedusers")."\";"); } $sql->free_result($result); //shouts... $result = $sql->query("SELECT * FROM iworks_shouts WHERE user='$user[userid]' ORDER BY date DESC LIMIT 25"); while ($row = $sql->fetch_array($result)) { $row['message'] = nohtml($row['message']); $row['message'] = nl2br($row['message']); $row['message'] = docode($row['message']); $thisdate = XBdate($config['longdateformat'],$row['date'],1); if($adminstatus == true) $removethisshout = "[Remove shout]"; eval ("\$shouts .= \"".gettemplate("shouts")."\";"); } $sql->free_result($result); $regdate = XBdate($config['longdateformat'],$user['regdate'],1); $today = XBdate("d",time()); $thisuserid = $user['userid']; $pviews = unserialize($_COOKIE['pviews']); if($pviews[$thisuserid] != $today) { require("./file_functions.fpd"); $sql->query("UPDATE iworks_users SET pageviews=pageviews+1 WHERE userid='$user[userid]'"); $pviews[$user['userid']] = $today; setcookie("pviews",serialize($pviews),0); } if($user['dlevel'] == 1) { $donationlevel = "FA Supporter: Bronze
"; } if($user['dlevel'] == 2) { $donationlevel = "FA Supporter: Silver
"; } if($user['dlevel'] == 3) { $donationlevel = "FA Supporter: Golden!
"; } if($user['dlevel'] == 4) { $donationlevel = "FA Supporter: Platinum!!
"; } if($user['homepage']) $website = makelink($user['homepage'],"[Website]"); if($user['aim']) $aim = "AIM: ".htmlspecialchars($user['aim'])."
"; if($user['icq']) $icq = "ICQ: ".htmlspecialchars($user['icq'])."
"; if($user['msn']) $msn = "MSN: ".htmlspecialchars($user['msn'])."
"; if($user['yahoo']) $yahoo = "Yahoo: ".htmlspecialchars($user['yahoo'])."
"; if($user['typeartist']) $typeartist = "Type of artist: $user[typeartist]
"; if($user['species']) $species = "Species: ".htmlspecialchars($user['species'])."
"; if($user['age']) $age = "Age: ".htmlspecialchars($user['age'])."
"; if($user['shell']) $shell = "Shell of choice: ".htmlspecialchars($user['shell'])."
"; if($user['os']) $os = "Operating system: ".htmlspecialchars($user['os'])."
"; if($user['quote']) $quote = "Personal quote: ".htmlspecialchars($user['quote'])."
"; if($user['tools']) $tools = "Tools commonly used: ".htmlspecialchars($user['tools'])."
"; if($user['music']) $music = "Music type/genre: ".htmlspecialchars($user['music'])."
"; if($user['favoritemovie']) $favoritemovie = "Favorite movie: ".htmlspecialchars($user['favoritemovie'])."
"; if($user['favoritegame']) $favoritegame = "Favorite game: ".htmlspecialchars($user['favoritegame'])."
"; if($user['favoriteplatform']) $favoriteplatform = "Favorite game platform: ".htmlspecialchars($user['favoriteplatform'])."
"; if($user['favoritemusicpalyer']) $favoritemusicpalyer = "Music player of choice: ".htmlspecialchars($user['favoritemusicpalyer'])."
"; if($user['favoriteartist']) $favoriteartist = "Favorite artist: ".htmlspecialchars($user['favoriteartist'])."
"; if($user['favoriteanimal']) $favoriteanimal = "Favorite animal: ".htmlspecialchars($user['favoriteanimal'])."
"; if($user['favoritewebsite']) $favoritewebsite = "Favorite website: ".htmlspecialchars($user['favoritewebsite'])."
"; if($user['favoritefood']) $favoritefood = "Favorite food: ".htmlspecialchars($user['favoritefood'])."
"; if($user['profileinfo']) $user['profileinfo'] = htmlspecialchars($user['profileinfo']); if($user['mood']) $user['mood'] = htmlspecialchars($user['mood']); if($user['fullname']) $user['fullname'] = htmlspecialchars($user['fullname']); require ("my.query.fpd"); /* //Get the default layout template... if(!$user_info['custpage']) eval ("\$userpagedata = \"".gettemplate("userpage_defaultdata")."\";"); else $userpagedata = $user_info['custpage']; $userpagedata = str_replace("$","",$userpagedata); //get all of the boxes needed... */ eval ("\$profilebox = \"".gettemplate("userpage_profilebox")."\";"); /* eval ("\$userinformationbox = \"".gettemplate("userpage_userinformationbox")."\";"); eval ("\$featuredbox = \"".gettemplate("userpage_featuredbox")."\";"); eval ("\$latestsubmissionbox = \"".gettemplate("userpage_latestsubmissionbox")."\";"); eval ("\$favoritesbox = \"".gettemplate("userpage_favoritesbox")."\";"); eval ("\$watchlistbox = \"".gettemplate("userpage_watchlistbox")."\";"); eval ("\$artistinfobox = \"".gettemplate("userpage_artistinfobox")."\";"); eval ("\$journalsbox = \"".gettemplate("userpage_journalsbox")."\";"); eval ("\$shoutsbox = \"".gettemplate("userpage_shoutsbox")."\";"); //Now place them! $userpagedata = str_replace("{profile}","$profilebox",$userpagedata); $userpagedata = str_replace("{userinformation}","$userinformationbox",$userpagedata); $userpagedata = str_replace("{featured}","$featuredbox",$userpagedata); $userpagedata = str_replace("{latestsubmission}","$latestsubmissionbox",$userpagedata); $userpagedata = str_replace("{favorites}","$favoritesbox",$userpagedata); $userpagedata = str_replace("{watchlist}","$watchlistbox",$userpagedata); $userpagedata = str_replace("{artistinfo}","$artistinfobox",$userpagedata); $userpagedata = str_replace("{journals}","$journalsbox",$userpagedata); $userpagedata = str_replace("{shouts}","$shoutsbox",$userpagedata); */ eval("dooutput(\"".gettemplate("userpage")."\");"); ?>