2012-06-04 16:58:40 +02:00
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
FusionPBX
|
|
|
|
|
Version: MPL 1.1
|
|
|
|
|
|
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
|
for the specific language governing rights and limitations under the
|
|
|
|
|
License.
|
|
|
|
|
|
|
|
|
|
The Original Code is FusionPBX
|
|
|
|
|
|
|
|
|
|
The Initial Developer of the Original Code is
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
2019-10-06 01:58:40 +02:00
|
|
|
Copyright (C) 2010-2019
|
2012-06-04 16:58:40 +02:00
|
|
|
All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
|
|
|
*/
|
|
|
|
|
include "root.php";
|
|
|
|
|
|
2014-02-19 10:40:26 +01:00
|
|
|
//define the ivr_menu class
|
2013-09-11 15:06:14 +02:00
|
|
|
class ivr_menu {
|
2012-06-04 16:58:40 +02:00
|
|
|
public $domain_uuid;
|
|
|
|
|
public $domain_name;
|
2019-10-06 01:58:40 +02:00
|
|
|
public $app_uuid;
|
|
|
|
|
public $order_by;
|
2012-06-04 16:58:40 +02:00
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
|
$this->app_uuid = 'a5788e9b-58bc-bd1b-df59-fff5d51253ab';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function __destruct() {
|
|
|
|
|
foreach ($this as $key => $value) {
|
|
|
|
|
unset($this->$key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function find() {
|
2019-10-06 01:58:40 +02:00
|
|
|
|
|
|
|
|
$sql = "select * from v_ivr_menus ";
|
|
|
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
2012-06-04 16:58:40 +02:00
|
|
|
if (isset($this->ivr_menu_uuid)) {
|
2019-10-06 01:58:40 +02:00
|
|
|
$sql .= "and ivr_menu_uuid = :ivr_menu_uuid ";
|
|
|
|
|
$parameters['ivr_menu_uuid'] = $this->ivr_menu_uuid;
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
|
|
|
|
if (isset($this->order_by)) {
|
2019-10-06 01:58:40 +02:00
|
|
|
$sql .= $this->order_by;
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
2019-10-06 01:58:40 +02:00
|
|
|
$parameters['domain_uuid'] = $this->domain_uuid;
|
|
|
|
|
$database = new database;
|
|
|
|
|
return $database->select($sql, $parameters, 'all');
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-14 09:13:02 +02:00
|
|
|
?>
|