dlingoodsinfo.inc.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. global $_GPC, $_W;
  3. $action = 'start';
  4. $GLOBALS['frames'] = $this->getNaveMenu($_COOKIE['cityname'], $action);
  5. $info=pdo_get('zhtc_goods',array('id'=>$_GPC['id']));
  6. if($info['imgs']){
  7. if(strpos($info['imgs'],',')){
  8. $imgs= explode(',',$info['imgs']);
  9. }else{
  10. $imgs=array(
  11. 0=>$info['imgs']
  12. );
  13. }
  14. }
  15. if($info['lb_imgs']){
  16. if(strpos($info['lb_imgs'],',')){
  17. $lb_imgs= explode(',',$info['lb_imgs']);
  18. }else{
  19. $lb_imgs=array(
  20. 0=>$info['lb_imgs']
  21. );
  22. }
  23. }
  24. if(checksubmit('submit')){
  25. if($_GPC['imgs']){
  26. $data['imgs']=implode(",",$_GPC['imgs']);
  27. }else{
  28. $data['imgs']='';
  29. }
  30. if($_GPC['lb_imgs']){
  31. $data['lb_imgs']=implode(",",$_GPC['lb_imgs']);
  32. }else{
  33. $data['lb_imgs']='';
  34. }
  35. $data['goods_name']=$_GPC['goods_name'];
  36. $data['goods_cost']=$_GPC['goods_cost'];
  37. $data['freight']=$_GPC['freight'];
  38. $data['delivery']=$_GPC['delivery'];
  39. $data['quality']=$_GPC['quality'];
  40. $data['free']=$_GPC['free'];
  41. $data['all_day']=$_GPC['all_day'];
  42. $data['service']=$_GPC['service'];
  43. $data['refund']=$_GPC['refund'];
  44. $data['weeks']=$_GPC['weeks'];
  45. $res = pdo_update('zhtc_goods', $data, array('id' => $_GPC['id']));
  46. if($res){
  47. message('编辑成功',$this->createWebUrl2('dlingoods',array()),'success');
  48. }else{
  49. message('编辑失败','','error');
  50. }
  51. }
  52. include $this->template('web/dlingoodsinfo');