set_file(array( "mainpage" => "diccionario_entrada.htm", "enlaces" => "template_noticias.htm")); $link = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die("Could not connect : " . mysql_error()); mysql_select_db("$dbDatabase1") or die("Could not select database"); $result = mysql_query($qNews10) or die("Query failed : " . mysql_error()); while (list( $tid, $title, $autor, $starter_id, $start_date, $last_poster, $last_poster_id, $posts, $last_post, $text, $foro) = mysql_fetch_row($result)) { $MAX_LENGTH = 26; $str_to_count = html_entity_decode($title); if (strlen($str_to_count) >= $MAX_LENGTH) { $s2 = substr($str_to_count, 0, $MAX_LENGTH - 3); $s2 .= "..."; $title = ($s2); } reemplazo($text); flogos ($foro,$bigicon,$smallicon,$fornombre); $t->set_var("logo",$smallicon); $t->set_var("tid",$tid); $t->set_var("title",$title); $t->parse("encabezados","enlaces",true); } $link = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die("Could not connect : " . mysql_error()); mysql_select_db("$dbDatabase1") or die("Could not select database"); $result = mysql_query($qPost10) or die("Query failed : " . mysql_error()); while (list( $tid, $title, $posts, $foro) = mysql_fetch_row($result)) { $MAX_LENGTH = 26; $str_to_count = html_entity_decode($title); if (strlen($str_to_count) >= $MAX_LENGTH) { $s2 = substr($str_to_count, 0, $MAX_LENGTH - 3); $s2 .= "..."; $title = ($s2); } reemplazo($text); flogos ($foro,$bigicon,$smallicon,$fornombre); $t->set_var("logo",$smallicon); $t->set_var("tid",$tid); $t->set_var("title",$title); $t->parse("entradas","enlaces",true); } $link = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die("Could not connect : " . mysql_error()); mysql_select_db("$dbDatabase1") or die("Could not select database"); $query = "SELECT word, description, image, source, example, autor FROM dic_word WHERE id_word = $id AND status <> 0"; $result = mysql_query($query) or die("Query failed : " . mysql_error()); while (list( $word, $description, $image, $source, $example, $autor) = mysql_fetch_row($result)){ $t->set_var("word",$word); $t->set_var("description",$description); $t->set_var("source",$source); $t->set_var("example",$example); $t->set_var("image",$image); $t->set_var("autor",$autor); } $SDK =& new IPBSDK(); $online = $SDK->list_online_members('1'); // Grab Online Members - Detailed Info $details = $SDK->get_active_count(); $stats = $SDK->get_board_stats(); $totalonline = count($online); // Count up amount of people online $totals = $stats['total_topics'] + $stats['total_replies']; $t->set_var('utotal',$details['total']); $t->set_var('miembros',$details['members']); $t->set_var('invitados',$details['guests']); $t->set_var('anonimos',$details['anon']); $t->set_var('tusers', $stats['mem_count']); $t->set_var('treplies', $totals); $numero = $ipb->member['id']; if ($numero <> 0) { $username = $ipb->member['name']; $ultima = "Logout"; $enlaces = "Registrarse"; } else { $username = 'Invitado'; $ultima ="Login"; $enlaces = "Registrarse"; } $t->set_var('username',$username); $t->set_var('ultima',$ultima); $t->set_var('leyenda',$leyenda); $t->set_var('enlaces',$enlaces); $t->set_var('controlpanel',$controlpanel); $t->pparse("output","mainpage"); mysql_free_result($result); mysql_close($link); ?>