'; //echo $b.'
'; //echo $c.'
'; $date = date("d/m/Y"); $poem_id = $b; $c = str_replace("-", " ", $_REQUEST['tit']); $sqlg = "SELECT * FROM `poems` WHERE `cat_url` = '$a' AND `id` = '$poem_id' AND `title` = '$c' OR `sub_cat_url` = '$a' AND `id` = '$poem_id' AND `title` = '$c' OR `ss_cat_url` = '$a' AND `id` = '$poem_id' AND `title` = '$c'"; $resultg = mysql_query($sqlg) or die('Error, Poems table query failed ' . mysql_error()); $count_if_ext1 = mysql_num_rows($resultg); $cid = $poem_id; $from_gid = $poem_id; $top = "SELECT * FROM `poems` WHERE `id` = '$poem_id' LIMIT 1"; $top_result = mysql_query($top) or die('Error, Select query failed of poem table ' . mysql_error()); $count_if_ext = mysql_num_rows($top_result); if(($count_if_ext1 == '0') || ($count_if_ext == '0')) { header('HTTP/1.1 404 Not Found'); include '404.html'; } else { $top_row = mysql_fetch_array($top_result); $c_url = str_replace("_", "-", $top_row['cat_url']); $s_url = str_replace("_", "-", $top_row['sub_cat_url']); $ss_url = str_replace("_", "-", $top_row['ss_cat_url']); $p_id = $top_row['id']; $p_title = $top_row['title']; $p_title_path = str_replace(" ", "-", $top_row['title']); $p_title_path = str_replace("'", "", $p_title_path); $p_title_path = str_replace('"', '', $p_title_path); $p_title_path = strtolower($p_title_path); $p_description = str_replace("
", "
", $top_row['description']); $p_description = str_replace("
", "
",$top_row['description']); $p_publisher = $top_row['publisher']; $submited = $top_row['submited']; $title_for_meta_strl = strtolower($p_description); $title_for_meta = str_replace("
", "
", $title_for_meta_strl); $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[1] $title_for_meta[2] $title_for_meta[3] $title_for_meta[4] $title_for_meta[5]"; $c_name = $top_row['cat_name']; $s_name = $top_row['sub_cat_name']; $ss_name = $top_row['ss_cat_name']; $cat_name = $top_row['cat_name']; $sub_cat_name = $top_row['sub_cat_name']; $ss_cat_name = $top_row['ss_cat_name']; $cat_url_c = $c_url; $cat_url = $c_url; $sub_cat_url = $top_row['sub_cat_url']; $added = $top_row['added']; $ratings = $top_row['ratings']; $views = $top_row['views']; $v_up = $top_row['voteup']; $ratings = $top_row['ratings']; $q_votes = $top_row['voteup'] + $top_row['votedown']; $v = $views + 1; //$v++; $n_views = mysql_query("UPDATE poems SET views='$v' WHERE id='$p_id'"); //$queryu = "SELECT * FROM `users` WHERE `username` = '$username'"; //$resultu = mysql_query($queryu) or die('Error, query failed'); //$rowu = mysql_fetch_array($resultu); //$user_id = $rowu['id']; $pts = $rowu['pts']; //$ptsc = $pts+$cx; //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; if($ss_url != '') { $sm = 1; $sub_ch = $ss_url; $p_url = '/'.$ss_url.'/'.$p_title_path.'-'.$p_id.'/'; $n_url = '/'.$ss_url.'/'; $np = "`cat_url` = '$c_url' AND `sub_cat_url` = '$s_url' AND `ss_cat_url` = '$ss_url'"; $mt_cat_name = $ss_cat_name; $chk_cat_url = $top_row['ss_cat_url']; $cat_name = $top_row['ss_cat_name']; } elseif(($s_url != '') && ($ss_url == '')) { $sm = 2; $s_ch = 1; $p_url = '/'.$s_url.'/'.$p_title_path.'-'.$p_id.'/'; $n_url = '/'.$s_url.'/'; $np = "`cat_url` = '$c_url' AND `sub_cat_url` = '$s_url'"; $mt_cat_name = $sub_cat_name; $chk_cat_url = $top_row['sub_cat_url']; $cat_name = $top_row['sub_cat_name']; } else { $sm = 3; $p_url = '/'.$c_url.'/'.$p_title_path.'-'.$p_id.'/'; $n_url = '/'.$c_url.'/'; $np = "`cat_url` = '$c_url'"; $mt_cat_name = $cat_name; $chk_cat_url = $top_row['cat_url']; $cat_name = $top_row['cat_name']; } $comid = 'poem_'.$p_id; $pm = 'poem_'.$p_id; $nxt = "SELECT * FROM `poems` WHERE `id` > '$cid' AND $np ORDER BY `id` ASC LIMIT 0,1"; $r_nxt = mysql_query($nxt) or die('Error, query failed ' . mysql_error()); if (mysql_num_rows($r_nxt) == 0) { $nxtr = $n_url; }else { while($row_next = mysql_fetch_array($r_nxt)) { $p_title_path = str_replace(" ", "-", $row_next['title']); $p_title_path = str_replace("'", "", $p_title_path); $p_title_path = str_replace('"', '', $p_title_path); $p_title_path = strtolower($p_title_path); $nxtr = '/'.$chk_cat_url.'/'.$p_title_path.'-'.$row_next[id].'/'; } } $pre = "SELECT * FROM `poems` WHERE `id` < '$cid' AND $np ORDER BY `id` DESC LIMIT 0,1"; $r_pre = mysql_query($pre) or die('Error, query failed ' . mysql_error()); if (mysql_num_rows($r_pre) == 0) { $prer = $n_url; }else { while($row_pre = mysql_fetch_array($r_pre)) { $p_title_path1 = str_replace(" ", "-", $row_pre['title']); $p_title_path1 = str_replace("'", "", $p_title_path1); $p_title_path1 = str_replace('"', '', $p_title_path1); $p_title_path1 = strtolower($p_title_path1); $prer = '/'.$chk_cat_url.'/'.$p_title_path1.'-'.$row_pre[id].'/'; } } //============================================================================= $fb_main_url = "http://poems.greet2k.com".$p_url; $fb_thumb = "http://poems.greet2k.com/images/poems.png"; ?> <?=$p_title;?> - <?=strtolower($mt_cat_name);?> poems

Poetry

Collection of free poems and poetry. Share these poems with your friends, family and loved ones.
Poem Tags : $tgs[$i], "; } $tgts = substr($tgts, 0, strlen($tgts)-2); echo $tgts; ?>
Email this Poem now

Error! Cannot connect to the database.
Error! Server Is Down Or Database Does Not Exist.
Error! Server Is Down. Can Not Connect to Database.
">
">
">
">

Delivery Date  
>   Please send me a copy of this poem.
Comments...
Post Your Comment
Thanks for your comments ! It will be shown after approval shortly.
Rate this Poem :