yellowstoreinfo.inc.php 1.8 KB

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