* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License in GPL.txt for more details. */ define('IN_ADMIN', 1); require_once('common.php'); $today_users_count = 0; $today_pastes_count = 0; require_once('../includes/functions.php'); updateAdminHistory($conn); $query = $conn->query("SELECT @last_id := MAX(id) FROM page_view"); $row = $query->fetch(PDO::FETCH_NUM); $page_last_id = intval($row[0]); $query = $conn->prepare('SELECT tpage, tvisit FROM page_view WHERE id = ?'); $query->execute([$page_last_id]); while ($row = $query->fetch()) { $today_page = $row['tpage']; $today_visit = $row['tvisit']; } $admin_email = getSiteInfo()['site_info']['email']; $c_date = date('jS F Y'); /* Number of users today */ $query = $conn->prepare('SELECT COUNT(*) FROM users WHERE `date` = ?'); $query->execute([$c_date]); $today_users_count = intval($query->fetch(PDO::FETCH_NUM)[0]); /* Number of pastes today */ $query = $conn->query('SELECT COUNT(*) FROM pastes where DATE(created_at) = DATE(NOW())'); $today_pastes_count = intval($query->fetch(PDO::FETCH_NUM)[0]); for ($loop = 0; $loop <= 6; $loop++) { $myid = $page_last_id - $loop; $query = $conn->prepare("SELECT date, tpage, tvisit FROM page_view WHERE id = ?"); $query->execute([$myid]); while ($row = $query->fetch()) { $sdate = $row['date']; $sdate = str_replace(date('Y'), '', $sdate); $sdate = str_replace('January', 'Jan', $sdate); $sdate = str_replace('February', 'Feb', $sdate); $sdate = str_replace('March', 'Mar', $sdate); $sdate = str_replace('April', 'Apr', $sdate); $sdate = str_replace('August', 'Aug', $sdate); $sdate = str_replace('September', 'Sep', $sdate); $sdate = str_replace('October', 'Oct', $sdate); $sdate = str_replace('November', 'Nov', $sdate); $sdate = str_replace('December', 'Dec', $sdate); $ldate[$loop] = $sdate; $tpage[$loop] = $row['tpage']; $tvisit[$loop] = $row['tvisit']; } } ?> Ponepaste - Dashboard
  • Views

    Today
  • Pastes

    Today
  • Users

    Today
  • Unique Views

    Today
Recent Pastes
format('jS F Y h:i:s A'); $p_ip = Trim($row['ip']); $p_member = Trim($row['member']); $p_view = Trim($row['views']); $p_time = Trim($row['now_time']); $nowtime1 = time(); $oldtime1 = $p_time; $p_time = conTime($nowtime1 - $oldtime1); $title = truncate($title, 5, 30); echo " "; } ?>
ID Username Date IP Views
$p_id $p_member $p_date $p_ip $p_view
Recent Users
query('SELECT id, username, date, ip FROM users ORDER BY id DESC LIMIT 7')->fetchAll(); $last_id = intval( $conn->query('SELECT MAX(id) FROM users')->fetch(PDO::FETCH_NUM)[0] ); foreach ($most_recent_users as $user) { echo " "; } ?>
ID Username Date IP
${user['id']} ${user['username']} ${user['date']} ${user['ip']}
Admin History
'; } ?>
ID Last Login Date IP ID Last Login Date
' . $r_id . ' ' . $r_paste . ' ' . $m_report . ' ' . $r_date . ' ' . $r_reason . '

You have the latest version'; } else { echo '
Your Paste installation is outdated. Get the latest version from SourceForge'; } ?>