0 ) { $success = false; foreach( @$_SESSION['ext_error'] as $type ) { if( is_array( $type )) { foreach( $type as $error ) { $msg .= '
'.$error; } } } } $result = array('action' => $action, 'message' => str_replace("'", "\\'", $msg ), 'error' => str_replace("'", "\\'", $msg ),//.print_r($_POST,true), 'success' => $success ); foreach( $extra as $key => $value ) { $result[$key] = $value; } $classname = class_exists('ext_Json') ? 'ext_Json' : 'Services_JSON'; $json = new $classname(); $jresult = $json->encode($result); if(strtolower(extGetParam($_POST,'requestType')) == 'xmlhttprequest') { header("Content-type: text/html"); } print $jresult; ext_exit(); } $messagetxt = ''; if($extra != NULL) { $msg .= " - ".$extra; } if( $msg != '' ) { ext_Result::add_error( $msg ); } if( ext_Result::count_messages() < 1 && ext_Result::count_errors() < 1 ) { return; } if( ext_Result::count_messages() > 0 ) { $messagetxt .= '

'.$GLOBALS["error_msg"]["message"].':

'; foreach ( $_SESSION['ext_message'] as $msgtype ) { foreach ( $msgtype as $message ) { $messagetxt .= htmlspecialchars($message, ENT_QUOTES ) .'
'; } $messagetxt .= '


'; } ext_Result::empty_messages(); if( !empty( $_REQUEST['extra'])) { $messagetxt .= ' - '.htmlspecialchars(urldecode($_REQUEST['extra']), ENT_QUOTES ); } } if( !empty( $_SESSION['ext_error'])) { $messagetxt .= '

'.$GLOBALS["error_msg"]["error"].':

'; foreach ( $_SESSION['ext_error'] as $errortype ) { foreach ( $errortype as $error ) { $messagetxt .= htmlspecialchars($error, ENT_QUOTES ) .'
'; } $messagetxt .= '


'; } ext_Result::empty_errors(); } if( !empty( $_REQUEST['extra'])) { $messagetxt .= " - ".htmlspecialchars(urldecode($_REQUEST['extra']), ENT_QUOTES ); } extHTML::loadExtJS(); show_header(); defined('EXPLORER_NOEXEC') or define('EXPLORER_NOEXEC', 1 ); echo ext_scriptTag('', 'Ext.Msg.alert(\'Status\', \''.$messagetxt . '\')' ); //} $GLOBALS['action'] = 'show_error'; } } //------------------------------------------------------------------------------