Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.9.0
- * @ Author : DeZender
- * @ Release on : 15.06.2018
- * @ Official site : http://DeZender.Net
- *
- */
- if (!function_exists('sm_error')) {
- function sm_error($error)
- {
- global $e;
- global $uid;
- global $app;
- @ob_end_clean();
- header('Content-Encoding: none');
- if (!isset($_SERVER['REQUEST_URI'])) {
- echo $error;
- exit();
- }
- echo "<html>\n<head>\n\t<title>";
- echo _('Sitemanager Error');
- echo "</title>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<style type=\"text/css\" media=\"screen\">\n\t\t#errormsg {\n\t\t\tpadding: 5px;\n\t\t\tbackground-color: #ffffcc;\n\t\t}\n\t\t\n\t\t#footer {\n\t\t\tcolor: gray;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t\t\n\t\th1 {\n\t\t\tmargin-bottom: 5px;\n\t\t\tfont-size: 18px;\n\t\t}\n\t\t\n\t\thtml, td {\n\t\t\tfont: 11px Arial, Helvetica, sans-serif;\n\t\t}\n\t\t\n\t\thtml {\n\t\t\tborder-top: 8px solid red;\n\t\t}\n\t\t\n\t\ta {\n\t\t\tcolor: blue;\n\t\t\ttext-decoration: underline;\n\t\t}\n\t</style>\n</head>\n<body>\n\t<h1>Sitemanager error</h1>\n<div>";
- echo '<div id="errormsg">' . nl2br($error) . "</div>\n";
- echo "\t<h3>Backtrace</h3>\n\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n";
- $trace = debug_backtrace();
- foreach ($trace as $key => $array) {
- echo "\t<tr style=\"background: ";
- echo($key % 2 ? '#e7e7e7' : '');
- echo "\">\n\t\t<td>";
- echo $array['file'];
- echo "</td>\n\t\t<td>";
- echo $array['line'];
- echo "</td>\n\t\t<td>";
- echo $array['function'];
- echo "</td>\n\t</tr>\n";
- }
- echo "\t</table>\n\t<div id=\"footer\">";
- echo(defined('SM_VERSION') ? SM_VERSION : '');
- echo "</div>\n</body>\n</html>\n";
- exit();
- }
- }
- if (!defined('SM_LICENCER_VERSION')) {
- if (!function_exists('gettext')) {
- function _($str)
- {
- return $str;
- }
- function _q($str)
- {
- return $str;
- }
- function _qe($str)
- {
- return str_replace("'", "\\'", $str);
- }
- function ngettext($str1, $str2, $i)
- {
- if (1 < $i) {
- return $str2;
- }
- return $str1;
- }
- function gettext_date($format, $timestamp = '')
- {
- return date($format, $timestamp);
- }
- return 1;
- }
- function _q($str)
- {
- return $str;
- }
- function _qe($str)
- {
- return str_replace("'", "\\'", $str);
- }
- function gettext_date($format, $timestamp = '')
- {
- return date($format, $timestamp);
- }
- }
- function sm_get_page()
- {
- global $appurl;
- global $pid;
- global $pages;
- global $page;
- global $url;
- global $fullname;
- global $company_name;
- global $crequest;
- $temp = explode('C', preg_replace('/\\?.*$/', '', $_SERVER['REQUEST_URI']), 2);
- $crequest = preg_replace('/\\/(.*?)\\/?$/', '\\1', $temp[0]);
- if (1 < count($temp)) {
- $appurl = preg_replace('/^\\/(.*?)\\/?$/', '\\1', $temp[1]);
- $appurl = explode('/', $appurl);
- } else {
- $appurl = array();
- }
- $url = explode('/', $crequest);
- if ($url[0] == '/' || $url[0] == '') {
- $url[0] = 'home';
- }
- $q = "SELECT id FROM pages WHERE parent = 0 AND symbolic = '" . $url[0] . "'";
- $result = dbexec($q);
- list($id) = mysql_fetch_row($result);
- $pages = array();
- if (!empty($id)) {
- array_push($pages, $id);
- }
- for ($i = 1; $i < count($url); $i++) {
- $q = "SELECT id FROM pages WHERE parent = '" . $id . "' AND symbolic = '" . $url[$i] . "'";
- $result = dbexec($q);
- list($id) = mysql_fetch_row($result);
- if (!empty($id)) {
- array_push($pages, $id);
- }
- }
- $q = "SELECT full_name, symbolic, title, keywords, description, charset FROM pages WHERE id = '" . $id . "' AND publish > 0";
- $result = dbexec($q);
- $keywords = $title = $description = $charset = '';
- if (0 < mysql_num_rows($result)) {
- list($fullname, $page, $title, $keywords, $description, $charset) = mysql_fetch_row($result);
- $pid = $id;
- mysql_free_result($result);
- } else {
- $pages = array();
- $GLOBALS['error_404'] = true;
- }
- $q = "SELECT name, value FROM config WHERE tag = 'SITE'";
- $result = dbexec($q);
- while ($row = mysql_fetch_assoc($result)) {
- $s[$row['name']] = $row['value'];
- }
- $q = 'SELECT c.company, c.city, g.country_name FROM contact as c, ' . GLOBALDB . '.countries as g WHERE c.id = 1 AND c.country = g.country_code';
- list($company_name, $city, $country) = mysql_fetch_row(dbexec($q));
- if ($title == '%AUTO%' && $keywords == '%AUTO%' && $description == '%AUTO%') {
- if (!empty($s['AUTO_MARKETING']) && empty($GLOBALS['error_404'])) {
- $GLOBALS['AUTO_MARKETING_TITLE'] = (string) $company_name . ', ' . $fullname;
- $GLOBALS['AUTO_MARKETING_KEYWORDS'] = (string) $company_name . ', ' . $fullname;
- $description = (string) $company_name;
- if (!empty($country)) {
- $description .= ', based in ' . $country;
- }
- if (!empty($city)) {
- $description .= ', located in ' . $city;
- }
- $q = "SHOW TABLES LIKE 'product_categories'";
- list($hastable) = mysql_fetch_row(dbexec($q));
- if ($hastable) {
- $q = 'SELECT name FROM product_categories WHERE cat = 0';
- $result = dbexec($q);
- $description .= ', providing ';
- for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
- if (0 < $i) {
- $description .= ', ';
- }
- $description .= $row['name'];
- }
- }
- }
- } else {
- if (empty($title) || empty($keywords) || empty($description)) {
- if (empty($title) && !empty($s['TITLE'])) {
- $title = $s['TITLE'];
- }
- if (empty($keywords) && !empty($s['KEYWORDS'])) {
- $keywords = $s['KEYWORDS'];
- }
- if (empty($description) && !empty($s['DESCRIPTION'])) {
- $description = $s['DESCRIPTION'];
- }
- }
- }
- $keywords = chop(ereg_replace("\r\n|\n|\t", '', $keywords));
- $description = chop(ereg_replace("\r\n|\n|\t", '', $description));
- if (empty($charset)) {
- $charset = 'iso8859-1';
- }
- if (!$crequest) {
- $crequest = $url[0];
- }
- if (empty($GLOBALS['AUTO_MARKETING_TITLE'])) {
- define('SM_PAGE_TITLE', $title);
- }
- if (empty($GLOBALS['AUTO_MARKETING_KEYWORDS'])) {
- .................................................................
- .......................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement