Resource Center

You are here

All Documents

<?php
include_once "sites/all/themes/ustr/includes/list_function.inc";

$base_url = check_url(base_path());
$path_to_theme = path_to_theme();
$args = explode("/", $_SERVER['REQUEST_URI']);

//print_r($args);

$possible_terms = explode(",", $args[3]);
$terms = array();

foreach($possible_terms as $term)
{
if(is_numeric($term) && taxonomy_get_term($term)->name!="")
array_push($terms, $term);
}
$docname = taxonomy_get_term($terms[0])->name;

$limit = $args[4];

if(empty($limit) || !is_numeric($limit))
$limit = 0;

$results = get_calloutlist($terms, $limit);

print "<div id='allheader'>All ".$docname." Documents</div><br><br>";

//print_ustrlist($results, "1");

if($results)
foreach($results as $datarow)
{
$url_alias = drupal_get_path_alias("node/".$datarow['nid']);
$href_value = $base_path.$url_alias;
if(is_filelink($datarow['nid']))
{
$href_value = get_filelink($datarow['nid']);
}
print "<h3>".date_format(date_create($datarow['date']), "m/d/Y")."</h3>";
print "<p>";
print "<a href='/".$href_value."'>".$datarow['title']."</a>";
//if(is_filelink($datarow['nid'])) {
//print " " . ustr_get_edit_link($datarow['nid']);
}#if
print "</p>";

?>