source: trunk/www/includes/warnings.inc @ 31472

Last change on this file since 31472 was 31472, checked in by jmpp@…, 13 years ago
  • Rename "check_referer" function to "print_warnings" and move all of its contents into a new trunk/www/includes/warnings.inc file;
  • Remove the warning about not being the official website out of trunk/www/includes/header.inc and put it into the new warnings.inc file. With the 'if' conditional suggested by Ryan on the dev list, this warning should "just work" and disappear when the site is run from the official web server, at which time we'll reword it to something different (from claiming we're a temporary installation to a mirror).
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-php
File size: 1.5 KB
Line 
1<?php
2    /* -*- coding: utf-8; mode: php; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=php:et:sw=4:ts=4:sts=4 */
3    /* $Id: warnings.inc 31472 2007-11-25 03:21:18Z jmpp@macports.org $ */
4    /* Copyright (c) 2004-2007, The MacPorts Project. */
5?>
6
7
8<div class="warning">
9
10<?php
11# Warning against darwinports.com leech!
12if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'darwinports.com') !== false) {
13?>
14
15    <p>You have arrived at the <b>Official MacPorts Web Site</b> from <i>darwinports.com</i>.</p>
16
17    <p><i>darwinports.com</i> <b>is not the official MacPorts Web Site</b>, nor is it a mirror of the <i>Official MacPorts Web
18    Site</i>. There is <b>no relationship</b> between <i>The MacPorts Project</i> and <i>darwinports.com</i>.</p>
19
20    <p>The information you may have been presented with on <i>darwinports.com</i> may be incorrect or outdated and is not endorsed
21    in any way by <i>The MacPorts Project</i>. For the most accurate information about MacPorts, please bookmark this site,
22    <a href="http://www.macports.org">http://www.macports.org</a>.</p>
23
24<?php       
25}
26
27# Warn about us being a valid mirror if we're not being served off htt://www.macports.org itself
28if (isset($_SERVER['HTTP_HOST']) && !preg_match('%(^|\.)macports\.org$%', $_SERVER['HTTP_HOST'])) {   
29?>
30
31    <p>Warning: This is a temporary installation of the new &amp; re-designed website for The MacPorts Project. Official site
32    is located at <a href="http://www.macports.org">http://www.macports.org</a> as always.</p>
33
34<?php
35}
36?>
37
38</div>
Note: See TracBrowser for help on using the repository browser.