How to add the names of days?
I try this:
'.date('l',$gettime).'
$days = array(''.T_("SUN").'', ''.T_("MON").'', ''.T_("TUE").'', ''.T_("WED").'', ''.T_("THU").'', ''.T_("FRI").'', ''.T_("SAT").'');
My admincp and delete attacks logs
Lang english: $LANG["INFO"] = "Information";
#======================================================================#
# Page attacks logging
#======================================================================#
// Action: Delete logs
if ($action == "log_pirate") {
if ($do == "del") {
if ($_POST["delall"])
SQL_Query_exec("DELETE FROM `log_pirate`");
else {
if (!@count($_POST["del"])) show_error_msg(T_("ERROR"), "You have not selected anything! <a href='admincp.php?action=sitelog_pirate'>Back</a>", 1);
$ids = array_map("intval", $_POST["del"]);
$ids = implode(", ", $ids);
SQL_Query_exec("DELETE FROM `log_pirate` WHERE `id` IN ($ids)");
}
write_log("<font color='#cc6600'>The attack has been deleted! Deleted:</font><font color='#ff0000'> $CURUSER[username]</font>");
header("Refresh: 1;url=admincp.php?action=sitelog_pirate");
stdhead();
show_error_msg(T_("INFO"), T_("DELETED"), 0);
stdfoot();
die;
}}
// End actions
// Main menu
if ($action == "sitelog_pirate") {
stdhead(T_("SITE_PIRATE_LOG"));
//navmenu();
$search = trim($search);
if ($search != '' ){
$where = "WHERE txt LIKE " . sqlesc("%$search%") . "";
}
$res2 = SQL_Query_exec("SELECT COUNT(*) FROM log_pirate $where");
$row = mysql_fetch_array($res2);
$count = $row[0];
$perpage = 50;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=sitelog_pirate&");
begin_frame(T_("SITE_PIRATE_LOG"));
print("<form method='get' action='?'><center>");
print("<input type='hidden' name='action' value='sitelog_pirate' />n");
print("<input type='text' size='30' name='search' />n");
print("<input type='submit' value='".T_("SEARCH")."' />n");
print("</center></form><br />n");
echo $pagertop;
?>
<br /><div align="center">
<form id='log_pirate' action='admincp.php?action=log_pirate&do=del' method='post'>
<table border="0" cellpadding="0" cellspacing="0" width="90%" align="center" class="table_table">
<tr>
<th class="table_head"><input type="checkbox" name="checkall" onclick="checkAll(this.form.id)" /></th>
<th width="10%" class="table_head"><?php echo T_("ADDED");?></th>
<th width="10%" class="table_head"><?php echo T_("TIME");?></th>
<th width="70%" class="table_head"><?php echo T_("EVENT");?></th>
</tr>
<?php
$rqq = "SELECT id, added, txt FROM log_pirate $where ORDER BY id DESC $limit";
$res = SQL_Query_exec($rqq);
echo "";
while ($arr = mysql_fetch_array($res)){
$arr['added'] = utc_to_tz($arr['added']);
$date = substr($arr['added'], 0, strpos($arr['added'], " "));
$time = substr($arr['added'], strpos($arr['added'], " ") + 1);
print("<tr><td class='table_col2' align='center'><input type='checkbox' name='del[]' value='$arr[id]' /></td><td class='table_col1' align='center'>$date</td><td class='table_col2' align='center'>$time</td><td class='table_col1' align='left'>".stripslashes($arr["txt"])."</td></tr>n");
}
echo "</table>n";
echo "<br><input type='submit' value='Delete Selected' /> <input type='submit' value='Delete All' name='delall' /></form><br>";
print($pagerbottom);
echo '<br />';
end_frame();
navmenu();
stdfoot();
}
#======================================================================#
# End page attacks logging
#======================================================================#