Changeset 31489 for trunk/www


Ignore:
Timestamp:
Nov 25, 2007, 6:17:48 PM (12 years ago)
Author:
jmpp@…
Message:
  • Move obfuscate_email() function into www/includes/common.inc, remove now unnecessary www/includes/email.inc file and references to it from contact.php and ports.php;
  • Move style properties of the obfuscate_email() funtion into the css;
  • Reorder the contents of www/includes/common.inc somewhat relative to the flow of our *.php pages;
Location:
trunk/www
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/contact.php

    r31409 r31489  
    55    $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    66    include_once("$MPWEB/includes/common.inc");
    7     include_once("$MPWEB/includes/email.inc");
    87    print_header('The MacPorts Project -- Contact Us', 'utf-8');
    98?>
  • trunk/www/includes/common.inc

    r31473 r31489  
    4141######################################################################
    4242
    43 # Page header
     43# Page header:
    4444function print_header($title, $encoding) {
    4545    global $MPWEB, $mp_version_major, $trac_url, $svn_url, $downloads, $guide_url;
     
    5252
    5353
    54 ###################################################################### 
     54######################################################################
    5555
    56 # Page footer
    57 function print_footer() {
    58     global $MPWEB;
     56# Print some useful warnings:
     57function print_warnings() {
     58    global $_SERVER, $MPWEB;
     59   
     60    include("$MPWEB/includes/warnings.inc");
    5961
    60     include("$MPWEB/includes/footer.inc");
    6162}
    6263
     
    9697
    9798
    98 ###################################################################### 
     99######################################################################
    99100
    100 # Print some useful warnings:
    101 function print_warnings() {
    102     global $_SERVER, $MPWEB;
    103    
    104     include("$MPWEB/includes/warnings.inc");
     101# Obfuscate e-mail addresses:
     102function obfuscate_email($email) {
     103    return "<span class='email'>" . str_replace('@', "<img src='img/at.gif' alt='at' />", $email)."</span>";
     104}
    105105
     106
     107######################################################################
     108
     109# Page footer:
     110function print_footer() {
     111    global $MPWEB;
     112
     113    include("$MPWEB/includes/footer.inc");
    106114}
  • trunk/www/macports.css

    r31484 r31489  
    180180}
    181181
     182.email {
     183    width: 1em;
     184    height: 1em;
     185}
    182186
    183187#footer {
  • trunk/www/ports.php

    r31456 r31489  
    77    $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    88    include_once("$MPWEB/includes/common.inc");
    9     include_once("$MPWEB/includes/email.inc");
    109    print_header('The MacPorts Project -- Available Ports', 'utf-8');
    1110    $by = isset($_GET['by']) ? $_GET['by'] : '';
Note: See TracChangeset for help on using the changeset viewer.