本文整理汇总了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'];
示例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);