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 // print_r($arrayContainer);
67 $arrayContainer = array_sort($arrayContainer, 'conversation_count', SORT_DESC
);
68 $returned = array_values($arrayContainer);
69 // print_r($returned);
71 <table
class="table table-bordered table-striped table-responsive">
73 <td
><strong
>ID
</strong
></td
>
74 <td
><strong
>Email
</strong
></td
>
75 <td
><strong
>Number of Conversation
</strong
></td
>
78 $count = count($arrayContainer)/10;
79 if(strpos($count,".")>0)
81 $p = (isset($_GET['p'])&&is_numeric($_GET['p']))?
($_GET['p']*10):10;
82 $s = (isset($_GET['p'])&&is_numeric($_GET['p']))?
$p-10:0;
84 for ($i=$s; $i < $p; $i++
) {
85 if(isset($returned[$i]))
86 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>";
88 echo "<ul class=\"pagination\" id='page'>";
89 for ($i=1; $i <= $count; $i++
){
90 $active = ($_GET['p']==$i) ?
'class="active"' : '';
91 echo "<li {$active}><a href='{$livesitePath}index.php?p={$i}'>{$i}</a></li>";