-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhyperactive.php
executable file
·161 lines (97 loc) · 2.62 KB
/
hyperactive.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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?
require_once "./inc/php/init.php" ;
$flag = $_REQUEST["flag"] ;
switch( $flag ) {
case "login" :
$user->login() ;
break ;
case "lookup" :
require_once "./inc/php/tiblib.php"; // array of wylie tibetan in tibetan alphabetical order
require_once "./inc/php/classes/lookup.php";
$lookup = new lookup( $_REQUEST ) ;
$lookup->search_dictionary() ;
break ;
case "new" : // new term
require_once "./inc/php/classes/term.php";
require_once "./inc/php/classes/definition.php";
$term = new term( $_REQUEST ) ;
if ( !$term->create_new() ) {
$term->show_result() ;
}
break ;
case "new_sub" : // new definition
require_once "./inc/php/classes/definition.php";
$def = new definition( $_REQUEST ) ;
if ( !$def->create_new() ) {
$def->show_result() ;
}
break ;
case "edit" : // edit definition
require_once "./inc/php/classes/definition.php";
$def = new definition( $_REQUEST ) ;
$def->edit() ;
$def->show_result() ;
break ;
case "delete_term" : // delete term
require_once "./inc/php/classes/term.php";
require_once "./inc/php/classes/definition.php";
$term = new term( $_REQUEST ) ;
if ( !$term->delete() ) {
$term->show_result() ;
}
break ;
case "delete_definition" : // delete definition
require_once "./inc/php/classes/definition.php";
$def = new definition( $_REQUEST ) ;
if ( !$def->delete() ) {
$def->show_result() ;
}
break ;
case "spotlight" :
require_once "./inc/php/classes/lookup.php";
$lookup = new lookup( $_REQUEST ) ;
$lookup->spotlight() ;
break ;
case "fmp" :
require_once "./inc/php/classes/fm.php";
$classes = get_declared_classes() ;
foreach( $classes as $class ) {
if ( stripos( $class , "db_" ) !== false ) {
$lookup = new $class( $_REQUEST ) ;
$lookup->search_fmp() ;
}
}
break ;
case "vote" :
require_once "./inc/php/classes/vote.php";
$vote = new vote( $_REQUEST ) ;
if( !$vote->cast() ) {
$vote->show_result() ;
} ;
break;
case "vote_info" :
require_once "./inc/php/classes/vote.php";
$vote = new vote( $_REQUEST ) ;
if( !$vote->show_info() ) {
$vote->show_result() ;
} ;
break;
case "ac_history" :
require_once "./inc/php/classes/history.php";
$history = new history( $_REQUEST ) ;
$history->autocomplete() ;
break;
case "ac_nickname" :
require_once "./inc/php/classes/vote_source.php";
$source = new vote_source( $_REQUEST ) ;
$source->autocomplete() ;
break;
case "source_list" :
require_once "./inc/php/classes/source.php";
$source = new source( $_REQUEST ) ;
$source->list_all("html") ;
break;
default:
break ;
}
?>