Add php files
This commit is contained in:
19
modules/EcmDocs/list_versions.php
Executable file
19
modules/EcmDocs/list_versions.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?
|
||||
function list_versions($file_id,$module="EcmDocs")
|
||||
{
|
||||
$z="select version,id,date_entered,name from ecmfiles_versions where file_id='".$file_id."' and deleted='0' order by version desc";
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$versions.='<tr>
|
||||
<td valign="top" class="tabDetailViewDF">'.$r['name'].'</td>
|
||||
<td valign="top" class="tabDetailViewDF"><a href="DownloadEcmFile.php?record='.$r['id'].'">download</a></td>
|
||||
<td valign="top" class="tabDetailViewDF">'.number_format($r['version'], 1, '.', '').'</td>
|
||||
<td valign="top" class="tabDetailViewDF">'.$r['date_entered'];
|
||||
if(check_is_admin($_SESSION['authenticated_user_id']))$versions.=' <a style="cursor:pointer;" onclick="if(confirm(\'Are you sure you want to delete this version?\')){location.href=\'index.php?module=EcmDocs&action=DeleteVersion&record='.$r['id'].'&file_id='.$file_id.'&return_module='.$module.'&return_id='.$_REQUEST['record'].'\';}">delete</a>';
|
||||
$versions.='</td>
|
||||
</tr>';
|
||||
}
|
||||
return $versions;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user