spacecp_common.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: spacecp_common.php 24550 2011-09-26 02:58:48Z chenmengshu $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. $op = empty($_GET['op'])?'':trim($_GET['op']);
  12. if($op == 'ignore') {
  13. $type = empty($_GET['type'])?'':preg_replace("/[^0-9a-zA-Z\_\-\.]/", '', $_GET['type']);
  14. if(submitcheck('ignoresubmit')) {
  15. $authorid = empty($_POST['authorid']) ? 0 : intval($_POST['authorid']);
  16. if($type) {
  17. $type_uid = $type.'|'.$authorid;
  18. if(empty($space['privacy']['filter_note']) || !is_array($space['privacy']['filter_note'])) {
  19. $space['privacy']['filter_note'] = array();
  20. }
  21. $space['privacy']['filter_note'][$type_uid] = $type_uid;
  22. privacy_update();
  23. }
  24. showmessage('do_success', dreferer(), array(), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
  25. }
  26. $formid = random(8);
  27. } elseif($op == 'getuserapp') {
  28. getuserapp();
  29. if(empty($_GET['subop'])) {
  30. $my_userapp = array();
  31. foreach($_G['my_userapp'] as $value) {
  32. if($value['allowsidenav'] && !isset($_G['cache']['userapp'][$value['appid']])) {
  33. $my_userapp[] = $value;
  34. }
  35. }
  36. } else {
  37. $my_userapp = $_G['my_menu'];
  38. }
  39. } elseif($op == 'closefeedbox') {
  40. dsetcookie('closefeedbox', 1);
  41. } elseif($op == 'modifyunitprice') {
  42. $showinfo = C::t('home_show')->fetch($_G['uid']); //DB::fetch_first("SELECT credit, unitprice FROM ".DB::table('home_show')." WHERE uid='$_G[uid]'");
  43. if(submitcheck('modifysubmit')) {
  44. $unitprice = intval($_POST['unitprice']);
  45. if($unitprice < 1) {
  46. showmessage('showcredit_error', '', array(), array('return' => 1));
  47. }
  48. $unitprice = $unitprice > $showinfo['credit'] ? $showinfo['credit'] : $unitprice;
  49. C::t('home_show')->update($_G['uid'], array('unitprice' => $unitprice));
  50. showmessage('do_success', dreferer(), array('unitprice' => $unitprice), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
  51. }
  52. }
  53. include template('home/spacecp_common');
  54. ?>