Location: PHPKode > projects > HypatiaDB > hypatiadb/advanced_search.php
<?php
include("common_db.php");
include("functions.php");
dbconnect($host, $username, $password);

$strings = loadStrings($lang, 'ADVSR');
headers();
html();
head($strings['AS_TITLE'], array('xhr/create-xhr.php?target=\'xhr/get-data.php?action=tl-ops\'%2BString.fromCharCode(38)%2B\'db=\'%2Bindb&amp;caller=reloadTables&amp;tid=tbl&amp;tfunc=clearElem(\'tbl\');', 'js/advSearchFuncs.php'));
menu();
navpane();

echo('<div id="mainpane">');

if(isset($_REQUEST['database'])) {
	$db = $_REQUEST['database'];
} else {
	if(isset($_SESSION['current_db'])) {
		$db = $_SESSION['current_db'];
	} else {
		printRequestForm('#');
	}
}

if(isset($_REQUEST['table'])) {
	$table = mysql_real_escape_string($_REQUEST['table']);
} else {
	printRequestForm('#', $db);
}

//If execution gets to here, both $db and $table should contain something valid
?>

	<form action="advresult.php" method="post" id="cform">
		<div id="dst">
		<div id="src">
			<select name="lvalue0">
				<option value="hypatia___allfields" selected="selected">All columns</option>
<?php
	echo(listFields('<option value="%1$s">%1$s</option>', $db, $table));
?>
			</select>
			<select name="operator0">
<?php
$literals = loadStrings($lang, 'GETFOP');

//'equal','lessthan','greaterthan','like','rlike','contains','between'
echo('<option value="equal">' . $literals['GF_EQUAL'] . '</option>
<option value="notequal">' . $literals['GF_NOTEQUAL'] . '</option>
<option value="lessthan">' . $literals['GF_LT'] . '</option>
<option value="lte">' . $literals['GF_LTE'] . '</option>
<option value="greaterthan">' . $literals['GF_GT'] . '</option>
<option value="gte">' . $literals['GF_GTE'] . '</option>
<option value="like">' . $literals['GF_LIKE'] . '</option>
<option value="notlike">' . $literals['GF_NOTLIKE'] . '</option>
<option value="rlike">' . $literals['GF_RLIKE'] . '</option>
<option value="notrlike">' . $literals['GF_NOTRLIKE'] . '</option>
<option value="contains">' . $literals['GF_CONTAINS'] . '</option>
<option value="notcontains">' . $literals['GF_NOTCONTAINS'] . '</option>
<option value="between">' . $literals['GF_BETWEEN'] . '</option>
<option value="notbetween">' . $literals['GF_NOTBETWEEN'] . '</option>');
?>
			</select>
			<input type="text" name="rvalue0" />
		</div></div>
		<span class="ll" onclick="addCondition();"><?php echo($strings['AS_ADDCOND']); ?></span><br />
		<input type="hidden" name="count" value="1" id="count" />
<?php
echo('<input type="hidden" name="database" value="' . $db . '" />');
echo('<input type="hidden" name="table" value="' . $table . '" />');
?>
		<input type="submit" value="<?php echo($strings['AS_SUBMIT']); ?>" />
	</form>
	
</div>
<?php

endhtml();
Return current item: HypatiaDB