function _moduleContent(&$smarty, $module_name) { //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $smarty->assign("title", _tr("Channels Usage Report")); $smarty->assign("icon", "web/apps/{$module_name}/images/reports_channel_usage.png"); if (isset($_GET['image'])) { $_GET['image'] = (int) $_GET['image']; displayGraph($module_name, "paloSantoChannelUsage", "channelsUsage", array($_GET['image']), "functionCallback"); } else { $listaGraficos = array('img_1' => 2, 'img_2' => 3, 'img_3' => 4, 'img_4' => 5, 'img_5' => 6, 'img_6' => 7); foreach (array_keys($listaGraficos) as $k) { $listaGraficos[$k] = "<img alt=\"{$listaGraficos[$k]}\" src=\"?menu={$module_name}&image={$listaGraficos[$k]}&rawmode=yes\" />"; } $smarty->assign($listaGraficos); return $smarty->fetch("{$local_templates_dir}/channelusage.tpl"); } }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $smarty->assign("title", _tr("Incoming Email")); $smarty->assign("icon", "../web/_common/images/bardoc.png"); if (isset($_GET['image'])) { $_GET['image'] = (int) $_GET['image']; displayGraph($module_name, "paloSantoPostfixStats", "postfixStats", array($_GET['image']), "functionCallback"); } else { $listaGraficos = array('img_1' => 0, 'img_2' => 1, 'img_3' => 2); foreach (array_keys($listaGraficos) as $k) { $listaGraficos[$k] = "<img alt=\"{$listaGraficos[$k]}\" src=\"?menu={$module_name}&image={$listaGraficos[$k]}&rawmode=yes\" />"; } $smarty->assign($listaGraficos); return $smarty->fetch("{$local_templates_dir}/form.tpl"); } }
function _moduleContent(&$smarty, $module_name) { //include module files include_once "modules/{$module_name}/configs/default.conf.php"; //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']; $smarty->assign("title", _tr("Incoming Email")); $smarty->assign("icon", "images/bardoc.png"); if (isset($_GET['image'])) { $_GET['image'] = (int) $_GET['image']; displayGraph($module_name, "paloSantoPostfixStats", "postfixStats", array($_GET['image']), "functionCallback"); } else { $listaGraficos = array('img_1' => 0, 'img_2' => 1, 'img_3' => 2); foreach (array_keys($listaGraficos) as $k) { $listaGraficos[$k] = "<img alt=\"{$listaGraficos[$k]}\" src=\"?menu={$module_name}&image={$listaGraficos[$k]}&rawmode=yes\" />"; } $smarty->assign($listaGraficos); return $smarty->fetch("{$local_templates_dir}/form.tpl"); } }
function _moduleContent(&$smarty, $module_name) { //include module files include_once "modules/{$module_name}/configs/default.conf.php"; $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 $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; $smarty->assign("title", $arrLang["Channels Usage Report"]); $smarty->assign("icon", "modules/{$module_name}/images/reports_channel_usage.png"); if (isset($_GET['image'])) { $_GET['image'] = (int) $_GET['image']; displayGraph($module_name, "paloSantoChannelUsage", "channelsUsage", array($_GET['image']), "functionCallback"); } else { $listaGraficos = array('img_1' => 2, 'img_2' => 3, 'img_3' => 4, 'img_4' => 5, 'img_5' => 6, 'img_6' => 7); foreach (array_keys($listaGraficos) as $k) { $listaGraficos[$k] = "<img alt=\"{$listaGraficos[$k]}\" src=\"?menu={$module_name}&image={$listaGraficos[$k]}&rawmode=yes\" />"; } $smarty->assign($listaGraficos); return $smarty->fetch("{$local_templates_dir}/channelusage.tpl"); } }
function executeImage($module_name, $sImage) { require_once "libs/paloSantoGraphImage.lib.php"; $arrParameterCallbyGraph = array(); $getParams = array('dini', 'dfin', 'ext'); foreach ($getParams as $k) { $arrParameterCallbyGraph[] = isset($_GET[$k]) ? $_GET[$k] : ''; } if ($sImage == 'imageTop10Entrantes') { displayGraph($module_name, "paloSantoReportCall", "callbackTop10Entrantes", $arrParameterCallbyGraph); } if ($sImage == 'imageTop10Salientes') { displayGraph($module_name, "paloSantoReportCall", "callbackTop10Salientes", $arrParameterCallbyGraph); } }
<?php //A javascript minor glitch that's not fixable must be included here instead include_once 'classes/EdittingTools.php'; include_once 'classes/DeviceForm.php'; //Make a new contact, a new tool bar, and a new form $tool = new EdittingTools(); $deviceForm = new DeviceForm("auto", 4); //get the new contact corresponding to the ID $devices = new Device($_GET['ID']); $status; $keyword = $_POST['keyword']; $options = array('THIS DEVICE', 'GLOBAL'); if ($_GET['action'] == showGraph) { $result = $_POST['list']; displayGraph($devices, $result); } else { if ($_GET['action'] == showGraphResult) { //get the new contact corresponding to the ID displayGraphResult($keyword); } else { if ($_GET['action'] == showGraphList) { if ($_POST['options'] == 'GLOBAL') { displayGraphListResult($keyword); } else { //get the new contact corresponding to the ID displayGraphList($devices); } } else { if ($_GET['action'] == showGraphListResult) { //get the new contact corresponding to the ID