function _moduleContent(&$smarty, $module_name) { //include elastix framework include_once "libs/paloSantoGrid.class.php"; include_once "libs/paloSantoValidar.class.php"; include_once "libs/paloSantoConfig.class.php"; include_once "libs/misc.lib.php"; include_once "libs/paloSantoForm.class.php"; include_once "libs/xajax/xajax.inc.php"; //include module files include_once "modules/{$module_name}/configs/default.conf.php"; include_once "modules/{$module_name}/libs/paloSantoDeleteModule.class.php"; global $arrConf; //include lang local module global $arrLangModule; $lang = get_language(); $lang_file = "modules/{$module_name}/lang/{$lang}.lang"; $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); if (file_exists("{$base_dir}/{$lang_file}")) { include_once $lang_file; } else { include_once "modules/{$module_name}/lang/en.lang"; } //folder path for custom templates $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $templates_dir = isset($arrConfig['templates_dir']) ? $arrConfig['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; require_once 'libs/paloSantoDB.class.php'; $pDB_acl = new paloDB($arrConf['elastix_dsn']['acl']); if (!empty($pDB_acl->errMsg)) { echo "ERROR DE DB: {$pDB_acl->errMsg} <br>"; } $pDB_menu = new paloDB($arrConf['elastix_dsn']['menu']); if (!empty($pDB_menu->errMsg)) { echo "ERROR DE DB: {$pDB_menu->errMsg} <br>"; } $xajax = new xajax(); $xajax->registerFunction("mostrar_menu"); $xajax->processRequests(); $content = $xajax->printJavascript("libs/xajax/"); $delete = isset($_POST['delete']) ? $_POST['delete'] : ''; if ($delete != '') { $accion = 'delete_module'; } else { $accion = "report_delete_module"; } switch ($accion) { case 'delete_module': $content .= delete_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl, $pDB_menu); break; default: $content .= report_delete_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl); break; } return $content; }
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; }
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/Source/serviciotecnico/utilidades/xajax/xajax.inc.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/Source/eventos/consultasHome.php'; $xajax = new xajax(); $xajax->registerFunction("mostrarCompras"); $xajax->registerFunction("mostrarVentas"); $xajax->processRequests(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Sistema EDUGER</title> <?php $xajax->printJavascript("../serviciotecnico/utilidades/xajax/"); ?> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style8 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; } --> </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
$xajaxFiller = new xajaxElementFiller(); $xajaxFiller->setDefaultOptionName($GLOBALS['lang_Common_Select']); if ($provlist) { $objResponse->addAssign('lrState', 'innerHTML', '<select name="txtState" id="txtState"><option value="0">--- ' . $GLOBALS['lang_Common_Select'] . ' ---</option></select>'); $objResponse = $xajaxFiller->cmbFillerById($objResponse, $provlist, 1, 'lrState', 'txtState'); } else { $objResponse->addAssign('lrState', 'innerHTML', '<input type="text" name="txtState" id="txtState" value="">'); } $objResponse->addScript('document.getElementById("txtState").Focus();'); $objResponse->addScript("document.frmLocation.txtDistrict.options.length = 1;"); $objResponse->addAssign('status', 'innerHTML', ''); return $objResponse->getXML(); } $objAjax = new xajax(); $objAjax->registerFunction('populateStates'); $objAjax->processRequests(); $sysConst = new sysConf(); $locRights = $_SESSION['localRights']; if (isset($this->getArr['capturemode']) && $this->getArr['capturemode'] == 'addmode') { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php $objAjax->printJavascript(); ?> <script type="text/javascript" src="../../scripts/archive.js"></script> <script>
function admin_xajax_live() { if (!$this->admin_xajax_live_flag) { $this->admin_xajax_live_flag = true; include_once dirname(__FILE__) . '/xajax.inc.php'; include_once dirname(__FILE__) . '/xajax.class.php'; global $admin_xajax_live; $admin_xajax_live = new xajax(); $admin_xajax_live->setCharEncoding('utf-8'); $admin_xajax_live->decodeUTF8InputOn(); $admin_xajax_live->registerFunction('ChangeStatus'); $admin_xajax_live->registerFunction('AdminResponse'); $admin_xajax_live->registerFunction('AdminSound'); $admin_xajax_live->registerFunction('AdminDecline'); $admin_xajax_live->registerFunction('AdminChatHistory'); $admin_xajax_live->registerFunction('AdminPostdata'); $admin_xajax_live->registerFunction('EndChats'); $admin_xajax_live->registerFunction('GetEndChat'); $admin_xajax_live->registerFunction('AdminExit'); $admin_xajax_live->processRequests(); } }
function _moduleContent(&$smarty, $module_name) { //include module files include_once "modules/{$module_name}/configs/default.conf.php"; global $arrConf; $arrConf['cadena_dsn'] = "mysql://*****:*****@localhost/hispana"; // _pre($arrConf); // _pre($_SESSION); /* global $arrLang; #incluir el archivo de idioma de acuerdo al que este seleccionado #si el archivo de idioma no existe incluir el idioma por defecto $lang=get_language(); $script_dir=dirname($_SERVER['SCRIPT_FILENAME']); // Include language file for EN, then for local, and merge the two. include_once("modules/$module_name/lang/en.lang"); $lang_file="modules/$module_name/lang/$lang.lang"; if (file_exists("$script_dir/$lang_file")) { $arrLangModuleEN = $arrLangModule; include_once($lang_file); $arrLangModule = array_merge($arrLangModuleEN, $arrLangModule); } */ load_language_module($module_name); require_once "modules/{$module_name}/libs/paloSantoDataForm.class.php"; //folder path for custom templates $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $templates_dir = isset($arrConfig['templates_dir']) ? $arrConfig['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; // Definición del formulario de nueva formulario $smarty->assign("MODULE_NAME", $module_name); $smarty->assign("REQUIRED_FIELD", _tr('Required field')); $smarty->assign("CANCEL", _tr('Cancel')); $smarty->assign("APPLY_CHANGES", _tr('Apply changes')); $smarty->assign("SAVE", _tr('Save')); $smarty->assign("EDIT", _tr('Edit')); $smarty->assign("DESCATIVATE", _tr('Desactivate')); $smarty->assign("DELETE", _tr('Delete')); $smarty->assign("CONFIRM_CONTINUE", _tr('Are you sure you wish to continue?')); $smarty->assign("new_field", _tr('New Field')); $smarty->assign("add_field", _tr('Add Field')); $smarty->assign("update_field", _tr('Update Field')); $smarty->assign("CONFIRM_DELETE", _tr('Are you sure you wish to delete form?')); //Definicion de campos $formCampos = array('form_nombre' => array("LABEL" => _tr('Form Name'), "REQUIRED" => "yes", "INPUT_TYPE" => "TEXT", "INPUT_EXTRA_PARAM" => array("size" => "60"), "VALIDATION_TYPE" => "text", "VALIDATION_EXTRA_PARAM" => ""), 'form_description' => array("LABEL" => _tr('Form Description'), "REQUIRED" => "no", "INPUT_TYPE" => "TEXTAREA", "INPUT_EXTRA_PARAM" => "", "VALIDATION_TYPE" => "text", "VALIDATION_EXTRA_PARAM" => "", "COLS" => "33", "ROWS" => "2"), 'field_nombre' => array("LABEL" => _tr('Field Name'), "REQUIRED" => "yes", "INPUT_TYPE" => "TEXTAREA", "INPUT_EXTRA_PARAM" => "", "VALIDATION_TYPE" => "text", "VALIDATION_EXTRA_PARAM" => "", "COLS" => "50", "ROWS" => "2"), "order" => array("LABEL" => _tr('Order'), "REQUIRED" => "yes", "INPUT_TYPE" => "TEXT", "INPUT_EXTRA_PARAM" => array("size" => "3"), "VALIDATION_TYPE" => "numeric", "VALIDATION_EXTRA_PARAM" => "")); $smarty->assign("type", _tr('Type')); $smarty->assign("select_type", "type"); $arr_type = array("VALUE" => array("TEXT", "LIST", "DATE", "TEXTAREA", "LABEL"), "NAME" => array(_tr('Type Text'), _tr('Type List'), _tr('Type Date'), _tr('Type Text Area'), _tr('Type Label')), "SELECTED" => "TEXT"); $smarty->assign("option_type", $arr_type); $smarty->assign("item_list", _tr('List Item')); $smarty->assign("agregar", _tr('Add Item')); $smarty->assign("quitar", _tr('Remove Item')); $oForm = new paloForm($smarty, $formCampos); // print_r($_SESSION['ayuda']); $xajax = new xajax(); $xajax->registerFunction("agregar_campos_formulario"); $xajax->registerFunction("cancelar_formulario_ingreso"); $xajax->registerFunction("guardar_formulario"); $xajax->registerFunction("eliminar_campos_formulario"); $xajax->registerFunction("editar_campo_formulario"); $xajax->registerFunction("update_campo_formulario"); $xajax->registerFunction("cancel_campo_formulario"); $xajax->registerFunction("desactivar_formulario"); $xajax->processRequests(); $smarty->assign("xajax_javascript", $xajax->printJavascript("libs/xajax/")); $pDB = new paloDB($arrConf['cadena_dsn']); if (!is_object($pDB->conn) || $pDB->errMsg != "") { $smarty->assign("mb_message", _tr('Error when connecting to database') . " " . $pDB->errMsg); } if (isset($_POST['submit_create_form'])) { $contenidoModulo = new_form($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { if (isset($_POST['edit'])) { $contenidoModulo = edit_form($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { if (isset($_POST['delete'])) { $contenidoModulo = delete_form($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == "view") { $contenidoModulo = view_form($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == "activar") { $contenidoModulo = activar_form($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == "editarCampo") { $contenidoModulo = editar_campo_status($pDB, $smarty, $module_name, $local_templates_dir, $formCampos, $oForm); } else { $contenidoModulo = listadoForm($pDB, $smarty, $module_name, $local_templates_dir); } } } } } } return $contenidoModulo; }