当前位置: 首页>>代码示例>>PHP>>正文


PHP orm::uuid方法代码示例

本文整理汇总了PHP中orm::uuid方法的典型用法代码示例。如果您正苦于以下问题:PHP orm::uuid方法的具体用法?PHP orm::uuid怎么用?PHP orm::uuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在orm的用法示例。


在下文中一共展示了orm::uuid方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

    header("Location: time_condition_edit.php?id=" . $dialplan_uuid . ($app_uuid != '' ? "&app_uuid=" . $app_uuid : null));
    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
开发者ID:reliberate,项目名称:fusionpbx,代码行数:31,代码来源:time_condition_edit.php

示例2: unset

         //unset the empty row
         if (strlen($_POST["ring_group_destinations"][$x]["destination_number"]) == 0) {
             unset($_POST["ring_group_destinations"][$x]);
         }
         //unset ring_group_destination_uuid if the field has no value
         if (strlen($row["ring_group_destination_uuid"]) == 0) {
             unset($_POST["ring_group_destinations"][$x]["ring_group_destination_uuid"]);
         }
         //increment the row
         $x++;
     }
     //save to the data
     $orm = new orm();
     $orm->name('ring_groups');
     if (strlen($ring_group_uuid) > 0) {
         $orm->uuid($ring_group_uuid);
     }
     $orm->save($_POST);
     $message = $orm->message;
     if (strlen($ring_group_uuid) == 0) {
         $ring_group_uuid = $message['uuid'];
         $_GET["id"] = $ring_group_uuid;
     }
 }
 //delete the dialplan details
 $sql = "delete from v_dialplan_details ";
 $sql .= "where domain_uuid = '" . $_SESSION['domain_uuid'] . "' ";
 $sql .= "and dialplan_uuid = '" . $dialplan_uuid . "' ";
 $db->exec(check_sql($sql));
 unset($sql);
 //delete from the dialplan
开发者ID:xyj70,项目名称:fusionpbx,代码行数:31,代码来源:ring_group_edit.php

示例3: header

            $_SESSION["message"] = $text['message-update'];
        }
        header("Location: destination_edit.php?id=" . $destination_uuid);
        return;
    }
    //if ($_POST["persistformvar"] != "true")
}
//(count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0)
//initialize the destinations object
$destination = new destinations();
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
    $destination_uuid = $_GET["id"];
    $orm = new orm();
    $orm->name('destinations');
    $orm->uuid($destination_uuid);
    $result = $orm->find()->get();
    foreach ($result as &$row) {
        $domain_uuid = $row["domain_uuid"];
        $dialplan_uuid = $row["dialplan_uuid"];
        $destination_type = $row["destination_type"];
        $destination_number = $row["destination_number"];
        $destination_caller_id_name = $row["destination_caller_id_name"];
        $destination_caller_id_number = $row["destination_caller_id_number"];
        $destination_cid_name_prefix = $row["destination_cid_name_prefix"];
        $destination_context = $row["destination_context"];
        $fax_uuid = $row["fax_uuid"];
        $destination_enabled = $row["destination_enabled"];
        $destination_description = $row["destination_description"];
        $currency = $row["currency"];
        $destination_sell = $row["destination_sell"];
开发者ID:kevinlovesing,项目名称:fusionpbx,代码行数:31,代码来源:destination_edit.php

示例4: uuid

            $sql .= "('" . uuid() . "', 'Thai', 'th'), ";
            $sql .= "('" . uuid() . "', 'Tibetan', 'bo'), ";
            $sql .= "('" . uuid() . "', 'Tsonga', 'ts'), ";
            $sql .= "('" . uuid() . "', 'Turkish', 'tr'), ";
            $sql .= "('" . uuid() . "', 'Turkmen', 'tk'), ";
            $sql .= "('" . uuid() . "', 'Ukrainian', 'uk'), ";
            $sql .= "('" . uuid() . "', 'Urdu', 'ur'), ";
            $sql .= "('" . uuid() . "', 'Uzbek - Cyrillic, Latin', 'uz-uz'), ";
            $sql .= "('" . uuid() . "', 'Vietnamese', 'vi'), ";
            $sql .= "('" . uuid() . "', 'Welsh', 'cy'), ";
            $sql .= "('" . uuid() . "', 'Xhosa', 'xh'), ";
            $sql .= "('" . uuid() . "', 'Yiddish', 'yi') ";
            $db->exec(check_sql($sql));
            unset($sql);
        }
        unset($prep_statement, $row);
    }
    //set the sip_profiles directory for older installs
    if (isset($_SESSION['switch']['gateways']['dir'])) {
        $orm = new orm();
        $orm->name('default_settings');
        $orm->uuid($_SESSION['switch']['gateways']['uuid']);
        $array['default_setting_category'] = 'switch';
        $array['default_setting_subcategory'] = 'sip_profiles';
        $array['default_setting_name'] = 'dir';
        //$array['default_setting_value'] = '';
        //$array['default_setting_enabled'] = 'true';
        $orm->save($array);
        unset($array);
    }
}
开发者ID:reliberate,项目名称:fusionpbx,代码行数:31,代码来源:app_defaults.php

