images = array( 'thumb' => array( 'width' => 46, 'height' => 64, 'quality' => 100, 'web_location' => '/images/items/thumb/' ), 'medium' => array( 'width' => 142, 'height' => 192, 'quality' => 98, 'web_location' => '/images/items/medium/' ), 'large' => array( 'width' => 216, 'height' => 288, 'quality' => 94, 'web_location' => '/images/items/large/' ), 'xlarge' => array( 'width' => 495, 'height' => 660, 'quality' => 88, 'web_location' => '/images/items/xlarge/' ) ); $this->img_tag_attr = array(); foreach($this->images as $image_size=>$image_info) { // ----------------------------------------------------- // set path based on unix or windows $this->images[$image_size]['path'] = Config::$path_to_www; $this->images[$image_size]['path'] .= (Config::$location == 'remote') ? $this->images[$image_size]['web_location'] : str_replace('/', '\\', $this->images[$image_size]['web_location']); // ----------------------------------------------------- $this->img_tag_attr[$image_size] = 'width="'.$image_info['width'].'" height="'.$image_info['height'].'"'; } $this->color_swatch_images = array( 'normal' => array( 'quality' => 98, 'web_location' => '/images/items/colorSwatches/normal/' ), 'thumb' => array( 'width' => 20, 'height' => 20, 'quality' => 100, 'web_location' => '/images/items/colorSwatches/thumb/' ) ); $this->dbTableName = Config::$db_tables['inventory_items']; } function get_RecordSet($title='', $status_web='all', $where_add='', $order_by='', $limit='') { $title .= ' Items::get_RecordSet'; // build query and pass to $Database::get_RecordSet $select = "*"; $from = Config::$db_tables['inventory_items']; $where = ""; $where_started = FALSE; switch($status_web) { case 'all': break; default: $where .= "status_web='$status_web'"; $where_started = TRUE; } if($where_add != '') { $where .= ($where_started) ? " AND " : ""; $where .= $where_add; } return(Database::get_RecordSet($select, $from, $where, $order_by, $limit, $title)); } function get_display($Designers, $onsale_web=FALSE,$onsale_store=FALSE,$status_web='all',$designers='all',$designers_web_status='all',$categories='all',$available_web='all',$order='') { // 6/22/07 fn not currently being called // designers and categories input s/b arrays // returns array of pertinent item info $display_items = array(); // create query $where = "WHERE a.designer_id=b.id AND b.id != 0"; if($onsale_web) { $where .= " AND a.sale_price_web > 0 AND a.sale_price_web < a.price_web"; } if($designers_web_status != 'all') { $where .= " AND b.status_web='$designers_web_status'"; } $order = ($order == '') ? $order : "ORDER BY $order"; $sel = "SELECT * FROM ".Config::$db_tables['inventory_items']." a, ".Config::$db_tables['vendor_designers']." b $where $order"; $RS = Database::ado_execute_query($sel, 'Items:: get_display'); while($row = $RS->FetchRow()) { $Item = new Item($Items, $Sizes, $row['id']);; $add_to_display = TRUE; if($available_web == 'yes') { if(!$Item->is_live_web()) { $add_to_display = FALSE; } } if($add_to_display) { $display_items[] = array( 'item_id' => $Item->data['id'], 'name' => $Item->data['name'], 'short_name' => $Item->data['short_name'], 'img_medium' => $Item->img_html($Items, 'medium', $Item->web_images[0], '', $Item->data['name']), 'designer' => $Designers->get_name($Item->data['designer_id'], $_SERVER['SCRIPT_NAME']), 'regular_price' => $Item->data['price_web'], 'on_sale' => $Item->on_sale_web, 'sale_price' => $Item->data['sale_price_web'] ); } } return($display_items); } } ?>