<?php
/* +----------------------------------------------------------------------+
| Netautor Professional Application Server |
+----------------------------------------------------------------------+
| Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net> |
+----------------------------------------------------------------------+
| This file is subject to license, that is bundled with this package |
| in the file LICENSE.TXT, and is available at through the |
| world-wide-web at http://www.netautor.com/license/ |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| hide@address.com so we can mail you a copy. |
+----------------------------------------------------------------------+
| Authors: Stefan Rottensteiner <hide@address.com> |
| Marek Kadziela <hide@address.com> |
| Gregor Wollner |
| Christian Unger |
| Helli Kleinhans |
+----------------------------------------------------------------------+
| @version $Revision: 1.16 $ |
+----------------------------------------------------------------------+*/
/**
* Execute an SQL statement.
*/
require_once('../../include/init.inc');
if(!$GLOBALS['USER']->check_feature('Admin') && !$GLOBALS['USER']->check_feature('ac_database'))
{
$GLOBALS['USER']->login_call();
}
// --- include necessary functions
includeNaPro('array,form');
$GLOBALS['LOCALE']->textdomain('database');
$counter=(isset($counter)? $counter : 10);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>digiconcept/netautor/sql query</title>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta name ="robots" content="noindex">
<link href="../../include/netautor.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function do_search()
{
if(document.forms[0].elements['request'].value!="")
{
if(top.main.document.getElementById('f_datenbank').rows!='190,*,24')
{
top.main.document.getElementById('f_datenbank').rows='190,*,24';
top.scrollFrames('sqldb');
}
return true;
}
else
{
alert('Query is empty!!');
document.forms[0].elements['request'].focus();
return false;
}
}
//-->
</script>
</head>
<body bgcolor="#ffffff" class="standard">
<form method="post" target="sqlmessage" action="sql_result.php">
<table width="975" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="755" align="left" valign="top">
<table width="755" border="0" cellspacing="0" cellpadding="4" class="bgwindowbig">
<tr>
<td width="747" colspan="6" align="left" valign="top" class="head">
<img src="../../grafik/pixel.gif" width="1" height="1"><br>
</td>
</tr>
<tr>
<td width="747" colspan="6" align="left" valign="top" class="text">
<textarea name="request" wrap="PHYSICAL" class="textarea744small"><?php echo (isset($request)?$request:''); ?></textarea>
</td>
</tr>
<tr>
<td width="42"><img src="../../grafik/pixel.gif" width="42" height="1"><br></td>
<td width="152"><img src="../../grafik/pixel.gif" width="152" height="1"><br></td>
<td width="72"><img src="../../grafik/pixel.gif" width="72" height="1"><br></td>
<td width="152"><img src="../../grafik/pixel.gif" width="152" height="1"><br></td>
<td width="92"><img src="../../grafik/pixel.gif" width="92" height="1"><br></td>
<td width="197"><img src="../../grafik/pixel.gif" width="197" height="1"><br></td>
</tr>
</table>
<img src="../../grafik/bgwindow_big_stop.gif" width="755" height="14"><br>
</td>
<td width="10"></td>
<td width="210" align="left" valign="top">
<table width="210" border="0" cellspacing="0" cellpadding="4" class="bgwindowsmall">
<tr>
<td width="202" align="left" valign="top" class="head">
<img src="../../grafik/pixel.gif" width="1" height="7"><br>
<?php echo( $GLOBALS['LOCALE']->gettext('db_query') ); ?><br>
<img src="../../grafik/spacer_small.gif" width="202" height="24"><br>
</td>
</tr>
<tr>
<td width="202" align="left" valign="center" class="text">
<span class="text">
<?php echo( $GLOBALS['LOCALE']->gettext('db_limit') ); ?><br>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" class="text">
<input type="radio" name="counter" value="10" <?php echo( ($counter<=10? 'checked' : '')); ?> ><br>
</td>
<td align="left" valign="center" class="text">
10 <br>
</td>
<td align="left" valign="top" class="text">
<input type="radio" name="counter" value="50" <?php echo( ($counter==50? 'checked' : '')); ?> ><br>
</td>
<td align="left" valign="center" class="text">
50 <br>
</td>
<td align="left" valign="top" class="text">
<input type="radio" name="counter" value="100" <?php echo( ($counter==100? 'checked' : '')); ?> ><br>
</td>
<td align="left" valign="center" class="text">
100 <br>
</td>
<td align="left" valign="top" class="text">
<input type="radio" name="counter" value="1000" <?php echo( ($counter==1000? 'checked' : '')); ?> ><br>
</td>
<td align="left" valign="center" class="text">
1000 <br>
</td>
</tr>
<tr>
<td align="left" valign="top" class="text">
<input type="radio" name="counter" value="0" <?php echo( ($counter==0? 'checked' : '')); ?> ><br>
</td>
<td align="left" valign="center" class="text">
<?php echo( $GLOBALS['LOCALE']->gettext('limit_all') ); ?><br>
</td>
<td align="left" valign="top" class="text">
<br>
</td>
<td align="left" valign="center" class="text">
<br>
</td>
<td align="left" valign="top" class="text">
<br>
</td>
<td align="left" valign="center" class="text">
<br>
</td>
</tr>
</table>
<img src="../../grafik/spacer_grey.gif" width="202" height="15"><br>
<input type="submit" value="<?php echo( $GLOBALS['LOCALE']->gettext('button_go') ); ?>" class="create" onclick="return do_search()">
<input type="button" value="<?php echo( $GLOBALS['LOCALE']->gettext('button_new') ); ?>" class="new" onclick="document.location.href='sql.php'"><br>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_small_stop.gif" width="210" height="14"><br>
</td>
</tr>
<tr>
<td width="755"><img src="../../grafik/pixel.gif" width="755" height="1"><br></td>
<td width="10"><img src="../../grafik/pixel.gif" width="10" height="1"><br></td>
<td width="210"><img src="../../grafik/pixel.gif" width="210" height="1"><br></td>
</tr>
</table>
</form>
</body>
</html>