Просмотр файла eforum25/index.php

Размер файла: 3.41Kb
  1. <?php
  2. include "config.php";
  3. include "incl/head.inc";
  4. if(count($forum_name)<2||count($forum_data)<2||count($forum_desc)<2){redirect('main.php');}
  5. ?><title><?php print $lang[2];?></title>
  6. </head><body><?php include "incl/cust-top.inc";?>
  7. <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="q">
  8. <table width="100%" border="0" cellspacing="1" cellpadding="<?php print $cellpadding;?>">
  9. <tr class="c"><td colspan="5"><table width="100%" cellpadding="2" cellspacing="0"><tr><td nowrap="nowrap"><span class="c"><a href="#" id="lnk" style="color:#ffffff;text-decoration:none" onmouseover="start_impress();return true" onmouseout="stop_impress();return true" onclick="window.location='index.php';return false"><?php print $lang[2];?></a></span></td><td align="right" nowrap="nowrap">&nbsp;</td></tr></table></td></tr>
  10. <tr class="z"><td class="f" width="5%"></td><td class="f" width="65%" nowrap="nowrap">&nbsp;</td><td class="f" width="20%" nowrap="nowrap">&nbsp;<?php print $lang[24];?>&nbsp;</td><td class="f" width="5%" nowrap="nowrap">&nbsp;<?php print $lang[21];?>&nbsp;</td><td class="f" width="5%" nowrap="nowrap">&nbsp;<?php print $lang[25];?>&nbsp;</td></tr>
  11. <?php
  12. $total_posts=0;$total_topics=0;
  13.  
  14. for($i=0;$i<count($forum_data);$i++){
  15. $pic_number=mt_rand(1,7);
  16. $log="$forum_data[$i]/gshow";
  17.  
  18. if(is_dir($forum_data[$i])){
  19. $posts=0;$topics=0;$last=' ';
  20.  
  21. if(is_file($log)){
  22.  
  23. $fs=open_file($log);
  24. $fs=explode("\n",$fs);
  25.  
  26. for($j=0;$j<count($fs);$j++){
  27. if(isset($fs[$j])&&strlen($fs[$j])>9){
  28. $topics+=1;
  29. $row=explode(":|:",$fs[$j]);
  30. if($j==0){$last=$row[1];}
  31. settype($row[5],"integer");
  32. settype($row[6],"integer");
  33. $posts+=$row[5];
  34. }}}
  35.  
  36. $total_posts=$total_posts+$posts;
  37. $total_topics=$total_topics+$topics;
  38.  
  39. if(!strstr($last,' ')){$show_last=time_offset($last);}else{$show_last=$last;}
  40. print "<tr class=\"$row_bg\">";
  41. $forum_desc[$i]="<div class=\"s\">$forum_desc[$i]</div>";
  42. print "<td><img src=\"pics/t$pic_number.gif\" $size_img[2] alt=\"\" hspace=\"2\" vspace=\"2\" /></td>";
  43. print "<td><a href=\"main.php?f=$i\"><b>$forum_name[$i]</b></a>$forum_desc[$i]</td>";
  44. print "<td class=\"s\" nowrap=\"nowrap\">$show_last</td><td class=\"s\">$topics</td><td class=\"s\">$posts</td>";
  45. print "</tr>";switch_row_bg();
  46. }}
  47.  
  48. if(isset($memname)&&isset($mempass)){
  49. $login_logout=$lang[68];$is_member='a';}
  50. else{$login_logout=$lang[67];$is_member='b';}
  51.  
  52. print "<tr class=\"$row_bg\"><td colspan=\"2\" class=\"r\">&nbsp;<a href=\"#\" style=\"text-decoration:none\" onclick=\"yy=window.open('offset.php?f=$f','offs','width=220,height=400,resizable=1');yy.focus();return false\" title=\"$lang[72]\">$show_time</a></td>";
  53. print "<td class=\"r\" align=\"center\" nowrap=\"nowrap\"><a href=\"#\" onclick=\"zz=window.open('join.php','join','width=310,height=300,resizable=1');zz.focus();return false\" title=\"$lang[60]\"><img src=\"pics/log.gif\" width=\"24\" border=\"0\" height=\"14\" vspace=\"2\" hspace=\"3\" alt=\"$lang[60]\" /></a> <a href=\"#\" onclick=\"zz=window.open('log.php?f=$f','log','width=310,height=300,resizable=1');zz.focus();return false\" title=\"$login_logout\"><img src=\"pics/ot$is_member.gif\" border=\"0\" width=\"22\" height=\"13\" vspace=\"2\" hspace=\"3\" alt=\"$login_logout\" /></a></td>";
  54. print "<td class=\"r\">$total_topics</td><td class=\"r\">$total_posts</td></tr>";
  55. ?></table></td></tr></table>
  56. <?php include "incl/clrs.inc";?><br clear="all" />
  57. <?php include "incl/cust-bot.inc";?>
  58. </body></html>