upgrade.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. !defined('IN_MYMPS') && exit('FORBIDDEN');
  3. if (empty($id)) {
  4. exit('<center style=\'margin:20px; text-align:left; line-height:23px; color:#585858; font-size:12px\'>无效的分类信息主题!</center>');
  5. }
  6. require_once MYMPS_DATA . '/config.db.php';
  7. require_once MYMPS_INC . '/db.class.php';
  8. require_once MYMPS_DATA . '/info.level.inc.php';
  9. require_once MYMPS_INC . '/member.class.php';
  10. $log = $member_log->chk_in();
  11. if ($ac == 'actionupgrade') {
  12. define('MEMBERDIR', MYMPS_ROOT . '/member');
  13. $where = ' WHERE userid = \'' . $s_uid . '\'';
  14. $id = intval($id);
  15. $catid = intval($catid);
  16. $upgrade_time = intval($upgrade_time);
  17. $upgrade_type = trim($upgrade_type);
  18. $iftop = intval($iftop);
  19. $iflisttop = intval($iflisttop);
  20. $ifindextop = intval($ifindextop);
  21. $money_own = $db->getOne('SELECT money_own FROM `' . $db_mymps . 'member` WHERE userid = \'' . $s_uid . '\'');
  22. include MYMPS_ROOT . '/member/include/inc_info.php';
  23. }
  24. else {
  25. $row = $db->getRow('SELECT title,ismember,userid,catid,upgrade_type,upgrade_type_index,upgrade_type_list FROM `' . $db_mymps . 'information` WHERE id = \'' . $id . '\' AND info_level != 0');
  26. if (!$row) {
  27. echo '<center style=\'margin:25px; text-align:left; line-height:28px; color:#585858; font-size:14px;font-family:microsoft yahei;\'>置顶失败,该信息不存在或者未通过审核!</center>';
  28. }
  29. else {
  30. if ($row['ismember'] == 1 && $log && $s_uid == $row['userid']) {
  31. $money = $member_log->get_info();
  32. $money = $money['money_own'];
  33. $catid = $row['catid'];
  34. include MYMPS_ROOT . '/template/box/' . $part . '.html';
  35. }
  36. else {
  37. if ($row['ismember'] == 1 && $log && $s_uid != $row['userid']) {
  38. echo '<center style=\'margin:25px; text-align:left; line-height:28px; color:#585858; font-size:14px;font-family:microsoft yahei;\'>置顶失败,该信息主题不是您发布的!</center>';
  39. }
  40. else {
  41. if ($row['ismember'] == 1 && !$log) {
  42. @include MYMPS_DATA . '/caches/authcodesettings.php';
  43. $authcodesettings = $data;
  44. $data = NULL;
  45. $catid = $row['catid'];
  46. include MYMPS_ROOT . '/template/box/login.html';
  47. $authcodesettings = NULL;
  48. }
  49. else if ($row['ismember'] != 1) {
  50. echo '<center style=\'margin:25px; text-align:left; line-height:28px; color:#585858; font-size:14px;font-family:microsoft yahei;\'>置顶失败,游客发布的信息不能进行置顶操作!</center>';
  51. }
  52. }
  53. }
  54. }
  55. }
  56. $row = $log = $action = NULL;
  57. ?>