當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FreePBX::Timeconditions方法代碼示例

本文整理匯總了PHP中FreePBX::Timeconditions方法的典型用法代碼示例。如果您正苦於以下問題:PHP FreePBX::Timeconditions方法的具體用法?PHP FreePBX::Timeconditions怎麽用?PHP FreePBX::Timeconditions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FreePBX的用法示例。


在下文中一共展示了FreePBX::Timeconditions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

#!/usr/bin/env php
<?php 
//include bootstrap
$restrict_mods = array('timeconditions' => true);
$bootstrap_settings['freepbx_auth'] = false;
if (!@(include_once getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) {
    include_once '/etc/asterisk/freepbx.conf';
}
$tc = \FreePBX::Timeconditions();
$conditions = $tc->listTimeconditions();
$groups = $tc->listTimeGroups();
$debug = false;
if (isset($argv[1]) && $argv[1] == "--debug") {
    $debug = true;
    print_r("Time Now:" . date("H:i|D|j|M|e") . "\n\n");
}
foreach ($conditions as $item) {
    tcout($debug, "==Working with TimeCondition:" . $item['displayname'] . "==");
    if (!$item['invert_hint']) {
        $not_inuse = 'NOT_INUSE';
        //true && deactivated
        $inuse = 'INUSE';
        //false && activated
        tcout($debug, "INVERTED BLF: false (NOT_INUSE = " . $not_inuse . " & INUSE = " . $inuse . ")");
    } else {
        $not_inuse = 'INUSE';
        //true && deactivated
        $inuse = 'NOT_INUSE';
        //false && activated
        tcout($debug, "INVERTED BLF: true (NOT_INUSE = " . $not_inuse . " & INUSE = " . $inuse . ")");
    }
開發者ID:ringfreejohn,項目名稱:pbxframework,代碼行數:31,代碼來源:schedtc.php

示例2: load_view

        break;
    default:
        $content = load_view(__DIR__ . '/views/timegroups/grid.php', array('request' => $request));
        break;
}
?>
<div class="container-fluid">
	<h1><?php 
echo $heading;
?>
</h1>
	<?php 
$errormsg = \FreePBX::Timeconditions()->errormsg;
if (!empty($errormsg)) {
    echo '<div class="alert alert-danger">' . $errormsg . '</div>';
    \FreePBX::Timeconditions()->errormsg = '';
}
?>
	<div class = "display full-border">
		<div class="row">
			<div class="col-sm-12">
				<div class="fpbx-container">
					<div class="display full-border">
						<?php 
echo $content;
?>
					</div>
				</div>
			</div>
		</div>
	</div>
開發者ID:ringfreejohn,項目名稱:pbxframework,代碼行數:31,代碼來源:page.timegroups.php

示例3: timeconditions_timegroups_buildtime

function timeconditions_timegroups_buildtime($hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish)
{
    _timeconditions_backtrace();
    return FreePBX::Timeconditions()->buildTime($hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish);
}
開發者ID:ringfreejohn,項目名稱:pbxframework,代碼行數:5,代碼來源:functions.inc.php


注:本文中的FreePBX::Timeconditions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。