D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
franchise
/
Filename :
index.php
back
Copy
<?php include("../include/config.php"); include("../include/sessionhandle.php"); include("../include/header.php"); $sqlAssign1 = "SELECT * FROM `franchise` WHERE `franchise`.`id`='1'"; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { while($rows = mysqli_fetch_assoc($resultAssign1)) { $fid = $rows['id']; $s_keyword = $rows['meta_keywords']; $smeta_title = $rows['meta_title']; $s_description = $rows['meta_description']; $faqQuestion = $rows['faqQuestion']; $faqAnswer = $rows['faqAnswer']; $s_status = $rows['status']; }} $d_faqQuestion = explode("--",$faqQuestion); $d_faqAnswer = explode("--",$faqAnswer); $farrlength = count($d_faqQuestion); ?> <style> #dks_franchise ul li:nth-child(1) { background-color: #eb6a4e; } #dks_franchise ul li:nth-child(1) a { color: #fff; } #dks_franchise ul li:nth-child(1) a:hover { background-color: #eb6a4e; } </style> <script> window.onload = function() { document.getElementById('dks_franchise').classList.add("active"); document.getElementById('dks_franchise1').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>Franchise</span> </li> </ol> </div> <h2 class="font-light m-b-xs"> Add Franchise Details </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> Add New Franchise Details </div> <div class="panel-body"> <form method="post" action="execute.php" class="form-horizontal" enctype="multipart/form-data"> <div class="row"> <div class="form-group col-md-12"> <label>Meta Title</label> <input name="meta_title" class="form-control" placeholder="eg.Meta title... " value="<?php echo $smeta_title;?>"> </div> <div class="form-group col-md-12"> <label>Meta Keywords</label> <input name="keyword" class="form-control" placeholder="eg.Meta Keyword... " value="<?php echo $s_keyword;?>"> </div> <div class="form-group col-md-12"> <label>Meta Description</label> <input name="description" class="form-control" placeholder="eg.Meta Description .." value="<?php echo $s_description;?>"> </div> <hr> <div class="form-group col-md-12 text-center bg-info"> <p style="font-weight:600; padding:10px 0 2px">More FAQ Section <i class="fa fa-arrow-down" aria-hidden="true"></i></p> </div> <div class="form-group col-md-12 faqfield_wrapper"> <?php for($y = 0; $y < $farrlength; $y++){ $fq = $d_faqQuestion[$y]; $fans = $d_faqAnswer[$y]; ?> <div class="text-center" class="removalbe_div"> <div class="text-center"><a href="javascript:void(0);" style="margin-bottom:10px;" class="faqremove_button btn btn-danger text-center">Remove field for FAQ </a> <div class="form-group col-md-12"> <label style="font-weight:700;float: left;">Question</label> <input name="faqQuest[]" class="form-control" placeholder="More Services Title.." value="<?php echo $fq; ?>"> </div> <div class="form-group col-md-12"> <label style="font-weight:700;float: left;">Answer</label> <input type="text" value="<?php echo trim($fans); ?>" name="faqAns[]" class="form-control"> </div> </div> </div> <?php }?> </div> <div class="form-group col-md-12 text-center"> <a href="javascript:void(0);" class="faqadd_button btn btn-info" title="Add field"> Add More FAQ (<span style="color:#ffb606;" id="FaqCount"></span>)</a> </div> <hr> <div class="form-group col-md-12 text-right"> <input type="hidden" name="txtfranchiseIds" value="<?php echo $fid;?>"> <button type="submit" name="add-new-franchise" class="btn btn-primary">Submit</button> </div> </div> </form> </div> </div> </div> </div> <script> $(function() { CKEDITOR.replace('service_details', { height: 350, filebrowserUploadUrl: "<?php echo $admin_baseurl . 'services/ckupload.php'; ?>", filebrowserUploadMethod: 'form' }); }); </script> <script type="text/javascript"> $('#main_service_id').click(function() { //Get selected Country ID var main_service_id = $(this).val(); $.ajax({ type: 'POST', url: 'getsubServcies.php', data: 'main_service_id=' + main_service_id, success: function(data) { $('#sub_services_id').html(data); } }); }) </script> <script type="text/javascript"> $(document).ready(function() { $('#FaqCount').text(<?php echo $farrlength;?>); var faqmaxField = 10; //Input fields increment limitation var faqaddButton = $('.faqadd_button'); //Add button selector var faqwrapper = $('.faqfield_wrapper'); //Input field wrapper var faqfieldHTML = '<div class="text-center"><a href="javascript:void(0);" style="margin-bottom:10px;" class="faqremove_button btn btn-danger text-center">Remove field for FAQ </a><div class="form-group col-md-12"><label style="font-weight:700;float:left;">More Question</label><input name="faqQuest[]" class="form-control" placeholder="More Question .."></div><div class="form-group col-md-12"><label style="font-weight:700;float:left;">Answer</label><textarea class="textarea form-control" name="faqAns[]" placeholder="Answer..." rows="2"></textarea></div></div>'; //New input field html var faqx = <?php echo $farrlength;?>; //Initial field counter is 1 //Once add button is clicked $(faqaddButton).click(function() { //Check maximum number of input fields if (faqx < faqmaxField) { faqx++; //Increment field counter $(faqwrapper).append(faqfieldHTML); //Add field html $('#FaqCount').text(faqx); } if (faqx == 10) { alert("Reached maximum attempts count."); } }); //Once remove button is clicked $(faqwrapper).on('click', '.faqremove_button', function(e) { e.preventDefault(); $(this).parent('div').remove(); //Remove field html faqx--; //Decrement field counter $('#FaqCount').text(faqx); }); }); </script> <br> <?php include('../include/footer.php'); ?>