本文整理汇总了PHP中permission_exists函数的典型用法代码示例。如果您正苦于以下问题:PHP permission_exists函数的具体用法?PHP permission_exists怎么用?PHP permission_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了permission_exists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
echo "\t\t\t\t\t</select>\n";
echo "\t\t\t\t</td>\n";
echo "\t\t\t\t<td>\n";
echo "\t\t\t\t\t<select name='ring_group_destinations[" . $x . "][destination_timeout]' class='formfld' style='width:55px'>\n";
$i = 5;
while ($i <= 300) {
if ($i == $row['destination_timeout']) {
echo "\t\t\t\t<option value='{$i}' selected='selected'>{$i}</option>\n";
} else {
echo "\t\t\t\t<option value='{$i}'>{$i}</option>\n";
}
$i = $i + 5;
}
echo "\t\t\t\t\t</select>\n";
echo "\t\t\t\t</td>\n";
if (permission_exists('ring_group_prompt')) {
echo "\t\t\t<td>\n";
echo "\t\t\t\t<select class='formfld' style='width: 90px;' name='ring_group_destinations[" . $x . "][destination_prompt]'>\n";
echo "\t\t\t\t\t<option value=''></option>\n";
echo "\t\t\t\t\t<option value='1' " . ($row['destination_prompt'] ? "selected='selected'" : null) . ">" . $text['label-destination_prompt_confirm'] . "</option>\n";
//echo " <option value='2'>".$text['label-destination_prompt_announce]."</option>\n";
echo "\t\t\t\t</select>\n";
echo "\t\t\t</td>\n";
}
echo "\t\t\t\t<td> </td>\n";
echo "\t\t\t\t<td class='list_control_icons' style='width: 25px;'>";
if (strlen($row['ring_group_destination_uuid']) > 0) {
echo "<a href='ring_group_destination_delete.php?id=" . $row['ring_group_destination_uuid'] . "&ring_group_uuid=" . $row['ring_group_uuid'] . "&a=delete' alt='delete' onclick=\"return confirm('" . $text['confirm-delete'] . "')\">{$v_link_label_delete}</a>";
}
echo "\t\t\t\t</td>\n";
echo "\t\t\t</tr>\n";
示例2: Copyright
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('contact_note_edit') || permission_exists('contact_note_add')) {
//access granted
} else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
$contact_note_uuid = check_str($_REQUEST["id"]);
} else {
$action = "add";
}
示例3: if
echo $text['description-enabled'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "\t<tr>";
echo "\t\t<td colspan='2' align='right'>";
echo "\t\t\t<input type='hidden' name='id' value=\"{$user_uuid}\">";
echo "\t\t\t<input type='hidden' name='username_old' value=\"{$username}\">";
echo "\t\t\t<br>";
echo "\t\t\t<input type='button' class='btn' value='" . $text['button-save'] . "' onclick=\"document.getElementById('action').value = '" . $text['button-save'] . "'; if (check_password_strength(document.getElementById('password').value)) { submit_form(); }\">";
echo "\t\t</td>";
echo "\t</tr>";
echo "</table>";
echo "<br><br>";
echo "</form>";
echo "<script>\n";
//capture enter key to submit form
echo "\t\$(window).keypress(function(event){\n";
echo "\t\tif (event.which == 13) { submit_form(); }\n";
echo "\t});\n";
// convert password fields to text
echo "\tfunction submit_form() {\n";
echo "\t\t\$('input:password').css('visibility','hidden');\n";
echo "\t\t\$('input:password').attr({type:'text'});\n";
echo "\t\t\$('form#frm').submit();\n";
echo "\t}\n";
echo "</script>\n";
if (permission_exists('user_setting_view')) {
require "user_settings.php";
}
//include the footer
require_once "resources/footer.php";
示例4: Copyright
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('script_editor_save')) {
//access granted
} else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//get the uuid from http values
$clip_uuid = check_str($_GET["id"]);
//delete the clip
if (strlen($_GET["id"]) > 0) {
$sql = "delete from v_clips ";
$sql .= "where clip_uuid = '" . $clip_uuid . "' ";
$prep_statement = $db->prepare(check_sql($sql));
示例5: unset
$sql .= "'{$invoice_number}', ";
$sql .= "'{$invoice_type}', ";
$sql .= "'{$contact_uuid_from}', ";
$sql .= "'{$contact_uuid_to}', ";
$sql .= "'{$invoice_notes}', ";
$sql .= "now() ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
//set redirect
$_SESSION['message'] = $text['message-add'];
header("Location: invoices.php");
exit;
}
//if ($action == "add")
if ($action == "update" && permission_exists('invoice_edit')) {
$invoice_paid = check_str($_POST["invoice_paid"]);
if ($invoice_paid == '1') {
$invoice_paid_date = check_str($_POST["invoice_paid_date"]);
$invoice_paid_method = check_str($_POST["invoice_paid_method"]);
$invoice_paid_method_ref = check_str($_POST["invoice_paid_method_ref"]);
}
//set defaults
$invoice_paid = $invoice_paid != '1' ? 'null' : $invoice_paid;
$invoice_paid_date = $invoice_paid_date == '' ? 'null' : "'" . $invoice_paid_date . "'";
$invoice_paid_method = $invoice_paid_method == '' ? 'null' : "'" . $invoice_paid_method . "'";
$invoice_paid_method_ref = $invoice_paid_method_ref == '' ? 'null' : "'" . $invoice_paid_method_ref . "'";
$sql = "update v_invoices set ";
$sql .= "invoice_number = '{$invoice_number}', ";
$sql .= "invoice_type = '{$invoice_type}', ";
$sql .= "contact_uuid_from = '{$contact_uuid_from}', ";
示例6: Copyright
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "config.php";
if (permission_exists('content_edit')) {
//access granted
} else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//move down more than one level at a time
//update v_rss set rss_order = (rss_order+1) where rss_order > 2 or rss_order = 2
if (count($_GET) > 0) {
$rss_uuid = check_str($_GET["rss_uuid"]);
$rss_order = check_str($_GET["rss_order"]);
$sql = "SELECT rss_order FROM v_rss ";
$sql .= "where domain_uuid = '{$domain_uuid}' ";
示例7: foreach
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('fax_log_view')) {
//access granted
} else {
echo "access denied";
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach ($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//pre-populate the form
if (isset($_REQUEST["id"]) && isset($_REQUEST["fax_uuid"])) {
$fax_log_uuid = check_str($_REQUEST["id"]);
$fax_uuid = check_str($_REQUEST["fax_uuid"]);
$sql = "select * from v_fax_logs ";
$sql .= "where domain_uuid = '" . $domain_uuid . "' ";
$sql .= "and fax_log_uuid = '" . $fax_log_uuid . "' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$fax_log_uuid = $row["fax_log_uuid"];
$fax_success = $row["fax_success"];
$fax_result_code = $row["fax_result_code"];
$fax_result_text = $row["fax_result_text"];
示例8: text
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>
Copyright (C) 2015 All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('device_key_delete')) {
//access granted
} else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text();
$text = $language->get();
//get the id
if (isset($_GET["id"])) {
$id = $_GET["id"];
$device_uuid = check_str($_GET["device_uuid"]);
$device_profile_uuid = check_str($_GET["device_profile_uuid"]);
}
//delete device keys
示例9: Copyright
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
if (permission_exists('dialplan_add') || permission_exists('inbound_route_add') || permission_exists('outbound_route_add') || permission_exists('time_condition_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"])) {
$sip_profile_uuid = check_str($_REQUEST["id"]);
$sip_profile_name = check_str($_REQUEST["name"]);
}
//get the sip profile data
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
示例10: foreach
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll();
foreach ($result as $row3) {
$participant_pin = $row3['conference_pin_number'];
}
unset($prep_statement, $row3);
}
if (permission_exists('conference_interactive_view')) {
$td_onclick = "onclick=\"document.location.href='conference_interactive.php?c=" . $meeting_uuid . "'\"";
}
echo "<tr>\n";
echo "<td valign='top' class='" . $row_style[$c] . "' " . $td_onclick . ">";
echo permission_exists('conference_interactive_view') ? "<a href='conference_interactive.php?c=" . $meeting_uuid . "'>" . $conference_name . "</a>" : $conference_name;
echo "</td>\n";
echo "<td valign='top' class='" . $row_style[$c] . "' " . $td_onclick . ">" . $participant_pin . "</td>\n";
echo "<td valign='top' class='" . $row_style[$c] . "' " . $td_onclick . ">" . $member_count . "</td>\n";
echo "<td valign='top' class='" . $row_style[$c] . "' " . $td_onclick . ">";
echo permission_exists('conference_interactive_view') ? "<a href='conference_interactive.php?c=" . $meeting_uuid . "'>" . $text['button-view'] . "</a>" : " ";
echo "</td>\n";
echo "</tr>\n";
if ($c == 0) {
$c = 1;
} else {
$c = 0;
}
}
}
echo "</table>\n";
echo "<br /><br />";
}
示例11: Copyright
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_edit')) {
//access granted
} else {
echo "access denied";
exit;
}
$cmd = $_GET['cmd'];
$rdr = $_GET['rdr'];
//connect to event socket
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$response = event_socket_request($fp, 'api reloadxml');
$response = event_socket_request($fp, $cmd);
fclose($fp);
} else {
$response = '';
示例12: str_replace
*/
//check the permission
if (defined('STDIN')) {
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
preg_match("/^(.*)\\/core\\/.*\$/", $document_root, $matches);
$document_root = $matches[1];
set_include_path($document_root);
require_once "resources/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
$format = 'text';
//html, text
} else {
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('upgrade_schema') || permission_exists('upgrade_svn') || if_group("superadmin")) {
//echo "access granted";
} else {
echo "access denied";
exit;
}
$format = 'html';
}
require_once "resources/classes/text.php";
//add multi-lingual support
$language = new text();
$text = $language->get();
//show the title
if ($format == 'text') {
echo "\n";
echo $text['label-upgrade'] . "\n";
示例13: fax_enqueue
$response = fax_enqueue($fax_uuid, $fax_file, $wav_file, $mailto_address, $fax_uri, $fax_dtmf, $dial_string);
}
}
//wait for a few seconds
sleep(5);
//move the generated tif (and pdf) files to the sent directory
if (file_exists($dir_fax_temp . '/' . $fax_instance_uuid . ".tif")) {
copy($dir_fax_temp . '/' . $fax_instance_uuid . ".tif", $dir_fax_sent . '/' . $fax_instance_uuid . ".tif");
}
if (file_exists($dir_fax_temp . '/' . $fax_instance_uuid . ".pdf")) {
copy($dir_fax_temp . '/' . $fax_instance_uuid . ".pdf ", $dir_fax_sent . '/' . $fax_instance_uuid . ".pdf");
}
if (!$included) {
//redirect the browser
$_SESSION["message"] = $response;
if (permission_exists('fax_active_view')) {
header("Location: fax_active.php?id=" . $fax_uuid);
} else {
header("Location: fax_files.php?id=" . $fax_uuid . "&box=sent");
}
exit;
}
}
//end upload and send fax
if (!$included) {
//show the header
require_once "resources/header.php";
//javascript to toggle input/select boxes, add fax numbers
echo "<script language='JavaScript' type='text/javascript' src='" . PROJECT_PATH . "/resources/javascript/reset_file_input.js'></script>\n";
echo "<script language='JavaScript' type='text/javascript'>";
echo "\tfunction toggle(field) {";
示例14: unset
$sql .= "'{$broadcast_caller_id_name}', ";
$sql .= "'{$broadcast_caller_id_number}', ";
$sql .= "'{$broadcast_destination_type}', ";
$sql .= "'{$broadcast_phone_numbers}', ";
$sql .= "'{$broadcast_avmd}', ";
$sql .= "'{$broadcast_destination_data}', ";
$sql .= "'{$broadcast_accountcode}' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
$_SESSION["message"] = $text['confirm-add'];
header("Location: call_broadcast.php");
return;
}
//if ($action == "add")
if ($action == "update" && permission_exists('call_broadcast_edit')) {
$sql = "update v_call_broadcasts set ";
$sql .= "broadcast_name = '{$broadcast_name}', ";
$sql .= "broadcast_description = '{$broadcast_description}', ";
if (strlen($broadcast_timeout) == 0) {
$sql .= "broadcast_timeout = null, ";
} else {
$sql .= "broadcast_timeout = '{$broadcast_timeout}', ";
}
if (strlen($broadcast_concurrent_limit) == 0) {
$sql .= "broadcast_concurrent_limit = null, ";
} else {
$sql .= "broadcast_concurrent_limit = '{$broadcast_concurrent_limit}', ";
}
//$sql .= "recording_uuid = '$recording_uuid', ";
$sql .= "broadcast_caller_id_name = '{$broadcast_caller_id_name}', ";
示例15: unset
} else {
$c = 0;
}
}
//end foreach
unset($sql, $result, $row_count);
}
//end if results
echo "<tr>\n";
echo "<td colspan='5'>\n";
echo "\t<table width='100%' cellpadding='0' cellspacing='0'>\n";
echo "\t<tr>\n";
echo "\t\t<td width='33.3%' nowrap> </td>\n";
echo "\t\t<td width='33.3%' align='center' nowrap>{$paging_controls}</td>\n";
echo "\t\t<td width='33.3%' align='right'>\n";
if (permission_exists('hunt_group_add')) {
echo "\t\t\t<a href='hunt_group_edit.php' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>\n";
}
echo "\t\t</td>\n";
echo "\t</tr>\n";
echo "\t</table>\n";
echo "</td>\n";
echo "</tr>\n";
if ($v_path_show) {
echo "<tr>\n";
echo "<td align='left' colspan='4'>\n";
echo "<br />\n";
echo $_SESSION['switch']['scripts']['dir'] . "\n";
echo "</td>\n";
echo "</tr>\n";
}