K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / var / www / html / sman1baleendah_sch_id-1111111111111 / functions /
server ip : 104.21.89.46

your ip : 172.69.214.35

H O M E


Filename/var/www/html/sman1baleendah_sch_id-1111111111111/functions/materisimguru.php
Size2.95 kb
Permissionrwxrwxrwx
Ownerroot : root
Create time06-May-2025 08:13
Last modified05-May-2025 16:21
Last accessed05-Jul-2025 11:27
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
include "koneksi.php";
session_start();
if (!isset($_SESSION['User'])) {
echo "<h1>Permission Denied</h1>You don't have permission to access the this page.";
exit;
}

$st =$_POST['st'];
$tgl = $_POST['tgl'];
$tgl2 = $_POST['tgl2'];
$thajar = $_POST['thajar'];
$pel = $_POST['pel'];
$sem = $_POST['sem'];
$nip = $_POST['nip'];
$richEdit0 = $_POST['richEdit0'];
$id=$_POST['id'];
$file = $_FILES['file'];

if ($st=="tambah") {
$sql = "SELECT max(idtugas) AS total FROM t_tugas";
if(!$r = mysql_query($sql)) die("Error connecting to the database.");
list($total) = mysql_fetch_array($r);
$total += 1;
if (file_exists($file['tmp_name'])) {
$ext = array_pop(explode(".", $file['name']));

$newfile="file".$total.".".$ext;
if (file_exists("../materi/".$newfile)) unlink("../materi/".$newfile);
move_uploaded_file($file['tmp_name'], "../materi/$newfile");
}
$tgl2=date("Y-m-d");
$sql = "insert into t_tugas (idtugas,tgl_kirim,tgl_kumpul,thajar,pelajaran,sem,nip,isi,file) values ('$total','".mysql_real_escape_string($tgl2)."','".mysql_real_escape_string($tgl)."','".mysql_real_escape_string($thajar)."','".mysql_real_escape_string($pel)."','".mysql_real_escape_string($sem)."','".mysql_real_escape_string($nip)."','$richEdit0','".mysql_real_escape_string($ext)."')";
if(!$alan=mysql_query($sql)) die ("Penyimpanan gagal1");
$tdk = "Pengiriman Tugas dan File berhasil";
if (!empty($id))
{
while (list($key,$value)=each($id)) {
$sql="insert into t_tugas_kelas (idtugas,kelas) values ('".mysql_real_escape_string($total)."','".mysql_real_escape_string($key)."')";
$mysql_result=mysql_query($sql) or die ("Penghapusan gagal");
}
}
}
else {
$total =$kd;
if ($file['name']<>"") {
if (file_exists($file['tmp_name'])) {
$ext = array_pop(explode(".", $file['name']));
$newfile="file".$total.".".$ext;
if (file_exists("../materi/".$newfile)) unlink("../materi/".$newfile);
move_uploaded_file($file['tmp_name'], "../materi/$newfile");
$q = mysql_query("select file from t_tugas where idtugas='".mysql_real_escape_string($total)."'");
if($r=mysql_fetch_array($q)) {
if(file_exists("../materi/file".$total.".".$r['file'])) {
unlink("../materi/file".$total.".".$r['file']);
}
}
}
}
$tgl2=date("Y-m-d");
$sql = "update t_tugas set tgl_kirim='".mysql_real_escape_string($tgl2)."',tgl_kumpul='".mysql_real_escape_string($tgl)."', thajar='".mysql_real_escape_string($thajar)."',pelajaran='".mysql_real_escape_string($pel)."',sem='".mysql_real_escape_string($sem)."',file='".mysql_real_escape_string($ext)."',isi='$richEdit0' where idtugas='".mysql_real_escape_string($total)."'";
if(!$alan=mysql_query($sql)) die ("Penyimpanan gagal1");
$tdk = "Perubahan Pengiriman Tugas dan File berhasil ";

}
//header("Location: ../member/user.php?id=simmateri&kd=$tdk");
echo "<script>document.location.href = '../member/user.php?id=simmateri&kd=$tdk';</script>";
?>