n"; // exit; // } //ob_start(); // Start the output buffer $sortby = $_SERVER['QUERY_STRING']; $set = ''; if ($sortby == '') { $sortby = 'description'; $set = 'y'; } if ($set == '') { echo 'The variable at the end of the web address did not match one required by the code. Please check the web address for errors.'; exit; } //$search = $_POST['search']; $search = 'mbc_page1'; //$search = '"milk bottle cap"'; //$search = 'Wallace Kennedy'; //$search = '(zpotbut) AND FDR'; $search = str_replace('|','',$search); //remove pipe delimiter as database uses it $search = str_replace('\"','"',$search); //fix difference between PHP4 and 5! $search = strip_tags($search); //remove HTML tags //remove spaces before or after a word: $search = rtrim($search); $search = ltrim($search); //MY VARIABLES //Also change search string above, and sorting at top. //General Titles $change = 'Milk Bottle Caps / Tops And Milk Bottle Cap Sets'; //Search Gallery Variables $change1 = 'Milk Bottle Cap'; $searchvalue = 'milk bottle cap'; $datafile = '/home/seocom5/public_html/postcard/000000data.txt'; //Browsing Table Key $change2 = 'Milk Bottle Cap'; //Replace Quote Marks With " $wikibio = 'Bottle cap

Bottle caps are a type of closure used to seal the openings of bottles of many types. They can be small circular pieces of metal, usually steel, with plastic backings, and for plastic bottles a plastic cap is used instead. A bottle cap is typically colorfully decorated with the logo of the brand of beverage. Caps can also be plastic, sometimes with a pour spout. Flip-Top caps like Flapper closures provide controlled dispensing of dry products. Bottle caps for plastic bottles are often made of a different type of plastic than the bottle.

Bottle caps were originally designed to be pressed over and around the top of a glass bottle to grab a small flange on the bottleneck.

The first milk-bottle-capping machine was designed, built, and overall invented by a Polish man named Menachem Wallach.

Milk bottle top

A milk bottle top is a lid to a milk bottle. They are usually colour-coded to show the consumer the different varieties of milk, especially the flavour or fat content. This colour-coding tends to vary between, but is usually consistent within, countries.'; //END MY VARIABLES //remove multiple spaces: while ((substr_count($search,' ') >= 1)) { //echo substr_count($search,' '); //echo '

'.$search.'
'; $search = str_replace(' ',' ',$search); } //remove multiple speech marks: while ((substr_count($search,'""') >= 1)) { $search = str_replace('""','"',$search); } //define globals so they can be returned by functions //$GLOBALS['highlight1'] = ''; //$GLOBALS['highlight2'] = ''; $GLOBALS['result'] = ''; //rem out two globals above to turn off highlighting function debug($lineno) { echo 'PHP line no: '.$lineno.''; } function test($variable,$lineno) { echo '

PHP line no: '.$lineno.' TEST VARIABLE = '.$variable.'

'; } function highlight($colloop,$thefield,$thesearch) { $fieldlength = strlen($thefield); $searchlength = strlen($thesearch); $pos = strpos($thefield, $thesearch); $stringend = $searchlength + $pos; $slice1 = substr($colloop, 0, $pos); $slice2 = substr($colloop, $pos, $searchlength); $slice3 = substr($colloop, $stringend); $GLOBALS['result'] = $slice1.$GLOBALS['highlight1'].$slice2.$GLOBALS['highlight2'].$slice3; //rebuild text with highlight // echo '
'.$GLOBALS['result']; } //CHANGE $title = 'Seocom - Select Vintage '.$change.' Items For Sale'; echo << $title Seocom - Select Vintage $change Items For Sale
Seocom Enterprises Unlimited LLC
Stan Olszewski, Byram, Connecticut - Contact Me
HTML; include("/home/seocom5/public_html/postcard/menu1/menu12.html"); echo <<
Select Vintage $change Items & Ephemera For Sale

Remember When The Milkman Used To Come Around Early In The Morning And Delivered Milk in Glass Bottles Right To Your Door?

Many more dairy related items and ephemera (non-milk bottle caps) available at my new dairy related ephemera page located Here

Coming Soon - Several Milk Bottle Listings Will Be Added Shortly

$wikibio

(From Wikipedia, the free encyclopedia)


$change Related Links:


3 G's Milk Bottles - with 3,000 Milk Bottles for Sale



John Smith's Milk Bottle Filler Beads for Sale


The National Association Of Milk Bottle Collectors, Inc.


Early Canadian Bottle Works - Milk & Other Bottle Info Plus Free Ad Listings

Searchable Picture Gallery Of All $change1 Items In Stock
Enter Any Search Term In The Field Below (To See All, Just Leave Blank) And Click Search
      
