"; //echo "W = $w
"; $w = (($w*20)-20); $st = $w; $pr = $_REQUEST['pr']; if((!$st || ($st < 0))) $st = 0; if(!$pr) $pr = 20; $slr = round($st/$pr, 0)+2; $next = $st+$pr; if($st <= $pr) { $back = 0; }else{ $back = $st-$pr; } if($_REQUEST['w'] > '0') { $meta_title_end = " - page $_REQUEST[w]"; } $val = str_replace("_", " ", $get_cat); $val = str_replace("-", " ", $val); $quaryc = "SELECT * FROM `ecard_category` WHERE `cat_url` = '$get_cat'"; $resultc = mysql_query($quaryc) or die('Error, query failed1 ' . mysql_error()); $count_f = mysql_num_rows($resultc); if($count_f == '0'){ $lnk = "http://ecards.greet2k.com/"; header("HTTP/1.1 301 Moved Permanently"); header("Location: $lnk"); }else{ $rowc = mysql_fetch_array($resultc); $mtf_cat_name = $rowc[cat_name]; $cat_id = $rowc[id]; $parent_id = $rowc[parent_id]; $path = $rowc[path]; $path_name = $rowc[path_name]; $wall_cat_name = $rowc[cat_name]; $cat_text = $rowc[cat_text]; $str1 = str_replace("\'", "'", $cat_text); $cat_text = str_replace('\"', '"', $str1); $cat_description = $rowc[description]; $str1 = str_replace("\'", "'", $cat_description); $cat_description = str_replace('\"', '"', $str1); //FOR META TAG $page_title = $rowc[page_title]; $str1 = str_replace("\'", "'", $page_title); $page_title = str_replace('\"', '"', $str1); $meta_desc = $rowc[meta_desc]; $str1 = str_replace("\'", "'", $meta_desc); $meta_desc = str_replace('\"', '"', $str1); $keywords = $rowc[keywords]; $str1 = str_replace("\'", "'", $keywords); $keywords = str_replace('\"', '"', $str1); if($parent_id == '0') { $check_cat_id = $rowc[id]; } else { $quarycs = "SELECT * FROM `ecard_category` WHERE `id` = '$parent_id'"; $resultcs = mysql_query($quarycs) or die('Error, query failed1 ' . mysql_error()); $rowcs = mysql_fetch_array($resultcs); $cat_ids = $rowcs[id]; $parent_ids = $rowcs[parent_id]; $check_cat_id = $rowcs[id]; } $greet2k_top_heading = $_REQUEST['cat'].' Ecards'; $quary_count = "SELECT * FROM `ecard_gallery` WHERE `cat_id` = '$cat_id' AND `status` = '0' OR `additional_cat_id` = '$cat_id' AND `status` = '0' OR `additional_cat_id1` = '$cat_id' AND `status` = '0' OR `additional_cat_id2` = '$cat_id' AND `status` = '0' OR `additional_cat_id3` = '$cat_id' AND `status` = '0' OR `additional_cat_id4` = '$cat_id' AND `status` = '0' ORDER BY `to_add` DESC LIMIT 0,1"; $result_count = mysql_query($quary_count) or die('Error, query failed1 ' . mysql_error()); $ex_count = mysql_num_rows($result_count); ?> <?=$mtf_cat_name;?> Greeting Cards, Ecards, Animated Cards<?=$meta_title_end;?> <?=$page_title;?><?=$meta_title_end;?> "; } ?>