Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        function numberToPicture($zahl)
        {
                $zahl = $zahl."€";
                $buffer='<table border=0 cellspacing=0 cellpadding=0 width=165><tr><td height=34 background="'.$_SESSION['INI']['numberToPicture']['imagePath'].'schild.gif"><table border=0 cellspacing=0 cellpadding=0 align=center><tr>';
                
                //$zahl = str_replace(",00", ",-", $zahl); 

                $laenge = strlen($zahl);
                for($i=0 ; $i < $laenge ; $i++)
                {
                        $ziffer = substr($zahl , $i , 1);
                        
                        switch($ziffer)
                        {
                                 case ',': $ziffer="komma";     break;
                                 case '€': $ziffer="euro";    break;
                                 case '.': $ziffer="punkt";     break;
                                 case '-': $ziffer="minus";     break;
                                 case ' ': $ziffer="space";     break;
                        }
                        $buffer.='<td><img src="'.$_SESSION['INI']['numberToPicture']['imagePath'].$ziffer.'.gif"></td>';
                }
                $buffer.='</tr></table></td></tr><tr><td class=preisMessage>'.$_SESSION['INI']['numberToPicture']['message'].'</td></tr></table>';
                return $buffer;
        }

        function numberToPicture2($zahl)
        {
                $buffer='<table width=146 height=65 background="'.$_SESSION['INI']['numberToPicture']['imagePath2'].'schild.gif"><tr><td align=center><table border=0 cellspacing=0 cellpadding=0><tr>';
                
                //$zahl = str_replace(",00", ",-", $zahl); 

                $laenge = strlen($zahl);
                for($i=0 ; $i < $laenge ; $i++)
                {
                        $ziffer = substr($zahl , $i , 1);
                        
                        switch($ziffer)
                        {
                                 case ',': $ziffer="komma";     break;
                                 case '€': $ziffer="euro";    break;
                                 case '.': $ziffer="punkt";     break;
                                 case '-': $ziffer="minus";     break;
                                 case ' ': $ziffer="space";     break;
                        }
                        $buffer.='<td><img src="'.$_SESSION['INI']['numberToPicture']['imagePath2'].$ziffer.'.gif"></td>';
                }
                $buffer.='</tr></table></td></tr></table>';
                return $buffer;
        }

        function numberToPicture3($zahl)
        {
                $zahl = $zahl."€";
                $buffer='<table border=0 cellspacing=0 cellpadding=0 width=165><tr><td height=34 background="'.$_SESSION['INI']['numberToPicture']['imagePath3'].'schild.gif"><table border=0 cellspacing=0 cellpadding=0 align=center><tr>';
                
                //$zahl = str_replace(",00", ",-", $zahl); 

                $laenge = strlen($zahl);
                for($i=0 ; $i < $laenge ; $i++)
                {
                        $ziffer = substr($zahl , $i , 1);
                        
                        switch($ziffer)
                        {
                                 case ',': $ziffer="komma";     break;
                                 case '€': $ziffer="euro";    break;
                                 case '.': $ziffer="punkt";     break;
                                 case '-': $ziffer="minus";     break;
                                 case ' ': $ziffer="space";     break;
                        }
                        $buffer.='<td><img src="'.$_SESSION['INI']['numberToPicture']['imagePath3'].$ziffer.'.gif"></td>';
                }
                $buffer.='</tr></table></td></tr><tr><td><a hre="#">'.$_SESSION['INI']['numberToPicture']['message'].'</a></td></tr></table>';
                return $buffer;
        }
?>