JezK
Edit File: license_renewal.php
<?php include('session_check.php'); include("header.php"); // include('sa_operations.php'); $operation = new sa_operations(); $linfo = $operation->get_licenseSetInfo($_GET['lcid']); /*$one = ""; $two = ""; $three = ""; $four = ""; $five = ""; $six = ""; if($linfo['modules_included']!='') { $mp_ids=explode(',',rtrim($linfo['modules_included'],',')); for($i=0;$i<count($mp_ids);$i++) { if($mp_ids[$i] == 1) { $one = "checked"; } elseif($mp_ids[$i] == 2) { $two = "checked"; } elseif($mp_ids[$i] == 3) { $three = "checked"; } elseif($mp_ids[$i] == 4) { $four = "checked"; } elseif($mp_ids[$i] == 5) { $five = "checked"; } elseif($mp_ids[$i] == 6) { $six = "checked"; } } } */ ?> <body style="overflow-x: hidden;"> <div class="row" style="margin-top:30px;"> <div class="col-md-2 text-center mx-4" style="font:Arial, Helvetica, sans-serif;font-style:normal;font-size:14px; color:#000000; font-size:1.4em;"> <i class=" fa-solid fa-pencil" title="Renewal License" style="font-size: 18px;"></i> Renewal License </div> </div> <form class="form-horizontal" method="post" action="renewlicense.php"> <div class="box-body" style="background-color:#fff; padding: 10px; font-family:Arial, Helvetica, sans-serif; font-size:13px; margin-top:40px;"> <div class="class"> <div class="form-group col-md-6 d-md-flex" style="margin-bottom:1.0%; clear:both;"> <div class="col-md-4 col-md-offset-1 text-md-center"> <b style="color:#666666;">School Name</b><span style="color:#FF0000; margin:2px; "></span> </div> <div class="col-md-7"> <input type="text" class="form-control" id="sch_name" style="height:29px;font-size:13px;" tabindex="1" readonly value="<?= $linfo['school_name']; ?>"> </div> </div> </div> <div style="clear:both;"></div> <div class="class"> <div class="form-group col-md-6 d-md-flex" style="margin-bottom:1.0%;margin-top:1%;"> <div class="col-md-4 col-md-offset-1 text-md-center"> <b style="color:#666666; ">Set of Licenses</b><span style="color:#FF0000; margin:2px;"></span> </div> <div class="col-md-7"> <input type="text" class="form-control" name="numlic" id="licset" style="height:29px;font-size:13px;" tabindex="2" readonly value="<?= $linfo['license_count']; ?>"> <input type="hidden" name="licenseref" value="<?= $_GET['lcid']; ?>"> </div> </div> </div> <div style="clear:both;"></div> <div class="class"> <div class="form-group col-md-6 d-md-flex" style="margin-bottom:1.0%;margin-top:1%"> <div class="col-md-4 col-md-offset-1 text-md-center"> <b style="color:#666666;">Duration Of Renewal</b><span style="color:#FF0000; margin:2px;">*</span> </div> <div class="col-md-7"> <select class="form-control" id="months" name="vmonths" style="height:29px; font-size:12px;" tabindex="5"> <option value='0'>--Select Duration (in months)--</option> <?php for ($i = 1; $i <= 50; $i++) { echo "<option value='" . $i . "'>" . $i . "</option>"; } ?> </select> <!-- if there is an error--> <div class="col-md-10" id="errsch_mnth" style="color:#990000;margin-left:-15px;"></div> <!--end error--> <input type="hidden" name="schid" value="<?= $linfo['school_id']; ?>"> </div> </div> </div> <!--<div class="form-group col-md-6" style="margin-bottom:1.0%; clear:both;"> <div class="col-md-4 col-md-offset-1 text-right"> <b style="color:#666666;">Modules Purchased </b><span style="color:#FF0000; margin:2px; ">*</span> </div> <div class="col-md-7"> <input type="checkbox" name="pmods[]" tabindex="6" disabled>Attendance<br> <input type="checkbox" name="pmods[]" tabindex="7" disabled>Notice Board <br > <input type="checkbox" name="pmods[]" tabindex="8" disabled>Examinations<br> <input type="checkbox" name="pmods[]" tabindex="9" disabled>Diary<br> <input type="checkbox" name="pmods[]" tabindex="10" disabled>Transport<br> <input type="checkbox" name="pmods[]" tabindex="11" disabled>Fee Payment </div> </div>--> </div> <div class="form-group"> <div class="col-md-8" align="center"> <button type="submit" class="btn custom-button-width .navbar-right" name="addsubmit" style="margin:10px; " tabindex="21" onclick="return inputvalidations()">Renew</button> <button type="button" class="btn custom-button-width .navbar-right" style="margin:10px;" tabindex="22" onclick="backtomain()">Cancel</button> </div> </div> </div> </form> <script> function backtomain() { window.location.href = "license_management.php"; } function inputvalidations() { $('#errsch_mnth').text(''); var months = document.getElementById('months').value; if (months == 0) { $('#errsch_mnth').text('Please select Duration'); $('#errsch_mnth').show(); document.getElementById('months').focus(); return false; } } </script> </body> </html>