-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
98 lines (88 loc) · 2.89 KB
/
index.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
session_start();
error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE);
require("header.php");
// require_once("environmentVar.php");
// require_once("bakehelp.php");
?>
<div data-role="page" id="page1">
<div data-role="header"><a href='#' data-role='button' data-rel='back'>返回</a><h1>面包师助手</h1><a href='index.php' data-role='button'>首页</a></div>
<div data-role="content">
<?php
// echo "loginSuccess: ".$_SESSION["loginSuccess"]; // 测试
if(!isset($_SESSION["loginSuccess"])){
// echo "loginSuccess: ".$_SESSION["loginSuccess"]; // 测试
echo "<script>location='login.php';</script>";
}
if (!isset($_REQUEST["action"])) {
$action="none";
}else{
$action=$_REQUEST["action"];
}
if ($action=="addNew") {
require_once("addRecipes.php");
showAddForm();
}else if ($action=="upsert") {
require_once("addRecipes.php");
addRecipes();
} else if ($action=="showDetail"){
require_once("showDetail.php");
showDetail();
} else if($action=="showSonRecipes"){
require_once("showSonRecipes.php");
showSonRecipes();
}else if($action=="saveSonR"){
require_once("showDetail.php");
saveSonR();
} else if ($action=="showReqDetail"){
require_once("showReqDetail.php");
showReqDetail();
} else if($action=="delR"){
require_once("deleteRecipe.php");
dummyDelR($_REQUEST["id"]);
} else if($action=="deleteR") {
require_once("deleteRecipe.php");
deleteR($_REQUEST["id"]);
} else if($action=="showRecycleBin"){
require_once("showRecycleBin.php");
if(isset($_REQUEST["delAll"]) && $_REQUEST["delAll"]==1){
require_once("recycleBinEmpty.php");
recycleBinEmpty();
}
showRecycleBin();
} else if ($action=="deleteRR") {
require_once("delReqRecipe.php");
deleteRR($_REQUEST["id"],$_REQUEST["reqsum"]);
} else if($action=="help"){
require_once("help.php");
showHelp();
} else if($action=="showMHelp"){
require_once("mobileHelp.php");
showHelp();
}else if($action=="lianxi"){
require_once("contact.php");
showContact();
} else if($action=="revert"){
require_once("revert.php");
revert($_REQUEST["id"]);
} else{
require_once("showRecipes.php");
showRecipes();
print("<li>
<a href='index.php?action=showRecycleBin' data-role='button' data-ajax='false' class='prompt'>查看垃圾筒</a>
</li></ul>");
}
?>
</div>
<div data-role="footer">
<div data-role='controlgroup' data-type='horizontal'>
<a href='exit.php' data-role='button' data-ajax='false'>退出</a>
<a href='queryUnit.php' target='_blank' data-role='button' data-ajax='false'>单位转换</a>
<a href='index.php?action=help' data-role='button' data-ajax='false'>帮助</a>
<a href='index.php?action=lianxi' data-role='button' data-ajax='false'>联系我们</a>
</div>
</div>
</div>
<?php require("footer.php"); ?>
</body>
</html>