0: php_network_getaddresses: getaddrinfo failed: Name or service not known Form Guestbook $gt = trim(addslashes($_GET['quote'])); $qt = SQLite_select("SELECT * FROM posts WHERE id='$gt'"); $qtu = $qt['user']; $qu = SQLite_select("SELECT * FROM users WHERE id='$qtu'"); $quote_content = preg_replace('#\[quote=(.*?)\](.*?)\[\/quote\]#is', '', $qt['content']); if($qt){ $quotee = '[quote='.$qu['name'].']'.$quote_content.'[/quote]'; } $form = '
'; // <== Form Guestbook $guestbook = $form.listcomment("SELECT * FROM posts WHERE type=3 AND status=1 ORDER BY id DESC LIMIT 0,5"); } // ==> Show Topic $query = "SELECT * FROM posts WHERE type=1 AND status=1"; $per = 10; $num = $db->query('SELECT COUNT(1) FROM ('.$query.') x')->fetchColumn(); $page_max = ceil($num/$per); $start = ($page-1)*$per; $paging = paging($page,$page_max,'/index.php?p='); $topic = '
'.listtopic($query." ORDER BY up DESC LIMIT '$start','$per'").'
'.$paging; // <== Show Topic // ==> Show category $categorys = '
'.listcategory("SELECT * FROM categorys WHERE category=0 AND status=1 ORDER BY time DESC LIMIT 0,10").'
'; // <== Show category require 'online.php'; $body = array( 'title' => 'Trang chủ', 'login_bar' => $login_bar, 'body' => $guestbook.$topic.$categorys.$online, ); $db = NULL; echo templates('main',$body); ?>