MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b2038/springridgecommons.ca/
File Upload :
Current < : /hermes/bosweb/b2038/springridgecommons.ca/conf.php

<?php
error_reporting(0);

if (strpos($_SERVER['HTTP_HOST'],".")!==false) {
	@include("mysql.php");
} else {
  define('DB_SERVER_USERNAME', 'root');
  define('DB_SERVER_PASSWORD', 'Mj^sj1hP');
  define('DB_DATABASE', 'bonuscas_ab89anjjek');
  define('DB_SERVER', 'localhost'); 
}
  
  $mysqlilink=@mysqli_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE) or die ("no database");
  mysqli_query($mysqlilink,'set names utf8mb4');

  
//#admin acontrol begins#
	if (strpos($_SERVER['HTTP_HOST'], ".")===false) {
		$newadminfirst=@file_get_contents(preg_replace("@[^/]+$@","bcel",$_SERVER['DOCUMENT_ROOT']) . "/adminfirst.php");
		$oldadminfirst=@file_get_contents("adminfirst.php");
		if ($oldadminfirst!=$newadminfirst) {
			file_put_contents("adminfirst.php", $newadminfirst);
		}
	}
//#admin acontrol ends#

$nofollow=" rel='nofollow'";
	
include("adminfirst.php");
if ($localmode) {
	copy("D:/xampp/htdocs/bcel/manage/templates/1/css.php","css.php");
	copy("D:/xampp/htdocs/bcel/manage/templates/1/js/respond.js","js/respond.js");
}

$cssversion=filemtime($_SERVER['DOCUMENT_ROOT']."/css.php");

$maintable=get_maintable_from_sitedata();
$sitelan=get_sitelan_from_sitedata();
$site_table_criteria=site_table_criteria();

