?? ???? ???? ?? "????? ????? ??????? ?? X ???? ???????"
مرسل: الأحد مارس 22, 2009 2:12 am
?????? ?????
?? ???? ???? ???? ?? ??? ??? ????? ?? ??? ??????? ?? ?? ?? (???? 3 ?? 4 ?? 7 ) ???? ???????? ???? ????????? ??? ??? IF.....
??
??? ?? ??? ??? ????? ????? ?? ??? user reminder
http://www.phpbb.com/community/viewtopi ... &t=1069755
??? ??? ????? ???? ?? ??????? ??????? ???????? ??? ?? ?????? ?? ??????? ???? ??? ????? ?????? ?? ???? ???????
????? ?? ???? ??? ???????
????? ??? ?????? ???:( ?????? ??? ?? ??????? !!
)
?? ???? ???? ???? ?? ??? ??? ????? ?? ??? ??????? ?? ?? ?? (???? 3 ?? 4 ?? 7 ) ???? ???????? ???? ????????? ??? ??? IF.....
??
??? ?? ??? ??? ????? ????? ?? ??? user reminder
http://www.phpbb.com/community/viewtopi ... &t=1069755
??? ??? ????? ???? ?? ??????? ??????? ???????? ??? ?? ?????? ?? ??????? ???? ??? ????? ?????? ?? ???? ???????
????? ?? ???? ??? ???????
????? ??? ?????? ???:( ?????? ??? ?? ??????? !!

كود: تحديد الكل
function zero_poster($excl_user_id_ary, $excl_user_type_ary)
{
global $db, $template, $config, $user;
$time = (int) (time() - ($config['user_reminder_zero_poster_days'] * 86400));
$sql_choice = $this->build_choice('user_reminder_zero_poster');
$no_email_arry = array();
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $excl_user_id_ary, true) . '
AND ' . $db->sql_in_set('user_type', $excl_user_type_ary, true) . "
AND user_posts = 0
AND user_regdate <= " . $time .
$sql_choice . "
ORDER BY user_regdate DESC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$registered = (int) (floor((time() - $row['user_regdate']) / 86400));
// $month = floor($registered / 30);
// $day = floor($registered- ($month * 30));
if (!$row['user_allow_massemail'])
{
$no_email_arry[] = $row['user_id'];
}
$template->assign_block_vars('userrow', array(
'USERNAME' => (!$row['user_allow_massemail']) ? get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) . '<span style="color: red;"> (x)</span>' : get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USER_ID' => $row['user_id'],
// 'USER_ROW' => ( $row['user_regdate'] ) ? sprintf($user->lang['TIME_SPENT'],$month, $day) : '-',
'USER_ROW' => ( $row['user_regdate'] ) ? sprintf($user->lang['TIME_SPENT'],$registered) : '-',
'USER_POSTS' => $row['user_posts'],
'S_IS_ZERO_POSTS' => true,
'USER_REMINDER_ZERO_POSTER' => ($row['user_reminder_zero_poster']) ? $user->format_date(($row['user_reminder_zero_poster']), 'd M Y') : '-',
'USER_REMINDER_INACTIVE' => ($row['user_reminder_inactive']) ? $user->format_date(($row['user_reminder_inactive']), 'd M Y') : '-',
'USER_REMINDER_NOT_LOGGED_IN' => ($row['user_reminder_not_logged_in']) ? $user->format_date(($row['user_reminder_not_logged_in']), 'd M Y') : '-',
'USER_REMINDER_INACTIVE_STILL' => ($row['user_reminder_inactive_still']) ? $user->format_date(($row['user_reminder_inactive_still']), 'd M Y') : '-',
));
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'S_IS_ZERO_POSTS' => true,
'S_IS_RECEIVE_NO_MAILS' => sizeof($no_email_arry) ? true : false,
'L_USER_ROW' => $user->lang['USER_REGDATE'],
'L_SUBTITLE' => $user->lang['ZERO_POSTS_TITLE'],
'L_SUBTITLE_EXPLAIN' => sprintf($user->lang['ZERO_POSTS_TITLE_EXPLAIN'],$config['user_reminder_zero_poster_days']),
));
}