-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.php
47 lines (39 loc) · 958 Bytes
/
window.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
<?php
session_start();
if($_POST['pro']==1){
$window = 'window'. $_POST['window'];
$_SESSION[$window] = $window;
echo $_SESSION[$window];
}
if($_POST['pro']==2){
$data= (Object)array("window1"=>"","window2"=>"","window3"=>"","window4"=>"");
if(isset($_SESSION['window1'])){
$window1= $_SESSION['window1'];
$data->window1 = $window1;
}
if(isset($_SESSION['window2'])){
$window2= $_SESSION['window2'];
$data->window2 = $window2;
}
if(isset($_SESSION['window3'])){
$window3= $_SESSION['window3'];
$data->window3 = $window3;
}
if(isset($_SESSION['window4'])){
$window4= $_SESSION['window4'];
$data->window4 = $window4;
}
echo json_encode($data);
}
if($_POST['pro']=="tell1"){
$_SESSION['window1']= "";
}
if($_POST['pro']=="tell2"){
$_SESSION['window2']= "";
}
if($_POST['pro']=="tell3"){
$_SESSION['window3']= "";
}
if($_POST['pro']=="tell4"){
$_SESSION['window4']= "";
}