Exemple #1
0
	</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">&times;</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>

Exemple #2
0
 /**
  * Constructor
  *
  * @param   array $config A named configuration array for object construction.<br/>
  *                          name: the name (optional) of the view (defaults to the view class name suffix).<br/>
  *                          escape: the name (optional) of the function to use for escaping strings<br/>
  *                          base_path: the parent path (optional) of the views directory (defaults to the component folder)<br/>
  *                          template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name<br/>
  *                          helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)<br/>
  *                          layout: the layout (optional) to use to display the view<br/>
  *
  * @param   \AContainer $container
  *
  * @throws \AExceptionApp
  * @throws \Exception
  */
 public function __construct($config = array(), AContainer $container = null)
 {
     if (is_null($container)) {
         $container = AApplication::getInstance()->getContainer();
     }
     $this->container = $container;
     $this->input = $this->container->input;
     // Get the component name
     if (array_key_exists('option', $config)) {
         if ($config['option']) {
             $component = $config['option'];
         }
     }
     $config['option'] = $component;
     // Get the view name
     $view = $this->input->getCmd('view', '');
     if (array_key_exists('view', $config)) {
         if ($config['view']) {
             $view = $config['view'];
         }
     }
     $config['view'] = $view;
     // Set the component and the view to the input array
     $this->input->set('option', $config['option']);
     $this->input->set('view', $config['view']);
     // Set the view name
     if (array_key_exists('name', $config)) {
         $this->_name = $config['name'];
     } else {
         $this->_name = $config['view'];
     }
     $this->input->set('view', $this->_name);
     $config['input'] = $this->input;
     $config['name'] = $this->_name;
     $config['view'] = $this->_name;
     // Set a base path for use by the view
     if (array_key_exists('base_path', $config)) {
         $this->_basePath = $config['base_path'];
     } else {
         $this->_basePath = APATH_INSTALLATION . '/' . $config['option'];
     }
     // Set the default template search path
     if (array_key_exists('template_path', $config)) {
         // User-defined dirs
         $this->_setPath('template', $config['template_path']);
     } else {
         $this->_setPath('template', $this->_basePath . '/views/' . $this->getName() . '/tmpl');
     }
     // Set the default helper search path
     if (array_key_exists('helper_path', $config)) {
         // User-defined dirs
         $this->_setPath('helper', $config['helper_path']);
     } else {
         $this->_setPath('helper', $this->_basePath . '/helpers');
     }
     // Set the layout
     if (array_key_exists('layout', $config)) {
         $this->setLayout($config['layout']);
     } else {
         $this->setLayout('default');
     }
     $this->config = $config;
     $app = $this->container->application;
     $component = preg_replace('/[^A-Z0-9_\\.-]/i', '', $component);
     $fallback = APATH_THEMES . '/' . $app->getTemplate() . '/html/' . $component . '/' . $this->getName();
     $this->_addPath('template', $fallback);
     $this->baseurl = AUri::base(true);
 }
 /**
  * Redirect to another URL.
  *
  * Optionally enqueues a message in the system message queue (which will be displayed
  * the next time a page is loaded) using the enqueueMessage method. If the headers have
  * not been sent the redirect will be accomplished using a "301 Moved Permanently"
  * code in the header pointing to the new location. If the headers have already been
  * sent this will be accomplished using a JavaScript statement.
  *
  * @param   string   $url      The URL to redirect to. Can only be http/https URL
  * @param   string   $msg      An optional message to display on redirect.
  * @param   string   $msgType  An optional message type. Defaults to message.
  * @param   boolean  $moved    True if the page is 301 Permanently Moved, otherwise 303 See Other is assumed.
  *
  * @return  void  Calls exit().
  *
  * @see     AApplication::enqueueMessage()
  */
 public function redirect($url, $msg = '', $msgType = 'info', $moved = false)
 {
     // Check for relative internal links.
     if (preg_match('#^index\\.php#', $url)) {
         $url = AUri::base() . $url;
     }
     // Strip out any line breaks.
     $url = preg_split("/[\r\n]/", $url);
     $url = $url[0];
     /*
      * If we don't start with a http we need to fix this before we proceed.
      * We could validly start with something else (e.g. ftp), though this would
      * be unlikely and isn't supported by this API.
      */
     if (!preg_match('#^http#i', $url)) {
         $uri = AURI::getInstance();
         $prefix = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
         if ($url[0] == '/') {
             // We just need the prefix since we have a path relative to the root.
             $url = $prefix . $url;
         } else {
             // It's relative to where we are now, so lets add that.
             $parts = explode('/', $uri->toString(array('path')));
             array_pop($parts);
             $path = implode('/', $parts) . '/';
             $url = $prefix . $path . $url;
         }
     }
     // If the message exists, enqueue it.
     if (trim($msg)) {
         $this->enqueueMessage($msg, $msgType);
     }
     // Persist messages if they exist.
     if (count($this->messageQueue)) {
         $this->session->set('application.queue', $this->messageQueue);
         $this->session->saveData();
     }
     // If the headers have been sent, then we cannot send an additional location header
     // so we will output a javascript redirect statement.
     if (headers_sent()) {
         echo "<script>document.location.href='" . htmlspecialchars($url) . "';</script>\n";
     } else {
         header($moved ? 'HTTP/1.1 301 Moved Permanently' : 'HTTP/1.1 303 See other');
         header('Location: ' . $url);
         header('Content-Type: text/html; charset=utf-8');
     }
     $this->close();
 }
Exemple #4
0
 /**
  * Method to reset class static members for testing and other various issues.
  *
  * @return  void
  */
 public static function reset()
 {
     self::$instances = array();
     self::$base = array();
     self::$root = array();
     self::$current = '';
 }
Exemple #5
0
/**
 * @package angi4j
 * @copyright Copyright (C) 2009-2016 Nicholas K. Dionysopoulos. All rights reserved.
 * @author Nicholas K. Dionysopoulos - http://www.dionysopoulos.me
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL v3 or later
 *
 * Akeeba Next Generation Installer For Joomla!
 */
defined('_AKEEBA') or die;
/** @var $this AView */
$document = $this->container->application->getDocument();
$document->addScript('angie/js/json.js');
$document->addScript('angie/js/ajax.js');
$document->addScript('platform/js/setup.js');
$url = 'index.php';
$hashUrl = AUri::base() . 'platform/newhash.php';
$document->addScriptDeclaration(<<<JS
var akeebaAjax = null;
var hashUrl    = '{$hashUrl}';
\$(document).ready(function(){
\takeebaAjax = new akeebaAjaxConnector('{$url}');
});
JS
);
$this->loadHelper('select');
echo $this->loadAnyTemplate('steps/buttons');
echo $this->loadAnyTemplate('steps/steps', array('helpurl' => 'https://www.akeebabackup.com/documentation/solo/angie-drupal-setup.html'));
$key = str_replace('.', '_', $this->input->getCmd('substep', 'default'));
// The modal window is displayed only when we have a multi site environment and we have to change the settings.php
// file multiple times
?>