Modified: web/php/trunk/index-beta.php =================================================================== --- web/php/trunk/index-beta.php 2011-04-16 14:57:41 UTC (rev 310266) +++ web/php/trunk/index-beta.php 2011-04-16 15:00:24 UTC (rev 310267) @@ -49,60 +49,16 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-news.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc'; -// This goes to the left sidebar of the front page -$SIDEBAR_DATA = ' -

What is PHP?

-

- PHP - is a widely-used general-purpose scripting language that is - especially suited for Web development and can be embedded into HTML. - If you are new to PHP and want to get some idea - of how it works, try the introductory tutorial. - After that, check out the online manual, - and the example archive sites and some of the other resources - available in the links section. -

-

- Ever wondered how popular PHP is? see the - Netcraft Survey. -

+$news = ""; +$news .= '

News Archive

'; -

Thanks To

- -

Related sites

- -

Community

- - -

Syndication

-

- You can grab our news as an Atom feed. -

'; - $MIRROR_IMAGE = ''; - // Try to find a sponsor image in case this is an official mirror if (is_official_mirror()) { @@ -114,7 +70,7 @@ if (file_exists("backend/mirror." . $ext)) { // Add text to rigth sidebar - $MIRROR_IMAGE = "

This mirror sponsored by:

\n"; + $MIRROR_IMAGE = "

This mirror sponsored by:

\n"; // Create image HTML code $img = make_image( @@ -135,7 +91,7 @@ // End mirror specific part $MIRROR_IMAGE .= '' . - $img . "


\n"; + $img . "
\n"; // We have found an image break; @@ -143,30 +99,32 @@ } } -/* {{{ Generate latest release info */ -/* NOTE: You are editing the wrong file, you should be in include/version.inc - * For RC: See the $PHP_x_RC variable - * For STABLE: See the $PHP_x_VERSION/_DATE/_MD5 variables - */ -$PHP_5_STABLE = array(); -$PHP_5_RC = array(); -$rel = $rc = ""; - -$SHOW_COUNT = 2; -for ($i=1; $i<=$SHOW_COUNT; ++$i) { -list($PHP_5_STABLE, ) = each($RELEASES[5]); - -$minor = round($PHP_5_STABLE, 1); -$rel .= <<< EOT -
  • Current PHP $minor Stable: $PHP_5_STABLE
  • -EOT; +$confs = ""; +if (is_array($CONF_TEASER) && count($CONF_TEASER)) { + $categories = array("conference" => "Upcoming conferences", "cfp" => "Calling for papers"); + foreach($CONF_TEASER as $k => $a) { + if (is_array($a) && count($a)) { + $confs .= "

    " .$categories[$k]."

    "; + } // if set + } } +/* {{{ Generate latest release info */ /* Do we have any release candidates to brag about? */ $RCS = array( $PHP_5_2_RC => $PHP_5_2_RC_DATE, $PHP_5_3_RC => $PHP_5_3_RC_DATE, ); +$rc = ""; if (isset($RCS)) { foreach ((array)$RCS as $r => $d) { if ($r) { @@ -175,30 +133,46 @@ } } -$rel = <<< EOT -
    -

    Stable Releases

    -
      - $rel -
    -
    \n -EOT; - if (!empty($rc)) { $rel .= <<< EOT -
    -

    Release Candidates

    +

    Release Candidates

      $rc
    -
    \n EOT; } +$thanks = <<< EOT +

    Thanks To

    + +EOT; + /* }}} */ +// This goes to the left sidebar of the front page +$SIDEBAR_DATA = ' +

    Recent news

    +' . $news . ' +' . $MIRROR_IMAGE . ' +' . $rel . ' +' . $confs . ' +' . $thanks . ' +'; -// Prepend mirror image & latest releases to sidebar text -$RSIDEBAR_DATA = $MIRROR_IMAGE . $rel . $RSIDEBAR_DATA; + // Write out common header site_header("Hypertext Preprocessor", array( @@ -229,37 +203,10 @@ ) ); -if (is_array($CONF_TEASER) && count($CONF_TEASER)) { - $categories = array("conference" => "Upcoming conferences", "cfp" => "Calling for papers"); - echo '
    ' . "\n"; - echo " \n"; - foreach($CONF_TEASER as $k => $a) { - if (is_array($a) && count($a)) { - echo " \n \n"; - echo " \n \n"; - } // if set - } - echo "
    ".$categories[$k].":\n"; - echo '
      ' . "\n"; - $count = 0; - $a = preg_replace("'([A-Za-z0-9])([\s\:\-\,]*?)call for(.*?)$'i", "$1", $a); - foreach($a as $url => $title) { - if ($count++ >= 4) { - break; - } - echo '
    • ' . $title. '
    • ' . "\n"; - } - echo "
    \n
    \n
    \n\n
    \n"; -} -/* Where the h*ll did all the news go? - * See archives/2007.xml - */ -print_news($NEWS_ENTRIES, "frontpage"); ?> -

    News Archive