Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php session_start(); $file = 'index'; include "config/config.php"; include "styl..

Decoded Output download

<?php 
	session_start(); 
	$file = 'index'; 
	include "config/config.php"; 
	include "styles/style.php"; 
	include "core/plugin.php"; 
	include 'core/functions.php'; 
	include 'core/classes.php'; 
	include 'core/post_check.php'; 
	include "core/core.php"; 
	$tpl->assignGlobal("page_title", "".$servername); 
	$RanImg = 0; 
	if( isset( $_GET['comments'] ) ){ 
	$NewsID = base64_decode(sanitize($_GET['comments'])); 
		$query = sprintf("SELECT * FROM %s.t_news_posts WHERE a_index = :newsid ORDER BY a_index DESC", $CMS_CMSDb ); 
		$dbh = $lc_cms_con->prepare( $query ); 
		$dbh->execute(array(':newsid' => $NewsID)); 
		$News = $dbh->fetch(); 
		$tpl->newBlock('news_posts_comments'); 
		$tpl->Assign("news_id", $NewsID); 
		$tpl->Assign("news_poster_id", username($News['a_user_id']) ); 
		$tpl->Assign("news_poster_group", usergroup($News['a_user_id']) ); 
		$tpl->Assign("news_date", $News['a_date']); 
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$News['a_cat'].".png' style='vertical-align:middle'>"); 
		$tpl->Assign("news_title", $News['a_title']); 
		$tpl->Assign("news_post", $News['a_news']); 
		$tpl->Assign("news_comments", base64_encode($News['a_index'])); 
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb ); 
		$dbhA = $lc_cms_con->prepare( $queryA ); 
		$dbhA->execute(array(':newsid' => $News['a_index'])); 
		$NComments = $dbhA->fetch(); 
		if($NComments[0] == 0){ 
		$tpl->newBlock('no_comments'); 
		} else { 
		$tpl->newBlock('list_comments'); 
		$query = sprintf("SELECT * FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb ); 
		$dbh = $lc_cms_con->prepare( $query ); 
		$dbh->execute(array(':newsid' => $NewsID)); 
		while( $Comments = $dbh->fetch() ) { 
		$queryS = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :userid", $CMS_CMSDb ); 
		$dbhS = $lc_cms_con->prepare( $queryS ); 
		$dbhS->execute(array(':userid' => $Comments['a_userid'])); 
		$df = $dbhS->fetch(); 
		$tpl->newBlock('comments'); 
		$tpl->Assign("comment_user_img", '<img border="0" src="'.$df['a_image'].'" width="50" height="50">'); 
			 
		$tpl->Assign("comment_user", username($Comments['a_userid']) ); 
		$tpl->Assign("comment_user_group", usergroup($Comments['a_userid']) ); 
		 
		if( $User->LoggedIn == true && $_SESSION['UserAP'] >= 0){ 
		$tpl->Assign("comment", $Comments['a_comment']); 
		$tpl->Assign("del_comment", '<a href="admincp.php?comment='.base64_encode($Comments['a_index']).'" title="Yorumu Sil"><img border="0" src="styles/'.$style.'/images/delete.png"></a>'); 
		}}} 
		if( $User->LoggedIn == true ){  
		$tpl->newBlock('post_comment'); 
		$tpl->Assign("news_id", $NewsID); 
		}} else if( isset( $_GET['save'] ) ){ 
		$postid = cleanInput(sanitize( $_POST['news_id'] )); 
		$postcom = cleanInput(sanitize( $_POST['comment'] )); 
		$commsave = sprintf("INSERT INTO %s.t_news_comments (a_news_id, a_user, a_userid, a_comment) VALUES(:newsid, :user, :userid, :comment)", $CMS_CMSDb ); 
		$csave = $lc_cms_con->prepare( $commsave ); 
		$csave->execute( array( ':newsid' => $postid, ':user' => $nickname, ':userid' => $_SESSION['UserID'], ':comment' => $postcom )); 
		$tpl->newBlock('save'); 
	} else if( isset( $_GET['archive'] ) ){	 
		$tpl->newBlock('news_index'); 
		$query = sprintf("SELECT * FROM %s.t_news_posts ORDER BY a_index DESC", $CMS_CMSDb ); 
		$dbh = $lc_cms_con->prepare( $query ); 
		$dbh->execute(); 
		while( $MainNews = $dbh->fetch() ){ 
		$queryD = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :posterid", $CMS_CMSDb ); 
		$dbhD = $lc_cms_con->prepare( $queryD ); 
		$dbhD->execute(array(':posterid' => $MainNews['a_user_id'])); 
		$Poster = $dbhD->fetch(); 
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb ); 
		$dbhA = $lc_cms_con->prepare( $queryA ); 
		$dbhA->execute(array(':newsid' => $MainNews['a_index'])); 
		$NComments = $dbhA->fetch(); 
		$tpl->newBlock('news_posts_index'); 
		$tpl->Assign("rand" , rand() ); 
		$tpl->Assign("num" , '2' ); 
		$tpl->Assign("news_id", $MainNews['a_index']); 
		$tpl->Assign("news_poster_id", username($MainNews['a_user_id']) ); 
		$tpl->Assign("news_poster_group", usergroup($MainNews['a_user_id']) ); 
		$tpl->Assign("news_poster_image", $Poster['a_image']); 
		$tpl->Assign("news_date", $MainNews['a_date']); 
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$MainNews['a_cat'].".png' style='vertical-align:middle'>"); 
		$tpl->Assign("news_title", $MainNews['a_title']); 
		$tpl->Assign("news_post", $MainNews['a_news']); 
		$tpl->Assign("news_comments", base64_encode($MainNews['a_index'])); 
		if($RanImg > 6){ 
		$RanImg = 1; 
		$tpl->Assign("RanImg", $RanImg); 
		} else { 
		$RanImg ++; 
		$tpl->Assign("RanImg", $RanImg); 
		} 
		if($NComments[0] == ''){ 
		$tpl->Assign("comment_count", '0'); 
		} else { 
		$tpl->Assign("comment_count", $NComments[0]); 
		}}} else { 
		$tpl->newBlock('news_index'); 
		$query = sprintf("SELECT * FROM %s.t_news_posts ORDER BY a_index DESC LIMIT 10", $CMS_CMSDb ); 
		$dbh = $lc_cms_con->prepare( $query ); 
		$dbh->execute(); 
		while( $MainNews = $dbh->fetch() ){ 
		$queryD = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :posterid", $CMS_CMSDb ); 
		$dbhD = $lc_cms_con->prepare( $queryD ); 
		$dbhD->execute(array(':posterid' => $MainNews['a_user_id'])); 
		$Poster = $dbhD->fetch(); 
		 
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb ); 
		$dbhA = $lc_cms_con->prepare( $queryA ); 
		$dbhA->execute(array(':newsid' => $MainNews['a_index'])); 
		$NComments = $dbhA->fetch(); 
		$tpl->newBlock('news_posts_index'); 
		$tpl->Assign("rand" , rand() ); 
		$tpl->Assign("num" , '1' ); 
		$tpl->Assign("news_id", $MainNews['a_index']); 
		$tpl->Assign("news_poster_id", username($MainNews['a_user_id']) ); 
		$tpl->Assign("news_poster_group", usergroup($MainNews['a_user_id']) ); 
		$tpl->Assign("news_poster_image", $Poster['a_image']); 
		$tpl->Assign("news_date", $MainNews['a_date']); 
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$MainNews['a_cat'].".png' style='vertical-align:middle'>"); 
		$tpl->Assign("news_title", $MainNews['a_title']); 
		$tpl->Assign("news_post", $MainNews['a_news']); 
		$tpl->Assign("news_comments", base64_encode($MainNews['a_index'])); 
		if($RanImg > 6){ 
		$RanImg = 1; 
		$tpl->Assign("RanImg", $RanImg); 
		} else { 
		$RanImg ++; 
		$tpl->Assign("RanImg", $RanImg); 
		} 
		if($NComments[0] == ''){ 
		$tpl->Assign("comment_count", '0'); 
		} else { 
		$tpl->Assign("comment_count", $NComments[0]); 
		}}} 
	$tpl->printToScreen(); 
			$PayPalReturnURL    = 'http://'.$_SERVER['HTTP_HOST'].'/process.php';  
	    $PayPalCancelURL    = 'http://'.$_SERVER['HTTP_HOST'].'/index.php'; 
	credit($_SESSION['LicencedVervion'],$_SESSION['LicencedOwner']); 
	include 'styles/'.$style.'/tpl/extras/footer.php'; 
	 
 
 
