D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
services
/
Filename :
services-restriction.php
back
Copy
<?php include( "../include/config.php" ); include( "../include/sessionhandle.php" ); include( "../include/header.php" ); $sqlAssign = "SELECT * FROM `services_show_on_home_page`;"; $resultAssign = mysqli_query($conn, $sqlAssign); if (mysqli_num_rows($resultAssign) > 0) { while($roww = mysqli_fetch_assoc($resultAssign)) { $ser_id = $roww['id']; $ser_no_services = $roww['no_services']; } } ?> <style> #my_services ul li:nth-child(1) { background-color: #eb6a4e; } #my_services ul li:nth-child(1) a { color: #fff; } #my_services ul li:nth-child(1) a:hover { background-color: #eb6a4e; } </style> <script> window.onload = function() { document.getElementById('my_services').classList.add("active"); document.getElementById('my_services1').classList.add("in"); }; </script> <div class="small-header"> <div class="hpanel"> <div class="panel-body"> <div id="hbreadcrumb" class="pull-right"> <ol class="hbreadcrumb breadcrumb"> <li><a href="<?php echo $admin_baseurl . 'dashboard.php';?>">Dashboard</a></li> <li class="active"> <span>Services</span> </li> </ol> </div> <h2 class="font-light m-b-xs"> Services Restriction </h2> </div> </div> </div> <div class="content"> <div class="hpanel"> <div class="hpanel"> <div class="panel-heading hbuilt"> <div class="panel-tools"> <a class="showhide"><i class="fa fa-chevron-up"></i></a> <a class="fullscreen"><i class="fa fa-expand"></i></a> </div> How many Services you wanted to show on home page. </div> <div class="panel-body"> <div class="row"> <form method="post" class="form-horizontal"> <div class="form-group col-md-6"> <label>No Of Services</label> <select class="form-control" name="no_of_services" id="sel2"> <option value="<?php echo $ser_no_services;?>" selected disabled><?php echo $ser_no_services;?></option> <option value="" disabled>-- Select No Of Services --</option> <?php for ( $x = 1; $x <= 12; $x++ ) { echo "<option value='$x'> $x </option>"; } ?> </select> </div> <div class="form-group col-md-5 text-center"> <br> <input type="hidden" name="serv_ids" value="<?php echo $ser_id;?>"> <button type="submit" name="add_no_services" class="btn btn-primary">Submit</button> </div> </form> </div> <div class="row"> <div class="col-md-12 text-center bg-info"> <br><br> <?php $srno = 0; $sqlAssign1 = "SELECT * FROM `services_show_on_home_page`;"; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { while($rows = mysqli_fetch_assoc($resultAssign1)) { $s_no_services = $rows['no_services']; } } ?> <h4>You wanted to show <b class="text-danger"><?php echo $s_no_services;?></b> Services on home page.</h4> <br><br> </div> </div> </div> </div> </div> </div> <?php if ( isset( $_POST['add_no_services'] ) ) { $no_of_services = $_POST['no_of_services']; $serv_ids = $_POST['serv_ids']; $query = "UPDATE `services_show_on_home_page` SET `no_services` = '$no_of_services' WHERE `services_show_on_home_page`.`id` = '$serv_ids';"; //echo $query; die; if ( mysqli_query( $conn, $query ) ) { header( "location:". $admin_baseurl . 'services/services-restriction.php' ); } else { echo "qu faild to update data"; } mysqli_close( $conn ); } ?> <br> <?php include( '../include/footer.php' ); ?>