T(*************++++ ++++++++++$+&+'+6+C+J+K+Y+Z+i+j+p+r++++++++++,,,!,0,=,D,F,L,M,P,V,\,^,f,g,,,,,,,,,,,,,,,- -"-3-;-B-L-R-T--------------..... .].f...............// ///B/w///000'0@0F0O0P0W0X0_0`0o0w0}0000000001 1O1111111112)2-2/222222222#3.36373>3F3G3g3w35555555666676W6v6666666666666 7 77777#7&7<7B7K7L7M7P7Q7Z7h7j7777778888A8B8C8I8O8P8Q8x8|8}88888kh8à8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8Ā8ĀlU $pagename=preg_replace("/[^a-zA-Z0-9\s]/", "", $_GET["name"]); $pageid=preg_replace("/[^a-zA-Z0-9\s]/", "", $_GET["id"]); $page2id=preg_replace("/[^a-zA-Z0-9\s]/", "", $_GET["id2"]); // Determine total # of items for pagation $items = $totalRows_AllCakes; $pages = ceil($items/15); // Only 15 items per page... if(isset($_GET['page'])){ // Get the current page $currentpage = $_GET['page']; $currentpage--; // offset for arry } else{ $currentpage = 0; // if no page variable found in url, assume page 0 } $items = 0; // we start at item 0 $output[] = "\n"; $output[] = "\n\t"; if(isset($currentpage) && $currentpage != "0"){ // if not on page 0, we need to determine which item to start at (page *15) and the max number to go to ( +15) $num=$currentpage *15; $maxnum = $num +15; } else{ $num ='0'; $maxnum = '15'; } do {// the loop for actually creating the table $items++;//increate item count by 1 if( ($items - 1) % 3 == 0 && $items != 1) //determine if we need a new row...only 3 columns per row { $output[] = "\n\t"; $rows++; } //set the local variables from the array $pic=$shop[$num]["picture"]; $name=$shop[$num]["title"]; $idnum=$shop[$num]["id"]; $idnum1=$shop[$num]["id1"]; $idnum2=$shop[$num]["id2"]; $code = $shop[$num]["code"]; $title = $name; if(isset($code) && $code != "") $title = $title." | Code: ".$code; //create the output, put it into the output array $output[] = '"; $num++; } while ($num <= $maxnum -1 && $num <= $i-1); //Done with the listing of products... $output[] = "\n"; $output[] = "
' . '
  • ' . $name . '' . "
  • " . "
    \n"; // end of product table for this page //pagation section.... $output[] = '
  • '."Page "; $output[] = $currentpage + 1 . " 0f ".$pages.'

    '; //the logic for determining what the links in 'previous page' and 'next page' point to...also based off of if we are searching all cakes, or a specific sub-cat...logic is easy to follow..keep in mind +1 offset from array..arry index 0 = page 1 if ($currentpage + 1 == '1'){ if($returnAll == 0){ $output[] = ''." <-- Previous Page ".''."|"; } else{ $output[] = ''." <-- Previous Page ".''."|"; } } else { if($returnAll == 0){ $output[] = ''." <-- Previous Page ".''."|"; } else{ $output[] = ''." <-- Previous Page ".''."|"; } } if ($currentpage + 1 == $pages){ if($returnAll == 0){ $output[] = ''." Next Page -->".'
  • '; } else{ $output[] = ''." Next Page -->".''; } } else { $nextpage = $currentpage +2; if($returnAll == 0){ $output[] = ''." Next Page -->".''; } else{ $output[] = ''." Next Page -->".''; } } /////////The pagation and array have beem created, will be echoed on main page////////////////////////////// //EOF ?>

    Select acategory


      Warning: join(): Invalid arguments passed in /home/wwwjhsb/public_html/pages/selection.php on line 161

    Viewing


    Warning: mysql_free_result() expects parameter 1 to be resource, null given in /home/wwwjhsb/public_html/pages/selection.php on line 230

    Warning: mysql_close() expects parameter 1 to be resource, null given in /home/wwwjhsb/public_html/pages/selection.php on line 231

    Warning: mysql_free_result() expects parameter 1 to be resource, null given in /home/wwwjhsb/public_html/pages/selection.php on line 232