0) define ('SCR_CAPTION', 'by:'.$_COOKIE['c_fullname']); ?> '; if (IDX > 0) echo '« Back to Blogs'; echo '
'; if ( intval($_COOKIE['c_id_user']) > 0) { echo 'Welcome: '.$_COOKIE['c_fullname'].''; echo '
My Discussions »
'; echo 'Log out »'; } echo '
'; echo ''; ?> '; echo '
'; if ( IDU > 0) echo '
« View All Blogs
'; if ( intval($_COOKIE['c_id_user']) > 0) echo '
Add New Discussion »
'; $sql_where = ' where s_ind_state = 1'; $sql_where .= ' and date_publish <= CURDATE() '; $sql_where .= ' and id_category not in (1,2,19)'; if (IDU > 0) $sql_where .= ' and id_blog_user = '.IDU; $sql = 'select distinct id_category'; $sql .= ' from blog_mas_discus '; $sql .= $sql_where; if (IDX > 0) $sql .= ' and id_category = '.$_GET['idx']; $sql_result2 = mysql($database_name,$sql); $k =0; for ($k=0; $k < mysql_num_rows($sql_result2); $k++) { $id_category = mysql_result($sql_result2, $k, 'id_category' ); $ret = new_category($id_category); echo $ret->html; $sql = 'select id_discus, id_category, title, text_intro, LEFT(text_main, 256) as text_main, photo, stat_commnets, id_blog_user, UNIX_TIMESTAMP(date_publish) as date_publish '; $sql .= ' from blog_mas_discus '; $sql .= $sql_where; $sql .= ' and id_category = '.$id_category; if (IDU > 0) $sql .= ' and id_blog_user = '.IDU; $sql .= ' order by date_publish desc, ind_priority desc, id_discus desc '; if (IDX > 0) $sql .= ' limit 17'; else $sql .= ' limit 3'; $sql_result = mysql($database_name,$sql); for ($i=0; $i < mysql_num_rows($sql_result); $i++) { if (($i > 1) && (IDX < 1)) { echo '
More '.$ret->title.' »
'; break; } $id_discus = mysql_result($sql_result, $i, 'id_discus' ); $title = mysql_result($sql_result, $i, 'title' ); $text_intro = mysql_result($sql_result, $i, 'text_intro' ); $text_main = mysql_result($sql_result, $i, 'text_main' ); $photo = mysql_result($sql_result, $i, 'photo' ); $date_publish = mysql_result($sql_result, $i, 'date_publish' ); $stat_commnets = mysql_result($sql_result, $i, 'stat_commnets' ); $id_blog_user = mysql_result($sql_result, $i, 'id_blog_user' ); if ($i < 1) { $class1 = 'class="openning_para"'; $class2 = 'class="link_headline1"'; $style1 = 'style="padding:10 0"'; $th = ''; } else { $class1 = ''; $class2 = 'class="link_headline2"'; $style1 = 'style="padding-bottom:20"'; $th = 'th_'; } if (com_is_link($text_main)) $href = '"'.$text_main.'" target="_blank"'; else $href = '"blog_details.php?idx='.$id_discus.'"'; echo '
'; echo ''.$title.''; echo '
'; if ( strlen($photo) > 0 ) echo ''; echo '
'.$text_intro; echo ' Full Story »'; echo '
'; echo '( '.$stat_commnets.' Comment'; if ($stat_commnets != 1) echo 's'; echo ' ) '; echo date("D dS F Y", $date_publish); if (( $id_blog_user > 0) && ($id_blog_user == $_COOKIE['c_id_user'])) echo ' [ EDIT ]'; echo '
'; echo '
'; if (($i == 0) && (IDX > 0)) echo '
'.banner_468x60().'
'; } if (IDX > 0) echo '
« Back to Blogs
'; } if ($k < 1) echo '

Watch this Space!

For future news details'; function html_article_preview( $id_discus, $title) { return ' '.$title.' '; } function new_category($id_category) { global $database_name; $sql = 'select id_category, description, text_intro '; $sql .= ' from ref_category '; $sql .= ' where id_category = '.$id_category; $sql .= ' limit 1'; $sql_result = mysql($database_name,$sql); if (mysql_num_rows($sql_result) > 0) { $description = mysql_result($sql_result, 0, 'description' ); $text_intro = mysql_result($sql_result, 0, 'text_intro' ); $ret = new stdClass; $ret->html = '
'; $ret->html .= $description; $ret->html .= '
'; $ret->html .= '

'.$text_intro.'

'; $ret->title = $description; return $ret; } } ?> '; ?>