403Webshell
Server IP : 101.255.104.117  /  Your IP : 101.255.104.117
Web Server : Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38
System : Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
User : user ( 0)
PHP Version : 5.6.38
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/xampp182/htdocs/simpegx/administrator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/xampp182/htdocs/simpegx/administrator/today_pengumuman_e.php
<?php
    require_once("../lib/konek.php");
	require_once("../lib/konfigurasi_semua.php");
    require_once("../lib/function_tanggal.php");

//konfigurasi nama file
	$thisForm = "view.php";
	$actionForm = "action.php";

//actionnya
	if($_POST["peng_id"]) $liburId = $_POST["peng_id"];
	if($_POST["mode"]) $mode = $_POST["mode"];

	if($_GET["mode"]) {
		$mode = "edit";
	}

	if($_GET["id"]) {
		$liburId = $_GET["id"];
		$sql = "select * from pengumuman_today where peng_id = ".$liburId;
		$qId = mysql_query($sql);
		$dataUser = mysql_fetch_array($qId);

		$_POST["peng_id"] = $dataUser["peng_id"];
		$_POST["peng_isi"] = $dataUser["peng_isi"];
	}

	if($_POST["btnSimpan"] || $_POST["btnUpdate"] || $_POST["btnApply"] || $_POST["btnApply2"]) {
		if($_POST["btnSimpan"] || $_POST["btnApply"]) {
			$sql = "select peng_id from pengumuman_today where peng_tgl = '".$_POST["peng_tgl"]."'";
		}
		if($_POST["btnUpdate"] || $_POST["btnApply2"]) {
			$sql = "select peng_id from pengumuman_today where peng_id <> ".$_POST["peng_id"]." and peng_tgl = '".$_POST["peng_tgl"]."'";
		}
		$Qrs_cek = mysql_query($sql);
		$datacek = mysql_fetch_array($Qrs_cek);
		if($datacek) $hint[0] = "Kode ".$_POST["peng_isi"]." sudah ada";

		if(!$_POST["peng_isi"]) {
			$stat_err = true;
		}

		if(!$datacek && $stat_err!=true) {
			if($_POST["btnSimpan"] || $_POST["btnApply"]) {
				$sql = "select max(peng_id) as id from pengumuman_today";
				$Qrs = mysql_query($sql);
				$id = mysql_fetch_array($Qrs);
				$liburId = $id["id"]+1;
			}
			if($_POST["btnUpdate"] || $_POST["btnApply2"]) {
				$liburId = $_POST["peng_id"];
			}

			$nmTable = "pengumuman_today";

			$tbField[0] = "peng_id";
			$tbField[1] = "peng_isi";
			$tbField[2] = "peng_tgl";
			$tbField[3] = "peng_wkt";
			$tbField[4] = "id_user";

			$tbIsi[0] = $liburId;
			$tbIsi[1] = "'".$_POST["peng_isi"]."'";
			$tbIsi[2] = "'".$skr."'";
			$tbIsi[3] = "'".$wkt."'";
			$tbIsi[4] = $_SESSION["hrd-id"];

			if($_POST["btnSimpan"] || $_POST["btnApply"]) {
				for($start=0, $jumField=count($tbField); $start<$jumField; $start++) {
					if($start!=0) {
						$nmField = $nmField.",".$tbField[$start];
					}else{
						$nmField = $tbField[$start];
					}
				}

				for($start=0, $jumIsi=count($tbIsi); $start<$jumIsi; $start++) {
					if($start!=0) {
						$isiField = $isiField.",".$tbIsi[$start];
					}else{
						$isiField = $tbIsi[$start];
					}
				}

				$sql = "insert ".$nmTable." (".$nmField.") values(".$isiField.")";
			}

			if($_POST["btnUpdate"] || $_POST["btnApply2"]) {
				for($start=0, $end=count($tbIsi); $start<$end; $start++) {
					if($start!=0) {
						$isiField = $isiField.",".$tbField[$start]."=".$tbIsi[$start];
					}else{
						$isiField = $tbField[$start]."=".$tbIsi[$start];
					}
				}
				$sql = "update ".$nmTable." set ".$isiField." where ".$tbField[0]." = ".$tbIsi[0];
			}

			$Qrs = mysql_query($sql);

			if($Qrs) {
				$mode = "edit";
			}

			if($_POST["btnSimpan"] || $_POST["btnUpdate"]) {
				header("location:today_pengumuman_v.php");
			}else{
				 $_POST["peng_id"] = $liburId;
			}
		}
	}

	if($_POST["btnKembali"]) {
		header("location:today_pengumuman_v.php");
	}


	$dir_lib = "../lib";
	$dir_img = "../img";
//end
?>
<html>
<head>
<title><?php echo $header;?></title>

