-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings-watchListServer.php
More file actions
124 lines (120 loc) · 4.03 KB
/
settings-watchListServer.php
File metadata and controls
124 lines (120 loc) · 4.03 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
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
<?php
require_once("core/php/functions/commonFunctions.php");
require_once("core/php/functions/watchlistFunctions.php");
$baseUrl = "core/";
if(file_exists('local/layout.php'))
{
$baseUrl = "local/";
//there is custom information, use this
require_once('local/layout.php');
$baseUrl .= $currentSelectedTheme."/";
}
require_once($baseUrl.'conf/config.php');
require_once('core/conf/config.php');
require_once('core/php/configStatic.php');
require_once('core/php/update/updateCheck.php');
require_once('core/php/loadVars.php');
require_once('setup/setupProcessFile.php');
?>
<!doctype html>
<head>
<title>Git Status | Settings</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl ?>template/theme.css?v=<?php echo $configStatic['version']; ?>">
<link rel="icon" type="image/png" href="core/img/favicon.png" />
<script src="core/js/jquery.js"></script>
<script src="core/js/visibility.core.js"></script>
<script src="core/js/visibility.fallback.js"></script>
<script src="core/js/visibility.js"></script>
<script src="core/js/visibility.timers.js"></script>
</head>
<body>
<?php require_once('core/php/templateFiles/sidebar.php'); ?>
<?php require_once('core/php/templateFiles/header.php'); ?>
<div id="main">
<div class="firstBoxDev">
<?php require_once('core/php/templateFiles/watchListServer.php'); ?>
</div>
</div>
<script type="text/javascript">
function calcuateWidth()
{
var innerWidthWindow = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if(document.getElementById("sidebar").style.width == '100px')
{
innerWidthWindow -= 103;
}
if(document.getElementById("sidebar").style.width == '100px')
{
document.getElementById("main").style.left = "103px";
}
else
{
document.getElementById("main").style.left = "0px";
}
var innerWidthWindowCalc = innerWidthWindow;
var innerWidthWindowCalcAdd = 0;
var numOfWindows = 0;
var elementWidth = 410;
while(innerWidthWindowCalc > elementWidth)
{
innerWidthWindowCalcAdd += elementWidth;
numOfWindows++;
innerWidthWindowCalc -= elementWidth;
}
var remainingWidth = innerWidthWindow - ((innerWidthWindowCalcAdd)+40);
remainingWidth = remainingWidth / 2;
var windowWidthText = remainingWidth+"px";
document.getElementById("main").style.paddingLeft = windowWidthText;
document.getElementById("main").style.paddingRight = windowWidthText;
document.getElementById("widthForWatchListSection").style.width = ((innerWidthWindowCalcAdd))+"px";
}
function saveWatchList(post)
{
var duplicateNames = false;
//check for duplicate names
var counter = 1;
var arrayOfNames = new Array();
while(document.getElementsByName("watchListKey"+counter).length > 0)
{
var checkName = document.getElementsByName("watchListKey"+counter)[0].value;
if(!((arrayOfNames.indexOf(checkName) > -1)))
{
arrayOfNames.push(checkName);
}
else
{
duplicateNames = true;
}
counter++;
}
if(!duplicateNames)
{
if(!post)
{
saveAndVerifyMain("settingsMainWatch");
}
else
{
displayLoadingPopup();
document.getElementById("settingsMainWatch").submit();
}
}
else
{
//show popup
showPopup();
document.getElementById('popupContentInnerHTMLDiv').innerHTML = "<div class='devBoxTitle' ><b>Error</b></div><br><br><div style='width:100%;text-align:center;'> Names must be unique <br> <button class='buttonButton' onclick='hidePopup();'>Ok</button> </div>";
}
}
<?php
echo "var currentVersion = '".$configStatic['version']."';";
?>
var successVerifyNum = <?php echo $successVerifyNum; ?>;
</script>
<script src="core/js/allPages.js?v=<?php echo $configStatic['version']; ?>"></script>
<script src="core/js/settingsAll.js?v=<?php echo $configStatic['version']; ?>"></script>
<script src="core/js/cacheClear.js?v=<?php echo $configStatic['version']; ?>"></script>
<script src="core/js/watchlist.js?v=<?php echo $configStatic['version']; ?>"></script>
<?php readfile('core/html/popup.html') ?>
</body>