<?php require_once "session.php"; require_once "header.php"; require_once 'functions/range_function.php'; require_once "functions/test_battery_functions.php"; require_once "functions/category_function.php"; require_once "functions/test_functions.php"; $rangeFunction = new rangeFunction(); $testbatteryfunction = new testbatteryfunction(); $categoryfunction = new categoryfunction(); $testfunction = new testfunction(); ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">RANGE</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 name="range_form" id="range_form_id"> <div class="form-group"> <label for="sel1">Select Test Battery Names</label> <select class="form-control adjust_width classic" id="sel1" name="range_testbattery" data-validation-error-msg="Please Select the Name of Test Battery " data-validation="required"> <option value="">Select Test Battery Names</option> <?php $query = $testbatteryfunction->testbatterySelect(); while ($row = mysql_fetch_array($query)) { ?> <option value="<?php
} if (isset($_POST['parameter_update'])) { include "../dbconnect.php"; $parameter_id = $_POST['parameter_update']; $testid = $_POST['test_update_id']; $parameter_name = $_POST['parameter_name1']; $paramtype = $_POST['type1']; $paramunit = $_POST['unit1']; $paramformat = $_POST['format1']; $test_name = $_POST['test_name']; mysql_query("update wc_test set test_name ='{$test_name}' where test_id = {$testid} ") or die(mysql_error()); mysql_query("update wc_test_attribute set test_parameter_name ='{$parameter_name}',test_parameter_type ='{$paramtype}',test_parameter_unit='{$paramunit}',test_parameter_format ='{$paramformat}' where test_attribute_id = {$parameter_id} ") or die(mysql_error()); header('Location:../test.php?update=true'); } if (isset($_GET['gettestdata'])) { include "../dbconnect.php"; $testattrid = $_POST['id']; $sql = mysql_query("SELECT * FROM wc_test_attribute INNER JOIN wc_test ON wc_test_attribute.test_id = wc_test.test_id where test_attribute_id='{$testattrid}'") or die(mysql_error()); $res = mysql_fetch_assoc($sql); print json_encode($res); } if (isset($_GET['deletedata'])) { include "../dbconnect.php"; $test = new testfunction(); $test->testid = $_POST['delete_id']; if ($test->testdeletefunction()) { echo $_POST['delete_id']; } else { echo "error"; } }
<?php require_once "session.php"; require_once "functions/sports_function.php"; require_once "functions/category_function.php"; require_once "functions/test_functions.php"; require_once "functions/test_battery_functions.php"; require_once "header.php"; $test_battery = new testbatteryfunction(); $sports = new sportsfunction(); $category = new categoryfunction(); $test = new testfunction(); $url = $_SERVER['PHP_SELF']; if (isset($_GET['update_success'])) { echo "<script>alert('Test Battery update successfully');var url ='" . $url . "'; window.location = url ;</script>"; } if (isset($_GET['insert_success'])) { echo "<script>alert('Test Battery inserted successfully');var url ='" . $url . "'; window.location = url ;</script>"; } if (isset($_GET['duplicate'])) { echo "<script>alert('Test Battery already exist!');var url ='" . $url . "'; window.location = url ;</script>"; } ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">TEST BATTERY</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">
<?php require_once "session.php"; require_once "header.php"; require_once "functions/test_functions.php"; $obj = new testfunction(); $url = $_SERVER['PHP_SELF']; if (isset($_GET['insert'])) { echo "<script>alert('Test inserted successfully!');var url ='" . $url . "'; window.location = url ;</script>"; } if (isset($_GET['update'])) { echo "<script>alert('Test updated successfully!');var url ='" . $url . "'; window.location = url ;</script>"; } if (isset($_GET['insert_error'])) { echo "<script>alert('Test already exist!');var url ='" . $url . "'; window.location = url ;</script>"; } ?> <div class="container"> <div class="container align_center align_height"> <span class="sports">TEST</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="test_form" action="functions/test_functions.php" method="post"> <div class="form-group"> <label>Enter Test Name</label><br> <input type="text" class="adjust_width" name="test_name" data-validation-error-msg="Please Enter the Test Name" data-validation="required"> </div> <div class="parameter_holder1">