2023-05-16 10:50:42 +08:00

33 lines
578 B
JavaScript

/**
* Ajax delete doc.
*
* @param string $link
* @param int $replaceID
* @param string $notice
* @access public
* @return void
*/
function ajaxDeleteDoc(link, replaceID, notice)
{
if(confirm(notice))
{
$.get(link, function(data)
{
location.href = JSON.parse(data).locate;
})
}
}
/**
* Delete a file.
*
* @param int $fileID
* @access public
* @return void
*/
function deleteFile(fileID)
{
if(!fileID) return;
hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID);
}