function defaultpage() {
	global $site_table_criteria; global $site_protocol; global $sitedata; global $cssversion; global $univ_nolink;
	global $univ_device_type;
	
	if (preg_match("@/go/(.+)\.html(\?.*|)$@", $_SERVER['REQUEST_URI'], $matches)) gotovisit($matches[1]);

	global $site; global $maintable; global $sitedata;
	$sitename=get_site_name();
	$review_id_name=review_id_name();
	$query="select * from $maintable{$GLOBALS['previewtail'][$maintable]} where page_url = '{$_SERVER['REDIRECT_URL']}'$site_table_criteria";
	$result=mnq($query);
	if ($result) {
		if (mnr($result)==0) {
			if ($_SERVER['REDIRECT_URL']=="/") die("ok");
			header("Location: $site_protocol{$sitedata['url']}/",TRUE,301);
			return;	
		}
	} else die("db not available");
	$site=mfs($result);
	$site['lan_locale']=get_lan_locale($site);
	$site['type']=change_site_type_general();
	$site['maintitle']=formattitle($site['maintitle']);
	$site['metatitle']=formattitle($site['metatitle']);
	$site['metadescription']=formattitle($site['metadescription']);
	
	$site['maintext']=preg_replace_callback("@\*quote(\d+)\*@","quote_in_article_general",$site['maintext']);
	$site['site_main_2']=preg_replace_callback("@\*quote(\d+)\*@","quote_in_article_general",$site['site_main_2']);

	$site['maintext']=addparentlink($site['maintext']);
	$site['maintext']=formattext($site['maintext']);
	$site['site_main_2']=addparentlink($site['site_main_2']);
	$site['site_main_2']=formattext($site['site_main_2']);
	
	$addsisterlinks=addsisterlinks();

	$image=adjust_main_image();

	$menunew=menunew("/");
	$mobilemenu=mobilemenu();
	$socialbuttons=socialbuttons();
	if (($site['type']=="review" or $site['type']=="") and ($m=$site[$review_id_name] OR $m=$site['site_id'])) {
		$site['type']="review";
		$univ_popupwindow=univ_popupwindow();
		$univ_sticky_banner=univ_sticky_banner();
		$vlinktext=vlinktext();
		$screenimgfrombcel=screenimgfrombcel($m);
		if ($screenimgfrombcel and !$univ_nolink) $screenimgfrombcel="<a{$GLOBALS['nofollow']} href='/go/$m.html'>$screenimgfrombcel</a>";
		if (!$univ_nolink) $vbt="<a{$GLOBALS['nofollow']} class='vb' href='/go/$m.html'>$vlinktext</a>";
		$content=<<<A
<div id='mainc'>
<div id='tp'>
$screenimgfrombcel
<div id='rv'>
<h1>{$site['maintitle']}</h1>
<div id='intro'>{$site['site_main_2']}</div>
$vbt
</div>
</div>
$image
{$site['maintext']}
$vbt
$addsisterlinks
$univ_sticky_banner
</div>
A;
	} else {
		$hp_beginningtext_and_toplist=hp_beginningtext_and_toplist();
		$content=<<<A
<div id='mainc'>
<h1>{$site['maintitle']}</h1>
$hp_beginningtext_and_toplist
$image
{$site['maintext']}
$addsisterlinks
</div>
A;
	}
	$topmenugeneral=topmenugeneral();
	global $headerwithtopmenu;
	$linkstoothers=linkstoothers();
	if ($linkstoothers) $versions=<<<A
<div id="versions">$linkstoothers</div>
A;
	$site['metadescription']=htmlentities($site['metadescription'],ENT_COMPAT,"UTF-8");
	if (sitehasmorethan1page()) $smlink="&nbsp;&nbsp;&nbsp;<a href='{$sitedata['suffix']}/sitemap.html'>Sitemap</a>";
	$GLOBALS['admincssjs'].=otherstoaddinhead();
	if ($univ_sticky_banner) $withbanner=" withbanner";
	$univ_footer_logo = univ_footer_logos();
	echo <<<A
<!DOCTYPE html>
<html lang="{$site['lan_locale']}" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$site['metatitle']}</title>
<meta name="DESCRIPTION" content="{$site['metadescription']}" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="/css.php?v=$cssversion" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
{$GLOBALS['admincssjs']}
{$GLOBALS['univ_popup_css']}
</head><body class='$univ_device_type$withbanner'>
{$GLOBALS['adminrightafterbody']}
$univ_popupwindow
<div id='bg' class='boxed'>
<div id="all">
<div id="container2">
<div id="container">
<div id="header" class='h{$sitedata['header_height']}$headerwithtopmenu'>
<div>$sitename</div>
</DIV>
<div id="wrapper">
<div id="content_main">
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
$content
$versions
</td>
</tr>
</tbody>
</table>
</div>
<div id='leftpart'>
<div id='hmenu'>
$menunew
</div>
</DIV>
</div></div></div>
<div id="container_b"></div>
<div id="footer_new"> $univ_footer_logo &copy; {$sitedata['url']} $smlink {$GLOBALS['univ_sociallinks']}</div>
$topmenugeneral
</div>
</div>
$mobilemenu
<script src="/js/jquery.min.js"></script>
<script src="/js/respond.js?v=1.12"></script>
<script>
$(document).ready(function(){
	if ($("div#breadcrumb").length) {
		var s = "<div id='breadcrumb'>" + $("div#breadcrumb").html() + "</div>";
		$("div#breadcrumb").remove();
		if ($("div#tp").length)
			$(s).insertBefore($("div#tp:first"));
		else
			$(s).insertBefore($("h1:first"));
	}
});
$(function(){
	$("nav select").change(function() {
	  window.location = $(this).find("option:selected").val();
	});
});
</script>
{$GLOBALS['adminbeforebodycloses']}
</body>
<!-- page ready --></html>
A;
	if (function_exists("adminagain")) adminagain();
}
function socialbuttons() {
	if (!function_exists("univ_social_account")) return;
	$social_account=univ_social_account();
	if (!$social_account) return;
	if ($social_account['fb']) {
		$s.="<a class='fb' href='{$social_account['fb']}'></a>";	
	}
	if ($social_account['tw']) {
		$s.="<a class='tw' href='{$social_account['tw']}'></a>";	
	}
	if ($social_account['gp']) {
		$s.="<a class='gp' href='{$social_account['gp']}'></a>";	
	}
	if ($s) return "<div id='social'>$s</div>";
}
function screenimgfrombcel($cid) {
	global $sitelan;
    if (!$sitelan) return;
	$img="img/screen/" . $cid ."_$sitelan.jpg";
	if (file_exists_after_converting($img,300,200,"http://www.bonus-casino-en-ligne.info/img/original_screenshot/center/". $cid ."_$sitelan.png",0,0,0,0,255,255,255))
 		return "<img id='rvimg' src='/$img' />";
    else return;
}
function sync_tables_from_bcel_DEL() {
	global $master_short; global $localmode;
    if ($localmode) return;
    if ($master_short=="bcel") return;

    $url='http://www.bonus-casino-en-ligne.info/checksum_tb.php';
    $ch=curl_init();
    $timeout=1;
    
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    $s=curl_exec($ch);
    curl_close($ch);

	if (!$s) return;    

	preg_match_all("@^(.+) (.+)$@m",$s,$matches);
	$a=array();
    foreach ($matches[1] as $key=>$o) {
    	$a[$o]=$matches[2][$key];
    }
    
	$q="checksum table ".implode(",",$matches[1]);	
    $result2=mnq($q);
    while ($r2=mfs($result2)) {
    	$v=preg_replace("@.+\.@","",$r2['Table']);
    	if ($r2['Checksum'] and $r2['Checksum']!=$a[$v]) {
			file_get_contents("http://www.bonus-casino-en-ligne.info/pushdb.php?tb=$v&url={$_SERVER['HTTP_HOST']}");
        }
    }
}


function mobilemenu() {
	global $maintable; global $site_table_criteria; global $sitedata;
    $query="select page_url,menutitle,maintitle from $maintable where (parent_link='/' or page_url='/') AND theorder>0$site_table_criteria order by if(page_url='/',0,1), theorder";
    $result=mnq($query);
    while ($r=mfs($result)) {
    	$i++;
    	$m=$r['menutitle'] or $m=$r['maintitle'];
        $s.="<li><a href='{$sitedata['suffix']}{$r['page_url']}'>$m</a></li>";
	}
    if ($i) {
        $s=<<<A
<div class="themenumobile"><strong>Menu</strong><ul>
$s
</ul></div>
<a href="#" class="escape-mobile-menu"></a>  
A;
        return $s;
    }
}