<!-- TinyMCE -->
<script type="text/javascript" src="../lib/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

		// Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->

</head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!--meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"-->
<link rel="stylesheet" type="text/css" href="<?php echo $dir_lib;?>/lib-style.css">
<script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/ew.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/func_curr.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/elements.js"></script>
<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $dir_lib;?>/jscalendar/css/calendar-system.css" title="calendar-system" />
<!-- calendar script -->
<script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/calendar.js"></script>
<script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/calendar-setup.js"></script>
<!-- end -->
<body>
<form name="frmEdit" method="POST" action="today_pengumuman_e.php">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="2" align="left" valign="middle" bgcolor="#000000" height="28">
			<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="white">&nbsp;<?php echo $header;?></font>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="left" bgcolor="#DEDBE7" height="20">
			<?php include("menu_atas.php"); ?>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr valign="middle" height="50">
					<td height="50" width="10">
						&nbsp;
					</td>
					<td height="50" width="300">
						&nbsp;
					</td>
					<td height="50" width="100">
						&nbsp;
					</td>
					<td>
						<?php echo $defFont;?>&nbsp;</font>
					</td>
					<td height="50" width="5">
						&nbsp;
					</td>
					<td height="50" width="48" align="center">
						<button type="submit" name="btnKembali" value="btnKembali">
							<img  src="<?php echo $dir_img;?>/cancel_f2.png">
						</button>
					</td>
					<td height="50" width="5">
						&nbsp;
					</td>
					<td height="50" width="48" align="center">
						<button type="submit" name="<?php if($mode=="edit") { ?>btnApply2<?php }else{ ?>btnApply<?php } ?>" value="<?php if($mode=="edit")  { ?>btnApply2<?php }else{ ?>btnApply<?php } ?>">
							<img  src="<?php echo $dir_img;?>/apply_f2.png">
						</button>
					</td>
					<td height="50" width="5">
						&nbsp;
					</td>
					<td height="50" width="50" align="center">
						<button type="submit" name="<?php if($mode=="edit")  { ?>btnUpdate<?php }else{ ?>btnSimpan<?php } ?>" value="<?php if($mode=="edit")  { ?>btnUpdate<?php }else{ ?>btnSimpan<?php } ?>">
							<img  src="<?php echo $dir_img;?>/save_f2.png">
						</button>
					</td>
				</tr>
				<tr bgcolor="#FFF8DC" valign="middle">
					<td width="10">
						&nbsp;
					</td>
					<td width="300">
						&nbsp;
					</td>
					<td width="100">
						&nbsp;
					</td>
					<td>
						&nbsp;
					</td>
					<td width="5">
						&nbsp;
					</td>
					<td width="48" align="center" onmouseover="this.style.backgroundColor='#FF6666'" onmouseout="this.style.backgroundColor='#FFF8DC'">
						<?php echo $defFont;?>Batal</font>
					</td>
					<td width="5">
						&nbsp;
					</td>
					<td width="48" align="center" onmouseover="this.style.backgroundColor='#FF6666'" onmouseout="this.style.backgroundColor='#FFF8DC'">
						<?php echo $defFont;?>Apply</font>
					</td>
					<td width="5">
						&nbsp;
					</td>
					<td width="50" align="center" onmouseover="this.style.backgroundColor='#FF6666'" onmouseout="this.style.backgroundColor='#FFF8DC'">
						<?php echo $defFont;?>Simpan</font>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="left">
	<tr bgcolor="#FFF8DC">
		<td align="right" width="15%"><?php echo $defFont;?>Keterangan&nbsp;&nbsp;<?php echo $tFont;?></td>
		<td width="85%">&nbsp;&nbsp;
			<textarea name="peng_isi" cols="50" rows="5" class="textField"><?php echo $_POST["peng_isi"];?></textarea><?php if(!$_POST["peng_isi"]) echo "*";?>
			<input type="hidden" name="peng_id" value="<?php echo $_POST["peng_id"];?>">
			<input type="hidden" name="mode" value="<?php echo $mode;?>">
		</td>
	</tr>
	<tr bgcolor="#FFF8DC">
		<td align="right"><?php echo $defFont;?>&nbsp;<?php echo $tFont;?></td>
		<td>&nbsp;
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<font color="yellow">
				<?php if($stat_err==true || $hint) echo "Periksa lagi inputan yang bertanda (*)";?><br>
				<?php if($stat_err==true) echo "<i>Ada field yang belum terisi. Silahkan mengisi terlebih dahulu</i><br>";?>
				<?php for($start=0, $end=count($hint); $start<$end; $start++) {?>
						<i><?php echo $defFont;?><?php echo $hint[$start];?>&nbsp;<?php echo $tFont;?></i>
				<?php } ?>
			<?php echo $tFont;?>
		</td>
	</tr>
</table>
</form>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit