function list_S3QL($element, $D) { extract($D); if ($element == 'projects') { $data = list_projects($D); } if ($element == 'resources' || $element == 'classes') { $data = list_classes($D); #$data = list_shared_resources ($D); #if($data=='') #$data = list_project_resources ($D); } if ($element == 'users') { #$data = list_users($D); $data = list_all_users($D); } if ($element == 'keys') { $data = list_keys($D); } if ($element == 'accesslog') { $data = list_logs($D); } if ($element == 'rules') { $data = list_rules($D); } if ($element == 'rulelog') { $data = list_rules_log($D); } if ($element == 'resource instances') { $data = list_all_instances($D); } if ($element == 'statements') { $data = list_statements($D); if (is_array($data)) { $data = array_map('ValuesToFileLinks', $data); } } #echo '<pre>';print_r($data); #After the query, resume the cols that are supposed to be displayed if ($D['out'] != '' && $D['out'] != '*') { if ($SQLfun == 'distinct') { $D['out'] = str_replace(array($SQLfun, "(", ")"), "", $D['out']); } $cols = array_map('trimmit', explode(',', $D['out'])); } for ($c = 0; $c < count($cols); $c++) { $pCol = $cols[$c]; if ($c == count($cols) - 1) { $header .= trim($pCol); } else { $header .= trim($pCol) . $format['middle']; } } $x = array('data' => $data, 'format' => $format, 'header' => $header, 'columns' => $cols); if ($data != '') { echo display($x); } else { echo "<report>Your query returned no results</report>"; } }
</table> </form> <div style="border-style:double;"></div> <h3>Upload and make Calls</h3> <form method="post" action="performCalls.php" enctype="multipart/form-data"> CSV File : <input type="file" name="csvFile" /><br><br> <b>File should not contain spaces</b><br><br> <input type="submit" name="action" value="Upload and Initiate Calls" /> </form> <div style="border-style:double;"></div> <h3>Call Logs</h3> <?php list_logs(); ?> <div style="border-style:double;"></div> <h3>Audio Files</h3> <a href="audioFile.php">View/Manage Audio Files</a> </body> </html> <?php function list_logs() { exec("ls -t files/", $files); echo "<table>"; foreach ($files as $file) {