if($_GET[id]) { $command = "mkdir /home/mufid/test/test"; $fdr=fopen("surati_tulis","w") or die("gagal"); fwrite($fdr,"/sbin/iptables -A INPUT -s ".$_SERVER['REMOTE_ADDR']." -j REJECT --reject-with icmp-port-unreachable \n"); //exec ($command); fclose($fdr); exit(0); } $today_client= date("M-d-Y h:i A", date.mktime($file_hour, $file_minute, $file_second, $file_month, $file_day, $file_year) + $_REQUEST["timezone"]); $today_server = date("F j Y g:i a"); $waktu_server = time(); //echo "
Ini hasilnya apaan :".$today_client." dan $today_server
"; $data_ip= $_SERVER['REMOTE_ADDR']; //$data_server= $_SERVER['HTTP_HOST']; $data_referer=$_SERVER['HTTP_REFERER']; $user="root"; $password="bismillah"; $database="quran"; $db=mysql_connect("127.0.0.1",$user,$password); @mysql_select_db($database,$db) or die("tidak bisa koneksi"); if(!isset($_GET[sr])) { $fdr=fopen("surat.htm","r"); $htmlbaru=fread($fdr,4500000); //$htmlbaru=str_replace("href=\"","href=\"?sr=",$htmlbaru); //$htmlbaru=str_replace("htm\">","htm'\">",$htmlbaru); $data_pengguna="INSERT INTO `quran`.`pengguna` (`ip`, `waktu`, `halaman`, `status`,`referer`) VALUES ('$data_ip', '$waktu_server', 'Al-Faatichah/Al-Fatichaah.htm', '0','$data_referer')"; //$data_online="SELECT * from quran.pengguna where ip='$data_ip'"; $hasil_ambil_kata=mysql_query($data_pengguna,$db); echo $htmlbaru; fclose($fdr); //header('Location://index.htm'); mysql_close($db); //echo ""; /* echo ""; echo ""; //echo ""; echo ""; */ exit(0); } $datafile=explode("/",$_GET[sr]); $checkfilehtml=explode(".",$_GET[sr]); if(count($datafile)==2 && count($checkfilehtml)==2){ $fdr=fopen($_GET[sr],"r"); $htmlbaru=fread($fdr,4500000); $htmlbaru=str_replace("href=\"","href=\"?sr=".$datafile[0]."/",$htmlbaru); //$htmlbaru=str_replace("..","",$htmlbaru); $htmlbaru=str_replace("src=\"","src=\"".$datafile[0]."/",$htmlbaru); //$htmlbaru=str_replace("htm\">","htm'\">",$htmlbaru); echo $htmlbaru; exit(0); } //$data_pengguna="INSERT INTO `quran`.`pengguna` (`ip`, `waktu`, `status`,`referer`) VALUES ('$data_ip', '$waktu_server', '0','$data_referer')"; $data_online="SELECT * from quran.pengguna where ip='$data_ip'"; $hasil_ambil_kata=mysql_query($data_online,$db); $jumlah=mysql_numrows($hasil_ambil_kata)-1; $waktu_periksa=$waktu_server-100; $data_online="SELECT * from quran.pengguna where ip='$data_ip' && waktu>$waktu_periksa"; $hasil_ambil_kata=mysql_query($data_online,$db); $jumlah=mysql_numrows($hasil_ambil_kata)-1; if($jumlah>6) { echo "Bacalah AlQuran dengan Tartil, pelan2, dengan merujuk pada pengetahuan dan dengan perasaan
"; echo "Untuk kembali ke tempat sumula tekan BACKSPACE (tunggu 1 menitan untuk kembali normal)
"; $namafile=$_GET[sr]; $data_pengguna="INSERT INTO `quran`.`pengguna` (`ip`, `waktu`, `halaman`, `status`,`referer`) VALUES ('$data_ip', '$waktu_server', '$namafile', '1','$data_referer')"; //$data_online="SELECT * from quran.pengguna where ip='$data_ip'"; $hasil_ambil_kata=mysql_query($data_pengguna,$db); mysql_close($db); exit(0); } $namafile=$_GET[sr]; $id_number=$_GET[id]; //echo "$namafile dan $id_number"; //exit(0); $fdr=fopen($_GET[sr],"r"); $htmlbaru=fread($fdr,4500000); $htmlbaru=str_replace("src=\"","src=\"".$datafile[0]."/",$htmlbaru); $htmlbaru=str_replace("\">","htm'\">",$htmlbaru); echo $htmlbaru; //echo ""; /* echo ""; echo ""; //echo ""; echo ""; */ $data_pengguna="INSERT INTO `quran`.`pengguna` (`ip`, `waktu`, `halaman`, `status`,`referer`) VALUES ('$data_ip', '$waktu_server', '$namafile', '0','$data_referer')"; //$data_online="SELECT * from quran.pengguna where ip='$data_ip'"; $hasil_ambil_kata=mysql_query($data_pengguna,$db); mysql_close($db); ?>