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 session_start(); if (!isset($_SESSION["\x75"])) { header("\x4c\x6f\143\141\x7..
Decoded Output download
<?php
session_start();
if (!isset($_SESSION["u"])) {
header("Location: ./login.php");
} else {
require "../connection.php";
$ranviruno = $_POST["ranviruno"];
$nic_No = $_POST["nic_No"];
$surname = $_POST["surname"];
$othername = $_POST["othername"];
$name_with_int = $_POST["name_with_int"];
$date_of_Birth = $_POST["date_of_Birth"];
$civilStatus = $_POST["civilStatus"];
$religion = $_POST["religion"];
$ethnic_Group = $_POST["ethnic_Group"];
$gender = $_POST["gender"];
$officer_Category = $_POST["officer_Category"];
$enlisted_Rank = $_POST["enlisted_Rank"];
$enlisted_Regimental_No = $_POST["enlisted_Regimental_No"];
$enlisted_Date = $_POST["enlisted_Date"];
$present_Rank = $_POST["present_Rank"];
$present_Regimatal_No = $_POST["present_Regimatal_No"];
$wOPNo = $_POST["wOPNo"];
$officer_Status = $_POST["officer_Status"];
$date_of_Dead = $_POST["date_of_Dead"];
$date_of_Disable = $_POST["date_of_Disable"];
$service_Status = $_POST["service_Status"];
$date_of_Retired = $_POST["date_of_Retired"];
$mobileNo = $_POST["mobileNo"];
$attached_Station = $_POST["attached_Station"];
$division = $_POST["division"];
if (empty($ranviruno)) {
echo "*Please Enter Ranaviru No";
} else {
if (!preg_match("/^[0-9]+$/", $ranviruno)) {
echo "*Invalid Ranaviru No";
} else {
if (empty($nic_No)) {
echo "*Please Enter NIC";
} else {
if (!preg_match("/^([0-9]{9}[x|X|v|V]|[0-9]{12})$/", $nic_No)) {
echo "*Invalid NIC";
} else {
if (empty($surname)) {
echo "*Please Enter Surname";
} else {
if (empty($othername)) {
echo "*Please Enter Other name";
} else {
if (empty($name_with_int)) {
echo "*Please Enter Name With Initial ";
} else {
if (empty($date_of_Birth)) {
echo "*Please Select date of birth";
} else {
if ($civilStatus == "Select") {
echo "*Please Select Civil Status";
} else {
if ($religion == "Select") {
echo "*Please Select Religion";
} else {
if ($ethnic_Group == "Select") {
echo "*Please Select Ethnic Group ";
} else {
if ($gender == "Select") {
echo "*Please Select Gender";
} else {
if ($officer_Category == "Select") {
echo "*Please Select Officer Category";
} else {
if ($enlisted_Rank == "Select the Rank") {
echo "*Please Select Enlisted Rank";
} else {
if (empty($enlisted_Date)) {
echo "*Please Select Enlisted Date";
} else {
if ($present_Rank == "Select the Rank") {
echo "*Please Select Present Rank";
} else {
if (empty($wOPNo)) {
echo "*Please Enter W & OP No ";
} else {
if ($service_Status == "Select") {
echo "*Please Enter Service Status ";
} else {
if (empty($mobileNo)) {
echo "*Please Enter Mobile No";
} else {
if (strlen($mobileNo) != 10) {
echo "*Invalid Mobile No";
} else {
if (!preg_match("/07[0,1,2,4,5,6,7,8][0-9]/", $mobileNo)) {
echo "*Invalid Mobile No";
} else {
if ($division == "Select") {
echo "*Please Select Division";
} else {
if ($attached_Station == "Select") {
echo "*Please Select Attached Station";
} else {
$r = Database::search("SELECT * FROM `officer_personal_detials` WHERE `ranviruno`='" . $ranviruno . "' ");
$n = $r->num_rows;
if ($n > 0) {
echo "*Ranaviru Number already exists.";
} else {
Database::iud("INSERT INTO officer_personal_detials (`ranviruno`,`NIC_No`,`Surname`,`Othername`,`namewithinatials`,`Date_of_Birth`,
`CivilStatus`,`Religion`,`Ethni_Group`,`Gender`,`Officer_Category`,`Enlisted_Rank`,`Enlisted_Regimental_No`,`Enlisted_Date`,\xa `Present_Rank`,`Present_Regimatal_No`,`WOPNo`,`Officer_Status`,`Date_of_Dead`,`Date_of_Disable`,`Service_Status`,`Date_of_Retired`,`MobileNo`,`Attached_Station`,`division`) \xa VALUES ('" . $ranviruno . "','" . $nic_No . "','" . $surname . "','" . $othername . "','" . $name_with_int . "','" . $date_of_Birth . "','" . $civilStatus . "',\xa '" . $religion . "','" . $ethnic_Group . "','" . $gender . "','" . $officer_Category . "','" . $enlisted_Rank . "','" . $enlisted_Regimental_No . "',\xa '" . $enlisted_Date . "','" . $present_Rank . "','" . $present_Regimatal_No . "','" . $wOPNo . "','" . $officer_Status . "','" . $date_of_Dead . "',\xa '" . $date_of_Disable . "','" . $service_Status . "','" . $date_of_Retired . "','" . $mobileNo . "','" . $attached_Station . "','" . $division . "')");
echo "success";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
session_start();
if (!isset($_SESSION["\x75"])) {
header("\x4c\x6f\143\141\x74\151\x6f\x6e\72\40\x2e\x2f\154\x6f\x67\x69\x6e\56\x70\150\x70");
} else {
require "\56\56\57\x63\157\x6e\x6e\x65\x63\x74\x69\x6f\156\x2e\160\x68\x70";
$ranviruno = $_POST["\162\x61\156\166\x69\x72\x75\156\157"];
$nic_No = $_POST["\x6e\151\143\x5f\x4e\x6f"];
$surname = $_POST["\x73\x75\x72\x6e\x61\155\x65"];
$othername = $_POST["\157\164\x68\x65\162\x6e\141\x6d\x65"];
$name_with_int = $_POST["\x6e\x61\x6d\145\137\167\x69\x74\x68\x5f\151\x6e\x74"];
$date_of_Birth = $_POST["\144\141\x74\x65\x5f\x6f\x66\137\102\151\162\164\150"];
$civilStatus = $_POST["\x63\x69\166\x69\x6c\123\x74\x61\x74\165\x73"];
$religion = $_POST["\162\x65\x6c\x69\147\x69\x6f\x6e"];
$ethnic_Group = $_POST["\145\164\150\156\151\x63\x5f\107\x72\x6f\x75\x70"];
$gender = $_POST["\147\145\156\144\x65\x72"];
$officer_Category = $_POST["\x6f\x66\146\151\143\145\162\137\103\x61\164\x65\147\x6f\x72\171"];
$enlisted_Rank = $_POST["\x65\156\x6c\151\163\164\x65\x64\x5f\x52\x61\x6e\x6b"];
$enlisted_Regimental_No = $_POST["\145\x6e\x6c\151\x73\x74\x65\x64\137\122\145\147\151\x6d\145\156\164\141\154\x5f\116\157"];
$enlisted_Date = $_POST["\x65\x6e\154\151\163\x74\x65\x64\x5f\104\141\x74\145"];
$present_Rank = $_POST["\x70\162\x65\x73\x65\x6e\x74\x5f\122\x61\156\x6b"];
$present_Regimatal_No = $_POST["\160\x72\x65\x73\x65\156\x74\x5f\122\145\147\x69\x6d\141\164\141\154\137\116\x6f"];
$wOPNo = $_POST["\x77\117\x50\116\x6f"];
$officer_Status = $_POST["\x6f\146\x66\x69\143\x65\162\x5f\x53\x74\x61\164\x75\x73"];
$date_of_Dead = $_POST["\x64\x61\164\145\x5f\157\x66\137\104\145\x61\x64"];
$date_of_Disable = $_POST["\x64\x61\x74\x65\137\157\x66\x5f\x44\151\x73\141\142\x6c\x65"];
$service_Status = $_POST["\x73\145\162\166\x69\x63\145\x5f\x53\x74\x61\x74\x75\x73"];
$date_of_Retired = $_POST["\x64\x61\164\145\x5f\x6f\x66\137\122\x65\x74\151\x72\x65\x64"];
$mobileNo = $_POST["\x6d\157\142\x69\x6c\x65\x4e\x6f"];
$attached_Station = $_POST["\141\x74\164\x61\x63\x68\145\x64\x5f\x53\164\x61\164\x69\x6f\x6e"];
$division = $_POST["\x64\151\x76\x69\x73\x69\157\x6e"];
if (empty($ranviruno)) {
echo "\52\x50\154\x65\141\x73\145\x20\x45\x6e\x74\145\162\40\122\141\156\141\166\151\162\165\x20\x4e\x6f";
} else {
if (!preg_match("\57\136\133\60\55\71\135\53\44\x2f", $ranviruno)) {
echo "\x2a\x49\x6e\166\x61\x6c\x69\x64\x20\x52\x61\156\141\x76\151\162\x75\x20\x4e\x6f";
} else {
if (empty($nic_No)) {
echo "\x2a\120\x6c\x65\141\163\145\x20\105\156\x74\x65\x72\40\116\111\x43";
} else {
if (!preg_match("\x2f\x5e\50\x5b\60\x2d\71\135\173\71\x7d\x5b\170\x7c\x58\174\166\x7c\126\135\x7c\x5b\x30\x2d\71\135\x7b\61\62\175\x29\x24\x2f", $nic_No)) {
echo "\x2a\111\x6e\x76\x61\x6c\151\x64\x20\116\111\103";
} else {
if (empty($surname)) {
echo "\52\120\154\x65\x61\x73\145\x20\105\x6e\x74\145\162\40\x53\165\x72\x6e\x61\x6d\145";
} else {
if (empty($othername)) {
echo "\52\x50\x6c\145\141\163\145\x20\105\156\164\145\162\x20\117\164\x68\145\162\40\x6e\x61\155\x65";
} else {
if (empty($name_with_int)) {
echo "\x2a\120\154\145\x61\163\145\40\105\x6e\x74\x65\162\x20\x4e\141\x6d\145\40\127\151\x74\x68\40\x49\x6e\151\x74\151\x61\154\40";
} else {
if (empty($date_of_Birth)) {
echo "\x2a\x50\x6c\x65\141\x73\145\40\x53\x65\154\x65\143\164\40\x64\141\164\145\40\x6f\146\40\142\x69\162\x74\150";
} else {
if ($civilStatus == "\123\145\154\x65\143\x74") {
echo "\52\x50\154\x65\x61\163\145\40\123\145\154\145\143\164\40\103\x69\x76\151\x6c\x20\x53\164\x61\x74\x75\163";
} else {
if ($religion == "\123\x65\x6c\x65\143\164") {
echo "\52\x50\154\x65\x61\163\145\40\123\145\154\145\143\x74\x20\x52\145\x6c\x69\147\151\157\x6e";
} else {
if ($ethnic_Group == "\123\145\x6c\145\x63\x74") {
echo "\x2a\x50\154\145\141\x73\145\x20\123\145\154\x65\143\x74\40\x45\164\150\x6e\x69\x63\40\107\162\157\x75\x70\40";
} else {
if ($gender == "\123\145\x6c\x65\143\164") {
echo "\x2a\x50\154\x65\141\163\145\x20\x53\x65\154\x65\143\164\x20\x47\x65\156\144\x65\x72";
} else {
if ($officer_Category == "\x53\x65\154\x65\143\x74") {
echo "\52\120\154\145\x61\x73\145\40\x53\x65\154\x65\143\x74\x20\x4f\x66\146\151\143\145\x72\40\x43\141\164\145\147\157\162\171";
} else {
if ($enlisted_Rank == "\123\x65\x6c\x65\x63\x74\40\164\x68\145\40\122\141\x6e\x6b") {
echo "\x2a\120\x6c\x65\x61\x73\x65\x20\x53\145\154\x65\143\164\40\105\x6e\154\151\x73\164\145\x64\x20\122\x61\x6e\153";
} else {
if (empty($enlisted_Date)) {
echo "\52\x50\154\145\x61\x73\145\40\123\145\154\x65\x63\164\x20\x45\156\154\x69\x73\164\145\144\x20\x44\141\164\x65";
} else {
if ($present_Rank == "\123\x65\154\145\x63\164\x20\164\x68\145\40\x52\x61\156\x6b") {
echo "\52\120\154\x65\x61\163\145\40\123\x65\x6c\x65\143\x74\40\120\162\145\x73\x65\156\x74\40\122\141\156\x6b";
} else {
if (empty($wOPNo)) {
echo "\x2a\x50\x6c\145\x61\163\x65\40\x45\156\164\x65\162\x20\127\40\x26\x20\x4f\120\x20\x4e\x6f\x20";
} else {
if ($service_Status == "\x53\x65\154\145\143\x74") {
echo "\x2a\x50\x6c\145\x61\163\145\40\105\156\x74\145\x72\x20\x53\145\162\166\x69\143\x65\x20\x53\164\x61\x74\165\x73\40";
} else {
if (empty($mobileNo)) {
echo "\x2a\120\154\x65\141\163\x65\40\x45\156\x74\145\x72\x20\115\x6f\142\x69\x6c\145\40\x4e\157";
} else {
if (strlen($mobileNo) != 10) {
echo "\52\x49\x6e\x76\x61\x6c\151\x64\x20\x4d\x6f\142\x69\x6c\145\40\x4e\x6f";
} else {
if (!preg_match("\57\x30\x37\x5b\60\x2c\x31\x2c\62\x2c\x34\54\x35\54\66\54\67\x2c\70\135\x5b\60\55\71\135\57", $mobileNo)) {
echo "\x2a\111\156\166\x61\154\x69\x64\x20\x4d\x6f\x62\x69\154\x65\40\x4e\157";
} else {
if ($division == "\123\145\154\145\143\x74") {
echo "\52\x50\154\x65\x61\x73\145\40\123\x65\154\x65\x63\164\x20\x44\x69\x76\x69\x73\151\x6f\156";
} else {
if ($attached_Station == "\x53\x65\154\x65\x63\x74") {
echo "\52\120\x6c\x65\x61\x73\145\x20\123\145\x6c\145\x63\x74\40\x41\164\x74\x61\x63\150\145\144\40\x53\164\x61\x74\151\157\156";
} else {
$r = Database::search("\123\105\x4c\x45\103\x54\x20\52\40\106\x52\x4f\115\40\140\157\146\146\x69\143\x65\x72\x5f\160\x65\162\163\x6f\x6e\141\x6c\137\x64\145\x74\151\141\154\x73\140\x20\x57\110\105\x52\105\40\140\x72\x61\x6e\x76\x69\x72\165\x6e\x6f\x60\x3d\47" . $ranviruno . "\47\x20");
$n = $r->num_rows;
if ($n > 0) {
echo "\52\x52\141\x6e\x61\166\x69\162\165\40\116\x75\x6d\x62\x65\x72\40\141\154\162\x65\141\x64\x79\40\x65\x78\x69\x73\164\x73\56";
} else {
Database::iud("\111\116\123\x45\x52\124\x20\x49\x4e\124\x4f\40\x6f\146\146\x69\143\145\162\x5f\x70\x65\162\163\x6f\156\x61\154\137\x64\145\164\x69\141\x6c\163\40\50\x60\x72\141\156\166\151\x72\165\x6e\x6f\140\54\x60\116\x49\103\137\116\x6f\140\54\140\x53\165\162\x6e\141\x6d\x65\140\x2c\x60\117\164\150\x65\162\x6e\x61\155\x65\140\x2c\x60\156\141\155\x65\167\x69\x74\x68\x69\x6e\x61\x74\151\x61\154\163\140\x2c\x60\104\x61\x74\x65\137\157\x66\x5f\102\x69\x72\164\150\140\x2c\12\x20\40\40\x20\140\x43\x69\166\151\154\x53\164\x61\x74\165\163\140\54\140\122\145\x6c\151\147\151\157\x6e\140\54\140\105\164\150\156\151\x5f\107\162\x6f\165\x70\x60\x2c\140\107\145\x6e\144\x65\x72\x60\54\140\x4f\146\146\151\143\145\162\x5f\103\141\164\x65\x67\157\162\x79\140\x2c\x60\x45\x6e\154\x69\163\164\x65\x64\137\x52\x61\x6e\x6b\140\54\140\105\156\154\151\163\164\145\x64\137\122\x65\147\151\x6d\x65\156\164\141\154\137\x4e\x6f\x60\x2c\140\x45\x6e\x6c\151\x73\x74\x65\x64\x5f\104\x61\x74\x65\140\x2c\xa\40\x20\x20\40\x60\120\x72\x65\x73\145\x6e\164\137\x52\x61\x6e\x6b\x60\x2c\140\x50\x72\x65\x73\145\x6e\x74\137\x52\145\x67\x69\155\141\164\x61\154\x5f\x4e\x6f\x60\54\x60\127\117\120\x4e\x6f\140\54\x60\x4f\146\x66\x69\x63\145\162\137\x53\164\141\164\165\163\140\54\140\104\141\x74\x65\137\x6f\x66\x5f\104\x65\x61\x64\x60\x2c\x60\104\141\x74\x65\137\157\x66\x5f\x44\151\x73\x61\142\x6c\145\140\54\140\123\x65\x72\166\x69\143\x65\x5f\123\x74\x61\x74\x75\163\x60\x2c\140\x44\141\164\145\137\157\x66\x5f\122\145\164\x69\x72\x65\144\x60\54\140\x4d\x6f\142\x69\154\145\116\157\x60\x2c\x60\101\x74\164\x61\x63\x68\x65\x64\137\x53\x74\141\x74\151\157\156\140\54\140\x64\151\166\x69\163\151\x6f\x6e\x60\x29\40\xa\40\40\40\40\40\40\x20\x20\126\x41\x4c\x55\x45\123\40\50\x27" . $ranviruno . "\x27\x2c\x27" . $nic_No . "\x27\x2c\47" . $surname . "\x27\x2c\47" . $othername . "\47\x2c\x27" . $name_with_int . "\47\x2c\x27" . $date_of_Birth . "\47\x2c\x27" . $civilStatus . "\x27\54\xa\x20\x20\x20\x20\40\x20\x20\x20\x27" . $religion . "\47\54\x27" . $ethnic_Group . "\47\54\47" . $gender . "\x27\54\x27" . $officer_Category . "\x27\x2c\x27" . $enlisted_Rank . "\x27\x2c\x27" . $enlisted_Regimental_No . "\x27\x2c\xa\x20\x20\40\40\40\40\x20\x20\x27" . $enlisted_Date . "\47\54\x27" . $present_Rank . "\47\x2c\x27" . $present_Regimatal_No . "\x27\54\47" . $wOPNo . "\x27\x2c\x27" . $officer_Status . "\x27\x2c\x27" . $date_of_Dead . "\x27\x2c\xa\40\40\x20\x20\x20\40\40\40\x27" . $date_of_Disable . "\47\54\x27" . $service_Status . "\47\x2c\x27" . $date_of_Retired . "\47\54\x27" . $mobileNo . "\47\54\x27" . $attached_Station . "\x27\54\x27" . $division . "\x27\x29");
echo "\163\165\143\x63\145\x73\x73";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
Function Calls
None |
Stats
MD5 | 582ba9d979c702d2f03004b4bd84496a |
Eval Count | 0 |
Decode Time | 56 ms |