//-*- C++ -*- /* ******************************************************************** ** ** Copyright (C) 1995-2000 Michael Oertel ** ** Copyright (C) 2000- PHPOpenChat Development Team ** ** http://www.ortelius.de/phpopenchat/ ** ** ** ** This program is free software. You can redistribute it and/or modify ** ** it under the terms of the PHPOpenChat License Version 1.0 ** ** ** ** This program is distributed in the hope that it will be useful, ** ** but WITHOUT ANY WARRANTY, without even the implied warranty of ** ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** ** ** ** You should have received a copy of the PHPOpenChat License ** ** along with this program. ** ** ******************************************************************** */ /* * Include some default values */ include("defaults_inc.php"); /* * Open a database connection * The following include returns a database handle */ include ("connect_db_inc.php"); $db_handle=connect_db($DATABASEHOST,$DATABASEUSER,$DATABASEPASSWD); if(!$db_handle){ exit; } if($menu=="register"){ $show_title = $REGISTER_TITLE; $show_info = $MAIN_INFO_REGISTER; } if($menu=="userprofile"){ $show_title = $MY_PROFILE; $show_info = $MAIN_INFO_PROFILE; } if($menu=="chatmail"){ $show_title = $CHATMAIL; if($ENABLE_SESSION){ $show_info = '< '.$INBOX.' > '; $show_info .= '< '.$WRITE_MAIL.' > '; $show_info .= '< '.$SENT_MAIL.' >'; }else{ $show_info = '< '.$INBOX.' > '; $show_info .= '< '.$WRITE_MAIL.' > '; $show_info .= '< '.$SENT_MAIL.' >'; } } if($menu=="invite"){ $show_title = $IGNORE_INVITE; $show_info = $MAIN_INFO_INVITE; } if($menu=="friends"){ $show_title = $NOTIFY; $show_info = $MAIN_INFO_FRIENDS; } if($menu=="toplist"){ $show_title = $TOPLIST; $show_info = $MAIN_INFO_TOPLIST; } if($menu=="whoisonline"){ $show_title = $WHOISONLINE; $num = mysql_result(mysql_query("SELECT count(*) AS count FROM chat",$db_handle),0,"count"); if ($num>0) { if ($num==1){ $show_info = $WHOISONLINE_NUM_ONE.' '; }else{ $show_info = $WHOISONLINE_NUM_MORE.' '; } $show_info .= ''.$num.' '.$WHOISONLINE_IN_CHAT.' '; if($ENABLE_USERPAGES){ $show_info .= ''.$MAIN_INFO_CLICK_UP.''; } }else{ $show_info = $WHOISONLINE_NUM_MORE.' 0 '.$WHOISONLINE_IN_CHAT.'.'; } } if($menu=="forum"){ $show_title = $FORUM['title']; $show_info = $MAIN_INFO_FORUM; } if($menu=="help"){ $show_title = $HELP; $show_info = $MAIN_INFO_HELP; } if($menu=="halloffame"){ $show_title = 'Ruhmeshalle'; $show_info = 'Unsere wahren Chat-Champions!'; } if($menu=="forgotpwd"){ $show_title = $FORGOTPWD; $show_info = $MAIN_INFO_FORGOTPWD; } ?>
|
| |