?> 
 

Did this file decode correctly?

Original Code

<?php
	session_start();
	$file = 'index';
	include "config/config.php";
	include "styles/style.php";
	include "core/plugin.php";
	include 'core/functions.php';
	include 'core/classes.php';
	include 'core/post_check.php';
	include "core/core.php";
	$tpl->assignGlobal("page_title", "".$servername);
	$RanImg = 0;
	if( isset( $_GET['comments'] ) ){
	$NewsID = base64_decode(sanitize($_GET['comments']));
		$query = sprintf("SELECT * FROM %s.t_news_posts WHERE a_index = :newsid ORDER BY a_index DESC", $CMS_CMSDb );
		$dbh = $lc_cms_con->prepare( $query );
		$dbh->execute(array(':newsid' => $NewsID));
		$News = $dbh->fetch();
		$tpl->newBlock('news_posts_comments');
		$tpl->Assign("news_id", $NewsID);
		$tpl->Assign("news_poster_id", username($News['a_user_id']) );
		$tpl->Assign("news_poster_group", usergroup($News['a_user_id']) );
		$tpl->Assign("news_date", $News['a_date']);
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$News['a_cat'].".png' style='vertical-align:middle'>");
		$tpl->Assign("news_title", $News['a_title']);
		$tpl->Assign("news_post", $News['a_news']);
		$tpl->Assign("news_comments", base64_encode($News['a_index']));
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb );
		$dbhA = $lc_cms_con->prepare( $queryA );
		$dbhA->execute(array(':newsid' => $News['a_index']));
		$NComments = $dbhA->fetch();
		if($NComments[0] == 0){
		$tpl->newBlock('no_comments');
		} else {
		$tpl->newBlock('list_comments');
		$query = sprintf("SELECT * FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb );
		$dbh = $lc_cms_con->prepare( $query );
		$dbh->execute(array(':newsid' => $NewsID));
		while( $Comments = $dbh->fetch() ) {
		$queryS = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :userid", $CMS_CMSDb );
		$dbhS = $lc_cms_con->prepare( $queryS );
		$dbhS->execute(array(':userid' => $Comments['a_userid']));
		$df = $dbhS->fetch();
		$tpl->newBlock('comments');
		$tpl->Assign("comment_user_img", '<img border="0" src="'.$df['a_image'].'" width="50" height="50">');
			
		$tpl->Assign("comment_user", username($Comments['a_userid']) );
		$tpl->Assign("comment_user_group", usergroup($Comments['a_userid']) );
		
		if( $User->LoggedIn == true && $_SESSION['UserAP'] >= 0){
		$tpl->Assign("comment", $Comments['a_comment']);
		$tpl->Assign("del_comment", '<a href="admincp.php?comment='.base64_encode($Comments['a_index']).'" title="Yorumu Sil"><img border="0" src="styles/'.$style.'/images/delete.png"></a>');
		}}}
		if( $User->LoggedIn == true ){ 
		$tpl->newBlock('post_comment');
		$tpl->Assign("news_id", $NewsID);
		}} else if( isset( $_GET['save'] ) ){
		$postid = cleanInput(sanitize( $_POST['news_id'] ));
		$postcom = cleanInput(sanitize( $_POST['comment'] ));
		$commsave = sprintf("INSERT INTO %s.t_news_comments (a_news_id, a_user, a_userid, a_comment) VALUES(:newsid, :user, :userid, :comment)", $CMS_CMSDb );
		$csave = $lc_cms_con->prepare( $commsave );
		$csave->execute( array( ':newsid' => $postid, ':user' => $nickname, ':userid' => $_SESSION['UserID'], ':comment' => $postcom ));
		$tpl->newBlock('save');
	} else if( isset( $_GET['archive'] ) ){	
		$tpl->newBlock('news_index');
		$query = sprintf("SELECT * FROM %s.t_news_posts ORDER BY a_index DESC", $CMS_CMSDb );
		$dbh = $lc_cms_con->prepare( $query );
		$dbh->execute();
		while( $MainNews = $dbh->fetch() ){
		$queryD = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :posterid", $CMS_CMSDb );
		$dbhD = $lc_cms_con->prepare( $queryD );
		$dbhD->execute(array(':posterid' => $MainNews['a_user_id']));
		$Poster = $dbhD->fetch();
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb );
		$dbhA = $lc_cms_con->prepare( $queryA );
		$dbhA->execute(array(':newsid' => $MainNews['a_index']));
		$NComments = $dbhA->fetch();
		$tpl->newBlock('news_posts_index');
		$tpl->Assign("rand" , rand() );
		$tpl->Assign("num" , '2' );
		$tpl->Assign("news_id", $MainNews['a_index']);
		$tpl->Assign("news_poster_id", username($MainNews['a_user_id']) );
		$tpl->Assign("news_poster_group", usergroup($MainNews['a_user_id']) );
		$tpl->Assign("news_poster_image", $Poster['a_image']);
		$tpl->Assign("news_date", $MainNews['a_date']);
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$MainNews['a_cat'].".png' style='vertical-align:middle'>");
		$tpl->Assign("news_title", $MainNews['a_title']);
		$tpl->Assign("news_post", $MainNews['a_news']);
		$tpl->Assign("news_comments", base64_encode($MainNews['a_index']));
		if($RanImg > 6){
		$RanImg = 1;
		$tpl->Assign("RanImg", $RanImg);
		} else {
		$RanImg ++;
		$tpl->Assign("RanImg", $RanImg);
		}
		if($NComments[0] == ''){
		$tpl->Assign("comment_count", '0');
		} else {
		$tpl->Assign("comment_count", $NComments[0]);
		}}} else {
		$tpl->newBlock('news_index');
		$query = sprintf("SELECT * FROM %s.t_news_posts ORDER BY a_index DESC LIMIT 10", $CMS_CMSDb );
		$dbh = $lc_cms_con->prepare( $query );
		$dbh->execute();
		while( $MainNews = $dbh->fetch() ){
		$queryD = sprintf("SELECT a_image FROM %s.t_user_log WHERE a_account_index = :posterid", $CMS_CMSDb );
		$dbhD = $lc_cms_con->prepare( $queryD );
		$dbhD->execute(array(':posterid' => $MainNews['a_user_id']));
		$Poster = $dbhD->fetch();
		
		$queryA = sprintf("SELECT count(a_news_id) FROM %s.t_news_comments WHERE a_news_id = :newsid", $CMS_CMSDb );
		$dbhA = $lc_cms_con->prepare( $queryA );
		$dbhA->execute(array(':newsid' => $MainNews['a_index']));
		$NComments = $dbhA->fetch();
		$tpl->newBlock('news_posts_index');
		$tpl->Assign("rand" , rand() );
		$tpl->Assign("num" , '1' );
		$tpl->Assign("news_id", $MainNews['a_index']);
		$tpl->Assign("news_poster_id", username($MainNews['a_user_id']) );
		$tpl->Assign("news_poster_group", usergroup($MainNews['a_user_id']) );
		$tpl->Assign("news_poster_image", $Poster['a_image']);
		$tpl->Assign("news_date", $MainNews['a_date']);
		$tpl->Assign("news_cat", "<img src='sys_images/news/".$MainNews['a_cat'].".png' style='vertical-align:middle'>");
		$tpl->Assign("news_title", $MainNews['a_title']);
		$tpl->Assign("news_post", $MainNews['a_news']);
		$tpl->Assign("news_comments", base64_encode($MainNews['a_index']));
		if($RanImg > 6){
		$RanImg = 1;
		$tpl->Assign("RanImg", $RanImg);
		} else {
		$RanImg ++;
		$tpl->Assign("RanImg", $RanImg);
		}
		if($NComments[0] == ''){
		$tpl->Assign("comment_count", '0');
		} else {
		$tpl->Assign("comment_count", $NComments[0]);
		}}}
	$tpl->printToScreen();
			$PayPalReturnURL    = 'http://'.$_SERVER['HTTP_HOST'].'/process.php'; 
	    $PayPalCancelURL    = 'http://'.$_SERVER['HTTP_HOST'].'/index.php';
	credit($_SESSION['LicencedVervion'],$_SESSION['LicencedOwner']);
	include 'styles/'.$style.'/tpl/extras/footer.php';
	


?>

Function Calls

session_start 1

Variables

$file index

Stats

MD5 b546f4c54f052536f9ee18e3ea457760
Eval Count 0
Decode Time 126 ms