qiandao.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. !defined('IN_MYMPS') && exit('FORBIDDEN');
  3. require_once MYMPS_DATA . '/config.db.php';
  4. require_once MYMPS_INC . '/db.class.php';
  5. require_once MYMPS_INC . '/cache.fun.php';
  6. require_once MYMPS_INC . '/member.class.php';
  7. if (!$member_log->chk_in()) {
  8. write_msg('对不起,您还没有登录!');
  9. }
  10. $row = $db->getRow('SELECT id,score,qdtime FROM `' . $db_mymps . 'member` WHERE userid = \'' . $s_uid . '\'');
  11. $score_change = get_credit_score();
  12. $score_changer = $score_change['score']['rank']['login'];
  13. if (!empty($score_changer)) {
  14. $qdtime = GetTime($row['qdtime'], 'ymd');
  15. $nowtime = GetTime($timestamp, 'ymd');
  16. if ($qdtime != $nowtime) {
  17. if (!empty($score_changer)) {
  18. $db->query('UPDATE `' . $db_mymps . 'member` SET score = score' . $score_changer . (',qdtime=\'' . $timestamp . '\' WHERE userid = \'' . $s_uid . '\''));
  19. }
  20. $score = $db->getOne('SELECT score FROM `' . $db_mymps . 'member` WHERE userid = \'' . $s_uid . '\'');
  21. include MYMPS_ROOT . '/template/box/qiandao.html';
  22. }
  23. else {
  24. echo '<p style="font-size:12px;margin:30px 10px;">今天您已经签到过了,明天再来吧!</p>';
  25. }
  26. }
  27. $row = $score = NULL;
  28. ?>