Skip to content

Commit 7180a46

Browse files
committed
Update auto
1 parent 1c0e10c commit 7180a46

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

hello.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<?php
2+
3+
$errlang=array(
4+
"",
5+
"Note Not Found",
6+
7+
""
8+
);
9+
210
echo "
311
<title>NoteText | LanGongDEV</title>
412
<div class=\"head\"><h1>LanGong NoteText Online</h1></div>
@@ -33,11 +41,18 @@
3341
<td>
3442
<center>
3543
<h2>View and Edit</h2>
36-
<br>
44+
3745
<form action=\"/jump.php\" method=\"post\">
38-
<br>
46+
<br><br>
3947
<div class=\"input\">
40-
<input type=\"number\" name=\"sid\" placeholder=\"Input your note ID\">
48+
<input type=\"number\" name=\"sid\" placeholder=\"";
49+
50+
if($error == "")
51+
echo "Input your note ID";
52+
if($error == 1)
53+
echo $errlang[1];
54+
55+
echo "\">
4156
</div>
4257
<br><br>
4358
<div class=\"b\">

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<?php
3131
$pid=trim($_GET['id']);
3232
$type=trim($_GET['type']);
33+
$error=trim($_GET['error']);
3334

3435

3536
?>

jump.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
include "get.php";
23
echo "<title>Please wait...</title>";
34
$num=$_POST['sid'];
4-
if($num==""){
5-
echo "<script>window.location.href='/'</script>";
5+
if($num=="" || $num<=0 || $num>$fileio->getline("doc/name",1)){
6+
echo "<script>window.location.href='/?error=1'</script>";
67
}
78
else{
89
echo "<script>window.location.href='/?type=view&id=$num'</script>";

0 commit comments

Comments
 (0)