include "../include/db.php"; include "../include/general.php"; include "../include/authenticate.php"; include_once "../include/collections_functions.php"; $offset=getvalescaped("offset",0); $ref=getvalescaped("ref","",true); # Check access if (!collection_readable($ref)) {exit($lang["no_access_to_collection"]);} # pager $per_page=getvalescaped("per_page_list_log",15);setcookie("per_page_list_log",$per_page, 0, '', '', false, true); include "../include/header.php"; $log=get_collection_log($ref, $offset+$per_page); $results=count($log); $totalpages=ceil($results/$per_page); $curpage=floor($offset/$per_page)+1; $url=$baseurl . "/pages/collection_log.php?ref=" . $ref; $jumpcount=1; ?> <?php # Fetch and translate collection name $colinfo = get_collection($ref); $colname = i18n_get_collection_name($colinfo); if (!checkperm("b")) {
</div> <div class="Listview"> <table border="0" cellspacing="0" cellpadding="0" class="ListviewStyle"> <!--Title row--> <tr class="ListviewTitleStyle"> <td><?php echo $lang["date"]?></td> <td><?php echo $lang["user"]?></td> <td><?php echo $lang["action"]?></td> <td><?php echo $lang["resourceid"]?></td> <td><?php $field=get_fields(array($view_title_field)); echo lang_or_i18n_get_translated($field[0]["title"], "fieldtitle-");?></td> </tr> <?php $log=get_collection_log($ref); for ($n=0;$n<count($log);$n++) { ?> <!--List Item--> <tr> <td><?php echo htmlspecialchars(nicedate($log[$n]["date"],true)) ?></td> <td><?php echo htmlspecialchars($log[$n]["username"]) ?> (<?php echo htmlspecialchars($log[$n]["fullname"])?>)</td> <td><?php echo $lang["collectionlog-" . $log[$n]["type"]] ; if ($log[$n]["notes"] != "" ) { ## notes field contains user IDs, collection references and /or standard texts ## Translate the standard texts $standard = array('#all_users', '#new_resource'); $translated = array($lang["all_users"], $lang["new_resource"]); $newnotes = str_replace($standard, $translated, $log[$n]["notes"]);