com web/php: Revert SOPA changes.: include/layout.inc index-sopa.php index.php

From: Date: Wed, 28 Mar 2012 03:38:45 +0000
Subject: com web/php: Revert SOPA changes.: include/layout.inc index-sopa.php index.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-13268@lists.php.net to get a copy of this message
Commit: 2851ba1f6a5eeee66c441f6ce561ccbea5d1c00a Author: Adam Harvey <aharvey@php.net> Wed, 28 Mar 2012 11:38:45 +0800 Parents: c1c138e619f08538d3b657d1b244938380a209a4 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=2851ba1f6a5eeee66c441f6ce561ccbea5d1c00a Log: Revert SOPA changes. Changed paths: M include/layout.inc D index-sopa.php M index.php Diff: 2851ba1f6a5eeee66c441f6ce561ccbea5d1c00a diff --git a/include/layout.inc b/include/layout.inc index e976a1e..8862ce9 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -199,14 +199,6 @@ function site_header($title = '', $config = array()) } - $ts = time(); - // Hardcode 11am Jan.18 UTC to 5am Jan.19 UTC time window - if($ts>=1326884400 && $ts<1326949200) { - $sopa_bar = <<<EOBAR -<div style="width:100%;height:50px;vertical-align:middle;text-align:center;background-color:#000;color:#ffffff; position:absolute;z-index:5555;top:8px;left:0px;background:#000000;"><p style="margin-top:15px;">Stop SOPA/PIPA <a href="http://americancensorship.org" style="color:#dede00;">[americancensorship.org]</a></p></div> -EOBAR; - } else $sopa_bar = ''; - print <<<END_HEADER <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -231,7 +223,6 @@ EOBAR; <body{$onload}> <div id="headnav"> - $sopa_bar <a href="/" rel="home"><img src="{$_SERVER['STATIC_ROOT']}/images/php.gif" alt="PHP" width="120" height="67" id="phplogo" /></a> <div id="headmenu"> diff --git a/index-sopa.php b/index-sopa.php deleted file mode 100644 index 1c5db5c..0000000 --- a/index-sopa.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php // vim: et -/* - If you're reading this, it isn't because you've found a security hole. - this is an open source website. read and learn! -*/ - -/* ------------------------------------------------------------------------- */ - -// Get the modification date of this PHP file -$timestamp = @getlastmod(); - -// Note that this is not a RFC 822 date (the tz is always GMT) -$tsstring = gmdate("D, d M Y H:i:s ", $timestamp) . "GMT"; - -// Check if the client has the same page cached -if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && - ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring)) { - header("HTTP/1.1 304 Not Modified"); - exit(); -} -// Inform the user agent what is our last modification date -else { - header('HTTP/1.1 503 Stop SOPA/PIPA'); - header('Status: 503 Stop SOPA/PIPA'); - header('Retry-After: 7200'); - header("Last-Modified: " . $tsstring); -} -?> -<!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" xml:lang="en" lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="robots" content="noindex, nofollow"> -<title>Stop SOPA/PIPA!</title> -<style type="text/css" media="all"> -html, -body { - margin: 0; - padding: 0; - color: #d0d0d0; - background: #000000; - font-family:Helvetica; - font-size:18px; - margin:10% auto; - max-width:800px; - line-height:1.5em; -} -a { - color:#fff; -} -a:hover { - color:#a00; -} -</style> -</head> -<body> - <h2>503: Stop SOPA/PIPA</h2> - <p> - The <a href="http://www.opencongress.org/bill/112-h3261/show">SOPA</a>/<a href="http://www.opencongress.org/bill/112-s968/show">PIPA</a> bills threaten the open nature of the Web and thus threaten Open Source - projects like ours. If you have the ability to vote in the United States, help us out and contact your representatives. - If you are not able to vote in the United States, you can help by petitioning the U.S. state department. Bills like these - have a habit of spreading to other countries if we don't stop them at their source. - Visit <a href="http://americancensorship.org">AmericanCensorship.org</a> to learn how to do both. - </p> -</body> -</html> diff --git a/index.php b/index.php index 2a17bf3..fc4c55a 100644 --- a/index.php +++ b/index.php @@ -5,11 +5,5 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; if (myphpnet_beta()) { include $_SERVER['DOCUMENT_ROOT'] . '/index-beta.php'; } else { - $ts = time(); - // Hardcode 11am Jan.18 UTC to 5am Jan.19 UTC time window - if($ts>=1326884400 && $ts<1326949200) { - include $_SERVER['DOCUMENT_ROOT'] . '/index-sopa.php'; - } else { - include $_SERVER['DOCUMENT_ROOT'] . '/index-stable.php'; - } + include $_SERVER['DOCUMENT_ROOT'] . '/index-stable.php'; }

« previous php.webmaster (#13268) next »