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


PHP is_uuid函数代码示例

本文整理汇总了PHP中is_uuid函数的典型用法代码示例。如果您正苦于以下问题:PHP is_uuid函数的具体用法?PHP is_uuid怎么用?PHP is_uuid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getIndex

 public function getIndex(Request $request, $param1 = null, $param2 = null, $param3 = null, $param4 = null)
 {
     if (strtolower($param1) === 'generate') {
         return $this->getGenerate($request);
     } else {
         if (is_year($param1) && is_null($param2) && is_null($param3) && is_null($param4)) {
             return $this->makeMonthsView($request, $param1);
         } else {
             if (is_year($param1) && is_month($param2) && is_null($param3) && is_null($param4)) {
                 return $this->makeListView($request, $param1, $param2, $param3);
             } else {
                 if (is_year($param1) && is_month($param2) && !is_null($param3) && is_null($param4)) {
                     if (is_day($param3)) {
                         return $this->makeDayView($request, $param1, $param2, $param3);
                     } else {
                         if (is_uuid($param3)) {
                             return $this->makeMonthEmployeeView($request, $param1, $param2, $param3);
                         } else {
                             return redirect('/dtr/' . now('year'));
                         }
                     }
                 } else {
                     if (is_year($param1) && is_month($param2) && is_day($param3)) {
                         return $this->makeDayEmployeeView($request, $param1, $param2, $param3, $param4);
                     } else {
                         return redirect('/dtr/' . now('year'));
                     }
                 }
             }
         }
     }
     //.'/'.now('month'));//return $this->makeListView($request, $param1, $param2, $param3);
 }
开发者ID:jrsalunga,项目名称:gi-manager,代码行数:33,代码来源:DtrController.php

示例2: guidOrAction

 /**
  * @param $request
  * @return mixed
  */
 public function guidOrAction($request)
 {
     $segment = $request->segment(4, 'index');
     if (is_uuid($segment)) {
         $this->uuid = $segment;
         return $request->segment(5, 'index');
     }
     return $segment;
 }
开发者ID:donny5300,项目名称:modulair-router,代码行数:13,代码来源:BaseMiddleWare.php

示例3: getDaily

 public function getDaily(Request $request)
 {
     $where = [];
     $fields = ['component', 'supplier', 'expense', 'expscat', 'compcat'];
     $filter = new StdClass();
     if ($request->has('itemid') && $request->has('table') && $request->has('item')) {
         $id = strtolower($request->input('itemid'));
         $table = strtolower($request->input('table'));
         $c = '\\App\\Models\\' . ucfirst($table);
         $i = $c::find($id);
         if (strtolower($request->input('item')) == strtolower($i->descriptor)) {
             $item = $request->input('item');
             if (is_uuid($id) && in_array($table, $fields)) {
                 $where[$table . '.id'] = $id;
             } else {
                 if ($table === 'payment') {
                     $where['purchase.terms'] = $id;
                 }
             }
             $filter->table = $table;
             $filter->id = $id;
             $filter->item = $item;
         } else {
             $filter->table = '';
             $filter->id = '';
             $filter->item = '';
         }
     } else {
         $filter->table = '';
         $filter->id = '';
         $filter->item = '';
     }
     $bb = $this->bossBranch();
     $res = $this->setDateRangeMode($request, 'daily');
     //if(!$request->has('branchid')) {
     if (is_null($request->input('branchid'))) {
         return $this->setDailyViewVars('component.purchased.daily', null, $bb, null, $filter, null, null, null, null, null);
     }
     if (!is_uuid($request->input('branchid')) || !in_array(strtoupper($request->input('branchid')), $this->branch->all()->pluck('id')->all())) {
         return redirect('/component/purchases')->with('alert-warning', 'Please select a branch.');
     }
     try {
         $branch = $this->branch->find(strtolower($request->input('branchid')));
     } catch (Exception $e) {
         return $this->setDailyViewVars('component.purchased.daily', null, $bb, null, $filter, null, null, null, null, null);
     }
     $where['purchase.branchid'] = $branch->id;
     $purchases = $this->purchased->branchByDR($branch, $this->dr)->findWhere($where);
     $components = $this->purchased->brComponentByDR($this->dr)->findWhere($where);
     $compcats = $this->purchased->brCompCatByDR($this->dr)->findWhere($where);
     $expenses = $this->purchased->brExpenseByDR($this->dr)->findWhere($where);
     $expscats = $this->purchased->brExpsCatByDR($this->dr)->findWhere($where);
     $suppliers = $this->purchased->brSupplierByDR($this->dr)->findWhere($where);
     $payments = $this->purchased->brPaymentByDR($this->dr)->findWhere($where);
     return $this->setDailyViewVars('component.purchased.daily', $purchases, $bb, $branch, $filter, $components, $compcats, $expenses, $expscats, $suppliers, $payments);
 }
