本文整理匯總了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);