Goodgame Empire

The Irish girl knelt in the confessional and said, "Bless me, Father, for I have sinned."

"What is it, child?"

The girl said, "Father, I have committed the sin of vanity. Twice a day I gaze at myself in the mirror and tell myself how beautiful I am."

The priest turned, took a good look at the girl, and said, "My dear, I have good news. That isn't a sin - it's only a mistake."
$x) { if($CURRENT_IMAGE == $img_listing[$x]) { if($x == 0) { //echo "found condition"; $lastimage = count($img_listing) - 1; $PREV_IMG = $img_listing[$lastimage]; $PREV_STUB= $stubs[$lastimage]; $NEXT_IMG = $img_listing[$x + 1]; $NEXT_STUB= $stubs[$x + 1]; } elseif(count($img_listing) - 1 == $x) { //echo "found condition"; $PREV_IMG = $img_listing[$x - 1]; $PREV_STUB= $stubs[$x - 1]; $NEXT_IMG = $img_listing[0]; $NEXT_STUB= $stubs[0]; } else { //echo "found condition"; $NEXT_IMG = $img_listing[$x + 1]; $NEXT_STUB= $stubs[$x + 1]; $PREV_IMG = $img_listing[$x - 1]; $PREV_STUB= $stubs[$x - 1]; } } $x++; } $total_jokes = count($stubs) - 1; $rand_joke = rand(0, $total_jokes); echo '

<-- PREVIOUS JOKE'; echo '   ' . 'RANDOM JOKE   '; echo 'NEXT JOKE -->'; ?>