"htm.png", pdf => "pdf.png", doc => "word.png", xls => "excel.png", ppt => "powerpoint.png", pps => "powerpoint.png", rtf => "richtext.png", sxw => "ooo_writer.png", sxc => "ooo_calc.png", sxi => "ooo_impress.png", sdw => "ooo_writer.png", sdc => "ooo_calc.png", sdd => "ooo_impress.png", wmv => "video.png", asx => "video.png", mp3 => "mp3.png"); function document_link_sm () { global $data, $mimetype; echo ""; } function documents() { global $language_data, $data, $db, $document_limit, $document_sort, $offset, $PHP_SELF, $doc_root; if (empty($offset) || $offset < 0) { $offset=0; } if (!$document_limit) { $document_limit = 7; } if ($document_sort==""){ $document_sort = "DESC"; } $numresults= pg_Exec ($db, "SELECT entry_id, date, document, document_description FROM ".$language_data[entries]." WHERE document <> '' AND document <> 'none' UNION SELECT entry_id, date, document, document_description FROM ".$language_data[threads]." WHERE document <> '' AND document <> 'none' ORDER BY date DESC, entry_id DESC LIMIT $document_limit"); $totalrows = pg_numrows($numresults); // srand((double)microtime()*1000000); // $randval = rand(0,$totalrows); // $num = $randval; // $num = 0; $result = $numresults; if($totalrows>0) { $image_count = 0; for ($i = 0; $i < $totalrows; $i++) { $data = pg_fetch_array ($numresults, $i); //get_date(); echo "
  • "; document_link_sm(); echo $data[document_description]; echo "
  • \n"; } } } ?>