home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 February (DVD) / PCWorld_2008-02_DVD.iso / v cisle / PHP / PHP.exe / EasyPHP-2.0b1-setup.exe / {app} / home / functions.inc.php < prev    next >
Encoding:
PHP Script  |  2006-10-31  |  1.2 KB  |  42 lines

  1. <?php
  2. function button($title, $link, $target, $color, $arrow)
  3. {
  4.     $lenght = strlen($title);
  5.     $start = 0;
  6.  
  7.     echo "<a href=$link $target>";  
  8.     echo "<img src='images_easyphp/button_left.gif' width='8' height='18' border='0' style='background:" . $color . ";' alt='[' />";
  9.     if ($arrow == 1)
  10.     {
  11.         echo "<img src='images_easyphp/button_arrow.gif' width='7' height='10' border='0' style='padding:4px 1px 4px 1px;background:" . $color . ";' alt='*' />";
  12.     }
  13.     while($start < $lenght){
  14.         $car = substr($title, $start, 1);
  15.         echo "<img src='images_easyphp/lettre_".$car.".gif' border='0' style='padding:4px 1px 4px 1px;background:" . $color . ";' alt='" . $car . "' />";
  16.         $start++;
  17.     }
  18.     echo "<img src='images_easyphp/button_right.gif' width='8' height='18' border='0' style='margin:0px 2px 0px 0px;background:" . $color . ";' alt=']' />";
  19.     echo "</a>";      
  20. }
  21.  
  22.  
  23.  
  24. function version($num)
  25. {
  26.     $lenght = strlen($num);
  27.     $start = 0;
  28.     while($start < $lenght){
  29.         $chiffre=substr($num,$start,1);
  30.         print("<img src='images_easyphp/chiffre_".$chiffre.".gif' alt='".$chiffre."' border='0' />");
  31.         $start++;
  32.     }
  33. }
  34.  
  35. function i18n_string($string)
  36. {
  37.       $string = htmlspecialchars($string);
  38.       return $string;
  39.   
  40.   
  41. }
  42. ?>