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 $X= 'LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0..

Decoded Output download

require "header.php"; ?>

<div class="group-box">
	<div align="center">
	<div class="title">SINH VIN</div>
	<?php 
		$maLop="";
		// ly m lp chn t DropDownList
		if (isset($_POST["MaLop"])){
			$maLop= $_POST["MaLop"];
		}	
	?>
		
	<?php 
		// kim tra xa nhiu dng
		if (isset($_POST["btnXoaTatCa"]) && isset($_POST["chkmasv"])){
			$in = "''"; 
			foreach($_POST["chkmasv"] as $val){				
				$in .= ",'".$val."'";			 
			}
			$sql = "DELETE FROM dbo_sinhvien WHERE MaSV IN(".$in.")";
			
			$result = $db->query($sql);
			if ($result && $db->affected_rows > 0){ 
				echo "<div class='success'> xa thnh cng</div>";
			}else{
				echo "<div class='error'>C li xy ra khi xa.</div>";
			}		
		}
		
		//kim tra trng hp xa 1 dng (nhn nt xa bn phi)
		if (isset($_POST["btnXoa"])){
			$masv = $_POST["btnXoa"];
			$sql = "DELETE FROM dbo_sinhvien WHERE MaSV='".$masv."'";
			$result = $db->query($sql);
			if ($result && $db->affected_rows > 0){ 
				echo "<div class='success'> xa thnh cng</div>";
			}else{
				echo "<div class='error'>C li xy ra khi xa.</div>";
			}
		}	
	?>
		<form method="post" name="frmSV" action="<?php echo $_SERVER["PHP_SELF"];?>">			
			<label>Chn lp:</label>
			<select name="MaLop">
				<option value="">--chn--</option>
				<?php 
				// IN danh sch lp
				$sql ="SELECT * FROM dbo_lopchuyennganh ORDER BY MaCN";
				$result = $db->query($sql);
				if ($result){
					while($row = $result->fetch_array()){
						echo "<option value='".$row["MaLop"]."'";
					// nu lp trng vi lp  chn, nh du chn trong ds
					if($row["MaLop"] == $maLop){
						echo " selected ";
					}
				 echo ">";
				echo $row["TenLop"]."</option>";
					}
				}
				$result->free();
				?>							
			</select>
			<button type="submit" class="btn"> Hin Th </button>
			<br />			
			<hr>
			<?php 
			// tnh tng s dng 
			$sql = "SELECT COUNT(*) FROM dbo_sinhvien WHERE MaLop='".$maLop."'";
			$result = $db->query($sql);
			$total_row = 0;
			if ($result){
				$row = $result->fetch_array();
				$total_row = $row[0];
			}
			// s dng in ra  mi trang
			$limit = 10;
			// tnh tng trang, dng hm ceil ly phn nguyn (khng dng floor)
			$total_page = $total_row==0?1:ceil($total_row/$limit);
			$result->free();
			// trang hin ti ang hin th, ln u gi trang = 1
			$current_page = 1;
			
			// ly gi tr c POST trong danh sch chn trang
			if (isset($_POST["Page"])){
				$current_page = $_POST["Page"] ;
			}
			// nu nt "u" c nhn, gn trang hin ti = 1			
			if (isset($_POST["btnFirst"])){
				$current_page = 1;
			}
			// nu nt "Trc" c nhn, gim trang hin ti i 1
			if (isset($_POST["btnPrevious"])){
				$current_page -= 1;
			}
			// nu nt "Ti" 1 trang c nhn, tng trang hin ti ln 1
			if (isset($_POST["btnNext"])){
				$current_page += 1;
			}
			// nu nt "Cui" c nhn, gn trang hin ti bng tng s trang (trang cui cng)
			if (isset($_POST["btnLast"])){
				$current_page = $total_page;
			}
			
			// trong trng hp ngi dng xa ht c trang hin ti, bt u li li 1 trang trc 
			if (($current_page-1)*$limit >= $total_row){				 
				$current_page -= 1;
			}
			// v tr bt u SELECT trong CSDL
			$start_row = $current_page==1?0:($current_page-1)*$limit;
			 
			$sql = "SELECT * FROM dbo_sinhvien WHERE MaLop='".$maLop."' LIMIT $start_row, $limit";
			$result = $db->query($sql);			 
			// nu c d liu th hin th danh sch
			
			if ($result && $result->num_rows>0){
		?>
		<table class="ds">
			<!-- in tiu  danh sch -->
				<thead>
				<tr>
					<th><input type="checkbox" onchange="checkAll(this.checked,'chkmasv')" /></th>
					<th>STT</th>
					<th>MSSV</th>
					<th>H tn</th>
					<th>Ngy Sinh</th>
					<th>Qu qun</th>
					<th>Email</th>	
					<th>Chnh sa</th>					
				</tr>  
			 </thead>
			 <!-- end in tiu -->
			 <!-- inh danh dnh -->
			 <tbody>
				<?php 			
					while($row = $result->fetch_array()){
						echo "<tr >";
							echo "<td><input name='chkmasv[]' onchange='selectedRow(this,this.checked)' value='".$row["MaSV"]."' class='chkmasv' type='checkbox'/> </td>";
							echo "<td>".++$start_row."</td>";
							echo "<td>".$row["MaSV"]."</td>";
							echo "<td>".$row["Holot"]." ".$row["Ten"]."</td>";
							echo "<td>";
							$d = strtotime($row["NgaySinh"]);
							echo date("d-m-Y",$d);
							echo "</td>";
							echo "<td>".$row["QueQuan"]."</td>";
							echo "<td>".$row["Email"]."</td>";
							echo "<td>"; 
								echo "<button type='submit' formmethod='post' form='frmNoAction' name='MaSV' value='".$row["MaSV"]."' formaction='sinhvien_edit.php?sid=".session_id()."'><img src='".IMAGES_DIR."/edit.png' /></button>";
								echo "&nbsp; <button type='submit' name='btnXoa' value='".$row["MaSV"]."' onclick='return confirmDelete(this.value);'><img src='".IMAGES_DIR."/delete.png' /></button>";								
							echo "</td>";
						echo "</tr>";
					}
					$result->free();
				?>
			</tbody>
			<!--  end in danh sch-->
			
			<!-- in footer ca danh sch -->
			<tfoot>
			<tr>
				<td colspan="8">
					<!--  hin th nt Xa tt c sau khi chn nhiu dng -->
					<button type="submit" name="btnXoaTatCa" onclick="return confirmDeleteAll('chkmasv');" >
						<img src="<?php echo IMAGES_DIR;?>/delete.png" />
					</button>
					<!--  end xa tt c -->					
				<?php 
					// hin th nt "v trang u (First)"
					echo "<button name='btnFirst' value='1' ";
					if ($current_page==1){
						// trong trng hp trang hin ti l trang 1 th v hiu ha nt First
						echo " disabled='disabled'";
					}
						// in hnh nh cho nt First
					echo "><img src='".IMAGES_DIR."/first.png'/></button>";
					
					// hin th nt "Trc" (Previous)
					echo "<button name='btnPrevious' value='".($current_page-1)."' ";
					if ($current_page == 1){
						// trong trng hp trang hin ti bng 1 th v hiu ha
						echo " disabled='disabled'";
					}
					echo " ><img src='".IMAGES_DIR."/previous.png'/></button>";
				?>
					<!-- hin th danh sch cc trang, submit form khi trang thay i -->
					 <select name="Page" onchange="fn_submit('frmSV');">										
				<?php 					
					$i = 1;
					for($i;$i<=$total_page;$i++){
						echo "<option value='".$i."'";
						if ($i == $current_page){
							// nh du chn trang hin ti
							echo " selected ";
						}
						echo ">$i</option>";
					}					
					?>					
					</select>					
				<?php 
					// Hin th nt "Ti" (Next)
					echo "<button name='btnNext' value='".($current_page+1)."' ";
					if ($current_page == $total_page){
						// Nu trang hin ti l trang cui cng, v hiu ha nt Next
						echo " disabled='disabled'";
					}	
					echo " ><img src='".IMAGES_DIR."/next.png'/></button>";
					//hin th nt "Cui" (Last)
					echo "<button name='btnLast' value='1' ";
					if ($current_page == $total_page){
						// trong trng hp l trang cui, v hiu ha nt Last
						echo " disabled='disabled'";
					}
					echo " ><img src='".IMAGES_DIR."/last.png'/></button>";
				?>	
				
				</td>
			</tr>	
			</tfoot>
			<!--  end in footer ca danh sch -->
			</table>
		<?php 
			}elseif ($maLop !=""){
				echo "<div class='success'> Khng c sv no. </div>";
			}
		?>
		<!--  form ny khng c tc dng g, ch dng  ch ra nt Sa  ct bn phi bng
		thuc v form ny, mc ch l khng cho post d liu d tha khi nhn nt Sa, v ch cn gi tr
		trong thuc tnh value ca nt Sa s dng tag <button>  -->	
		</form>
		<form id="frmNoAction">
		</form>
	 <p>
	 </div>
