Location: PHPKode > projects > MySQL Sidu DB Web GUI > sidu37/sqls.php
<?php
include 'inc.page.php';
$SIDU['page']['nav']=1;
@uppe();
@main();
@down();

function navi(){
	global $SIDU;
	$eng=$SIDU['eng'];
	echo "<a href='option.php?id=$SIDU[0]' ",html_hkey('O',lang(3401))," target='main'></a><a href='user.php?id=$SIDU[0]' ",html_hkey('U',lang(3402))," target='main'></a>";//prevent screen move
	if ($eng=='my' || $eng=='pg'){
		$sql=($eng=='my' ? 'SHOW+PROCESSLIST' : 'SELECT+*+from+pg_stat_activity');
		echo "<a href='sql.php?id=$SIDU[0]&#38;sql=$sql' ",html_hkey('P',lang(3403))," target='main'></a>";
	}
	echo "<a href='home.php?id=$SIDU[0]' target='main' ",html_hkey('B',lang(3405)),'>',html_img('sidu'),"</a>
<a href='conn.php' target='_blank' ",html_hkey('N',lang(3406)),'>',html_img('tool-pc'),($SIDU['page']['menuTextSQL'] ? lang(3407) : ''),"</a>
<a class='Hpop' ",html_hkey('L',lang(3408)),'>',html_img('tool-imp'),($SIDU['page']['menuTextSQL'] ? lang(3409) : ''),"</a>
<div class='pop'><form action='sqls.php?id=$SIDU[0]' method='post' enctype='multipart/form-data'>
<p><b>",lang(3432),":</b></p>
<input type='file' name='fsql'>",html_form('submit','cmd',lang(3434)),"
</form></div>
<a id='run_a' href='#' ",html_hkey('A',lang(3410)),'>',html_img('tool-run-all'),($SIDU['page']['menuTextSQL'] ? lang(3411) : ''),"</a>
<a id='run_r' href='#' ",html_hkey('R',lang(3412)),'>',html_img('tool-run'),($SIDU['page']['menuTextSQL'] ? lang(3413) : ''),"</a>
<a id='run_m' href='#' ",html_hkey('M',lang(3414)),'>',html_img('tool-run-m'),($SIDU['page']['menuTextSQL'] ? lang(3415) : ''),"</a>
<a href='his.php?id=$SIDU[0]' target='main' ",html_hkey('H',lang(3416)),'>',html_img('tool-his'),($SIDU['page']['menuTextSQL'] ? lang(3417) : ''),"</a>
<a href='./?id=$SIDU[0]' class='goto' ",html_hkey('W',lang(3418)),'>',html_img('tool-refresh'),($SIDU['page']['menuTextSQL'] ? lang(3419) : ''),"</a>
<a href='#' id='resize_menu' ",html_hkey('/',lang(3420)),'>',html_img('menu-open'),"</a>
<a href='#' id='resize_tool' ",html_hkey('\\',lang(3421)),'>',html_img('tool-open'),'</a>';
	if ($eng=='my' || $eng=='pg') echo " <a href='sql.php?id=$SIDU[0]&#38;sql=show+vars' target='main' ",html_hkey('V',lang(3422)),">",html_img('tool-sys'),($SIDU['page']['menuTextSQL'] ? lang(3423) : ''),'</a>';
	if ($eng=='my') echo " <a href='sql.php?id=$SIDU[0]&#38;sql=FLUSH+ALL' target='main' title='",lang(3424),"'>",html_img('tool-flush'),($SIDU['page']['menuTextSQL'] ? lang(3425) : ''),'</a>';
	echo " <a href='temp.php?id=$SIDU[0]' class='xwin' ",html_hkey('T',lang(3426)),'>',html_img('tool-temp'),($SIDU['page']['menuTextSQL'] ? lang(3427) : ''),"</a>
<a href='option.php?id=$SIDU[0]' target='main' title='",lang(3428),"'>",html_img('tool-option'),($SIDU['page']['menuTextSQL'] ? lang(3429) : ''),'</a>';
	if ($eng=='my' || $eng=='pg') echo " <a href='user.php?id=$SIDU[0]' target='main' title='",lang(3430),"'>",html_img('tool-user.gif'),($SIDU['page']['menuTextSQL'] ? lang(3431) : ''),'</a>';
	echo "<div style='position:fixed;top:0;right:0;padding:3px;background:#eed'><a href='conn.php?cmd=quit' class='goto' ",html_hkey('Q',lang(3404)),'>',html_img('tool-exit'),'</a></div>';
}
function main(){
	global $SIDU;
	if (substr($_FILES['fsql']['type'],0,4)=='text' && $_FILES['fsql']['size'] && !$_FILES['fsql']['error'])
		$file=html8(file_get_contents($_FILES['fsql']['tmp_name']));
	elseif (substr($SIDU['eng'],0,2)=='sl') $file="SELECT * FROM sqlite_master\nLIMIT 10;";
	else $file='SELECT now();';
	echo "<textarea id='sqltxt' style='width:100%;border:0' spellcheck='false' cols='30' rows='2'>$file</textarea>
<form name='sqlrun' action='sql.php?id=$_GET[id]' target='main' method='post'>",html_form('hidden','sqlcur','','','',"id='sqlcur'"),html_form('hidden','sqlmore','','','',"id=sqlmore"),'</form>';
}
?>
Return current item: MySQL Sidu DB Web GUI