HTML; if (($search == '') or ($search == '"')) {exit('No usable search string found!');} $fp = fopen($datafile,'r'); if (!$fp) {exit('

ERROR: Unable to open database file!

');} $row = 0; //ORG //while (!feof($fp)) { // $line = fgets($fp,2048); //use 1024 for short lines - 2048 if very long lines // $temp[$row] = explode('|', $line); // if ($sortby == 'firstname') {$sortkey = strtolower($temp[$row][0]);} // if ($sortby == 'writer') {$sortkey = strtolower($temp[$row][1]);} // if ($sortby == 'director') {$sortkey = strtolower($temp[$row][2]);} // if ($sortby == 'producer') {$sortkey = strtolower($temp[$row][3]);} // if ($sortby == 'aired') {$sortkey = strtolower($temp[$row][4]);} // array_unshift($temp[$row], $sortkey); //add sortkey to start of array // $col[$row] = $sortkey.'|'.$temp[$row][1].'|'.$temp[$row][2].'|'.$temp[$row][3].'|'.$temp[$row][4].'|'.$temp[$row][5]; // $row++; //} while (!feof($fp)) { $line = fgets($fp,2048); //use 1024 for short lines - 2048 if very long lines $temp[$row] = explode('|', $line); if ($sortby == 'seq') {$sortkey = strtolower($temp[$row][0]);} if ($sortby == 'codeOZ') {$sortkey = strtolower($temp[$row][1]);} if ($sortby == 'code') {$sortkey = strtolower($temp[$row][2]);} if ($sortby == 'description') {$sortkey = strtolower($temp[$row][3]);} if ($sortby == 'condition') {$sortkey = strtolower($temp[$row][4]);} if ($sortby == 'notes') {$sortkey = strtolower($temp[$row][5]);} if ($sortby == 'tmb') {$sortkey = strtolower($temp[$row][6]);} if ($sortby == 'view') {$sortkey = strtolower($temp[$row][7]);} if ($sortby == 'price') {$sortkey = strtolower($temp[$row][8]);} if ($sortby == 'buy') {$sortkey = strtolower($temp[$row][9]);} if ($sortby == 'keyword') {$sortkey = strtolower($temp[$row][10]);} if ($sortby == 'quantity') {$sortkey = strtolower($temp[$row][11]);} if ($sortby == 'Extra') {$sortkey = strtolower($temp[$row][12]);} if ($sortby == 'Available') {$sortkey = strtolower($temp[$row][13]);} if ($sortby == 'ORD') {$sortkey = strtolower($temp[$row][14]);} if ($sortby == 'state') {$sortkey = strtolower($temp[$row][15]);} if ($sortby == 'code1sort') {$sortkey = strtolower($temp[$row][16]);} if ($sortby == 'code2sort') {$sortkey = strtolower($temp[$row][17]);} array_unshift($temp[$row], $sortkey); //add sortkey to start of array $col[$row] = $sortkey.'|'.$temp[$row][1].'|'.$temp[$row][2].'|'.$temp[$row][3].'|'.$temp[$row][4].'|'.$temp[$row][5].'|'.$temp[$row][6].'|'.$temp[$row][7].'|'.$temp[$row][8].'|'.$temp[$row][9].'|'.$temp[$row][10].'|'.$temp[$row][11].'|'.$temp[$row][12].'|'.$temp[$row][13].'|'.$temp[$row][14].'|'.$temp[$row][15].'|'.$temp[$row][22].'|'.$temp[$row][23]; $row++; } fclose($fp); sort($col); reset($col); /* echo '
';
print_r($col);
exit;
*/

$arrays = count($col) - 1;

$tablecells = '';
$loop = -1;
$and = $once = $found = $found1 = $found2 = $bothfound = $search2also = 'no';
$count = 0;
$speechmarks = '';

//test for AND but not two words that must be together (""):
if ((strstr($search,' AND ')) and ($search[0] <> '"')) {
  $and = 'yes';
  list ($word1, $word2, $word3) = explode (' ', $search); //remove AND
  $word1 = strtolower($word1);
  $word3 = strtolower($word3);
  if ($word1 == $word3) {
    $search = $word1;
    $and = 'no';
  } else {
      $search1 = $word1;
      $search2 = $word3;
      while ($loop < $arrays) {
      $loop++;
      $field = strtolower($col[$loop]);
      if ((strstr($field,$search1)) and (strstr($field,$search2))) {
        $found = $found1 = $found2 = $bothfound = 'yes';
        //word1
        highlight($col[$loop],$field,$search1);
        $col[$loop] = $GLOBALS['result'];
        //word2
        $field = strtolower($col[$loop]); //update field to include highlighted version from above
        highlight($col[$loop],$field,$search2);
        //add rows
        $col[$loop] = explode('|',$GLOBALS['result']);
	//$col[$loop][66] = substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('='));		
//$col[$loop][66] = substr($col[$loop][7], 0, (stripos($col[$loop][7], "=")+1));
	//$col[$loop][89] = trim($col[$col[$loop][66]], "'");

		//substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('='));
	//$col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'");


$findme   = '=';
$pos = strpos($col[$loop][7], $findme);

// Note our use of ===.  Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
    $col[$loop][66] = trim($col[$loop][7], "'");
} else {
    $col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'");
}

	//$col[$loop][66] = trim($col[$loop][7], "'");
        $tablecells.='




'.$col[$loop][3].'
'.$col[$loop][4].' '.$col[$loop][5].'
'.$col[$loop][6].'
Keywords:
'.$col[$loop][11].'
CLICK_HERE To_View Full_Size_Image

Thumbnail_Loading

Price: $'.$col[$loop][9].'
'.$col[$loop][14].' Available
(Subject To Any Prior Or Pending Sales)

Check out now
'; $count++; } } } } if (($and == 'no') and ($bothfound == 'no')) { $search = strtolower($search); $search1 = $search2 = ''; if (strstr($search,' ')) { list ($search1, $search2) = explode (' ', $search); if ($search2 == $search1) {//when both words are the same $search = $search1; //make search just first word $search1 = $search2 = ''; //destroy both words from split } } //test for space in search but not two words that must be together (""): if ((strstr($search,' ')) and ($search[0] <> '"')) { list ($search1, $search2) = explode (' ', $search); //search for two separate words while ($loop < $arrays) { $loop++; $search2also = 'no'; $field = strtolower($col[$loop]); $fieldkept = $field; //preserve text without web code if (strstr($field,$search1)) { if (strstr($field,$search2)) {$search2also = $bothfound = 'yes';} $found = $found1 = 'yes'; highlight($col[$loop],$field,$search1); $col[$loop] = $GLOBALS['result']; if ($search2also <> 'yes') { //only output once when both words on same row //add rows $col[$loop] = explode('|',$GLOBALS['result']); //$col[$loop][66] = substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')); //$col[$loop][66] = substr($col[$loop][7], 0, (stripos($col[$loop][7], "=")+1)); //$col[$loop][89] = trim($col[$col[$loop][66]], "'"); //substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')); //$col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'"); $findme = '='; $pos = strpos($col[$loop][7], $findme); // Note our use of ===. Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if ($pos === false) { $col[$loop][66] = trim($col[$loop][7], "'"); } else { $col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'"); } //$col[$loop][66] = trim($col[$loop][7], "'"); $tablecells.='
'.$col[$loop][3].'
'.$col[$loop][4].' '.$col[$loop][5].'
'.$col[$loop][6].'
Keywords:
'.$col[$loop][11].'
CLICK_HERE To_View Full_Size_Image

Price: $'.$col[$loop][9].'
'.$col[$loop][14].' Available
(Subject To Any Prior Or Pending Sales)

Check out now
'; $count++; } } } } else { //check if speech marks and remove them: if ($search[0] == '"') { $search = str_replace('"','',$search); $speechmarks = '\''; //for output later } if ($search <> '') { //do normal search while ($loop < $arrays) { $loop++; $field = strtolower($col[$loop]); if (strstr($field,$search)) { $found = $found1 = 'yes'; highlight($col[$loop],$field,$search); //add rows $col[$loop] = explode('|',$GLOBALS['result']); //$col[$loop][66] = substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')); //$col[$loop][66] = substr($col[$loop][7], 0, (stripos($col[$loop][7], "=")+1)); //$col[$loop][89] = trim($col[$col[$loop][66]], "'"); //substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')); //$col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'"); $findme = '='; $pos = strpos($col[$loop][7], $findme); // Note our use of ===. Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if ($pos === false) { $col[$loop][66] = trim($col[$loop][7], "'"); } else { $col[$loop][66] = trim(substr($col[$loop][7], strripos($col[$loop][7],'=')+strlen('=')), "'"); } //$col[$loop][66] = trim($col[$loop][7], "'"); $tablecells.='
'.$col[$loop][3].'
'.$col[$loop][4].' '.$col[$loop][5].'
'.$col[$loop][6].'
Keywords:
'.$col[$loop][11].'
CLICK_HERE To_View Full_Size_Image

Thumbnail_Loading

Price: $'.$col[$loop][9].'
'.$col[$loop][14].' Available
(Subject To Any Prior Or Pending Sales)

Check out now
'; $count++; } } } else {exit('No usable search string found!');} } } //if ($and == 'no') //ORG //echo '

Your search for \''.$speechmarks.$search.$speechmarks.'\' was found in the following '.$count.' lines of the database:

(FROM TWO LINES DOWN) //CHANGE if ($found == 'yes') { echo '
Browsing table of '.$count.' '.$change2.' Items
This table is sortable, just click on any heading.
'.$tablecells.'
Code Description Condition Notes View Buy
'; } else { echo '

Your search for \''.$speechmarks.$search.$speechmarks.'\' was not found.

'; } echo ' '; include("/home/seocom5/public_html/postcard/footersales.html"); echo'
'; echo date('F d Y H:i:s'); // Cache the output to a file //$fp = fopen($cachefile, 'w'); //fwrite($fp, ob_get_contents()); //fclose($fp); //ob_end_flush(); // Send the output to the browser ?>