Project

General

Profile

« Previous | Next » 

Revision de5c66b5

Added by Steve Beaver almost 8 years ago

Add copyright notice to dashboard page (but only once per upgrade)

(cherry picked from commit f3c5f4c57362a893868976054c00dd7d9f37e721)

View differences:

src/usr/local/www/copynotice.inc
1
<?php
2
/*
3
 * copynotice.inc
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
7
 * All rights reserved.
8
 *
9
 * originally based on m0n0wall (http://m0n0.ch/wall)
10
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
 * All rights reserved.
12
 *
13
 * Licensed under the Apache License, Version 2.0 (the "License");
14
 * you may not use this file except in compliance with the License.
15
 * You may obtain a copy of the License at
16
 *
17
 * http://www.apache.org/licenses/LICENSE-2.0
18
 *
19
 * Unless required by applicable law or agreed to in writing, software
20
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 * See the License for the specific language governing permissions and
23
 * limitations under the License.
24
 */
25

  
26
##|+PRIV
27
##|*IDENT=page-system-copyright
28
##|*NAME=System: Copyright notice
29
##|*DESCR=Copyright and usage notice.
30
##|*MATCH=copynitice.inc*
31
##|-PRIV
32

  
33
$logincssfile = "#1e3f75";
34

  
35
if (isset($user_settings['webgui']['logincss']) && strlen($user_settings['webgui']['logincss']) == 6) {
36
	$logincssfile = "#" . $user_settings['webgui']['logincss'];
37
}
38

  
39
?>
40
<div id="usage" class="modal fade" role="dialog">
41
	<div class="modal-dialog">
42
		<div class="modal-content">
43

  
44
			<div class="modal-body" style="background-color:<?=$logincssfile?>; color:white;">
45
<?php
46
			print(gettext("<p><font size=\"4\"><strong>pfSense</strong>&reg;</font><font size=\"3\"> is Copyright 2004" .
47
				"-2017 Rubicon Communications, LLC (Netgate)</p>" .
48
				"<p>pfSense is a federally registered trademark of Electric Sheep Fencing, LLC. Any unauthorized use of this trademark is " .
49
				"prohibited by state and federal law and by international law. Refer to our Trademark Usage Guidelines for how to properly " .
50
				"use the marks. All rights reserved.</p>" .
51
				"<p align=\"center\"><strong>Absolutely No Commercial Distribution Is Allowed</strong></font></p>"));
52
?>
53
			</div>
54
			<div class="modal-footer" style="background-color:<?=$logincssfile?>; color:white;">
55
				<button type="button" class="btn btn-xs btn-success" data-dismiss="modal" aria-label="Close">
56
					<span aria-hidden="true">Accept</span>
57
				</button>
58
			</div>
59
		</div>
60
	</div>
61
</div>
62

  
63
<?php
64

  
65
if (!file_exists("/tmp/nofile")) :
66
?>
67

  
68
<script type="text/javascript">
69
//<![CDATA[
70
events.push(function() {
71
	$('#usage').modal({backdrop: 'static', keyboard: false});
72
	$('#usage').modal('show');
73
});
74
//]]>
75
</script>
76

  
77
<?php
78
endif;
src/usr/local/www/index.php
219 219
?>
220 220
<!DOCTYPE html>
221 221
<html lang="en">
222
<head>
223
	<link rel="stylesheet" href="/css/pfSense.css" />
224
	<title><?=$g['product_name']?>.localdomain - <?=$g['product_name']?> first time setup</title>
225
	<meta http-equiv="refresh" content="1;url=wizard.php?xml=setup_wizard.xml" />
226
</head>
227
<body id="loading-wizard" class="no-menu">
228
	<div id="jumbotron">
229
		<div class="container">
230
			<div class="col-sm-offset-3 col-sm-6 col-xs-12">
231
				<font color="white">
232
				<p><h3><?=sprintf(gettext("Welcome to %s!") . "\n", $g['product_name'])?></h3></p>
233
				<p><?=gettext("One moment while the initial setup wizard starts.")?></p>
234
				<p><?=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?></p>
235
				<p><?=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?></p>
236
				</font>
222
	<head>
223
		<link rel="stylesheet" href="/css/pfSense.css" />
224
		<title><?=$g['product_name']?>.localdomain - <?=$g['product_name']?> first time setup</title>
225
		<meta http-equiv="refresh" content="1;url=wizard.php?xml=setup_wizard.xml" />
226
	</head>
227
	<body id="loading-wizard" class="no-menu">
228
		<div id="jumbotron">
229
			<div class="container">
230
				<div class="col-sm-offset-3 col-sm-6 col-xs-12">
231
					<font color="white">
232
					<p><h3><?=sprintf(gettext("Welcome to %s!") . "\n", $g['product_name'])?></h3></p>
233
					<p><?=gettext("One moment while the initial setup wizard starts.")?></p>
234
					<p><?=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?></p>
235
					<p><?=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?></p>
236
					</font>
237
				</div>
237 238
			</div>
238 239
		</div>
239
	</div>
240
</body>
240
	</body>
241 241
</html>
242 242
<?php
243 243
	exit;
......
488 488

  
489 489
</div>
490 490

  
491
<?php
492
// Import the modal form used to display the copyright/usage information, then rename it
493
// THis should cause it to display only once per install or update
494
if (file_exists('/usr/local/www/copynotice.inc')) {
495
	require_once('/usr/local/www/copynotice.inc');
496
	rename('/usr/local/www/copynotice.inc', '/usr/local/www/copynotice.old');
497
}
498
?>
499

  
491 500
<script type="text/javascript">
492 501
//<![CDATA[
493 502

  
......
567 576
		});
568 577
}
569 578

  
570
// --------------------- EXPERIMENTAL centralized widget refresh system ------------------------------
579
// ---------------------Centralized widget refresh system -------------------------------------------
571 580
// These need to live outsie of the events.push() function to enable the widgets to see them
572 581
var ajaxspecs = new Array();	// Array to hold widget refresh specifications (objects )
573 582
var ajaxidx = 0;

Also available in: Unified diff