Beispiel #1
0
            exit;
        } else {
            echo ers($ers);
        }
    } else {
        $_POST['user_box'] = '';
        $_POST['password_box'] = '';
    }
    echo showStyles();
    echo "<body><table align='center'><tr><td align='center'><form method='POST' action='?'>\r\n\t\t<table>\r\n\t\t\t<tr class='tableHeader'><td colspan='2' align='center'>Login</td></tr>\r\n\t\t\t<tr class='tableOddRow'><td><label>User:</label></td><td><input type='text' name='user_box' value='{$_POST['user_box']}'></td></tr>\r\n\t\t\t<tr class='tableEvenRow'><td><label>Password:</label></td><td><input type='password' name='password_box' value=''></td></tr>\r\n\t\t\t<tr class='tableFooter'><td colspan='2'><input type='submit' value='Login'></td></tr>\r\n\t\t</table>\r\n\t</form></td><tr><table>\r\n\t";
    exit;
}
echo showStyles();
if (isset($_GET['op'])) {
    if ($_GET['op'] == 'reset') {
        $oi->statsQuery("DELETE FROM oi_imports");
        $oi->statsQuery("DELETE FROM oi_messages");
    }
}
$plugins = $oi->getPlugins();
$import_stats = array();
$messages_stats = array();
$res = $oi->statsQuery("SELECT COUNT(id) AS total_imports,SUM(contacts) AS total_contacts,service FROM oi_imports GROUP BY service ORDER BY total_imports DESC,total_contacts DESC");
while ($row = sqlite_fetch_array($res)) {
    $import_stats[$row['service']] = $row;
}
$res = $oi->statsQuery("SELECT COUNT(id) AS total_sends,SUM(messages) AS total_messages,service FROM oi_messages GROUP BY service");
while ($row = sqlite_fetch_array($res)) {
    $messages_stats[$row['service']] = $row;
}
echo "<center><h1 class='title'>OpenInviter Stats</h1></center>";