Location: PHPKode > projects > JBB Board > jbb/openclose.php
<html><head><title>topic closed</title>
<link rel=stylesheet type="text/css" href="default.css">
</head>
<?php
    include ('color.inc');
	include ('abstaende.php');
    include ('mysqlvar.php');
	 if ($state==1){
		$siteInfo = $si[12];
	 } else {
		$siteInfo = $si[13];
	 }
	include("head.php");
	  // TABELLEN EINSTELLUNGEN
	  $t = new tabelle;
       $t->rows = 1;
	  $t->cols = 1;
	  $t->einrueck = $STL;
	  $t->rowspan = 20;
	  $t->border =0;
	  $t->sb = array("120","","");
       $t->tt = array("Topic öffnen/schliesen","&nbsp;","&nbsp;");
       $t->klaraPfad = "bilder/klara.gif";
	  $t->ra = 5;// reihen abstand
      /* end TABELLEN EINSTELLUNGEN */
	  $t->doTable("open");

	// Eintragungen Checken
	$beitrag="huhu";
	include("abfragen1.php");
          $db=mysql_connect($dbserver,$dbuser,$dbpass);
          mysql_select_db($dbname,$db);
          if ($db)
           {

             $query='SELECT * FROM user WHERE pseudonym="'.$name.'" ';
             $result=mysql_query($query,$db);
             $query='SELECT moderator FROM foren WHERE fid='.$fidnr;
             $result2=mysql_query($query,$db);
             $readpass2=mysql_fetch_array($result2, MYSQL_ASSOC);
             if (!$result) { die ("<tr><td><b class=\"fehlermeldung\">".$f_Text[2]."<br><a href=\"javascript:history.back(-1)\">".$linkText[1]."</a></b></td></tr></table></body></html>"); }             if ($result and $result2)
             $readpass=mysql_fetch_array($result, MYSQL_ASSOC);

             if ( $readpass["passwort"] <> $pass )
                 {
				die ("<tr><td><b class=\"fehlermeldung\">".$f_Text[2]."<br><a href=\"javascript:history.back(-1)\">".$linkText[1]."</a></b></td></tr></table></body></html>");
			  }
             $checked=0;
             if ( $readpass["status"]==4 )
                 {
                      $checked=1;
                 }
             if ( $readpass2["moderator"]==$name )
                 {
                      $checked=1;
                 }
             if ($checked==0)
                 {
				die ("<tr><td><b class=\"fehlermeldung\">".$f_Text[16]."<br><a href=\"javascript:history.back(-1)\">".$linkText[1]."</a></b></td></tr></table></body></html>");
			  }
		// Eintrags fehler abfangen (s.o. alles)
                  if ($state==0)
                       { $state=1; }
                  else
                       { $state=0; }
                  $query="UPDATE topics SET state=".$state." WHERE tid=".$tidnr;
                  $check=mysql_query($query);
                   if ($check) {
                           echo "<tr><td><b class=\"allFine\">".$text[31]."</td></tr>";
                       }
                   echo 
				   "<tr>\n\t".
					"<td colspan=\"3\">";
					doHrefs("topiczeigen.php?nr=$tidnr&seite=1|showforum.php?forum=$fidnr|foren.php","$linkText[4]|$linkText[3]|$linkText[2]");
					echo
					"</td>".
				"</tr></table>";	

            }
    echo'</body></html>';
?>
Return current item: JBB Board