PHP CU3ER XML Configuration

This file is for cu3er v0.9.2

I wrote this PHP file to help me use awesome Cu3er 3D flash image slider.
Main function of this file is to read all images inside directory a assign random transition effect on. You can add your own effects in $effects array.
You have to change eg cu3er.xml to cu3er.php in JavaScript embedding, and few variables inside this PHP. You'll figure it out.

/**
 * CU3ER PHP XML Configuration
 * @author webarto.com
 * @copyright 2010
 */

$slides = "";
$dir = "cu3er";

function effect(){
srand((double)microtime()*1234567);
$effects = array(
'num="3" slicing="vertical" direction="down" cube_color="0xFFFFFF"',
'num="4" direction="right" shader="flat" cube_color="0xFFFFFF"',
'num="6" slicing="vertical" direction="up" shader="flat" delay="0.05" z_multiplier="4" cube_color="0xFFFFFF"',
'num="4" direction="right" shader="phong" cube_color="0xFFFFFF"');
return $effects[mt_rand(0,count($effects)-1)];
}

$folder = scandir($dir);
foreach($folder as $file){
    if(strpos(strtolower($file),".jpg")>0){
        $slides.= '<slide><url>/'.$dir.'/'.$file.'</url></slide><transition '.effect().' />'."\n";
    }
}

header("Content-Type: text/xml");
echo('<?xml version="1.0" encoding="utf-8" ?>
<cu3er>
     <settings>
    
          <auto_play>
          <defaults symbol="circular" time="3" />
          <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
          <tweenOut tint="0xFFFFFF"/>
          </auto_play>          
    
         <prev_button>
               <defaults round_corners="5,5,5,5"/>
               <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
               <tweenOut tint="0x000000" />
          </prev_button>
          
         <prev_symbol>
               <tweenOver tint="0x000000" />               
          </prev_symbol>
          
         <next_button>
               <defaults round_corners="5,5,5,5"/>               
               <tweenOver tint="0xFFFFFF"  scaleX="1.1" scaleY="1.1"/>
               <tweenOut tint="0x000000" />
          </next_button>
          
         <next_symbol>
               <tweenOver tint="0x000000" />
          </next_symbol>     
               
     </settings>    

     <slides>
'.$slides.'                    
     </slides>
</cu3er>');
©2009-2011 Webarto • web design & development • Tuzla // Sarajevo // Beograd