<?php

session_start();

    require_once('../libs/Ultraviolet.php');
	
	require_once('../libs/Database.php');
	
	require_once('../libs/AdminFunctions.php');
		
	$database =& DatabaseConnect::getInstance();
	
	$database->query("SET CHARACTER SET utf8");
	
	$functions =& AdminFunctions::getInstance();


for($i = 0; $i < count($_POST); $i++):

		${key($_POST)} = $_POST[key($_POST)];

		next($_POST);	

	endfor;
?>

<li class="select-current">



	<fieldset>
    
    	<select id="<?=$next?>-<?=$day?>-client" class="forms <?=$day?>" >
        
			<option value="default" selected="selected">Izaberi klijenta</option>
            
            <?php 
				
				$database->setBareQuery("SELECT id, name FROM client ORDER BY name");

				$clientid = $database->loadResultArray(0);
		
				$clientname = $database->loadResultArray(1);
		
				for($z = 0; $z < count($clientid); $z++): 
			
			?>
            <option value="<?=$clientid[$z]?>"><?=$clientname[$z]?></option>
            
            <?php endfor; ?>
            
		</select>  
        
	</fieldset>
    
    <div id="project-holder-<?=$day?><?=$next?>">
    
    <fieldset>
    	
        <select id="" class="forms project"  disabled="disabled">
        
			<option value="default">Izaberi projekat</option>
                        
		</select>  
    
    	
    
    </fieldset>
    

    

     
	
    
    </div>
    
    <fieldset>
        
		
        
			<input type="text" value="opis" class="forms input" id="<?=$next?>-<?=$day?>-desc" /> 
            
		</select> 
       
	</fieldset> 
        
	

     <fieldset>

            <select id="<?=$next?>-<?=$day?>-hour" class="forms-duration <?=$day?>-time">
            
            	<option value="0">0</option>
            
            	<?php for($g = 1; $g < 25; $g++): ?>
        
				<option value="<?=$g?>"><?=$g?></option>
                
                <?php endfor; ?>
            
       		</select>
            
            <span class="left"> sati </span>
       
       		<select id="<?=$next?>-<?=$day?>-minute" class="forms-duration <?=$day?>-time">
            
            	

        
				<option value="0">0</option>
                
                <option value="0.5">30</option>
            
       		</select>
            
            <span class="left"> min. </span>
            
            </fieldset>
            
            
      



</form>

</li>

