
17 changed files with 118 additions and 166 deletions
@ -1,72 +0,0 @@
|
||||
<?php |
||||
|
||||
/** |
||||
* This file is part of Zwii. |
||||
* |
||||
* For full copyright and license information, please see the LICENSE |
||||
* file that was distributed with this source code. |
||||
* |
||||
* @author Rémi Jean <remi.jean@outlook.com> |
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean |
||||
* @license GNU General Public License, version 3 |
||||
* @link http://zwiicms.com/ |
||||
*/ |
||||
|
||||
class inclusion extends common { |
||||
|
||||
public static $actions = [ |
||||
'config' => self::GROUP_MODERATOR, |
||||
'index' => self::GROUP_VISITOR |
||||
]; |
||||
|
||||
/** |
||||
* Configuration |
||||
*/ |
||||
public function config() { |
||||
// Soumission du formulaire |
||||
if($this->isPost()) { |
||||
$this->setData(['module', $this->getUrl(0), 'url', $this->getInput('inclusionConfigUrl', helper::FILTER_URL, true)]); |
||||
// Valeurs en sortie |
||||
$this->addOutput([ |
||||
'redirect' => helper::baseUrl() . $this->getUrl(), |
||||
'notification' => 'Modifications enregistrées', |
||||
'state' => true |
||||
]); |
||||
} |
||||
// Valeurs en sortie |
||||
$this->addOutput([ |
||||
'title' => 'Configuration du module', |
||||
'view' => 'config' |
||||
]); |
||||
} |
||||
|
||||
/** |
||||
* Accueil |
||||
*/ |
||||
public function index() { |
||||
// Message si l'utilisateur peut éditer la page |
||||
if( |
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') |
||||
AND $this->getUser('group') >= self::GROUP_MODERATOR |
||||
AND $this->getUrl(1) !== 'force' |
||||
) { |
||||
// Valeurs en sortie |
||||
$this->addOutput([ |
||||
'display' => self::DISPLAY_LAYOUT_BLANK, |
||||
'title' => '', |
||||
'view' => 'index' |
||||
]); |
||||
} |
||||
// Sinon inclusion |
||||
else { |
||||
// Incrémente le compteur de clics |
||||
$this->setData(['module', $this->getUrl(0), 'count', helper::filter($this->getData(['module', $this->getUrl(0), 'count']) + 1, helper::FILTER_INT)]); |
||||
// Valeurs en sortie |
||||
$this->addOutput([ |
||||
'content' => '<iframe src="' . helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), 'url']) . '"></iframe>' , |
||||
'state' => true |
||||
]); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,37 +0,0 @@
|
||||
<?php echo template::formOpen('inclusionConfig'); ?> |
||||
<div class="row"> |
||||
<div class="col2"> |
||||
<?php echo template::button('inclusionConfigBack', [ |
||||
'class' => 'buttonGrey', |
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0), |
||||
'ico' => 'left', |
||||
'value' => 'Retour' |
||||
]); ?> |
||||
</div> |
||||
<div class="col2 offset8"> |
||||
<?php echo template::submit('inclusionConfigSubmit'); ?> |
||||
</div> |
||||
</div> |
||||
<div class="row"> |
||||
<div class="col6"> |
||||
<div class="block"> |
||||
<h4>inclusion</h4> |
||||
<?php echo template::file('inclusionConfigUrl', [ |
||||
'label' => 'Lien d\'inclusion', |
||||
'placeholder' => helper::baseUrl() . 'site/file/source/', |
||||
'value' => $this->getData(['module', $this->getUrl(0), 'url']) |
||||
]); ?> |
||||
</div> |
||||
</div> |
||||
<div class="col6"> |
||||
<div class="block"> |
||||
<h4>Statistiques</h4> |
||||
<?php echo template::text('inclusionConfigCount', [ |
||||
'disabled' => true, |
||||
'label' => 'Nombre de redirections', |
||||
'value' => helper::filter($this->getData(['module', $this->getUrl(0), 'count']), helper::FILTER_INT) |
||||
]); ?> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<?php echo template::formClose(); ?> |
@ -1,32 +0,0 @@
|
||||
|
||||
|
||||
/** |
||||
* This file is part of Zwii. |
||||
* |
||||
* For full copyright and license information, please see the LICENSE |
||||
* file that was distributed with this source code. |
||||
* |
||||
* @author Rémi Jean <remi.jean@outlook.com> |
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean |
||||
* @license GNU General Public License, version 3 |
||||
* @link http://zwiicms.com/ |
||||
* |
||||
* |
||||
**/ |
||||
|
||||
if (document.referrer.indexOf("edit") === -1) |
||||
{ |
||||
core.confirm( |
||||
"Souhaitez-vous accéder à l'interface de modification de la page ? En cas de refus, vous serez redirigé vers l'URL saisie dans le module de redirection.", |
||||
function() { |
||||
$(location).attr("href", "<?php echo helper::baseUrl(); ?>page/edit/<?php echo $this->getUrl(0); ?>");
|
||||
}, |
||||
function() { |
||||
$(location).attr("href", "<?php echo helper::baseUrl() . $this->getUrl(); ?>/force");
|
||||
} |
||||
); |
||||
} |
||||
else |
||||
{ |
||||
$(location).attr("href", "<?php echo helper::baseUrl(); ?>");
|
||||
} |
@ -1 +0,0 @@
|
||||
<!-- Page vide avec un commentaire pour ne pas afficher d'erreur 404 --> |
@ -1 +1 @@
|
||||
/*db413798705aa289e2ec19cf556e4f78*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.speechBubble,.button,.button:hover,button[type='submit'],.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,input[type='radio']:checked + label:before,.helpContent{background-color:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before,input[type='radio']:checked:hover + label:before,input[type='radio']:not(:checked):active + label:before{background-color:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center} |
||||
/*d1bbb044f9097442bfb4526883c52f2c*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.speechBubble,.button,.button:hover,button[type='submit'],.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,input[type='radio']:checked + label:before,.helpContent{background-color:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before,input[type='radio']:checked:hover + label:before,input[type='radio']:not(:checked):active + label:before{background-color:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-size:auto}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}@media (max-width: 767px) {header{height:75px;line-height:75px;}}header{background-image:url("../file/source/galerie/landscape/desert.jpg");background-position:center center;background-repeat:no-repeat}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center} |
Loading…
Reference in new issue