From a579168e6aa22a1dbc46a78ae1e420bfd9346469 Mon Sep 17 00:00:00 2001 From: AlvArO Date: Tue, 22 Mar 2011 13:02:58 -0400 Subject: [PATCH] Fixed problem of position of hint bug: 6366 --- gulliver/system/class.xmlform.php | 49 +++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 4ce823e1b..bcc24961b 100644 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3254,13 +3254,58 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText //$html = "$value"; ///-- $html = 'maxLength ) ? ' maxlength="' . $this->maxLength . '"' : '') . ' value=\'' . htmlentities ( $value, ENT_COMPAT, 'utf-8' ) . '\' style="display:none;' . htmlentities ( $this->style, ENT_COMPAT, 'utf-8' ) . '" />' . htmlentities ( $value, ENT_COMPAT, 'utf-8' ); - $html = "$value"; + $html = "$valueaux"; } + // + +//print($_SERVER['HTTP_USER_AGENT']); + + + // + + // $navegador = get_browser(); + // print($navegador); if($this->hint){ + function browsername($user_agent) { + $browsers = array( + 'Opera' => 'Opera', + 'Mozilla Firefox'=> '(Firebird)|(Firefox)', + 'Galeon' => 'Galeon', + 'Mozilla'=>'Gecko', + 'MyIE'=>'MyIE', + 'Lynx' => 'Lynx', + 'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)', + 'Konqueror'=>'Konqueror', + 'Internet Explorer 7' => '(MSIE 7\.[0-9]+)', + 'Internet Explorer 6' => '(MSIE 6\.[0-9]+)', + 'Internet Explorer 5' => '(MSIE 5\.[0-9]+)', + 'Internet Explorer 4' => '(MSIE 4\.[0-9]+)', + 'Internet Explorer 8' => '(MSIE 8\.[0-9]+)', + ); + foreach($browsers as $browser=>$pattern){ + if (eregi($pattern, $user_agent)) + return $browser; + } + return 'Unknow'; + } + + + + if(browsername($_SERVER['HTTP_USER_AGENT'])=='Mozilla Firefox'){ + $len = strlen($valueaux); + $len = $len - 10; $html .= '' - . '' + . '' . ''; + } + if((browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 8')||(browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 7')){ + $len = strlen($valueaux); + $html .= '' + . '' + . ''; + } + } return $html;