-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhead.php
174 lines (143 loc) · 5.55 KB
/
head.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?php
/******************************************************************************/
/* Developed by: Ken Sladaritz */
/* Marshall Computer Service */
/* 2660 E End Blvd S, Suite 122 */
/* Marshall, TX 75672 */
/* [email protected] */
/******************************************************************************/
require "authorization.php";
$menu_tabs = array
(
'upload.php'=>'Upload',
'books.php'=>'Bibles / Books',
'sync.php'=>'Synchronize / Edit',
'viewParent.php'=>'View',
'viewColumnsParent.php' => 'Multi-Columns',
'translations.php'=>'Translations',
'reprocess.php'=>'Reprocess',
'user.php'=>'Users'
);
echo <<<END
<!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" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>$system_title</title>
<LINK REL="SHORTCUT ICON" HREF="images/favicon.ico">
<link type="text/css" rel="stylesheet" href="menu.css?v=20170103">
<SCRIPT LANGUAGE=JavaScript>
function login_func()
{
document.forms[0].devent.value="logout";
document.forms[0].submit();
}
function check_date(objName)
{
if (objName.value)
{
var wdate = objName.value;
var xdate = '';
var errmsg = '';
for (i = 0; i < wdate.length; i++)
{
if (wdate.substr(i,1) >= 0 && wdate.substr(i,1) <= 9)
{xdate = xdate + wdate.substr(i,1);}
}
if (xdate.length==5) {xdate = '0' + xdate;}
if (xdate.length==7) {xdate = '0' + xdate.substr(0,3) + xdate.substr(5,2);}
if (xdate.length==8) {xdate = xdate.substr(0,4) + xdate.substr(6,2);}
if (xdate.length!=6) {errmsg = 'date is invalid - please try again';}
var wmo = xdate.substr(0,2);
var wda = xdate.substr(2,2);
var wyr = xdate.substr(4,2);
if (wmo<1 || wmo>12) {errmsg = 'date is invalid - please try again';}
if (wda<1) {errmsg = 'date is invalid - please try again';}
if (wmo==1 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==2 && (wda<1 || wda > 29)) {errmsg = 'date is invalid - please try again';}
if (wmo==2 && (wyr % 4) != 0 && wda > 28) {errmsg = 'date is invalid - please try again';}
if (wmo==3 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==4 && (wda<1 || wda > 30)) {errmsg = 'date is invalid - please try again';}
if (wmo==5 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==6 && (wda<1 || wda > 30)) {errmsg = 'date is invalid - please try again';}
if (wmo==7 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==8 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==9 && (wda<1 || wda > 30)) {errmsg = 'date is invalid - please try again';}
if (wmo==10 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (wmo==11 && (wda<1 || wda > 30)) {errmsg = 'date is invalid - please try again';}
if (wmo==12 && (wda<1 || wda > 31)) {errmsg = 'date is invalid - please try again';}
if (errmsg)
{
objName.focus();
objName.value = '';
alert(errmsg);
return false;
}
else
{
if (wmo.substr(0,1)==0) {wmo = wmo.substr(1,1);}
xdate = wmo + '-' + wda + '-' + wyr;
objName.value = xdate;
}
}
}
function check_data_change(url)
{
if(document.forms[0].data_change.value=='Y')
{
answer = confirm('you have unsaved data on this screen.\\nare you sure you want to leave without saving?');
if(!answer) {return false;}
}
window.location=url;
return false;
}
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28615935-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</SCRIPT>
</head>
<body>
<form id=form1 name=form1 action="" method=post enctype="multipart/form-data">
<a name="top"> </a>
<input type=hidden name=data_change>
<table id="wrapper" cellpadding="0" cellspacing="0">
<tr id="banner">
<td><img src="images/logo.bmp"></td>
</tr>
<tr>
<td>
<table id="topnav" cellspacing="0" cellpadding="0">
<tr>
END;
foreach($menu_tabs as $code=>$desc)
{
if($menu_tab_access[$code]=='on' or $menu_tab_access['everything']=='on')
{echo "<td nowrap><a href=\"#top\" onclick=\"check_data_change('".$code."');\"> ".$desc." </a></td>";}
}
echo<<<END
<td nowrap style="text-align:right">
<a href='#top' onclick="check_data_change('default.php');">Login/Logout </a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="content">
END;
if ($script_name!='default.php' and $script_name!='granted.php')
{
if ( (!$menu_tab_access[$script_name] and !$menu_tab_access['everything']) or $sec_password!=$myrow_us['us_pass'])
{
echo '<span class="errmsg"> Access denied or timed out. Please Login. Thank you. </span>';
require "./foot.php";
exit;
}
}
?>