Exemplo n.º 1
0
	<body>
<?php 
if ($iSplit != 0) {
    ?>
		<h1>Split document into multiple documents</h1>
		Please wait, working...
		<pre>
<?php 
    // This is complicated, essentially we rescan the document and then afterwards we delete the original
    $iErr = 0;
    if (($iErr = InitializeWork()) == 0) {
        if (($iErr = ProcessFile($aRes["filename"], $iSplit)) != 0) {
            printf("ProcessFile() failed with %d\n", $iErr);
        } else {
            // Success! Remove original document
            $objDb->Delete($id);
        }
        if (($iErr = CleanupWork()) != 0) {
            printf("CleanupWork() failed with %d\n", $iErr);
        }
    } else {
        printf("InitializeWork() failed with %d\n", $iErr);
    }
    ?>
		</pre>
		<a href="index.php">Done</a>
<?php 
} else {
    ?>
		<a href="index.php">Back to front page</a><hr/>
		<h1>Split document into multiple documents</h1>
Exemplo n.º 2
0
<?php

require_once "includes/db.php";
if (!isset($_GET["id"])) {
    header("Location: index.php");
    exit;
}
$objDb = new ScannerDB();
$objDb->open();
$aRes = $objDb->GetDetails($_GET["id"]);
if ($aRes === FALSE) {
    header("Location: index.php");
    exit;
}
if (isset($_GET["yes"]) && $_GET["yes"] == "indeed") {
    $objDb->Delete($_GET["id"]);
    header("Location: index.php");
    exit;
}
?>
<html>
	<head>
		<title>Delete document</title>
		<style type="text/css">
			img {
				margin: 5px;
				border: 1px solid;
			}
			
			h2 {
				display: inline;