Ergebnis 1 bis 2 von 2

Thema: chat fehler script (Warning)

  1. #1
    Youngster
    Registriert seit
    28.08.2007
    Beiträge
    15
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard chat fehler script (Warning)

    Hallo Leute,
    habe nochmal ein problem:
    wo ist da der fehler:

    Code:
    Warning: main(defaults_inc.php) [function.main]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 29
    
    Warning: main() [function.include]: Failed opening 'defaults_inc.php' for inclusion (include_path='.:') in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 29
    
    Warning: main(connect_db_inc.php) [function.main]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 36
    
    Warning: main() [function.include]: Failed opening 'connect_db_inc.php' for inclusion (include_path='.:') in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 36
    
    Fatal error: Call to undefined function: connect_db() in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 37

    index.php
    Code:
    <?//-*- C++ -*-
    function randomint&#40;$max&#41; &#123; 
        static $startseed = 0; 
        if &#40;!$startseed&#41; &#123;
            $startseed = &#40;double&#41;microtime&#40;&#41;*getrandmax&#40;&#41;; 
            srand&#40;$startseed&#41;;
        &#125; 
        return &#40;rand&#40;&#41;%$max&#41;;
    &#125; 
    
    /* 
     * Include some default values
     */
    include&#40;"defaults_inc.php"&#41;;
    Error_Reporting&#40;7&#41;;
    
    /*
     * Open a database connection
     * The following include returns a database handle
     */
    include &#40;"connect_db_inc.php"&#41;;
    $db_handle=connect_db&#40;$localhost,$theclasses,$theclasses&#41;;
    if&#40;$db_handle<1&#41;&#123;
      exit;
    &#125;
    include &#40;"channels_inc.php"&#41;;
    if&#40;$HTTP_POST_VARS&#91;"nick"&#93;&#41;&#123;
      if&#40;$ENABLE_SESSION&#41;&#123;@session_destroy&#40;&#41;;&#125;
    	include&#40;"write_line_inc.php"&#41;;
    	include &#40;"login_inc.php"&#41;;
    	$return = user_login&#40;$HTTP_POST_VARS&#91;"nick"&#93;,$HTTP_POST_VARS&#91;"theclasses"&#93;,"",$HTTP_POST_VARS&#91;"entry"&#93;,$db_handle&#41;;
    	if&#40;$return == TRUE&#41;&#123;
    		if&#40;$ENABLE_SESSION&#41;&#123;
    			$nick = $HTTP_POST_VARS&#91;"nick"&#93;;
    			$pruef=Crypt&#40;$nick,$salt_nick&#41;;
    			$entry=$HTTP_POST_VARS&#91;"entry"&#93;;
          		$ii=0;
          		session_register&#40;'pruef','nick','entry','vip','moderator','is_vip','is_como','is_moderator_for','ii','lastRow','BROWSER_NAME','salt_nick'&#41;;
          		header&#40;'Status&#58; 301'&#41;;
    		    header&#40;"Location&#58; frame_set.".$FILE_EXTENSION."?".session_name&#40;&#41;."=".session_id&#40;&#41;&#41;;
          		exit;
    		&#125;else&#123;
    			$nick = $HTTP_POST_VARS&#91;"nick"&#93;;
    			$pruef=Crypt&#40;$nick,$salt_nick&#41;;
    			$entry=$HTTP_POST_VARS&#91;"entry"&#93;;
    		      header&#40;'Status&#58; 301'&#41;;
    			header&#40;"Location&#58; frame_set.".$FILE_EXTENSION."?nick=".urlencode&#40;$nick&#41;."&pruef=".urlencode&#40;$pruef&#41;."&entry=".urlencode&#40;$entry&#41;&#41;;
    			exit;
    		&#125;
    	&#125;
    &#125;
    
    
    $REMOTE_USER=strip_tags&#40;$PHPOPENCHAT_USER&#41;;//cookie        
    if&#40;$PHPOPENCHAT_USER&#41;&#123;
    	$date = date&#40;"H"&#41;;
    	if &#40;$date >= 5&#41; &#123;  $gruss = $GREETINGS&#91;1&#93;; &#125;
    	if &#40;$date >= 12&#41; &#123; $gruss = $GREETINGS&#91;2&#93;; &#125;
    	if &#40;$date >= 14&#41; &#123; $gruss = $GREETINGS&#91;3&#93;; &#125;
    	if &#40;$date >= 18&#41; &#123; $gruss = $GREETINGS&#91;4&#93;; &#125;
    	if &#40;$date >= 22&#41; &#123; $gruss = $GREETINGS&#91;5&#93;; &#125;
    	switch &#40;randomint&#40;3&#41;&#41; &#123;
    	  case 0&#58;
    	    $hello_message = $COME_IN;
    	    break;
    	  case 1&#58;
    	    $hello_message =  $TELL_US;
    	    break;
    	  case 2&#58;
    	    $hello_message =  $WHATS_UP;
    	    break;
    	  default&#58;
    	    $hello_message =  $CHAT_WITH_US;
    	  &#125;
    	&#125;else&#123;
      $entrylink = "<H1><A HREF=\"frame_set.$FILE_EXTENSION\" TARGET=_top>$I_WANT_TO_CHAT!</A></H1>";
      &#125;
    $num_reg_chatters = mysql_result&#40;mysql_query&#40;"SELECT count&#40;Nick&#41; AS count FROM chat_data",$db_handle&#41;,0,"count"&#41;;
    
    //count of chatters in the last 24 hours
    $num_last24h_chatters = mysql_result&#40;mysql_query&#40;"SELECT count&#40;Nick&#41; AS count FROM chat_data WHERE Zeit>&#40;UNIX_TIMESTAMP&#40;&#41;-&#40;60*60*24&#41;&#41;",$db_handle&#41;,0,"count"&#41;;
    
    /** Loesche alle Teilnehmer aus der Tabelle der Telnehmer, die 10 Minuten nix gesagt haben  **/
    $result=mysql_query&#40;"DELETE FROM chat WHERE Zeit<&#40;UNIX_TIMESTAMP&#40;&#41;-&#40;10*60&#41;&#41;",$db_handle&#41;;
    $num=mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat",$db_handle&#41;,0,"count"&#41;;
    if &#40;$num>0&#41; &#123;
      $online_users  = ''.$num.'';
      $online_table  = '<P ALIGN=CENTER>';
      $online_table .= '<TABLE BORDER=0 WIDTH=100%>';
      $online_table .= '<TR><TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>';
      $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>';
      $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>';
      $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>';
      $raumresult=mysql_query&#40;"SELECT DISTINCT Raum FROM chat ORDER BY Raum",$db_handle&#41;;
      $i=0;
      $smileydir="images/chatter/";
      while&#40;$row=mysql_fetch_object&#40;$raumresult&#41;&#41;&#123;
        $raum=$row->Raum;
        $result=mysql_query&#40;'SELECT Nick FROM chat WHERE Raum="'.$raum.'" ORDER BY Nick'&#41;;
        while&#40;$nickrow=mysql_fetch_object&#40;$result&#41;&#41;&#123;
          if&#40;$i % 4 ==0&#41;&#123;$online_table .= "</TR>\n<TR>";&#125;
          $online_table .= '<TD BGCOLOR="#a0FFa0">';
          $nickname=$nickrow->Nick;
          if&#40;file_exists&#40;$smileydir.strtolower&#40;str_replace&#40;" ","_",$nickname&#41;&#41;.".gif"&#41;&#41;&#123;
            $online_table .= "<IMG WIDTH=16 HIGHT=16 SRC=\"".$smileydir.strtolower&#40;str_replace&#40;"%20","_",str_replace&#40;"+","_",urlencode&#40;$nickname&#41;&#41;&#41;&#41;.".gif\">";
          &#125;else&#123;
            $online_table .= "<IMG WIDTH=16 HIGHT=1 SRC=\"images/dot_clear.gif\">";
          &#125;
          if&#40;mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM paten WHERE Nick='$nickname'",$db_handle&#41;,0,"count"&#41;&#41;&#123;$color="#ff0000";&#125;else&#123;$color="#000000";&#125;
          if&#40;$PHPOPENCHAT_USER && mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat_notify WHERE Nick='$PHPOPENCHAT_USER' AND Friend='$nickname'",$db_handle&#41;,0,"count"&#41;&#41;&#123;
            $color="#0000ff";
          &#125;
          $online_table .= '<FONT COLOR="'.$color.'">'.str_replace&#40;" ","",$nickname&#41;.'</FONT></td><TD BGCOLOR="#FFFFa0">'.$raum.'</td>';
          $i++;
        &#125;
      &#125;
      if&#40;$i % 4 != 0&#41;&#123;
        echo '</tr>';
      &#125;
      $online_table .= '</TABLE>';
    &#125;else&#123;
      $online_users = '0';
      $online_table = '';
    &#125;
    $num_forum_topics = mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat_forum",$db_handle&#41;,0,"count"&#41;;
    $num_forum_new_topics=mysql_result&#40;mysql_query&#40;"SELECT count&#40;date&#41; AS count FROM chat_forum WHERE UNIX_TIMESTAMP&#40;date&#41;>UNIX_TIMESTAMP&#40;&#41;-60*60*24",$db_handle&#41;,0,"count"&#41;;
    $num_approx_online_time=mysql_result&#40;mysql_query&#40;"SELECT ROUND&#40;Online/count&#40;*&#41;/60&#41; AS count FROM chat_data WHERE Online>0 AND Zeit>UNIX_TIMESTAMP&#40;&#41;-60*60*24",$db_handle&#41;,0,"count"&#41;;
    $last_registered_user=mysql_result&#40;mysql_query&#40;"SELECT * FROM chat_data LIMIT ".&#40;intval&#40;$num_reg_chatters&#41;-1&#41;.",1",$db_handle&#41;,0,"Nick"&#41;;
    $result_last_post_user=mysql_query&#40;"SELECT * FROM chat_forum LIMIT ".&#40;intval&#40;$num_forum_topics&#41;-1&#41;.",1",$db_handle&#41;;
    $last_post_user=mysql_result&#40;$result_last_post_user,0,"NAME"&#41;;
    $last_post_kommentar=substr&#40;mysql_result&#40;$result_last_post_user,0,"KOMMENTAR"&#41;,0,30&#41;."...";
    $last_post_thema=mysql_result&#40;$result_last_post_user,0,"THEMA"&#41;;
    
    $num_all_send_mails=mysql_result&#40;mysql_query&#40;"SELECT MAX&#40;id&#41; AS maxid FROM chat_mail",$db_handle&#41;,0,"maxid"&#41;;
    $num_all_posts=mysql_result&#40;mysql_query&#40;"SELECT MAX&#40;nummer&#41; AS maxnummer FROM chat_forum",$db_handle&#41;,0,"maxnummer"&#41;;
    $num_mails=mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat_mail",$db_handle&#41;,0,"count"&#41;;
    $num_unread_mails=mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat_mail WHERE unread < 4",$db_handle&#41;,0,"count"&#41;;
    $num_mails_last24h=mysql_result&#40;mysql_query&#40;"SELECT count&#40;*&#41; AS count FROM chat_mail WHERE UNIX_TIMESTAMP&#40;time&#41;>UNIX_TIMESTAMP&#40;&#41;-60*60*24",$db_handle&#41;,0,"count"&#41;;
    
    
    mysql_close&#40;$db_handle&#41;;
    include "index_tpl.php";
    ?>
    danke, schon mal im voraus.

    gruß
    theclasses
    Achtung: Dies ist ein alter Thread im HTML und Webmaster Forum
    Diese Diskussion ist älter als 90 Tage. Die darin enthaltenen Informationen sind möglicherweise nicht mehr aktuell. Erstelle bitte zu deiner Frage ein neues Thema im Forum !!!!!
    Qualität mach das Leben leicht >
    BBS Home & BBS Online

  2. #2
    Kaiserliche Hoheit Avatar von No0ob
    Registriert seit
    02.01.2006
    Ort
    Nähe Frankfurt
    Beiträge
    1.500
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard

    Achte darauf, dass alle Dateien auf dem vorgesehen Platz sind =)
    Es wrden nämlich dateien nicht gefunden

Ähnliche Themen

  1. irc chat via java oder ähnlichem script einbauen
    Von nick2 im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 3
    Letzter Beitrag: 12.12.2007, 21:48
  2. PHP-Chat-Script
    Von Eminem im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 8
    Letzter Beitrag: 07.07.2006, 00:07
  3. CHAT - SCRIPT
    Von SHADOW im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 1
    Letzter Beitrag: 31.12.2005, 17:14
  4. Hilfe bei Chat Script...
    Von im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 4
    Letzter Beitrag: 02.05.2005, 11:36
  5. suche Script für Chat
    Von masterman im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 2
    Letzter Beitrag: 15.03.2004, 22:42

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •