Пример #1
0
					</select>
					<input type="submit" name="ok" value="ok" onClick="return(confirm(\'Voulez-vous vraiment modifier le statut du membre n°' . $ligne['id_membre'] . ' ? \'));" />
				</form>
			</td>';
            } elseif ($indice != 'mdp' && $indice != 'photo') {
                echo '<td ><a class="lien_tr" href="?affichage=affichage&action=detail&id_membre=' . $ligne['id_membre'] . '' . $page . '' . $orderby . '' . $asc_desc . '#details" >' . ucfirst($valeur) . '</a></td>';
            }
        }
        echo '<td>
				<a class="btn_delete" href="?affichage=affichage&action=suppression&id_membre=' . $ligne['id_membre'] . '' . $page . '' . $orderby . '' . $asc_desc . '" onClick="return(confirm(\'Voulez-vous vraiment supprimer le membre n°' . $ligne['id_membre'] . ' ? (il sera désinscrit de la newsletter)\'));"> X </a>
			</td>
		</tr> ';
    }
    echo '</table>
		<br />';
    affichagePaginationGestion(5, 'membre', '');
    echo '<br />';
}
if (isset($_GET['action']) && $_GET['action'] == 'detail') {
    if (isset($_GET['id_membre'])) {
        $statut_membre = executeRequete("SELECT statut FROM membre WHERE id_membre = '{$_GET['id_membre']}'");
        $statut = $statut_membre->fetch_assoc();
        //BAR /MEMBRE
        if ($statut['statut'] == '2' || $statut['statut'] == '3') {
            echo '<div class="box_info no_border" id="details">
					<h3>Bars</h3>';
            $id_utilisateur = $_SESSION['utilisateur']['id_membre'];
            $req = "SELECT bar.id_bar, bar.id_membre, bar.nom_bar, bar.photo, bar.nom_gerant, bar.prenom_gerant, bar.cp, bar.telephone, bar.email, bar.statut FROM bar  WHERE bar.id_membre = '{$_GET['id_membre']}' ORDER BY bar.statut DESC";
            $resultat = executeRequete($req);
            $nb_bars = $resultat->num_rows;
            echo '<table>';
Пример #2
0
$dont_link = '';
enteteTableau($resultat, $dont_show, $dont_link);
while ($ligne = $resultat->fetch_assoc()) {
    echo '<tr>';
    foreach ($ligne as $indice => $valeur) {
        // foreach = pour chaque element du tableau
        if ($indice == 'date') {
            $date1 = date_create_from_format('Y-m-d H:i:s', $ligne['date']);
            echo '<td>' . date_format($date1, 'd/m/Y H:i') . ' </td>';
        } elseif ($indice == 'id_bar') {
            echo '<td><a href="' . RACINE_SITE . 'fiche_bar.php?id_bar=' . $ligne['id_bar'] . '">' . $ligne['id_bar'] . '</a></td>';
        } else {
            echo '<td >' . ucfirst($valeur) . '</td>';
        }
    }
    echo '<td><a href="?affichage=affichage&action=suppression&id_avis=' . $ligne['id_avis'] . '" class="btn_delete" onClick="return(confirm(\'En êtes-vous certain ?\'));"> X </a>
		</td>
	</tr>';
}
echo '</table>
	<br />';
affichagePaginationGestion(10, 'avis', '');
echo '<br /><br />';
require_once "../inc/footer.inc.php";
?>
					
		



Пример #3
0
        if ($ligne['etat'] == 'en cours de traitement') {
            echo '<a class="btn_edit" href="?affichage=affichage&action=commandes&modif=valider&id_commande=' . $ligne['id_commande'] . $page . '' . $orderby . '' . $asc_desc . '" class="btn" onClick="return(confirm(\'Valider la commande n° ' . $ligne['id_commande'] . ' ?\'));">valider</a>';
        } elseif ($ligne['etat'] == 'validee') {
            echo '<a class="btn_edit" href="?affichage=affichage&action=commandes&modif=expedier&id_commande=' . $ligne['id_commande'] . $page . '' . $orderby . '' . $asc_desc . '" class="btn" onClick="return(confirm(\'expédier la commande n° ' . $ligne['id_commande'] . ' ?\'));">expédier</a>';
        } else {
            echo '<p>Commande traitée</p>';
        }
        echo '</td>
		<td>
			<a class="btn_delete" href="?affichage=affichage&action=commandes&modif=suppression&id_commande=' . $ligne['id_commande'] . $page . '' . $orderby . '' . $asc_desc . '" onClick="return(confirm(\'Voulez-vous vraiment supprimer la commande n° ' . $ligne['id_commande'] . ' ?\'));"> X </a>
		</td>
		</tr>';
    }
    echo '</table>
		<br />';
    if (isset($_GET['affichage']) && $_GET['affichage'] == 'affichage' && (isset($_GET['action']) && $_GET['action'] == 'commandes')) {
        $lien = '<a href="?affichage=affichage&action=commandes&';
        affichagePaginationGestion(15, 'commande', $lien);
    }
    echo '</div>';
}
?>
		
	
	
	
	 
	 <br />
	 <br />
<?php 
require_once "../inc/footer.inc.php";
Пример #4
0
                } else {
                    echo '<td class="tomato">en attente de validation</td>';
                    echo '<td>
						<a class="btn_edit" href="?affichage=affichage&modif=activer&id_bar=' . $ligne['id_bar'] . $page . '' . $orderby . '' . $asc_desc . '#details" class="btn" onClick="return(confirm(\'En êtes-vous certain ?\'));">activer</a>
					</td>';
                }
            } else {
                echo '<td >' . ucfirst($valeur) . '</td>';
            }
        }
        echo '<td><a href="?affichage=affichage&action=suppression&id_bar=' . $ligne['id_bar'] . '' . $page . '' . $orderby . '' . $asc_desc . '#details" class="btn_delete" onClick="return(confirm(\'En êtes-vous certain ?\'));">X</a></td>';
        echo '<td><a href="?affichage=affichage&action=modification&id_bar=' . $ligne['id_bar'] . '' . $page . '' . $orderby . '' . $asc_desc . '#details" class="btn_edit">éditer</a></td>';
        echo '</tr>';
    }
    echo '</table><br />';
    affichagePaginationGestion(7, 'bar', '');
}
//DETAILS MEMBRE
if (isset($_GET['id_membre'])) {
    if (isset($_GET['action']) && $_GET['action'] == 'detail' && isset($_GET['info']) == 'membre') {
        //On affiche les infos du membre associé au bar :
        echo '<h4 id="details">Membre N° ' . $_GET['id_membre'] . '</h4>';
        $resultat = executeRequete("SELECT * FROM membre WHERE id_membre = '{$_GET['id_membre']}'");
        echo '<table >';
        $dont_link = 'nono';
        // entete du tablau sans order by
        $dont_show = 'photo';
        // colonne non affichée
        enteteTableau($resultat, $dont_show, $dont_link);
        //entete tableau
        while ($ligne = $resultat->fetch_assoc()) {
Пример #5
0
        }
        echo '<td><a class="btn_delete" href="?affichage=affichage&action=suppression&id_promo_produit=' . $ligne['id_promo_produit'] . $page . '' . $orderby . '' . $asc_desc . '" onClick="return(confirm(\'En êtes-vous certain ?\'));"> X </a>
			</td>
				<td>
		<a class="btn_edit" href="?action=modifier&id_promo_produit=' . $ligne['id_promo_produit'] . $page . '' . $orderby . '' . $asc_desc . '" >éditer</a>
			</td>
		</tr>';
    }
    echo '</table>
		<br />';
    if (isset($_GET['detail']) && $_GET['detail'] == 'produit' && isset($_GET['id_promo_produit'])) {
        $lien = '<a href="?affichage=affichage&detail=produit&id_promo_produit=' . $_GET['id_promo_produit'] . '&';
    } else {
        $lien = '';
    }
    affichagePaginationGestion(15, 'promo_produit', $lien);
}
// DETAILS PRODUITS/PROMO
if (isset($_GET['detail']) && $_GET['detail'] == 'produit' && isset($_GET['id_promo_produit'])) {
    echo '<h3>Produits concernés par le code promo N° ' . $_GET['id_promo_produit'] . '</h3>';
    echo '<table class="large_table" id="details">';
    $resultat = executeRequete("SELECT * FROM produit WHERE id_promo_produit = '{$_GET['id_promo_produit']}'");
    if (!$resultat) {
        echo '<div class="msg_erreur">Ce code promo n\'est actif sur aucun produit</div>';
    } else {
        $dont_link = 'nono';
        // entete du tablau sans order by
        $dont_show = 'description';
        // colonne non affichée
        enteteTableau($resultat, $dont_show, $dont_link);
        //entete tableau
Пример #6
0
$resultat_ville = executeRequete("SELECT DISTINCT ville FROM bar WHERE statut='1' ORDER BY ville");
while ($ligne = $resultat_ville->fetch_assoc()) {
    echo ' <a class="';
    if (isset($ville) && $ville == $ligne['ville']) {
        echo ' actif ';
    }
    echo 'button" style="margin-bottom: 20px;" href="?tri=ville&ville=' . $ligne['ville'] . '" > ' . $ligne['ville'] . ' </a> | ';
}
echo '<br /><a class="';
if (isset($tri) && $tri == 'all') {
    echo ' actif ';
}
echo 'button" style="margin-bottom: 20px;" href="?tri=all" >Tous les bars</a>';
echo '<br /><a class="';
if (isset($tri) && $tri == 'alpha' && isset($_GET['asc'])) {
    echo ' actif ';
}
echo 'button" style="margin-bottom: 20px;" href="?tri=alpha&asc" >A-Z</a>';
echo ' | <a class="';
if (isset($tri) && $tri == 'alpha' && isset($_GET['desc'])) {
    echo ' actif ';
}
echo 'button" style="margin-bottom: 20px;" href="?tri=alpha&desc" >Z-A</a>';
$req = paginationGestion(9, $table, $req);
$lien = "";
echo '<div class="block_inline box_info no_border">';
afficheVignetteBar($req);
echo '</div>';
affichagePaginationGestion(9, $table, $lien);
echo '<br /><br />';
require_once 'inc/footer.inc.php';
Пример #7
0
				<input type="hidden" name="id_taille_stock" value="' . $ligne_taille_stock['id_taille_stock'] . '" />
				<input type="hidden" name="id_produit" value="' . $ligne_taille_stock['produit'] . '" />
				<p style="font-weight: bold; font-size: 2em; width: 40%; float: left;">' . $ligne_taille_stock['taille'] . ' x </p>
				<input type="number" style="float: left; width: 30%" name="stock" value="' . $ligne_taille_stock['stock'] . '" />
				<input type="submit" style="width: 80%; padding: 1%;" name="modif_stock" value="modifier le stock" />
			</form>';
            echo '</li><br/>';
        }
        echo '</ul></td>';
        echo '<td><a href="?action=suppression&id_produit=' . $ligne['id_produit'] . $page . '' . $orderby . '' . $asc_desc . '" class="btn_delete" onClick="return(confirm(\'En êtes-vous certain ?\'));">X</a></td>';
        echo '<td><a href="?action=modification&id_produit=' . $ligne['id_produit'] . $page . '' . $orderby . '' . $asc_desc . '" class="btn_edit">éditer</a></td>';
        echo '</tr>';
    }
    echo '</table><br />';
    //echo '</div>';
    affichagePaginationGestion(5, 'produit', '');
}
// FORMULAIRE AJOUT / MODIF
if (isset($_GET['action']) && ($_GET['action'] == 'ajout' || $_GET['action'] == 'modification')) {
    // MODIFIER ou AJOUTER  -> FORMULAIRE D'AJOUT (pré-rempli si modif)
    if (isset($_GET['id_produit'])) {
        $resultat = executeREquete("SELECT * FROM produit WHERE id_produit ='{$_GET['id_produit']}'");
        $produit_actuel = $resultat->fetch_assoc();
        // debug($produit_actuel);
    }
    echo '<form  class="form" method="post" action="" enctype="multipart/form-data">
	 <fieldset>
		 <legend >';
    if (isset($_GET['id_produit']) && $_GET['action'] == 'modifier') {
        echo 'Modifier le produit n°';
        if (isset($produit_actuel['id_produit'])) {