Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View 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.='&nbsp;&nbsp;<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;
}
?>