function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion $pDB = new paloDB($arrConf['dsn_conn_database']); //actions $accion = getAction(); $content = ""; switch ($accion) { case 'save': $content = savePuerto($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'new': case 'view': case 'edit': $content = NewViewPuerto($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $accion); break; case 'delete': $content = deletePuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'cancel': $content = reportPuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; default: $content = reportPuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); // se conecta a la base $pDB = new paloDB($arrConf['elastix_dsn']['elastix']); $pACL = new paloACL($pDB); $user = isset($_SESSION['elastix_user']) ? $_SESSION['elastix_user'] : ""; $uid = $pACL->getIdUser($user); //actions $accion = getAction(); $content = ""; switch ($accion) { case "save": $content = saveThemes($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $uid); break; default: $content = formThemes($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $uid); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //include module files include_once "libs/paloSantoOrganization.class.php"; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; //solo el susperadmin puede acceder a este modulo if ($arrCredentials["userlevel"] != "superadmin") { header("Location: index.php"); } //actions $accion = getAction(); $content = ""; switch ($accion) { case "apply": $content = applyOrgPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "getSelected": $content = getSelected($pDB, $arrCredentials["userlevel"]); break; default: $content = reportOrgPermission($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']['elastix']); //return array("idUser"=>$idUser,"id_organization"=>$idOrganization,"userlevel"=>$userLevel1,"domain"=>$domain); global $arrCredentials; //actions $accion = getAction(); switch ($accion) { case 'save': $content = saveExtensionSettings($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'checkFaxStatus': $content = checkFaxStatus('getFaxStatus', $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'showSendFax': $content = showSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'sendNewFax': $content = sendNewFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'faxAttachmentUpload': $content = faxAttachmentUpload($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; default: $content = showExtensionSettings($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['dsn_conn_database']); //actions $action = getAction(); $content = ""; switch ($action) { // case "save_dhcpclient": // $content = saveNewDhcpClient($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // break; case "new_dhcpclient": $content = viewFormDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "see_dhcpclient": $content = viewFormDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; // case "delete_list": // $content = delete_emailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // break; // case "delete_list": // $content = delete_emailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // break; default: $content = reportDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //require_once "modules/$module_name/configs/default.conf.php"; //require_once "modules/$module_name/libs/paloInterfaceSSE.class.php"; //require_once "modules/$module_name/libs/paloServerSentEvents.class.php"; //require_once "modules/$module_name/libs/paloControlPanelUtils.class.php"; //load_language_module($module_name); /* global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf,$arrConfModule); */ //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']; */ $local_templates_dir = getWebDirModule($module_name); // Valores estáticos comunes a todas las operaciones $smarty->assign('module_name', $module_name); $h = 'handleHTML_mainReport'; if (isset($_REQUEST['action'])) { $h = NULL; if (is_null($h) && function_exists('handleJSON_' . $_REQUEST['action'])) { $h = 'handleJSON_' . $_REQUEST['action']; } if (is_null($h)) { $h = 'handleJSON_unimplemented'; } } return call_user_func($h, $smarty, $module_name, $local_templates_dir); }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //user credentials global $arrCredentials; //solo superadmin puede ejecutar esta accion if ($arrCredentials['userlevel'] != 'superadmin') { return _tr('Invalid Action'); } //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $sContenidoModulo = ''; $sAccion = getParameter('action'); switch ($sAccion) { case 'new': case 'edit': $sContenidoModulo = modificarArchivo($module_name, $smarty, $local_templates_dir, $arrConf['astetcdir'], $sAccion); break; case 'list': default: $sContenidoModulo = listarArchivos($module_name, $smarty, $local_templates_dir, $arrConf['astetcdir']); break; } return $sContenidoModulo; }
function handleJSON_getContent($smarty, $module_name, $appletlist) { $respuesta = array('status' => 'success', 'message' => '(no message)'); $smarty->assign(array('sMsgStart' => _tr('Start process'), 'sMsgStop' => _tr('Stop process'), 'sMsgRestart' => _tr('Restart process'), 'sMsgActivate' => _tr('Enable process'), 'sMsgDeactivate' => _tr('Disable process'))); $listaIconos = array('Asterisk' => 'icon_pbx.png', 'OpenFire' => 'icon_im.png', 'Hylafax' => 'icon_fax.png', 'Postfix' => 'icon_email.png', 'MySQL' => 'icon_db.png', 'Apache' => 'icon_www.png', 'Dialer' => 'icon_headphones.png'); $sIconoDesconocido = 'system.png'; $arrServices = $this->getStatusServices(); foreach (array_keys($arrServices) as $sServicio) { switch ($arrServices[$sServicio]['status_service']) { case 'OK': $arrServices[$sServicio]['status_desc'] = _tr('Running'); $arrServices[$sServicio]['status_color'] = '#006600'; break; case 'Shutdown': $arrServices[$sServicio]['status_desc'] = _tr('Not running'); $arrServices[$sServicio]['status_color'] = '#880000'; break; default: $arrServices[$sServicio]['status_desc'] = _tr('Not installed'); $arrServices[$sServicio]['status_color'] = '#000088'; break; } $arrServices[$sServicio]['status_desc'] = strtoupper($arrServices[$sServicio]['status_desc']); $arrServices[$sServicio]['icon'] = isset($listaIconos[$sServicio]) ? $listaIconos[$sServicio] : $sIconoDesconocido; $arrServices[$sServicio]['name_service'] = _tr($arrServices[$sServicio]['name_service']); $arrServices[$sServicio]['status_service_icon'] = in_array($arrServices[$sServicio]['status_service'], array('OK', 'Shutdown')) ? 'icon_arrowdown.png' : 'icon_arrowdown-disabled.png'; $arrServices[$sServicio]['pointer_style'] = in_array($arrServices[$sServicio]['status_service'], array('OK', 'Shutdown')) ? 'pointer' : ''; } $smarty->assign('services', $arrServices); $local_templates_dir = getWebDirModule($module_name) . "/applets/ProcessesStatus/tpl"; $respuesta['html'] = $smarty->fetch("{$local_templates_dir}/process_status.tpl"); $json = new Services_JSON(); Header('Content-Type: application/json'); return $json->encode($respuesta); }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case "reloadAasterisk": $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "apply": $content = applyChanges($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; default: // view $content = viewGeneralSetting($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $dsn = generarDSNSistema('asteriskuser', 'asteriskcdrdb'); $pDB = new paloDB($dsn); //user credentials global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case 'delete': $content = deleteRecord($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case 'download': $content = downloadFile($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "display_record": $content = display_record($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; default: $content = reportMonitoring($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $pNet = new paloNetwork(); $arrEths = $pNet->obtener_interfases_red_fisicas(); //actions $accion = getAction(); switch ($accion) { case "edit_network": $content = editNetwork($smarty, $module_name, $local_templates_dir, $pNet); break; case "edit_interface": $content = editInterface($smarty, $module_name, $local_templates_dir, $pNet, $arrEths); break; case "save_network": $content = saveNetwork($smarty, $module_name, $local_templates_dir, $pNet); break; case "save_interface": $content = saveInterface($smarty, $module_name, $local_templates_dir, $pNet); break; default: $content = formNetwork($smarty, $module_name, $local_templates_dir, $pNet, $arrEths); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; //actions $action = getAction(); $content = ""; switch ($action) { case "save_new": $content = sendNewSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'checkFaxStatus': $content = checkFaxStatus(); break; default: // view_form $content = viewFormSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //include framework lib form include_once "libs/paloSantoForm.class.php"; //include email configuration files include_once "configs/email.conf.php"; include_once "libs/cyradm.php"; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; $accion = getAction(); $content = ""; switch ($accion) { case "update": $content = updateAntispam($smarty, $module_name, $local_templates_dir, $arrConf); break; default: $content = formAntispam($smarty, $module_name, $local_templates_dir, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case "new_conference": $content = viewFormConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view": $content = viewFormConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view_edit": $content = viewFormConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_new": $content = saveNewConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_edit": $content = saveEditConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "delete": $content = deleteConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "getConferenceMemb": $content = conferenceStatus($smarty, $pDB, $module_name, $arrCredentials); break; case "inviteCaller": $content = inviteCaller($smarty, $pDB, $module_name, $arrCredentials); break; case "muteCallers": $content = muteCallers($smarty, $pDB, $module_name, $arrCredentials); break; case "kickCallers": $content = kickCallers($smarty, $pDB, $module_name, $arrCredentials); break; case "showCallers": $content = showCallers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "updateShowCallers": $content = statusShowCallers($smarty, $pDB, $module_name, $arrCredentials, "updateShowCallers"); break; case "reloadAasterisk": $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; default: // report $content = reportConference($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['dsn_conn_database']); $action = getAction(); $content = ""; switch ($action) { case "config_echol": $content = viewFormConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // para configurar echo canceler break; case "config_echo": $content = viewFormConfEchoCardParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // para configurar echo canceler break; case 'config_span': $content = viewFormConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // para configurar span break; case 'config_param': $content = viewFormConfSpanParam($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // para configurar span break; case "save_new": $content = saveNewConfEchoCard($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // save conf echo canceler break; case "save_span": $content = saveNewConfSpan($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // save conf span break; /* case "setConfig": $content = setConfigHardware($pDB); break; */ /* case "setConfig": $content = setConfigHardware($pDB); break; */ case "detection": $content = hardwareDetect($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); // detection button break; default: $content = listPorts($smarty, $module_name, $local_templates_dir, $pDB); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { include_once "libs/paloSantoGrid.class.php"; include_once "libs/paloSantoForm.class.php"; include_once "libs/paloSantoOrganization.class.php"; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case "new_user": $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view": $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "edit": $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_new": $content = saveNewUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_edit": $content = saveEditUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "delete": $content = deleteUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "getGroups": $content = getGroups($pDB, $arrCredentials); break; case "getImage": $content = getImage($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "reloadAasterisk": $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "reconstruct_mailbox": $content = reconstruct_mailbox($pDB, $arrConf, $arrCredentials); break; /*case "changes_email_quota": $content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials); break;*/ /*case "changes_email_quota": $content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials); break;*/ default: // report $content = reportUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $arrFormDHCP = createFieldForm(); $oForm = new paloForm($smarty, $arrFormDHCP); $smarty->assign("REQUIRED_FIELD", _tr("Required field")); $smarty->assign("CONFIGURATION_UPDATE", _tr("Update")); $smarty->assign("SERVICE_START", _tr("Service Start")); $smarty->assign("SERVICE_STOP", _tr("Service Stop")); $smarty->assign("STATUS", _tr("Status")); $smarty->assign("START_RANGE_OF_IPS", _tr("Start range of IPs")); $smarty->assign("END_RANGE_OF_IPS", _tr("End range of IPs")); $smarty->assign("DNS_1", _tr("DNS 1")); $smarty->assign("DNS_2", _tr("DNS 2")); $smarty->assign("WINS", _tr("WINS")); $smarty->assign("GATEWAY", _tr("Gateway")); $smarty->assign("OPTIONAL", _tr("Optional")); $smarty->assign("icon", "web/apps/{$module_name}/images/system_network_dhcp_server.png"); $smarty->assign("OF_1_TO_50000_SECONDS", _tr("Of 1 to 50000 Seconds")); if (isset($_POST["in_iniciar"])) { $accion = "service_start"; } else { if (isset($_POST["in_finalizar"])) { $accion = "service_stop"; } else { if (isset($_POST["in_actualizar_conf_red"])) { $accion = "service_update"; } else { $accion = "service_show"; } } } $content = ""; switch ($accion) { case "service_start": $content = serviceStartDHCP($smarty, $module_name, $local_templates_dir, $oForm); break; case "service_stop": $content = serviceStopDHCP($smarty, $module_name, $local_templates_dir, $oForm); break; case "service_update": $content = serviceUpdateDHCP($smarty, $module_name, $local_templates_dir, $oForm); break; default: //service_show $content = serviceShowDHCP($smarty, $module_name, $local_templates_dir, $oForm); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $contenidoModulo = listRepositories($smarty, $module_name, $local_templates_dir, $arrConf); return $contenidoModulo; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; //actions $action = getAction(); $content = ""; switch ($action) { case "view_list": $content = viewFormEmaillist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "new_emaillist": $content = viewFormEmaillist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_newList": $content = saveNewList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "mailman_settings": $content = viewFormEmaillist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "saveMailmanSettings": $content = saveMailmanSettings($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "delete": $content = deleteEmailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "export": $content = exportMembers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view_memberlist": $content = reportMemberList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "new_memberlist": $content = viewFormMemberList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_newMember": $content = saveNewMember($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "remove_memberlist": $content = removeMemberList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; default: $content = reportEmailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $pDB = new paloDB($arrConf['dsn_conn_database']); switch (getParameter('action')) { case 'new': case 'edit': return addRemovePortsUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); default: return listPortKnockUsers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); } }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']['elastix']); //return array("idUser"=>$idUser,"id_organization"=>$idOrganization,"userlevel"=>$userLevel1,"domain"=>$domain); global $arrCredentials; //actions $accion = getAction(); switch ($accion) { case 'saveNew': $content = saveContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "saveEdit": $content = editContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'uploadImageContact': $content = uploadImageContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'deleteContacts': $content = deleteContacts($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'uploadCSV': $content = uploadCSV($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case 'templateContact': $content = templateContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "getImageExtContact": $content = getImageExtContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "getImageTmp": $content = getImageTmp($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "call2phone": $content = call2phone($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; case "transfer_call": $content = transferCALL($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; default: $content = reportContact($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; global $arrConfModule; $arrConf = array_merge($arrConf, $arrConfModule); //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); switch (getParameter('action')) { case 'csvdownload': return download_csv($smarty); default: return display_form($smarty, $module_name, $local_templates_dir); } }
function _moduleContent(&$smarty, $module_name) { //global variables global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $accion = getAction(); $content = ""; switch ($accion) { default: $content = report_AccessAudit($smarty, $module_name, $local_templates_dir); break; } return $content; }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); $pDB = new paloDB($arrConf['dsn_conn_database']); switch (getParameter('action')) { case 'setport': return setPortKnockPort($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); case 'viewauths': return listPortKnockCurrentAuths($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); default: return listPortKnockInterfaces($smarty, $module_name, $local_templates_dir, $pDB, $arrConf); } }
function _moduleContent(&$smarty, $module_name) { global $arrConf; include_once "libs/paloSantoForm.class.php"; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; switch (getAction()) { case 'save': return saveConfigs($smarty, $module_name, $local_templates_dir, $pDB, $arrCredentials); default: return showConfigs($smarty, $module_name, $local_templates_dir, $pDB, $arrCredentials); } }
function handleJSON_getContent($smarty, $module_name, $appletlist) { $respuesta = array('status' => 'success', 'message' => '(no message)'); $smarty->assign(array('LABEL_CPU' => _tr('CPU'), 'LABEL_RAM' => _tr('RAM'), 'LABEL_SWAP' => _tr('SWAP'), 'LABEL_CPUINFO' => _tr('CPU Info'), 'LABEL_UPTIME' => _tr('Uptime'), 'LABEL_CPUSPEED' => _tr('CPU Speed'), 'LABEL_MEMORYUSE' => _tr('Memory usage'))); $cpu_a = $this->obtener_muestra_actividad_cpu(); $fastgauge = $this->_getFastGraphics(); $cpuinfo = $this->getCPUInfo(); $speed = number_format($cpuinfo['CpuMHz'], 2) . " MHz"; $cpu_info = $cpuinfo['CpuModel']; $meminfo = $this->getMemInfo(); //MEMORY USAGE $fraction_mem_used = ($meminfo['MemTotal'] - $meminfo['MemFree'] - $meminfo['Cached'] - $meminfo['MemBuffers']) / $meminfo['MemTotal']; $inf2 = number_format($meminfo['MemTotal'] / 1024, 2) . " Mb"; //SWAP USAGE $fraction_swap_used = ($meminfo['SwapTotal'] - $meminfo['SwapFree']) / $meminfo['SwapTotal']; $inf3 = number_format($meminfo['SwapTotal'] / 1024, 2) . " Mb"; //UPTIME $upfields = array(); $up = $this->getUptime(); // Segundos de actividad desde arranque $upfields[] = $up % 60; $up = ($up - $upfields[0]) / 60; $upfields[] = $up % 60; $up = ($up - $upfields[1]) / 60; $upfields[] = $up % 24; $up = ($up - $upfields[2]) / 24; $upfields[] = $up; $uptime = $upfields[1] . ' ' . _tr('minute(s)'); if ($upfields[2] > 0) { $uptime = $upfields[2] . ' ' . _tr('hour(s)') . ' ' . $uptime; } if ($upfields[3] > 0) { $uptime = $upfields[3] . ' ' . _tr('day(s)') . ' ' . $uptime; } usleep(200000); $cpu_b = $this->obtener_muestra_actividad_cpu(); $fraction_cpu_used = $this->calcular_carga_cpu_intervalo($cpu_a, $cpu_b); $_SESSION[$module_name]['cpusample'] = $cpu_b; $smarty->assign(array('fastgauge' => $fastgauge, 'cpu_info' => $cpu_info, 'uptime' => $uptime, 'speed' => $speed, 'memtotal' => $inf2, 'swaptotal' => $inf3)); $smarty->assign($this->_formatGauges($fraction_cpu_used, $fraction_mem_used, $fraction_swap_used)); $local_templates_dir = getWebDirModule($module_name) . "/applets/SystemResources/tpl"; $respuesta['html'] = $smarty->fetch("{$local_templates_dir}/system_resources.tpl"); $json = new Services_JSON(); Header('Content-Type: application/json'); return $json->encode($respuesta); }
function _moduleContent(&$smarty, $module_name) { global $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case "new_outbound": $content = viewFormOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view": $content = viewFormOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view_edit": $content = viewFormOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_new": $content = saveNewOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_edit": $content = saveEditOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "delete": $content = deleteOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "checkName": $content = checkName($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "reloadAasterisk": $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "ordenRoute": $content = ordenRoute($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; default: // report $content = reportOutbound($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }
/** * resource actions => access * shutdown */ function _moduleContent(&$smarty, $module_name) { //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //user credentials global $arrCredentials; global $arrPermission; $action = getAction(); $content = ""; switch ($action) { case "shutdown": $content = shutdown($smarty, $module_name, $local_templates_dir, $arrPermission, $arrCredentials); default: $content = showModule($smarty, $module_name, $local_templates_dir, $arrPermission, $arrCredentials); } return $content; }
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 $arrConf; //folder path for custom templates $local_templates_dir = getWebDirModule($module_name); //conexion resource $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]); //user credentials global $arrCredentials; $action = getAction(); $content = ""; switch ($action) { case "new_queue": $content = viewQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view": $content = viewQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "view_edit": $content = viewQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_new": $content = saveNewQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "save_edit": $content = saveEditQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "delete": $content = deleteQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "reloadAasterisk": $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; case "get_destination_category": $content = get_destination_category($smarty, $module_name, $pDB, $arrConf, $arrCredentials); break; default: // report $content = reportQueue($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials); break; } return $content; }