Ooops, no artist id# found.
Please check your URL and try again.'); } include_once('/home/artephant/public_html/inc/header-artist.php'); include_once('/home/artephant/config.php'); $conn= mysqli_connect($hostname,$user,$pass,$dbase)or die ("Can't connect to Database"); $id=str_replace('c','',mysqli_real_escape_string($conn,$_GET['id'])); isset($_GET['color'])?$color=mysqli_real_escape_string($conn,$_GET['color']):$color=''; isset($_GET['price'])?$price=mysqli_real_escape_string($conn,$_GET['price']):$price=''; isset($_GET['size'])?$size=mysqli_real_escape_string($conn,$_GET['size']):$size=''; isset($_GET['search'])&&preg_match('/[0-9]+/',$_GET['search'])?$search=mysqli_real_escape_string($conn,$_GET['search']):$search='0'; isset($_GET['style'])?$style=mysqli_real_escape_string($conn,$_GET['style']):$style=''; isset($_GET['letter'])?$letter=mysqli_real_escape_string($conn,$_GET['letter']):$letter=''; isset($_GET['sort'])?$sort=mysqli_real_escape_string($conn,$_GET['sort']):$sort=''; include_once('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); isset($_GET['search'])&&preg_match('/[0-9]+/',$_GET['search'])?$search=mysqli_real_escape_string($conn,$_GET['search']):$search='0'; isset($_GET['category'])?$category=mysqli_real_escape_string($conn,$_GET['category']):$category=''; $page_type='artist-page'; $gallery_id=$user_id; $followed_artists=array(); $followed_galleries=array(); $result=mysqli_query($conn,"SELECT artist_or_gallery,artist_id FROM alerts WHERE user_id='$user_id'")or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ if($row['artist_or_gallery']=='1'){ $followed_galleries[]=$row['artist_id']; }else{ $followed_artists[]=$row['artist_id']; } } $galleries=array(); $result=mysqli_query($conn,"SELECT DISTINCT user_id FROM calculator_c WHERE artist_name='$id' AND hide!='1' AND gallery_or_index='g'")or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $galleries[]=$row['user_id']; } $gallery_checkboxes=''; } if(count($galleries)>0){ foreach($galleries as $gallery){ $result=mysqli_query($conn,"SELECT establishment_name,gallery_type FROM users WHERE id='$gallery'")or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $radioCount=getRadioCount("13",$style,$color,$price,$style,$size,$category,$gallery); while($row=mysqli_fetch_array($result)){ if($row['gallery_type']!='6'){ $gallery_checkboxes.='
  • '.$row['establishment_name'].' ('.$radioCount.')
  • '; }else{ $gallery_checkboxes.='
  • '.$row['establishment_name'].'* ('.$radioCount.')
  • '; } } } } } $result=mysqli_query($conn,"SELECT artist_id FROM alerts WHERE user_id='$user_id' AND artist_or_gallery='0'")or die(mysqli_error($conn)); $followed_artists=array(); while($row=mysqli_fetch_array($result)){ $followed_artists[]=$row['artist_id']; } if($detect->isTablet()){ $img_path='//artephant.com/images/art/195/'; $device='tablet'; }elseif($detect->isMobile()&&!$detect->isTablet()){ $img_path='//artephant.com/images/art/165/'; $device='phone'; }else{ $img_path='//artephant.com/images/art/300/'; $device='desktop'; } $id>=1000000?$table='artists_c':$table='artists'; $query="SELECT * FROM $table WHERE artist_id='$id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $pic=$row['photo_url2']; $first_name=$row['artist_first_name']; $middle_name=$row['artist_middle_name']; $last_name=$row['artist_last_name']; if($middle_name!=''){ $artist_name=$first_name.' '.$middle_name.' '.$last_name; }else{ $artist_name=$first_name.' '.$last_name; } $artist_abbr_name=$first_name.' '.$last_name; $born=$row['artist_birth_year']; $row['artist_death_year']>0?$died=$row['artist_death_year']:$died='NA'; $nationality=$row['artist_nationality']; $cagr=$row['artist_cagr']; $cagr>0?$cagr='+'.$cagr.'%':$cagr.'%'; $total_ahp=$row['artist_hold_period']; $bio=$row['artist_bio']; $styles=$row['movement']; $specialty=$row['artist_best_known_for']; $additional_styles=str_replace('||',' * ',$row['additional_styles']); $museums=str_replace('||',' * ',$row['MuseumCollections']); $collections=str_replace('||',' * ',$row['collections']); $memberships=str_replace('||',' * ',$row['Memberships']); $exhibited=str_replace('||',' * ',$row['WhereExhibited']); $education=str_replace('||',' * ',$row['education']); $chronology=$row['chronology']; $awards=str_replace('||',' * ',$row['Awards']); } }else{ die('

    Artist Not Found.

    '); } $books=''; $books2=''; $query="SELECT * FROM literature_books_c WHERE artist_id=$id"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $row['illustrated']=='1'?$ill='Yes': $ill='No'; $books.=' '.$row['year'].' '.$row['author'].' '.$row['title'].' '.$row['pages'].' '.$ill.' '.$row['color'].' '; $books2.='
    '; } } $mags=''; $mags2=''; $query="SELECT * FROM literature_mags_c WHERE artist_id=$id"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $row['illustrated']=='1'?$ill='Yes': $ill='No'; $mags.=' '.$row['year'].' '.$row['month'].' '.$row['author'].' '.$row['title'].' '.$row['pages'].' '.$ill.' '.$row['color'].' '; $mags2.='
    '; } } $other=''; $other2=''; $query="SELECT * FROM literature_other_c WHERE artist_id=$id"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $row['illustrated']=='1'?$ill='Yes': $ill='No'; $other.=' '.$row['year'].' '.$row['month'].' '.$row['author'].' '.$row['title'].' '.$row['pages'].' '.$ill.' '.$row['color'].' '; $other2.='
    '; } } // now go through the calculator/artwork tables $id>=1000000?$table='calculator_c':$table='calculator'; $query="SELECT DISTINCT(medium) FROM $table WHERE artist_name='$id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $mediums=''; if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $mediums.=$row['medium'].' * '; } $mediums=rtrim($mediums,' * '); } $query="SELECT DISTINCT(category) FROM $table WHERE artist_name='$id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $works=''; if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $works.=$row['category'].' * '; } $works=rtrim($works,' * '); } $id>=1000000?$tableb='artists_c':$tableb='artists'; $query="SELECT MIN(a.created_year) as low_val FROM $table a JOIN $tableb b on a.artist_name=b.artist_id WHERE a.artist_name=$id AND a.created_year!='' AND a.created_year!='0' AND a.created_year IS NOT NULL AND a.created_year>(b.artist_birth_year+10)"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $years_active=''; if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $low_val=$row['low_val']; } } $this_year=date("Y"); $query="SELECT max(a.created_year) as high_val FROM $table a JOIN $tableb b on a.artist_name=b.artist_id WHERE a.artist_name=$id AND a.created_year!='' AND a.created_year!='0' AND a.created_year IS NOT NULL AND a.created_year<= b.artist_death_year AND a.created_year<=$this_year"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $high_val=$row['high_val']; } } $high_val>date("Y")?$high_val='':$high_val; $years_active="$low_val - $high_val"; // now populate pictorial section $id>1000000?$table='artists_c':$table='artists'; $query="SELECT photo_url1,photo_url1b,photo_url1c,photo_url1d,photo_url2,photo_url2b,photo_url2c,photo_url2d,photo_url3,photo_url3b,photo_url3c,photo_url3d,photo_url4,photo_url4b,photo_url4c,photo_url4d,photo_url4e,photo_url4f,photo_url4g,photo_url4h from $table WHERE artist_id=$id"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $pictorial=''; while($row=mysqli_fetch_array($result)){ $row['photo_url1']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artist #1

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url1b']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artist #2

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url1c']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artist #3

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url1d']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artist #4

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url2']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artwork #1

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url2b']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artwork #2

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url2c']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artwork #3

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url2d']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Artwork #4

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url3']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Signature #1

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url3b']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Signature #2

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url3c']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Signature #3

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url3d']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Signature #4

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #1

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4b']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #2

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4c']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #3

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4d']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #4

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4e']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #5

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4f']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #6

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4g']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #7

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; $row['photo_url4h']!=''?$pictorial.="
    \n
    \n\n
    \n
    \n

    Image of Archival Material #8

    \n
    \n
    \n\n\n\n
    \n
    \n
    ":$pictorial; } $articles=''; $query="SELECT id,title,image,gallery_name,gallery_id,author,date FROM articles WHERE (tags LIKE '%$id%' OR tags='$id') AND date!='0000-00-00' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $articles_total=mysqli_num_rows($result); $count=0; while($row=mysqli_fetch_array($result)){ $count++; if(file_exists($img_path.''.$row['image'])){ $image=$img_path.''.$row['image']; }else{ $image='//artephant.com/images/art/'.$row['image']; } if($count<5){ $articles.='

    By: '.$row['author'].' - '.$row['gallery_name'].'

    '.$row['date'].'

    '; }else{ break; } } } // art shows $art_shows=''; $art_shows_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Show' AND hide='0' ORDER BY end_date DESC"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ $count=0; while($row=mysqli_fetch_array($result)){ $count++; if($count<5){ $obj=new stdClass(); $obj->title=$row['title']; $obj->event_id=$row['event_id']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth='NA'; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; }else{ break; } } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_shows_total++; $art_shows.='

    '.$gallery_name.'

    Art Show

    '; /* if(in_array($obj->gallery_id,$followed_galleries)){ $art_shows.='Follow Following '; }else{ $art_shows.='Follow Following '; } */ $art_shows.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } /* //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND end_date >=NOW() AND promoter='0' AND event_type='Art Show' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ if(!is_array($these_events)||(is_array($these_events)&&!in_array($row['event_id'],$these_events))){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $art_shows_total++; $art_shows.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } */ /* $art_fair_p=''; $art_fair_p_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Show' AND hide='0' ORDER BY end_date DESC LIMIT 1"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth='NA'; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_fair_p_total++; $art_fair_p.='

    '.$gallery_name.'

    Art Show

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_fair_p.='Follow Following '; }else{ $art_fair_p.='Follow Following '; } */ $art_fair_p.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; $art_fair_a=''; $art_fair_a_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Fair - Attendee' AND hide='0' AND promoter='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_fair_a_total++; $art_fair_a.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_fair_a.='Follow Following '; }else{ $art_fair_a.='Follow Following '; } */ $art_fair_a.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND promoter='0' AND event_type='Art Fair - Attendee' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $art_fair_a_total++; $art_fair_a.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_fair_a.='Follow Following '; }else{ $art_fair_a.='Follow Following '; } */ $art_fair_a.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } // art show promoter: $art_fair_p=''; $art_fair_p_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Fair' AND hide='0' AND promoter='1' ORDER BY end_date DESC"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_fair_p_total++; if($art_fair_p_total<5){ $art_fair_p.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_fair_p.='Follow Following '; }else{ $art_fair_p.='Follow Following '; } */ $art_fair_p.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } // Auctions $auctions=''; $auctions_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Auction' AND hide='0' AND promoter='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $auctions_total++; if($auctions_total<5){ $auctions.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $auctions.='Follow Following '; }else{ $auctions.='Follow Following '; } */ $auctions.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type='Art Auction' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $auctions_total++; if($auctions_total<5){ $auctions.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $auctions.='Follow Following '; }else{ $auctions.='Follow Following '; } */ $auctions.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //Institutions $institutions=''; $institutions_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Institutional Event' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $institutions_total++; if($institutions_total<5){ $institutions.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $institutions.='Follow Following '; }else{ $institutions.='Follow Following '; } */ $institutions.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type='Institutional Event' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $institutions_total++; if($institutions_total<5){ $institutions.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $institutions.='Follow Following '; }else{ $institutions.='Follow Following '; } */ $institutions.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //Art fUNDS $art_funds=''; $art_funds_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Art Fund Event' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_funds_total++; if($art_funds_total<5){ $art_funds.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_funds.='Follow Following '; }else{ $art_funds.='Follow Following '; } */ $art_funds.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type='Art Fund Event' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $art_funds_total++; if($art_funds_total<5){ $art_funds.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_funds.='Follow Following '; }else{ $art_funds.='Follow Following '; } */ $art_funds.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //Estate $estate=''; $estate_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type='Estate Event' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $estate_total++; if($estate_total<5){ $estate.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $estate.='Follow Following '; }else{ $estate.='Follow Following '; } */ $estate.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type='Estate Event' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $estate_total++; if($estate_total<5){ $estate.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $estate.='Follow Following '; }else{ $estate.='Follow Following '; } */ $estate.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } // Cat Raisons $cat_raisons=''; $cat_raisons_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type LIKE 'Cat Rai%' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $cat_raisons_total++; if($cat_raisons_total<5){ $cat_raisons.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $cat_raisons.='Follow Following '; }else{ $cat_raisons.='Follow Following '; } */ $cat_raisons.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type LIKE 'Cat Rai%' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $cat_raisons_total++; if($cat_raisons_total<5){ $cat_raisons.='

    '.$gallery_name.'

    Art Fair'.$booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $cat_raisons.='Follow Following '; }else{ $cat_raisons.='Follow Following '; } */ $cat_raisons.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } // Expert Events $art_expert=''; $art_expert_total=0; $events=array(); $query="SELECT DISTINCT event_id from calculator_c WHERE artist_name='$id' and event_id!='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $total_articles=mysqli_num_rows($result); while($row=mysqli_fetch_array($result)){ $events[]=$row['event_id']; } } if(count($events)>0){ $these_events=""; foreach($events as $event){ $these_events.=$event.","; } $these_events=rtrim($these_events,","); $query="SELECT * FROM events WHERE event_id IN($these_events) AND event_type LIKE 'Expert' AND hide='0'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); $events=array(); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$obj->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $art_expert_total++; if($art_expert_total<5){ $art_expert.='

    '.$gallery_name.'

    Art Fair - '.$object->booth.'

    '; /* if(in_array($object->gallery_id,$followed_galleries)){ $art_expert.='Follow Following '; }else{ $art_expert.='Follow Following '; }*/ $art_expert.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } //check events table for artists not in calculator table $query="SELECT * FROM events WHERE hide='0' AND event_type LIKE 'Expert' AND (artists='$id' OR artists LIKE '%||$id||%' OR artists LIKE '%||$id' OR artists LIKE '$id||%')"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ $events=array(); while($row=mysqli_fetch_array($result)){ $obj=new stdClass(); $obj->event_id=$row['event_id']; $obj->title=$row['title']; $obj->image=$row['photo_url']; $row['booth']!=''?$obj->booth=$row['booth']:$obj->booth=''; if($row['address2']!=''){ $event_location=$row['address'].', '.$row['address2']; }else{ $event_location=$row['address']; } $event_location.=', '.$row['city']; $row['state']!=''?$event_location.=', '.$row['state']:$event_location.=', '.$row['province']; $event_location.=' '.$row['country']. ' '.$row['zip']; $row['online_event']=='1'?$event_location='Online Event Only':$event_location; $obj->location=$event_location; $obj->date=date('M d, Y',strtotime($row['start_date'])).' - '.date('M d, Y',strtotime($row['end_date'])); $obj->gallery_id=$row['user_id']; $events[]=$obj; } } foreach($events as $object){ $gallery_name=''; $query="SELECT establishment_name FROM users WHERE id='$object->gallery_id'"; $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_array($result)){ $gallery_name=$row['establishment_name']; } } if(file_exists($img_path.$object->image)){ $image=$img_path.$object->image; }else{ $image='//artephant.com/images/art/'.$object->image; } $object->booth!=''?$booth=' - '.$object->booth:$booth=''; $art_expert_total++; if($art_expert_total<5){ $art_expert.='

    '.$object->title.'

    '.$object->location.'

    '.$object->date.'

    '; } } $price_count_query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$id'"; $size_count_query=$price_count_query; $style_count_query=$price_count_query; $category_count_query=$price_count_query; $color_count_query=$price_count_query; ?>

    ( - )
    '; }else{ echo ' '; } ?>
    Average CAGR: - AHP: CAGR: Become a Member to see available artist "Compound Annual Growth Rate" (CAGR) AHP: Become a Member to see available artist "Average Hold Period" (AHP)

    FEATURED WORKS

    ()

    Overview:

    Nationality: Speciality: Style Best Known for: Additional Styles: Museum Collections: Important Private Collections: Membership(s): Where Exhibited: Where Educated: Awards / Prizes Won: Works: Mediums: > Years of Productivity:

    ()

    = 365){ $years=floor($hold_period/365); } if($hold_period >= 365 && ($hold_period%365)>30){ $months=floor(($hold_period%365)/30); } if($hold_period <= 365 && ($hold_period%365)>30){ $months=floor(($hold_period%365)/30); } if(($hold_period%30)>14){ $months += '1'; } if($hold_period < 9){ $months = 0; $years=0; } $years>0?$hold_period=$years.'Y':$hold_period=$hold_period; $months>0&&$years>0?$hold_period.='/'.$months.'M':$hold_period=$hold_period; $months>0&&$years<1?$hold_period =''.$months.'M':$hold_period=$hold_period; if($months==0 && $years==0){ $hold_period = 'NA'; } return $hold_period; } /* function getPriceCount($price_var,$price_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); switch($price_var){ case 'ALL': $price_count_query.=""; //die($price_count_query); break; case '0': $price_count_query.=" AND pricing='price_request'"; break; case "1-2000": $price_count_query.=" AND sort_price <= 2000 AND sort_price>0"; break; case "2000-5000": $price_count_query.=" AND ((sort_price >= 2000 AND sort_price <= 5000) OR price_range='2,000-5,000')"; break; case "5000-10000": $price_count_query.=" AND ((sort_price >= 5000 AND sort_price <= 10000) OR price_range='5,000-10,000')"; break; case "10000-15000": $price_count_query.=" AND ((sort_price >= 10000 AND sort_price <= 15000) OR price_range='10,000-15,000')"; break; case "15000-20000": $price_count_query.=" AND ((sort_price >= 15000 AND sort_price <= 20000) OR price_range='15,000-20,000')"; break; case "1-19999": $price_count_query.=" AND ((sort_price <20000) OR price_range='Below-20,000')"; break; case "20000-30000": $price_count_query.=" AND ((sort_price >= 20000 AND sort_price <= 30000) OR price_range='20,000-30,000')"; break; case "1-29999": $price_count_query.=" AND ((sort_price <30000) OR price_range='Below-30,000')"; break; case "20000-40000": $price_count_query.=" AND ((sort_price >= 20000 AND sort_price <= 40000) OR price_range='20,000-40,000')"; break; case "1-39999": $price_count_query.=" AND ((sort_price <40000) OR price_range='Below-40,000')"; break; case "30000-40000": $price_count_query.=" AND ((sort_price >= 30000 AND sort_price <= 40000) OR price_range='30,000-40,000')"; break; case "30000-50000": $price_count_query.=" AND ((sort_price >= 30000 AND sort_price <= 50000) OR price_range='30,000-50,000')"; break; case "50001-100000000000": $price_count_query.=" AND ((sort_price >50000) OR price_range='Above-50,000')"; break; case "75001-100000000000": $price_count_query.=" AND ((sort_price >75000) OR price_range='Above-75,000')"; break; case "100001-100000000000": $price_count_query.=" AND ((sort_price >100000) OR price_range='Above-100,000')"; break; case "250001-100000000000": $price_count_query.=" AND ((sort_price >250000) OR price_range='Above-250,000')"; break; case "500001-100000000000": $price_count_query.=" AND ((sort_price >500000) OR price_range='Above-500,000')"; break; case "1000001-100000000000": $price_count_query.=" AND ((sort_price > 1000000) OR price_range='Above-1,000,000')"; break; case "SOLD": $price_count_query.=" AND pricing='mark_sold'"; break; case "DISPLAY": $price_count_query.=" AND pricing='is_display'"; break; } $result=mysqli_query($conn,$price_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } */ function getPriceCount($price_var,$price_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); switch($price_var){ case 'ALL': $price_count_query.=" AND b.frozen!='1'"; //die($price_count_query); break; case '0': $price_count_query.=" AND a.pricing='price_request' AND b.frozen!='1'"; break; case "1-2000": $price_count_query.=" AND a.sort_price <= 2000 AND a.sort_price>0 AND b.frozen!='1'"; break; case "2000-5000": $price_count_query.=" AND ((a.sort_price >= 2000 AND a.sort_price <= 5000) OR a.price_range='2,000-5,000') AND b.frozen!='1'"; break; case "5000-10000": $price_count_query.=" AND ((a.sort_price >= 5000 AND a.sort_price <= 10000) OR a.price_range='5,000-10,000') AND b.frozen!='1'"; break; case "10000-15000": $price_count_query.=" AND ((a.sort_price >= 10000 AND a.sort_price <= 15000) OR a.price_range='10,000-15,000') AND b.frozen!='1'"; break; case "15000-20000": $price_count_query.=" AND ((a.sort_price >= 15000 AND a.sort_price <= 20000) OR a.price_range='15,000-20,000') AND b.frozen!='1'"; break; case "1-19999": $price_count_query.=" AND ((a.sort_price <20000 AND a.sort_price>0) OR a.price_range='Below-20,000') AND b.frozen!='1'"; break; case "20000-30000": $price_count_query.=" AND ((a.sort_price >= 20000 AND a.sort_price <= 30000) OR a.price_range='20,000-30,000') AND b.frozen!='1'"; break; case "1-29999": $price_count_query.=" AND ((a.sort_price <30000 AND a.sort_price>0) OR a.price_range='Below-30,000') AND b.frozen!='1'"; break; case "20000-40000": $price_count_query.=" AND ((a.sort_price >= 20000 AND a.sort_price <= 40000) OR a.price_range='20,000-40,000') AND b.frozen!='1'"; break; case "1-39999": $price_count_query.=" AND ((a.sort_price < 40000 AND a.sort_price>0) OR a.price_range='Below-40,000') AND b.frozen!='1'"; break; case "30000-40000": $price_count_query.=" AND ((a.sort_price >= 30000 AND a.sort_price <= 40000) OR a.price_range='30,000-40,000') AND b.frozen!='1'"; break; case "30000-50000": $price_count_query.=" AND ((a.sort_price >= 30000 AND a.sort_price <= 50000) OR a.price_range='30,000-50,000') AND b.frozen!='1'"; break; case "50001-100000000000": $price_count_query.=" AND ((a.sort_price >50000) OR a.price_range='Above-50,000') AND b.frozen!='1'"; break; case "75001-100000000000": $price_count_query.=" AND ((a.sort_price >75000) OR a.price_range='Above-75,000') AND b.frozen!='1'"; break; case "100001-100000000000": $price_count_query.=" AND ((a.sort_price >100000) OR a.price_range='Above-100,000') AND b.frozen!='1'"; break; case "250001-100000000000": $price_count_query.=" AND ((a.sort_price >250000) OR a.price_range='Above-250,000') AND b.frozen!='1'"; break; case "500001-100000000000": $price_count_query.=" AND ((a.sort_price >500000) OR a.price_range='Above-500,000') AND b.frozen!='1'"; break; case "1000001-100000000000": $price_count_query.=" AND ((a.sort_price > 1000000) OR a.price_range='Above-1,000,000') AND b.frozen!='1'"; break; case "SOLD": $price_count_query.=" AND a.pricing='mark_sold' AND b.frozen!='1'"; break; case "DISPLAY": $price_count_query.=" AND a.pricing='is_display' AND b.frozen!='1'"; break; } $result=mysqli_query($conn,$price_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } function getSizeCount($size,$size_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); switch($size){ case '0': $size_count_query.=" AND b.frozen!='1'"; break; case '1': $size_count_query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width <=450) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth <=450)) AND b.frozen!='1'"; break; case '2': $size_count_query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width BETWEEN 451 AND 1200) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth BETWEEN 451 AND 1200)) AND b.frozen!='1'"; break; case '3': $size_count_query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width BETWEEN 1201 AND 4608) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth BETWEEN 1201 AND 4608)) AND b.frozen!='1'"; break; case '4': $size_count_query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width > 4608) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth >4608)) AND b.frozen!='1'"; break; } $result=mysqli_query($conn,$size_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } function getStyleCount($style,$style_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); $style=mysqli_real_escape_string($conn,$style); if($style!='ALL'){ $style_count_query.=" AND a.style='$style' AND b.frozen!='1'"; }else{ $style_count_query.=" AND b.frozen!='1'"; } $result=mysqli_query($conn,$style_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } function getCategoryCount($category,$category_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); if($category!='ALL'){ $category_count_query.=" AND a.category='$category' AND b.frozen!='1'"; }else{ $category_count_query.=" AND b.frozen!='1'"; } $result=mysqli_query($conn,$category_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } function getColorCount($color,$color_count_query){ include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); $color=mysqli_real_escape_string($conn,$color); $color_count_query.=" AND a.colors='$color' AND b.frozen!='1'"; $result=mysqli_query($conn,$color_count_query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); echo $thisCount; } function getRadioCount($search,$styles,$color,$price,$style,$size,$category,$gallery_id){ global $id; $artist=$id; include('/home/artephant/config.php'); $conn=mysqli_connect($hostname,$user,$pass,$dbase)or die(mysqli_connect_error()); if($search=='0'||$search==''){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type!='6' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='1'||$search=='6'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='6' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='4'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='1' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='5'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='2' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='7'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='4' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='8'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='5' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='9'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='8' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='10'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='10' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='11'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='9' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }elseif($search=='12'){ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND b.gallery_type='7' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; }else{ $query="SELECT count(*) as count FROM calculator_c a JOIN users b on a.user_id=b.id WHERE a.artist_name='$artist' AND a.user_id='$gallery_id' AND a.hide!='1' AND a.gallery_or_index='g' AND b.frozen!='1'"; } if($color!=''){ $query.=" AND a.colors='$color' AND b.frozen!='1'"; } if($price!=''){ switch($price){ case '0': $query.=" AND a.pricing='price_request' AND b.frozen!='1'"; break; case "1-2000": $query.=" AND a.sort_price <= 2000 AND a.sort_price >0 AND b.frozen!='1'"; break; case "2000-5000": $query.=" AND a.sort_price >= 2000 AND a.sort_price <= 5000 AND b.frozen!='1'"; break; case "5000-10000": $query.=" AND a.sort_price >= 5000 AND a.sort_price <= 10000 AND b.frozen!='1'"; break; case "10000-15000": $query.=" AND a.sort_price >= 10000 AND a.sort_price <= 15000 AND b.frozen!='1'"; break; case "15000-20000": $query.=" AND a.sort_price >= 15000 AND a.sort_price <= 20000 AND b.frozen!='1'"; break; case "1-19999": $query.=" AND a.sort_price <20000 AND a.sort_price>0 AND b.frozen!='1'"; break; case "20000-30000": $query.=" AND a.sort_price >= 20000 AND a.sort_price <= 30000 AND b.frozen!='1'"; break; case "1-29999": $query.=" AND a.sort_price <30000 AND a.sort_price>0 AND b.frozen!='1'"; break; case "20000-40000": $query.=" AND a.sort_price >=20000 AND a.sort_price <= 40000 AND b.frozen!='1'"; break; case "1-39999": $query.=" AND a.sort_price <40000 AND a.sort_price>0 AND b.frozen!='1'"; break; case "30000-40000": $query.=" AND a.sort_price >= 30000 AND a.sort_price <= 40000 AND b.frozen!='1'"; break; case "30000-50000": $query.=" AND a.sort_price >= 30000 AND a.sort_price <= 50000 AND b.frozen!='1'"; break; case "50001-100000000000": $query.=" AND a.sort_price >50000 AND b.frozen!='1'"; break; case "75001-100000000000": $query.=" AND a.sort_price >75000 AND b.frozen!='1'"; break; case "100001-100000000000": $query.=" AND a.sort_price >100000 AND b.frozen!='1'"; break; case "250001-100000000000": $query.=" AND a.sort_price >250000 AND b.frozen!='1'"; break; case "500001-100000000000": $query.=" AND a.sort_price >500000 AND b.frozen!='1'"; break; case "1000001-100000000000": $query.=" AND a.sort_price > 1000000 AND b.frozen!='1'"; break; case "20": $query.=" AND a.pricing='mark_sold' AND b.frozen!='1'"; break; case "21": $query.=" AND a.pricing='is_display' AND b.frozen!='1'"; break; } } if($style!=''){ $query.=" AND a.movement='$style' AND b.frozen!='1'"; } if($size!=''){ switch($size){ case '0': $size_count_query.=" AND b.frozen!='1'"; break; case '1': $query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width <=450) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth <=450)) AND b.frozen!='1'"; break; case '2': $query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width BETWEEN 451 AND 1200) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth BETWEEN 451 AND 1200)) AND b.frozen!='1'"; break; case '3': $query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width BETWEEN 1201 AND 4608) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth BETWEEN 1201 AND 4608)) AND b.frozen!='1'"; break; case '4': $query.=" AND ((a.depth=0 AND a.height>0 AND a.width>0 AND a.height*a.width > 4608) OR (a.depth>0 AND a.height>0 AND a.width>0 AND a.height*a.width*a.depth >4608)) AND b.frozen!='1'"; break; } } if($category!=''){ $query.=" AND a.category='$category' AND b.frozen!='1'"; } $result=mysqli_query($conn,$query)or die(mysqli_error($conn)); while($row=mysqli_fetch_array($result)){ $thisCount=$row['count']; } mysqli_close($conn); return $thisCount; } ?>