peiz.inc.php
1.46 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
<?php
global $_GPC, $_W;
// $action = 'ad';
// $title = $this->actions_titles[$action];
$GLOBALS['frames'] = $this->getMainMenu();
$item=pdo_get('cjdc_system',array('uniacid'=>$_W['uniacid']));
if(checksubmit('submit')){
$data['appid']=trim($_GPC['appid']);
$data['appsecret']=trim($_GPC['appsecret']);
$data['uniacid']=trim($_W['uniacid']);
$data['map_key']=trim($_GPC['map_key']);
if($_GPC['map_key']==''){
message('腾讯地图key不能为空!','','error');
}
if($_GPC['appid']==''){
message('小程序appid不能为空!','','error');
}
if($_GPC['appsecret']==''){
message('小程序appsecret不能为空!','','error');
}
if($_GPC['id']==''){
$res=pdo_insert('cjdc_system',$data);
if($res){
message('添加成功',$this->createWebUrl('peiz',array()),'success');
}else{
message('添加失败','','error');
}
}else{
$res = pdo_update('cjdc_system', $data, array('id' => $_GPC['id']));
if($res){
message('编辑成功',$this->createWebUrl('peiz',array()),'success');
}else{
message('编辑失败','','error');
}
}
}
include $this->template('web/peiz');