-
Notifications
You must be signed in to change notification settings - Fork 39
/
index.php
137 lines (117 loc) · 4.4 KB
/
index.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
namespace PHP_TOT_OTAServer;
?>
<!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"/>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<link rel="stylesheet" type="text/css" href="Resources/axelfamilyfont.css"/>
<link rel="stylesheet" type="text/css" href="Resources/generalstyle.css"/>
<link rel="apple-touch-icon-precomposed" href="Images/Icon.png"/>
<link rel="shortcut icon" href="Images/Icon.png"/>
<link rel="apple-touch-startup-image" href="Images/Default.png" media="(device-width: 320px)" sizes="320x460"/>
<link rel="apple-touch-startup-image" href="Images/[email protected]" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" sizes="640x920"/>
<link rel="apple-touch-startup-image" href="Images/[email protected]" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" sizes="640x1096"/>
<link href="Images/DefaultIpadPortrait.png" media="(device-width: 768px) and (orientation: portrait)" rel="apple-touch-startup-image"/>
<link href="Images/[email protected]" media="(device-width: 768px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"/>
<link href="Images/DefaultIpadLandscape.png" media="(device-width: 768px) and (orientation: landscape)" rel="apple-touch-startup-image"/>
<link href="Images/[email protected]" media="(device-width: 768px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"/>
<title>TOT</title>
</head>
<SCRIPT LANGUAGE="JScript">
function openPage(location)
{
document.location=(location);
}
</SCRIPT>
<body>
<!-- 顶部NavigationBar -->
<div class="navigationBar">
<h1 class="headerTitle">Install Apps</h1>
</div>
<!-- 以上是Header -->
<?php
/*
Created by Open Fibers
25'O Clock Inc.
Sep 9 2012
*/
require 'Classes/TOTClasses/GetVersionList.php';
require 'Classes/TOTClasses/GetRootURL.php';
$versionArray = allList();
$error = $versionArray['error'];
if ($error === "OK")
{
foreach ($versionArray["VersionInfo"] as $key => $value)
{
//从数组中读取所需信息
//标题
$title = $value['Title'];
//版本号
$version = $value['Version'];
//内测版本号
$betaVersion = $value['BetaVersion'];
//发布日期
date_default_timezone_set('PRC');
$dateString = date('F d, Y', $value['ReleaseDate']);
//Icon
$imagePath = $value['ImagePath'];
if (!$imagePath || $imagePath === "")
{
$imagePath = "Images/Icon.png";
}
//ipa详情页
$detailURL =
"ipadetail.php?identifier=" . $value["BundleIdentifier"] .
"&betaversion=" . $value["BetaVersion"] .
"&backuri=" . "index.php";
echo "<div class=\"cell\" onclick=\"openPage('$detailURL')\">";
echo "<div class=\"iconContainer\">";
echo "<img class=\"iconImage\" src=\"$imagePath\"/>";
echo "<img class=\"iconRoundedRectImage\" src=\"Images/RoundedRectAngel.png\"/>";
echo "</div>";
echo "<div class=\"labelOuterContentView\">";
echo "<div class=\"labelInnerContentView\">";
echo "<p class=\"cellTitleLabel\">$title $version</p>";
echo "<p class=\"cellVersionLabel\">#$betaVersion</p>";
echo "<p class=\"cellDateLabel\">$dateString</p>";
echo "</div>";
echo "</div>";
echo "<img class=\"detailButton\" src=\"Images/DetailButton.png\"/>";
echo "</div>";
if ($value["HasMoreBetaVersion"] === true)
{
$moreVersionURL = "moreversions.php?identifier=" . $value["BundleIdentifier"];
echo "<div class=\"moreButton\" onclick=\"openPage('$moreVersionURL')\">";
echo "<img width = 65px; height=24px; src=\"Images/MoreButton.png\"/>";
echo "</div>";
}
}
}
else
{
echo "<h1 class=\"errorLabel\">$error</h1>";
}
?>
<!-- 以下是Footer -->
<div style="height:88px;">
</div>
<div style="height:33px;">
<a href="http://github.com/openfibers/php-tot">
<h1 class="downloadLabel">Download TOT Server</h1>
</a>
</div>
<div style="height:33px;">
<a href="mailto:[email protected]">
<div>
<h1 class="contractMeLabel">Contact Author</h1>
</div>
</a>
</div>
<h1>Powered by PHP-TOT</h1>
<h1>Copyright (c) 2012, Open Fibers</h1>
<h1 style="height:33px">All rights reserved.</h1>
</body>
</html>