3 include 'include/header.php';
5 function array_sort($array, $on, $order=SORT_ASC
) {
7 $sortable_array = array();
8 if (count($array) > 0) {
9 foreach ($array as $k => $v) {
11 foreach ($v as $k2 => $v2) {
13 $sortable_array[$k] = $v2;
17 $sortable_array[$k] = $v;
23 asort($sortable_array);
26 arsort($sortable_array);
30 foreach ($sortable_array as $k => $v) {
31 $new_array[$k] = $array[$k];
39 <div
class="container margintopandbottom">
40 <?php
include 'menu.php'; ?
>
41 <div
class="col-md-12">
42 <div
class="panel panel-default"><h1
class="centertext">Be Messaging Monitoring System
</h1
></div
>
47 $dir = file(DB_PATH
."idlist.log");
48 foreach($dir as $key){
49 $array[0] = explode("<><>", $key);
50 $worldofArray['directory'] = $inbox->loggedEmail($array[0][1], MDB_PATH
);
51 $worldofArray['id'] = $array[0][0];
52 if(is_dir($worldofArray['directory'])){
54 $hi = explode("/", $worldofArray['directory']);
55 $strReplaced = $array[0][1];
57 foreach (glob($worldofArray['directory']."*.dat") as $filename){
59 $h = explode("/", $filename);
62 $arrayContainer[] = array('directory' => $worldofArray['directory'], 'id' => $worldofArray['id'], 'conversation_count' => $count, 'email' => $strReplaced );
66 $arrayContainer = array_sort($arrayContainer, 'conversation_count', SORT_DESC
);
67 $returned = array_values($arrayContainer);
68 // print_r($returned);
70 <table
class="table table-bordered table-striped table-responsive">
72 <td
><strong
>ID
</strong
></td
>
73 <td
><strong
>Email
</strong
></td
>
74 <td
><strong
>Number of Conversation
</strong
></td
>
77 $count = count($arrayContainer)/10;
78 if(strpos($count,".")>0)
80 $p = (isset($_GET['p'])&&is_numeric($_GET['p']))?
($_GET['p']*10):10;
81 $s = (isset($_GET['p'])&&is_numeric($_GET['p']))?
$p-10:0;
83 for ($i=$s; $i < $p; $i++
) {
84 if(isset($returned[$i]))
85 echo "<tr><td>{$returned[$i]['id']}</td><td><a href=\"conversation.php?em={$returned[$i]['email']}\">{$returned[$i]['email']}</a></td><td>{$returned[$i]['conversation_count']}</td></tr>";
87 echo "<ul class=\"pagination\" id='page'>";
88 for ($i=1; $i <= $count; $i++
){
89 $active = ($_GET['p']==$i) ?
'class="active"' : '';
90 echo "<li {$active}><a href='{$livesitePath}index.php?p={$i}'>{$i}</a></li>";