<?
##################################################################################
# Anonymous Mailer Copyright Termix 2002 - 2003. All rights researved. #
# Just don't change anything. #
# and don't take out the copyright even though there is an option to take it out #
# and thats all #
# Site: http://termix.ath.cx #
# Auther: Aaron #
# E-Mail: hide@address.com #
# #
# File: log.php #
##################################################################################
//start to include and require the main files
require "confi.php";
include "function.php";
//include "protect.php";
//Lets display the mails
//Ok now lets start this.
//First we need to connect to mysql and etc.
$link_id = db_connect();
if(!$link_id) die(sql_error());
mysql_select_db("$default_dbname");
if(!$default_dbname) error_message(sql_error());
function log_display() {
global $query, $result, $query_data, $total_num_user, $result;
global $rec, $mail_logname, $cur_page, $records_per_page;
global $total_num_page, $last_page_num, $PHP_SELF, $last_page, $next_page;
global $prev_page;
headers();
//select a row here and so we can move on
$query = "SELECT count(*) FROM $mail_logname";
if(!$query) error_message(sql_error());
$result = mysql_query($query);
//Then lets display the number of logs
//after that we will put a limit to the page
$query_data = mysql_fetch_row($result);
$total_num_user = $query_data[0];
$page_num = $cur_page + 1;
$total_num_page = $last_page_num = ceil($total_num_user/$records_per_page);
html_header();
echo "<img border=\"0\" src=\"./Images/h1.gif\" width=\"100%\" height=\"1\"><br>";
echo "<center><b><font color=\"#cc0000\">There were $total_num_user logs found in the database.<br>Displaying the page $page_num out of $last_page_num.</font></b></center>\n";
html_footer();
if(empty($cur_page)) {
$cur_page = 0;
}
$limit_str = "LIMIT " . $cur_page * $records_per_page . ", $records_per_page";
//Now lets display the information stored in the database.
$result = mysql_query("SELECT * FROM maillog $limit_str");
while($rec = mysql_fetch_array($result)) {
echo "<img border=\"0\" src=\"./Images/h1.gif\" width=\"100%\" height=\"1\"><br>";
echo('<br><b><u>Date:</b> ' . $rec['today'] . '<br>');
echo('<b>Hosts ip:</b> ' . $rec['host'] . '<br>');
echo('<b>Mailers Real Ip:</b> ' . $rec['realip'] . '<br><br></u>');
echo('<b>Mailers Name:</b> ' . $rec['name'] . '<br>');
echo('<b>Mailers E-mail:</b> ' . $rec['email'] . '<br>');
echo('<b>Friends Name:</b> ' . $rec['name1'] . '<br>');
echo('<b>Friends E-mail:</b> ' . $rec['email1'] . '<br>');
echo('<b>Subject:</b> ' . $rec['sub'] . '<br>');
echo('<b>Message:</b> <table cellpadding=\"0" border="0" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\"><tr><td width=\"100%\">' . $rec['xmessage'] . '</td></tr></table><br><br>');
} // end of while
if($page_num > 1) {
$prev_page = $cur_page - 1;
?>
<hr>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%">
<p align="center"><a href="<? echo "$PHP_SELF?action=log_dispay&cur_page=0"; ?>" style="text-decoration: none"><font color="#000099"> [Top] </a></td></font>
<td width="50%">
<p align="center"><a href="<? echo "$PHP_SELF?action=log_dispay&cur_page=$prev_page"; ?>" style="text-decoration: none"><font color="#000099">[Prev]</a></td></font>
</tr>
</table>
<?
}
if($page_num < $total_num_page) {
$next_page = $cur_page + 1;
$last_page = $total_num_page - 1;
?>
<hr>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%">
<p align="center"><a href="<? echo "$PHP_SELF?action=log_dispay&cur_page=$next_page"; ?>" style="text-decoration: none"><font color="#000099"> [Next] </a></td></font>
<td width="50%">
<p align="center"><a href="<? echo "$PHP_SELF?action=log_dispay&cur_page=$last_page"; ?>" style="text-decoration: none"><font color="#000099">[Last page]</a></td></font>
</tr>
</table>
<?
}
} //end of function
if(isset($action)) {
switch ($action) {
case "log_display":
log_display();
break;
}
}
log_display();
?>