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

Last change on this file since 31627 was 31627, checked in by jmpp@…, 13 years ago

Turn warning boxes into classes until I can figure out a smarter way of outputting the div delimiters in case there are no warnings to print
(currently, if we're running from www.macports.org and we're not referred to it by our beloved leech, no warnings are printed but the divs
still are -- since they're outside the if conditionals --, which gives us a resulting empty & meaningless pink box at the top of our pages).

  • 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.6 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 31627 2007-12-01 01:00:32Z jmpp@macports.org $ */
4    /* Copyright (c) 2004-2007, The MacPorts Project. */
5?>
6
7
8<?php
9# Warning against darwinports.com leech!
10if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'darwinports.com') !== false) {
11?>
12
13    <div class="warnings">
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    </div>
25
26<?php       
27}
28
29# Warn about us being a valid mirror if we're not being served off htt://www.macports.org itself
30if (isset($_SERVER['HTTP_HOST']) && !preg_match('%(^|\.)macports\.org$%', $_SERVER['HTTP_HOST'])) {   
31?>
32
33    <div class="warnings">
34
35    <p>Warning: This is a temporary installation of the new &amp; re-designed website for The MacPorts Project. Official site
36    is located at <a href="http://www.macports.org">http://www.macports.org</a> as always.</p>
37   
38    </div>
39
40<?php
41}
42?>
Note: See TracBrowser for help on using the repository browser.