PHP Classes

File: functions.php

Recommend this page to a friend!
  Classes of Pascal Toussaint   CVS NT   functions.php   Download  
File: functions.php
Role: Auxiliary script
Content type: text/plain
Description: Some functions
Class: CVS NT
Browse a local CVS repository in a Windows server
Author: By
Last change: Remove old code
Date: 20 years ago
Size: 1,448 bytes
 

Contents

Class file image Download
<?php
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// MODULE: Functions
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Renvoie le copyright PascalZ avec lien vers le site
// Si le target n'est pas fourni, on renvoie vers _blank par défaut
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function Copyright($target = "_blank")
{
  
$date = getdate();
  
$year = $date['year'];

  
$copyright = "<cite>Copyright &copy; <a href=\"http://www.pascalz.com\" ";
  
$copyright .= "target=\"".$target."\"><b>PascalZ</b></a> 1987-".$year."</cite>";
  
   return
$copyright;
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Réindexe un tableau en partant de l'indice $base
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function ReindexArray(&$array, $base = 0)
{
   
$arraykey = array_keys($array);
   
$tmparray = array( $base => $array[$arraykey[0]]);

    for (
$i=1;$i<count($arraykey);$i++)
      
array_push($tmparray,$array[$arraykey[$i]]);
   
   
$array = $tmparray;
   
    unset(
$tmparray);
    unset(
$arraykey);
}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
?>