- file_get_contents: documentation ( source)
- preg_replace: documentation ( source)
- file_exists: documentation ( source)
<?php
require_once('inc/config.php');
require_once('header.php');
$botid = preg_replace("/[^0-9]/","",$_GET['id']);
?>
<div class="grid_24">
<!-- Box Header: Start -->
<div class="box_top">
<h2 class="icon typography">Logs for bot <?php echo $botid; ?></h2>
</div>
<!-- Box Header: End -->
<!-- Box Content: Start -->
<div class="box_content padding">
<div style="float: left; display: inline; width: 265px; word-break: break-all; word-wrap: break-word;">
<?php
if(file_exists("uploads/".$botid.".html"))
{
echo file_get_contents("uploads/".$botid.".html");
} else{
echo 'No logs!';
}
?>
</div>
</div>
<?php
include("html/footer.php");
?>