<?php
 
 
include_once("class.YAMC.php") ;
 
 
//
 
// Need an object to get everything else to work.
 
//
 
 
$theMailto = new YAMC() ;
 
 
//
 
// Emit the javascript that will process the anchors
 
// and produce the mailto href.  It doesn't have to
 
// be the first thing done.
 
//
 
 
$theMailto->javascript() ;
 
 
//
 
// A simple mailto link with the default name.
 
//
 
 
$theMailto->mailto("[email protected]") ;
 
print("<br />\n") ;
 
 
//
 
// A mailto with a subject and body.
 
//
 
 
$theMailto->mailto(array('to'=>'[email protected]', 
 
             'subject'=>'Mailto test',
 
             'body'=>'Dear Dick,')) ;
 
print("<br />\n") ;
 
 
//
 
// A mail to with a different link.
 
//
 
 
$theMailto->mailto('[email protected]', 'Dick Munroe') ;
 
print("<br />\n") ;
 
 
// 
// Test the non-object oriented call to javascript. 
// 
 
$js =& YAMC::javascript(FALSE) ; 
var_dump($js) ;
 
?>
 
 |