From 274a30eba7cf20759b46a6c934c58f3ea1a58af4 Mon Sep 17 00:00:00 2001 From: vinish Date: Fri, 2 Sep 2011 19:23:46 +0530 Subject: [PATCH] Added email address Signed-off-by: vinish --- interface/eRx_xml.php | 57 +++++++++++++++++++++++--------- interface/main/left_nav.php | 3 +- interface/super/edit_globals.php | 8 +++++ library/globals.inc.php | 71 ++++++++-------------------------------- 4 files changed, 64 insertions(+), 75 deletions(-) diff --git a/interface/eRx_xml.php b/interface/eRx_xml.php index fd366da2d..114a46789 100644 --- a/interface/eRx_xml.php +++ b/interface/eRx_xml.php @@ -26,35 +26,35 @@ // +------------------------------------------------------------------------------+ function getErxPath() { - if($GLOBALS['erx_source']==1) - return $GLOBALS['erx_path']; - else if($GLOBALS['erx_source']==2) + //if($GLOBALS['erx_source']==1) + //return $GLOBALS['erx_path']; + //else if($GLOBALS['erx_source']==2) return $GLOBALS['erx_path_production']; } function getErxSoapPath() { - if($GLOBALS['erx_source']==1) - return $GLOBALS['erx_path_soap']; - else if($GLOBALS['erx_source']==2) + //if($GLOBALS['erx_source']==1) + //return $GLOBALS['erx_path_soap']; + //else if($GLOBALS['erx_source']==2) return $GLOBALS['erx_path_soap_production']; } function getErxCredentials() { $cred=array(); - if($GLOBALS['erx_source']==1) - { - $cred[]=$GLOBALS['partner_name']; - $cred[]=$GLOBALS['erx_name']; - $cred[]=$GLOBALS['erx_password']; - } - else if($GLOBALS['erx_source']==2) - { + //if($GLOBALS['erx_source']==1) + //{ + // $cred[]=$GLOBALS['partner_name']; + // $cred[]=$GLOBALS['erx_name']; + // $cred[]=$GLOBALS['erx_password']; + //} + //else if($GLOBALS['erx_source']==2) + //{ $cred[]=$GLOBALS['partner_name_production']; $cred[]=$GLOBALS['erx_name_production']; $cred[]=$GLOBALS['erx_password_production']; - } + //} return $cred; } @@ -768,13 +768,38 @@ function checkError($xml) curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id()); curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $result=curl_exec($ch) or die( curl_error($ch)) ; + preg_match('/(.*)Original XML:/is',$result,$error_message); + erx_error_log($error_message[1]); + $arr=split('Error',$error_message[1]); + //echo "Te: ".count($arr); + //print_r($arr); + if(count($arr)==1) + { + echo nl2br($error_message[1]); + } + else + { + for($i=1;$i
"; + } + } curl_close($ch); if(strpos($result,'RxEntry.aspx')) return '1'; else return '0'; } +function erx_error_log($message) +{ + $date = date("Y-m"); + if(!is_dir('erx_error')) + mkdir('erx_error'); + $filename = "erx_error/erx_error"."-".$date.".log"; + $f=fopen($filename,'a'); + fwrite($f,date("Y-m-d H:i:s")." ==========> ".$message."\r\n"); + fclose($f); +} ?> \ No newline at end of file diff --git a/interface/main/left_nav.php b/interface/main/left_nav.php index 1222ed4b4..cb8391fab 100644 --- a/interface/main/left_nav.php +++ b/interface/main/left_nav.php @@ -1169,7 +1169,8 @@ if (!empty($reg)) {
    • - + +
  • diff --git a/interface/super/edit_globals.php b/interface/super/edit_globals.php index 9c79ca014..82ee5cbd7 100644 --- a/interface/super/edit_globals.php +++ b/interface/super/edit_globals.php @@ -249,6 +249,14 @@ foreach ($GLOBALS_METADATA as $grpname => $grparr) { "size='50' maxlength='255' value='$fldvalue' />\n"; } + else if ($fldtype == 'pass') { + if ($_GET['mode'] == "user") { + $globalTitle = $globalValue; + } + echo " \n"; + } + else if ($fldtype == 'lang') { $res = sqlStatement("SELECT * FROM lang_languages ORDER BY lang_description"); echo "