"; include 'opendb.php'; //$cat = str_replace("-", "_", $_REQUEST['cat']); $cat = $_REQUEST['cat']; //echo "CAT = $cat
"; $w = $_REQUEST['w']; $w = (($w*10)-10); $st = $w; $pr = $_REQUEST['pr']; if((!$st || ($st < 0))) $st = 0; if(!$pr) $pr = 10; $slr = round($st/$pr, 0)+2; $next = $st+$pr; if($st <= $pr) { $back = 0; }else{ $back = $st-$pr; } $val = str_replace("_", " ", $cat); $val = str_replace("-", " ", $val); $path = 'http://quotes.wishbowl.org/'.$_REQUEST[cat].'-quotes'; $sqlch = "SELECT * FROM `quotes_main_categories` WHERE `cat_url` = '$cat'"; $resultch = mysql_query($sqlch) or die('Error, query failed ' . mysql_error()); $count_if_ext = mysql_num_rows($resultch); if($count_if_ext != '0') { $cat_url = $cat; $rowch = mysql_fetch_array($resultch); $category_name = $rowch['cat_name']; $q_cat_url = $rowch['cat_url']; $head_title = $rowch['cat_name']; $title = $rowch['cat_title']; $keywords = $rowch['cat_keywords']; $description = $rowch['cat_description']; $inccat = 1; if($_REQUEST['w'] > '0') { $ww = $w+1; $meta_title_end = " - page $_REQUEST[w]"; } } else { $sqlcdb = "SELECT * FROM `quotes_categories` WHERE `sub_cat_url` = '$cat' AND `sub` = 'no'"; $resultcdb = mysql_query($sqlcdb) or die('Error, query failed ' . mysql_error()); $count_if_exist = mysql_num_rows($resultcdb); if($count_if_exist != '0') { $rowcdb = mysql_fetch_array($resultcdb); $catnamedb = $rowcdb['cat_name']; $subcatnamedb = $rowcdb['sub_cat_name']; $sub_cat_url = $rowcdb['sub_cat_url']; $head_title = $rowcdb['sub_cat_name']; $cat_url = $rowcdb['cat_url']; $q_cat_url = $rowcdb['cat_url']; $title = $rowcdb['sub_cat_title']; $keywords = $rowcdb['sub_cat_keywords']; $description = $rowcdb['sub_cat_description']; $inccat = 1; if($_REQUEST['w'] > '0') { $meta_title_end = " - page $_REQUEST[w]"; } } else { $sql_q = "SELECT * FROM `quotes_sub_categories` WHERE `ss_cat_url` = '$cat'"; $result_q = mysql_query($sql_q) or die('Error, query failed ' . mysql_error()); $count_ext = mysql_num_rows($result_q); if($count_ext != '0') { $dlist = mysql_fetch_array($result_q); $cat_name = $dlist['cat_name']; $cat_url = $dlist['cat_url']; $sub_cat_name = $dlist['sub_cat_name']; $sub_cat_url = $dlist['sub_cat_url']; $ss_cat_name = $dlist['ss_cat_name']; $ss_cat_url = $dlist['ss_cat_url']; $head_title = $dlist['ss_cat_name']; $title = $dlist['ss_cat_title']; $keywords = $dlist['ss_cat_keywords']; $description = $dlist['ss_cat_description']; $inccat = 0; if($_REQUEST['w'] > '0') { $meta_title_end = " - page $_REQUEST[w]"; } } else { $sqlcdb = "SELECT * FROM `quotes_sub_categories` WHERE `sub_cat_url` = '$cat'"; $resultcdb = mysql_query($sqlcdb) or die('Error, query failed ' . mysql_error()); $count_if_exist = mysql_num_rows($resultcdb); if($count_if_exist == '0') { header("Location: http://quotes.wishbowl.org/404.html"); } else { $rowcdb = mysql_fetch_array($resultcdb); $cat_name = $rowcdb['cat_name']; $cat_url = $rowcdb['cat_url']; $sub_cat_name = $rowcdb['sub_cat_name']; $sub_cat_url = $rowcdb['sub_cat_url']; $ss_cat_name = $rowcdb['ss_cat_name']; $ss_cat_url = $rowcdb['ss_cat_url']; $head_title = $rowcdb['sub_cat_name']; $title = $rowcdb['ss_cat_title']; $keywords = $rowcdb['ss_cat_keywords']; $description = $rowcdb['ss_cat_description']; $sqlsub = "SELECT * FROM `quotes_categories` WHERE `sub_cat_url` = '$cat'"; $resultsub = mysql_query($sqlsub ) or die('Error, query failed ' . mysql_error()); $rowsub = mysql_fetch_array($resultsub); $subch = $rowsub['sub']; $inccat = 1; if($_REQUEST['w'] > '0') { $meta_title_end = " - page $_REQUEST[w]"; } } } } } ?> <?=$head_title;?> quotes, <?=$head_title;?> quotations, <?=$head_title;?> sayings<?=$meta_title_end;?> <?=$title;?><?=$meta_title_end;?>