All'; while ($row_search_years = $query_search_years->fetch_array()) { $an_articol = $row_search_years['an_articol']; if ($_POST['search_years']==$an_articol) $select_search_years .=''; else $select_search_years .=''; } ?>

Publication repository

    
🔍  Search:
Title
 
Authors
Year:
◄"; $nextbutton = ""; $page = $nr_crt = $i=0; $data_curenta=date("Y-m-d"); $i=$nr_crt = 0; $pagination = ""; if ($search_title == '' || $search_title == '0') $cautare_search_title = " "; else $cautare_search_title = " and titlul_articol like '%".$search_title."%' "; if ($search_authors == '' || $search_authors == '0') $cautare_search_authors = " "; else $cautare_search_authors = " and autori like '%".$search_authors."%' "; if ($search_years == '' || $search_years == '0') $cautare_search_years = " "; else $cautare_search_years = "and an_articol = '".$search_years."' "; $select_repository = "SELECT * from publications_repository_lista where activ = '1' $cautare_search_title $cautare_search_authors $cautare_search_years order by titlul_articol $ordonare_afisare "; //echo $select_repository; $query = mysqli_query ($conexiune,$select_repository); $total_pages = $query->num_rows; //Paginare $adjacents = 3; /* Setup vars for query. */ $limit = 10; //how many items to show per page if(isset($_GET['page'])) $page = $_GET['page']; else $page=1; $targetpage = 'repository_info.php'; if($page) $start = ($page - 1) * $limit; //first item to display on this page else $start = 0; //if no page var is given, set start to 0 /* Get data. */ $select_repository_limit = $select_repository.' LIMIT '.$start.', '.$limit; $query = mysqli_query ($conexiune,$select_repository_limit); $row_per_page = $query->num_rows; if ($page==1) $row_cnt = $total_pages; else $row_cnt = $row_per_page; /* Setup page vars for display. */ if ($page == 0) $page = 1; //if no page var is given, default to 1. $prev = $page - 1; //previous page is page - 1 $next = $page + 1; //next page is page + 1 $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up. $lpm1 = $lastpage - 1; //last page minus 1 /* Now we apply our rules and draw the pagination object. We're actually saving the code to a variable in case we want to draw it more than once. */ $pagination = ""; if($lastpage > 1) { $pagination .= "
"; //previous button if ($page > 1) $pagination.= "".$prevbutton.""; else $pagination.= "".$prevbutton.""; //pages if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "$counter"; else $pagination.= "$counter"; } } elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination.= "$counter"; else $pagination.= "$counter"; } $pagination.= "..."; $pagination.= "$lpm1"; $pagination.= "$lastpage"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination.= "1"; $pagination.= "2"; $pagination.= "..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination.= "$counter"; else $pagination.= "$counter"; } $pagination.= "..."; $pagination.= "$lpm1"; $pagination.= "$lastpage"; } //close to end; only hide early pages else { $pagination.= "1"; $pagination.= "2"; $pagination.= "..."; for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "$counter"; else $pagination.= "$counter"; } } } //next button if ($page < $counter - 1) $pagination.= "".$nextbutton.""; else $pagination.= "".$nextbutton.""; $pagination.= "
\n"; } //end paginare while ($row=$query->fetch_array()) { $nr_crt = $nr_crt +1 ; $id = $row['id']; $titlul_articol = $row['titlul_articol']; if ($titlul_articol == '') $exista_titlul = 'none; '; else $exista_titlul = ' '; $an_articol = $row['an_articol']; if ($an_articol == '') $exista_anul = 'none; '; else $exista_anul = ' '; $autori = $row['autori']; if ($autori == '') $exista_autori = 'none; '; else $exista_autori = ' '; $detalii = $row['detalii']; if ($detalii == '') $exista_detalii = 'none; '; else $exista_detalii = ' '; $link_doi = $row['link_doi']; if ($link_doi == '') $exista_link_doi = 'none; '; else $exista_link_doi = ' '; $locatie_fisier = $row['locatie_fisier']; $nume_fisier = $row['nume_fisier']; $fisier_local_link = $locatie_fisier.'/'.$nume_fisier; if ($nume_fisier == '' || $locatie_fisier == '') $exista_fisier = 'none; '; else $exista_fisier = ' '; if ($i % 2 != "0") $bgcolor = "#ECECEC"; else $bgcolor = "#FBFBFB"; ?>
Title
Authors:
Details:
DOI:
Article download/view: