Ejemplo n.º 1
0
require_once "../config.inc.php";
if (!empty($_REQUEST['page_start'])) {
    $page_start = $_REQUEST['page_start'];
} else {
    $page_start = "0";
}
if (!empty($_REQUEST['page_range'])) {
    $page_range = $_REQUEST['page_range'];
} else {
    $page_range = PAGING_RANGE;
}
$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
$db->connect();
$r = new Reports('unknown', BASE_DOMAIN);
if (empty($_REQUEST['uid'])) {
    $reports = $r->get_reports($page_start, $page_range);
    $reports_count = $r->count_reports();
} else {
    //get one report from search results
    $uid = $_REQUEST['uid'];
    $reports = $r->getReport($uid);
}
$pager_count = $reports_count;
//total records for query
$pager_range = PAGING_RANGE;
//total currently displayed
$pager_end = $page_start + $pager_range;
$pager_pos = $page_start;
$next_pos = $pager_range + 1;
$back_pos = $pager_pos;
$next_button = "";
Ejemplo n.º 2
0
                <th>Description</th>
				<th>File</th>
				<th>Delete</th>
            </tr>
        </thead>
		
	    <tbody>
	         

	<?php 
//require_once("../config.inc.php");
//$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
//$db->connect();
//$r = new Reports('unknown', BASE_DOMAIN);
if (!empty($_REQUEST['uid'])) {
    $reports = $r->get_reports();
} else {
    //get one report from search results
    $uid = $_REQUEST['uid'];
    $reports = $r->getReport($uid);
}
//$reports = $r->get_reports();
//print_r($reports);
$reports = $info;
for ($i = 0; $i < count($reports); $i++) {
    $id = $reports[$i]['id'];
    $name = $reports[$i]['name'];
    $location = $reports[$i]['location'];
    $file_info = $reports[$i]['file_info'];
    $description = $reports[$i]['description'];
    $client_id = $reports[$i]['client_id'];