$query - $result - $num

\n"; //exit; if($num > 0) { $row = mysql_fetch_array($result, MYSQL_ASSOC); $memberidtype = 'artistid'; $memberid = $row[id]; if($memberid == 0) { // This prevents queries where artistid = 0 which would cause huge delays. exit; } $membertype = 'artist'; $membername = trim($row[firstname]).' '.trim($row[lastname]); if(($membername == strtolower($membername)) || ($membername == strtoupper($membername))) { $membername = ucwords(strtolower($membername)); } $memberdescription = $row[biography]; $memberdescription = addcslashes($memberdescription,"\n"); $memberdescription = str_replace("\\n","
",$memberdescription); $memberdescription = str_replace("\"","'",$memberdescription); $memberheadshot = $row[logo1]; if($memberheadshot != '' AND file_exists('../'.$memberheadshot)) { } else { $memberheadshot = "ArtistHeadshotDefault.jpg"; $missinglogoflag = 1; } $membertabdefault = $row[tabdefault]; $memberpagename = $row[pagename]; $memberwebsite = strtolower($row[website]); $membercity = $row[city]; $memberstate = $row[state]; $membercountry = $row[country]; $membersharefacebook = $row[sharefacebook]; $membersharetwitter = $row[sharetwitter]; $membersharestumbleupon = $row[sharestumbleupon]; $membersharegoogleplus = $row[sharegoogleplus]; $membersharepinterest = $row[sharepinterest]; if($_GET[status] && $_GET[administrator] == true) { $query2 = "UPDATE artists SET status = '$_GET[status]' WHERE id = '$memberid'"; $result2 = mysql_query($query2); $query2 = "UPDATE blogs SET status = '0' WHERE artistid = '$memberid'"; $result2 = mysql_query($query2); $query2 = "UPDATE pressreleases SET status = '0' WHERE artistid = '$memberid'"; $result2 = mysql_query($query2); } if($row[status] == 0) { echo"

This account has not yet been activated.   To login, please click here.

"; exit; } if($row[status] == 2) { echo"

This artist account has been closed.

"; exit; } if($_SESSION[domain][flagartistwebsite] == 1) { if($_SESSION[domain][artistwebsite][flagaffiliate] == 0) { if($_SESSION[domain][artistwebsite][memberidtype] != $memberidtype || $_SESSION[domain][artistwebsite][memberid] != $memberid) { header('location: ../index.html'); exit; } } if($_SESSION[domain][artistwebsite][flagaffiliate] == 1) { $queryexclude = "SELECT rwme.* FROM retailwebsitememberexclusions rwme WHERE rwme.artistwebsiteid = '{$_SESSION[domain][artistwebsite][id]}' AND rwme.$memberidtype = '$memberid' AND rwme.status = '1'"; $resultexclude = mysql_query($queryexclude); $errormessageexclude = mysql_error(); $numexclude = mysql_numrows($resultexclude); //echo"

$queryexclude - $resultexclude - $errormessageexclude - $numexclude

\n"; if($row[flagallowretailwebsites] == 0 || $numexclude > 0) { header('location: ../index.html'); exit; } } } include('memberprofile.php'); exit; } $query = "SELECT g.* FROM galleries g, associatemembersdomains amd WHERE g.pagename = '$_GET[pagename]' AND amd.galleryid = g.id AND amd.domainid = '{$_SESSION[domain][id]}' AND amd.status = '1' LIMIT 1"; $result = mysql_query($query); $num = mysql_numrows($result); if($num > 0) { $row = mysql_fetch_array($result, MYSQL_ASSOC); $memberidtype = 'galleryid'; $memberid = $row[id]; if($memberid == 0) { // This prevents queries where galleryid = 0 which would cause huge delays. exit; } $membertype = 'gallery'; $membername = $row[galleryname]; if(($membername == strtolower($membername)) || ($membername == strtoupper($membername))) { $membername = ucwords(strtolower($membername)); } $memberdescription = $row[gallerydescription]; $memberdescription = addcslashes($memberdescription,"\n"); $memberdescription = str_replace("\\n","
",$memberdescription); $memberdescription = str_replace("\"","'",$memberdescription); $memberheadshot = $row[logo1]; if($memberheadshot != '' AND file_exists('../'.$memberheadshot)) { } else { $memberheadshot = "ArtistHeadshotDefault.jpg"; $missinglogoflag = 1; } $membertabdefault = $row[tabdefault]; $memberpagename = $row[pagename]; $memberwebsite = strtolower($row[website]); $membercity = $row[city]; $memberstate = $row[state]; $membercountry = $row[country]; $membersharefacebook = $row[sharefacebook]; $membersharetwitter = $row[sharetwitter]; $membersharestumbleupon = $row[sharestumbleupon]; $membersharegoogleplus = $row[sharegoogleplus]; $membersharepinterest = $row[sharepinterest]; if($_GET[status] && $_GET[administrator] == true) { $query2 = "UPDATE galleries SET status = '$_GET[status]' WHERE id = '$memberid'"; $result2 = mysql_query($query2); } if($row[status] == 0) { echo"

This account has not yet been activated.   To login, please click here.

"; exit; } if($row[status] == 2) { echo"

This account has been closed.

"; exit; } if($_SESSION[domain][artistwebsite][flagaffiliate] == 1) { $queryexclude = "SELECT rwme.* FROM retailwebsitememberexclusions rwme WHERE rwme.artistwebsiteid = '{$_SESSION[domain][artistwebsite][id]}' AND rwme.$memberidtype = '$memberid' AND rwme.status = '1'"; $resultexclude = mysql_query($queryexclude); $errormessageexclude = mysql_error(); $numexclude = mysql_numrows($resultexclude); //echo"

$queryexclude - $resultexclude - $errormessageexclude - $numexclude

\n"; if($row[flagallowretailwebsites] == 0 || $numexclude > 0) { header('location: ../index.html'); exit; } } include('memberprofile.php'); exit; } $query = "SELECT c.* FROM collectors c WHERE c.pagename = '$_GET[pagename]' AND c.status = '1' LIMIT 1"; $result = mysql_query($query); $num = mysql_numrows($result); if($num > 0) { $row = mysql_fetch_array($result, MYSQL_ASSOC); include('collectorprofile.php'); exit; } header('location: '.$_SESSION[domain][website][url].'/index.html'); ?>