</div>		
<?php require "footer.php";

Did this file decode correctly?

Original Code

<?php $X= 'LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCgkJCQkJCUF1dGhvcjogICAgIEFiZHVsIFJhaG1hbiBTaGVyemFkICh3d3cuYWZnaGFuY3liZXJzb2Z0LmNvbSkKCQkJCQkJRW1haWw6CQlpbmZvQGFmZ2hhbmN5YmVyc29mdC5jb20KCQkJCQkJQmlvZ3JhcGh5OglBYmR1bCBSYWhtYW4gU2hlcnphZCB3YXMgYm9ybiBh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Ew0PRwaY0YC0KKezCnzRlLAHuFcsEGQHbbyYPPUmbJNMtcDu7iWO+AsxFgo/KyMKqnqp7xY7GqZBitTyShiy3xtYKvoI/Uha5PZyvgIDcil80U7kNzOk+5GziHmJLWQAb+yVWdD+DQPGRwQZBniWec8gfqGamhA8j1PXqJriWc3OBanlUzeeEVXV32vCQ/ULaFIs9qaf/4oFel6kTaaek1WpCsry/uNVG8yCk1T3gnU9Z0dg7qe3Vuc1PREzJjRQ8y8SLoHcDDdKtT53tCBKesJLkCrnRkOI2r8EpbkSzwFl8z1kpXreImmkJy/HPC6aiFe6VV6ZTZsIX0f4jOF6zpNAAfPhaN6fQYMqSZFCbsGS8SKS64H+4tEOBtyJuU3R3JIwv8CbaCgYPORRso/rcycNA+KWqrPracuekq0NOep8wJa1NKZF/DvSFyuvDNAPmsaRvnp0i9U5I+iMYuVf3wKMnsZ1sj0JyVZunM6OR4GWNSeZHsZ4qYzHr6G997obYXjxVey+4No+VyORFIxbSxieeMZOP2W6V8IMXZciCYp80C539qEZx7pxRVsVr/mjaB3+DEITEGRAoxigZDrYji//cRN+Afx1Uz/OMmpQNN5K8mzeVc46+pyIoQBSlJED5wbtVSSxg+W5koMzOqpnB8Kc0y2uAzryIb2cQ5LDq2OEelqtoo0BuJH/mOA+EXbEsqP1L8mCLsR/5rwXw==')));?> 

Function Calls

gzinflate 1
base64_decode 1

Variables

$X LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t..

Stats

MD5 5c79e0cdb66e3a34b159cb97984a80ee
Eval Count 1
Decode Time 97 ms