function main() { $query = ''; $bookmark = ''; // If no query parameters if (count($_GET) == 0) { default_display(); exit(0); } // Error message if (isset($_GET['error'])) { $error_msg = $_GET['error']; default_display($error_msg); exit(0); } // Show a single record if (isset($_GET['id'])) { $id = $_GET['id']; if (isset($_GET['page'])) { // we are vieiwng pages $page = $_GET['page']; // to do: sanity check display_record($id, $page); exit(0); } display_record($id); exit(0); } // Show journals if (isset($_GET['titles'])) { $letter = 'A'; if (isset($_GET['letter'])) { $letter = $_GET['letter']; // sanity check if (!in_array($letter, range('A', 'Z'))) { $letter = 'A'; } } display_titles($letter); exit(0); } // Show images if (isset($_GET['images'])) { display_images(); exit(0); } // Show map if (isset($_GET['map'])) { display_map(); exit(0); } // Show labs if (isset($_GET['labs'])) { display_labs(); exit(0); } // Show journal (ISSN) if (isset($_GET['issn'])) { $issn = $_GET['issn']; $year = ''; if (isset($_GET['year'])) { $year = $_GET['year']; display_journal_year('issn', $issn, $year); exit(0); } display_journal('issn', $issn, $year); exit(0); } // Show journal (OCLSC if (isset($_GET['oclc'])) { $oclc = $_GET['oclc']; $year = ''; if (isset($_GET['year'])) { $year = $_GET['year']; display_journal_year('oclc', $oclc, $year); exit(0); } display_journal('oclc', $oclc, $year); exit(0); } // Show search (text, author) if (isset($_GET['q'])) { $query = $_GET['q']; $bookmark = ''; if (isset($_GET['bookmark'])) { $bookmark = $_GET['bookmark']; } display_search($query, $bookmark); exit(0); } }
// HTML HEADER /////////////////////////////////////////// display_header(); if (isset($_GET["display_task"])) { $tid = $_GET["display_task"]; display_task($tid); } elseif (isset($_GET["display_alerts"])) { display_alerts(); } elseif (isset($_GET["display_json"])) { $tid = $_GET["display_json"]; display_analysis($tid, True); } elseif (isset($_GET["display_analysis"])) { $tid = $_GET["display_analysis"]; display_analysis($tid); } elseif (isset($_GET["config"])) { display_config(); } elseif (isset($_GET["search"])) { display_search(); } elseif (isset($_GET["meta_sign"])) { display_meta_sign(); } elseif (isset($_GET["sql_query"])) { display_sql_query(); } elseif (isset($_GET["display_tasks"])) { display_tasks(); } else { display_main(); } /////////////////////////////////////////// // TASKS LISTING /////////////////////////////////////////// display_footer();
function main() { global $config; global $debug; $query = ''; // If no query parameters if (count($_GET) == 0) { default_display(); exit(0); } $pageNum = 1; // if $_GET['page'] defined, use it as page number if (isset($_GET['page'])) { $pageNum = $_GET['page']; } // Mode $mode = 'genus'; if (isset($_GET['mode'])) { $mode = $_GET['mode']; switch ($mode) { case 'genus': case 'author': case 'publication': break; default: $mode = 'genus'; } } $genus = ''; if (isset($_GET['q'])) { $query = $_GET['q']; display_search($query, $mode); } if (isset($_GET['genus'])) { $genus = $_GET['genus']; display_genus($genus, $pageNum); } if (isset($_GET['author'])) { $author = $_GET['author']; display_author($author, $pageNum); } if (isset($_GET['publication'])) { $publication = $_GET['publication']; display_publication($publication, $pageNum); } }
function main() { $callback = ''; $handled = false; //print_r($_GET); // If no query parameters if (count($_GET) == 0) { default_display(); exit(0); } if (isset($_GET['callback'])) { $callback = $_GET['callback']; } // Submit job if (!$handled) { if (isset($_GET['id'])) { $id = $_GET['id']; $format = ''; if (isset($_GET['format'])) { $format = $_GET['format']; if (isset($_GET['style'])) { $style = $_GET['style']; display_formatted_citation($id, $style); $handled = true; } } if (!$handled) { display_one($id, $format, $callback); $handled = true; } } } if (!$handled) { if (isset($_GET['q'])) { $q = $_GET['q']; $bookmark = ''; if (isset($_GET['bookmark'])) { $bookmark = $_GET['bookmark']; } display_search($q, $bookmark, $callback); $handled = true; } } if (!$handled) { if (isset($_GET['images'])) { display_images(); $handled = true; } } if (!$handled) { if (isset($_GET['page'])) { $PageID = $_GET['page']; $format = ''; if (isset($_GET['format'])) { $format = $_GET['format']; if ($format == 'html') { display_one_page_html($PageID, $format, $callback); $handled = true; } } if (!$handled) { display_one_page($PageID, $callback); $handled = true; } } } if (!$handled) { default_display(); } }
function main() { $query = ''; $bookmark = ''; // If no query parameters if (count($_GET) == 0) { default_display(); exit(0); } // If show a single record if (isset($_GET['id'])) { $id = $_GET['id']; display_record($id); } if (isset($_GET['q'])) { $query = $_GET['q']; if (isset($_GET['bookmark'])) { $bookmark = $_GET['bookmark']; } display_search($query, $bookmark); exit(0); } if (isset($_GET['page'])) { $page = $_GET['page']; display_page($page); exit(0); } /* if (isset($_GET['author'])) { $query = $_GET['author']; display_author($query); exit(0); } */ }
function main() { $query = ''; // If no query parameters if (count($_GET) == 0) { default_display(); exit(0); } // If show a single record if (isset($_GET['id'])) { $id = $_GET['id']; display_record($id); } if (isset($_GET['search'])) { $query = $_GET['search']; display_search($query); exit(0); } if (isset($_GET['author'])) { $query = $_GET['author']; display_author($query); exit(0); } if (isset($_GET['publication_outlet'])) { $query = $_GET['publication_outlet']; display_outlet($query); exit(0); } }
//$_GET['game'] = 'ob'; $gCSData = setup_cs(); if (0 && empty($gHistory['DB'])) { print start_page($gamenames[$_GET['game']] . ' Game Data Offline'); print 'The ' . $_GET['game'] . ' database is currently unavailable. Please check back shortly.'; print end_page(); return; } $gOutput = OutputFormat::getInstance($_GET['format']); $gOutput->set_start_functions('start_page', 'end_page'); if (!empty($_GET['history'])) { display_history(); } elseif (!empty($_GET['more'])) { display_more_search($_GET['search']); } elseif (!empty($_GET['search'])) { display_search($_GET['search']); } elseif (isset($_GET['formid']) || isset($_GET['ordid']) || isset($_GET['edid'])) { display_cell($_GET['formid'], $_GET['edid'], $_GET['ordid']); } elseif (isset($_GET['script']) || isset($_GET['sid'])) { display_script($_GET['script'], $_GET['sid']); } elseif (isset($_GET['stats'])) { display_rectype_stats($_GET['rec']); } elseif (isset($_GET['rec'])) { display_rectype($_GET['rec']); } else { display_main(); } function process_get() { global $gamenames; $format = NULL;