PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Fabrizio Parrella   bibivu smiles   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example
Class: bibivu smiles
Manage packages of emoticon images
Author: By
Last change: update to version 1.1.1
Date: 19 years ago
Size: 1,387 bytes
 

Contents

Class file image Download
<pre>
<?php
require dirname(__FILE__).'/_class_bib_smiles.php';
$bib_smiles = new bib_smiles();
echo
'folder:<br />'.$bib_smiles->get_folder().'<hr />';
echo
'folder for web:<br />'.$bib_smiles->get_folder_web().'<hr />';
$test_text = ':-) &lt;&lt; two smiles &gt;&gt; :-D';
echo
$test_text.'<hr />';
$bib_smiles->create_index();
$sets = $bib_smiles->get_list_sets();
foreach(
$sets as $key=>$value){
   
$i=0;
    echo
'set # '.$key.'<br />';
    echo
'# smiles: '.count($sets[$key]['smiles']).'<br />';
    echo
'folder: '.$sets[$key]['folder'].'<br />';
    echo
'name: '.$sets[$key]['name'].'<br />';
    echo
'description: '.$sets[$key]['description'].'<br />';
    echo
'icon: '.($sets[$key]['icon']!=''?'<img src="'.$bib_smiles->get_folder_web().$sets[$key]['folder'].'/'.$sets[$key]['icon'].'" border="0" alt="" title="" />':'').$sets[$key]['icon'].'<br />';
    echo
'author: '.$sets[$key]['author'].'<br />';
    echo
'type: '.$sets[$key]['type'].'<br />';
    echo
'example: '.$bib_smiles->smiles($test_text, $key).'<br />';
    foreach(
$sets[$key]['smiles'] as $key1=>$value1){
        if(
$i%25==0) echo '<br />';
        echo
'<img src="'.$bib_smiles->get_folder_web().$sets[$key]['smiles'][$key1]['pic'].'" border="0" alt="'.htmlentities($sets[$key]['smiles'][$key1]['desc']).'" title="'.htmlentities($sets[$key]['smiles'][$key1]['desc']).'" />';
       
$i++;
    }
    echo
'<hr />'."\n";
}
?>
</pre>