$forum){ if ($vars['c'] == $forum['catid']) $arr_tmp[$id] = $forum; } $allforums = array(); $allforums = $arr_tmp; $arr_tmp = array(); } $l_v = $exbb['last_visit']; $board_data = ''; $lastcategoryplace = -1; foreach ($allforums as $id=>$forum){ if ( !defined('IS_ADMIN') ) { if ( !$inuser['private'][$id] && $forum['private'] ) continue; } $arr_tmp[$id] = $forum; } $allforums = $arr_tmp; unset($arr_tmp); foreach ($allforums as $id=>$forum) { $threads = $forum['topics']; $posts = $forum['posts']; $category = $forum['catname']; $in_cat = $forum['catid']; if ($exbb['reged']) { if ($f_readed = (isset($_COOKIE['f'.$id])) ? $_COOKIE['f'.$id] : 0) { $exbb['last_visit'] = $f_readed > $exbb['last_visit'] ? $f_readed : $exbb['last_visit']; } } $lang_moder = $modoutput = ''; if (!empty($forum['moderator'])) moderator($id,$allforums); $catrow = ($forum['catid'] != $lastcategoryplace) ? true : false; $forumname = ''.stripslashes($forum['name']).''; $forumdescription = stripslashes($forum['desc']); if (isset($forum['last_time']) && $exbb['reged']) { if ($forum['last_time'] > $exbb['last_visit']) { $folderpicture = (!empty($forum['icon'])) ? '' : ''; } else { $folderpicture = (!empty($forum['icon'])) ? '' : ''; } } else { $folderpicture = ''; $loginmessage = $lang['Marked_posts']; } $forumlastpost = ( !empty($forum['last_time']) ) ? date("d.m.Y - H:i", $forum['last_time'] + $exbb['usertime']*3600) : $lang['NA']; $lastposterfilename = $forum['last_poster']; $lastpost = ''; if (isset($forum['last_post'])) { $savet = $forum['last_post']; if (strlen($savet)>36) {$savet = substr($savet,0,35).'...';} $lastpost = ' '.$savet.''; } $private = '
'.$lastpost.'
'.$lang['Author'].': '; $private .= ( $forum['last_poster_id'] ) ? ''.$forum['last_poster'].'' : $lang['Unreg']; $lastcategoryplace = $forum['catid']; $next = next($allforums); $last = ( !$next || $next['catid'] != $forum['catid'] ) ? true : false; include ('./templates/'.$exbb['default_style'].'board_data.tpl'); } if ($exbb['wordcensor']) $board_data = bads_filter($board_data); include ('./data/boardstats.php'); whosonline($lang['ExBB_main'],true); $max_users = max_online(); $max_users[0] = intval($max_users[0]); $total_users = $guests + $members; #XXXX Users Birthday XXXXXXXXXXXXXXX $day = date("j"); $month = date("n"); $year = date("Y"); $data = ''; $headers = 'From: '.$exbb['boardname'].' <'.$exbb['adminemail'].">\n"; $headers .= 'Reply-To: '.$exbb['adminemail']."\n"; $headers .= 'Return-Path: '.$exbb['adminemail']."\n"; $headers .= "MIME-Version: 1.0\nContent-type: text/html; charset=windows-1251\nContent-Transfer-Encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\n"; $filetoopen = $exbb['home_path'].'data/birstdays.php'; $alli = get_file($filetoopen); foreach ($alli as $id=>$info) { if ($info['day'] == $day && $info['month'] == $month && $info['estat'] == false) { $ol = $year - $info['year']; $old = ($info['year'] == 'Год') ? '':' - '.$ol; $data[] = ''.$info['n'].$old.''; if ($exbb['emailbirst']) {#Если разрешена отправка e-mail сообщений, то начинаем отправку поздр. e-mail $to_bcc = $info['m']; $subject = $info['n'].$lang['Pm_title']; include($exbb['home_path'].'mods/birstday/email_birstdays.tpl'); @mail($to_bcc, $subject, $message, $headers); # sendmail($exbb['boardname'],$exbb['adminemail'],$email,$subject,$info['m']); } #Закончили отправку e-mail if($exbb['birst_pm']){ #если включена опция отправки личных поздравительных сообщений, то начинаем отправку ЛС. #Записываем новое сообщение как true $touser = getmember($id); $touser['new_pm'] = true; $filetomake = $exbb['home_path'].'members/'.$id.'.php'; save_file($filetomake,$touser); #Отправляем само сообщение. $pmid = time(); $files = $exbb['home_path'].'messages/'.$id.'-msg.php'; $hiuser = get_file($files); $filesopen = fopen($files,'w'); lock_file($filesopen); $hiuser[$pmid]['from'] = $lang['Pm_from']; $hiuser[$pmid]['title'] = $info['n'].$lang['Pm_title']; $hiuser[$pmid]['msg'] = ''.$info['n'].''.$lang['Pm_msg']; $hiuser[$pmid]['status'] = false; save_opened_file($filesopen,$hiuser); unset($hiuser); } # Закончили отправку ЛС $stats = fopen($filetoopen,'r+'); lock_file($stats); $alli[$id]['estat'] = true; save_opened_file($stats,$alli); $flag = true; } elseif($info['day'] == $day && $info['month'] == $month && $info['estat'] != false){ $ol = $year - $info['year']; $old = ($info['year'] == 'Год') ? '':' - '.$ol; $data[] = ''.$info['n'].$old.''; $flag = true; } elseif(($info['day'] != $day || $info['month'] != $month) && $info['estat'] == true){ $stats = fopen($filetoopen,'r+'); lock_file($stats); $alli[$id]['estat'] = false; save_opened_file($stats,$alli); } elseif($info['day'] != $day || $info['month'] != $month){ continue; } else{$flag = false;} } $data = implode ( ', ', $data); if($flag == false) { $data = $lang['No_birst'];} #XXXX Users Birthday XXXXXXXXXXXXXXX $online_last = sprintf($lang['online_data'],$exbb['membergone'],$total_users,$members,$guests) . ' [ '.$lang['Admin'].', '.$lang['Moderator'].' ]'; $maximum = sprintf($lang['Max_users'],$max_users[1]).date("d.m.Y H:i",$max_users[0]+$exbb['usertime']*3600); $basetimes = longdate(time() + $exbb['usertime'] * 3600); $exbb['last_visit'] = $l_v; $c = "../chat/data/online.dat"; $line=file($c); $all=count($line); for($i=0;$i<$all;$i++){ $lini=explode("¦¦",$line[$i]); $line[$i]=$lini[0]; } sort($line); $chatstats = $lang['chatstats1'] . $all. $lang['chatstats2'] . implode(", ", $line); $lastvisit = longdate($exbb['last_visit'] + $exbb['usertime'] * 3600); $link = $newmail = null; if ($inuser['new_pm']) include('./templates/'.$exbb['default_style'].'newmail.tpl'); $title_page = $exbb['boardname']; include('./templates/'.$exbb['default_style'].'all_header.tpl'); include('./templates/'.$exbb['default_style'].'logos.tpl'); include('./templates/'.$exbb['default_style'].'board_body.tpl'); include('./templates/'.$exbb['default_style'].'footer.tpl'); include('page_tail.php'); ?>