%
include("intecol.inc");
$RN = array("","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV");
$timestamps[] = @getlastmod();
$sqlword = "";
$sqlauthor = "";
$sqlspeaker = "";
$and = false;
$sqlwhere = "";
$sp = "";
$wo = "";
$au = "";
$serror = "";
$errsep = "";
if ($_SERVER["REQUEST_METHOD"] == "POST" ) {
if (isset($_POST['speaker']) && $_POST['speaker'] != '') {
$speaker = $_POST['speaker'];
$sp = $speaker;
$sqlspeaker = " i.first like '%$speaker%' ";
if ($and == true) {
$sqlwhere .= " AND $sqlspeaker ";
} else {
$sqlwhere .= " $sqlspeaker ";
$and = true;
}
}
if (isset($_POST['author']) && $_POST['author'] != '') {
$author= $_POST['author'];
$au = $author;
if (strlen($author) > 2) {
$sqlauthor = " i.authors like '%$author%' ";
if ($and == true) {
$sqlwhere .= " AND $sqlauthor ";
} else {
$sqlwhere .= " $sqlauthor ";
$and = true;
}
} else {
$serror .= $errsep . "Search term 'name author' is too short.";
$errsep = "
";
}
}
if (isset($_POST['word']) && $_POST['word'] != '') {
$word = $_POST['word'];
$wo = $word;
if (strlen($word) > 2) {
$sqlword = " i.title like '%$word%' ";
if ($and == true) {
$sqlwhere .= " AND $sqlword ";
} else {
$sqlwhere .= " $sqlword ";
$and = true;
}
} else {
$serror .= $errsep . "Search term 'title word' is too short.";
$errsep = "
";
}
}
}
%>
Search for papers and posters<% if (strlen($serror) > 0) { print(" $serror "); } //print("$speaker $author $word "); if (isset($speaker) || isset($word) || isset($author) ) { //$query = "SELECT i.*, TIME_FORMAT(t.tijd, '%H:%i') AS start "; //$query .= "FROM invited_all AS i, tijden AS t, sessions_all AS s "; //$query .= "WHERE $sqlwhere "; //$query .= "AND t.datum=s.datum AND i.type=s.type AND i.nummer=s.nummer AND t.nummer=i.volgnummer "; //$query .= "AND i.volgnummer >= 0 "; //$query .= "ORDER BY i.authors"; $query = "SELECT i.*,t.title AS ttitle,DATE_FORMAT(s.datum, '%W, %e %M %Y') AS sdatum FROM invited_all AS i, themes AS t, sessions_all AS s "; $query .= "WHERE $sqlwhere AND t.id=i.theme AND s.type=i.type AND s.nummer=i.nummer "; $query .= "AND i.type != 'xx' AND i.type != '' AND i.type != 'ex' ORDER BY i.theme,i.type,i.nummer,i.first"; //print("$query "); if ($link = intecol_connect() ) { if ($result = mysql_query ($query) ) { if ($row = mysql_fetch_array($result)) { $count = 0; print('
Nothing found. "); } } else { print("Database unavailable. Please try again later. "); } } $timestamp = max($timestamps); $tsstring = gmdate("D, d M Y ", $timestamp); $tshtring = gmdate("D, d M Y H:i:s ", $timestamp) . "GMT"; %>Last update: <% print($tsstring);%> webmaster@bio.uu.nl |
||||
|
||||