dlinyellowstoreinfo.inc.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. global $_GPC, $_W;
  3. $action = 'start';
  4. $GLOBALS['frames'] = $this->getNaveMenu($_COOKIE['cityname'], $action);
  5. $info=pdo_get('zhtc_yellowstore',array('id'=>$_GPC['id']));
  6. //$area=pdo_getall('zhtc_area',array('uniacid'=>$_W['uniacid']));
  7. $type=pdo_getall('zhtc_yellowtype',array('uniacid'=>$_W['uniacid'],'state'=>1),array(),'','num asc');
  8. //入住类型
  9. $typein=pdo_getall('zhtc_yellowset',array('uniacid'=>$_W['uniacid']));
  10. if($info['imgs']){
  11. if(strpos($info['imgs'],',')){
  12. $imgs= explode(',',$info['imgs']);
  13. }else{
  14. $imgs=array(
  15. 0=>$info['imgs']
  16. );
  17. }
  18. }
  19. $coordinates=explode(',',$info['coordinates']);
  20. $list['coordinates']=array(
  21. 'lat'=>$coordinates['0'],
  22. 'lng'=>$coordinates['1'],
  23. );
  24. if(checksubmit('submit')){
  25. if($_GPC['imgs']){
  26. $data['imgs']=implode(",",$_GPC['imgs']);
  27. }else{
  28. $data['imgs']='';
  29. }
  30. $data['company_name']=$_GPC['company_name'];
  31. $data['company_address']=$_GPC['company_address'];
  32. $data['link_tel']=$_GPC['link_tel'];
  33. $data['logo']=$_GPC['logo'];
  34. $data['content']=$_GPC['content'];
  35. $data['coordinates']=$_GPC['op']['lat'].','.$_GPC['op']['lng'];
  36. $data['sort']=$_GPC['sort'];
  37. $data['views']=$_GPC['views'];
  38. $data['type_id']=$_GPC['type_id'];
  39. $data['type2_id']=$_GPC['type2_id'];
  40. if($_GPC['rz_type']){
  41. $data['rz_type']=$_GPC['rz_type'];
  42. $data['time_over']=2;
  43. }
  44. $data['cityname']= $_COOKIE['cityname'];
  45. $res = pdo_update('zhtc_yellowstore', $data, array('id' => $_GPC['id']));
  46. if($res){
  47. message('编辑成功',$this->createWebUrl2('dlinyellowstore',array()),'success');
  48. }else{
  49. message('编辑失败','','error');
  50. }
  51. }
  52. include $this->template('web/dlinyellowstoreinfo');