예제 #1
0
/**
 * あしあとを付ける
 */
function db_ashiato_insert_c_ashiato($c_member_id_to, $c_member_id_from)
{
    // 同一人物の場合は記録しない
    if ($c_member_id_to == $c_member_id_from) {
        return false;
    }
    // 一定時間以内の連続アクセスは記録しない
    $wait = date('Y-m-d H:i:s', strtotime('-5 minute'));
    $sql = 'SELECT c_ashiato_id FROM c_ashiato WHERE r_datetime > ?' . ' AND c_member_id_to = ? AND c_member_id_from = ?';
    $params = array($wait, intval($c_member_id_to), intval($c_member_id_from));
    if (db_get_one($sql, $params, 'main')) {
        return false;
    }
    // 忍び足
    if (USE_SHINOBIASHI) {
        if (db_member_is_shinobiashi($c_member_id_from)) {
            return false;
        }
    }
    $data = array('c_member_id_from' => intval($c_member_id_from), 'c_member_id_to' => intval($c_member_id_to), 'r_datetime' => db_now(), 'r_date' => db_now());
    if (!db_insert('c_ashiato', $data)) {
        return false;
    }
    if ($ashiato_mail_num = db_ashiato_ashiato_mail_num4c_member_id($c_member_id_to)) {
        //総足あと数を取得
        $ashiato_num = db_ashiato_c_ashiato_num4c_member_id($c_member_id_to);
        //あしあとお知らせメールを送る
        if ($ashiato_num == $ashiato_mail_num) {
            do_common_send_ashiato_mail($c_member_id_to, $c_member_id_from);
        }
    }
    return true;
}
예제 #2
0
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     $this->set('inc_navi', fetch_inc_navi('h'));
     $c_member = db_member_c_member4c_member_id($u);
     if ($requests['rss']) {
         $c_member['rss'] = $requests['rss'];
     }
     $this->set('password_query_list', p_common_c_password_query4null());
     $this->set('c_member', $c_member);
     $this->set('c_member_id_block', db_member_c_member_id_block4c_member_id($u));
     $this->set('daily_news_day_str', str_replace(',', '・', DAILY_NEWS_DAY));
     if (DAILY_NEWS_DAY) {
         $this->set('daily_news_day_num', count(explode(',', DAILY_NEWS_DAY)));
     } else {
         $this->set('daily_news_day_num', 0);
     }
     $this->set('OPENPNE_URL', OPENPNE_URL);
     $this->set('SNS_NAME', SNS_NAME);
     $this->set('is_shinobiashi', db_member_is_shinobiashi($u));
     $this->set('is_unused_daily_news', util_is_unused_mail('m_pc_daily_news'));
     $this->set('is_unused_ashiato', util_is_unused_mail('m_pc_ashiato'));
     $this->set('is_unused_rank_up', util_is_unused_mail('m_pc_rank_up'));
     return 'success';
 }
 function execute($requests)
 {
     $u = $GLOBALS['KTAI_C_MEMBER_ID'];
     if (!USE_SHINOBIASHI) {
         handle_kengen_error();
     }
     $c_member = db_member_c_member4c_member_id($u);
     $is_shinobiashi = db_member_is_shinobiashi($u);
     $this->set('c_member', $c_member);
     $this->set('is_shinobiashi', $is_shinobiashi);
     return 'success';
 }
예제 #4
0
 /**
  * メンバーが忍び足(あしあとをつけない)状態かどうか判定する
  *
  * @param   int $c_member_id メンバーID
  * @return  bool
  */
 function op_member_is_shinobiashi($c_member_id)
 {
     return db_member_is_shinobiashi($c_member_id);
 }