Server IP : 192.124.249.33 / Your IP : 66.248.200.33 Web Server : Apache System : Linux 141.134.66.148.host.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els6.x86_64 #1 SMP Fri Sep 13 13:42:20 UTC 2024 x86_64 User : tarangglobal ( 1001) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/tarangglobal/public_html/cyber/ |
Upload File : |
<?php require_once('pdoconfig.php'); //$usr_id=$_SESSION['poster_id']; $usr_id=$_REQUEST['uid']; $project_id=$_REQUEST['project_id']; $act=$_REQUEST['act']; $project_id=$_REQUEST['project_id']; $name=$_REQUEST['name']; $remarks=$_REQUEST['remarks']; $link=$_REQUEST['link']; $uploadresume=$_FILES["file"]["name"]; //echo $fileToUpload ; //die(); //if($active=='on'){ $aa1=1;}else{ $aa1=0;} /*if($category=='' || strlen($category)>50) { die("Something went wrong! <br> <a href='category_master.php'>Continue</a>"); }*/ if($act == "add") { /*echo "insert into aa_project_master set project_name='$name', remarks='$remark',user_id='$usr_id'"; die();*/ $sql="insert into aa_project_master set project_name=?,audio_link=?, remarks=?,user_id=?,approve=?"; $arr=array($name,$link,$remarks,$usr_id,0); $res=$action->insertp($sql,$arr); $prod_id=$res; if($res>0) { /***************Image1************************************/ if($uploadresume!='') { $file_tmp =$_FILES['file']['tmp_name']; $pos=strpos($uploadresume,"."); if($uploadresume=="") { $new_file_name=""; } else { $new_file_name="Project".'-'.$prod_id.substr($uploadresume, $pos,strlen($uploadresume)-$pos); } move_uploaded_file($file_tmp,"https://www.tarangglobal.com/wp/images/projects/".$new_file_name); //echo $new_file_name; $qry="update aa_project_master set file=? where project_id=?"; $arr=array($new_file_name,$prod_id); $action->updatep($qry,$arr); } ?> <script> alert("Data Save successfully"); window.location.href="https://www.tarangglobal.com/wp/user_project/"; </script> <?php } } else if($act == "edit") { $sql="update aa_project_master set project_name=?,audio_link=?, remarks=?,user_id=? where project_id=?"; $arr=array($name,$link,$remarks,$usr_id,$project_id); $res=$action->updatep($sql,$arr); $prod_id=$res; if($res>0) { /***************Image1************************************/ if($uploadresume!='') { $file_tmp =$_FILES['file']['tmp_name']; $pos=strpos($uploadresume,"."); if($uploadresume=="") { $new_file_name=""; } else { $new_file_name="Project".'-'.$prod_id.substr($uploadresume, $pos,strlen($uploadresume)-$pos); } move_uploaded_file($file_tmp,"https://www.tarangglobal.com/wp/images/projects/".$new_file_name); //echo $new_file_name; $qry="update aa_project_master set file=? where project_id=?"; $arr=array($new_file_name,$prod_id); $action->updatep($qry,$arr); } ?> <script> alert("Data updated successfully"); window.location.href="https://www.tarangglobal.com/wp/user_project/"; </script> <?php } } ?>Private