$max) $p = 0; if(isset($_GET['action'])) { $p = array_search($_GET['action'],$actionArr); if($p < 0) $p = 0; } if(isset($_GET['material'])) { // Neue Methode für Suchmaschinen. $matstr = explode("-",$_GET['material']); $mid = (int)$matstr[0]; $_GET['id'] = $mid; } if(isset($_GET['id'])) { // Neue Methode für Suchmaschinen. $mid = (int)$_GET['id']; } if(trim($_POST['loginfield']) != "") { $d = array(maskieren($_POST['loginfield']), maskieren($_POST['pwfield'])); $sql = "SELECT * FROM matrep_user WHERE nick = '".$d[0]."' LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_object($result); if($row->pw == crypt($d[1],$row->pw)) { $_SESSION['matrep_id'] = $row->ID; $_SESSION['matrep_nick'] = $row->nick; $_SESSION['matrep_timeout'] = time(); $_SESSION['matrep_modstate'] = $row->modstate; $_SESSION['matrep_mail'] = $row->mail; $_SESSION['matrep_mute'] = $row->mute; } else { echo ""; } } if(isset($_GET['logout']) OR $_SESSION['matrep_timeout'] < time() - 1800 && $_SESSION['matrep_id'] != "") { $_SESSION['matrep_id'] = ""; $_SESSION['matrep_nick'] = ""; $_SESSION['matrep_timeout'] = ""; $_SESSION['matrep_modstate'] = ""; header("Location: http://matrep.parastudios.de/"); } if($_SESSION['matrep_timeout'] > 30) { $sql = "SELECT modstate, mute FROM matrep_user WHERE ID = '".$_SESSION['matrep_id']."';"; $result = mysql_query($sql); $row = mysql_fetch_object($result); $_SESSION['matrep_modstate'] = $row->modstate; $_SESSION['matrep_mute'] = $row->mute; $_SESSION['matrep_timeout'] = time(); } // Ist ein Battle in der Datenbank? $sql = "SELECT * FROM matrep_battle WHERE ended != 1 LIMIT 1;"; $result = mysql_query($sql); $battle = mysql_fetch_object($result); ?> 0) {?> name)); } } else { $sql = "SELECT title, searchstring, category FROM matrep_material WHERE ID = '".$mid."' LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_object($result); $row->searchstring = trim(str_replace(" ", " ", str_replace(",", " ", $row->searchstring.", "))); $swords = $row->searchstring; $sql = "SELECT name FROM matrep_categorys WHERE ID = '".$row->category."' LIMIT 1;"; $result = mysql_query($sql); $rowx = mysql_fetch_object($result); $row->category = $rowx->name; $einfueg = str_replace(" ", ", ", $row->title." ".$row->searchstring." ".$row->category); $einfueg = ", ".str_replace(", , ", ", ", $einfueg); $cwords = $row->category; $knwords = str_replace(", ", " ", $row->title); $such = array("1","2","3","4","5","6","7","8","9","0"); $knwords = str_replace($such,"",$knwords); $swords = str_replace($such,"",$swords); } echo $einfueg; ?>" /> <? printAltTitle($p, $mid); ?>Blender Open Material Repository - download blender materials/shaders for free! ID == 0) { $sql = "INSERT INTO ns5_counter (wert, datum, typ) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."', '2');"; mysql_query($sql); $gezaehlt = 1; $sql = "SELECT wert FROM ns5_counter WHERE typ = '1' LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_object($result); $sql = "UPDATE ns5_counter SET wert='".($row->wert + 1)."' WHERE typ = '1' LIMIT 1;"; mysql_query($sql); } $sql = "SELECT wert FROM ns5_counter WHERE typ = '1' LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_object($result); $sql = "SELECT COUNT(ID) FROM ns5_counter WHERE typ='2';"; $result = mysql_query($sql); $row2 = mysql_fetch_array($result);