-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrobot.php
More file actions
61 lines (58 loc) · 1.84 KB
/
robot.php
File metadata and controls
61 lines (58 loc) · 1.84 KB
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
<?php
require("robot/read_all_file.php");
require("robot/file_list_in_folder.php");
require("robot/cut_word.php");
require("robot/cut_symbol_head_end.php");
require("robot/ql.php");
require("robot/Frame.php");
require("robot/longtailword.php");
//require("robot/pinyin.php");
echo '<a href="http://wpa.qq.com/msgrd?v=3&uin=1837076477&site=qq&menu=yes" target="_blank" title="QQ:1837076477">QQ:1837076477</a><br/><br/>';
$oldString = '';
set_time_limit(99999);
if(isset($_REQUEST["pinyin"])){
$flow = get_pinyin_array(iconv('UTF-8','GB2312',$_REQUEST["pinyin"]));
echo $flow;
}
else if(isset($_REQUEST["Mode"])){
$Var = new _oopf_Frame;
if(isset($_REQUEST["oldString"])){
$oldString = $_REQUEST["oldString"];
}
$oldString = $Var->WordFilter($oldString);
$Var->_construct();
switch($_REQUEST["Mode"]){
case 'Repairallword':
$Var->Repairallword();
break;
default:
$Var->$_REQUEST["Mode"]($oldString);
}
}
else if(($_FILES["file"]["type"] == "text/plain")&&
($_FILES["file"]["size"] < 20000000)&&
($_FILES["file"]["error"] == 0)){
echo '<a href="index.php">返回控制面板</a>';
$qlVar = new _oopf_Frame;
$qlVar->_construct();
//if($_REQUEST["file"] == 'ReadArticleInFile'){
// $qlVar->ReadArticleInFile($_FILES["file"]["tmp_name"],'att');
//}
if($_REQUEST["file"] == 'wordhaveatt'){
$qlVar->StudyWordInFile($_FILES["file"]["tmp_name"],'att');
}
//else if($_REQUEST["file"] == 'wordnoatt'){
// $qlVar->StudyWordInFile($_FILES["file"]["tmp_name"],'no');
//}
else if($_REQUEST["file"] == 'Sentence'){
$qlVar->studysenteninfile($_FILES["file"]["tmp_name"]);
}
else if($_REQUEST["file"] == 'attwordtodo'){
$qlVar->attwordtodo($_FILES["file"]["tmp_name"]);
}
else if($_REQUEST["file"] == 'config'){
copy($_FILES["file"]["tmp_name"],"robot/config.txt");
echo '<br/>配置文件上传完毕!';
}
}
?>