ok

Mini Shell

Direktori : /home2/selectio/public_html/frames-hub/
Upload File :
Current File : /home2/selectio/public_html/frames-hub/frames-add.php

<?php include('header.php'); 

$statement = $pdo->prepare("SELECT * FROM `customer` WHERE status='1'");
$statement->execute();
$customer_dropdown = $statement->fetchAll(PDO::FETCH_ASSOC);

if(isset($_POST['frames_add_form'])) {
	$valid = 1;


    if($valid==1)
    {
    
		$statement = $pdo->prepare("INSERT INTO frames (customer_id,lens_type,date,fram_pd_first,right_sph,right_cyl,right_axis,right_add,left_sph,left_cyl,left_axis,left_add,status,frame_pd_second) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
		$statement->execute(array($_POST['customer_name'],$_POST['lens_type'],$_POST['lens_date'],$_POST['lens_pd'],$_POST['right_cus_1'],$_POST['right_cus_2'],$_POST['right_cus_3'],$_POST['right_cus_4'],$_POST['left_cus_1'],$_POST['left_cus_2'],$_POST['left_cus_3'],$_POST['left_cus_4'],1,$_POST['lens_pd_2']));
		 $id = $pdo->lastInsertId();
       
		unset($_POST['customer_name']);
		unset($_POST['lens_type']);
		unset($_POST['lens_date']);
		unset($_POST['lens_pd']);
		unset($_POST['right_cus_1']);
		unset($_POST['right_cus_2']);
		unset($_POST['right_cus_3']);
		unset($_POST['right_cus_4']);
		unset($_POST['left_cus_1']);
		unset($_POST['left_cus_2']);
		unset($_POST['left_cus_3']);
		unset($_POST['left_cus_4']);
		
		
		$url="https://selectionsilks.com/frames-hub/frames-history-print.php?id=".$id;  
        	echo ("<script LANGUAGE='JavaScript'>
            window.alert('Power Details Added Successfully');
            window.location.href='".$url."'
            </script>");
    }
	
}
?>


<style>
    @media (min-width: 1200px){
.row-cols-xl-2>* {
    flex: 0 0 auto;
    width: 33%;
}
}
#alert-info{
    background-color: #f8e5e5;
}
#note{
    font-size: 14px;
    color: red;
}
#kyc{
    font-size: 14px;
}

    @media (min-width: 1200px){
#buttonstyle {
        margin-left: 13%;
        color:white;
        font-size: 14px;
}
}
@media (min-width: 768px){
#buttonstyle {
        margin-left: 13%;
        color:white;
        font-size: 14px;
}
}


.wrapper .search {
	border: 1px solid #c8c8c8;
	overflow: hidden;
	border-radius: 25px;
	padding: 0 10px;
	margin: 15px 0 20px;
	transition: all 0.3s
}

.wrapper .search:hover,
.wrapper .search:focus-within {
	border: 1px solid transparent;
	box-shadow: 2px 5px 8px #1f1f1f10, 0px -4px 5px #1f1f1f10
}

.wrapper .search .form-control {
	box-shadow: none;
	outline: none;
	border: none
}

.wrapper .search .form-control:focus::placeholder {
	opacity: 0
}

.wrapper .accordion-button {
	font-size: 0.9rem;
	font-weight: 500
}

.wrapper .accordion-button:hover {
	background-color: #f8f8f8
}

.wrapper .accordion-button:focus {
	box-shadow: none
}

.wrapper .accordion-button::after {
	background-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #c8c8c8;
	background-position: center center;
	border-radius: 50%
}

.wrapper .accordion-button:not(.collapsed) {
	color: #000;
	background-color: #f7f7f7;
	font-weight: 600;
	border-bottom: 1px solid #ddd !important
}

.accordion-button:not(.collapsed)::after {
	border-color: #1E88E5
}

.wrapper .accordion-button.collapsed {
	border-bottom: 1px solid #ddd !important
}

.wrapper .accordion-collapse.show {
	border-bottom: 1px solid #ddd !important
}

.wrapper .accordion-collapse {
	background-color: #eaf3fa
}

.wrapper .accordion-collapse ul li {
	line-height: 2rem;
	width: 100%;
	padding: 0.5rem 1.3rem
}

.wrapper .accordion-collapse ul li:hover {
	background-color: #c9e7ff
}

.wrapper .accordion-collapse ul li a {
	text-decoration: none;
	color: #333;
	font-size: 0.85rem;
	font-weight: 400;
	display: block
}

.wrapper .accordion-collapse ul li:hover a {
	color: #222
}

@media (max-width: 777px) {
	.wrapper {
		margin: 50px 20px
	}
}

