-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.php
71 lines (64 loc) · 2.85 KB
/
upload.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
require_once 'dolog.php';
$logF = new LOG_FUNCTION();
if($_POST["pass"] != "ordylan"){exit("<script>alert('Wrong Password!');window.location.href = 'https://on.ordylan.com/';</script>");}
if(!$_POST["title"]){exit("<script>alert('No Title!');window.location.href = 'https://on.ordylan.com/';</script>");}
header("Content-Type: text/html; charset=UTF-8");
list($msec, $sec) = explode(' ', microtime());
$msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);//shijianchuo
$notenumber = count($_FILES["File"]["name"]);
for($i=0;$i<$notenumber;$i++){
$FileTmp_Name = $_FILES["File"]["tmp_name"][$i];
$fname = $msectime."_".($i+1)."_".rand(100000,999999).".".explode('.',$_FILES["File"]["name"][$i])[count(explode('.',$_FILES["File"]["name"][$i]))-1];
move_uploaded_file($FileTmp_Name, "images/".$fname);
$aaa = $aaa."https://on.ordylan.com/images/".$fname."|";
}
if(strstr($aaa, ".|")){$aaa = "";}
$allnotenote = file('allnotes.ordylandata');
$allnotenote = $allnotenote[0];
$allnotenote = $allnotenote + 1;
$bijibiji = $_POST["title"]."{[(<||>)]}".$msectime."{[(<||>)]}".$_POST["about"]."{[(<||>)]}".$aaa;
$tagnotenoteall = file('tags/00.ordylandata');
$tagnotenoteall = $tagnotenoteall[0];
$tagnotenoteall = $tagnotenoteall.$allnotenote.",";
$wjjjj = fopen('tags/00.ordylandata',"w");
fwrite ($wjjjj,$tagnotenoteall);
fclose($wjjjj);
if($_POST["tag"]>=10&&$_POST["tag"]<=20){
$tagnotenoteall = file('tags/10.ordylandata');
$tagnotenoteall = $tagnotenoteall[0];
$tagnotenoteall = $tagnotenoteall.$allnotenote.",";
$wjjjj = fopen('tags/10.ordylandata',"w");
fwrite ($wjjjj,$tagnotenoteall);
fclose($wjjjj);
}
if($_POST["tag"]>=20&&$_POST["tag"]<=30){
$tagnotenoteall = file('tags/20.ordylandata');
$tagnotenoteall = $tagnotenoteall[0];
$tagnotenoteall = $tagnotenoteall.$allnotenote.",";
$wjjjj = fopen('tags/20.ordylandata',"w");
fwrite ($wjjjj,$tagnotenoteall);
fclose($wjjjj);
}
if(!$_POST["tag"] || $_POST["tag"] == 1 || $_POST["tag"] == 10){}else{
if(file_exists('tags/'.$_POST["tag"].'.ordylandata')){
$tagnotenote = file('tags/'.$_POST["tag"].'.ordylandata');
$tagnotenote = $tagnotenote[0];
$tagnotenote = $tagnotenote.$allnotenote.",";
$wjjjj = fopen('tags/'.$_POST["tag"].'.ordylandata',"w");
fwrite ($wjjjj,$tagnotenote);
fclose($wjjjj);
}
}
$wjjjj = fopen('images/search_img_scan_text/'.$allnotenote.'.ordylandata',"w");
fwrite ($wjjjj,"图片扫描文本-----未上传");
fclose($wjjjj);
$wjjjj = fopen('notes/'.$allnotenote.'.ordylandata',"w");
fwrite ($wjjjj,$bijibiji);
fclose($wjjjj);
$wjjjj = fopen('allnotes.ordylandata',"w");
fwrite ($wjjjj,$allnotenote);
fclose($wjjjj);
$logF->addlogs(1,"提交笔记:$allnotenote","成功","笔记提交|/upload.php");
echo "<script>alert('Success!');window.location.href = 'https://on.ordylan.com/noteview/notes/".$allnotenote."?up=true';</script>";
?>