First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
//
|
||||
// Determine if this is limited to Public FAQ's
|
||||
//
|
||||
$status_where = "and status in ('Private','Public') ";
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
$status_where = "and status = 'Public' ";
|
||||
}
|
||||
|
||||
|
||||
// Start the template and output buffering
|
||||
startTemplate();
|
||||
$templatePageTitle = getLanguageText('DOCUMENTS-TITLE');
|
||||
|
||||
|
||||
//
|
||||
// Get set of documents
|
||||
//
|
||||
$query = "select d.*,dc.category,dc.sequence " .
|
||||
"from documents as d, document_categories as dc " .
|
||||
"where d.school_num = $school_num " .
|
||||
"and dc.school_num = $base_school_num " .
|
||||
"and d.category_num = dc.record_num " .
|
||||
$status_where .
|
||||
"order by dc.sequence,d.sequence,document_date desc,title";
|
||||
$results = db_query($query);
|
||||
|
||||
|
||||
?>
|
||||
<br>
|
||||
<table width='<?php echo($default_data_width) ?>' class='content-table'>
|
||||
<?php
|
||||
$prev_category = "";
|
||||
$count = 0;
|
||||
$view_icon = "<img src='images/icons/filesearch24.png' alt='View Document' border='0'>";
|
||||
|
||||
while ($entry = db_fetch_array($results)) {
|
||||
extract($entry);
|
||||
|
||||
$bgclass = "data-even";
|
||||
if ($count % 2) $bgclass = "data-odd";
|
||||
$count++;
|
||||
|
||||
if ($category != $prev_category) {
|
||||
$prev_category = $category;
|
||||
?>
|
||||
<tr>
|
||||
<td align='center' colspan='3'> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' align='left' class='subheading'> <?php echo($category) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td align='left' class='<?php echo($bgclass) ?>'><?php echo($title) ?></td>
|
||||
<td width='80' align='left' class='<?php echo($bgclass) ?>'><?php echo($document_date) ?></td>
|
||||
<td width='50' align='center' class='<?php echo($bgclass) ?>'><a href='view-doc.php?dnum=<?php echo($record_num) ?>'><?php echo($view_icon) ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br>
|
||||
<?php
|
||||
endTemplate();
|
||||
?>
|
||||
Reference in new issue
Block a user