% include "http://www.indiangarment.com/myshop/htmltop.htm"; %> <% require "../dbConsts.php3"; %> <% require "../variables.php3"; %>
| |||
|
<% $TotalPages = 0; $TotalRecords = 0; $myfile1 = file("Sareeandblouses.cgi"); for($increment = 0 ; $increment < count($myfile1) ; ++$increment ) { $TotalRecords = $TotalRecords + 1 ; } $TotalRecords = $TotalRecords - 1 ; $TotalPages = (($TotalRecords % 5 ) > 0) ? intval($TotalRecords / 5 ) + 1 : intval($TotalRecords / 5 ); %> Top <% echo $TotalRecords; %> results <% if($bool != "false") { $no = 0; } $StartItemNo = $no * 5 + 1; $LastItemNo = $StartItemNo + 5 ; $myfile = file("Sareeandblouses.cgi"); for( $gop = 0 ; $gop < count($myfile) ; ++$gop ) { $item = $myfile[$gop]; $item_id = explode("|" , $item ); $item_id1 = ereg_replace("\n" , "" , $item_id[1]); $item_id1 = ereg_replace(" " , "" , $item_id1); if( ($gop >= $StartItemNo ) && ( $gop < $LastItemNo )) { $sql = "SELECT * FROM items WHERE item_id = '$item_id1'"; $rs = mysql_db_query($DB_NAME, $sql, $connection); /////////////// $sql1 = "SELECT section_id FROM items WHERE item_id = '$item_id1'"; $rs1 = mysql_db_query($DB_NAME, $sql1, $connection); $rec1 = mysql_fetch_array($rs1); $si = $rec1["section_id"]; $sql2 = "SELECT section_title FROM sections WHERE section_id = '$si'"; $rs2 = mysql_db_query($DB_NAME, $sql2, $connection); $rec3 = mysql_fetch_array($rs2); $sn = $rec3["section_title"]; $sql3 = "SELECT category_id FROM items WHERE item_id = '$item_id1'"; $rs3 = mysql_db_query($DB_NAME, $sql3, $connection); $rec3 = mysql_fetch_array($rs3); $category_id = $rec3["category_id"]; $sql4 = "SELECT category_title FROM categories WHERE category_id = '$category_id'"; $rs4 = mysql_db_query($DB_NAME, $sql4, $connection); $rec4 = mysql_fetch_array($rs4); $CategoryTitle = $rec4["category_title"]; //////////////// while($rec = mysql_fetch_array($rs)) { %> <% // } } } } %> | |||