Merge branch 'master' of grond.iut-fbleau.fr:teissier/SAe-PHP-S2
merge
This commit is contained in:
		@@ -8,6 +8,8 @@ class Albums extends CI_Controller {
 | 
			
		||||
		$this->load->model('model_music');
 | 
			
		||||
		$this->load->library('session');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	public function index(){
 | 
			
		||||
		$genre = $this->input->get('genre');
 | 
			
		||||
		$order = $this->input->get('order');
 | 
			
		||||
@@ -21,11 +23,11 @@ class Albums extends CI_Controller {
 | 
			
		||||
		$data = array(
 | 
			
		||||
			'albums' => $albums,
 | 
			
		||||
			'is_logged_in' => $is_logged_in,
 | 
			
		||||
			'genres' => $genre,
 | 
			
		||||
			'artistes' => $artist
 | 
			
		||||
 | 
			
		||||
			'genres' => $genres,
 | 
			
		||||
			'artistes' => $artists
 | 
			
		||||
		);
 | 
			
		||||
		$this->load->view('layout/header',$data);
 | 
			
		||||
		$this->load->view('layout/getter',$data);
 | 
			
		||||
		$this->load->view('albums_list', $data);
 | 
			
		||||
		$this->load->view('layout/footer');
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								application/views/layout/getter.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/views/layout/getter.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<form methode="GET">
 | 
			
		||||
    <input type="text" name="query" palceholder="Rechercher...">
 | 
			
		||||
</form>
 | 
			
		||||
<form methode="GET">
 | 
			
		||||
        <select name="artist" id="artist">
 | 
			
		||||
            <option value=''>Tous</option>
 | 
			
		||||
            <?php foreach($artistes as $artiste){
 | 
			
		||||
                echo "<option value='{$artiste->name}'>{$artiste->name}</option>";
 | 
			
		||||
            }
 | 
			
		||||
            ?>
 | 
			
		||||
            </select>
 | 
			
		||||
 | 
			
		||||
            <select name="genre" id="genre">
 | 
			
		||||
            <option value=''>Tous</option>
 | 
			
		||||
            <?php foreach($genres as $genre){
 | 
			
		||||
            echo "<option value='{$genre->name}'>{$genre->name}</option>";
 | 
			
		||||
            }
 | 
			
		||||
            ?>
 | 
			
		||||
            </select>
 | 
			
		||||
 | 
			
		||||
            <select name="order" id="order">
 | 
			
		||||
            <option value="">Ordre :</option>
 | 
			
		||||
                <option value="asc">Croissant</option>
 | 
			
		||||
                <option value="desc">Decroissant</option>
 | 
			
		||||
            </select>
 | 
			
		||||
                <button type="submit">Envoyer</button>
 | 
			
		||||
</form>
 | 
			
		||||
</main>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -14,8 +14,10 @@
 | 
			
		||||
    <main class='container'>
 | 
			
		||||
    <nav>
 | 
			
		||||
        <ul>
 | 
			
		||||
            <li><strong>Dix heures</strong></li>
 | 
			
		||||
            <h2><strong>Dix heures</strong></h2>
 | 
			
		||||
            
 | 
			
		||||
        </ul>
 | 
			
		||||
                
 | 
			
		||||
        <ul>
 | 
			
		||||
            <li><?= anchor('albums', 'Albums'); ?></li>
 | 
			
		||||
            <li><?= anchor('artistes', 'Artistes'); ?></li>
 | 
			
		||||
@@ -28,30 +30,4 @@
 | 
			
		||||
        </ul>
 | 
			
		||||
    </nav>
 | 
			
		||||
 | 
			
		||||
    <form methode="GET">
 | 
			
		||||
        <select name="artist" id="artist">
 | 
			
		||||
            <option value=''>Tous</option>
 | 
			
		||||
            <?php foreach($artistes as $artiste){
 | 
			
		||||
                echo "<option value='{$artiste->name}'>{$artiste->name}</option>";
 | 
			
		||||
            }
 | 
			
		||||
            ?>
 | 
			
		||||
            </select>
 | 
			
		||||
 | 
			
		||||
            <select name="genre" id="genre">
 | 
			
		||||
            <option value=''>Tous</option>
 | 
			
		||||
            <?php foreach($genres as $genre){
 | 
			
		||||
            echo "<option value='{$genre->name}'>{$genre->name}</option>";
 | 
			
		||||
            }
 | 
			
		||||
            ?>
 | 
			
		||||
            </select>
 | 
			
		||||
 | 
			
		||||
            <select name="order" id="order">
 | 
			
		||||
            <option value="">Ordre :</option>
 | 
			
		||||
                <option value="asc">Croissant</option>
 | 
			
		||||
                <option value="desc">Decroissant</option>
 | 
			
		||||
            </select>
 | 
			
		||||
                <button type="submit">Envoyer</button>
 | 
			
		||||
	</form>
 | 
			
		||||
</main>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user