示例5: header

                    $_SESSION['message'] = $text['message-update'];
                }
                //redirect the browser
                header("Location: device_edit.php?id={$device_uuid}");
                exit;
            }
        }
    }
    //if ($_POST["persistformvar"] != "true")
}
//(count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
    $orm = new orm();
    $orm->name('devices');
    $orm->uuid($device_uuid);
    $result = $orm->find()->get();
    //$message = $orm->message;
    foreach ($result as &$row) {
        $device_mac_address = $row["device_mac_address"];
        $domain_uuid = $row["domain_uuid"];
        $device_label = $row["device_label"];
        //$device_mac_address = substr($device_mac_address, 0,2).'-'.substr($device_mac_address, 2,2).'-'.substr($device_mac_address, 4,2).'-'.substr($device_mac_address, 6,2).'-'.substr($device_mac_address, 8,2).'-'.substr($device_mac_address, 10,2);
        $device_label = $row["device_label"];
        $device_username = $row["device_username"];
        $device_password = $row["device_password"];
        $device_vendor = $row["device_vendor"];
        $device_uuid_alternate = $row["device_uuid_alternate"];
        $device_model = $row["device_model"];
        $device_firmware_version = $row["device_firmware_version"];
        $device_enabled = $row["device_enabled"];
开发者ID:urueedi,项目名称:fusionpbx,代码行数:31,代码来源:device_edit.php

示例6: header

                    $_SESSION['message'] = $text['message-update'];
                }
                //redirect the browser
                header("Location: device_profile_edit.php?id=" . $device_profile_uuid);
                exit;
            }
        }
    }
    //if ($_POST["persistformvar"] != "true")
}
//(count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
    $orm = new orm();
    $orm->name('device_profiles');
    $orm->uuid($device_profile_uuid);
    $result = $orm->find()->get();
    //$message = $orm->message;
    foreach ($result as &$row) {
        $device_profile_name = $row["device_profile_name"];
        $device_profile_domain_uuid = $row["domain_uuid"];
        $device_profile_enabled = $row["device_profile_enabled"];
        $device_profile_description = $row["device_profile_description"];
    }
    unset($prep_statement);
}
//set the sub array index
$x = "999";
//get device keys
$sql = "SELECT * FROM v_device_keys ";
$sql .= "WHERE device_profile_uuid = '" . $device_profile_uuid . "' ";
开发者ID:powerpbx,项目名称:fusionpbx,代码行数:31,代码来源:device_profile_edit.php

示例7: permissions

