summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-09-27 16:06:00 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-09-27 16:06:40 -0400
commitf3c5f4c57362a893868976054c00dd7d9f37e721 (patch)
treeb547f5f13a71c84cc1761b35acc6a7d620e81023
parent7d368325e467f72e6e078fee0ea620a34cf53e60 (diff)
downloadpfsense-f3c5f4c57362a893868976054c00dd7d9f37e721.zip
pfsense-f3c5f4c57362a893868976054c00dd7d9f37e721.tar.gz
Add copyright notice to dashboard page (but only once per upgrade)
-rw-r--r--src/usr/local/www/copynotice.inc78
-rw-r--r--src/usr/local/www/index.php45
2 files changed, 105 insertions, 18 deletions
diff --git a/src/usr/local/www/copynotice.inc b/src/usr/local/www/copynotice.inc
new file mode 100644
index 0000000..1c26625
--- /dev/null
+++ b/src/usr/local/www/copynotice.inc
@@ -0,0 +1,78 @@
+<?php
+/*
+ * copynotice.inc
+ *
+ * part of pfSense (https://www.pfsense.org)
+ * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
+ * All rights reserved.
+ *
+ * originally based on m0n0wall (http://m0n0.ch/wall)
+ * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+##|+PRIV
+##|*IDENT=page-system-copyright
+##|*NAME=System: Copyright notice
+##|*DESCR=Copyright and usage notice.
+##|*MATCH=copynitice.inc*
+##|-PRIV
+
+$logincssfile = "#1e3f75";
+
+if (isset($user_settings['webgui']['logincss']) && strlen($user_settings['webgui']['logincss']) == 6) {
+ $logincssfile = "#" . $user_settings['webgui']['logincss'];
+}
+
+?>
+<div id="usage" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+
+ <div class="modal-body" style="background-color:<?=$logincssfile?>; color:white;">
+<?php
+ print(gettext("<p><font size=\"4\"><strong>pfSense</strong>&reg;</font><font size=\"3\"> is Copyright 2004" .
+ "-2017 Rubicon Communications, LLC (Netgate)</p>" .
+ "<p>pfSense is a federally registered trademark of Electric Sheep Fencing, LLC. Any unauthorized use of this trademark is " .
+ "prohibited by state and federal law and by international law. Refer to our Trademark Usage Guidelines for how to properly " .
+ "use the marks. All rights reserved.</p>" .
+ "<p align=\"center\"><strong>Absolutely No Commercial Distribution Is Allowed</strong></font></p>"));
+?>
+ </div>
+ <div class="modal-footer" style="background-color:<?=$logincssfile?>; color:white;">
+ <button type="button" class="btn btn-xs btn-success" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">Accept</span>
+ </button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<?php
+
+if (!file_exists("/tmp/nofile")) :
+?>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $('#usage').modal({backdrop: 'static', keyboard: false});
+ $('#usage').modal('show');
+});
+//]]>
+</script>
+
+<?php
+endif; \ No newline at end of file
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index f7500f2..d90d788 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -219,25 +219,25 @@ if (file_exists('/conf/trigger_initial_wizard')) {
?>
<!DOCTYPE html>
<html lang="en">
-<head>
- <link rel="stylesheet" href="/css/pfSense.css" />
- <title><?=$g['product_name']?>.localdomain - <?=$g['product_name']?> first time setup</title>
- <meta http-equiv="refresh" content="1;url=wizard.php?xml=setup_wizard.xml" />
-</head>
-<body id="loading-wizard" class="no-menu">
- <div id="jumbotron">
- <div class="container">
- <div class="col-sm-offset-3 col-sm-6 col-xs-12">
- <font color="white">
- <p><h3><?=sprintf(gettext("Welcome to %s!") . "\n", $g['product_name'])?></h3></p>
- <p><?=gettext("One moment while the initial setup wizard starts.")?></p>
- <p><?=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?></p>
- <p><?=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?></p>
- </font>
+ <head>
+ <link rel="stylesheet" href="/css/pfSense.css" />
+ <title><?=$g['product_name']?>.localdomain - <?=$g['product_name']?> first time setup</title>
+ <meta http-equiv="refresh" content="1;url=wizard.php?xml=setup_wizard.xml" />
+ </head>
+ <body id="loading-wizard" class="no-menu">
+ <div id="jumbotron">
+ <div class="container">
+ <div class="col-sm-offset-3 col-sm-6 col-xs-12">
+ <font color="white">
+ <p><h3><?=sprintf(gettext("Welcome to %s!") . "\n", $g['product_name'])?></h3></p>
+ <p><?=gettext("One moment while the initial setup wizard starts.")?></p>
+ <p><?=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?></p>
+ <p><?=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?></p>
+ </font>
+ </div>
</div>
</div>
- </div>
-</body>
+ </body>
</html>
<?php
exit;
@@ -488,6 +488,15 @@ foreach ($widgets as $widgetkey => $widgetconfig) {
</div>
+<?php
+// Import the modal form used to display the copyright/usage information, then rename it
+// THis should cause it to display only once per install or update
+if (file_exists('/usr/local/www/copynotice.inc')) {
+ require_once('/usr/local/www/copynotice.inc');
+ rename('/usr/local/www/copynotice.inc', '/usr/local/www/copynotice.old');
+}
+?>
+
<script type="text/javascript">
//<![CDATA[
@@ -567,7 +576,7 @@ function set_widget_checkbox_events(checkbox_panel_ref, all_none_button_id) {
});
}
-// --------------------- EXPERIMENTAL centralized widget refresh system ------------------------------
+// ---------------------Centralized widget refresh system -------------------------------------------
// These need to live outsie of the events.push() function to enable the widgets to see them
var ajaxspecs = new Array(); // Array to hold widget refresh specifications (objects )
var ajaxidx = 0;
OpenPOWER on IntegriCloud