-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.php
More file actions
40 lines (34 loc) · 907 Bytes
/
Copy pathtext.php
File metadata and controls
40 lines (34 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
include('session.php');
include("config.php");
include 'menu.php';
include 'header.php';
$val = $_GET["val"];
$sql = "SELECT * FROM texts WHERE scan=".$val." ORDER BY scan";
$fname = "";
$result = mysqli_query($con,$sql);
$count = mysqli_num_rows($result);
if ($count = 1) {
if ($result = mysqli_query($con,$sql)) {
$firstrow = $result->fetch_assoc();
$page = $firstrow['scan'];
$fname = $firstrow['filename'];
}
}
?>
<!DOCTYPE html>
<html>
<head>
<style>
h1 {text-align: center;}
</style>
<style>
h2 {text-align: center;}
</style>
<title>Text file : </title>
</head>
<body>
<p><h2>The OCR'd text file :- Page <?php echo $page; ?></h2></p>
<p align='center'><a href='javascript:history.back(1);'>back</a></p>
<p><center><table><tr><td><pre><?php echo nl2br(file_get_contents($fname)); ?></pre></td></tr></table></center></p>
<?php include 'footer.php';