Forms restructuring
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							4c7c93d691
						
					
				
				
					commit
					657d1cc0fe
				
			@@ -21,15 +21,15 @@
 | 
			
		||||
        $usernames = array();
 | 
			
		||||
        $email = array();
 | 
			
		||||
        $rol = array();
 | 
			
		||||
        if(is_array($managers)){ 
 | 
			
		||||
            foreach($managers as $key => $value){
 | 
			
		||||
                $ids[$key] = $value->getId();
 | 
			
		||||
                $idscinemas[$key] = $value->getIdcinema();
 | 
			
		||||
                $usernames[$key] = $value->getUsername();
 | 
			
		||||
                $email[$key] = $value->getEmail();
 | 
			
		||||
                $rol[$key] = $value->getRoll();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        foreach($managers as $key => $value){
 | 
			
		||||
            $ids[$key] = $value->getId();
 | 
			
		||||
            $idscinemas[$key] = $value->getIdcinema();
 | 
			
		||||
            $usernames[$key] = $value->getUsername();
 | 
			
		||||
            $email[$key] = $value->getEmail();
 | 
			
		||||
            $rol[$key] = $value->getRoll();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
        echo "<div class='row'>
 | 
			
		||||
            <div class='column side'></div>
 | 
			
		||||
@@ -47,38 +47,36 @@
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                "; 
 | 
			
		||||
        if(is_array($managers)){         
 | 
			
		||||
            for($i = 0; $i < count($managers); $i++){
 | 
			
		||||
                echo '<tr>
 | 
			
		||||
                        <td>'. $ids[$i] .'</td>
 | 
			
		||||
                        <td>'. $idscinemas[$i] .'</td>
 | 
			
		||||
                        <td>'. $usernames[$i] .'</td>
 | 
			
		||||
                        <td>'. $email[$i] .'</td>
 | 
			
		||||
                        <td>'. $rol[$i] .'</td>
 | 
			
		||||
                        <td>
 | 
			
		||||
                            <form method="post" action="index.php?state=mg">
 | 
			
		||||
                                <input  name="id" type="hidden" value="'.$ids[$i].'">
 | 
			
		||||
                                <input  name="idcinema" type="hidden" value="'.$idscinemas[$i].'">
 | 
			
		||||
                                <input  name="username" type="hidden" value="'.$usernames[$i].'">
 | 
			
		||||
                                <input  name="email" type="hidden" value="'.$email[$i].'">
 | 
			
		||||
                                <input  name="rol" type="hidden" value="'.$rol[$i].'">
 | 
			
		||||
                                <input type="submit" id="submit" value="Editar" name="edit_manager" class="primary" />
 | 
			
		||||
                            </form> 
 | 
			
		||||
                        </td> 
 | 
			
		||||
                        <td> 
 | 
			
		||||
                            <form method="post" action="index.php?state=mg">
 | 
			
		||||
                                <input  name="id" type="hidden" value="'.$ids[$i].'">
 | 
			
		||||
                                <input  name="idcinema" type="hidden" value="'.$idscinemas[$i].'">
 | 
			
		||||
                                <input  name="username" type="hidden" value="'.$usernames[$i].'">
 | 
			
		||||
                                <input  name="email" type="hidden" value="'.$email[$i].'">
 | 
			
		||||
                                <input  name="rol" type="hidden" value="'.$rol[$i].'">
 | 
			
		||||
                                <input type="submit" id="submit" value="Eliminar" name="delete_manager" class="primary" />
 | 
			
		||||
                            </form> 
 | 
			
		||||
                        </td> 
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    '; 
 | 
			
		||||
            } 
 | 
			
		||||
        }
 | 
			
		||||
        for($i = 0; $i < count($managers); $i++){
 | 
			
		||||
            echo '<tr>
 | 
			
		||||
                    <td>'. $ids[$i] .'</td>
 | 
			
		||||
                    <td>'. $idscinemas[$i] .'</td>
 | 
			
		||||
                    <td>'. $usernames[$i] .'</td>
 | 
			
		||||
                    <td>'. $email[$i] .'</td>
 | 
			
		||||
                    <td>'. $rol[$i] .'</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <form method="post" action="index.php?state=mg">
 | 
			
		||||
                            <input  name="id" type="hidden" value="'.$ids[$i].'">
 | 
			
		||||
                            <input  name="idcinema" type="hidden" value="'.$idscinemas[$i].'">
 | 
			
		||||
                            <input  name="username" type="hidden" value="'.$usernames[$i].'">
 | 
			
		||||
                            <input  name="email" type="hidden" value="'.$email[$i].'">
 | 
			
		||||
                            <input  name="rol" type="hidden" value="'.$rol[$i].'">
 | 
			
		||||
                            <input type="submit" id="submit" value="Editar" name="edit_manager" class="primary" />
 | 
			
		||||
                        </form> 
 | 
			
		||||
                    </td> 
 | 
			
		||||
                    <td> 
 | 
			
		||||
                        <form method="post" action="index.php?state=mg">
 | 
			
		||||
                            <input  name="id" type="hidden" value="'.$ids[$i].'">
 | 
			
		||||
                            <input  name="idcinema" type="hidden" value="'.$idscinemas[$i].'">
 | 
			
		||||
                            <input  name="username" type="hidden" value="'.$usernames[$i].'">
 | 
			
		||||
                            <input  name="email" type="hidden" value="'.$email[$i].'">
 | 
			
		||||
                            <input  name="rol" type="hidden" value="'.$rol[$i].'">
 | 
			
		||||
                            <input type="submit" id="submit" value="Eliminar" name="delete_manager" class="primary" />
 | 
			
		||||
                        </form> 
 | 
			
		||||
                    </td> 
 | 
			
		||||
                </tr>
 | 
			
		||||
                '; 
 | 
			
		||||
        } 
 | 
			
		||||
        echo'</tbody>
 | 
			
		||||
                </table>
 | 
			
		||||
            </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user