function __construct()
 {
     $GLOBALS['phpgw_info']['flags']['noframework'] = true;
     require_once PHPGW_SERVER_ROOT . '/felamimail/inc/xajax.inc.php';
     $xajax = new xajax($GLOBALS['phpgw']->link('/felamimail/xajax.php', false, true), 'xajax_', 'utf-8');
     $xajax->waitCursorOff();
     $xajax->registerFunction("doXMLHTTP");
     $GLOBALS['phpgw_info']['flags']['java_script'] .= $xajax->getJavascript($GLOBALS['phpgw_info']['server']['webserver_url'] . '/felamimail/js/');
     $GLOBALS['phpgw']->js->validate_file('jsapi', 'jsapi', 'felamimail');
     $this->displayCharset = 'utf-8';
     if (!isset($_POST['composeid']) && !isset($_GET['composeid'])) {
         // create new compose session
         $this->bocompose = CreateObject('felamimail.bocompose', '', $this->displayCharset);
         $this->composeID = $this->bocompose->getComposeID();
     } else {
         // reuse existing compose session
         if (isset($_POST['composeid'])) {
             $this->composeID = $_POST['composeid'];
         } else {
             $this->composeID = $_GET['composeid'];
         }
         $this->bocompose = CreateObject('felamimail.bocompose', $this->composeID, $this->displayCharset);
     }
     $this->t = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
     $this->bofelamimail = CreateObject('felamimail.bofelamimail', $this->displayCharset);
     $this->mailPreferences = ExecMethod('felamimail.bopreferences.getPreferences');
     $this->t->set_unknowns('remove');
     $this->rowColor[0] = $GLOBALS['phpgw_info']["theme"]["bg01"];
     $this->rowColor[1] = $GLOBALS['phpgw_info']["theme"]["bg02"];
     if (!isset($GLOBALS['phpgw']->css) || !is_object($GLOBALS['phpgw']->css)) {
         $GLOBALS['phpgw']->css = createObject('phpgwapi.css');
     }
     $GLOBALS['phpgw']->css->validate_file('app', 'felamimail');
 }
Пример #2
0
function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoIncomingcallsmonitoring.class.php";
    // incluci� del xajax
    $xajax = new xajax();
    $xajax->waitCursorOff();
    $xajax->registerFunction("create_report");
    $xajax->processRequests();
    $content = $xajax->printJavascript("libs/xajax/");
    //include file language agree to elastix configuration
    //if file language not exists, then include language by default (en)
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    //conexion resource
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    //     $pDB = "";
    //actions
    $accion = getAction();
    switch ($accion) {
        default:
            $content .= '<div id="body_report">' . reportIncomingcallsmonitoring($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang) . '</div>';
            break;
    }
    return $content;
}
Пример #3
0
* Revision 0.01  2007/11/21 15:25:00  modified by solo
* Desc: page created

********************************************************************************/
header('Content-Type: text/html; charset=utf-8');
header('Expires: Sat, 01 Jan 2000 00:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
session_cache_limiter('public, no-store');
session_set_cookie_params(0);
if (!session_id()) {
    session_start();
}
setcookie('PHPSESSID', session_id());
error_reporting($_SESSION['error_report']);
require_once 'include/localization.class.php';
if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'groupadmin' && !is_array($_SESSION['curuser']['privileges']['report'])) {
    header("Location: portal.php");
}
$GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'report');
require_once "include/xajax.inc.php";
$xajax = new xajax("report.server.php");
$xajax->waitCursorOff();
$xajax->registerFunction("init");
$xajax->registerFunction("listReport");
$xajax->registerFunction("checkOut");
$xajax->registerFunction("setAccount");
$xajax->registerFunction("setClid");
$xajax->registerFunction("speedDate");