include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/ImageLibraryManager.php';
header("Content-Type: text/html; charset=" . $charset);
$taxon = array_key_exists("taxon", $_REQUEST) ? trim($_REQUEST["taxon"]) : "";
$cntPerPage = array_key_exists("cntperpage", $_REQUEST) ? $_REQUEST["cntperpage"] : 100;
$pageNumber = array_key_exists("page", $_REQUEST) ? $_REQUEST["page"] : 1;
$stArrJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : '';
$view = array_key_exists("view", $_REQUEST) ? $_REQUEST["view"] : '';
$stArr = array();
$imageArr = array();
$taxaList = array();
if ($stArrJson) {
    $stArr = json_decode($stArrJson, true);
}
$imgLibManager = new ImageLibraryManager();
$imgLibManager->setSearchTermsArr($stArr);
$sqlWhere = $imgLibManager->getSqlWhere();
$recordListHtml = '';
if ($view == 'thumb') {
    if ($taxon) {
        $topOnChange = '"' . $taxon . '","splist",starr,1';
        $recordListHtml .= "<div style='margin-left:20px;margin-bottom:10px;font-weight:bold;'><a href='#' onclick='changeImagePage(" . $topOnChange . "); return false;'>Return to species list</a></div>";
    }
    $imageArr = $imgLibManager->getImageArr($taxon, $pageNumber, $cntPerPage, $sqlWhere);
    $recordCnt = $imgLibManager->getRecordCnt();
    $lastPage = (int) ($recordCnt / $cntPerPage) + 1;
    $startPage = $pageNumber > 4 ? $pageNumber - 4 : 1;
    if ($lastPage > $startPage) {
        $endPage = $lastPage > $startPage + 9 ? $startPage + 9 : $lastPage;
        $onclick = 'changeImagePage("","thumb",starr,';
Exemple #2
0
include_once '../config/symbini.php';
include_once $serverRoot . '/classes/ImageLibraryManager.php';
header("Content-Type: text/html; charset=" . $charset);
$taxon = array_key_exists("taxon", $_REQUEST) ? trim($_REQUEST["taxon"]) : "";
$target = array_key_exists("target", $_REQUEST) ? trim($_REQUEST["target"]) : "";
$cntPerPage = array_key_exists("cntperpage", $_REQUEST) ? $_REQUEST["cntperpage"] : 100;
$pageNumber = array_key_exists("page", $_REQUEST) ? $_REQUEST["page"] : 1;
$view = array_key_exists("imagedisplay", $_REQUEST) ? $_REQUEST["imagedisplay"] : '';
$stArrJson = array_key_exists("starr", $_REQUEST) ? $_REQUEST["starr"] : '';
$catId = array_key_exists("catid", $_REQUEST) ? $_REQUEST["catid"] : 0;
if (!$catId && isset($DEFAULTCATID) && $DEFAULTCATID) {
    $catId = $DEFAULTCATID;
}
$action = array_key_exists("submitaction", $_REQUEST) ? $_REQUEST["submitaction"] : '';
$imgLibManager = new ImageLibraryManager();
$collList = $imgLibManager->getFullCollectionList($catId);
$specArr = isset($collList['spec']) ? $collList['spec'] : null;
$obsArr = isset($collList['obs']) ? $collList['obs'] : null;
$stArr = array();
$previousCriteria = array();
$imageArr = array();
$taxaList = array();
$jsonStArr = '';
if ($stArrJson) {
    $stArrJson = str_replace("'", '"', $stArrJson);
    $stArr = json_decode($stArrJson, true);
}
if ($_REQUEST || $stArr) {
    if ($_REQUEST) {
        $previousCriteria = $_REQUEST;
Exemple #3
0
<?php

include_once '../config/symbini.php';
include_once $serverRoot . '/classes/ImageLibraryManager.php';
header("Content-Type: text/html; charset=" . $charset);
$taxon = array_key_exists("taxon", $_REQUEST) ? trim($_REQUEST["taxon"]) : "";
$target = array_key_exists("target", $_REQUEST) ? trim($_REQUEST["target"]) : "";
$imgLibManager = new ImageLibraryManager();
?>
<html>
<head>
<title><?php 
echo $defaultTitle;
?>
 Image Library</title>
	<link href="../css/base.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" rel="stylesheet" />
	<link href="../css/main.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" rel="stylesheet" />
	<meta name='keywords' content='' />
	<script type="text/javascript">
		<?php 
include_once $serverRoot . '/config/googleanalytics.php';
?>
	</script>
</head>
<body>