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


PHP FreePBX::Hotelwakeup方法代碼示例

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


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

示例1: unlink

Currently maintained by the PBX Open Source Software Alliance
https://github.com/POSSA/Hotel-Style-Wakeup-Calls
Last modified Oct 15, 2012
**********************************************************/
/***** remove check for updates now that module is pushed from FreePBX repo ***
// check to see if user has automatic updates enabled in FreePBX settings
$cm =& cronmanager::create($db);
$online_updates = $cm->updates_enabled() ? true : false;

// check dev site to see if new version of module is available
if ($online_updates && $foo = hotelwakeup_vercheck()) {
	print "<br>A <b>new version of this module is available</b> from the <a target='_blank' href='http://pbxossa.org'>PBX Open Source Software Alliance</a><br>";
	}
******************************************************************************/
echo FreePBX::Hotelwakeup()->showPage();
return;
// Process form if button B1 is clicked
if (isset($_POST['B1'])) {
    hotelwakeup_saveconfig();
}
// Process form if delete button clicked
if (isset($_POST['DELETE'])) {
    if (file_exists($_POST['filename'])) {
        unlink($_POST['filename']);
    }
}
//  Process form if Schedule button clicked
if (isset($_POST['SCHEDULE'])) {
    $HH = $_POST['HH'];
    $MM = $_POST['MM'];
開發者ID:ringfreejohn,項目名稱:pbxframework,代碼行數:30,代碼來源:page.hotelwakeup.php

示例2: sim_playback

        if ($lang == 'ja') {
            sim_playback($AGI, "10-minutes-from-now&rqsted-wakeup-for");
        } else {
            sim_playback($AGI, "rqsted-wakeup-for&digits/10&minutes&vm-from&now");
        }
        FreePBX::Hotelwakeup()->addWakeup($number, $time_wakeup, $lang);
        $AGI->hangup();
        break;
    case 4:
        $time_wakeup += 900;
        if ($lang == 'ja') {
            sim_playback($AGI, "15-minutes-from-now&rqsted-wakeup-for");
        } else {
            sim_playback($AGI, "rqsted-wakeup-for&digits/15&minutes&vm-from&now");
        }
        FreePBX::Hotelwakeup()->addWakeup($number, $time_wakeup, $lang);
        $AGI->hangup();
        break;
}
sim_playback($AGI, "goodbye");
$AGI->hangup();
/**
 * Simulate playback functionality like the dialplan
 * @param  object $AGI  The AGI Object
 * @param  string $file Audio files combined by/with '&'
 */
function sim_playback($AGI, $file)
{
    $files = explode('&', $file);
    foreach ($files as $f) {
        $AGI->stream_file($f);
開發者ID:ringfreejohn,項目名稱:pbxframework,代碼行數:31,代碼來源:wakeconfirm.php


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