-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
77 lines (64 loc) · 2.12 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
<?php include("settings.php");?>
<!DOCTYPE html>
<html>
<head>
<title>ICErepo v <?php echo $version;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="lib/base64.js"></script>
<script src="lib/github.js"></script>
<script src="ice-repo.js"></script>
<link rel="stylesheet" type="text/css" href="ice-repo.css">
</head>
<?php
if (isset($_GET['sessionLogin'])) {
?>
<body style="margin: 10px">
Enter GitHub token or username & password to use in this session:<br><br>
<form name="sessionLogin" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="POST">
<b>Token:</b><br>
<input type="text" name="token">
<br><br>
or:<br><br>
<b>Username:</b><br>
<input type="text" name="username"><br>
<b>Password:</b><br>
<input type="password" name="password"><br><br>
<input type="submit">
</form>
</body>
<?php
} else {
?>
<body style="margin: 0; overflow: hidden" onLoad="doRepo(get('repos').value)">
<div id="loadingMask" class="blackMask" style="visibility: visible" onContextMenu="return false">
<div class="popupVCenter">
<div class="popup">
<div class="circleOutside"></div>
<div class="circleInside"></div>
working...
</div>
</div>
</div>
<div class="header">
<select class="reposList" name="repos" id="repos" onChange="doRepo(this.value)" style="margin: 20px 0 0 20px">
<?php
for ($i=0;$i<count($repos);$i+=3) {
echo '<option id="repo'.($i/3).'" value="'.$repos[$i].'@'.$repos[$i+1].'"';
echo $repos[$i+2]=="selected" ? ' selected' : '';
echo '>'.$repos[$i]."</option>\n";
}
?>
</select>
<div class="pullGithubSel" onClick="pullContent('selected')">Pull selected from Github</div>
<div class="version">v <?php echo $version;?></div>
<img src="images/ice-repo.gif" alt="ICErepo" class="logo">
</div>
<form name="showRepo" action="contents.php?username=<?php echo $username;?>&password=<?php echo $password;?>&token=<?php echo $token;?>" target="repo" method="POST">
<input type="hidden" name="repo" value="">
</form>
<iframe name="repo" id="repo" class="repoFrame" frameborder="0"></iframe>
<?php
;};
?>
</body>
</html>