first commit
This commit is contained in:
6
DIZ/.htaccess
Normal file
6
DIZ/.htaccess
Normal file
@@ -0,0 +1,6 @@
|
||||
<Files *>
|
||||
order allow,deny
|
||||
deny from all
|
||||
allow from 127.0.0.1
|
||||
allow from 192.168.0.1
|
||||
</Files>
|
||||
5
DIZ/DirectAccess-preventer.php
Normal file
5
DIZ/DirectAccess-preventer.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
include "ReportLog-er.php";
|
||||
if(!defined('APP_NAME')) {ReportLog("DirectAccess",$_SERVER['REQUEST_URI']); die('Direct access not permitted');}
|
||||
|
||||
?>
|
||||
18
DIZ/FN/LOGIN_SILICONID.php
Normal file
18
DIZ/FN/LOGIN_SILICONID.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*if(isset($_SERVER['HTTP_REFERER']) && parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)=="siliconpin.com" && isset($_POST['SILICONID'])){
|
||||
$_SESSION['EMAIL']=$_POST['EMAIL'];
|
||||
}
|
||||
elseif(isset($_POST['e']) && $_POST['e']=="app" && isset($_POST['SILICONID'])){
|
||||
|
||||
}*/
|
||||
if(isset($_POST['e']) && $_POST['e']=="app" && isset($_POST['SILICONID']) && isset($_POST['EMAIL'])){
|
||||
setcookie('EMAIL', $_POST['EMAIL'], time() + (86400 * 30), "/"); // 86400 = 1 day
|
||||
}
|
||||
elseif(isset($_POST['SILICONID']) && isset($_POST['EMAIL'])){
|
||||
$_SESSION['EMAIL']=$_POST['EMAIL'];
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['SignOut'])){
|
||||
session_unset();
|
||||
}
|
||||
25
DIZ/FN/file_uploader.php
Normal file
25
DIZ/FN/file_uploader.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
function D_image_upload1($filename, $path="tmp",$target_file ,$maxsize=300000) {
|
||||
if(isset($_FILES[$filename]["name"]) && !empty($_FILES[$filename]["name"])) {$return["info"]=$_FILES;
|
||||
$target_dir = "CONTENT/UPLOAD/".$path."/";$ext = pathinfo($_FILES[$filename]["name"], PATHINFO_EXTENSION);
|
||||
if($target_file == ""){ $uploadOk="";
|
||||
$target_file=time()."_".rand(1000, 9999).'.'.$ext;$return["name"]=$target_file;
|
||||
$target_file = $target_dir.$target_file;}
|
||||
else $target_file = $target_dir.$target_file;
|
||||
if($_FILES[$filename]["size"]==0){ $check = false; $uploadOk .= "Check Max upload limit.apache";}
|
||||
else $check = getimagesize($_FILES[$filename]["tmp_name"]);
|
||||
if($check !== false) { $return["mime"]=$check["mime"]; }
|
||||
else {$uploadOk .= "File is not an image."; }
|
||||
if ($_FILES[$filename]["size"] > $maxsize) { $uploadOk .= "Sorry, your file is too large.";}
|
||||
else {
|
||||
if (move_uploaded_file($_FILES[$filename]["tmp_name"], $target_file)) {
|
||||
$uploadOk = "The file ". basename( $_FILES[$filename]["name"]). " has been uploaded.";$return["D_image_upload1"] = "ok";
|
||||
} else {
|
||||
$uploadOk .= "Sorry, there was an error Moving the uploaded file.";//print_r($_FILES);
|
||||
}
|
||||
}
|
||||
$return["error"]=$uploadOk;
|
||||
return $return;// $return["info"] $return["name"] $return["mime"]
|
||||
}
|
||||
}
|
||||
?>
|
||||
0
DIZ/FN/fn1.php
Normal file
0
DIZ/FN/fn1.php
Normal file
1
DIZ/LOG/ContentNotFound/1513725598-486.log
Normal file
1
DIZ/LOG/ContentNotFound/1513725598-486.log
Normal file
@@ -0,0 +1 @@
|
||||
{"Type":"ContentNotFound","File":"C:\\xampp\\htdocs\\SITES\\banglalive.ov\\CONTENT\\FN_C\\fetch-content.php","HTTP_USER_AGENT":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36","REQUEST_URI":"\/","ip":"192.168.1.6"}
|
||||
1
DIZ/LOG/ContentNotFound/1513725782-876.log
Normal file
1
DIZ/LOG/ContentNotFound/1513725782-876.log
Normal file
@@ -0,0 +1 @@
|
||||
{"Type":"ContentNotFound","File":"C:\\xampp\\htdocs\\SITES\\banglalive.ov\\CONTENT\\FN_C\\fetch-content.php","HTTP_USER_AGENT":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.108 Safari\/537.36","REQUEST_URI":"\/","ip":"192.168.1.6"}
|
||||
1
DIZ/LOG/test/1511262806-747.log
Normal file
1
DIZ/LOG/test/1511262806-747.log
Normal file
@@ -0,0 +1 @@
|
||||
{"Type":"test","File":"\/home\/ov\/Desktop\/localhost\/html\/DIZ\/ReportLog-er.php","HTTP_REFERER":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Ubuntu Chromium\/62.0.3202.89 Chrome\/62.0.3202.89 Safari\/537.36"}
|
||||
1
DIZ/LOG/test/1511266847-696.log
Normal file
1
DIZ/LOG/test/1511266847-696.log
Normal file
@@ -0,0 +1 @@
|
||||
{"Type":"test","File":"\/home\/ov\/Desktop\/localhost\/html\/index.php","HTTP_REFERER":"\/","ip":"::1"}
|
||||
1
DIZ/LOG/test/1511267483-158.log
Normal file
1
DIZ/LOG/test/1511267483-158.log
Normal file
@@ -0,0 +1 @@
|
||||
{"Type":"test","File":"\/home\/ov\/Desktop\/localhost\/html\/index.php","HTTP_REFERER":"\/","ip":"::1"}
|
||||
28
DIZ/ReportLog-er.php
Normal file
28
DIZ/ReportLog-er.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
//function to perform ReportLog(Report_Type,File,Details)
|
||||
function ReportLog($Report_Type,$File)
|
||||
{
|
||||
$dir=__DIR__."/LOG";//echo $dir;
|
||||
if(!is_dir($dir))mkdir($dir);if(!is_dir($dir."/".$Report_Type))mkdir($dir."/".$Report_Type); //die($Report_Type);
|
||||
$report_info=new stdClass();
|
||||
$report_info -> Type= $Report_Type;
|
||||
$report_info -> File= $File;
|
||||
if(isset($_SERVER['HTTP_USER_AGENT']))$report_info -> HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
|
||||
if(isset($_SERVER['REQUEST_URI']))$report_info -> REQUEST_URI = $_SERVER['REQUEST_URI'];
|
||||
if(isset($_SERVER['HTTP_REFERER']))$report_info -> HTTP_REFERER = $_SERVER['HTTP_REFERER'];
|
||||
$ip="";
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
} else {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$report_info -> ip= $ip;
|
||||
$myfile = fopen(__DIR__."/LOG/".$Report_Type."/".time()."-".rand(100,999).".log", "w") or die("Unable to open file!");
|
||||
$txt = json_encode($report_info);
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
}
|
||||
?>
|
||||
55
DIZ/engine.php
Normal file
55
DIZ/engine.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
session_start();
|
||||
if($_SERVER['SERVER_NAME']===DOMAIN_NAME) include "CONFIG/config.php"; else include "CONFIG/config-local.php";
|
||||
$GLOBALS['alert_info']="";$GLOBALS['post_info']="";
|
||||
foreach (glob("DIZ/FN/*.php") as $filename) include $filename; //to include DIZ-PHP's built-in functions
|
||||
foreach (glob("CONTENT/FN_C/*.php") as $filename) include $filename; //to include this APP's functions
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if(isset($_POST['FORM_NAME']) && $_POST['FORM_NAME']!==""){
|
||||
// Some security implementation needed
|
||||
$form_processor="CONTENT/POST_ACTION/".$_POST['FORM_NAME'].".php";
|
||||
if(file_exists($form_processor)) include $form_processor; else { $FormReply= new stdClass();$FormReply->info = "Form handler not found !"; }//Ajax Form Notification
|
||||
}else {$FormReply= new stdClass();$FormReply->info = "Form handler not Defiened !";}
|
||||
}
|
||||
//echo $url[F_D+2];
|
||||
//echo $url[F_D+1]; var_dump($url);
|
||||
// URI Handler with Folder_Depth
|
||||
|
||||
// if(isset($url[F_D+2])) {
|
||||
// $lnk=$url[F_D+2];
|
||||
// if(file_exists("CONTENT/ROOT_URI/".$url[F_D+1]."/index.php")) include "CONTENT/ROOT_URI/".$url[F_D+1]."/index.php";
|
||||
// else {$Notify= new stdClass();$Notify->info = "Form handler not found !";}
|
||||
// } else {
|
||||
// $lnk=$url[F_D+1];
|
||||
// include "CONTENT/ROOT_URI/index.php";
|
||||
// }
|
||||
|
||||
if(isset($url[F_D+2]) && file_exists("CONTENT/ROOT_URI/".$url[F_D+1]."/index.php")) {$inc=$url[F_D+1]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+3]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+2]."/index.php")) {$inc=$inc."/".$url[F_D+2]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+4]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+3]."/index.php")) {$inc=$inc."/".$url[F_D+3]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+5]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+4]."/index.php")) {$inc=$inc."/".$url[F_D+4]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+6]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+5]."/index.php")) {$inc=$inc."/".$url[F_D+5]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+7]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+6]."/index.php")) {$inc=$inc."/".$url[F_D+6]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+8]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+7]."/index.php")) {$inc=$inc."/".$url[F_D+7]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+9]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+8]."/index.php")) {$inc=$inc."/".$url[F_D+8]; //echo $inc."<br>";
|
||||
if(isset($url[F_D+10]) && file_exists("CONTENT/ROOT_URI/".$inc."/".$url[F_D+9]."/index.php")) {$inc=$inc."/".$url[F_D+9]; //echo $inc."<br>";
|
||||
$lnk=$url[F_D+10];
|
||||
include "CONTENT/ROOT_URI/".$inc."/index.php";
|
||||
}
|
||||
else {$lnk=$url[F_D+9];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+8];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+7];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+6];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+5];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+4];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+3];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+2];include "CONTENT/ROOT_URI/".$inc."/index.php";}
|
||||
}
|
||||
else {$lnk=$url[F_D+1];include "CONTENT/ROOT_URI/index.php";}
|
||||
2
DIZ/info.txt0
Normal file
2
DIZ/info.txt0
Normal file
@@ -0,0 +1,2 @@
|
||||
$GLOBALS['alert_info']
|
||||
resp['NotiFi'],resp['NotiFi_m'],resp['NotiFi_d']
|
||||
Reference in New Issue
Block a user