示例#1
0
 private static function include_header()
 {
     $template = new Template(HTML . 'header.php');
     echo $template->render(['page_title' => SiteStructure::page_title(), 'admin_nav' => SiteStructure::admin_nav(), 'main_nav' => SiteStructure::main_nav(), 'admin' => isset(Session::$admin_user['id']), 'root' => SUBDIR]);
     if (isset($_REQUEST['adid'])) {
         $model = ['ip' => $_SERVER['REMOTE_ADDR'], 'uri' => $_SERVER['REQUEST_URI']];
         Adhit::create($model);
     }
 }
示例#2
0
<div class="container white">
  <div class="content left">
    <table class="data">
      <thead>
        <th>Date</th>
        <th>IP</th>
        <th>URI</th>
      </thead>
      <tbody>
        <?php 
$adhits = Adhit::read(['*'], FALSE, ['created > CURRENT_DATE - INTERVAL 2 MONTH'], 'created DESC');
foreach ($adhits as $adhit) {
    echo '<tr>';
    echo '<td>' . htmlspecialchars($adhit['created']) . '</td>';
    echo '<td>' . htmlspecialchars($adhit['ip']) . '</td>';
    echo '<td>' . htmlspecialchars($adhit['uri']) . '</td>';
    echo '</tr>';
}
?>
      </tbody>
    </table>
  </div>
</div>