Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
require_once('../Connections/Baglanti.php'); include("../Includes/Functions.php"); i..
Decoded Output download
<? require_once('../Connections/Baglanti.php');
include("../Includes/Functions.php");
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Admin set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "Login.php?Error=ReLogin";
if (!((isset($_SESSION['MM_Admin'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Admin'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Admin'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Admin']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "/";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "HatirlatmaOkundu")) {
$updateSQL = sprintf("UPDATE hatirlatmalar SET Durum=%s WHERE HatirlatmaID=%s",
GetSQLValueString($_POST['Durum'], "int"),
GetSQLValueString($_POST['HatirlatmaID'], "int"));
mysql_select_db($database_Baglanti, $Baglanti);
$Result1 = mysql_query($updateSQL, $Baglanti) or die(mysql_error());
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
if(isset($_POST['Tarih'])){
$HatirlatmaTarihi = TarihCevir2($_POST['Tarih']) . ' ' . $_POST['BaslangicSaati'] . ":" . $_POST['BaslangicDakika'] . ":00";
}else{
$HatirlatmaTarihi = date("Y-m-d H:i:s");
}
$insertSQL = sprintf("INSERT INTO hatirlatmalar (Durum, Tarih, Konu) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['Durum'], "int"),
GetSQLValueString($HatirlatmaTarihi, "date"),
GetSQLValueString($_POST['Konu'], "text"));
mysql_select_db($database_Baglanti, $Baglanti);
$Result1 = mysql_query($insertSQL, $Baglanti) or die(mysql_error());
}
mysql_select_db($database_Baglanti, $Baglanti);
$query_Ayarlar = "SELECT * FROM ayarlar WHERE AyarID = 1";
$Ayarlar = mysql_query($query_Ayarlar, $Baglanti) or die(mysql_error());
$row_Ayarlar = mysql_fetch_assoc($Ayarlar);
$totalRows_Ayarlar = mysql_num_rows($Ayarlar);
mysql_select_db($database_Baglanti, $Baglanti);
$query_HatirlatmalariCek = "SELECT * FROM hatirlatmalar ORDER BY Tarih DESC";
$HatirlatmalariCek = mysql_query($query_HatirlatmalariCek, $Baglanti) or die(mysql_error());
$row_HatirlatmalariCek = mysql_fetch_assoc($HatirlatmalariCek);
$totalRows_HatirlatmalariCek = mysql_num_rows($HatirlatmalariCek);
$colname_PersonelBilgileri = "-1";
if (isset($_SESSION['MM_Admin'])) {
$colname_PersonelBilgileri = $_SESSION['MM_Admin'];
}
mysql_select_db($database_Baglanti, $Baglanti);
$query_PersonelBilgileri = sprintf("SELECT * FROM personel WHERE KullaniciAdi = %s", GetSQLValueString($colname_PersonelBilgileri, "text"));
$PersonelBilgileri = mysql_query($query_PersonelBilgileri, $Baglanti) or die(mysql_error());
$row_PersonelBilgileri = mysql_fetch_assoc($PersonelBilgileri);
$totalRows_PersonelBilgileri = mysql_num_rows($PersonelBilgileri);
$BaslangicDate = new DateTime($row_Ayarlar['MesaiBaslangic']);
$BaslangicSaat = $BaslangicDate->format('H');
$BitisDate = new DateTime($row_Ayarlar['MesaiBitis']);
$BitisSaat = $BitisDate->format('H');
$SeansAraligi = $row_Ayarlar['SeansAraligi'];
if(isset($_GET['Tarih'])){
$Tarih = TarihCevir2($_GET['Tarih']);
$TarihGet = $_GET['Tarih'];
}else{
$Tarih = date("Y-m-d");
$TarihGet = date("d.m.Y");
}
$Adi = $row_Ayarlar['Adi'];
$Soyadi = $row_Ayarlar['Soyadi'];
$UrunKodu = $row_Ayarlar['UrunKodu'];
$WebSitesi = getenv('HTTP_HOST');
if (substr($WebSitesi, 0, 7) == "http://"){
$WebSitesi = substr($WebSitesi,7);
}
if (substr($WebSitesi, 0, 8) == "https://"){
$WebSitesi = substr($WebSitesi,8);
}
if (substr($WebSitesi, 0, 4) == "www."){
$WebSitesi = substr($WebSitesi,4);
}
$LisansOlustur = wordwrap(strrev(strtoupper(sha1(md5(strrev(sha1(md5(sha1($Adi.$WebSitesi.$Soyadi.$UrunKodu)))))))),4,'-',true);
$VeritabaniLisansCek = $row_Ayarlar['Lisans'];
if($VeritabaniLisansCek != $LisansOlustur){
header("Location: Ayarlar.php?Lisans=Uymuyor");
die;
}else{ ?>
Did this file decode correctly?
Original Code
require_once('../Connections/Baglanti.php');
include("../Includes/Functions.php");
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Admin set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "Login.php?Error=ReLogin";
if (!((isset($_SESSION['MM_Admin'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Admin'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Admin'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Admin']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "/";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "HatirlatmaOkundu")) {
$updateSQL = sprintf("UPDATE hatirlatmalar SET Durum=%s WHERE HatirlatmaID=%s",
GetSQLValueString($_POST['Durum'], "int"),
GetSQLValueString($_POST['HatirlatmaID'], "int"));
mysql_select_db($database_Baglanti, $Baglanti);
$Result1 = mysql_query($updateSQL, $Baglanti) or die(mysql_error());
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
if(isset($_POST['Tarih'])){
$HatirlatmaTarihi = TarihCevir2($_POST['Tarih']) . ' ' . $_POST['BaslangicSaati'] . ":" . $_POST['BaslangicDakika'] . ":00";
}else{
$HatirlatmaTarihi = date("Y-m-d H:i:s");
}
$insertSQL = sprintf("INSERT INTO hatirlatmalar (Durum, Tarih, Konu) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['Durum'], "int"),
GetSQLValueString($HatirlatmaTarihi, "date"),
GetSQLValueString($_POST['Konu'], "text"));
mysql_select_db($database_Baglanti, $Baglanti);
$Result1 = mysql_query($insertSQL, $Baglanti) or die(mysql_error());
}
mysql_select_db($database_Baglanti, $Baglanti);
$query_Ayarlar = "SELECT * FROM ayarlar WHERE AyarID = 1";
$Ayarlar = mysql_query($query_Ayarlar, $Baglanti) or die(mysql_error());
$row_Ayarlar = mysql_fetch_assoc($Ayarlar);
$totalRows_Ayarlar = mysql_num_rows($Ayarlar);
mysql_select_db($database_Baglanti, $Baglanti);
$query_HatirlatmalariCek = "SELECT * FROM hatirlatmalar ORDER BY Tarih DESC";
$HatirlatmalariCek = mysql_query($query_HatirlatmalariCek, $Baglanti) or die(mysql_error());
$row_HatirlatmalariCek = mysql_fetch_assoc($HatirlatmalariCek);
$totalRows_HatirlatmalariCek = mysql_num_rows($HatirlatmalariCek);
$colname_PersonelBilgileri = "-1";
if (isset($_SESSION['MM_Admin'])) {
$colname_PersonelBilgileri = $_SESSION['MM_Admin'];
}
mysql_select_db($database_Baglanti, $Baglanti);
$query_PersonelBilgileri = sprintf("SELECT * FROM personel WHERE KullaniciAdi = %s", GetSQLValueString($colname_PersonelBilgileri, "text"));
$PersonelBilgileri = mysql_query($query_PersonelBilgileri, $Baglanti) or die(mysql_error());
$row_PersonelBilgileri = mysql_fetch_assoc($PersonelBilgileri);
$totalRows_PersonelBilgileri = mysql_num_rows($PersonelBilgileri);
$BaslangicDate = new DateTime($row_Ayarlar['MesaiBaslangic']);
$BaslangicSaat = $BaslangicDate->format('H');
$BitisDate = new DateTime($row_Ayarlar['MesaiBitis']);
$BitisSaat = $BitisDate->format('H');
$SeansAraligi = $row_Ayarlar['SeansAraligi'];
if(isset($_GET['Tarih'])){
$Tarih = TarihCevir2($_GET['Tarih']);
$TarihGet = $_GET['Tarih'];
}else{
$Tarih = date("Y-m-d");
$TarihGet = date("d.m.Y");
}
$Adi = $row_Ayarlar['Adi'];
$Soyadi = $row_Ayarlar['Soyadi'];
$UrunKodu = $row_Ayarlar['UrunKodu'];
$WebSitesi = getenv('HTTP_HOST');
if (substr($WebSitesi, 0, 7) == "http://"){
$WebSitesi = substr($WebSitesi,7);
}
if (substr($WebSitesi, 0, 8) == "https://"){
$WebSitesi = substr($WebSitesi,8);
}
if (substr($WebSitesi, 0, 4) == "www."){
$WebSitesi = substr($WebSitesi,4);
}
$LisansOlustur = wordwrap(strrev(strtoupper(sha1(md5(strrev(sha1(md5(sha1($Adi.$WebSitesi.$Soyadi.$UrunKodu)))))))),4,'-',true);
$VeritabaniLisansCek = $row_Ayarlar['Lisans'];
if($VeritabaniLisansCek != $LisansOlustur){
header("Location: Ayarlar.php?Lisans=Uymuyor");
die;
}else{
Function Calls
| None |
Stats
| MD5 | a1bf1dd6d44c7ee10139df987365edb6 |
| Eval Count | 0 |
| Decode Time | 120 ms |