Ejemplo n.º 1
0
     $s_procedures = toggle_all_procedures($s_procedures, 'open');
 }
 // 'Close All' button
 if (isset($_POST['acc_proc_close'])) {
     $s_procedures = toggle_all_procedures($s_procedures, 'close');
 }
 // Create button on the procedures panel
 if (isset($_POST['acc_proc_create'])) {
     $proc_add_flag = TRUE;
     $s_proceduredefs = array('source' => "CREATE PROCEDURE name ()\nRETURNS ()\nAS\nBEGIN\n\nEND!!");
 }
 // create the new procedure
 if (isset($_POST['acc_proc_create_doit'])) {
     $s_proceduredefs['source'] = get_request_data('def_proc_source');
     if (create_procedure($s_proceduredefs) == TRUE) {
         $pname = get_procedure_name($s_proceduredefs['source']);
         list($in, $out) = get_procedure_parameters($pname);
         $s_procedures[$pname] = array('name' => $pname, 'owner' => $s_login['user'], 'source' => $s_proceduredefs['source'], 'in' => $in, 'out' => $out, 'status' => 'open');
         $s_proceduredefs = array();
         $s_procedures_valid = FALSE;
     } else {
         $proc_add_flag = TRUE;
     }
 }
 // Modify button on the procedures panel
 if (isset($_POST['acc_proc_mod']) && $_POST['acc_proc_mod_name'] != '') {
     $pname = $_POST['acc_proc_mod_name'];
     if ($s_procedures[$pname]['status'] == 'close') {
         $s_procedures[$pname]['source'] = get_procedure_source($pname);
         list($in, $out) = get_procedure_parameters($pname);
         $s_procedures[$pname]['in'] = $in;
Ejemplo n.º 2
0
function get_visit($con)
{
    if (isset($_GET["addhistory"])) {
        echo '<div style="max-width:200px;  float:left;"><div data-alert class="alert-box success radius"><a href="#" class="close">&times;</a>
  Successful added!.
</div></div>';
    }
    $petId = $_GET["petId"];
    $sql3 = "SELECT * FROM `petsvisit` where petId='" . $petId . "'";
    $result = mysqli_query($con, $sql3) or die(mysqli_error($con));
    ?>
		<div class="row">
		<div class="large-6 large-centered columns">
		<?php 
    echo '<div style="position:relative;" class="panel">';
    while ($row3 = mysqli_fetch_assoc($result)) {
        $petid = $row3["petId"];
        //$petsname=$row3{"petsname"};
        $visitId = $row3["visitId"];
        $proId = $row3["proId"];
        $visitdate = $row3["visitdate"];
        echo "<p><strong>Pet ID:</strong> &nbsp" . $row3["petId"] . '<br>';
        $Pname = get_pet_name($con, $petId);
        echo "<p><strong>Pet's name:</strong> &nbsp " . $Pname . "<br>";
        //function to get the procedure if
        //get_procedure_name($con,$row3["proId"]);
        $procName = get_procedure_name($con, $proId);
        echo "<p><strong>Pet's procedure:</strong> &nbsp " . $procName . '<br>';
        //return $proId["proId"];
        //echo  ".$row3["proId"]."<br>";
        echo "<p><strong>Pet's visit date:</strong> &nbsp" . $row3["visitdate"] . "<br>";
        ?>
				<hr>
				<button onclick="goBack()">Go Back</button>

<script>
function goBack() {
    window.history.back();
}

</script>
<?php 
    }
}