}
                }
            }
        }
        $result = $conn->query($sql);
        while ($r = $result->fetch_assoc()) {
            $rows[] = array('data' => $r);
        }
    }
    $conn->close();
    return $rows;
}
if (isset($_GET["action"])) {
    switch ($_GET["action"]) {
        case "search":
            $rows = searchEvent($_GET["criteria"]);
            break;
        case "sort":
            $rows = sortEvent($_GET["criteria"], $_GET["order"]);
            break;
        case "filter":
            $rows = filterEvent($_GET["year"], $_GET["month"], $_GET["target"], $_GET["location"]);
            break;
        case "calendar":
            $rows = getCalendar($_GET["year"], $_GET["month"]);
            break;
    }
    exit(json_encode($rows));
} else {
    $rows = putCSV($_FILES['csv']['tmp_name']);
    header("Location: " . $_SERVER['HTTP_REFERER']);
Example #2
0
require_once "../config.php";
require_once filepath() . "app/imu.php";
if (isset($_GET["m"])) {
    $mode = $_GET["m"];
    switch ($mode) {
        case 'single':
            searchObject();
            break;
        case 'holder':
            searchHolder();
            break;
        case 'group':
            searchGroup();
            break;
        case 'event':
            searchEvent();
            break;
        default:
            exit;
            break;
    }
}
function searchObject()
{
    $mySession = IMuConnect();
    $terms = new IMuTerms();
    $columns = array('SummaryData', 'image.resource{height:100,source:thumbnail,source:master}');
    if (isset($_GET["accnum"])) {
        $terms->add('TitAccessionNo', trim($_GET["accnum"]));
    }
    if (isset($_GET["title"])) {
Example #3
0
function search($event)
{
    $eventArr = searchEvent($event);
    echo json_encode($eventArr);
}
Example #4
0
<html>
<head>
	<title>Search</title>
	<meta charset='UTF-8'>
	<script src="dist/sweetalert.min.js"></script>
	<link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
	<link rel="stylesheet" href="css/mainpage.css">
</head>

<?php 
session_start();
include_once 'php/verify.php';
if (!isset($_GET['query'])) {
    redirectErrorPage();
}
include_once 'database/connect.php';
include_once 'database/access_db.php';
$idUser = $_SESSION['user'];
$searchQuery = urlencode($_GET['query']);
$searchResults = searchEvent(urldecode($searchQuery));
?>

<body>	
	<?php 
include 'templates/topbar.php';
include 'templates/leftbar.php';
include 'templates/search_results.php';
?>
</body>
</html>