Esempio n. 1
0
 
Valid subparameters (where required):
	$_GET['m'] - id of mail info in db
	$_GET['t'] - id of target info in db
*/
header('Content-Encoding: none');
// turn off gzip.
require_once '../class2.php';
if (!getperms('W')) {
    header('location:' . e_BASE . 'index.php');
    exit;
}
$e_sub_cat = 'mail';
if ($_GET['mode'] == "progress") {
    session_write_close();
    sendProgress();
    exit;
}
require_once e_HANDLER . 'ren_help.php';
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_users.php');
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_mailout.php');
require_once e_HANDLER . 'userclass_class.php';
require_once e_HANDLER . 'mailout_class.php';
// Class handler for core mailout functions
require_once e_HANDLER . 'mailout_admin_class.php';
// Admin tasks handler
require_once e_HANDLER . 'mail_manager_class.php';
// Mail DB API
require_once e_HANDLER . 'message_handler.php';
$emessage =& eMessage::getInstance();
if ($_GET['mode'] == "process") {
Esempio n. 2
0
 function sendnowPage()
 {
     $id = $this->getId();
     $this->getResponse()->setTitle(LAN_MAILOUT_15 . SEP . 'Process Mail Queue #' . $id);
     e107::getDb()->update('mail_content', 'mail_content_status=' . MAIL_STATUS_PENDING . ' WHERE mail_source_id = ' . intval($id));
     e107::getDb()->update('mail_recipients', 'mail_status=' . MAIL_STATUS_PENDING . ' WHERE mail_detail_id = ' . intval($id));
     if (E107_DEBUG_LEVEL > 0) {
         echo "<h4>Debug Mode : Mail is sent and data displayed below. </h4>";
         sendProgress($id);
     } else {
         $pause = e107::getConfig()->get('mail_pausetime', 1);
         $interval = $pause * 1000;
         $text = e107::getForm()->progressBar('mail-progress', 1, array('btn-label' => 'Start', 'interval' => $interval, 'url' => e_SELF, 'mode' => $id));
     }
     return $text;
 }
Esempio n. 3
0
function sendAnswer()
{
    global $ourcallid;
    global $partycallid;
    global $answered;
    global $sentacm;
    global $isup;
    if ($answered) {
        return;
    }
    $m = new Yate("call.answered");
    $m->params["id"] = $ourcallid;
    $m->params["targetid"] = $partycallid;
    if ($isup) {
        if (!$sentacm) {
            sendProgress();
            usleep(50000);
        }
        $m->params["message-prefix"] = "isup.";
        $m->params["isup.protocol-type"] = $isup;
        $m->params["isup.message-type"] = "ANM";
    }
    $m->Dispatch();
    $answered = true;
}