IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2013, 4:16:39 PM (13 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20130307

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dvodist/www-util/ipp.php

    r35238 r35415  
    11<?php
    2 
    3 global $rootdir;
    42
    53function head ($title) {
     
    2220  echo "<body>\n";
    2321
     22  echo "<!-- Start eXTReMe Pro Tracker Code V3/7\n";
     23  echo "Login:    emagnier\n";
     24  echo "Help:     https://www.extremetracking.com\n";
     25  echo "Installation instructions:\n";
     26  echo "Copy and paste this code between the two body tags into the\n";
     27  echo "*source* of your pages or in your footer/template. Best is\n";
     28  echo "to use a normal text editor such as notepad. -->\n";
     29  echo "<script type=\"text/javascript\"><!--\n";
     30  echo "EXd=document;location.protocol==\"https:\"?EXp=\"https\":EXp=\"http\";EXs=\"src\";\n";
     31  echo "EXd.write(\"<img \"+EXs+\"=\"+EXp+\"://nht-2.extreme-dm.com/n2.g?login=emagnier\",\n";
     32  echo "\"&url=\"+escape(EXd.URL)+\"&jv=\"+navigator.javaEnabled()+\"&\",\n";
     33  echo "\"d=\"+screen.width+\"x\"+screen.height+\"&c=\"+screen.colorDepth+\"\",\n";
     34  echo "\"&l=\"+escape(EXd.referrer)+\" width=0 height=0>\");//-->\n";
     35  echo "</script><noscript><img height=\"1\" width=\"1\" alt=\"\"\n";
     36  echo "src=\"http://nht-2.extreme-dm.com/n2.g?login=emagnier&amp;url=nojs\">\n";
     37  echo "</noscript>\n";
     38  echo "<!-- End eXTReMe Pro Tracker Code -->\n";
     39
    2440  if (! $project) { $project = "none"; }
    2541
    26   // echo "<p style=\"font-size:50%\">host: $WWWHOST, db: $DBHOST</p>\n";
     42  // echo "<p style=\"font-size:50%\">host: $root</p>\n";
    2743  echo "<table class=page cellspacing=10px><tr><td valign=top>\n";
    2844  echo "<table class=menu cellspacing=0px>\n";
     
    7692    }
    7793
    78     global $rootdir;
    79 
    8094    // hi-lite the current page (use select-style, not style)
    8195    $thisname = $_SERVER[SCRIPT_NAME];
    82     $page = $rootdir . $base;
     96    $page = $root . $base;
    8397    if ($page == $thisname) {
    8498      $style = trim($line[1]);
     
    92106      break;
    93107    case 'picture':
    94       // prepend the rootdir if needed (reference to /)
     108      // prepend the root if needed (reference to /)
    95109      if ($name[0] == '/') {
    96110        $name = $root . $name;
     
    99113      break;
    100114    case 'piclink':
    101       // prepend the rootdir if needed (reference to /)
     115      // prepend the root if needed (reference to /)
    102116      if ($name[0] == '/') {
    103117        $name = $root . $name;
     
    249263
    250264// lines which start with @ are processed by 'dirlist', all others are processed by Markdown
    251 function do_markdown ($source) {
     265function do_markdown ($source, $root) {
     266
    252267  if (!file_exists($source)) return;
    253268
     
    258273  $to_dirlist = "";
    259274  while ($line = fgets ($file, 1024)) {
     275    // replace @WWWHOST@ with $root
     276    $line = str_replace ("@WWWHOST@", $root, $line);
     277
    260278    // echo "line: $line";
    261279    if (!strncmp($line, "@", 1)) {
Note: See TracChangeset for help on using the changeset viewer.