当前位置: 首页>>代码示例>>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;未经允许,请勿转载。