@media (max-width: 365px) {
	.wrapper {
		margin: 50px 10px
	}

	.w-75 {
		width: 90% !important
	}
}
.widgets-icons-4 {
    width: 138px;
    height: 138px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ededed;
    font-size: 27px;
    border-radius: 10px;
}
.text-secondary1{
    font-size: 22px;
    font-family: emoji;
    font-weight: bolder;
    color: black !important;
}
.font-12 {
    font-size: 12px;
}
</style>

		<div class="page-wrapper">
			<div class="page-content">
			    
			  
        			  <div class="card card-body">
            			   
        			
        				<div class="card card-body">
        				     <form method="post" enctype="multipart/form-data">
                		    <div class="row">
                			    <div class="col-md-12 col-sm-12 col-xl-12">
                			        <center><h2 style="font-family: SFProDisplay-Bold; font-size: 20px; margin-bottom: 2rem; font-weight">Create Power For Customer</h2></center>
                			    </div>
                			   
                                <div class="col=12 col-sm-12 col-md-12 col-xl-12">
                					 <div class="card radius-10 border-start border-0 border-4">
                						<div class="card-body" style="background-color: #a6c799;border-radius: 12px;box-shadow: 2px 2px 2px 2px darkgrey;">
                								<div class="col-12 col-md-12 col-lg-12">
                        						    
                    									<label for="customer_name" class="form-label required" style="color:black;">Customer Name / Mobile No</label>
        												<select name="customer_name" id="customer_name" class="form-select valid font-size12 select2" aria-invalid="false" required>
        												    <option value="">Select Customer Name / Mobile No</option>
                                    					<?php 
                                    					foreach($customer_dropdown as $customer){ ?>
                                    					    <option value="<?=$customer['id']?>" <?php if(isset($_GET['id']) && $_GET['id']==$customer['id']){echo "selected";}?>><?=$customer['cust_firstname']?> - <?=$customer['cust_phone']?></option>
                                    					    
                                    					    
                                    				<?php	}
                                    					?>
                                    					</select>
                        				    	</div><br>
                        				    	<div class="col-12 col-md-12 col-lg-12">
                        						    <label for="FisrtName" class="form-label required" style="color:black;">Lens Type</label>
                        						    <input type="text" class="form-control" id="lens_type" name="lens_type" placeholder="Lens Type" required>
                        				    	</div>
                        				    	
                        				    	<div class="row">
                        				    	    <div class="col-12 col-md-4 col-lg-4">
                        				    	        <div class="row">
                        				    	            <div class="col-12 col-md-12 col-lg-12">
                                    						    <label for="FisrtName" class="form-label required" style="color:black;">Date</label>
                                    						    <input type="date" class="form-control" id="lens_date" name="lens_date" value="<?=date('Y-m-d')?>" required>
                                    				    	</div><br>
                                    				    	<div class="col-12 col-md-12 col-lg-12">
                                    						    <label for="FisrtName" class="form-label required" style="color:black;">PD</label>
                                    						    <div class="row">
                                    						        <div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                                    						             <input type="text" class="form-control" id="lens_pd" name="lens_pd" required>
                                    						        </div>
                                    						        <div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6">
                                    						            <input type="text" class="form-control" id="lens_pd_2" name="lens_pd_2" required>
                                    						        </div>
                                    						    </div>
                                    				    	</div>
                        				    	        </div>
                        				    	    </div>
                        				    	    <div class="col-12 col-md-8 col-lg-8">
                        				    	       
                        				    	        <table style="width:100%;">
                        				    	            <tr style="background-color: burlywood;text-align: center;width:20%;">
                        				    	                <th style="padding:20px;width:2%;"></th>
                        				    	                <th style="text-align:center;font-weight:bolder;width:22%;">SPH</th>
                        				    	                <th style="text-align:center;font-weight:bolder;width:22%;">CYL</th>
                        				    	                <th style="text-align:center;font-weight:bolder;width:22%;">AXIS</th>
                        				    	                <th style="text-align:center;font-weight:bolder;width:22%;">ADD</th>
                        				    	            </tr>
                        				    	            <tr>
                        				    	                <th style="background-color: burlywood;padding: 13px;">RE</th>
                        				    	                <th><input type="number" name="right_cus_1" id="right_cus_1" step="0.25" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="right_cus_2" id="right_cus_2" step="0.25" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="right_cus_3" id="right_cus_3" min="1" max="180" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="right_cus_4" id="right_cus_4" step="0.25" min="0.75" max="3" class="form-control" style="width:100%;"></th>
                        				    	            </tr>
                        				    	            <tr>
                        				    	                <th style="background-color: burlywood;padding: 13px;">LE</th>
                        				    	                <th><input type="number" name="left_cus_1" id="left_cus_1" step="0.25" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="left_cus_2" id="left_cus_2" step="0.25" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="left_cus_3" id="left_cus_3" min="1" max="180" class="form-control" style="width:100%;"></th>
                        				    	                <th><input type="number" name="left_cus_4" id="left_cus_4" step="0.25" min="0.75" max="3" class="form-control" style="width:100%;"></th>
                        				    	            </tr>
                        				    	        </table>
                        				    	        
                        				    	    </div>
                        				    	</div>
                							
                						<!--	</div>-->
                						</div>
                					 </div>
                				</div>
                					<div class="col">
                						<center><button type="submit" class="btn btn-success px-5" name="frames_add_form">Save Details</button></center>
                					</div>
                			
                			</div>
                			</form>
                		
                		</div>
                    </div>
               
               
               
        </div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>

<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script>

    $(document).ready(function() {
        console.log("cdn link is working");
    $('.select2').select2();
});

</script> 
     

<?php include('footer.php'); ?>

Zerion Mini Shell 1.0