Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/www/b2bflight.com/B2BFlight/project/dashboard/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/www/b2bflight.com/B2BFlight/project/dashboard/temparory_credit.php

<?php
	require_once('lib/functions.php');
	$db		=	new class_functions();
	
	$flag	=	0;

	$photo 	  	= "";
	
    if(isset($_SESSION['current_login_admin'])) 
    {
        $current_login_admin=$_SESSION['current_login_admin'];
    }	

            $photo="";

            if (isset($_POST['submit_btn'])) {

                $agent_id       = $_POST['agent_id'];
                $payment_method = $_POST['payment_method'];
                $message        = $_POST['message'];
                $status         = "Active";
                $amount         = $_POST['amount'];
                $admin_id       = $current_login_admin;

              function generateRandomString($length = 5) 
                {
                     $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
                     $charactersLength = strlen($characters);
                     $randomString = '';
                     for ($i = 0; $i < $length; $i++) 
                     {
                        $randomString .= $characters[rand(0, $charactersLength - 1)];
                     }
                     return $randomString;
                  }
                              
                  $valid_formats = array("jpg","png","gif","bmp","jpeg","pdf","mp4","JPEG","JPG","BMP","PNG","GIF","PDF","MP4");
                  
                  if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST")
                  { 
                     $name              =   $_FILES['photo']['name'];
                     $size              =   $_FILES['photo']['size'];
                  
                     if(strlen($name))
                        {               
                           list($txt, $ext) = explode(".", $name);
                           
                           if(in_array($ext,$valid_formats))
                           {
                              $current_random_string = generateRandomString();
                              
                              $photo = $name."-".$current_random_string.".".strtolower($ext);
                              
                              $tmp = $_FILES['photo']['tmp_name'];
                              
                              $img_Dir = "file_photo/";
                              
                              if(!file_exists($img_Dir))
                              {
                                 mkdir($img_Dir);
                              }
                              
                              if(move_uploaded_file($tmp,$img_Dir.$photo))
                              {
                              }
                              else
                              {
                                 $image_error   =   "failed" ;
                                 $flag              =   1;
                              } 
                           }
                           else
                           {
                              $image_error  = "Invalid file format";
                              $flag             =   1;  
                           }    
                        }   
                    }
    
                    if ($db->insert_upload_request_for_temp_credit($agent_id, $payment_method, $photo, $message, $status, $amount, $admin_id)) 
                    {
                        $flag = 1; 

                          $db->update_recharge_amount($amount, $agent_id);
                    } 
                    
                    else 
                    {
                        $flag = 2;    
                    }
                }
            

?>
<!doctype html>
<html lang="en" dir="ltr">
  <head>
   <?php
		require_once('header-common.php');
   ?>
  </head>
  <body class="  ">
    <!-- loader Start -->
    <div id="loading">
      <div class="loader simple-loader">
          <div class="loader-body"></div>
      </div>    </div>
    <!-- loader END -->
    
    <aside class="sidebar sidebar-default sidebar-white sidebar-base navs-rounded-all ">
        <div class="sidebar-header d-flex align-items-center justify-content-start">
            <a href="index.php" class="navbar-brand">
				<img src="images/<?php echo $logo; ?>" class="software_logo" style="height:90px; width:220px;" />
            </a>
            <div class="sidebar-toggle" data-toggle="sidebar" data-active="true">
                <i class="icon">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M4.25 12.2744L19.25 12.2744" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
                        <path d="M10.2998 18.2988L4.2498 12.2748L10.2998 6.24976" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
                    </svg>
                </i>
            </div>
        </div>
        
		<?php
		require_once('left-side.php');
	?>
		<div class="sidebar-footer"></div>
    </aside>   
	<main class="main-content">
    	<?php
			require_once('navbar.php');
		?>
	  
      <div class="conatiner-fluid content-inner mt-n5 py-0">
