"; //echo "B=".$b."
"; $q_id = $b; $sqlg = "SELECT * FROM `quotes` WHERE `cat_url` = '$a' AND `id` = '$q_id' OR `sub_cat_url` = '$a' AND `id` = '$q_id'"; $resultg = mysql_query($sqlg) or die('Error, Quote table query failed ' . mysql_error()); $count_if_ext1 = mysql_num_rows($resultg); if($count_if_ext1 == '0') { header("Location: http://quotes.funmunch.com/404.html"); } $top = "SELECT * FROM `quotes` WHERE `id` = '$q_id' LIMIT 1"; $top_result = mysql_query($top) or die('Error, Select query failed of quotes table :' . mysql_error()); $count_if_ext = mysql_num_rows($top_result); if($count_if_ext == '0') { header("Location: http://www.funmunch.com/404.shtml"); } $top_row = mysql_fetch_array($top_result); $p_id = $top_row['id']; $c_url = $top_row['cat_url']; $s_url = $top_row['sub_cat_url']; $ss_url = $top_row['ss_cat_url']; $title_for_meta = $top_row['description']; $title_for_meta = str_replace("
", "
", $title_for_meta); $title_for_meta = str_replace("
", "
",$title_for_meta); $title_for_meta = explode("<", $title_for_meta); $title_for_meta = $title_for_meta[0]; $title_for_meta = explode(" ", $title_for_meta); $title_for_meta = "$title_for_meta[0] $title_for_meta[1] $title_for_meta[2] $title_for_meta[3] $title_for_meta[4] $title_for_meta[5]..."; $from_gid = $top_row['id']; if($ss_url != '') { $p_url = 'http://quotes.funmunch.com/'.$ss_url.'-quote-'.$p_id.'.html'; $chk_cat_url = $top_row['ss_cat_name']; $cat_name = $top_row['ss_cat_name']; } elseif(($s_url != '') && ($ss_url == '')) { $p_url = 'http://quotes.funmunch.com/'.$s_url.'-quote-'.$p_id.'.html'; $chk_cat_url = $top_row['sub_cat_url']; $cat_name = $top_row['sub_cat_name']; } else { $p_url = 'http://quotes.funmunch.com/'.$c_url.'-quote-'.$p_id.'.html'; $chk_cat_url = $top_row['cat_url']; $cat_name = $top_row['cat_name']; } $q_description = str_replace("
", "", $top_row['description']); $q_description = str_replace("
", "",$q_description); $q_description = str_replace('"', "'",$q_description); $q_description = str_replace('\"', "'",$q_description); $q_description = str_replace("\'", "'",$q_description); //echo "Desc : $q_description
"; $expected_url = "http://quotes.funmunch.com/$chk_cat_url-quote-$p_id.html"; $url_path_get = "http://".$_SERVER['HTTP_HOST']."/$_REQUEST[cat]-quote-$_REQUEST[id].html"; if($expected_url != $url_path_get){ header("Location: http://www.funmunch.com/404.shtml"); } //echo "ELK = ".$expected_url."
"; //echo "LK = ".$url_path_get."
"; //Connect to main database include 'opendb-main.php'; $queryu = "SELECT * FROM `users` WHERE `username` = '$username'"; $resultu = mysql_query($queryu) or die('Error, Select query failed of users table :'); $rowu = mysql_fetch_array($resultu); $user_id = $rowu['id']; $pts = $rowu['pts']; if(isset($_SESSION['userpts'.$from_gid])) {}else{ $ptsc = $pts + 2; $tquery = "UPDATE `users` SET `pts` = '$ptsc' WHERE `username` = '$username'"; $tresult = mysql_query($tquery) or die('Error, query failed ' . mysql_error()); } $_SESSION['userpts'.$from_gid] = 'pt'.$from_gid; include 'opendb.php'; ?> <?=$title_for_meta;?>
", "
", $top_row['description']); $p_description = str_replace("
", "
",$top_row['description']); $p_description = str_replace('\"', '"',$p_description); $p_description = str_replace('\"', "'",$p_description); $p_description = str_replace("\'", "'",$p_description); $p_publisher = $top_row['publisher']; $p_views = $top_row['views']; $p_voteup = $top_row['voteup']; $p_votedown = $top_row['votedown']; $p_ratings = $top_row['ratings']; $v = $p_views + 1; $n_views = mysql_query("UPDATE quotes SET views='$v' WHERE id='$q_id'"); if($ss_url != '') { $p_url = 'http://quotes.funmunch.com/'.$ss_url.'-quote-'.$p_id.'.html'; $cat_url = 'http://quotes.funmunch.com/'.$ss_url.'/'; $cat_name = $top_row['ss_cat_name']; } elseif(($s_url != '') && ($ss_url == '')) { $p_url = 'http://quotes.funmunch.com/'.$s_url.'-quote-'.$p_id.'.html'; $cat_url = 'http://quotes.funmunch.com/'.$s_url.'/'; $cat_name = $top_row['sub_cat_name']; } else { //$sqlcat = "SELECT `sub` FROM `quotes_main_categories` WHERE `cat_url` = '$c_url'"; //$resultcat = mysql_query($sqlcat) or die('Error, Query failed of category table:' . mysql_error()); //$rowcat = mysql_fetch_array($resultcat); //$sub = $rowcat['sub']; //if($sub == "no"){ $p_url = 'http://quotes.funmunch.com/'.$c_url.'-quote-'.$p_id.'.html'; $cat_url = 'http://quotes.funmunch.com/'.$c_url.'/'; //}else{ //$p_url = 'http://quotes.funmunch.com/'.$c_url.'-quote-'.$p_id.'.html'; //$cat_url = 'http://quotes.funmunch.com/quotes-'.$c_url.'.html'; //} $cat_name = $top_row['cat_name']; } $s++; $xs = $s%2; if($xs ==0) { $colors = "F3FAFC"; } else { $colors = "f9f9f9"; } //} ?>

Quotes

    

      ",$p_description); $title_fav0 = $wordChunks[0]; $title_fav = $title_fav0; $wordChunks_n = explode(" ",$title_fav); $new_title = "$wordChunks_n[0] $wordChunks_n[1] $wordChunks_n[2] $wordChunks_n[3] $wordChunks_n[4]"; $title_fav = $new_title; $s="SELECT * FROM `user_fav` WHERE `username` = '$username' AND `fav_id` = '$p_id' AND `f_cod` = '$cod'"; $r = mysql_query($s) or die('Error, Query failed : ' . mysql_error()); if(mysql_num_rows($r) == 0){ if($_COOKIE['user_valid'] !=''){ ?>
Quote Details
Category :   Quotes : Quotes : Quotes Quotes : Quotes Quotes
Views :  
Share this quote
Quotes Rating
Do you like this quote?
 
 
0){ ?>
Fans
",$p_description); $title_fav0 = $wordChunks[0]; $title_fav = $title_fav0; $wordChunks_n = explode(" ",$title_fav); $new_title = "$wordChunks_n[0] $wordChunks_n[1] $wordChunks_n[2] $wordChunks_n[3] $wordChunks_n[4]"; $title_fav = $new_title; $fans="SELECT * FROM `user_fav` WHERE `fav_id` = '$q_id' AND `f_cod` = '$cod' ORDER BY rand() LIMIT 0,6"; $res_fans = mysql_query($fans) or die('Error, Query failed : ' . mysql_error()); if(mysql_num_rows($res_fans) != 0){ while($row_f = mysql_fetch_array($res_fans)){ $un_f = $row_f[username]; $uid_f = $row_f[user_id]; //Connect to main database include 'opendb-main.php'; $queryu_f = "SELECT * FROM `users` WHERE `id` = '$uid_f' LIMIT 0,1"; $result_f = mysql_query($queryu_f) or die('Error, query failed'); $row_f = mysql_fetch_array($result_f); $image_fan = $row_f['avatar']; $name_fan = $row_f['name']; //Connect to sub-domain database include 'opendb.php'; ?> No fans yet...
Comments
Funmunch.com
No comments yet. Comment about this poem & share your comments with other users who browse this poem. So be the first one...
Comments
( ,)
"; //echo "SES = ".$_SESSION['quote_com_post'.$p_id]."
"; if($_SESSION['quote_com_post'.$p_id] != '') { ?>
Add your comment here

You are not signed in. Sign up or sign in to comment with a username.

Your Name:


Your Email:


Your Comment: [500 Words Limit]



Type security code here: