removed old codes
This commit is contained in:
@@ -32,7 +32,6 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* is_https
|
* is_https
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function is_https()
|
function is_https()
|
||||||
@@ -165,7 +164,6 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current version of gulliver classes
|
* Get the current version of gulliver classes
|
||||||
*
|
|
||||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
||||||
* @access public
|
* @access public
|
||||||
* @return string
|
* @return string
|
||||||
@@ -178,7 +176,6 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getIpAddress
|
* getIpAddress
|
||||||
*
|
|
||||||
* @return string $ip
|
* @return string $ip
|
||||||
*/
|
*/
|
||||||
/*public static*/ function getIpAddress ()
|
/*public static*/ function getIpAddress ()
|
||||||
@@ -197,8 +194,6 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getMacAddress
|
* getMacAddress
|
||||||
*
|
|
||||||
*
|
|
||||||
* @return string $mac
|
* @return string $mac
|
||||||
*/
|
*/
|
||||||
function getMacAddress()
|
function getMacAddress()
|
||||||
@@ -215,7 +210,6 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* microtime_float
|
* microtime_float
|
||||||
*
|
|
||||||
* @return array_sum(explode(' ',microtime()))
|
* @return array_sum(explode(' ',microtime()))
|
||||||
*/
|
*/
|
||||||
/*public static*/ function microtime_float() {
|
/*public static*/ function microtime_float() {
|
||||||
@@ -230,27 +224,28 @@ class G
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
/*public static*/ function &setFatalErrorHandler( $newFatalErrorHandler = null )
|
/*public static*/
|
||||||
{
|
function &setFatalErrorHandler( $newFatalErrorHandler = null )
|
||||||
if ( isset ( $newFatalErrorHandler ) ) {
|
{
|
||||||
set_error_handler( $newFatalErrorHandler );
|
if ( isset ( $newFatalErrorHandler ) ) {
|
||||||
}
|
set_error_handler( $newFatalErrorHandler );
|
||||||
else {
|
}
|
||||||
ob_start( array ( 'G', 'fatalErrorHandler' ) );
|
else {
|
||||||
}
|
ob_start( array ( 'G', 'fatalErrorHandler' ) );
|
||||||
return true;
|
}
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setErrorHandler
|
* setErrorHandler
|
||||||
*
|
|
||||||
* @param string setErrorHandler
|
* @param string setErrorHandler
|
||||||
* @param object $newCustomErrorHandler
|
* @param object $newCustomErrorHandler
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
/*public static*/ function setErrorHandler( $newCustomErrorHandler = null )
|
/*public static*/
|
||||||
{
|
function setErrorHandler( $newCustomErrorHandler = null )
|
||||||
|
{
|
||||||
if ( isset ( $newCustomErrorHandler ) ) {
|
if ( isset ( $newCustomErrorHandler ) ) {
|
||||||
set_error_handler( $newCustomErrorHandler );
|
set_error_handler( $newCustomErrorHandler );
|
||||||
}
|
}
|
||||||
@@ -258,7 +253,7 @@ class G
|
|||||||
set_error_handler( array("G", "customErrorHandler"));
|
set_error_handler( array("G", "customErrorHandler"));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fatalErrorHandler
|
* fatalErrorHandler
|
||||||
@@ -283,7 +278,7 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* customErrorHandler
|
* customErrorHandler
|
||||||
*
|
*
|
||||||
* @param string $errno
|
* @param string $errno
|
||||||
* @param string $msg
|
* @param string $msg
|
||||||
@@ -293,7 +288,8 @@ class G
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
/*public static*/ function customErrorHandler ( $errno, $msg, $file, $line, $context) {
|
/*public static*/
|
||||||
|
function customErrorHandler ( $errno, $msg, $file, $line, $context) {
|
||||||
switch ($errno) {
|
switch ($errno) {
|
||||||
case E_ERROR:
|
case E_ERROR:
|
||||||
case E_USER_ERROR:
|
case E_USER_ERROR:
|
||||||
@@ -387,7 +383,7 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* customErrorLog
|
* customErrorLog
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $msg
|
* @param string $msg
|
||||||
@@ -396,8 +392,9 @@ class G
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
/*public static*/ function customErrorLog ($type, $msg, $file, $line)
|
/*public static*/
|
||||||
{
|
function customErrorLog ($type, $msg, $file, $line)
|
||||||
|
{
|
||||||
global $HTTP_X_FORWARDED_FOR, $REMOTE_ADDR, $HTTP_USER_AGENT, $REQUEST_URI;
|
global $HTTP_X_FORWARDED_FOR, $REMOTE_ADDR, $HTTP_USER_AGENT, $REQUEST_URI;
|
||||||
|
|
||||||
$ip_addr = G::getIpAddress();
|
$ip_addr = G::getIpAddress();
|
||||||
@@ -414,11 +411,10 @@ class G
|
|||||||
$REQUEST_URI = getenv ( 'REQUEST_URI' );
|
$REQUEST_URI = getenv ( 'REQUEST_URI' );
|
||||||
$HTTP_USER_AGENT = getenv ( 'HTTP_USER_AGENT' );
|
$HTTP_USER_AGENT = getenv ( 'HTTP_USER_AGENT' );
|
||||||
error_log ("[$date] [$ip_addr] [$name] $type: $msg [$HTTP_USER_AGENT] URI: $REQUEST_URI", 0);
|
error_log ("[$date] [$ip_addr] [$name] $type: $msg [$HTTP_USER_AGENT] URI: $REQUEST_URI", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* verboseError
|
* verboseError
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $errno
|
* @param string $errno
|
||||||
@@ -448,7 +444,6 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*** Encrypt and decrypt functions ****/
|
/*** Encrypt and decrypt functions ****/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt string
|
* Encrypt string
|
||||||
*
|
*
|
||||||
@@ -459,7 +454,7 @@ class G
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function encrypt($string, $key)
|
function encrypt($string, $key)
|
||||||
{
|
{
|
||||||
//print $string;
|
//print $string;
|
||||||
// if ( defined ( 'ENABLE_ENCRYPT' ) && ENABLE_ENCRYPT == 'yes' ) {
|
// if ( defined ( 'ENABLE_ENCRYPT' ) && ENABLE_ENCRYPT == 'yes' ) {
|
||||||
if (strpos($string, '|', 0) !== false) return $string;
|
if (strpos($string, '|', 0) !== false) return $string;
|
||||||
@@ -469,7 +464,7 @@ class G
|
|||||||
$keychar = substr($key, ($i % strlen($key))-1, 1);
|
$keychar = substr($key, ($i % strlen($key))-1, 1);
|
||||||
$char = chr(ord($char)+ord($keychar));
|
$char = chr(ord($char)+ord($keychar));
|
||||||
$result .= $char;
|
$result .= $char;
|
||||||
}
|
}
|
||||||
//echo $result . '<br>';
|
//echo $result . '<br>';
|
||||||
$result = base64_encode($result);
|
$result = base64_encode($result);
|
||||||
$result = str_replace ( '/' , '°' , $result);
|
$result = str_replace ( '/' , '°' , $result);
|
||||||
@@ -479,7 +474,7 @@ class G
|
|||||||
// $result = $string;
|
// $result = $string;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrypt string
|
* Decrypt string
|
||||||
@@ -533,7 +528,7 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*************** path functions *****************/
|
/*************** path functions *****************/
|
||||||
|
|
||||||
/*public static*/ function mk_dir( $strPath, $rights = 0777)
|
/*public static*/ function mk_dir( $strPath, $rights = 0777)
|
||||||
{
|
{
|
||||||
$folder_path = array($strPath);
|
$folder_path = array($strPath);
|
||||||
@@ -770,6 +765,7 @@ class G
|
|||||||
/**
|
/**
|
||||||
* Include all model plugin files
|
* Include all model plugin files
|
||||||
*
|
*
|
||||||
|
* LoadAllPluginModelClasses
|
||||||
* @author Hugo Loza <hugo@colosa.com>
|
* @author Hugo Loza <hugo@colosa.com>
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
@@ -841,7 +837,7 @@ class G
|
|||||||
require_once( $classfile );
|
require_once( $classfile );
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Loads a Class. If the class is not defined by the aplication, it
|
* If the class is not defined by the aplication, it
|
||||||
* attempt to load the class from gulliver.system
|
* attempt to load the class from gulliver.system
|
||||||
*
|
*
|
||||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>, David S. Callizaya
|
* @author Fernando Ontiveros Lira <fernando@colosa.com>, David S. Callizaya
|
||||||
@@ -1144,7 +1140,7 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sendHeaders
|
* sendHeaders
|
||||||
*
|
*
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @param string $contentType default value ''
|
* @param string $contentType default value ''
|
||||||
@@ -1240,7 +1236,6 @@ class G
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an encrypted unique identifier based on $id and the selected scope id.
|
* Create an encrypted unique identifier based on $id and the selected scope id.
|
||||||
*
|
*
|
||||||
@@ -1260,7 +1255,8 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* (Create an encrypted unique identificator based on $id and the selected scope id.) ^-1
|
* (Create an encrypted unique identificator based on $id and the selected scope id.) ^-1
|
||||||
*
|
* getUIDName
|
||||||
|
*
|
||||||
* @author David S. Callizaya S. <davidsantos@colosa.com>
|
* @author David S. Callizaya S. <davidsantos@colosa.com>
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $id
|
* @param string $id
|
||||||
@@ -1781,7 +1777,7 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Render message from XML file
|
* Render message from XML file
|
||||||
*
|
*
|
||||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $msgID
|
* @param string $msgID
|
||||||
@@ -1909,7 +1905,6 @@ class G
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function getTranslations
|
* Function getTranslations
|
||||||
* @author Erik Amaru O. <erik@colosa.com>
|
* @author Erik Amaru O. <erik@colosa.com>
|
||||||
@@ -2058,7 +2053,6 @@ class G
|
|||||||
* toLower
|
* toLower
|
||||||
*
|
*
|
||||||
* @param string $sText
|
* @param string $sText
|
||||||
*
|
|
||||||
* @return string strtolower($sText)
|
* @return string strtolower($sText)
|
||||||
*/
|
*/
|
||||||
function toLower($sText)
|
function toLower($sText)
|
||||||
@@ -2921,19 +2915,7 @@ class G
|
|||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
return $oJSON->decode($Json);
|
return $oJSON->decode($Json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* isHttpRequest
|
|
||||||
*
|
|
||||||
* @return boolean true or false
|
|
||||||
*/
|
|
||||||
function isHttpRequest(){
|
|
||||||
if( isset($_SERVER['SERVER_SOFTWARE']) && strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false ){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the type of a variable
|
* Get the type of a variable
|
||||||
@@ -3038,20 +3020,6 @@ class G
|
|||||||
}
|
}
|
||||||
return $infoUser;
|
return $infoUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
function in_array_column($text, $column, $array)
|
|
||||||
{
|
|
||||||
if (!empty($array) && is_array($array))
|
|
||||||
{
|
|
||||||
for ($i=0; $i < count($array); $i++)
|
|
||||||
{
|
|
||||||
if ($array[$i][$column]==$text || strcmp($array[$i][$column],$text)==0) return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -673,7 +673,7 @@ class XmlForm_Field {
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Title extends XmlForm_Field
|
class XmlForm_Field_Title extends XmlForm_Field
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function render
|
* Function render
|
||||||
@@ -702,7 +702,7 @@ class XmlForm_Field_Title extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Subtitle extends XmlForm_Field
|
class XmlForm_Field_Subtitle extends XmlForm_Field
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function render
|
* Function render
|
||||||
@@ -732,7 +732,7 @@ class XmlForm_Field_Subtitle extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_SimpleText extends XmlForm_Field
|
class XmlForm_Field_SimpleText extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $size = 15;
|
var $size = 15;
|
||||||
var $maxLength = '';
|
var $maxLength = '';
|
||||||
@@ -811,7 +811,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field_SimpleText
|
* @dependencies XmlForm_Field_SimpleText
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
||||||
{
|
{
|
||||||
var $size = 15;
|
var $size = 15;
|
||||||
var $maxLength = 64;
|
var $maxLength = 64;
|
||||||
@@ -1355,7 +1355,7 @@ class XmlForm_Field_Textarea extends XmlForm_Field {
|
|||||||
|
|
||||||
if (stristr ( $_SERVER ['HTTP_USER_AGENT'], 'iPhone' )) {
|
if (stristr ( $_SERVER ['HTTP_USER_AGENT'], 'iPhone' )) {
|
||||||
//$result[] = '<div style="overflow:hidden;height:25px;padding:0px;margin:0px;">'.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'</div>';
|
//$result[] = '<div style="overflow:hidden;height:25px;padding:0px;margin:0px;">'.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'</div>';
|
||||||
|
|
||||||
$result [] = $this->htmlentities ( $v, ENT_COMPAT, 'utf-8' );
|
$result [] = $this->htmlentities ( $v, ENT_COMPAT, 'utf-8' );
|
||||||
} else { //start add Alvaro
|
} else { //start add Alvaro
|
||||||
$varaux = '<textarea class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" wrap="hard" rows="' . $this->rows . '"cols="'.$this->cols.'" required="' . $isRequired . '">'.$this->htmlentities ( $v, ENT_COMPAT, 'utf-8' ).'</textarea>';
|
$varaux = '<textarea class="module_app_input___gray" id="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" wrap="hard" rows="' . $this->rows . '"cols="'.$this->cols.'" required="' . $isRequired . '">'.$this->htmlentities ( $v, ENT_COMPAT, 'utf-8' ).'</textarea>';
|
||||||
@@ -1422,31 +1422,8 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText {
|
|||||||
} else {
|
} else {
|
||||||
return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' );
|
return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
//function render( $value = NULL )
|
|
||||||
//{
|
|
||||||
// return '<input id="form['.$this->name.']" name="form['.$this->name.']" type=\'text\' size="'.$this->size.'" value=\''. $this->htmlentities($value, ENT_QUOTES, 'utf-8') .'\'>';
|
|
||||||
//}
|
|
||||||
//function renderGrid( $values=array() , $owner )
|
|
||||||
//{
|
|
||||||
// $result=array();$r=1;
|
|
||||||
// foreach($values as $v) {
|
|
||||||
// if ($this->mode==='edit') {
|
|
||||||
// if ($this->readOnly)
|
|
||||||
// $result[] = '<input id="form['. $owner->name .']['.$r.']['.$this->name.']" name="form['. $owner->name .']['.$r.']['.$this->name.']" type ="text" size="'.$this->size.'" maxlength="'.$this->maxLength.'" value=\''.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'\' readOnly="readOnly"/>';
|
|
||||||
// else
|
|
||||||
// $result[] = '<input id="form['. $owner->name .']['.$r.']['.$this->name.']" name="form['. $owner->name .']['.$r.']['.$this->name.']" type ="text" size="'.$this->size.'" maxlength="'.$this->maxLength.'" value=\''.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'\' />';
|
|
||||||
// } elseif ($this->mode==='view') {
|
|
||||||
// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8');
|
|
||||||
// } else {
|
|
||||||
// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8');
|
|
||||||
// }
|
|
||||||
// $r++;
|
|
||||||
// }
|
|
||||||
// return $result;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*DEPRECATED*/
|
/*DEPRECATED*/
|
||||||
@@ -1506,31 +1483,8 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText {
|
|||||||
return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' );
|
return $this->htmlentities ( $value, ENT_QUOTES, 'utf-8' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//function render( $value = NULL )
|
|
||||||
//{
|
|
||||||
// return '<input id="form['.$this->name.']" name="form['.$this->name.']" type=\'text\' value=\''. $value .'\'>';
|
|
||||||
//}
|
|
||||||
//function renderGrid( $values=array() , $owner )
|
|
||||||
//{
|
|
||||||
// $result=array();$r=1;
|
|
||||||
// foreach($values as $v) {
|
|
||||||
// if ($this->mode==='edit') {
|
|
||||||
// if ($this->readOnly)
|
|
||||||
// $result[] = '<input id="form['. $owner->name .']['.$r.']['.$this->name.']" name="form['. $owner->name .']['.$r.']['.$this->name.']" type ="text" size="'.$this->size.'" maxlength="'.$this->maxLength.'" value=\''.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'\' readOnly="readOnly"/>';
|
|
||||||
// else
|
|
||||||
// $result[] = '<input id="form['. $owner->name .']['.$r.']['.$this->name.']" name="form['. $owner->name .']['.$r.']['.$this->name.']" type ="text" size="'.$this->size.'" maxlength="'.$this->maxLength.'" value=\''.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'\' />';
|
|
||||||
// } elseif ($this->mode==='view') {
|
|
||||||
// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8');
|
|
||||||
// } else {
|
|
||||||
// $result[] = $this->htmlentities( $value , ENT_COMPAT, 'utf-8');
|
|
||||||
// }
|
|
||||||
// $r++;
|
|
||||||
// }
|
|
||||||
// return $result;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*DEPRECATED*/
|
/*DEPRECATED*/
|
||||||
@@ -1765,7 +1719,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*DEPRECATED*/
|
/*DEPRECATED*/
|
||||||
class XmlForm_Field_DateView extends XmlForm_Field
|
class XmlForm_Field_DateView extends XmlForm_Field
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function render
|
* Function render
|
||||||
@@ -1786,7 +1740,7 @@ class XmlForm_Field_DateView extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_YesNo extends XmlForm_Field
|
class XmlForm_Field_YesNo extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $required = false;
|
var $required = false;
|
||||||
var $readonly = false;
|
var $readonly = false;
|
||||||
@@ -1959,33 +1913,6 @@ class XmlForm_Field_File extends XmlForm_Field {
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
//DEPRECATED
|
|
||||||
class XmlForm_Field_BasicForm extends XmlForm_Field
|
|
||||||
{
|
|
||||||
//Instead of size --> dynaform
|
|
||||||
var $dynaform='';
|
|
||||||
var $times=1;
|
|
||||||
//Possible values: "[ADD][,DELETE][,EDIT]"
|
|
||||||
var $configurationgrid2='';
|
|
||||||
function render( $value = NULL )
|
|
||||||
{
|
|
||||||
return $this->htmlentities( $value ,ENT_COMPAT,'utf-8').' this is a basicform';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class XmlForm_Field_BasicFormView extends XmlForm_Field
|
|
||||||
{
|
|
||||||
//Instead of size --> dynaform
|
|
||||||
var $dynaform;
|
|
||||||
var $times=1;
|
|
||||||
var $required=false;
|
|
||||||
function render( $value = NULL )
|
|
||||||
{
|
|
||||||
return $this->htmlentities( $value ,ENT_COMPAT,'utf-8');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*hook, dropdown field for Propel table @By <erik@colosa.com>*/
|
/*hook, dropdown field for Propel table @By <erik@colosa.com>*/
|
||||||
class XmlForm_Field_Dropdownpt extends XmlForm_Field {
|
class XmlForm_Field_Dropdownpt extends XmlForm_Field {
|
||||||
@@ -2067,7 +1994,7 @@ class XmlForm_Field_Checkboxpt extends XmlForm_Field {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class XmlForm_Field_Checkbox extends XmlForm_Field
|
class XmlForm_Field_Checkbox extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $required = false;
|
var $required = false;
|
||||||
var $value = 'on';
|
var $value = 'on';
|
||||||
@@ -2185,7 +2112,7 @@ class XmlForm_Field_Checkbox2 extends XmlForm_Field {
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Button extends XmlForm_Field
|
class XmlForm_Field_Button extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $onclick = '';
|
var $onclick = '';
|
||||||
var $align = 'center';
|
var $align = 'center';
|
||||||
@@ -2218,7 +2145,7 @@ class XmlForm_Field_Button extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Reset extends XmlForm_Field
|
class XmlForm_Field_Reset extends XmlForm_Field
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function render
|
* Function render
|
||||||
@@ -2271,7 +2198,7 @@ class XmlForm_Field_Submit extends XmlForm_Field {
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Hidden extends XmlForm_Field
|
class XmlForm_Field_Hidden extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $sqlConnection = 0;
|
var $sqlConnection = 0;
|
||||||
var $sql = '';
|
var $sql = '';
|
||||||
@@ -2405,13 +2332,13 @@ class XmlForm_Field_Dropdown extends XmlForm_Field {
|
|||||||
} elseif ($this->mode === 'view') {
|
} elseif ($this->mode === 'view') {
|
||||||
$html = $this->htmlentities ( isset ( $this->options [$value] ) ? $this->options [$value] : '', ENT_COMPAT, 'utf-8' );
|
$html = $this->htmlentities ( isset ( $this->options [$value] ) ? $this->options [$value] : '', ENT_COMPAT, 'utf-8' );
|
||||||
$html .= '<select '.$readOnlyField.' required="'.$isRequired.'" class="module_app_input___gray" id="form' . $rowId . '[' . $this->name . ']" name="form' . $rowId . '[' . $this->name . ']" style="display:none" ' . (($this->style) ? 'style="' . $this->style . '"' : '') . '>';
|
$html .= '<select '.$readOnlyField.' required="'.$isRequired.'" class="module_app_input___gray" id="form' . $rowId . '[' . $this->name . ']" name="form' . $rowId . '[' . $this->name . ']" style="display:none" ' . (($this->style) ? 'style="' . $this->style . '"' : '') . '>';
|
||||||
}
|
}
|
||||||
foreach ( $this->option as $optionName => $option ) {
|
foreach ( $this->option as $optionName => $option ) {
|
||||||
// if change the type with the settype function then compare "0" == "" so both can be diferentiated
|
// if change the type with the settype function then compare "0" == "" so both can be diferentiated
|
||||||
settype($optionName,'string');
|
settype($optionName,'string');
|
||||||
$html .= '<option value="' . $optionName . '" ' . ($optionName === $value ? 'selected="selected"' : ''). '>' . $option . '</option>';
|
$html .= '<option value="' . $optionName . '" ' . ($optionName === $value ? 'selected="selected"' : ''). '>' . $option . '</option>';
|
||||||
}
|
}
|
||||||
foreach ( $this->sqlOption as $optionName => $option ) {
|
foreach ( $this->sqlOption as $optionName => $option ) {
|
||||||
// if change the type with the settype function then compare "0" == "" so both can be diferentiated
|
// if change the type with the settype function then compare "0" == "" so both can be diferentiated
|
||||||
settype($optionName,'string');
|
settype($optionName,'string');
|
||||||
$html .= '<option value="' . $optionName . '" ' . ($optionName === $value ? 'selected="selected"' : '') . '>' . $option . '</option>';
|
$html .= '<option value="' . $optionName . '" ' . ($optionName === $value ? 'selected="selected"' : '') . '>' . $option . '</option>';
|
||||||
@@ -2464,7 +2391,7 @@ class XmlForm_Field_Dropdown extends XmlForm_Field {
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Listbox extends XmlForm_Field
|
class XmlForm_Field_Listbox extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $defaultValue = '';
|
var $defaultValue = '';
|
||||||
var $required = false;
|
var $required = false;
|
||||||
@@ -2617,7 +2544,7 @@ class XmlForm_Field_RadioGroup extends XmlForm_Field {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*DEPRECATED*/
|
/*DEPRECATED*/
|
||||||
class XmlForm_Field_RadioGroupView extends XmlForm_Field
|
class XmlForm_Field_RadioGroupView extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $defaultValue = '';
|
var $defaultValue = '';
|
||||||
var $required = false;
|
var $required = false;
|
||||||
@@ -2651,7 +2578,7 @@ class XmlForm_Field_RadioGroupView extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_CheckGroup extends XmlForm_Field
|
class XmlForm_Field_CheckGroup extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $required = false;
|
var $required = false;
|
||||||
var $option = array ();
|
var $option = array ();
|
||||||
@@ -2709,7 +2636,7 @@ class XmlForm_Field_CheckGroup extends XmlForm_Field
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: DEPRECATED */
|
/* TODO: DEPRECATED */
|
||||||
class XmlForm_Field_CheckGroupView extends XmlForm_Field
|
class XmlForm_Field_CheckGroupView extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $option = array ();
|
var $option = array ();
|
||||||
var $sqlConnection = 0;
|
var $sqlConnection = 0;
|
||||||
@@ -2738,7 +2665,7 @@ class XmlForm_Field_CheckGroupView extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field XmlForm xmlformTemplate
|
* @dependencies XmlForm_Field XmlForm xmlformTemplate
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_Grid extends XmlForm_Field
|
class XmlForm_Field_Grid extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $xmlGrid = '';
|
var $xmlGrid = '';
|
||||||
var $initRows = 1;
|
var $initRows = 1;
|
||||||
@@ -2888,7 +2815,7 @@ class XmlForm_Field_Grid extends XmlForm_Field
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies XmlForm_Field
|
* @dependencies XmlForm_Field
|
||||||
*/
|
*/
|
||||||
class XmlForm_Field_JavaScript extends XmlForm_Field
|
class XmlForm_Field_JavaScript extends XmlForm_Field
|
||||||
{
|
{
|
||||||
var $code = '';
|
var $code = '';
|
||||||
var $replaceTags = true;
|
var $replaceTags = true;
|
||||||
@@ -2985,7 +2912,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
|
|
||||||
public $mask = '%Y-%m-%d';
|
public $mask = '%Y-%m-%d';
|
||||||
public $dependentFields = '';
|
public $dependentFields = '';
|
||||||
public $editable;
|
public $editable;
|
||||||
var $hint;
|
var $hint;
|
||||||
/**
|
/**
|
||||||
* Verify the format of a date
|
* Verify the format of a date
|
||||||
@@ -3108,7 +3035,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
if (! $this->verifyDateFormat ( $startDate ))
|
if (! $this->verifyDateFormat ( $startDate ))
|
||||||
$startDate = '';
|
$startDate = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset ( $beforeDate ) && $beforeDate != '') {
|
if (isset ( $beforeDate ) && $beforeDate != '') {
|
||||||
if ($this->isvalidBeforeFormat ( $beforeDate ))
|
if ($this->isvalidBeforeFormat ( $beforeDate ))
|
||||||
$startDate = $this->calculateBeforeFormat ( $beforeDate, 1 );
|
$startDate = $this->calculateBeforeFormat ( $beforeDate, 1 );
|
||||||
@@ -3135,13 +3062,13 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
if (isset ( $this->maxlength ) && is_numeric ( $this->maxlength ) && $this->maxlength >= 1900 && $this->maxlength <= 2100) {
|
if (isset ( $this->maxlength ) && is_numeric ( $this->maxlength ) && $this->maxlength >= 1900 && $this->maxlength <= 2100) {
|
||||||
$endDate = $this->maxlength . '-01-01';
|
$endDate = $this->maxlength . '-01-01';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($endDate == '') {
|
if ($endDate == '') {
|
||||||
// the default is the current date + 2 years
|
// the default is the current date + 2 years
|
||||||
$endDate = date ( 'Y-m-d', mktime ( 0, 0, 0, date ( 'm' ), date ( 'd' ), date ( 'Y' ) + 2 ) );
|
$endDate = date ( 'Y-m-d', mktime ( 0, 0, 0, date ( 'm' ), date ( 'd' ), date ( 'Y' ) + 2 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//validating the mask, if it is not set,
|
//validating the mask, if it is not set,
|
||||||
if( isset($this->mask) && $this->mask != '' ){
|
if( isset($this->mask) && $this->mask != '' ){
|
||||||
$mask = $this->mask;
|
$mask = $this->mask;
|
||||||
} else {
|
} else {
|
||||||
@@ -3155,7 +3082,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
*/
|
*/
|
||||||
if($mask == 'yyyy-mm-dd')
|
if($mask == 'yyyy-mm-dd')
|
||||||
$mask = '%Y-%m-%d';
|
$mask = '%Y-%m-%d';
|
||||||
|
|
||||||
if( strpos($mask, '%') === false ) {
|
if( strpos($mask, '%') === false ) {
|
||||||
if( strpos($mask, '-') !== false ) { // case '-' saparator
|
if( strpos($mask, '-') !== false ) { // case '-' saparator
|
||||||
$maskparts = explode('-', $mask);
|
$maskparts = explode('-', $mask);
|
||||||
@@ -3166,7 +3093,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
$mask .= '%'.$part;
|
$mask .= '%'.$part;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strpos($mask, '/') !== false ) { // case '/' saparator
|
if( strpos($mask, '/') !== false ) { // case '/' saparator
|
||||||
$maskparts = explode('/', $mask);
|
$maskparts = explode('/', $mask);
|
||||||
$mask = '';
|
$mask = '';
|
||||||
@@ -3204,34 +3131,34 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
$sizehour = strpos($mask, $hour);
|
$sizehour = strpos($mask, $hour);
|
||||||
$sizemin = strpos($mask, $hour);
|
$sizemin = strpos($mask, $hour);
|
||||||
$sizesec = strpos($mask, $hour);
|
$sizesec = strpos($mask, $hour);
|
||||||
|
|
||||||
$Time = 'false';
|
$Time = 'false';
|
||||||
if (($sizehour !== false)&&($sizemin !== false)&&($sizesec !== false)) {
|
if (($sizehour !== false)&&($sizemin !== false)&&($sizesec !== false)) {
|
||||||
$sizeend = $maskleng + 2;
|
$sizeend = $maskleng + 2;
|
||||||
$Time = 'true';
|
$Time = 'true';
|
||||||
} else {
|
} else {
|
||||||
$sizeend = $maskleng + 2;
|
$sizeend = $maskleng + 2;
|
||||||
}
|
}
|
||||||
if ( $this->editable != "0") {
|
if ( $this->editable != "0") {
|
||||||
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"/>
|
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"/>
|
||||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\','.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\','.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||||
} else {
|
} else {
|
||||||
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" readonly/>
|
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" readonly/>
|
||||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\', '.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\', '.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$html = "<span style='border:1;border-color:#000;width:100px;' name='" . $pID . "'>$value</span>";
|
$html = "<span style='border:1;border-color:#000;width:100px;' name='" . $pID . "'>$value</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->hint){
|
if($this->hint){
|
||||||
$html .= '<a href="#" onmouseout="hideTooltip()" onmouseover="showTooltip(event, \''.$this->hint.'\');return false;">'
|
$html .= '<a href="#" onmouseout="hideTooltip()" onmouseover="showTooltip(event, \''.$this->hint.'\');return false;">'
|
||||||
. '<image src="/images/help5.gif" width="15" height="15" border="0" style="position:relative;left:-17px;top:0px;"/>'
|
. '<image src="/images/help5.gif" width="15" height="15" border="0" style="position:relative;left:-17px;top:0px;"/>'
|
||||||
. '</a>';
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3696,7 +3623,7 @@ class XmlForm_Field_Xmlform extends XmlForm_Field {
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies Xml_document XmlForm_Field xmlformTemplate
|
* @dependencies Xml_document XmlForm_Field xmlformTemplate
|
||||||
*/
|
*/
|
||||||
class XmlForm
|
class XmlForm
|
||||||
{
|
{
|
||||||
var $tree;
|
var $tree;
|
||||||
var $id = '';
|
var $id = '';
|
||||||
@@ -3740,11 +3667,11 @@ class XmlForm
|
|||||||
$this->language = $language;
|
$this->language = $language;
|
||||||
$filenameInitial=$filename;
|
$filenameInitial=$filename;
|
||||||
$filename = $this->home . $filename;
|
$filename = $this->home . $filename;
|
||||||
|
|
||||||
//if the xmlform file doesn't exists, then try with the plugins folders
|
//if the xmlform file doesn't exists, then try with the plugins folders
|
||||||
if ( !is_file ( $filename ) ) {
|
if ( !is_file ( $filename ) ) {
|
||||||
$aux = explode ( PATH_SEP, $filenameInitial );
|
$aux = explode ( PATH_SEP, $filenameInitial );
|
||||||
//check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
|
//check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
|
||||||
if(count($aux) > 2){//Subfolders
|
if(count($aux) > 2){//Subfolders
|
||||||
$filename=array_pop($aux);
|
$filename=array_pop($aux);
|
||||||
$aux0=implode(PATH_SEP,$aux);
|
$aux0=implode(PATH_SEP,$aux);
|
||||||
@@ -3764,10 +3691,10 @@ class XmlForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fileName = $filename;
|
$this->fileName = $filename;
|
||||||
$parsedFile = dirname ( $filename ) . PATH_SEP . basename ( $filename, 'xml' ) . $language;
|
$parsedFile = dirname ( $filename ) . PATH_SEP . basename ( $filename, 'xml' ) . $language;
|
||||||
|
|
||||||
$parsedFilePath = defined ( 'PATH_C' ) ? ( defined('SYS_SYS') ? PATH_C . 'ws' . PATH_SEP . SYS_SYS . PATH_SEP: PATH_C ) : PATH_DATA;
|
$parsedFilePath = defined ( 'PATH_C' ) ? ( defined('SYS_SYS') ? PATH_C . 'ws' . PATH_SEP . SYS_SYS . PATH_SEP: PATH_C ) : PATH_DATA;
|
||||||
$parsedFilePath .= 'xmlform/' . substr ( $parsedFile, strlen ( $this->home ) );
|
$parsedFilePath .= 'xmlform/' . substr ( $parsedFile, strlen ( $this->home ) );
|
||||||
|
|
||||||
@@ -3954,7 +3881,7 @@ class XmlForm
|
|||||||
* @access public
|
* @access public
|
||||||
* @dependencies Smarty
|
* @dependencies Smarty
|
||||||
*/
|
*/
|
||||||
class xmlformTemplate extends Smarty
|
class xmlformTemplate extends Smarty
|
||||||
{
|
{
|
||||||
var $template;
|
var $template;
|
||||||
var $templateFile;
|
var $templateFile;
|
||||||
@@ -4250,4 +4177,4 @@ class XmlForm_Field_Image extends XmlForm_Field
|
|||||||
(($this->style)?'style="'.$this->style.'"':'')
|
(($this->style)?'style="'.$this->style.'"':'')
|
||||||
.' alt ="'.htmlentities($value,ENT_QUOTES,'utf-8').'"/>';
|
.' alt ="'.htmlentities($value,ENT_QUOTES,'utf-8').'"/>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,6 @@ class UsersProperties extends BaseUsersProperties {
|
|||||||
try {
|
try {
|
||||||
$oUserProperty = UsersPropertiesPeer::retrieveByPk($sUserUID);
|
$oUserProperty = UsersPropertiesPeer::retrieveByPk($sUserUID);
|
||||||
if (is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') {
|
if (is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') {
|
||||||
echo"inside";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user