function update_customer_HTML($sDirLocalPlantillas) { global $arrConf; $smarty1 = new Smarty(); $oMainConsole = new getInfoMainConsole(); $oMainConsole->callcenter_db_connect($arrConf['cadena_dsn']); $number = getParameter('number'); if (!is_null($number)) { $customerInfo = $oMainConsole->getCustomerInfo($number); if (is_null($customerInfo)) { $customerInfo['lastname'] = '(không biết)'; $customerInfo['firstname'] = ''; } } else { $customerInfo = null; } //close mysql $oMainConsole->callcenter_db_disconnect(); $smarty1->assign(array('CUSTOMER_NUMBER' => $number, 'CUSTOMER_INFO' => $customerInfo)); return $smarty1->fetch("{$sDirLocalPlantillas}/customer_info.tpl"); }