&type=experiments'> <img src='img/zip.png' title='make a zip archive' alt='zip' /> </a> <a href='make.php?what=csv&id=<?php echo Tools::buildStringFromArray($results_arr); ?> &type=experiments'> <img src='img/spreadsheet.png' title='Export in spreadsheet file' alt='Export CSV' /> </a> </div> <?php echo "<p class='smallgray'>" . count($results_arr) . " " . ngettext("result found", "results found", count($results_arr)) . " (" . $total_time['time'] . " " . $total_time['unit'] . ")</p>"; // loop the results array and display results foreach ($results_arr as $result_id) { showXP($result_id, $_SESSION['prefs']['display']); } // end foreach // show load more button if there are more results than the default display number if (count($results_arr) > $limit) { echo $load_more_button; } } // END CONTENT ?> <script> // READY ? GO ! $(document).ready(function(){ // SHOW MORE EXPERIMENTS BUTTON
<a href='make_csv.php?id=<?php echo $results_id_str; ?> &type=exp'><img src='img/spreadsheet.png' title='Export in spreadsheet file' alt='Export in spreadsheet file' /></a> </div> <?php if ($count == 1) { echo "<div id='search_count'>" . $count . " result</div>"; } else { echo "<div id='search_count'>" . $count . " results</div>"; } echo "<div class='search_results_div'>"; // Display results echo "<hr>"; foreach ($results_id as $id) { showXP($id, $_SESSION['prefs']['display']); } } else { // no results $message = "Sorry, I couldn't find anything :("; echo display_message('error', $message); } // DATABASE ADVANCED SEARCH } elseif (is_pos_int($_REQUEST['type'])) { // SQL // the BETWEEN stuff makes the date mandatory, so we switch the $sql with/without date if (isset($_REQUEST['to']) && !empty($_REQUEST['to'])) { $sql = "SELECT * FROM items WHERE type = :type AND title LIKE '%{$title}%' AND body LIKE '%{$body}%' AND rating LIKE '%{$rating}%' AND date BETWEEN '{$from}' AND '{$to}'"; } elseif (isset($_REQUEST['from']) && !empty($_REQUEST['from'])) { $sql = "SELECT * FROM items WHERE type = :type AND title LIKE '%{$title}%' AND body LIKE '%{$body}%' AND rating LIKE '%{$rating}%' AND date BETWEEN '{$from}' AND '991212'"; } else {
// If there are no experiments, display a little message if ($count == 0) { // it might be a fresh install, but it might also be the search filters are too restrictive if (isset($_GET['tag'])) { display_message('error_nocross', _("Sorry. I couldn't find anything :(")); } else { display_message('info_nocross', sprintf(_("<strong>Welcome to eLabFTW.</strong> Click the %sCreate experiment%s button to get started."), "<img src='img/add.png' alt='' /><a class='alert-link' href='app/create_item.php?type=exp'>", "</a>")); } } else { while ($experiments = $req->fetch()) { $results_arr[] = $experiments['id']; } $req->closeCursor(); // loop the results array and display results foreach ($results_arr as $result_id) { showXP($result_id, $display); } // end foreach // show load more button if there are more results than the default display number if (count($results_arr) > $limit) { echo $load_more_button; } } } // END CONTENT ?> <script> // READY ? GO ! function go_url(x) {