-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_side.php
More file actions
145 lines (142 loc) · 4.81 KB
/
Copy path_side.php
File metadata and controls
145 lines (142 loc) · 4.81 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<link rel="stylesheet" type="text/css" href="css/boxstyle.css">
<link rel="stylesheet" type="text/css" href="core/css/mystyle.css"/>
<link rel="stylesheet" type="text/css" href="core/fancyapps/source/jquery.fancybox.css" media="screen" />
<script type="text/javascript" src="core/js/jquery.min-1.8.3.js"></script>
<script src="core/js/jquery-1.9.1.js"></script>
<script src="core/js/jquery-2.0.0.min.js"></script>
<script type="text/javascript" src="core/fancyapps/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="core/fancyapps/source/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
function addFood() {
$.fancybox.open({
href : 'admin/food/addMul.php',
type : 'iframe',
width : 550,
height : 600,
fitToView : false,
autoSize : false,
padding: 5,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
afterClose : function() {
window.location.reload();
}
});
}
function showProfile() {
$.fancybox.open({
href : 'member/show_profile.php',
type : 'iframe',
width : 550,
height : 600,
fitToView : false,
autoSize : true,
padding: 5,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
afterClose : function() {
window.location.reload();
}
});
}
function addShop() {
$.fancybox.open({
href : 'admin/shop/addMul.php',
type : 'iframe',
width : 610,
height : 475,
fitToView : true,
autoSize : true,
padding: 5,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
afterClose : function() {
window.location.reload();
}
});
}
</script>
<? if ( !authenIdUser()) { ?>
<div class="form1" style="float:none">
<div class="formtitle">Login</div>
<form action="login.php?ref=<?=$_SERVER['REQUEST_URI']?>" method="post">
<div class="form_login">
<input name="username" type="text" class="logUsername" id="username" placeholder="Username" required="required">
<input type="password" name="password" placeholder="Password" class="logPassword" required="required">
<br>
<br>
<a href="forgetPassword.php">Forgot password.</a> <br>
<br>
</div>
<div class="buttons">
<input class="orangebutton" type="submit" value="Login" />
<a href="register.php">
<button class="greybutton" type="button">Register</button>
</a> </div>
</form>
</div>
<? } else { ?>
<div class="form1">
<div class="formtitle">User</div>
<p><br>
Welcome :
<?=$_SESSION["NAME"]?></p>
<ul>
<li><a href="member.php">ข้อมูลส่วนตัว</a></li>
<li><a href="member_myfood.php">อาหารของฉัน</a></li>
<li><a href="member_favorite.php">อาหารที่ชอบ</a></li>
<li><a href="member_comments.php">คอมเม้นท์</a></li>
<li><a href="javascript:addFood();">เพิ่มอาหาร</a></li>
<li><a href="javascript:addShop();">เพิ่มร้านค้า</a></li>
</ul>
<div class="buttons"> <a href="logout.php?ref=<?=$_SERVER['REQUEST_URI']?>">
<button class="orangebutton" >Logout</button>
</a> </div>
</div>
<? } ?>
<?
if (!endsWith($_SERVER['PHP_SELF'],'search.php')){ ?>
<div class="form1" style="float:none">
<div class="formtitle">Search</div>
<form action="search.php" method="post">
<div style="margin-left:15px;"><br />
<label>ชื่ออาหาร
<input name="name" type="text" autofocus="autofocus" class="input" id="name" tabindex="1" autocomplete="on" value="<?=$_POST['foodname']?>" size="32" style="margin-bottom:15px;" /></label>
<label>ประเภทอาหาร
<select class="labelF combobox" id="foodtype" name="foodtype" >
<option value="" selected="selected"> - ประเภทอาหาร - </option>
<? echo optionFoodType($_POST['foodtype']);?>
</select></label>
<br />
<br />
</div>
<div class="buttons">
<input name="fsearch" type="hidden" id="fsearch" value="1" />
<input class="orangebutton" type="submit" value="ค้นหา" />
</div>
</form>
</div>
<link rel="stylesheet" type="text/css" href="core/css/jquery-ui.css">
<script src="core/js/jquery-ui-1.10.3.js"></script>
<script src="core/js/combobox.js"></script>
<script type="text/javascript">
$( ".combobox" ).combobox();
</script>
<? } ?>
<?
if ($_SESSION['USER_LEVEL']==1) {
?>
<div class="form1">
<div class="formtitle">Admin</div>
<ul>
<li><a href="admin.php">Manage</a><br>
</li>
</ul>
</div>
<? } ?>