return; } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) //get existing data to pre-populate form if ($dialplan_uuid != '' && $_POST["persistformvar"] != "true") { //add the dialplan permission $p = new permissions(); $p->add("dialplan_add", 'temp'); $p->add("dialplan_detail_add", 'temp'); $p->add("dialplan_edit", 'temp'); $p->add("dialplan_detail_edit", 'temp'); //get main dialplan entry $orm = new orm(); $orm->name('dialplans'); $orm->uuid($dialplan_uuid); $result = $orm->find()->get(); //$message = $orm->message; foreach ($result as &$row) { $domain_uuid = $row["domain_uuid"]; //$app_uuid = $row["app_uuid"]; $dialplan_name = $row["dialplan_name"]; $dialplan_number = $row["dialplan_number"]; $dialplan_order = $row["dialplan_order"]; $dialplan_continue = $row["dialplan_continue"]; $dialplan_context = $row["dialplan_context"]; $dialplan_enabled = $row["dialplan_enabled"]; $dialplan_description = $row["dialplan_description"]; } unset($prep_statement); //remove the temporary permission $p->delete("dialplan_add", 'temp');