' . '' . ''; } else { $parm = "sadv=On&artist=$artist&album=$album&sku=$sku&label=$label&order=$order&format=$format&offset=$offset"; $FormParm = '' . '' . '' . '' . '' . '' . '' . ''; } function create_searchq( $param, $sadv, $artist, $album, $sku, $label, $media, $order ) { if ( $sadv != "" ) { $sql = adv_searchq( $sadv, $artist, $album, $sku, $label, $media, $order ); } elseif ( $param == "@@SALEITEMS" ) { $sql = "AND sale = 1 AND qty > 0"; } elseif ( $param == "@@NEWITEMS" ) { $sql = "AND itemtype != 'consign' AND stamp >= " . "DATE_SUB( CURDATE(), INTERVAL '1' MONTH )"; } elseif ( $param == "@@CONSIGN" ) { $sql = "AND itemtype = 'consign'"; } elseif ( $param == "@@INSTOCK" ) { $sql = "AND qty > 0"; } elseif ( $param == "@@0-9" ) { $sql = "AND artist REGEXP '^[[:digit:]]'"; } elseif ( $param == "@@VA" ) { $sql = "AND artist = 'Various Artists'"; } elseif ( preg_match( "/^@@:(.*)/", $param, $matches )) { $matches[1] = escape_sql( $matches[1] ); if ( $matches[1] == 'V' ) { $sql = "AND artist LIKE '$matches[1]%' " . "AND artist != 'Various Artists'"; } else { $sql = "AND artist LIKE '$matches[1]%'"; } } else { $param = escape_sql( $param ); $sql = "AND (artist LIKE '%$param%' OR album LIKE " . "'%$param%' OR sku LIKE '%$param%' OR label LIKE '%$param%')"; } return " AND active = 1 " . $sql; } function adv_searchq( $sadv, $artist, $album, $sku, $label, $media, $order ) { if ( $sadv == "" ) { return ""; } if ($artist != "") { $crit[] = "artist LIKE '%" . escape_sql($artist) . "%'"; } if ($album != "") { $crit[] = "album LIKE '%" . escape_sql($album) . "%'"; } if ($sku != "") { $crit[] = "sku LIKE '%" . escape_sql($sku) . "%'"; } if ($label != "") { $crit[] = "label LIKE '%" . escape_sql($label) . "%'"; } if ($media != "") { $crit[] = "format = '" . escape_sql($media) . "'"; } if ($crit) { $sql = 'AND ' . implode(' AND ', $crit); } return $sql; } function escape_sql( $val ) { $val = eregi_replace('[\\\'\"]',"\\0",$val); $val = eregi_replace(';','',$val); return $val; } ?> qty; } function cust_info ($sid) { $q = mysql_query( sprintf( "SELECT ear_custmap.cid, email, " . "pays_via, bill_address, " . "bill_address2, bill_address3, " . "bill_address4, bill_city, " . "bill_state, bill_province, bill_zip, bill_co, " . "bill_phone, bill_company, " . "b_is_s, " . "IF(b_is_s, bill_address, ship_address) AS ship_address, " . "IF(b_is_s, bill_address2, ship_address2) AS ship_address2, " . "IF(b_is_s, bill_address3, ship_address3) AS ship_address3, " . "IF(b_is_s, bill_address4, ship_address4) AS ship_address4, " . "IF(b_is_s, bill_city, ship_city) AS ship_city, " . "IF(b_is_s, bill_state, ship_state) AS ship_state, " . "IF(b_is_s, bill_province, ship_province) AS ship_province, " . "IF(b_is_s, bill_zip, ship_zip) AS ship_zip, " . "IF(b_is_s, bill_co, ship_co) AS ship_co, " . "IF(b_is_s, bill_phone, ship_phone) AS ship_phone, " . "IF(b_is_s, bill_company, ship_company) AS ship_company, " . "first_name, last_name " . "FROM ear_customers, ear_custmap, ear_session " . "WHERE ear_customers.cid = ear_custmap.cid " . "AND ear_custmap.cid = ear_session.cid " . "AND ear_session.stat = 1 " . "AND ear_session.sid = '%s'", escape_sql($sid) ) ); return mysql_fetch_object($q); } function cc_info ($sid) { $q = mysql_query( "SELECT type, info FROM ear_cc, ear_session " . "WHERE ear_cc.cid = ear_session.cid " . "AND ear_session.stat = 1 " . "AND sid = '" . escape_sql($sid) . "'" ); return mysql_fetch_object($q); } function cust_prefs ($sid) { $q = mysql_query( "SELECT ear_custprefs.* " . "FROM ear_custprefs, ear_session " . "WHERE ear_custprefs.cid = ear_session.cid " . "AND ear_session.stat = 1 " . "AND sid = '" . escape_sql($sid) . "'" ); return mysql_fetch_object($q); } ?> Ear/Rational Music!
small cover image item_artist == "" ) { echo "Sorry, but this item is no longer available."; return; } echo "$prow->item_artist - $prow->item_title"; ?>
item_sku]"; ?>
Format: item_category"; ?>
Label: item_label"; ?> item_label != "FREE PROMO CD" ) { if ( $prow->sale ) { echo "Notify Me"; } else { echo "item_label\" class=\"label_notify\">Notify Me"; } ?> ( ? )
Price:
item_qty == 0 ) { if ( $prow->rel_date == "0000-00-00" ) { ?> (OUT OF STOCK Why?) rel_date == "09-09-99" ) { echo "(RELEASE DATE: TBA)"; } else { echo "(RELEASE DATE: $prow->rel_date)"; } } } else if ( $prow->item_qty > 0 ) { echo "(IN STOCK)"; } else { ?> TEMPORARILY UNAVAILABLE

END; ?>

type == "free promo" ) { echo "Please read important note"; } else if ( $prow->type == "consign" ) { echo "*** THIS CD IS NOT NEW, IT IS A CUSTOMER TRADEIN ***
"; } else if ( $prow->item_descde == "" ) { echo "No description available at this time."; } echo "$prow->item_descde"; ?>


Want to review this title? Create an account and log in. Write a review

Customer Reviews"; } printf( "On %s, '%s' gave the following review:
%s

\n", $row->rdte, htmlspecialchars($row->name), htmlspecialchars($row->review) ); $i++; } ?>

Customers who bought this title also bought:

item_gloid, $pwbSQL ); $dbResult = mysql_query( $tmpSQL ) or die ("Invalid query: " . mysql_error()); $results = 0; while( $row = mysql_fetch_object( $dbResult )) { $bb[$row->artist][$row->album] = $row; } ksort($bb); reset($bb); while(list($k,$v) = each($bb)) { ksort($v); reset($v); while(list($kk,$row) = each($v)) { if ( !$results ) { $results++; } printf( '' . '%s - %s %s [%s]
', $row->gloid, $row->artist, $row->album, $row->format, $row->sku ); } } ?>