admin_app.htm
12.3 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
{template header}
<script src="js/common.js" type="text/javascript"></script>
<script type="text/javascript">
var apps = new Array();
var run = 0;
function testlink() {
if(apps[run]) {
$('status_' + apps[run]).innerHTML = '{lang app_link}';
$('link_' + apps[run]).src = $('link_' + apps[run]).getAttribute('testlink') + '&sid=$sid';
}
run++;
}
window.onload = testlink;
</script>
<div class="container">
<!--{if $a == 'ls'}-->
<h3 class="marginbot">{lang app_list}<a href="admin.php?m=app&a=add" class="sgbtn">{lang app_add}</a></h3>
<!--{if !$status}-->
<div class="note fixwidthdec">
<p class="i">{lang app_list_tips}</p>
</div>
<!--{elseif $status == '2'}-->
<div class="correctmsg"><p>{lang app_list_updated}</p></div>
<!--{/if}-->
<div class="mainbox">
<!--{if $applist}-->
<form action="admin.php?m=app&a=ls" method="post">
<input type="hidden" name="formhash" value="{FORMHASH}">
<table class="datalist fixwidth" onmouseover="addMouseEvent(this);">
<tr>
<th nowrap="nowrap"><input type="checkbox" name="chkall" id="chkall" onclick="checkall('delete[]')" class="checkbox" /><label for="chkall">{lang app_delete}</label></th>
<th nowrap="nowrap">{lang app_id}</th>
<th nowrap="nowrap">{lang app_name}</th>
<th nowrap="nowrap">{lang app_url}</th>
<th nowrap="nowrap">{lang app_linkstatus}</th>
<th nowrap="nowrap">{lang app_detail}</th>
</tr>
<!--{eval $i = 0;}-->
<!--{loop $applist $app}-->
<tr>
<td width="50"><input type="checkbox" name="delete[]" value="$app[appid]" class="checkbox" /></td>
<td width="35">$app[appid]</td>
<td><a href="admin.php?m=app&a=detail&appid=$app[appid]"><strong>$app[name]</strong></a></td>
<td><a href="$app[url]" target="_blank">$app[url]</a></td>
<td width="90"><div id="status_$app[appid]"></div><script id="link_$app[appid]" testlink="admin.php?m=app&a=ping&inajax=1&url={eval echo urlencode($app['url']);}&ip={eval echo urlencode($app['ip']);}&appid=$app[appid]&random={eval echo rand()}"></script><script>apps[$i] = '$app[appid]';</script></td>
<td width="40"><a href="admin.php?m=app&a=detail&appid=$app[appid]">{lang app_edit}</a></td>
</tr>
<!--{eval $i++}-->
<!--{/loop}-->
<tr class="nobg">
<td colspan="9"><input type="submit" value="{lang submit}" class="btn" /></td>
</tr>
</table>
<div class="margintop"></div>
</form>
<!--{else}-->
<div class="note">
<p class="i">{lang list_empty}</p>
</div>
<!--{/if}-->
</div>
<!--{elseif $a == 'add'}-->
<h3 class="marginbot">{lang app_add}<a href="admin.php?m=app&a=ls" class="sgbtn">{lang app_list_return}</a></h3>
<div class="mainbox">
<table class="opt">
<tr>
<th>{lang app_install_type}:</th>
</tr>
<tr>
<td>
<input type="radio" name="installtype" class="radio" checked="checked" onclick="$('url').style.display='none';$('custom').style.display='';" />{lang app_install_by_custom}
<input type="radio" name="installtype" class="radio" onclick="$('url').style.display='';$('custom').style.display='none';" />{lang app_install_by_url}
</td>
</tr>
</table>
<div id="url" style="display:none;">
<form method="post" action="" target="_blank" onsubmit="document.appform.action=document.appform.appurl.value;" name="appform">
<table class="opt">
<tr>
<th>{lang app_install_url}:</th>
</tr>
<tr>
<td><input type="text" name="appurl" size="50" value="http://domainname/install/index.php" style="width:300px;" /></td>
</tr>
</table>
<div class="opt">
<input type="hidden" name="ucapi" value="{UC_API}" />
<input type="hidden" name="ucfounderpw" value="$md5ucfounderpw" />
<input type="submit" name="installsubmit" value="{lang app_install_submit}" class="btn" />
</div>
</form>
</div>
<div id="custom">
<form action="admin.php?m=app&a=add" method="post">
<input type="hidden" name="formhash" value="{FORMHASH}">
<table class="opt">
<tr>
<th colspan="2">{lang app_type}:</th>
</tr>
<tr>
<td>
<select name="type">
<!--{loop $typelist $typeid $typename}-->
<option value="$typeid"> $typename </option>
<!--{/loop}-->
</select>
</td>
<td></td>
</tr>
<tr>
<th colspan="2">{lang app_name}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="name" value="" /></td>
<td>{lang app_name_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_url}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="url" value="" /></td>
<td>{lang app_url_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_ip}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="ip" value="" /></td>
<td>{lang app_ip_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_key}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="authkey" value="" /></td>
<td>{lang app_key_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_path}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="apppath" value="" />
</td>
<td>{lang app_path_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_viewpro_url}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="viewprourl" value="" />
</td>
<td>{lang app_viewpro_url_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_api_filename}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="apifilename" value="uc.php" />
</td>
<td>{lang app_api_filename_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_tagtemplates}:</th>
</tr>
<tr>
<td><textarea class="area" name="tagtemplates"></textarea></td>
<td valign="top">{lang app_tagtemplates_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_tagfields}:</th>
</tr>
<tr>
<td><textarea class="area" name="tagfields">$tagtemplates[fields]</textarea></td>
<td valign="top">{lang app_tagfields_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_login}:</th>
</tr>
<tr>
<td>
<input type="radio" class="radio" id="yes" name="synlogin" value="1" /><label for="yes">{lang yes}</label>
<input type="radio" class="radio" id="no" name="synlogin" value="0" checked="checked" /><label for="no">{lang no}</label>
</td>
<td>{lang app_login_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_recvnote}:</th>
</tr>
<tr>
<td>
<input type="radio" class="radio" id="yes" name="recvnote" value="1"/><label for="yes">{lang yes}</label>
<input type="radio" class="radio" id="no" name="recvnote" value="0" checked="checked" /><label for="no">{lang no}</label>
</td>
<td></td>
</tr>
</table>
<div class="opt"><input type="submit" name="submit" value=" {lang submit} " class="btn" tabindex="3" /></div>
</form>
</div>
</div>
<!--{else}-->
<h3 class="marginbot">{lang app_setting}<a href="admin.php?m=app&a=ls" class="sgbtn">{lang app_list_return}</a></h3>
<!--{if $updated}-->
<div class="correctmsg"><p>{lang update_succeed}</p></div>
<!--{elseif $addapp}-->
<div class="correctmsg"><p>{lang app_add_succeed}</p></div>
<!--{/if}-->
<div class="mainbox">
<form action="admin.php?m=app&a=detail&appid=$appid" method="post">
<input type="hidden" name="formhash" value="{FORMHASH}">
<table class="opt">
<tr>
<th colspan="2">{lang app_id}: $appid</th>
</tr>
<tr>
<th colspan="2">{lang app_type}:</th>
</tr>
<tr>
<td>
<select name="type">
<!--{loop $typelist $typeid $typename}-->
<option value="$typeid" {if $typeid == $type}selected="selected"{/if}> $typename </option>
<!--{/loop}-->
</select>
</td>
<td></td>
</tr>
<tr>
<th colspan="2">{lang app_name}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="name" value="$name" /></td>
<td>{lang app_name_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_url}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="url" value="$url" /></td>
<td>{lang app_url_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_extra_url}:</th>
</tr>
<tr>
<td><textarea name="extraurl" class="area">$extraurl</textarea></td>
<td>{lang app_extra_url_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_ip}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="ip" value="$ip" /></td>
<td>{lang app_ip_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_key}:</th>
</tr>
<tr>
<td><input type="text" class="txt" name="authkey" value="$authkey" /></td>
<td>{lang app_key_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_path}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="apppath" value="$apppath" />
</td>
<td>{lang app_path_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_viewpro_url}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="viewprourl" value="$viewprourl" />
</td>
<td>{lang app_viewpro_url_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_api_filename}:</th>
</tr>
<tr>
<td>
<input type="text" class="txt" name="apifilename" value="$apifilename" />
</td>
<td>{lang app_api_filename_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_tagtemplates}:</th>
</tr>
<tr>
<td><textarea class="area" name="tagtemplates">$tagtemplates[template]</textarea></td>
<td valign="top">{lang app_tagtemplates_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_tagfields}:</th>
</tr>
<tr>
<td><textarea class="area" name="tagfields">$tagtemplates[fields]</textarea></td>
<td valign="top">{lang app_tagfields_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_login}:</th>
</tr>
<tr>
<td>
<input type="radio" class="radio" id="yes" name="synlogin" value="1" $synlogin[1] /><label for="yes">{lang yes}</label>
<input type="radio" class="radio" id="no" name="synlogin" value="0" $synlogin[0] /><label for="no">{lang no}</label>
</td>
<td>{lang app_login_comment}</td>
</tr>
<tr>
<th colspan="2">{lang app_recvnote}:</th>
</tr>
<tr>
<td>
<input type="radio" class="radio" id="yes" name="recvnote" value="1" $recvnotechecked[1] /><label for="yes">{lang yes}</label>
<input type="radio" class="radio" id="no" name="recvnote" value="0" $recvnotechecked[0] /><label for="no">{lang no}</label>
</td>
<td></td>
</tr>
</table>
<div class="opt"><input type="submit" name="submit" value=" {lang submit} " class="btn" tabindex="3" /></div>
<!--{if $isfounder}-->
<table class="opt">
<tr>
<th colspan="2">{lang app_code}:</th>
</tr>
<tr>
<th>
<textarea class="area" onFocus="this.select()">
define('UC_CONNECT', 'mysql');
define('UC_DBHOST', '{UC_DBHOST}');
define('UC_DBUSER', '{UC_DBUSER}');
define('UC_DBPW', '{UC_DBPW}');
define('UC_DBNAME', '{UC_DBNAME}');
define('UC_DBCHARSET', '{UC_DBCHARSET}');
define('UC_DBTABLEPRE', '`{UC_DBNAME}`.{UC_DBTABLEPRE}');
define('UC_DBCONNECT', '0');
define('UC_KEY', '$authkey');
define('UC_API', '{UC_API}');
define('UC_CHARSET', '{UC_CHARSET}');
define('UC_IP', '');
define('UC_APPID', '$appid');
define('UC_PPP', '20');
</textarea>
</th>
<td>{lang app_code_comment}</td>
</tr>
</table>
<!--{/if}-->
</form>
</div>
<!--{/if}-->
</div>
{template footer}