if (count($_GET) > 0) {
    $id = check_str($_GET["id"]);
}
//if the ID is not set then exit
if (!isset($id)) {
    echo "ID is required.";
    exit;
}
//add the dialplan permission
$permission = "dialplan_delete";
$p = new permissions();
$p->add($permission, 'temp');
//get the dialplan_uuid
$orm = new orm();
$orm->name('destinations');
$orm->uuid($id);
$result = $orm->find()->get();
foreach ($result as &$row) {
    if (permission_exists('destination_domain')) {
        $domain_uuid = $row["domain_uuid"];
    }
    $dialplan_uuid = $row["dialplan_uuid"];
    $destination_context = $row["destination_context"];
}
unset($prep_statement);
//remove the temporary permission
$p->delete($permission, 'temp');
//start the atomic transaction
$db->beginTransaction();
//delete the dialplan
if (isset($dialplan_uuid)) {
开发者ID:kevinlovesing,项目名称:fusionpbx,代码行数:31,代码来源:destination_delete.php

示例8: dialplan

 /**
  * Add a dialplan for call center
  * @var string $domain_uuid		the multi-tenant id
  * @var string $value	string to be cached
  */
 public function dialplan()
 {
     //check to see if the dialplan exists
     if (strlen($this->dialplan_uuid) > 0) {
         $sql = "select dialplan_uuid, dialplan_name, dialplan_description from v_dialplans ";
         $sql .= "where dialplan_uuid = '" . $this->dialplan_uuid . "' ";
         $sql .= "and domain_uuid = '" . $this->domain_uuid . "' ";
         $prep_statement = $this->db->prepare($sql);
         if ($prep_statement) {
             $prep_statement->execute();
             $row = $prep_statement->fetch(PDO::FETCH_ASSOC);
             if (is_array($row)) {
                 //results found
                 $dialplan_name = $row['dialplan_name'];
                 $dialplan_description = $row['dialplan_description'];
             } else {
                 //no results
                 unset($this->dialplan_uuid);
                 $sql = "update v_call_center_queues ";
                 $sql .= "set dialplan_uuid = null ";
                 $sql .= "where call_center_queue_uuid = '" . $this->call_center_queue_uuid . "' ";
                 $sql .= "and domain_uuid = '" . $this->domain_uuid . "' ";
                 //echo $sql."<br />\n";
                 //exit;
                 $this->db->exec($sql);
                 unset($sql);
             }
             unset($prep_statement);
         }
     }
     //build the dialplan array
     $dialplan["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
     $dialplan["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_name"] = $this->queue_name != '' ? $this->queue_name : format_phone($this->destination_number);
     $dialplan["dialplan_number"] = $this->destination_number;
     $dialplan["dialplan_context"] = $_SESSION['context'];
     $dialplan["dialplan_continue"] = "false";
     $dialplan["dialplan_order"] = "210";
     $dialplan["dialplan_enabled"] = "true";
     $dialplan["dialplan_description"] = $this->queue_description;
     $dialplan_detail_order = 10;
     //add the public condition
     $y = 1;
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "\${caller_id_name}";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^([^#]+#)(.*)\$";
     $dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "never";
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
     $y++;
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "caller_id_name=\$2";
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
     $y++;
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^" . $this->destination_number . "\$";
     $dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "";
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
     $y++;
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
     $y++;
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true";
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
     $y++;
     if (strlen($this->queue_cid_prefix) > 0) {
         $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
         $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
         $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
         $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=" . $this->queue_cid_prefix . "#\${caller_id_name}";
         $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
         $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
         $y++;
     }
     $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
     $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
     $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "callcenter";
     $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $this->queue_name . '@' . $_SESSION["domain_name"];
     $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
     $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
//.........这里部分代码省略.........
开发者ID:ZYSHE,项目名称:fusionpbx,代码行数:101,代码来源:call_center.php

示例9: save

 public function save($array)
 {
     //action add or update
     if (strlen($this->ivr_menu_uuid) == 0) {
         $action = "add";
     } else {
         $action = "update";
     }
     //add or update the dialplan
     $this->dialplan($array);
     $array['dialplan_uuid'] = $this->dialplan_uuid;
     //save the ivr_menus
     $orm = new orm();
     $orm->name('ivr_menus');
     if (strlen($this->ivr_menu_uuid) > 0) {
         $orm->uuid($this->ivr_menu_uuid);
     }
     $orm->save($array);
     $this->ivr_menu_uuid = $orm->message['uuid'];
     //update dialplan with the ivr_menu_uuid
     if ($action == "add") {
         $array['ivr_menu_uuid'] = $this->ivr_menu_uuid;
         $this->dialplan($array);
     }
     //set the add message
     if ($action == "add" && permission_exists('ivr_menu_add')) {
         $_SESSION['message'] = $text['message-add'];
     }
     //set the update message
     if ($action == "update" && permission_exists('ivr_menu_edit')) {
         $_SESSION['message'] = $text['message-update'];
     }
     //return the result
     return $orm->message;
 }
开发者ID:powerpbx,项目名称:fusionpbx,代码行数:35,代码来源:ivr_menu.php


注:本文中的orm::uuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。