//
// this function prints out an address and a last modifed line to the open file
// specified by giving the pointer $fp
//
// Variables needed:
// $fp: valid file handle to a file open in write mode
//
// Written by Suzanne Aigrain on 15-Dec-2000
function address_date($fp)
{
$pagemaker="Cambridge XMMSSC team";
$email="wmy@ast.cam.ac.uk";
$st=fputs($fp,"$pagemaker <$email>\n");
// $filemod = filemtime("~xmmssc/public_html/xidops/fields_status.txt");
$filemod = filemtime("/home/xmmssc/public_html/xidops/fields_status_new.txt");
$filemodtime = date("F j Y h:i:s A", $filemod);
$st=fputs($fp,"Based on: \"~xmmssc/public_html/xidops/fields_status.txt\", last modified $filemodtime \n");
}
?>
// This routine creates a link to the file $file from the file handled by $pt
// checking first if $file exists and if it doesnt it creates it
// with the message: Data not yet processed. etc...
// Returns true if sucessful (ie file was there or copying worked, false
// otherwise
//
// Inputs:
// $full_path: name of file to check (to access it from the program calling
// the links routine)
// $rel_path: path to same file but from the file the link is placed into
// $pt: valid file handle to a file open for writing
// $text: string, containing linked text
//
// Calls:
// ch_page_exists.php
//
// Written by Suzanne Aigrain on 05-Jan-2001
function links($pt,$full_path,$rel_path,$text)
{
// include($PHP_MYLIB."ch_page_exist.php");
if (ch_page_exist($full_path))
{
$try=fputs($pt,"".$text."");
}
else
{
$try=fputs($pt,"".$text."");
}
return $try;
}
// This routine checks if a file exists and if it doesnt it creates it
// with the message: Data not yet processed. etc...
// Returns true if sucessfule (ie file was there or copying worked, false
// otherwise
//
// Inputs:
// $name: name of file to check (full path if required)
//
function ch_page_exist($name)
{
if (! (file_exists($name)))
{
$try=is_numeric("ab");
}
else
{
$try=is_numeric(1.0);
}
return $try;
}
?>