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,7 +224,8 @@ class G
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
/*public static*/ function &setFatalErrorHandler( $newFatalErrorHandler = null )
|
/*public static*/
|
||||||
|
function &setFatalErrorHandler( $newFatalErrorHandler = null )
|
||||||
{
|
{
|
||||||
if ( isset ( $newFatalErrorHandler ) ) {
|
if ( isset ( $newFatalErrorHandler ) ) {
|
||||||
set_error_handler( $newFatalErrorHandler );
|
set_error_handler( $newFatalErrorHandler );
|
||||||
@@ -243,13 +238,13 @@ class G
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 );
|
||||||
@@ -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:
|
||||||
@@ -396,7 +392,8 @@ 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;
|
||||||
|
|
||||||
@@ -416,7 +413,6 @@ class G
|
|||||||
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
|
||||||
*
|
*
|
||||||
@@ -448,7 +444,6 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*** Encrypt and decrypt functions ****/
|
/*** Encrypt and decrypt functions ****/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt string
|
* Encrypt string
|
||||||
*
|
*
|
||||||
@@ -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
|
||||||
@@ -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,6 +1255,7 @@ 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
|
||||||
@@ -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)
|
||||||
@@ -2923,18 +2917,6 @@ class G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
||||||
* Returns the type of the PHP variable var.
|
* Returns the type of the PHP variable var.
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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*/
|
||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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