private function getNewsCountBDay() { $db = gdo_db(); $users = GWF_TABLE_PREFIX . 'user'; $showbd = GWF_User::SHOW_BIRTHDAY; $time = $timet = GWF_Time::getTimeWeekStart(); $dates = array(); for ($i = 0; $i < 7; $i++) { $dates[] = date('md', $timet); $timet += GWF_Time::ONE_DAY; } $monday = $dates[0]; $sunday = $dates[6]; $query = "SELECT 1 FROM {$users} WHERE user_options&{$showbd} AND SUBSTR(user_birthdate, 5) BETWEEN {$monday} AND {$sunday}"; if (false === ($result = $db->queryFirst($query, false))) { return 0; } return 1; }