예제 #1
0
<?php 
    if ($topics || $super_stickies) {
        ?>

<h2><?php 
        _e('Latest Discussions');
        ?>
</h2>

<table id="latest">
<tr>
	<th><?php 
        _e('Topic');
        ?>
 &#8212; <?php 
        new_topic();
        ?>
</th>
	<th><?php 
        _e('Posts');
        ?>
</th>
	<th><?php 
        _e('Last Poster');
        ?>
</th>
	<th><?php 
        _e('Freshness');
        ?>
</th>
</tr>
예제 #2
0
	$links[$num_posts]        = $row["link"];
	$names[$num_posts]        = $row["name"];
	$descriptions[$num_posts] = $row["description"];
	$titles[$num_posts]       = $row["title"];
	$num_posts++;	
    }
} 


for ($i=0;$i<$num_posts;$i++){
	$sql="UPDATE POSTS SET inforum='1' WHERE pid='$pids[$i]'";
	$conn_db->query($sql);

        $post_name=$author[$i];
        $post=$names[$i].'<br><br>'.$descriptions[$i].'<br><br>'.$links[$i].'<br><br>'.$messages[$i];
	$idt=new_topic($post_name,$titles[$i],$post,'2');
        
	$sql="SELECT * FROM COMMENTS WHERE pid='$pids[$i]'";
	$result = $conn_db->query($sql);
	$num_com=0;
	if ($result->num_rows > 0) {
    		// output data of each row
    		while($rowc = $result->fetch_assoc()) {
        		$authorc[$num_com]       = $rowc["author"];
        		$messagesc[$num_com]     = $rowc["message"];
        		$num_com++;
    		}
		$rowc=[];
	}