예제 #1
0
<?php

require_once "session.php";
require_once 'header.php';
require_once 'functions/parameter_unitfunction.php';
$parameterunitFunction = new parameterunitFunction();
?>
<div class="container">
	<div class="container align_center align_height">
		<span class="sports">PARAMETER UNIT</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="parameter_unit" name="parameter_unit_add">
					<div class="form-group">
						  <label for="sel1">Select Parameter Type</label>
						  <select class="form-control adjust_width classic" id="sel1" name="parametertype"  data-validation-error-msg="Please Select the Type of the Parameter" data-validation="required">
							
							<option value="">Select Parameter Type</option>
							  <?php 
$data = $parameterunitFunction->parametertypeSelect();
foreach ($data as $eachrecord) {
    ?>
							 <option value="<?php 
    echo $eachrecord['parametertype_id'];
    ?>
"><?php 
    echo $eachrecord['parametertype_name'];
    ?>
예제 #2
0
        echo 'success';
    } else {
        echo "error";
    }
}
if (isset($_GET['deletedata'])) {
    $parameterunitdel = new parameterunitFunction();
    $parameterunitdel->parameterunitid = $_POST['delete_id'];
    if ($parameterunitdel->parameterdeletefunction()) {
        echo $_POST['delete_id'];
    } else {
        echo "error";
    }
}
if (isset($_GET['getunitdata'])) {
    $parameteruniteditget = new parameterunitFunction();
    $parameteruniteditget->parameterunitid = $_POST['id'];
    $output = $parameteruniteditget->parameterunitSelectsingle();
    print json_encode($output);
}
if (isset($_GET['updateunitdata'])) {
    $parameterunitupdate = new parameterunitFunction();
    $parameterunitupdate->parameterunitid = $_POST['edit_param_unit_id'];
    $parameterunitupdate->parametertypeid = $_POST['parameter_type'];
    $parameterunitupdate->parameterunitname = $_POST['parameter_unit'];
    if ($parameterunitupdate->parameterupdatefunction()) {
        echo "success";
    } else {
        echo "error";
    }
}