Exemple #1
0
 /**
  * @param CApiGlobalManager &$oManager
  */
 public function __construct(CApiGlobalManager &$oManager)
 {
     parent::__construct('nodb', $oManager);
     CSession::$sSessionName = API_SESSION_WEBMAIL_NAME;
 }
 /**
  * @return bool
  */
 protected static function initInclude()
 {
     static $bIsInclude = false;
     $bResult = true;
     if (!$bIsInclude) {
         $sRp = self::RootPath();
         include_once $sRp . '/../libraries/afterlogic/api.php';
         CSession::$sSessionName = 'PHPWMADMINSESSID';
         include_once $sRp . '/core/constants.php';
         include_once $sRp . '/core/utils.php';
         include_once $sRp . '/core/modules.php';
         include_once $sRp . '/core/screens.php';
         include_once $sRp . '/core/screens/simple.php';
         include_once $sRp . '/core/screens/standard.php';
         include_once $sRp . '/core/screens/table.php';
         $sApVersion = @file_get_contents(self::RootPath() . 'VERSION');
         define('AP_VERSION', false === $sApVersion ? '0.0.0' : $sApVersion);
         $bIsInclude = true;
         $bResult = true;
     }
     return $bResult;
 }
Exemple #3
0
        }
    }
    /**
     * @param mixed $mValue
     * @return mixed
     */
    private static function stripSlashesValue($mValue)
    {
        if (!CSession::$bIsMagicQuotesOn) {
            return $mValue;
        }
        $sType = gettype($mValue);
        if ($sType === 'string') {
            return stripslashes($mValue);
        } else {
            if ($sType === 'array') {
                $aReturnValue = array();
                $mValueKeys = array_keys($mValue);
                foreach ($mValueKeys as $sKey) {
                    $aReturnValue[$sKey] = CSession::stripSlashesValue($mValue[$sKey]);
                }
                return $aReturnValue;
            } else {
                return $mValue;
            }
        }
    }
}
CSession::$bIsMagicQuotesOn = (bool) ini_get('magic_quotes_gpc');
CSession::$sSessionName = API_SESSION_WEBMAIL_NAME;