-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.php
96 lines (86 loc) · 2.72 KB
/
test.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RSS API</title>
<script src="https://code.jquery.com/jquery-1.11.3.js" integrity="sha256-IGWuzKD7mwVnNY01LtXxq3L84Tm/RJtNCYBfXZw3Je0=" crossorigin="anonymous"></script>
<script src="lib/feed.js"></script>
<style type="text/css">
body {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 14px;
color: #666;
}
</style>
</head>
<body>
<h1>RSS Feed API</h1>
<hr />
<table width="800" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td bgcolor="#EEE">
<form id="form1" name="form1" method="post" action="test.php">
<p>
<label>Feed URL
<?php
if (isset($_POST['url'])){
$urlval = $_POST['url'];
}else{
$urlval = '';
}
?>
<input name="url" type="text" id="url" value="<?php echo $urlval?>" size="100" />
</label>
</p>
<p>
<label>Sort By
<input type="text" name="sortBy" id="sortBy" />
</label>
<label>Sort Order
<select name="sortOrder" id="sortOrder">
<option value="asc">asc</option>
<option value="desc" selected="selected">desc</option>
</select>
</label>
<label>Sort data type
<select name="sortType" id="sortType">
<option selected="selected">Numeric</option>
<option>Date</option>
<option>String</option>
</select>
</label>
</p>
<p>
<label>Number of items
<input name="limit" type="text" id="limit" value="5" />
</label>
<label>Description Lenght
<input name="descriptionLenght" type="text" id="descriptionLenght" value="300" />
</label>
<label>Show Images
<select name="showImages" id="showImages">
<option value="1">yes</option>
<option value="0" selected="selected">no</option>
</select>
</label>
</p>
<p>
<input type="submit" name="Try" id="Try" value="Try" />
</p>
</form></td>
</tr>
<tr>
<td><div id='feedCont'></div></td>
</tr>
</table>
</body>
</html>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo ("<script>
var test = new rss();
test.displayAsinc('".$_POST['url']."','feedCont', '".$_POST['sortBy']."','".$_POST['sortType']."','".$_POST['sortOrder']."',".$_POST['limit'].",".$_POST['descriptionLenght'].",".$_POST['showImages'].");
</script>
");
}
?>