/** * Get the required settings analysis * * @return array */ public function getRequired() { static $phpOptions = array(); if (empty($phpOptions)) { $minPHPVersion = '5.4'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MCGPCOFF'), 'current' => ini_get('magic_quotes_gpc') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_REGGLOBALS'), 'current' => ini_get('register_globals') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XML'), 'current' => extension_loaded('xml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => function_exists('mysql_connect') || function_exists('mysqli_connect'), 'warning' => false); if (extension_loaded('mbstring')) { $option = array('label' => AText::_('MAIN_REQ_MBLANGISDEFAULT'), 'current' => strtolower(ini_get('mbstring.language')) == 'neutral', 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBLANGNOTDEFAULT'); $phpOptions[] = $option; $option = array('label' => AText::_('MAIN_REQ_MBSTRINGOVERLOAD'), 'current' => ini_get('mbstring.func_overload') == 0, 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBSTRINGOVERLOAD'); $phpOptions[] = $option; } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_SIMPLEXML'), 'current' => extension_loaded('simplexml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MCRYPT'), 'current' => extension_loaded('mcrypt'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_HASH'), 'current' => function_exists('hash'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_GD'), 'current' => extension_loaded('gd'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DOM'), 'current' => extension_loaded('dom'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ICONV'), 'current' => extension_loaded('iconv'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_SOAP'), 'current' => extension_loaded('soap'), 'notice' => extension_loaded('soap') ? null : AText::_('MAIN_MSG_SOAP'), 'warning' => true); $cW = @file_exists('../app/etc/local.xml') && @is_writable('../app/etc/local.xml') || @is_writable('../app/etc'); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CONFIGURATIONPHP'), 'current' => $cW, 'notice' => $cW ? null : AText::_('MAIN_MSG_CONFIGURATIONPHP'), 'warning' => true); } return $phpOptions; }
/** * Get the required settings analysis * * @return array */ public function getRequired() { static $phpOptions = array(); if (empty($phpOptions)) { $minPHPVersion = '5.3.4'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MCGPCOFF'), 'current' => ini_get('magic_quotes_gpc') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_REGGLOBALS'), 'current' => ini_get('register_globals') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XML'), 'current' => extension_loaded('xml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => function_exists('mysql_connect') || function_exists('mysqli_connect') || function_exists('pg_connect') || function_exists('sqlsrv_connect'), 'warning' => false); if (extension_loaded('mbstring')) { $option = array('label' => AText::_('MAIN_REQ_MBLANGISDEFAULT'), 'current' => strtolower(ini_get('mbstring.language')) == 'neutral', 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBLANGNOTDEFAULT'); $phpOptions[] = $option; $option = array('label' => AText::_('MAIN_REQ_MBSTRINGOVERLOAD'), 'current' => ini_get('mbstring.func_overload') == 0, 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBSTRINGOVERLOAD'); $phpOptions[] = $option; } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_GD_LIBRARY'), 'current' => function_exists('imagecreatetruecolor'), 'warning' => true); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_FILEUPLOAD'), 'current' => ini_get('file_uploads'), 'warning' => true); $cW = @file_exists('../config/settings.inc.php') && @is_writable('../config/settings.inc.php') || @is_writable('../config'); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CONFIGURATIONPHP'), 'current' => $cW, 'notice' => $cW ? null : AText::_('MAIN_MSG_CONFIGURATIONPHP'), 'warning' => true); } return $phpOptions; }
/** * Get the required settings analysis * * @return array */ public function getRequired() { $minPHPVersion = '5.5'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_REGGLOBALS'), 'current' => ini_get('register_globals') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XML'), 'current' => extension_loaded('xml'), 'warning' => false); if (!defined('PDO::ATTR_DRIVER_NAME')) { $database = false; } else { $database = in_array('mysql', PDO::getAvailableDrivers()); } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => $database, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MBSTRING'), 'current' => extension_loaded('mbstring'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode') == false, 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_SIMPLEXML'), 'current' => extension_loaded('simplexml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MCRYPT'), 'current' => extension_loaded('mcrypt'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_HASH'), 'current' => function_exists('hash'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_GD'), 'current' => extension_loaded('gd'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XSL'), 'current' => extension_loaded('xsl'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INTL'), 'current' => extension_loaded('intl'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_OPENSSL'), 'current' => extension_loaded('openssl'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_SOAP'), 'current' => extension_loaded('soap'), 'notice' => extension_loaded('soap') ? null : AText::_('MAIN_MSG_SOAP'), 'warning' => true); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_VAR_WRITABLE'), 'current' => @is_writable('../var'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ETC_WRITABLE'), 'current' => @is_writable('../app/etc'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_PUB_WRITABLE'), 'current' => @is_writable('../pub'), 'warning' => false); return $phpOptions; }
/** * Get the required settings analysis * * @return array */ public function getRequired() { $minPHPVersion = '5.5.9'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XML'), 'current' => extension_loaded('xml'), 'warning' => false); if (!defined('PDO::ATTR_DRIVER_NAME')) { $database = false; } else { $database = in_array('mysql', PDO::getAvailableDrivers()); } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => $database, 'warning' => false); if (extension_loaded('mbstring')) { $option = array('label' => AText::_('MAIN_REQ_MBLANGISDEFAULT'), 'current' => strtolower(ini_get('mbstring.language')) == 'neutral', 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBLANGNOTDEFAULT'); $phpOptions[] = $option; $option = array('label' => AText::_('MAIN_REQ_MBSTRINGOVERLOAD'), 'current' => ini_get('mbstring.func_overload') == 0, 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBSTRINGOVERLOAD'); $phpOptions[] = $option; } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_GD_LIBRARY'), 'current' => extension_loaded('gd') && function_exists('gd_info'), 'warning' => false); $cW = @file_exists('../sites/default/settings.php') && @is_writable('../sites/default/settings.php') || @is_writable('../sites/default'); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CONFIGURATIONPHP'), 'current' => $cW, 'notice' => $cW ? null : AText::_('MAIN_MSG_CONFIGURATIONPHP'), 'warning' => true); return $phpOptions; }
/** * Get the required settings analysis * * @return array */ public function getRequired() { static $phpOptions = array(); if (empty($phpOptions)) { $minPHPVersion = '5.4.4'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ICONV'), 'current' => extension_loaded('iconv'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CURL'), 'current' => function_exists('curl_init'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CTYPE'), 'current' => extension_loaded('ctype'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_GD'), 'current' => extension_loaded('gd'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_XML'), 'current' => extension_loaded('xml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => function_exists('mysql_connect') || function_exists('mysqli_connect') || function_exists('pg_connect') || function_exists('sqlsrv_connect'), 'warning' => false); if (extension_loaded('mbstring')) { $option = array('label' => AText::_('MAIN_REQ_MBLANGISDEFAULT'), 'current' => strtolower(ini_get('mbstring.language')) == 'neutral', 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBLANGNOTDEFAULT'); $phpOptions[] = $option; $option = array('label' => AText::_('MAIN_REQ_MBSTRINGOVERLOAD'), 'current' => ini_get('mbstring.func_overload') == 0, 'warning' => false); $option['notice'] = $option['current'] ? null : AText::_('MAIN_MSG_NOTICEMBSTRINGOVERLOAD'); $phpOptions[] = $option; } $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MEMORY'), 'current' => (int) ini_get('memory_limit') >= 96, 'warning' => false); $cW = @file_exists('../config.php') && @is_writable('../config.php') || @is_writable('../'); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CONFIGURATIONPHP'), 'current' => $cW, 'notice' => $cW ? null : AText::_('MAIN_MSG_CONFIGURATIONPHP'), 'warning' => true); } return $phpOptions; }
/** * Get the required settings analysis * * @return array */ public function getRequired() { static $phpOptions = array(); if (empty($phpOptions)) { $minPHPVersion = '5.5.10'; $phpOptions[] = array('label' => AText::sprintf('MAIN_LBL_REQ_PHP_VERSION', $minPHPVersion), 'current' => version_compare(phpversion(), $minPHPVersion, 'ge'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ZLIB'), 'current' => extension_loaded('zlib'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DATABASE'), 'current' => function_exists('mysql_connect') || function_exists('mysqli_connect') || function_exists('sqlsrv_connect'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_SIMPLEXML'), 'current' => extension_loaded('simplexml'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_MBSTRING'), 'current' => extension_loaded('mbstring'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_DOM'), 'current' => extension_loaded('dom'), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_INIPARSER'), 'current' => $this->getIniParserAvailability(), 'warning' => false); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_JSON'), 'current' => function_exists('json_encode') && function_exists('json_decode'), 'warning' => false); $cW = @file_exists('../app/system/config.php') && @is_writable('../app/system/config.php') || @is_writable('../'); $phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_CONFIGURATIONPHP'), 'current' => $cW, 'notice' => $cW ? null : AText::_('MAIN_MSG_CONFIGURATIONPHP'), 'warning' => true); } return $phpOptions; }
</p> </div> </div> <div id="success-dialog" class="modal hide fade"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="success-btn-modalclose">×</button> <h3><?php echo AText::_('FINALISE_HEADER_SUCCESS'); ?> </h3> </div> <div class="modal-body"> <p> <?php echo AText::sprintf('FINALISE_LBL_SUCCESS', 'https://www.akeebabackup.com/documentation/troubleshooter/prbasicts.html'); ?> </p> <a class="btn btn-success" href="<?php echo AUri::base() . '../index.php'; ?> "> <span class="icon-white icon-forward"></span> <?php echo AText::_('FINALISE_BTN_VISITFRONTEND'); ?> </a> </div> </div> </div>
/** * Loads a template given any path. The path is in the format: * viewname/templatename * * @param string $path * @param array $forceParams A hash array of variables to be extracted in the local scope of the template file * * @return \Exception|string */ public function loadAnyTemplate($path = '', $forceParams = array()) { $template = $this->container->application->getTemplate(); $layoutTemplate = $this->getLayoutTemplate(); // Parse the path $templateParts = $this->_parseTemplatePath($path); // Get the default paths $paths = array(); $paths[] = APATH_THEMES . '/' . $template . '/html/' . $this->input->getCmd('option', 'angie') . '/' . $templateParts['view']; $paths[] = APATH_INSTALLATION . '/' . $this->input->getCmd('option', 'angie') . '/platform/views/' . $templateParts['view'] . '/tmpl'; $paths[] = APATH_INSTALLATION . '/platform/views/' . $templateParts['view'] . '/tmpl'; $paths[] = APATH_INSTALLATION . '/' . $this->input->getCmd('option', 'angie') . '/views/' . $templateParts['view'] . '/tmpl'; if (isset($this->_path) || property_exists($this, '_path')) { $paths = array_merge($paths, $this->_path['template']); } elseif (isset($this->path) || property_exists($this, 'path')) { $paths = array_merge($paths, $this->path['template']); } // Look for a template override if (isset($layoutTemplate) && $layoutTemplate != '_' && $layoutTemplate != $template) { $apath = array_shift($paths); array_unshift($paths, str_replace($template, $layoutTemplate, $apath)); } $filetofind = $templateParts['template'] . '.php'; $this->_tempFilePath = AUtilsPath::find($paths, $filetofind); if ($this->_tempFilePath) { // Unset from local scope unset($template); unset($layoutTemplate); unset($paths); unset($path); unset($filetofind); // Never allow a 'this' property if (isset($this->this)) { unset($this->this); } // Force parameters into scope if (!empty($forceParams)) { extract($forceParams); } // Start capturing output into a buffer ob_start(); // Include the requested template filename in the local scope // (this will execute the view logic). include $this->_tempFilePath; // Done with the requested template; get the buffer and // clear it. $this->_output = ob_get_contents(); ob_end_clean(); return $this->_output; } else { return new Exception(AText::sprintf('ANGI_APPLICATION_ERROR_LAYOUTFILE_NOT_FOUND', $path), 500); } }
<?php if ($this->number_of_substeps) { ?> <?php if ($this->substep == 'site.sql') { ?> <h1><?php echo AText::_('DATABASE_HEADER_MASTER_MAINDB'); ?> </h1> <?php } else { ?> <h1><?php echo AText::sprintf('DATABASE_HEADER_MASTER', $this->substep); ?> </h1> <?php } } ?> <div class="row-fluid"> <div class="span6"> <h3><?php echo AText::_('DATABASE_HEADER_CONNECTION'); ?> </h3> <div class="form-horizontal">
<?php echo AText::_('OFFSITEDIRS_HEADER_ERROR'); ?> </div> <div class="well well-small" id="restoration-lbl-error"> </div> </div> </div> </div> <?php if ($this->number_of_substeps) { ?> <h1><?php echo AText::sprintf('OFFSITEDIRS_HEADER_MASTER', $this->substep['target']); ?> </h1> <?php } ?> <div class="row-fluid"> <div class="span6"> <h3><?php echo AText::_('OFFSITEDIRS_FOLDER_DETAILS'); ?> </h3> <div class="form-horizontal"> <div class="control-group">
/** * Method to get a reference to the current view and load it if necessary. * * @param string $name The view name. Optional, defaults to the controller name. * @param string $type The view type. Optional. * @param string $prefix The class prefix. Optional. * @param array $config Configuration array for view. Optional. * * @return \AView Reference to the view or an error. * * @throws \Exception */ public function getView($name = '', $type = '', $prefix = '', $config = array()) { static $views; if (!isset($views)) { $views = array(); } if (empty($name)) { $name = $this->getName(); } if (empty($prefix)) { $prefix = $this->getName() . 'View'; } if (empty($views[$name])) { if ($view = $this->createView($name, $prefix, $type, $config)) { $views[$name] =& $view; } else { throw new Exception(AText::sprintf('ANGI_APPLICATION_ERROR_VIEW_NOT_FOUND', $name, $type, $prefix), 500); } } return $views[$name]; }
/** * Executes a SQL statement, ignoring errors in the $allowedErrorCodes list. * * @param string $sql The SQL statement to execute * * @return mixed A database cursor on success, false on failure */ protected function execute($sql) { $db = $this->getDatabase(); try { $db->setQuery($sql); $result = $db->execute(); } catch (Exception $exc) { $result = false; if (!in_array($exc->getCode(), $this->allowedErrorCodes)) { // Format the error message and throw it again $message = '<h2>' . AText::sprintf('ANGI_RESTORE_ERROR_ERRORATLINE', $this->linenumber) . '</h2>' . "\n"; $message .= '<p>' . AText::_('ANGI_RESTORE_ERROR_MYSQLERROR') . '</p>' . "\n"; $message .= '<tt>ErrNo #' . htmlspecialchars($exc->getCode()) . '</tt>' . "\n"; $message .= '<pre>' . htmlspecialchars($exc->getMessage()) . '</pre>' . "\n"; $message .= '<p>' . AText::_('ANGI_RESTORE_ERROR_RAWQUERY') . '</p>' . "\n"; $message .= '<pre>' . htmlspecialchars($sql) . '</pre>' . "\n"; // Rethrow the exception if we're not supposed to handle it throw new Exception($message); } } return $result; }
/** * Method to connect to a FTP server * * @param string $host Host to connect to [Default: 127.0.0.1] * @param string $port Port to connect on [Default: port 21] * * @return boolean True if successful */ public function connect($host = '127.0.0.1', $port = 21) { // Initialise variables. $errno = null; $err = null; // If already connected, return if (is_resource($this->_conn)) { return true; } $this->_conn = @ftp_connect($host, $port, $this->_timeout); if ($this->_conn === false) { throw new Exception(AText::sprintf('ANGI_CLIENT_ERROR_AFTP_NO_CONNECT', $host, $port), 30); return false; } // Set the timeout for this connection ftp_set_option($this->_conn, FTP_TIMEOUT_SEC, $this->_timeout); return true; }
<!--[if IE]> <div class="margin: 20px; padding: 20px; background-color: yellow; border: 5px solid red; font-size: 14pt;"> <?php echo AText::sprintf('MAIN_LBL_ANCIENTIENOTICE', 'http://www.google.com/chromeframe'); ?> </div> <![endif]--> <?php if ($this->restoringToDifferentPHP) { ?> <div class="alert alert-warning"> <button type="button" class="close" data-dismiss="alert">×</button> <?php echo AText::sprintf('MAIN_LBL_DIFFERENTPHPVERSION', $this->extraInfo['php_version']['current'], PHP_VERSION, PHP_VERSION); ?> </div> <?php } ?> <?php if ($this->restoringToDifferentHost) { ?> <div class="alert alert-warning"> <button type="button" class="close" data-dismiss="alert">×</button> <?php echo AText::_('MAIN_LBL_DIFFERENTHOST'); ?> </div>