Пример #1
0
 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->EE->load->library('postmaster_task', array('base_path' => PATH_THIRD . 'postmaster/tasks/'));
     $method = 'create_task_action';
     if ($this->EE->input->get('id')) {
         $method = 'edit_task_action';
     }
     $this->action = $this->current_url('ACT', $this->EE->channel_data->get_action_id('Postmaster_mcp', $method));
     $this->button = 'Save Task';
 }
Пример #2
0
 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->parser_url = $this->parser_url . '&prefix=notice';
     $this->EE->load->driver('Interface_builder');
     $this->EE->load->library('postmaster_notification', array('base_path' => PATH_THIRD . 'postmaster/notifications/'));
     $method = 'create_notification_action';
     if ($this->EE->input->get('id')) {
         $method = 'edit_notification_action';
     }
     $this->action = $this->current_url('ACT', $this->EE->channel_data->get_action_id('Postmaster_mcp', $method));
     $this->button = 'Save Notification';
     $this->IB = $this->EE->interface_builder;
 }
Пример #3
0
<?php

function __autoload($className)
{
    global $conf;
    $fileparts = explode("_", $className);
    $classPath = $conf['paths']['basePath'] . "lib/" . implode("/", $fileparts) . ".inc.php";
    require $classPath;
}
// begin program execution
define("DEBUG_ENABLED", true);
set_time_limit(30);
$profiler = new Debug_Profiler();
$template = new Template_Base("wrapper");
if (isset($_REQUEST['xmpp'])) {
    try {
        $_xmpp = new XMPP_MucClient($_REQUEST['xmpp']['host'], $_REQUEST['xmpp']['port'], $_REQUEST['xmpp']['realm'], $_REQUEST['xmpp']['username'], $_REQUEST['xmpp']['password'], "xmpp/" . $_REQUEST['xmpp']['realm']);
        if ($_xmpp->isAuthenticated()) {
            $template->populate("status", "Authenticated ok");
        } else {
            $template->populate("status", "Could not authenticate");
        }
        $template->populate("loginform", "");
    } catch (Exception $e) {
        $template->setSubTemplate("loginform", "login");
        $template->populate("status", "<b>Something went wrong:</b><br />" . $e->getMessage() . "<br /><br />");
    }
} else {
    $template->setSubTemplate("loginform", "login");
    $template->populate("status", "");
}
Пример #4
0
 /**
  * @param $name string
  * @param $args array
  *
  * @magic call back
  * @return mixed
  */
 public function __call($name, array $args)
 {
     $callback = parent::getCallback($name);
     return call_user_func_array($callback, $args);
 }