开发者ID:jrsalunga,项目名称:gi-boss,代码行数:56,代码来源:Purchase2Controller.php

示例4: getRoute

 public function getRoute(Request $request, $param1 = null)
 {
     if (!is_null($param1) && $param1 == 'print') {
         return $this->getPrintIndex($request);
     } else {
         if (!is_null($param1) && is_uuid($param1)) {
             return $this->getEmployeeDtr($request, $param1);
         } else {
             return $this->getIndex($request);
         }
     }
 }
开发者ID:jrsalunga,项目名称:gi-cashier,代码行数:12,代码来源:TimesheetController.php

示例5: getStatus

 public function getStatus(Request $request, $branchid = NULL)
 {
     $branches = $this->repository->all(['code', 'descriptor', 'id']);
     if (is_null($branchid)) {
         $branch = null;
         $dailysales = null;
         return $this->setViewWithDR(view('status.branch')->with('dailysales', $dailysales)->with('branches', $branches)->with('branch', $branch));
     }
     if (!is_uuid($branchid)) {
         return redirect('/status/branch')->withErrors(['message' => 'Invalid branchid']);
     }
     $branch = $this->repository->find($branchid, ['code', 'descriptor', 'mancost', 'id']);
     $dailysales = $this->ds->branchByDR($branch, $this->dr);
     return $this->setViewWithDR(view('status.branch')->with('dailysales', $dailysales)->with('branches', $branches)->with('branch', $branch));
 }
开发者ID:jrsalunga,项目名称:gi-boss,代码行数:15,代码来源:BranchController.php

示例6: sim_to_db

 function sim_to_db($uuid1, $uuid2)
 {
     is_uuid($uuid1) or die('invalid uuid1');
     is_uuid($uuid2) or die('invalid uuid2');
     if (!$this->sim_in_db($uuid1, $uuid2)) {
         $query = sprintf("INSERT INTO %s (uuid1, uuid2) VALUES ('%s', '%s');", TBL_SIM, $uuid1, $uuid2);
         if (!$this->db->queryExec($query, $error)) {
             die($error);
         }
     }
 }
开发者ID:hstehr,项目名称:Testeley,代码行数:11,代码来源:LitDb.php

示例7: foreach

 $hud[$n]['html'] .= "<span class='hud_title' onclick=\"document.location.href='" . PROJECT_PATH . "/app/voicemails/voicemail_messages.php';\">" . $text['label-voicemail'] . "</span>";
 $hud[$n]['html'] .= "<span class='hud_stat' onclick=\"\$('#hud_'+" . $n . "+'_details').slideToggle('fast');\">" . $messages['new'] . "</span>";
 $hud[$n]['html'] .= "<span class='hud_stat_title' onclick=\"\$('#hud_'+" . $n . "+'_details').slideToggle('fast');\">" . $text['label-new_messages'] . "</span>\n";
 $hud[$n]['html'] .= "<div class='hud_details' id='hud_" . $n . "_details'>";
 if (sizeof($voicemails) > 0) {
     $hud[$n]['html'] .= "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>";
     $hud[$n]['html'] .= "<tr>";
     $hud[$n]['html'] .= "\t<th class='hud_heading' width='50%'>" . $text['label-voicemail'] . "</th>";
     $hud[$n]['html'] .= "\t<th class='hud_heading' style='text-align: center;' width='50%'>" . $text['label-new'] . "</th>";
     $hud[$n]['html'] .= "\t<th class='hud_heading' style='text-align: center;'>" . $text['label-total'] . "</th>";
     $hud[$n]['html'] .= "</tr>";
     $c = 0;
     $row_style["0"] = "row_style0";
     $row_style["1"] = "row_style1";
     foreach ($messages as $voicemail_uuid => $row) {
         if (is_uuid($voicemail_uuid)) {
             $tr_link = "href='" . PROJECT_PATH . "/app/voicemails/voicemail_messages.php?id=" . $voicemail_uuid . "'";
             $hud[$n]['html'] .= "<tr " . $tr_link . " style='cursor: pointer;'>";
             $hud[$n]['html'] .= "\t<td class='" . $row_style[$c] . " hud_text'><a href='" . PROJECT_PATH . "/app/voicemails/voicemail_messages.php?id=" . $voicemail_uuid . "'>" . $row['ext'] . "</a></td>";
             $hud[$n]['html'] .= "\t<td class='" . $row_style[$c] . " hud_text' style='text-align: center;'>" . $row['new'] . "</td>";
             $hud[$n]['html'] .= "\t<td class='" . $row_style[$c] . " hud_text' style='text-align: center;'>" . $row['total'] . "</td>";
             $hud[$n]['html'] .= "</tr>";
             $c = $c ? 0 : 1;
         }
     }
     $hud[$n]['html'] .= "</table>";
 } else {
     $hud[$n]['html'] .= "<br />" . $text['label-no_voicemail_assigned'];
 }
 $hud[$n]['html'] .= "</div>";
 $n++;
