} // For display edit data if (isset($_GET['chooseedit'])) { $json = array(); $createscheduleFunction = new createscheduleFunction(); $createscheduleFunction->createscheduleid = $_POST['data_id']; $edit_data = $createscheduleFunction->createscheduleselectRecord(); while ($result = mysql_fetch_array($edit_data)) { $tmp = array('createschedule_id' => $result['createschedule_id'], 'createschedule_name' => $result['createschedule_name'], 'createschedule_testbatteryid' => $result['createscheduletestbattery_id'], 'createschedule_testbatteryname' => $result['testbattery_name'], 'createschedule_date' => $result['createschedule_date'], 'createschedule_time' => $result['createschedule_time'], 'createschedule_venue' => $result['createschedule_venue']); array_push($json, $tmp); } echo json_encode($json); } // To store edited data if (isset($_GET['editdata'])) { $createscheduleFunction = new createscheduleFunction(); $createscheduleFunction->createscheduleid = $_POST['edit_schedule_id']; $createscheduleFunction->createschedulename = $_POST['edit_schedule_name']; $createscheduleFunction->createschedule_testbatteryid = $_POST['edit_schedule_testbattery']; $createscheduleFunction->createscheduledate = $_POST['dateyear'] . '-' . $_POST['datemonth'] . '-' . $_POST['dateday']; $createscheduleFunction->createscheduletime = $_POST['edit_schedule_hour'] . ':' . $_POST['edit_schedule_minute'] . ':' . $_POST['edit_schedule_seconds']; $createscheduleFunction->createschedulevenue = $_POST['edit_schedule_venue']; $createscheduleupdate = $createscheduleFunction->createscheduleUpdate(); if ($createscheduleupdate) { $testbattery = mysql_fetch_array($createscheduleFunction->testbatterynameSelect()); echo "success#Schedule Updated#" . $_POST['edit_schedule_id'] . "#" . $_POST['edit_schedule_name'] . '#' . $testbattery['testbattery_name'] . "#" . $createscheduleFunction->createscheduledate . "#" . $createscheduleFunction->createscheduletime . '#' . $_POST['edit_schedule_venue']; } else { echo "failure#Schedule Not Updated"; } } }
<?php require_once "session.php"; require_once "header.php"; require_once "functions/create_schedule_function.php"; $createschedule = new createscheduleFunction(); ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">REPORTS</span> </div><!--end container--> <div class="container"> <div class="col-xs-12 col-md-11"> <div class="col-md-4 hidden-xs"></div> <div class="col-xs-12 col-md-7 align_margin"> <form id="report_form" name="report_form" action="reports.php" method="post"> <div class="align_margin"> <label>Select Schedule</label><br> <div class="area_scroll"> <?php $data = $createschedule->createscheduleselectfunction(); foreach ($data as $eachrecord) { ?> <div class="checkbox align_check"> <label class="remember_txt"><input type="checkbox" data-validation="checkbox_group" data-validation-qty="min1" value="<?php echo $eachrecord['createschedule_id']; ?> " name="schedul_ids[]"><?php echo $eachrecord['createschedule_name']; ?>
<?php require_once "session.php"; require_once "header.php"; require_once "functions/create_schedule_function.php"; require_once 'functions/test_battery_functions.php'; $createscheduleFunction = new createscheduleFunction(); $testbattery = new testbatteryfunction(); ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">CREATE SCHEDULE</span> </div><!--end container--> <div class="col-xs-12 col-md-11"> <div class="col-md-4 hidden-xs"></div> <div class="col-xs-12 col-md-7 align_margin"> <form name="create_schedule_form" id="createschedule_form"> <input type="hidden" class="statesid" name="edit_schedule_id"> <div class="form-group"> <label>Schedule Name</label><br> <input type="text" class="adjust_width" name="schedule_name" data-validation-error-msg="Please Enter the name of the Schedule" data-validation="required"> </div> <div class="form-group"> <label for="battey_name">Select Test Battery Name</label> <select class="form-control classic adjust_width" id="battey_name" name="schedule_testbattery" data-validation-error-msg="Please Select the name of the Test Battery Name" data-validation="required"> <option value="">Select Test Battery Name</option> <?php $query = $testbattery->testbatterySelect(); while ($row = mysql_fetch_array($query)) { ?> <option value="<?php