anpera.net https://anpera.dyndns.org/phpbb3/ |
|
is das die datenbank? https://anpera.dyndns.org/phpbb3/viewtopic.php?f=34&t=3382 |
Seite 1 von 1 |
Autor: | XxNoahxX [ So 18 Feb, 2007 19:33 ] |
Betreff des Beitrags: | is das die datenbank? |
hallo ich habe einen logd datenbank script..oder glaube es zu mindest.aber habe trotzdem weiße seite hier is er : [php]<?php /* * Ingame Datenbank-Zugriff (datenbank.php) * written by Darkness * http://schwarzer-drache.cwsurf.de/ */ require_once "common.php"; isnewday(3); page_header("InGame - Datenbank"); $default = array_key_exists('sql',$_POST)? trim(stripslashes(str_replace('`','``',$_POST['sql']))) : "SELECT * FROM"; output( "<form action='datenbank.php?op=dbquery' method='POST'>". "<textarea style='background-color:#433828; color:#FFFFFF' name='sql' cols='50' rows='10'>$default</textarea>". "<br><br>". "<input type='submit' value='Ausführen'>". "</form>" ,true); addnav("","datenbank.php?op=dbquery"); if ($_GET['op']=="dbquery"){ $sqlary = explode(";",$_POST['sql']); $table = "<hr>"; $inquire = array(); $count = 0; while (list($k1,$sql)=each($sqlary)){ if ($sql = trim(stripslashes($sql))){ $count ++; if ($_POST['inquire']!="true" && (stristr($sql,"DROP") || stristr($sql,"DELETE") || stristr($sql,"TRUNCATE"))){ array_push($inquire,$sql); }else{ $table .= "`n`R".str_replace('`','``',$sql).";`n`n"; if (stristr($sql,"SELECT") || stristr($sql,"SHOW") || stristr($sql,"DESCRIBE")){ if ($result = query($sql)){ if ($num = db_num_rows($result)){ $table .= "`v($num ".($num==1? "Eintrag" : "Einträge")." gefunden.)`n`n"; $table .= "<table>"; for($i=0; $i<$num; $i++){ $row = db_fetch_assoc($result); if (!$i){ $table .= "<tr>"; while (list($key,$v2)=each($row)){ $table .= "<td>`b$key`b</td>"; } $table .= "</tr>"; reset($row); } $table .= "<tr>"; while (list($k2,$val)=each($row)){ $array = unserialize($val); if (is_array($array)) $table .= "<td>".nl2br(HTMLEntities(output_array($array)))."</td>"; else $table .= "<td>".HTMLENtities($val)."</td>"; } $table .= "</tr>"; } $table .= "</table>`n"; }else{ $table .= "`bKeine Einträge gefunden.`b`n`n"; } } }else{ if ($result = query($sql)){ // $table .= "`n`v(".db_affected_rows($result)." Treffer erzielt.)`n`n"; } } $table .= "<hr>"; } } } if (count($inquire)){ $sql = str_replace('`','``',implode(";\n",$inquire)).";"; output( "<hr>`n". "`bDiese Abfragen wirklich durchführen?`b`n".nl2br($sql)."`n". "<form action='datenbank.php?op=dbquery' method='POST'>". // "<input name='sql' value='$input' type='hidden'>". '<input name="sql" value="'.$sql.'" type="hidden">'. "<input name='inquire' value='true' type='hidden'>". "<input type='submit' value='Ausführen'>". "</form>" ,true); } $table = str_replace("amp;","",$table); output($table,true); if (!$count){ output("`n`bDu hast keine SQL-Befehle eingegeben`n`n<hr>",true); } } addnav("Zurück"); addnav("G?Zurück zur Grotte","superuser.php"); addnav("W?Zurück zum Weltlichen","village.php"); page_footer(); function query($sql){ // $result = mysql_query($sql) or output("`b".str_replace('`','``',db_error(LINK))."`b`n`n"); global $table; $result = mysql_query($sql) or $table .= "`b".str_replace('`','``',db_error(LINK))."`b`n`n"; return $result; } ?> [/php] is da irgendwas drnnae falsch? |
Autor: | Magier12 [ So 18 Feb, 2007 20:21 ] |
Betreff des Beitrags: | |
Des is, soweit ichs mir angeschaut hab, n Skript mit dem man die Datenbank in Logd verändern kann. Also so eine Art PhpMyAdmin in Logd. |
Autor: | XxNoahxX [ So 18 Feb, 2007 21:12 ] |
Betreff des Beitrags: | |
Ok geschaft hab..Öhm kan mir einer eine ainbauanleitung für den rassen editor geben? |
Autor: | Magier12 [ So 18 Feb, 2007 21:29 ] |
Betreff des Beitrags: | |
Schau mal hier durch, müsste soweit funzen |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |