Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Peter Klauer  >  rollover2  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: All in one example file
Class: rollover2
Generate javascript rollover buttons
Author: By
Last change:
Date: 2002-05-11 15:43
Size: 1,360 bytes
 

Contents

Class file image Download
<?php
include 'rollover2.php'// rollover

#
# rollover2
# step 1 of 3 :
# calling the class and adding images
#

$ro = new rollover2;

$ro->addimage'seite1''seite1_bas.jpg''seite1_sel.jpg''''Dummy Button' );
$ro->addimage'seite2''seite2_bas.jpg''seite2_sel.jpg''''Dummy Button' );

$ro->addimage'knito''knito_bas.jpg''knito_sel.jpg''',
    
'www.knito.de','http://www.knito.de','_blank' );
    
$ro->addimage'ingoknito''ingoknito_bas.jpg''ingoknito_sel.jpg'''
    
'www.ingoknito.de','http://www.ingoknito.de','_blank' );

# ------- end of step 1 of 3 -----------

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Rollover example</title>
<?php 
#
# rollover2
# step 2 of 3:
#
# rollover2: Preload all Images, load javascript-file
# this must be called within <head> ... </head>
#

$ro->preload(); 

# ------- end of step 2 of 3 -----------
?>
</head>
<body bgcolor=white>
<br>

This is an example how to use the class rollover2.<br>
<br>

<?php
#
# rollover2
# step 3 of 3:
# show the rollover-buttons


$ro->image('seite1');
echo 
'<br>';

$ro->image('seite2');
echo 
'<br>';

$ro->image('knito');
echo 
'<br>';

$ro->image('ingoknito');
echo 
'<br>';

# ------- end of step 3 of 3 -----------
?>

</body>
</html>