public function getList($id = "", $pg)
 {
     $purl = array();
     if (isset($_GET['url'])) {
         $purl = $_GET['url'];
         $purl = rtrim($purl);
         $purl = explode('/', $_GET['url']);
     } else {
         $purl = null;
     }
     if (!isset($purl['2'])) {
         $pn = 1;
     } else {
         $pn = $purl['2'];
     }
     global $database;
     $resultUser = $database->db_query("SELECT * FROM client_product WHERE client_id='" . $_SESSION['client_ident'] . "'");
     /*$pagin = new Pagination();
     		$pagin->nr  = $database->dbNumRows($resultUser);
     		$pagin->itemsPerPage = 20;*/
     $myservices = Cproduct::find_by_sql("SELECT * FROM client_product WHERE client_id='" . $_SESSION['client_ident'] . "'");
     $index_array = array("myservices" => $myservices, "mypagin" => "");
     return $index_array;
 }
 public function cProdID_AutoComplete($id = "")
 {
     return Cproduct::find_by_sql("SELECT * FROM client_product WHERE prod_name LIKE '%" . $_POST['input'] . "%'");
 }
 public function cprodID_AutoComplete($id = "")
 {
     return Cproduct::find_by_sql("SELECT * FROM client_product WHERE client_id='" . $_POST['clientid'] . "' AND ( prod_name LIKE '%" . $_POST['input'] . "%' OR install_city LIKE '%" . $_POST['input'] . "%' OR install_address LIKE '%" . $_POST['input'] . "%' )");
 }