/
InputNodeToPrint.php
83 lines (82 loc) · 3.38 KB
/
InputNodeToPrint.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
include './CheckForLogin/Check.php';
?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/StyleWithoutForm.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
function SetSeesionOption()
{
$("#ServiceSelection").change(function ()
{
<?php $_SESSION['ServiceSelection']?> = $("#ServiceSelection").val();
alert(<?php $_SESSION['ServiceSelection']?>);
}
}
function configurator()
{
var x = document.getElementById("ServiceSelection").value;
document.cookie="ServiceSelection="+x;
alert("ΟΚ");
window.location.href='PrintSelectedService.php';
}
</script>
<?php
// //Intialize array that have two values
// //index 1 value red
// //index 2 value orange
// $a = array(1=>"red",2=>"orange");
//
// //This function push in array $a two value
// //index 3 value blue
// //index 4 value yellow
// array_push($a,"blue","yellow");
// print_r($a);
include 'connector.php';
// echo $_SESSION['AntistoixoKoumpi']."<br>";
$description = null;
$con = new Connector();
$result = $con->prepare("SELECT value FROM services");
?>
<div id="main">
<div id="first">
<table>
<tr>
<td align="center">
<select name="ServiceSelection" id="ServiceSelection">
<?php
while($row = $result->fetch())
{
$ValueOfServices = $row['value'];
?>
<option value="<?php echo $ValueOfServices;?>"><?php echo $ValueOfServices;?></option>
<?php
}
?>
</select>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="GoMainPage" id="GoMainPage" onclick="window.location.href='index.php'" value="Αρχική">
</td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" onclick="var x = document.getElementById('ServiceSelection').value;
document.cookie='ServiceSelection='+encodeURIComponent(x);
window.location.href='PrintSelectedService.php';"
value="Εκτύπωση Διαθέσιμων θέσεων">
</td>
</tr>
</table>
</div>
</div>
</body>
</html>