<?php

if (isset($_GET['akce'])) {
    
$akce $_GET['akce'];
    
    switch (
$akce) {
        case 
"dolly":
        echo 
dolly();
        break;
        
        default:
        echo 
"chyba('Byla zavolána neplatná metoda!');";
        break;
    }
}

function 
dolly() {
    
$lyrics "Hello, Dolly
    Well, hello, Dolly
    It's so nice to have you back where you belong
    You're lookin' swell, Dolly
    I can tell, Dolly
    You're still glowin', you're still crowing
    You're still goin' strong
    We feel the room swaying
    While the band's playing
    One of your old favourite songs from way back when
    So, take her wrap, fellas
    Find her an empty lap, fellas
    Dolly'll never go away again
    Hello, Dolly
    Well, hello, Dolly
    It's so nice to have you back where you belong
    You're lookin' swell, Dolly
    I can tell, Dolly
    You're still glowin', you're still crowing
    You're still goin' strong
    One of your old favourite songs from way back when
    Golly, gee, fellas
    Find her a vacant knee, fellas
    Dolly'll never go away
    Dolly'll never go away
    Dolly'll never go away again"
;
    
    
$lyrics explode("\n"$lyrics);
    
    
$vybrano $lyricsmt_rand(0, (count($lyrics)-1) ) ];
    
    return 
"vypisText('<p><strong>".date("d.m.Y H:i:s")."</strong>: ".addslashes($vybrano)."</p>')";
}

?>