Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function addTpl() {
- global $zip;
- if(!isset($_GET['url']) || empty($_GET['url'])) {
- $_GET['url'] = 'index';
- }
- $front = '_zip/_templates/_front/'. $zip['Template']['Front'];
- $back = '_zip/_templates/_back/'. $zip['Template']['Back'];
- if(strpos($_GET['url'], 'backend') !== false) {
- if(file_exists($back . '/')) {
- if(file_exists($back . '/index.php')) {
- ob_start();
- include($back . '/index.php');
- $this->tpl .= ob_get_contents();
- ob_end_clean();
- } else {
- if($zip['Template']['Front'] == 'Refresh/multi-page') {
- ob_start();
- include($back . '/404.php');
- $this->tpl .= ob_get_contents();
- ob_end_clean();
- } else {
- die(zipError('File Not Found', 'The file <b>' . secure($_GET['url']) . '</b> could not be found. Please re-check the URL; If you were directed here using a link, please report that link <b><a href="mailto:IntactDev@gmail.com">here<a/>.</b>'));
- }
- }
- } else {
- die(zipError('Template Not Found', 'The template <b>' . $zip['Template']['Front'] . '</b> could not be found. Please check your configuration file for a mistake.'));
- }
- } else {
- if(file_exists($front. '/')) {
- if(file_exists($front. '/' . secure($_GET['url']) . '.php')) {
- ob_start();
- include($front. '/' . secure($_GET['url']) . '.php');
- $this->tpl .= ob_get_contents();
- ob_end_clean();
- } else {
- if($zip['Template']['Front'] == 'Refresh/multi-page') {
- ob_start();
- include($front. '/404.php');
- $this->tpl .= ob_get_contents();
- ob_end_clean();
- } else {
- die(zipError('File Not Found', 'The file <b>' . secure($_GET['url']) . '</b> could not be found. Please re-check the URL; If you were directed here using a link, please report that link <b><a href="mailto:IntactDev@gmail.com">here<a/>.</b>'));
- }
- }
- } else {
- die(zipError('Template Not Found', 'The template <b>' . $zip['Template']['Front'] . '</b> could not be found. Please check your configuration file for a mistake.'));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement