function obtenerInfoClienteRecargable($id_campania_cliente, $numTelefono) { $pInterfazdeAgente = new paloSantoInterfazdeAgente($this->_db); $arrInfoCliente = $pInterfazdeAgente->obtenerClientePorIdCampaniaClienteRecargable($id_campania_cliente); // print_r($arrInfoCliente); $id = 0; foreach ($arrInfoCliente["direccion"] as $direccion) { $arrInfoCliente["direccion"][$id]["direccion"] = $direccion["direccion"]; $id += 1; } $arrInfoCliente['numero'] = $numTelefono; return $arrInfoCliente; }
<link rel="stylesheet" href="../../themes/elastixwave/help.css" /> </head> <body> <?php require_once "/var/www/html/libs/smarty/libs/Smarty.class.php"; require_once "/var/www/html/libs/paloSantoDB.class.php"; include_once "/var/www/html/modules/hispana_interfaz_agente/libs/paloSantoInterfazdeAgente.class.php"; include_once "/var/www/html/modules/hispana_interfaz_agente/configs/default.conf.php"; $smarty = new Smarty(); $smarty->template_dir = "/var/www/html/themes/elastixwave/"; $smarty->compile_dir = "/var/www/html/var/templates_c/"; $smarty->config_dir = "/var/www/html/configs/"; $smarty->cache_dir = "/var/www/html/var/cache/"; $pDB = new paloDB($arrConfModule['dsn_conn_database']); // viene de default.conf.php $pInterfazdeAgente = new paloSantoInterfazdeAgente($pDB); $arrCalltypes = $pInterfazdeAgente->getCalltypeInfo($_GET['id_campania']); echo "<table width=\"100%\" border=\"0\" class=\"tabForm\">"; echo "<tr><td><font size=3><b>Información de Calltypes</font></td></tr>"; echo "<tr><td>"; echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\">"; echo "<tr class=\"table_title_row\">"; echo "<td class=\"table_title_row\">Clase</td>"; echo "<td class=\"table_title_row\">Calltype</td>"; echo "<td class=\"table_title_row\">Definición</td>"; echo "</tr>"; foreach ($arrCalltypes as $regCalltype) { echo "<tr class=\"table_data\">"; echo "<td class=\"table_data\">" . $regCalltype['clase'] . "</td>"; echo "<td class=\"table_data\">" . $regCalltype['descripcion'] . "</td>"; echo "<td class=\"table_data\">" . $regCalltype['definicion'] . "</td>";
function viewFormInterfazdeAgente($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf) { $pInterfazdeAgente = new paloSantoInterfazdeAgente($pDB); $oForm = new paloForm($smarty, $arrFormInterfazdeAgente); //begin, Form data persistence to errors and other events. $_DATA = $_POST; $action = getParameter("action"); $id = getParameter("id"); $smarty->assign("ID", $id); //persistence id with input hidden in tpl if ($action == "view") { $oForm->setViewMode(); } else { if ($action == "view_edit" || getParameter("save_edit")) { $oForm->setEditMode(); } } //end, Form data persistence to errors and other events. if ($action == "view" || $action == "view_edit") { // the action is to view or view_edit. $dataInterfazdeAgente = $pInterfazdeAgente->getInterfazdeAgenteById($id); if (is_array($dataInterfazdeAgente) & count($dataInterfazdeAgente) > 0) { $_DATA = $dataInterfazdeAgente; } else { $smarty->assign("mb_title", _tr("Error get Data")); $smarty->assign("mb_message", $pInterfazdeAgente->errMsg); } } $smarty->assign("SAVE", _tr("Save")); $smarty->assign("EDIT", _tr("Edit")); $smarty->assign("CANCEL", _tr("Cancel")); $smarty->assign("REQUIRED_FIELD", _tr("Required field")); $smarty->assign("IMG", "images/list.png"); $htmlForm = $oForm->fetchForm("{$local_templates_dir}/form.tpl", _tr("Información del cliente"), $_DATA); $content = mostrarDatosClienteHTML($smarty, $pInterfazdeAgente); return $content; }