Ejemplo n.º 1
0
    public function onBeforeMain()
    {
        ADocument::getInstance()->addScriptDeclaration(<<<ENDSRIPT
var akeebaAjax = null;
\$(document).ready(function(){
    akeebaAjax = new akeebaAjaxConnector('index.php');

    akeebaAjax.callJSON({
        'view'   : 'runscripts',
        'format' : 'raw'
    });
});
ENDSRIPT
);
        $model = $this->getModel();
        $this->showconfig = $model->getState('showconfig', 0);
        if ($this->showconfig) {
            $this->configuration = AModel::getAnInstance('Configuration', 'AngieModel')->getFileContents();
        }
        if (ASession::getInstance()->get('tfa_warning', false)) {
            $this->extra_warning = '<div class="alert alert-block alert-error">';
            $this->extra_warning .= '<h4 class="alert-heading">' . AText::_('FINALISE_TFA_DISABLED_TITLE') . '</h4>';
            $this->extra_warning .= '<p>' . AText::_('FINALISE_TFA_DISABLED_BODY') . '</p>';
            $this->extra_warning .= '</div>';
        }
        return true;
    }
Ejemplo n.º 2
0
 protected function getInput()
 {
     jimport('joomla.filesystem.folder');
     $bar = JToolBar::getInstance('toolbar_image');
     $bar->addButtonPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'toolbar');
     /* @var $bar JToolBar */
     $bar->appendButton('Popup', 'new1', 'Add', ARoute::view(VIEW_IMAGES, null, null, array('tmpl' => 'component', 'type' => '1')), 800, 600);
     $bar->appendButton('ALink', 'delete', 'Delete', 'javascript:AImages.removeMain()', 'imageMainRemove');
     $html[] = $bar->render();
     $thumb = AImage::thumb(BookProHelper::getIPath($this->image), null, ADMIN_SET_IMAGES_WIDTH);
     $html[] = '<img src="' . $thumb . '" alt="" id="imageMainSource" class="thumb' . $thumb ? '' : ' blind' . '" />';
     if (!$thumb) {
         $html[] = ADocument::addDomreadyEvent('AImages.hideRemoveMain()');
     }
     $html[] = '<input type="hidden" name="image" id="imageMainHidden" value="' . $this->escape($this->image) . '" />';
     return implode("\n", $html);
 }
