back
Welcome {$_SESSION["admin_user"]["name"]}

"; $name = ucwords(str_replace(array(".php", "_", "/admin/functions/"), array("", " ", ""), $_SERVER["PHP_SELF"])); //if (!in_array($name, array_values($_SESSION["admin_user"]["access"]))) { // print "Access Denied"; // exit; //} require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dbi.inc"; if (!isset($_REQUEST["page"])) $_REQUEST["page"] = 1; if (!isset($_REQUEST["page_size"])) $_REQUEST["page_size"] = 10; // get count of unhandled listing request $db = new Database(); //$sql = <<get_data($sql, array()) and count($data) > 1){ // array_shift ($data); // $update_requests = $data; //// foreach($update_requests as $key => $data) //// { //// $update_requests[$key]['request_type'] = "EDIT"; //// } //} // //$sql = << a.id // AND b.update_to_id = a.id // ) //EOD; //$new_requests = array(); //if ($data = $db->get_data($sql, array()) and count($data) > 1){ // array_shift ($data); // $new_requests = $data; //// foreach($new_requests as $key => $data) //// $new_requests[$key]['request_type'] = "NEW"; //} // // //$listings_requests = array_merge($new_requests, $update_requests); //$total_count = count($listings_requests); // ////----kevin----20140825: indexed by id //foreach($listings_requests as $key => $value) //{ // unset($listings_requests[$key]); // $listings_requests[$value['id']] = $value; //} //krsort($listings_requests); ////end $sql = <<get_data($sql, array()) and count($data) > 1){ array_shift ($data); $listings_requests = $data; foreach($listings_requests as $key => $data) { if($data['update_to_id'] == -1) $listings_requests[$key]['request_type'] = "NEW"; else $listings_requests[$key]['request_type'] = "EDIT"; } } $total_count = count($listings_requests); $offset = ($_REQUEST["page"] - 1) * $_REQUEST["page_size"]; $page_size = $_REQUEST["page_size"]; $listings_requests = array_slice($listings_requests, $offset, $page_size); ?>
Listings Requests


View Id Name Description Notes Next_contact Salesperson_id Active Update_to_id Update_confirmation_id Update_email Request_Type Operations
Details Delete | Delete | &is_admin=true' title="Edit record">Edit | Save Notes
 Results:  of        Pages:   1) { $previous_page = $_REQUEST['page'] - 1; print << >Previous Page,   ,   >Next Page       Page size: