本文整理汇总了PHP中FileData::temp_delete方法的典型用法代码示例。如果您正苦于以下问题:PHP FileData::temp_delete方法的具体用法?PHP FileData::temp_delete怎么用?PHP FileData::temp_delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileData
的用法示例。
在下文中一共展示了FileData::temp_delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// Make sure directory is writable
if (!mkdir($GLOBALS['CONFIG']['archiveDir'], 0775)) {
$last_message = 'Could not create ' . $GLOBALS['CONFIG']['archiveDir'];
header('Location:error.php?ec=23&last_message=' . urlencode($last_message));
exit;
}
}
for ($i = 0; $i < $_REQUEST['num_checkboxes']; $i++) {
if (isset($_REQUEST['id' . $i])) {
$id = $_REQUEST['id' . $i];
if (strchr($id, '_')) {
header('Location:error.php?ec=20');
}
if ($userperm_obj->canAdmin($id)) {
$file_obj = new FileData($id, $pdo);
$file_obj->temp_delete();
fmove($GLOBALS['CONFIG']['dataDir'] . $id . '.dat', $GLOBALS['CONFIG']['archiveDir'] . $id . '.dat');
}
AccessLog::addLogEntry($_REQUEST['id' . $i], 'X', $pdo);
}
}
// delete from directory
// clean up and back to main page
$last_message = msg('message_document_has_been_archived');
// Call the plugin API call for this section
callPluginMethod('onAfterArchiveFile');
header('Location: out.php?last_message=' . urlencode($last_message));
} elseif (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'view_del_archive') {
//publishable=2 for archive deletion
$query = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE publishable=2";
$stmt = $pdo->prepare($query);