Ejemplo n.º 3
0
if (defined('DB_HOSTNAME') && DB_HOSTNAME) {
    $db = new ADB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
    $r = $db->query("SELECT product_id FROM " . DB_PREFIX . "products");
    $data_exist = $r->num_rows;
} else {
    unset($session->data['finish']);
}
if ($data_exist && empty($session->data['finish'])) {
    header('Location: ../');
}
if (!empty($session->data['finish']) && $session->data['finish'] == 'true') {
    $request->get['rt'] = 'finish';
}
try {
    // Document
    $document = new ADocument();
    $document->setBase(HTTP_SERVER);
    $registry->set('document', $document);
    // Page Controller
    $page_controller = new APage($registry);
    // Router
    if (!empty($request->get['rt'])) {
        $dispatch = $request->get['rt'];
    } else {
        $dispatch = 'license';
    }
    $page_controller->build('pages/' . $dispatch);
    // Output
    $response->output();
} catch (AException $e) {
    ac_exception_handler($e);
Ejemplo n.º 4
0
<?php

/**
 * @package angi4j
 * @copyright Copyright (C) 2009-2014 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
 */
defined('_AKEEBA') or die;
$this->loadHelper('select');
ADocument::getInstance()->addScript('angie/js/json.js');
ADocument::getInstance()->addScript('angie/js/ajax.js');
ADocument::getInstance()->addScript('angie/js/database.js');
$url = 'index.php';
ADocument::getInstance()->addScriptDeclaration(<<<ENDSRIPT
var akeebaAjax = null;
\$(document).ready(function(){
\takeebaAjax = new akeebaAjaxConnector('{$url}');
});
ENDSRIPT
);
echo $this->loadAnyTemplate('steps/buttons');
echo $this->loadAnyTemplate('steps/steps', array('helpurl' => 'https://www.akeebabackup.com/documentation/solo/angie-installers.html#angie-common-database'));
?>

<div class="modal hide fade" id="restoration-dialog">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="restoration-btn-modalclose">&times;</button>
		<h3><?php 
echo AText::_('DATABASE_HEADER_DBRESTORE');
?>
Ejemplo n.º 5
0
<?php

/**
 * @package angi4j
 * @copyright Copyright (C) 2009-2014 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
 */
defined('_AKEEBA') or die;
ADocument::getInstance()->addScript('angie/js/json.js');
ADocument::getInstance()->addScript('angie/js/ajax.js');
ADocument::getInstance()->addScript('angie/js/finalise.js');
echo $this->loadAnyTemplate('steps/buttons');
echo $this->loadAnyTemplate('steps/steps', array('helpurl' => 'https://www.akeebabackup.com/documentation/solo/angie-installers.html#angie-common-finalise'));
if (isset($this->extra_warning)) {
    echo $this->extra_warning;
}
?>

<?php 
if ($this->showconfig) {
    echo $this->loadAnyTemplate('finalise/config');
}
?>

<div class="alert alert-info">
	<p><?php 
echo AText::_('FINALISE_LBL_PRBASICTS');
?>
</p>
	<a href="https://www.akeebabackup.com/documentation/troubleshooter/prbasicts.html">
Ejemplo n.º 6
0
 /**
  * Creates and returns the document object
  *
  * @return  ADocument
  */
 public function getDocument()
 {
     static $instance = null;
     if (is_null($instance)) {
         $type = $this->input->getCmd('format', 'html');
         $instance = ADocument::getInstance($type);
     }
     return $instance;
 }
Ejemplo n.º 7
0
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL v3 or later
 */
defined('_AKEEBA') or die;
ADocument::getInstance()->addScript('angie/js/json.js');
ADocument::getInstance()->addScript('angie/js/ajax.js');
ADocument::getInstance()->addScript('platform/js/main.js');
$url = 'index.php';
ADocument::getInstance()->addScriptDeclaration(<<<ENDSRIPT
var akeebaAjax = null;
\$(document).ready(function(){
\takeebaAjax = new akeebaAjaxConnector('{$url}');
});
ENDSRIPT
);
ADocument::getInstance()->appendButton('GENERIC_BTN_STARTOVER', 'index.php?view=main&task=startover', 'danger', 'white fire');
ADocument::getInstance()->appendButton('GENERIC_BTN_RECHECK', 'javascript:mainGetPage();', 'warning', 'white retweet');
echo $this->loadAnyTemplate('steps/buttons');
?>
<noscript>
<div class="alert alert-error">
	<h3><?php 
echo AText::_('MAIN_HEADER_NOJAVASCRIPT');
?>
</h3>
	<p><?php 
echo AText::_('MAIN_LBL_NOJAVASCRIPT');
?>
</p>
</div>
</noscript>
<div class="well" style="text-align: center;">
Ejemplo n.º 8
0
<?php

/**
 * @package angi4j
 * @copyright Copyright (C) 2009-2014 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
 */
defined('_AKEEBA') or die;
ADocument::getInstance()->addScript('angie/js/ftpbrowser.js');
?>

<?php 
if ($this->badFTP) {
    ?>
<p></p>
<div class="alert alert-error">
	<?php 
    echo AText::_('FTPBROWSER_ERR_CANNOTCONNECT');
    ?>
</br>
	<code><?php 
    echo $this->ftpError;
    ?>
</code>
</div>
<?php 
} else {
    ?>

<?php 
Ejemplo n.º 9
0
			<input type="hidden" name="task" value="unlock" />

			<h2 class="form-signin-heading">
				<?php 
echo AText::_('PASSWORD_HEADER_LOCKED');
?>
			</h2>
			<input type="password" name="password" id="password" class="input-block-level" placeholder="<?php 
echo AText::_('PASSWORD_FIELD_PASSWORD_LABEL');
?>
" />
			<button class="btn btn-large btn-primary" type="submit">
				<span class="icon-white icon-lock"></span>
				<?php 
echo AText::_('PASSWORD_BTN_UNLOCK');
?>
			</button>
		</form>
	</div>
	<div class="span3"></div>
</div>

<?php 
$script = <<<ENDSCRIPT
\$(document).ready(function(){
\t\$('#password').focus();
});

ENDSCRIPT;
$x = ADocument::getInstance()->addScriptDeclaration($script);
Ejemplo n.º 10
0
 /**
  * Set reservation box params as javascript object
  * 
  * @param BookingBox $box
  */
 function setBoxParams(&$box, $i, $useId2 = false)
 {
     $document =& JFactory::getDocument();
     /* @var $document JDocument */
     $vars = get_object_vars($box);
     $id = $vars['id'] = $useId2 ? $vars['id2'] : $vars['id'];
     unset($vars['id2']);
     foreach ($vars as $param => $value) {
         $boxes[] = $param . ' : "' . addslashes($value) . '"';
     }
     $document->addScriptDeclaration('Calendars.boxes[' . $i++ . '] = {' . implode(', ', $boxes) . '}');
     ADocument::addDomreadyEvent("\$('" . $id . "').addEvent('click',function(){Calendars.setCheckBox(\"" . $id . "\");});");
     ADocument::addDomreadyEvent("\$('" . $id . "').addEvent('mouseover',function(){Calendars.highlightInterval(\"" . $id . "\");});");
     ADocument::addDomreadyEvent("\$('" . $id . "').addEvent('mouseout',function(){Calendars.unhighlightInterval(\"" . $id . "\");});");
 }
Ejemplo n.º 11
0
\$(document).ready(function(){
\tif ((window.name == 'installer'))
\t{
\t\tjQuery('#finaliseKickstart').show();
\t}
\telse if ((window.name == 'abinstaller') || (window.name == 'solo_angie_window'))
\t{
\t\tjQuery('#finaliseIntegrated').show();
\t}
\telse
\t{
\t\tjQuery('#finaliseStandalone').show();
\t}
});
JS;
ADocument::getInstance()->addScriptDeclaration($js);
echo $this->loadAnyTemplate('steps/buttons');
echo $this->loadAnyTemplate('steps/steps', array('helpurl' => 'https://www.akeebabackup.com/documentation/solo/angie-installers.html#angie-common-finalise'));
if (isset($this->extra_warning)) {
    echo $this->extra_warning;
}
?>

<?php 
if ($this->showconfig) {
    echo $this->loadAnyTemplate('finalise/config');
} else {
    ?>
<h3>
	<?php 
    echo AText::_('FINALISE_LBL_READY');
Ejemplo n.º 12
0
if (!empty($prevStep['step'])) {
    $url = 'index.php?view=' . $prevStep['step'] . (!empty($prevStep['substep']) ? '&substep=' . $prevStep['substep'] : '');
    ADocument::getInstance()->appendButton('GENERIC_BTN_PREV', $url, '', 'arrow-left');
}
// Skip (on database step)
if ($stepsModel->getActiveStep() == 'database') {
    // Next step
    $nextStep = $stepsModel->getNextStep();
    if (!empty($nextStep['step'])) {
        $url = 'index.php?view=' . $nextStep['step'] . (!empty($nextStep['substep']) ? '&substep=' . $nextStep['substep'] : '');
        ADocument::getInstance()->appendButton('GENERIC_BTN_SKIP', $url, 'warning', 'white forward');
    }
    $key = $stepsModel->getActiveSubstep();
    ADocument::getInstance()->appendButton('GENERIC_BTN_NEXT', 'javascript:databaseRunRestoration(\'' . $key . '\'); return false;', 'primary', 'white arrow-right');
} elseif ($stepsModel->getActiveStep() == 'offsitedirs') {
    // Next step
    $nextStep = $stepsModel->getNextStep();
    if (!empty($nextStep['step'])) {
        $url = 'index.php?view=' . $nextStep['step'] . (!empty($nextStep['substep']) ? '&substep=' . $nextStep['substep'] : '');
        ADocument::getInstance()->appendButton('GENERIC_BTN_SKIP', $url, 'warning', 'white forward');
    }
    $key = $stepsModel->getActiveSubstep();
    ADocument::getInstance()->appendButton('GENERIC_BTN_NEXT', 'javascript:offsitedirsRunRestoration(\'' . $key . '\'); return false;', 'primary', 'white arrow-right');
} else {
    // Next step
    $nextStep = $stepsModel->getNextStep();
    if (!empty($nextStep['step'])) {
        $url = 'index.php?view=' . $nextStep['step'] . (!empty($nextStep['substep']) ? '&substep=' . $nextStep['substep'] : '');
        ADocument::getInstance()->appendButton('GENERIC_BTN_NEXT', $url, 'primary', 'white arrow-right');
    }
}