Hacked By AnonymousFox

Current Path : C:/AppServ/www/financial/
Upload File :
Current File : C:/AppServ/www/financial/saveedit.php

<?php 
include("lib/connect.php");
include("lib/session.php");

if($System_Session_User_ID=="") {
echo "<SCRIPT LANGUAGE=\"JavaScript\">window.location = \"index.php\";alert(\"You must Login first.\");</SCRIPT>";
 } 

 $sql="update fin_data set Egp='$Egp',Moneyco='$Moneyco',Round1='$Round1',Money1='$Money1',Round2='$Round2',Money2='$Money2',Round3='$Round3',Money3='$Money3',Namecompany='$Namecompany' where Id='$Idedit'";
$query=mysql_query($sql);

$sql="insert into fin_step values (NULL,'$Step','$No','$Detail','$Date1','$Date2','$Date3','$Comment',NOW(),'$Idedit','$System_Session_User_ID')";
$query=mysql_query($sql);

$sql="insert into fin_stepold values (NULL,'$Step','$No','$Detail','$Date1','$Date2','$Date3','$Comment',NOW(),'$Idedit','$System_Session_User_ID')";
$query=mysql_query($sql);


$sql="update fin_step set Idfin='0' where Step<$Step and Idfin='$Idedit'";
$query=mysql_query($sql);

$sql="insert into fin_data2 values (NULL,'$Datenew1','$Datenew2','$Datenew3','$Idedit')";
$query=mysql_query($sql);

      if($Step=="2"){ $go="1"; }                         
      if($Step=="3"){ $go="1"; }                          
      if($Step=="4"){ $go="1"; }                      
      if($Step=="5"){ $go="1"; }                          
     if($Step=="6"){ $go="1"; }                            
      if($Step=="7"){ $go="2";}                            
      if($Step=="11"){ $go="2"; }                           
      if($Step=="12"){ $go="2"; }    
      if($Step=="39"){ $go="2"; }     
      if($Step=="40"){ $go="2"; }     
      if($Step=="41"){ $go="2"; }                           
      if($Step=="14"){ $go="2"; }              
      if($Step=="16"){ $go="2"; }                                    
      if($Step=="17"){ $go="2"; }                            
      if($Step=="20"){ $go="2"; }                                 
      if($Step=="21"){ $go="2"; }                        
      if($Step=="23"){ $go="2"; }                                    
      if($Step=="24"){ $go="2"; }                                 
      if($Step=="25"){ $go="2"; }                                
      if($Step=="26"){ $go="2"; }                    
      if($Step=="28"){ $go="3"; }                           
      if($Step=="29"){ $go="3";}  
      if($Step=="42"){ $go="3"; }                              
      if($Step=="31"){ $go="4"; }                           
      if($Step=="32"){ $go="4"; }    
      if($Step=="43"){ $go="4"; }    
      if($Step=="44"){ $go="4"; }  

$sql_check1="select Id from namestep where  No='$Step'";
$query_check1=mysql_query($sql_check1);
$row_check1=mysql_fetch_array($query_check1);
  
$sql_check="select step2 from fin_price where  Idfin='$Idedit'";
$query_check=mysql_query($sql_check);
$num_check=mysql_num_rows($query_check);
$row_check=mysql_fetch_array($query_check);
$sql_check2="select Id from namestep where  No='$row_check[0]'";
$query_check2=mysql_query($sql_check2);
$row_check2=mysql_fetch_array($query_check2);

if($Date2!=""){

			if($num_check>0&&$row_check1[0]>$row_check2[0]){
			$sql="delete from fin_price where Idfin='$Idedit'";
			$query=mysql_query($sql);
			
			$sql="insert into fin_price values (NULL,'$Idedit','$go','$Step','')";
			$query=mysql_query($sql);
			}
}

if($Step=="26"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="28"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="29"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="42"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="31"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="32"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="43"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}
if($Step=="44"&&$Date2!=""){
$sql="update fin_data set Result='2' where Id='$Idedit'";
$query=mysql_query($sql);
}

Header("Location:editdata.php?Id=$Idedit");

?>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox