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 /*Ali Niknam([email protected])*/$h1304092368="\142\141\163\145\66\64\x5f\144\145\1..

Decoded Output download

?>b'<?php defined( \'_EXEC\' ) or die( \'Restricted access\' ); function myForm ($type, $required, $label, $name, $id, $value, $param=\'\', $items=\'\', $info=\'\', $param1=\'\') { if ($required==true) $required = \'data-required="true"\'; else $required = \'\'; if ( $type==\'text\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'text_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'></div>\'; } else if ( $type==\'email\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="email" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'email_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="email" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'></div>\'; } else if ( $type==\'text_number\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="MaskNumber" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'text_number_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" class="MaskNumber" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'></div>\'; } else if ( $type==\'text_money\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="MaskMoney" name="\'.$name.\'" id="\'.$id.\'" value="\'.Output_Number($value).\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'text_money_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" class="MaskMoney" name="\'.$name.\'" id="\'.$id.\'" value="\'.Output_Number($value).\'" \'.$param.\' \'.$required.\'></div>\'; } else if ( $type==\'password\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="password" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'text_date\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="Field_Calendar MaskDate \'.(empty($items)?\'\':\'NoButtons\').\'" name="\'.$name.\'" id="\'.$id.\'" maxlength="10" value="\'.$value.\'" \'. $param .\' \'.$required.\'> \'; if ( empty($items) ) @$out .= \'<i id="\'.$id.\'_btn" class="myIcon Calendar" title=""></i>\'; @$out .= \' </div> \'; } else if ( $type==\'text_date_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" class="Field_Calendar MaskDate \'.(empty($items)?\'\':\'NoButtons\').\'" name="\'.$name.\'" id="\'.$id.\'" maxlength="10" value="\'.$value.\'" \'. $param .\' \'.$required.\'>\'; if ( empty($items) ) @$out .= \'<i id="\'.$id.\'_btn" class="myIcon Calendar" title=""></i>\'; @$out .= \'</div>\'; } else if ( $type==\'text_time\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="Field_Time MaskTime" name="\'.$name.\'" id="\'.$id.\'" maxlength="5" value="\'.$value.\'" \'. $param .\' \'.$required.\'> </div> \'; } else if ( $type==\'text_time_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" class="Field_Time MaskTime" name="\'.$name.\'" id="\'.$id.\'" maxlength="5" value="\'.$value.\'" \'. $param .\' \'.$required.\'></div>\'; } else if ( $type==\'text_file\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="Field_Browse" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'. $param .\' \'.$required.\'> <i class="myIcon Browse" title=" " onclick="BrowseServer(\'Files:/\'.$items.\'\', $(this).prev().attr(\'id\'));"></i> </div> \'; } else if ( $type==\'text_file_grid\' ) { @$out .= \'<div class="FieldGroup"><input type="text" class="Field_Browse" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'. $param .\' \'.$required.\'><i class="myIcon Browse" title=" " onclick="BrowseServer(\\'Files:/\'.$items.\'\\', $(this).prev().attr(\\'id\\'));"></i></div>\'; } else if ( $type==\'file\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="file" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\'> </div> \'; } else if ( $type==\'textarea\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <textarea name="\'.$name.\'" id="\'.$id.\'" \'.$param.\' \'.$required.\'>\'.$value.\'</textarea> </div> \'; } else if ( $type==\'textarea_editor\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <textarea name="\'.$name.\'" id="\'.$id.\'" \'.$param.\' \'.$required.\'>\'.$value.\'</textarea> <script> CKEDITOR.replace( "\'.$id.\'", { filebrowserBrowseUrl: "\'.PATH_ROOT.\'includes/_others/ckfinder/ckfinder.html?startupPath=Files:/\'.$items.\'" } ); </script> </div> \'; } else if ( $type==\'select\' || $type==\'select_report\' || $type==\'select_grid\' || $type==\'select_search\' ) { foreach ($items as $key => $val) { $selected = \'\'; if ( is_array($value) ) { if ( in_array($key, $value) ) $selected = \'selected\'; } else if ($value==$key) $selected = \'selected\'; @$_items .= \'<option value="\'.$key.\'" \'.$selected.\'>\'.$val.\'</option>\'; } if ( $type==\'select\' || $type==\'select_report\' || $type==\'select_search\' ) { @$out .= \' <div class="FieldGroup \'.($type==\'select_report\'?\'FieldGroup_Report\':\'\').\'"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <select class="\'.(!empty($param1)?\'Field_Search\':\'\').\'" name="\'.$name.\'" id="\'.$id.\'" \'.$param.\' \'.$required.\'> \'. @$_items .\' </select> \'; if ( !empty($param1) ) @$out .= \'<i class="myIcon Search" title=""onclick="$.colorbox({href:\'?action=\'.$param1.\'&WithoutMenu=Yes\', iframe:true, width:\'90%\', height:\'90%\'}); return false;"></i> \'; @$out .= \' </div> \'; } else if ( $type==\'select_grid\' ) @$out .= \'<div class="FieldGroup"><select name="\'.$name.\'" id="\'.$id.\'" \'.$param.\' \'.$required.\'>\'. @$_items .\'</select></div>\'; } else if ( $type==\'select2\' ) { foreach ($items as $key => $val) { $selected = \'\'; if ( is_array($value) ) { if ( in_array($key, $value) ) $selected = \'selected\'; } else if ($value==$key) $selected = \'selected\'; @$_items .= \'<option value="\'.$key.\'" \'.$selected.\'>\'.$val.\'</option>\'; } @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <select class="select2" name="\'.$name.\'" id="\'.$id.\'" \'.$param.\' \'.$required.\'> \'. @$_items .\' </select> </div> \'; } else if ( $type==\'radio\' || $type==\'radio_report\' ) { @$out .= \' <div class="FieldGroup FieldGroup_CheckBox \'.($type==\'radio_report\'?\'FieldGroup_Report\':\'\').\'"> <input type="radio" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.(@$items==$value?\'checked\':\'\').\' \'.$param.\' \'.$required.\'> <label for="\'.$id.\'" class="myIcon">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> </div> \'; } else if ( $type==\'checkbox\' || $type==\'checkbox_report\' ) { @$out .= \' <div class="FieldGroup FieldGroup_CheckBox \'.($type==\'checkbox_report\'?\'FieldGroup_Report\':\'\').\'"> <input type="checkbox" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.(@$items==$value?\'checked\':\'\').\' \'.$param.\' \'.$required.\'> <label for="\'.$id.\'" class="myIcon">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> </div> \'; } else if ( $type==\'checkbox_rounded\' ) { @$out .= \' <div class="FieldGroup"> <label>\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <div class="RoundedCheckbox"><input type="checkbox" class="Field_CheckBox" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.(@$items==$value?\'checked\':\'\').\' \'.$param.\' \'.$required.\'><label for="\'.$id.\'"></label><div></div></div> </div> \'; } else if ( $type==\'captcha\' ) { @$out .= \' <div class="FieldGroup"> <label for="\'.$id.\'">\'.$label.\' \'.($info?Popup($info):\'\').\'</label> <input type="text" class="Field_Captcha MaskNumber" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\' \'.$required.\' maxlength="3" autocomplete="off"> <img src="\'. PATH_ROOT .\'includes/captcha.php?image" class="CaptchaImage" onclick="refreshCaptcha()" /> <div class="clear"></div> </div> \'; } else if ( $type==\'submit\' ) { @$out .= \' <div class="FieldGroup"> <input type="submit" class="btn_OK" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\'> <input type="hidden" name="mySubmit" value="\'. myToken() .\'"> </div> \'; } else if ( $type==\'button\' ) { @$out .= \' <div class="FieldGroup"> <input type="button" class="btn_OK" name="\'.$name.\'" id="\'.$id.\'" value="\'.$value.\'" \'.$param.\'> </div> \'; } return @$out; } function CheckboxTreeView ($array, &$result, $level=0, $parent=0) { $first_child = false; foreach($array as $key => $value) { if ($value[\'parent_id\'] == $parent) { $Uniq = uniqid(); if ($first_child === false) { $first_child = true; $result .= \'<ul>\'; } $result .= \'<li id="Check_\'.$Uniq.\'">\'; $result .= myForm(\'checkbox_report\', false, $value[\'title\'], $value[\'elm_name\'], $value[\'elm_id\'].$Uniq, $value[\'id\'], \'onclick="javascript:ToggleCheckboxes(\'#Check_\'.$Uniq.\'\', this);"\', $value[\'elm_Checked\']); CheckboxTreeView($array, $result, $level+3, $value[\'id\']); $result .= \'</li>\'; } } if ($first_child === true) $result .= \'</ul>\'; } function Checked_Admin() { global $CreateBack, $back; if( @$_SESSION[\'admin\']==NULL ){ $out = \'      .<br><br> <div class="clear"></div> <a href="\'. PATH_ROOT .\'?back=\'. @$CreateBack .\'" class="BoxMsgOK">  </a> \'; OutputError($out); exit(); }; if ( @$_SESSION[\'admin\']!=\'system\' ) { @$Action = $_GET[\'action\']; if ( $Action!=\'Profile\' && $Action!=\'Logout\' ) { if ( SelectPageManage($Action) ) { if ( $Action!=\'home\' ) { global $db; $StrQuery = sprintf("SELECT UID FROM system_usergroup_access WHERE ( UID=(SELECT UID FROM system_user WHERE Status=\'1\' AND UID=\'%s\') OR GID in (SELECT grp.GID  FROM system_group AS grp  LEFT JOIN system_user_group AS Acc ON (grp.GID=Acc.GID)  WHERE UID=\'%s\')  ) AND  MID=(SELECT MID FROM system_menu WHERE Status=\'1\' AND Action=\'%s\') ", $_SESSION[\'adminid\'], $_SESSION[\'adminid\'], $Action ); $result = $db->query($StrQuery); if ( $db->countRows($result)==0 ){ $out = \'          .<br><br> <div class="clear"></div> <a href="\'. (@$back?@$back:PATH_ROOT) .\'" class="BoxMsgOK"></a> \'; OutputError($out); exit(); }; $db->freeResult(); } } else { $out = \'     .<br><br> <div class="clear"></div> <a href="\'. (@$back?@$back:PATH_ROOT) .\'" class="BoxMsgOK"></a> \'; OutputError($out); exit(); } } } }; function SelectPageManage ($action) { if ($action == \'home\') return \'home\'; global $db; $arr = array("Url"); $row = $db->selectOne($arr, \'system_menu\', "Status=\'1\' AND Action=\'". $action ."\'"); if ( @$_SESSION[\'admin\']==\'system\' && $action==\'SYSYTEM_EmptyDB\' ) $row[\'Url\'] = \'option/SYSTEM_EmptyDB.php\'; if ( @$_SESSION[\'admin\']==\'system\' && $action==\'SYSYTEM_ImportXLS\' ) $row[\'Url\'] = \'option/SYSTEM_ImportXLS.php\'; return $row[\'Url\']; }; function SelectTitleManage ($action) { global $db; $arr = array("Title"); $row = $db->selectOne($arr, \'system_menu\', "Status=\'1\' AND Action=\'". $action ."\'"); if ( @$_SESSION[\'admin\']==\'system\' && $action==\'SYSYTEM_EmptyDB\' ) $row[\'Title\'] = \'   \'; if ( @$_SESSION[\'admin\']==\'system\' && $action==\'SYSYTEM_ImportXLS\' ) $row[\'Title\'] = \'  \'; return $row[\'Title\']; }; function OutputError($out) { $page1 = new Page(); $cont = \'<br>\'. $page1->AdminBox(\'\', $out, \'\', \'\', \'\', \'\', \'Copyright\'); $page1->DisplayAdmin(\'class="Body3"\', $cont, \'Yes\'); exit(); } function myToken($value=\'myToken\') { if (!@$_SESSION[$value]) @$_SESSION[$value] = md5(uniqid()); return @$_SESSION[$value]; } function ConvAra2Per ($value) { $arabic = array("", "", "", ""); $persian = array("", "", "", " "); if ( is_array(@$value) ) foreach($value as $key=>$val) @$value[$key] = str_replace($arabic, $persian, $val); else $value = str_replace($arabic, $persian, $value); return $value; } function ConvPer2Ara ($value) { $arabic = array("", "", "", ""); $persian = array("", "", "", " "); if ( is_array(@$value) ) foreach($value as $key=>$val) @$value[$key] = str_replace($persian, $arabic, $val); else $value = str_replace($persian, $arabic, $value); return $value; } function TextboxCalendar ($ParamName, $ParamValue=\'\', $Star=\'\', $Other=\'\', $Type=1) { $cal = \'<input type="text" name="\'. $ParamName .\'" id="\'. $ParamName .\'" maxlength="10" value="\'. $ParamValue .\'" class="Field_Calendar MaskDate" \'. $Other .\'>\'; if ( $Star ) $cal .= \'<span class="Text_Alert"> *</span>\'; if ( $Type==1 ) { $cal .= \'<img id="\'. $ParamName .\'_btn" src="\'. PATH_ROOT .\'includes/_others/calendar/skins/calendar.png" class="Calendar" alt="" title="">\'; $cal .= \'<i id="\'.$ParamName.\'_btn" class="myIcon Calendar" title=""></i>\'; } return $cal; } function CheckConvDate ($DateValue) { if ( empty($DateValue) ) return false; @list($Year, $Month, $Day) = explode("/", $DateValue); if ( $Year<10 ) $Year = \'0\'.(int)$Year; if ( $Year<100 ) $Year = \'13\'.$Year; if ( $Year<1000 ) $Year = $Year.\'0\'; if ( $Month<10 ) $Month = \'0\'.(int)$Month; if ( $Month>12 ) $Month = 12; if ( $Day<10 ) $Day = \'0\'.(int)$Day; if ( $Day>31 ) $Day = 31; if ( $Month==\'00\' ) $Month = \'01\'; if ( $Day==\'00\' ) $Day = \'01\'; return $Year.\'/\'.$Month.\'/\'.$Day; } function CheckConvTime ($TimeValue) { if ( empty($TimeValue) ) return false; @list($Hour, $Minute) = explode(":", $TimeValue); if ( $Hour<10 ) $Hour = \'0\'.(int)$Hour; if ( $Hour>=24 ) $Hour = 23; if ( $Minute<10 ) $Minute = \'0\'.(int)$Minute; if ( $Minute>=60 ) $Minute = 59; return $Hour.\':\'.$Minute; } function Image_StatusActive ($value) { if ($value==1) $out = \'<center><i title="" class="myIcon icoAccept"></i></center>\'; else $out = \'<center><i title="" class="myIcon icoDecline"></i></center>\'; return $out; } function Image_StatusActive2 ($value) { if ($value==1) $out = \'<center><i title="" class="myIcon icoAccept"></i></center>\'; else $out = \'\'; return $out; } function Image_StatusActive_Print ($value) { if ($value==1) $out = \'<img src="\'. PATH_ROOT .\'images/check.png" class="tick">\'; else $out = \'-\'; return @$out; } function Popup ($Value=\'\') { $pop = \'<i class="myIcon icoInfo" onMouseOver="javascript:Show_Popup(\'\'. $Value .\'\', this)" onMouseOut="javascript:Hide_Popup()"></i>\'; return $pop; } function Output_Number ($num) { if (is_null($num)) return \'\'; return @number_format(Clear_Number($num)); }; function Clear_Number ($num) { if (is_null($num)) return \'\'; return @str_replace(\',\', \'\', $num); }; function Get_PersonnelName ($PID) { global $db; $arr1 = array("FirstName", "LastName"); $row = $db->selectOne($arr1, \'base_person\', "PID=$PID"); return $row[\'FirstName\'].\' \'.$row[\'LastName\']; }; function FindChildren($type, $array, $parent=0, &$result=array()) { global $db; if ( $type==\'CMID\' ) { $result2 = $db->query("SELECT CMID AS id, ParentCMID AS parent_id FROM ins_commitments ORDER BY CodeCM"); $array = array(); while ($row = $db->fetchAssoc($result2)) { $array[] = $row; } $db->freeResult($result2); } foreach($array as $key => $value) { if (is_null($value[\'parent_id\'])) $value[\'parent_id\'] = 0; if ($value[\'parent_id\'] == $parent) { $result[] = $value[\'id\']; FindChildren(\'\', $array, $value[\'id\'], $result); } } return @$result; } function Organ () { global $db; $arr1 = array("OrganName", "OrganLogo", "OrganAddress", "OrganTel", "OrganFax"); $row = $db->selectOne($arr1, \'organ\'); define( \'OrganName\', $row[\'OrganName\'] ); define( \'OrganLogo\', $row[\'OrganLogo\'] ); define( \'OrganAddress\', $row[\'OrganAddress\'] ); define( \'OrganTel\', $row[\'OrganTel\'] ); define( \'OrganFax\', $row[\'OrganFax\'] ); }; function Organ_Post ($PostID) { global $db; $arr1 = array("FullName", "Post", "Signature"); $row = $db->selectOne($arr1, \'organpost\', "OPID=$PostID"); $arr1 = array("FullName" => $row[\'FullName\'], "Post" => $row[\'Post\'], "Signature" => $row[\'Signature\']); return $arr1; }; function CheckBox_UserStatus ($value, $UID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="Status[]" id="Status\'.$Uniq.\'" value="\'. $UID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="Status\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } function Table_base_person ($value, $UID) { $out = " ( SELECT * FROM base_person WHERE PID IN (SELECT PID FROM base_personcenter_access WHERE UID=$_SESSION[adminid]) OR CenterID IN (SELECT CenterID FROM base_personcenter_access WHERE UID=$_SESSION[adminid]) OR (SELECT IF((SELECT PCID FROM base_personcenter_access WHERE PID IS NULL AND CenterID IS NULL AND UID=$_SESSION[adminid]), 1, 0)) ) AS tbBasePerson "; return $out; } function Checked_UserAccess($PerID=\'\') { global $db, $back; if ( !@$PerID ) @$PerID = $_REQUEST[\'PID\']; if (is_array($PerID)) $Str_PID = \'PID IN (\'. implode(\',\', $PerID) .\')\'; else $Str_PID = "PID=$PerID"; if ( @$PerID && @$_GET[\'action\']!=\'UserAccessPersonCenter\' ) { $row50 = $db->selectOne(array("PID"), \'base_person\', $Str_PID." AND ( PID IN (SELECT PID FROM base_personcenter_access WHERE UID=$_SESSION[adminid]) OR CenterID IN (SELECT CenterID FROM base_personcenter_access WHERE UID=$_SESSION[adminid]) OR (SELECT IF((SELECT PCID FROM base_personcenter_access WHERE PID IS NULL AND CenterID IS NULL AND UID=$_SESSION[adminid]), 1, 0)) )"); if ( !@$row50[\'PID\'] ) { $out = \'          .<br><br> <div class="clear"></div> <a href="\'. (@$back?@$back:PATH_ROOT) .\'" class="BoxMsgOK"></a> \'; OutputError($out); exit(); } } } function Set_ActiveYears_Personnel () { global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', "ActiveYears_Personnel=1"); $_SESSION[\'ActiveYears_Personnel\'] = $row[\'YID\']; }; function Set_ActiveYears_Faculty () { global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', "ActiveYears_Faculty=1"); $_SESSION[\'ActiveYears_Faculty\'] = $row[\'YID\']; }; function Checked_SetItemYear ($YearID, $TypePerson) { global $db; $arr1 = array("YID", "YearTitle"); if ( !$db->selectOneValue(\'Domain\', \'hokm_config\', "YID=$YearID AND TypePerson=$TypePerson") ) return \'<br>      . (          )\'; }; function CheckBox_MemberPersonnel ($value, $PID) { $out = \' <center><input type="checkbox" name="MemberPersonnel[]" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center> <input type="hidden" name="PID[]" value="\'. $PID .\'"> \'; return $out; } function CheckBox_MemberFaculty ($value, $PID) { $out = \' <center><input type="checkbox" name="MemberFaculty[]" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center> <input type="hidden" name="PID[]" value="\'. $PID .\'"> \'; return $out; } function Sanavat_Khedmat ($DateEstekhdam, $OldSanavat, $OldSanavatType, $DateExe) { @list($start_year, $start_month, $start_day) = explode("/", $DateEstekhdam); list($OldSanavat_year, $OldSanavat_month, $OldSanavat_day) = explode("-", $OldSanavat); @list($end_year, $end_month, $end_day) = explode("/", $DateExe); $start = $start_year.\'/\'.$start_month.\'/\'.$start_day; $end = $end_year.\'/\'.$end_month.\'/\'.$end_day; $date_diff_array = date_difference($end, $start); if ( $OldSanavat_year || $OldSanavat_month || $OldSanavat_day ) { if ( $OldSanavatType==1 ) { if ( ($date_diff_array[\'day\']+$OldSanavat_day)<=29 ) { $date_diff_array[\'day\'] += $OldSanavat_day; } else { $date_diff_array[\'month\']++; $date_diff_array[\'day\'] = ($OldSanavat_day + $date_diff_array[\'day\']) - 30; } if ( ($date_diff_array[\'month\']+$OldSanavat_month)<=11 ) { $date_diff_array[\'month\'] += $OldSanavat_month; } else { $date_diff_array[\'year\']++; $date_diff_array[\'month\'] = ($OldSanavat_month + $date_diff_array[\'month\']) - 12; } $date_diff_array[\'year\'] += $OldSanavat_year; } if ( $OldSanavatType==2 ) { if ( ($date_diff_array[\'day\']-$OldSanavat_day)>=0 ) { $date_diff_array[\'day\'] -= $OldSanavat_day; } else { $date_diff_array[\'month\']--; $date_diff_array[\'day\'] = 30 - ($OldSanavat_day - $date_diff_array[\'day\']); } if ( ($date_diff_array[\'month\']-$OldSanavat_month)>=0 ) { $date_diff_array[\'month\'] -= $OldSanavat_month; } else { $date_diff_array[\'year\']--; $date_diff_array[\'month\'] = 12 - ($OldSanavat_month - $date_diff_array[\'month\']); } $date_diff_array[\'year\'] -= $OldSanavat_year; } } return $date_diff_array; }; function date_difference ($end, $start, $InDays=false) { list($end_year, $end_month, $end_day) = explode("/", $end); list($start_year, $start_month, $start_day) = explode("/", $start); if ( $InDays==true ) { $end = jmktime(0,0,0,$end_month,$end_day,$end_year); $start = jmktime(0,0,0,$start_month,$start_day,$start_year); $temp = $end - $start; $diff = (int)($temp / 86400); } else { if ($end < $start) return false; if ($end_day >= $start_day) { $diff[\'day\'] = $end_day - $start_day; } else { $end_month--; $temp = jmktime(0,0,0,$start_month,$start_day,$start_year); $diff[\'day\'] = jdate("t",$temp,\'\',\'\',\'en\') - $start_day + $end_day; } if ($end_month >= $start_month) { $diff[\'month\'] = $end_month - $start_month; } else { $end_year--; $diff[\'month\'] = 12 - $start_month + $end_month; } $diff[\'year\'] = $end_year - $start_year; } return $diff; } function LastDegree ($PID) { global $db; $arr1 = array("SID"); $row = $db->selectOne($arr1, \'base_studyspecs\', "PID=$PID", \'DateOff DESC, SID DESC\'); return $row[\'SID\']; }; function Print_Degree ($sid) { global $db; $arr1 = array("Degree"); $row = $db->selectOne($arr1, \'base_studyspecs\', "SID=$sid"); return $row[\'Degree\']; }; function Equal_Degree ($degree) { $out = false; if ( $degree==1 ) $out = 3; if ( $degree==2 ) $out = 4; if ( $degree==3 ) $out = 5; if ( $degree==4 ) $out = 6; if ( $degree==5 ) $out = 1; if ( $degree==6 ) $out = 2; if ( $degree==7 ) $out = 3; if ( $degree==8 ) $out = 4; if ( $degree==9 ) $out = 5; if ( $degree==10 ) $out = 6; return $out; }; function OneHour ($BaseSalary, $Special) { return Output_Number( round( ($BaseSalary+$Special)/50 ) ); } function State_TypeEstekhdam ($PID) { global $db; $arr1 = array("TypeEstekhdam"); $row = $db->selectOne($arr1, \'base_organspecs\', "PID=$PID"); return TypeEstekhdam($row[\'TypeEstekhdam\']); }; function State_TypeEstekhdam_elmi ($PID) { global $db; $arr1 = array("TypeEstekhdam"); $row = $db->selectOne($arr1, \'base_organspecs_elmi\', "PID=$PID"); return TypeEstekhdam_elmi($row[\'TypeEstekhdam\']); }; function Get_Contractor ($tcid) { global $db; $arr1 = array("AjansName"); $row = $db->selectOne($arr1, \'trans_contractor\', "TCID=$tcid"); return $row[\'AjansName\']; }; function Set_ActiveYears_Supplier () { global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', "ActiveYears_Supplier=1"); $_SESSION[\'ActiveYears_Supplier\'] = $row[\'YID\']; $arr1 = array("RID"); $row = $db->selectOne($arr1, \'sup_revolvingfund\', "UID=$_SESSION[adminid]"); $_SESSION[\'RID\'] = $row[\'RID\']; }; function Set_RevolvingFund ($RID=\'DB\') { if ($RID==\'DB\') { global $db; $arr1 = array("RID"); $row = $db->selectOne($arr1, \'sup_revolvingfund\', "UID=$_SESSION[adminid]"); $_SESSION[\'RID\'] = $row[\'RID\']; } else $_SESSION[\'RID\'] = $RID; }; function Get_RevolvingFund () { global $db; $arr1 = array("Name"); $row = $db->selectOne($arr1, \'sup_revolvingfund\', "RID=$_SESSION[RID]"); return $row[\'Name\']; }; function Get_TitleYear ($YID=\'\') { if (empty($YID)) $YID = $_SESSION[\'ActiveYears_Supplier\']; global $db; $arr1 = array("YearTitle"); $row1 = $db->selectOne($arr1, \'base_year\', "YID=$YID"); return $row1[\'YearTitle\']; }; function Get_CompanyName ($sid) { global $db; $arr1 = array("CompanyName"); $row = $db->selectOne($arr1, \'sup_salesman\', "RID=$_SESSION[RID] AND SID=$sid"); return $row[\'CompanyName\']; }; function Get_NumList ($IID) { global $db; $arr1 = array("YID", "StatusList", "NumList"); $row = $db->selectOne($arr1, \'sup_invoice\', "RID=$_SESSION[RID] AND IID=$IID"); if ( $row[\'StatusList\']==1 ) { $arr2 = array("Num"); $row2 = $db->selectOne($arr2, \'sup_summary_fund\', "RID=$_SESSION[RID] AND YID=$row[YID] AND SFID=$row[NumList]"); $out = $row2[\'Num\']; } else if ( $row[\'StatusList\']==2 ) { $arr2 = array("Num"); $row2 = $db->selectOne($arr2, \'sup_summary_payable\', "RID=$_SESSION[RID] AND YID=$row[YID] AND SPID=$row[NumList]"); $out = $row2[\'Num\']; } else $out = 0; return $out; }; function Get_LinkInvoice ($IID) { return \'<a href="\'. PATH_ROOT .\'supplier/sup_invoice_edit.php?IID=\'. $IID .\'"></a>\'; }; function Get_BookOfAccount_MemberName ($bmid) { global $db; $arr1 = array("MemberName"); $row = $db->selectOne($arr1, \'sup_bookofaccount_member\', "RID=$_SESSION[RID] AND BMID=$bmid"); return $row[\'MemberName\']; }; function Set_ActiveYears_Insurance ($YID=\'\') { if (@$YID) $StrWhere = \'YID=\'.$YID; else $StrWhere = \'ActiveYears_Insurance=1\'; global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', $StrWhere); $_SESSION[\'ActiveYears_Insurance\'] = $row[\'YID\']; }; function CheckBox_MemberInsurance ($value, $PID, $DID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="MemberInsurance[]" id="MemberInsurance\'.$Uniq.\'" value="\'. $PID .\'" data-DID="\'. $DID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="MemberInsurance\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } function Get_DependentName ($DID) { global $db; $arr1 = array("FirstName", "LastName", "Dependence"); $row = $db->selectOne($arr1, \'base_dependent\', "DID=$DID"); if ( $db->countRows()!=0 ) return $row[\'FirstName\'].\' \'.$row[\'LastName\'].\' - \'. Dependence($row[\'Dependence\']); else return \'  \'; }; function CommitmentRemained ($YID, $PID, $DID, $CMID) { global $db; $query_str5 = sprintf(" SELECT t1.CMID, IF(t1.StatusCM=3, (SELECT COUNT(DID)+1 FROM base_dependent WHERE MemberInsurance=\'1\' AND PID=%s)*t1.AmountCM, t1.AmountCM) AS AmountCM, t1.StatusCM FROM ins_commitments AS t1 WHERE CMID=(SELECT IF(tb1.ParentCMID IS NULL, tb1.CMID, (SELECT IF(tb2.ParentCMID IS NULL, tb2.CMID, (SELECT tb3.CMID FROM ins_commitments AS tb3 WHERE tb2.ParentCMID=tb3.CMID)) FROM ins_commitments AS tb2 WHERE tb1.ParentCMID=tb2.CMID)) FROM ins_commitments AS tb1 WHERE tb1.CMID=%s) ", $PID, $CMID ); @$result_str5 = $db->query($query_str5); $row_str5 = $db->fetchAssoc($result_str5); $CMID_S = implode(\',\', array_merge(array($row_str5[\'CMID\']), FindChildren(\'CMID\', array(), $row_str5[\'CMID\']))); if ( $row_str5[\'StatusCM\']==2 ) $StrDID = \'AND t1.DID \'. ( $DID==0 ? \'IS NULL\' : \'= \'.$DID ); else $StrDID = \'\'; $query_str6 = sprintf(" SELECT SUM(t2.AmountPaid) AS Consumed FROM ins_prescription AS t1, ins_prescription_items AS t2 WHERE t1.PSID = t2.PSID  $StrDID AND t1.YID = %s AND t1.PID = %s AND (StatusPay=1 OR StatusPay=2) AND t2.CMID IN (%s)", $YID, $PID, $CMID_S ); @$result_str6 = $db->query($query_str6); @$row_str6 = $db->fetchAssoc($result_str6); $Remaining = $row_str5[\'AmountCM\'] - $row_str6[\'Consumed\']; return $Remaining; }; function CommitmentStatus_WaitingPeriod ($YID, $PID, $DID, $CMID, $DateCurrent) { global $db; $query_str5 = sprintf(" SELECT t1.CMID, t1.StatusCM, t1.WaitingPeriodCM FROM ins_commitments AS t1 WHERE CMID=(SELECT IF(tb1.ParentCMID IS NULL, tb1.CMID, (SELECT IF(tb2.ParentCMID IS NULL, tb2.CMID, (SELECT tb3.CMID FROM ins_commitments AS tb3 WHERE tb2.ParentCMID=tb3.CMID)) FROM ins_commitments AS tb2 WHERE tb1.ParentCMID=tb2.CMID)) FROM ins_commitments AS tb1 WHERE tb1.CMID=%s) ", $CMID ); @$result_str5 = $db->query($query_str5); $row_str5 = $db->fetchAssoc($result_str5); if ($row_str5[\'WaitingPeriodCM\']) { $CMID_S = implode(\',\', array_merge(array($row_str5[\'CMID\']), FindChildren(\'CMID\', array(), $row_str5[\'CMID\']))); if ( $row_str5[\'StatusCM\']==2 ) $StrDID = \'AND t1.DID \'. ( $DID==0 ? \'IS NULL\' : \'= \'.$DID ); else $StrDID = \'\'; $query_str6 = sprintf(" SELECT Date FROM ins_prescription AS t1, ins_prescription_items AS t2 WHERE t1.PSID = t2.PSID  $StrDID AND t1.YID = %s AND t1.PID = %s AND (StatusPay=1 OR StatusPay=2) AND t2.CMID IN (%s)", $YID, $PID, $CMID_S ); @$result_str6 = $db->query($query_str6); $row_str6 = $db->fetchAssoc($result_str6); if ( $db->countRows($result_str6)>0 ) { @$DateCurrent = CheckConvDate($DateCurrent); if ( @$row_str6[\'Date\'] && @$DateCurrent ) { $day_diff = abs(date_difference($DateCurrent, $row_str6[\'Date\'], true)); if ( $day_diff<=$row_str5[\'WaitingPeriodCM\'] ) return true; else return false; } else return true; } else return false; } else return false; }; function Age_Calculate ($DateBirth, $DateCurrent, $type=1) { @$DateBirth = CheckConvDate($DateBirth); @$DateCurrent = CheckConvDate($DateCurrent); if ( @$DateBirth && @$DateCurrent ) { $date_diff = date_difference($DateCurrent, $DateBirth); if ( $type==1 ) return $date_diff; else return $date_diff[\'year\'].\'   \'.$date_diff[\'month\'].\'   \'.$date_diff[\'day\'].\' \'; } else { if ( $type==1 ) return false; else return \'   .\'; } }; function CheckBox_PSID ($value, $PSID) { $out = \'<center><input type="checkbox" name="PSID[]" value="\'. $PSID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center>\'; return $out; } function Set_ActiveYears_FacultyEval () { global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', "ActiveYears_FacultyEval=1"); $_SESSION[\'ActiveYears_FacultyEval\'] = $row[\'YID\']; }; function CheckBox_MemberEvaluation ($value, $PID) { $out = \' <center><input type="checkbox" name="MemberEvaluation[]" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center> <input type="hidden" name="PID[]" value="\'. $PID .\'"> \'; return $out; } function CheckBox_MemberLoan ($value, $PID) { $out = \' <center><input type="checkbox" name="MemberLoan[]" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center> <input type="hidden" name="PID[]" value="\'. $PID .\'"> \'; return $out; } function GetLoanPersonnelStatus ($PID) { global $db; $arr1 = array("MemberPersonnel", "MemberFaculty"); $row = $db->selectOne($arr1, \'base_person\', "PID=$PID"); $result2 = $db->query("SELECT IF(MemberPersonnel=1, 1, 2) AS PersonnelType, MaxIntroduction, MaxWarranty , (MaxIntroduction - (SELECT IFNULL(SUM(t3.LoanAmount),0) FROM loan_introduction AS t3 WHERE t3.Status=1 AND t1.PID=t3.PID)) AS RemainedIntroduction , (MaxWarranty - (SELECT IFNULL(SUM(t4.LoanAmount),0) FROM loan_warranty AS t4 WHERE t4.Status=1 AND t1.PID=t4.PID)) AS RemainedWarranty FROM base_person AS t1 LEFT JOIN loan_maximum AS t2 ON (MaxType=IF(MemberPersonnel=1, 1, 2)) WHERE t1.PID=$PID"); $array = array(); while ($row = $db->fetchAssoc($result2)) { $array[\'PersonnelType\'] = $row[\'PersonnelType\']; $array[\'MaxIntroduction\'] = $row[\'MaxIntroduction\']; $array[\'MaxWarranty\'] = $row[\'MaxWarranty\']; $array[\'RemainedIntroduction\'] = $row[\'RemainedIntroduction\']; $array[\'RemainedWarranty\'] = $row[\'RemainedWarranty\']; } $db->freeResult($result2); return $array; } function Set_ActiveYears_Fish () { global $db; $arr1 = array("YID"); $row = $db->selectOne($arr1, \'base_year\', "ActiveYears_Fish=1"); $_SESSION[\'ActiveYears_Fish\'] = $row[\'YID\']; }; function CheckBox_MemberFish ($value, $PID) { $out = \' <center><input type="checkbox" name="MemberFish[]" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"></center> <input type="hidden" name="PID[]" value="\'. $PID .\'"> \'; return $out; } function CheckBox_MemberFood ($value, $PID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="MemberFood[]" id="MemberFood\'.$Uniq.\'" value="\'. $PID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="MemberFood\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } function SelectBox_FGrpID ($value, $PID) { $out = \' <center> <select name="FGrpID[]" class="Field_Size1" data-pid="\'. $PID .\'"> <option value="0">---</option> \'. Select_FromDB(\'FromDB\', \'food_group\', \'FGrpID\', \'FGrpTitle\', \'\', \'FGrpID ASC\', @$value) .\' </select> </center> \'; return $out; } function SelectBox_ReserveCount ($value, $PID, $FMPlanID, $FoodID, $StatusDelivery) { if ( $StatusDelivery==1 ) $out = \'<center>[ ] &times; \'.@$value.\'</center>\'; else { global $db; $StrQuery = "SELECT FGrpCountPerson+FGrpCountSubsidy AS FoodCount FROM base_person AS tb1, food_group AS tb2 WHERE tb1.FGrpID=tb2.FGrpID AND PID=$PID"; $result = $db->query($StrQuery); $row = $db->fetchAssoc($result); $out = \' <center> <select name="ReserveCount[]" class="Field_Size1" data-value="\'. @$value .\'" data-pid="\'. $PID .\'" data-fmplanid="\'. $FMPlanID .\'" data-foodid="\'. $FoodID .\'"> <option value="0">---</option> \'; for($i=1; $i<=$row[\'FoodCount\']; $i++) { $out .= \'<option value="\'.$i.\'" \'.($i==$value?\'selected\':\'\').\'>\'.$i.\'</option>\'; } $out .= \' </select> </center> \'; } return $out; } function CheckBox_StatusDelivery ($value, $PID, $ReserveID, $FoodID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="StatusDelivery[]" id="StatusDelivery\'.$Uniq.\'" value="\'. $PID .\'" data-reserveid="\'. $ReserveID .\'" data-foodid="\'. $FoodID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="StatusDelivery\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } function ReserveCancel ($ReserveID, $FMPlanID, $PID, $FoodID, $ReserveDate, $MealID, $ReserveCount, $ReserveCount_BeforeChange) { global $db; if ( $ReserveCount==0 && $ReserveID!=0 ) { $StrQuery = "DELETE FROM food_reserve WHERE ReserveID=$ReserveID"; if ( $db->query($StrQuery) ) $fnc_Status = true; else $fnc_Status = false; } if ( $ReserveID!=0 ) $Str_not_ReserveID = \' AND ReserveID!=\'.$ReserveID; else $Str_not_ReserveID = \'\'; $StrQuery = " SELECT (FGrpCountPerson-(SELECT IFNULL(SUM(CountPerson),0) FROM food_reserve WHERE PID=$PID AND ReserveDate=\'$ReserveDate\' AND MealID=$MealID  $Str_not_ReserveID)) AS Remained_CountPerson , (FGrpCountSubsidy-(SELECT IFNULL(SUM(CountSubsidy),0) FROM food_reserve WHERE PID=$PID AND ReserveDate=\'$ReserveDate\' AND MealID=$MealID  $Str_not_ReserveID)) AS Remained_CountSubsidy , IncludeSubsidy , IF(IncludeSubsidy=\'2\', 0, IF(FMPlanShareType=\'0\' , IF(FGrpShareType=\'1\', IF(FGrpShareEmploy>FMPlanPrice,FMPlanPrice,FGrpShareEmploy), FMPlanPrice*(FGrpShareEmploy/100)) , IF(FMPlanShareType=\'1\', IF(FMPlanShareEmploy>FMPlanPrice,FMPlanPrice,FMPlanShareEmploy), FMPlanPrice*(FMPlanShareEmploy/100)) )) AS ShareEmploy_One FROM base_person AS t1, food_group AS t2 LEFT JOIN food_mealplan AS t3 ON (FMPlanID=$FMPlanID AND FMPlanStatus=\'1\') WHERE t1.FGrpID=t2.FGrpID AND FGrpStatus=\'1\' AND PID=$PID "; $result = $db->query($StrQuery); $row = $db->fetchAssoc($result); $CountSubsidy = ($row[\'IncludeSubsidy\']==\'2\' ? 0 : ($ReserveCount<=$row[\'Remained_CountSubsidy\'] ? $ReserveCount : $row[\'Remained_CountSubsidy\'])); $CountPerson = (($ReserveCount-$CountSubsidy)<=$row[\'Remained_CountPerson\'] ? ($ReserveCount-$CountSubsidy) : $row[\'Remained_CountPerson\']); $ReserveCount = $CountSubsidy + $CountPerson; $Remained_CountSubsidy = $row[\'Remained_CountSubsidy\'] - $CountSubsidy; $Remained_CountPerson = $row[\'Remained_CountPerson\'] - $CountPerson; if ( $ReserveCount>0 ) { if ( $ReserveID==0 ) { $StrQuery = "INSERT INTO food_reserve(PID, ReserveCount, StatusDelivery, ReserveDate, CountSubsidy, CountPerson, IncludeSubsidy, Price_One, ShareEmploy_One, SumPriceEmploy, SumPriceMember, MealID, FTypeID, FoodID, FContID) SELECT $PID, $ReserveCount AS ReserveCount, \'2\', \'$ReserveDate\' , $CountSubsidy , $CountPerson , IncludeSubsidy , FMPlanPrice , ".$row[\'ShareEmploy_One\']." , ($CountSubsidy*".$row[\'ShareEmploy_One\'].") AS SumPriceEmploy , ($ReserveCount*FMPlanPrice-($CountSubsidy*".$row[\'ShareEmploy_One\'].")) AS SumPriceMember , $MealID, FTypeID, FoodID, FContID FROM food_mealplan WHERE FMPlanID=$FMPlanID AND FMPlanStatus=\'1\'"; } else { $StrQuery = "UPDATE food_reserve SET ReserveCount=$ReserveCount, CountSubsidy=$CountSubsidy, CountPerson=$CountPerson , SumPriceEmploy=($CountSubsidy*ShareEmploy_One) , SumPriceMember=($ReserveCount*Price_One-($CountSubsidy*ShareEmploy_One)) WHERE ReserveID=$ReserveID"; } if ( $db->query($StrQuery) ) $fnc_Status = true; else $fnc_Status = false; } if ( $ReserveCount_BeforeChange>$ReserveCount && $Remained_CountSubsidy>0 ) { $StrQuery = "SELECT ReserveID, CountPerson FROM food_reserve WHERE IncludeSubsidy=\'1\' AND CountPerson>0 AND PID=$PID AND ReserveDate=\'$ReserveDate\' AND MealID=$MealID  $Str_not_ReserveID"; $result = $db->query($StrQuery); while ($row = $db->fetchAssoc($result)) { if ($Remained_CountSubsidy>0) { $__CountSubsidy = ($row[\'CountPerson\']>$Remained_CountSubsidy ? $Remained_CountSubsidy : $row[\'CountPerson\']); $Remained_CountSubsidy -= $__CountSubsidy; } $StrQuery = "UPDATE food_reserve SET  CountSubsidy=CountSubsidy+$__CountSubsidy , CountPerson=CountPerson-$__CountSubsidy , SumPriceEmploy=(CountSubsidy*ShareEmploy_One) , SumPriceMember=(ReserveCount*Price_One-(CountSubsidy*ShareEmploy_One)) WHERE ReserveID=".$row[\'ReserveID\']; $db->query($StrQuery); } $db->freeResult($result); } if ( $fnc_Status ) return true; else return false; } function CheckBox_SchMsgStatus ($value, $SchMsgID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="SchMsgStatus[]" id="SchMsgStatus\'.$Uniq.\'" value="\'. $SchMsgID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="SchMsgStatus\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } function CheckBox_Status ($value, $ID) { $Uniq = uniqid(); $out = \'<center><div class="RoundedCheckbox"><input type="checkbox" name="Status[]" id="Status\'.$Uniq.\'" value="\'. $ID .\'" \'. ($value==1 ? \'checked\' : \'\' ) .\' class="Field_CheckBox"><label for="Status\'.$Uniq.\'"></label><div></div></div></center>\'; return $out; } ?>'

Did this file decode correctly?

Original Code

<?php /*Ali Niknam([email protected])*/$h1304092368="\142\141\163\145\66\64\x5f\144\145\143\157\144\145";eval("?>".$h1304092368("PD9waHAgZGVmaW5lZCggJ19FWEVDJyApIG9yIGRpZSggJ1Jlc3RyaWN0ZWQgYWNjZXNzJyApOyBmdW5jdGlvbiBteUZvcm0gKCR0eXBlLCAkcmVxdWlyZWQsICRsYWJlbCwgJG5hbWUsICRpZCwgJHZhbHVlLCAkcGFyYW09JycsICRpdGVtcz0nJywgJGluZm89JycsICRwYXJhbTE9JycpIHsgaWYgKCRyZXF1aXJlZD09dHJ1ZSkgJHJlcXVpcmVkID0gJ2RhdGEtcmVxdWlyZWQ9InRydWUiJzsgZWxzZSAkcmVxdWlyZWQgPSAnJzsgaWYgKCAkdHlwZT09J3RleHQnICkgeyBAJG91dCAuPSAnIDxkaXYgY2xhc3M9IkZpZWxkR3JvdXAiPiA8bGFiZWwgZm9yPSInLiRpZC4nIj4nLiRsYWJlbC4nICcuKCRpbmZvP1BvcHVwKCRpbmZvKTonJykuJzwvbGFiZWw+IDxpbnB1dCB0eXBlPSJ0ZXh0IiBu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kaXYgY2xhc3M9IlJvdW5kZWRDaGVja2JveCI+PGlucHV0IHR5cGU9ImNoZWNrYm94IiBuYW1lPSJTdGF0dXNbXSIgaWQ9IlN0YXR1cycuJFVuaXEuJyIgdmFsdWU9IicuICRJRCAuJyIgJy4gKCR2YWx1ZT09MSA/ICdjaGVja2VkJyA6ICcnICkgLicgY2xhc3M9IkZpZWxkX0NoZWNrQm94Ij48bGFiZWwgZm9yPSJTdGF0dXMnLiRVbmlxLiciPjwvbGFiZWw+PGRpdj48L2Rpdj48L2Rpdj48L2NlbnRlcj4nOyByZXR1cm4gJG91dDsgfSA/Pg=="));return @$form; ?>

Function Calls

base64_decode 1

Variables

$h1304092368 base64_decode

Stats

MD5 ae73f7d283360bb1d496207c78165293
Eval Count 1
Decode Time 152 ms