开发者ID:urueedi,项目名称:fusionpbx,代码行数:31,代码来源:user_dashboard.php

示例8: get_uuids_by_author

 function get_uuids_by_author($author)
 {
     $json = $this->fetch_docs_by_author($author);
     $res = json_decode($json, true);
     $uuids = array();
     foreach ($res["documents"] as $doc) {
         if (isset($doc["uuid"]) && is_uuid($doc["uuid"])) {
             $uuids[] = $doc["uuid"];
         }
     }
     return $uuids;
 }
开发者ID:hstehr,项目名称:Testeley,代码行数:12,代码来源:Mendeley.php

示例9: explode

         }
     }
 }
 echo "\t</optgroup>\n";
 //}
 echo "\t</select>\n";
 //echo "	<input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' style='visibility:hidden;' name='' alt='".$text['button-back']."' onclick='change_to_input(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='&#9665;'>\n";
 echo "</td>\n";
 //data
 echo "<td class='vtablerow' onclick=\"label_to_form('label_dialplan_detail_data_" . $x . "','dialplan_detail_data_" . $x . "');\" style='width: 100%; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;' nowrap='nowrap'>\n";
 if ($element['hidden']) {
     $dialplan_detail_data_mod = $dialplan_detail_data;
     if ($dialplan_detail_type == 'bridge') {
         // parse out gateway uuid
         $bridge_statement = explode('/', $dialplan_detail_data);
         if ($bridge_statement[0] == 'sofia' && $bridge_statement[1] == 'gateway' && is_uuid($bridge_statement[2])) {
             // retrieve gateway name from db
             $sql = "select gateway from v_gateways where gateway_uuid = '" . $bridge_statement[2] . "' ";
             $prep_statement = $db->prepare(check_sql($sql));
             $prep_statement->execute();
             $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
             if (count($result) > 0) {
                 $gateway_name = $result[0]['gateway'];
                 $dialplan_detail_data_mod = str_replace($bridge_statement[2], $gateway_name, $dialplan_detail_data);
             }
             unset($prep_statement, $sql, $bridge_statement);
         }
     }
     echo "\t<label id=\"label_dialplan_detail_data_" . $x . "\">" . htmlspecialchars($dialplan_detail_data_mod) . "</label>\n";
 }
 echo "\t<input id='dialplan_detail_data_" . $x . "' name='dialplan_details[" . $x . "][dialplan_detail_data]' class='formfld' type='text' style='width: 100%; min-width: 100%; max-width: 100%; " . $element['visibility'] . "' placeholder='' value=\"" . htmlspecialchars($dialplan_detail_data) . "\">\n";
开发者ID:reliberate,项目名称:fusionpbx,代码行数:31,代码来源:dialplan_edit.php

示例10: route

 /**
  * @param $namespace
  * @param $module
  * @param $controller
  * @param $uuidOrAction
  * @param $action
  * @param $extra
  * @param $extra2
  */
 public function route($namespace, $module, $controller, $uuidOrAction, $action, $extra, $extra2)
 {
     $this->route = ['namespace' => $namespace, 'module' => $module, 'controller' => $controller, 'action' => $this->getControllerMethod($uuidOrAction, $action), 'uuid' => is_uuid($uuidOrAction) ? $uuidOrAction : null, 'extra' => $extra, 'extra2' => $extra2];
 }
开发者ID:donny5300,项目名称:modulair-router,代码行数:13,代码来源:Router.php

示例11: text

