dlinaddyellowstore.inc.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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']));
  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. //var_dump( $list['coordinates']);die;
  25. if(checksubmit('submit')){
  26. if($_GPC['imgs']){
  27. $data['imgs']=implode(",",$_GPC['imgs']);
  28. }else{
  29. $data['imgs']='';
  30. }
  31. $data['company_name']=$_GPC['company_name'];
  32. $data['company_address']=$_GPC['company_address'];
  33. $data['link_tel']=$_GPC['link_tel'];
  34. $data['logo']=$_GPC['logo'];
  35. $data['content']=$_GPC['content'];
  36. $data['coordinates']=$_GPC['op']['lat'].','.$_GPC['op']['lng'];
  37. $data['sort']=$_GPC['sort'];
  38. $data['views']=$_GPC['views'];
  39. $data['rz_type']=$_GPC['rz_type'];
  40. $data['time_over']=2;
  41. $data['state']=2;
  42. $data['uniacid']=$_W['uniacid'];
  43. $data['sh_time']=time();
  44. $data['type_id']=$_GPC['type_id'];
  45. $data['type2_id']=$_GPC['type2_id'];
  46. $data['cityname']=$_COOKIE["cityname"];
  47. //查找入驻天数
  48. $days=pdo_get('zhtc_yellowset',array('id'=>$_GPC['rz_type']));
  49. $data['dq_time']=time()+$days['days']*60*60*24;
  50. $res = pdo_insert('zhtc_yellowstore', $data);
  51. if($res){
  52. message('编辑成功',$this->createWebUrl2('dlinyellowstore',array()),'success');
  53. }else{
  54. message('编辑失败','','error');
  55. }
  56. }
  57. include $this->template('web/dlinaddyellowstore');