This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Empty | |
*/ | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
private $error = array(); | |
public function index() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function addModule() { | |
$this->load->model('setting/module'); | |
$this->model_setting_module->addModule('age_restriction', [ | |
'name' => 'Age Restriction (21)', | |
'message' => 'Are you %s and older?', | |
'age' => 21, | |
'redirect_url' => 'http://www.example.org', | |
'status' => 1 /* Enabled by default*/ | |
]); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function index() { | |
if (!isset($this->request->get['module_id'])) { | |
$module_id = $this->addModule(); | |
$this->response->redirect($this->url->link('extension/module/age_restriction','&user_token='.$this->session->data['user_token'].'&module_id='.$this->db->getLastId())); | |
} else { | |
$this->editModule($this->request->get['module_id']); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
private $error = array(); | |
public function index() {} | |
public function validate() {} | |
public function install() {} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_['heading_title'] = 'Age Restriction Module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
const DEFAULT_MODULE_SETTINGS = [ | |
'name' => 'Age Restriction (21)', | |
'message' => 'Are you %s and older?', | |
'age' => 21, | |
'redirect_url' => 'http://www.example.org', | |
'status' => 1 /* Enabled by default*/ | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ header }}{{ column_left }} | |
<div id="content"> | |
<h2>It works!</h2> | |
{# | |
<div>message: {{ message }}</div> | |
<div>age: {{ age }}</div> | |
<div>redirect url: {{ redirect_url }}</div> | |
</div> #} | |
{{ footer }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Heading | |
$_['heading_title'] = 'Age Restriction Module'; | |
// Text | |
$_['text_extension'] = 'Extensions'; | |
$_['text_success'] = 'Success: You have modified banner module!'; | |
$_['text_edit'] = 'Edit Age Restriction Module'; | |
// Entry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ header }}{{ column_left }} | |
<div id="content"> | |
<div class="page-header"> | |
<div class="container-fluid"> | |
<div class="pull-right"> | |
<button type="submit" form="form-module" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button> | |
<a href="{{ action.cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div> | |
<h1>{{ heading_title }}</h1> | |
<ul class="breadcrumb"> | |
{% for breadcrumb in breadcrumbs %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
const DEFAULT_MODULE_SETTINGS = [ | |
'name' => 'Age Restriction (21)', | |
'message' => 'Are you %s and older?', | |
'age' => 21, | |
'redirect_url' => 'http://www.example.org', | |
'status' => 1 /* Enabled by default*/ | |
]; |
OlderNewer