//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('device_add')) {
    //access granted
} else {
    echo "access denied";
    exit;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//set the http get/post variable(s) to a php variable
if (isset($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
    $device_profile_uuid = $_REQUEST["id"];
}
//set the default
$save = true;
//get the device
$sql = "SELECT * FROM v_device_profiles ";
$sql .= "where device_profile_uuid = '" . $device_profile_uuid . "' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$device_profiles = $prep_statement->fetchAll(PDO::FETCH_NAMED);
//get device keys
$sql = "SELECT * FROM v_device_keys ";
$sql .= "WHERE device_profile_uuid = '" . $device_profile_uuid . "' ";
$sql .= "ORDER by ";
$sql .= "CASE device_key_category ";
开发者ID:powerpbx,项目名称:fusionpbx,代码行数:31,代码来源:device_profile_copy.php

示例12: text

require_once "resources/require.php";
//check permissions
require_once "resources/check_auth.php";
if (permission_exists('group_delete') || if_group("superadmin")) {
    //access allowed
} else {
    echo "access denied";
    return;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//get the http value and set as a variable
$group_uuid = check_str($_GET["id"]);
//validate the uuid
if (is_uuid($group_uuid)) {
    //get the group from v_groups
    $sql = "select domain_uuid, group_name from v_groups ";
    $sql .= "where group_uuid = '" . $group_uuid . "' ";
    if (!permission_exists('group_domain')) {
        $sql .= "and (domain_uuid = '" . $_SESSION['domain_uuid'] . "' or domain_uuid is null); ";
    }
    $prep_statement = $db->prepare(check_sql($sql));
    $prep_statement->execute();
    $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
    foreach ($result as &$row) {
        $domain_uuid = $row["domain_uuid"];
        $group_name = $row["group_name"];
    }
    unset($prep_statement);
    //delete the group users
开发者ID:kevinlovesing,项目名称:fusionpbx,代码行数:31,代码来源:groupdelete.php

示例13: unset

$sql .= "ELSE 100 END, ";
if ($db_type == "mysql") {
    $sql .= "device_key_id ASC ";
} else {
    $sql .= "CAST(device_key_id as numeric) ASC, ";
}
$sql .= "CASE WHEN device_uuid IS NULL THEN 0 ELSE 1 END ASC ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$keys = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($sql, $prep_statement);
//override profile keys with device keys
foreach ($keys as $row) {
    $id = $row['device_key_id'];
    $device_keys[$id] = $row;
    if (is_uuid($row['device_profile_uuid'])) {
        $device_keys[$id]['device_key_owner'] = "profile";
    } else {
        $device_keys[$id]['device_key_owner'] = "device";
    }
}
unset($keys);
//get the vendor count and last and device information
$vendor_count = 0;
foreach ($device_keys as $row) {
    if ($previous_vendor != $row['device_key_vendor']) {
        $previous_vendor = $row['device_key_vendor'];
        $device_uuid = $row['device_uuid'];
        $device_key_vendor = $row['device_key_vendor'];
        $device_key_id = $row['device_key_id'];
        $device_key_line = $row['device_key_line'];
开发者ID:powerpbx,项目名称:fusionpbx,代码行数:31,代码来源:device_dashboard.php

示例14: filemtime

             $record['fax_destination'] = $cdr['destination_number'];
             $record['fax_caller_id_name'] = $cdr['caller_id_name'];
             $record['fax_caller_id_number'] = $cdr['caller_id_number'];
             $record['fax_date'] = $cdr['start_stamp'];
             $record['fax_epoch'] = $cdr['start_epoch'];
         } else {
             $record['fax_caller_id_name'] = $fax_extension_cid[$domain_uuid][$fax_ext]['name'];
             $record['fax_caller_id_number'] = $fax_extension_cid[$domain_uuid][$fax_ext]['number'];
             $record['fax_epoch'] = filemtime($fax_file_path);
             $record['fax_date'] = date("Y-m-d H:i:s", $record['fax_epoch']);
         }
         unset($prep_statement, $sql, $cdr);
     }
 }
 //create record in the db
 if (is_uuid($record['fax_uuid']) && is_uuid($record['fax_file_uuid'])) {
     $sql = "insert into v_fax_files ";
     $sql .= "( ";
     $sql .= "fax_file_uuid, ";
     $sql .= "fax_uuid, ";
     $sql .= "domain_uuid, ";
     $sql .= "fax_mode, ";
     $sql .= "fax_destination, ";
     $sql .= "fax_file_type, ";
     $sql .= "fax_file_path, ";
     $sql .= "fax_caller_id_name, ";
     $sql .= "fax_caller_id_number, ";
     $sql .= "fax_date, ";
     $sql .= "fax_epoch ";
     $sql .= ") ";
     $sql .= "values ";
开发者ID:romonzaman,项目名称:fusionpbx-scripts,代码行数:31,代码来源:fax_import.php

示例15: Mendeley

# Testeley - Testing the Mendeley API
#
# Script: details.php
#
# Takes a UUID and displays the document details.
#
# HS 2011-06-15
##########################################################
require_once 'config.inc.php';
require_once 'functions.inc.php';
require_once 'Mendeley.php';
require_once 'LitDb.php';
$mendeley = new Mendeley(API_KEY);
if (isset($_GET['uuid']) && $_GET['uuid'] != "") {
    $uuid = $_GET['uuid'];
    is_uuid($uuid) or die('invalid uuid');
    if (isset($_GET['format']) && $_GET['format'] == "raw") {
        $json = $mendeley->fetch_details($uuid);
        format_json($json);
    } else {
        html_header();
        link_home();
        $paper = $mendeley->get_document($uuid);
        $paper->format_html();
        $db = new LitDb(DB_PATH);
        if ($db->in_db($paper->uuid)) {
            echo '</p>Paper already in DB</p>';
        } else {
            $db->to_db($paper);
            echo '<p>Paper added to DB</p>';
        }
开发者ID:hstehr,项目名称:Testeley,代码行数:31,代码来源:details.php


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