<div class="row">
    <div class="col-sm-12">
        <div class="card">
		
			<?php
				if($flag ==1)
				{
			?>
				<div class="mb-3 alert alert-left alert-success alert-dismissible fade show" role="alert" style="width:80%; margin:auto; margin-top:25px;">
					<span>Temporary Credit Added Successfully</span>
					<button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
				</div>
			<?php
				}
				else if($flag==2)
				{
			?>
				<div class="mb-3 alert alert-left alert-danger alert-dismissible fade show" role="alert" style="width:80%; margin:auto; margin-top:25px;">
                    <span> Recharge Upload Request Failed to Add</span>
                    <button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
			<?php
				}
				else if($flag ==3)
				{
			?>
				<div class="mb-3 alert alert-left alert-success alert-dismissible fade show" role="alert" style="width:80%; margin:auto; margin-top:25px;">
					<span> Recharge Upload Request Deleted Successfully</span>
					<button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
				</div>
			<?php
				}
			?>
			
		
            <div class="card-header d-flex justify-content-between flex-wrap">
                <div class="header-title">
                    <h4 class="card-title mb-0">Add Temporary Credit</h4>
                </div>
				 <div class="card-body">
                           <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
                              <div class="row">
                               	<div class="col-lg-2">
                                    <div class="form-group">
									<label class="form-label">Select Agent</label>
                                    <select name="agent_id" class="form-control">	
                                          <option value="Select">Select</option>
                                              <?php
                                              $data = array();
                                              $data = $db->get_all_register();
                                              $counter = 1;
                                              if(!empty($data))
                                              {
                                                foreach($data as $record)
                                                {
                                                  $phone_number       = $record[3];
                                                  $full_name = $record[2];      
                                             
                                        ?>
                                            <option value="<?php echo $phone_number; ?>"><?php echo $full_name; ?></option>
                                            <?php
                                                }
                                              }
                                            ?>
                    
                                          </select> 
                                    </div>
                                 </div> 
								 
                               
                                 <div class="col-lg-2">
                                    <div class="form-group">
                                       <label for="last-name" class="form-label">Amount</label>
                                       <input type="number" name="amount" class="form-control" id="last-name" placeholder=" " required />
                                    </div>
                                 </div>
                                 <!-- <div class="col-lg-3">
                                    <div class="form-group">
                                       <label for="email" class="form-label">Reference Number</label>
                                       <input type="number" name="reference_no" class="form-control" id="email" placeholder=" " required />
                                    </div>
                                 </div> -->
                                 <div class="col-lg-2">
                                    <div class="form-group">
                                    <label class="form-label">Payment Method </label>
                                    <select name="payment_method" class="form-control user_measurement">
									   <option value="bank_transition">Bank Transtion</option>
									   <option value="IMPS">IMPS</option>
									   <option value="NEFT">NEFT</option>
									      <option value="RTGS">RTGS</option>
										     <option value="cash_deposite">Cash Deposite</option>

                                    </select>
                                    </div>
                                 </div>	
                                 <div class="col-lg-2">
                                    <div class="form-group">
                                       <label for="password" class="form-label">Attachment</label>
                                       <input type="file" class="form-control" name="photo"  placeholder=" "  />
                                    </div>
                                 </div>

                                 <div class="col-lg-3">
                                    <div class="form-group">
                                       <label for="confirm-password" class="form-label">Messgae</label>
                                       <input type="text" name="message" class="form-control" id="confirm-password" placeholder=" " required />
                                    </div>
                                 </div>
                                <!--  <div class="col-lg-3">
                                    <div class="form-group">
                                       <label for="confirm-password" class="form-label">others 1</label>
                                       <input type="text" name="others_1" class="form-control" id="confirm-password" placeholder=" " required />
                                    </div>
                                 </div>
								  <div class="col-lg-3">
                                    <div class="form-group">
                                       <label for="confirm-password" class="form-label">others 2</label>
                                       <input type="text" name="others_2" class="form-control" id="confirm-password" placeholder=" " required />
                                    </div>
                                 </div>
								  <div class="col-lg-3">
                                    <div class="form-group">
                                       <label for="confirm-password" class="form-label">others 3</label>
                                       <input type="text" name="others_3" class="form-control" id="confirm-password" placeholder=" " req 	uired />
                                    </div>
                                 </div>
                              </div> -->
                              <div class="d-flex justify-content-center">
                                 <button type="submit" value="submit" name="submit_btn" class="btn btn-primary">Upload Request</button>
                              </div>
							  
							  <br />
							</form>
                </div>
            </div>
            </div>
	</div>
</div>
      </div>
    
    <!-- Library Bundle Script -->
    <script src="../assets/js/core/libs.min.js"></script>
    
    <!-- External Library Bundle Script -->
    <script src="../assets/js/core/external.min.js"></script>
    
    <!-- Widgetchart Script -->
    <script src="../assets/js/charts/widgetcharts.js"></script>
    
    <!-- mapchart Script -->
    <script src="../assets/js/charts/vectore-chart.js"></script>
    <script src="../assets/js/charts/dashboard.js" ></script>
    
    <!-- fslightbox Script -->
    <script src="../assets/js/plugins/fslightbox.js"></script>
    
    <!-- Settings Script -->
    <script src="../assets/js/plugins/setting.js"></script>
    
    <!-- Slider-tab Script -->
    <script src="../assets/js/plugins/slider-tabs.js"></script>
    
    <!-- Form Wizard Script -->
    <script src="../assets/js/plugins/form-wizard.js"></script>
    
    <!-- AOS Animation Plugin-->
    <script src="../assets/vendor/aos/dist/aos.js"></script>
    
    <!-- App Script -->
    <script src="../assets/js/hope-ui.js" defer></script>
     <style>
	.sidebar.sidebar-default .nav-link:not(.static-item).active , .sidebar.sidebar-default .nav-link:not(.static-item).active, .sidebar.sidebar-default .nav-link:not(.static-item)[aria-expanded=true]
	{
		background-color:#FE6600 !important;
	}
	</style>
  </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