Bouton se déconnecter

Résolu/Fermé
chaima.abdouli Messages postés 94 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 septembre 2015 - 29 juil. 2015 à 12:41
[TiDi] Messages postés 126 Date d'inscription samedi 19 octobre 2013 Statut Membre Dernière intervention 17 juillet 2016 - 29 juil. 2015 à 16:45
Bonjour ,

Je veux ajouter un bouton pour permettre aux utilisateurs de se déconnecter de mon site ( oscommerce )

4 réponses

chaima.abdouli Messages postés 94 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 septembre 2015 2
29 juil. 2015 à 14:02


<?php
/*
  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
define('DIR_WS_TEMPLATE_IMAGES', 'templates/Original/images/');

// WebMakers.com Added: Down for Maintenance
// Hide header if not to show
if (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') {

if (SITE_WIDTH!='100%') {
?>  
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr><td>
        <table CELLSPACING="0" CELLPADDING="0" BORDER="0"  class="main" width="<?php echo SITE_WIDTH;?>" align="center">
          <tr><td>
            <table border="0" width="100%"><tr><td>
<?php
    }
?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr class="header">
    <td valign="bottom">
    <table width="100%">
    <tr>
    <td class="newlogo">
        <a href="http://www.vintage-motors.net/index.php"><img src="logo-vintage.png"></a>
    </td>
    <td class="header_moto" rowspan="2">
        <!--PLACE DU BANDEAU-->
        <a href="http://www.vintage-motors.net/products_new.php">
            <img src="Vintage-Motors-Magasin-Retro.png">
        </a>
        <!--<object type="application/x-shockwave-flash" data="bvintage-sa.swf" width="600" height="150"> 		   		 
	       <param name="movie" value="bvintage-sa.swf" />
           D?couvrez tous les casques moto sur vintage-motors.net accessoires moto et scooter pour les motards et moto vintage.<br>
           Des marques prestigieuses de casques, blousons en cuir, bottes, gants ?toffent notre catalogue :
           BELSTAFF, CROMWELL, DAVIDA, SOUBIRAC, BELL, BLH, SPIDI...
        </object>-->
        
        <!-- FIN BANDEAU -->
    </td>
    <td align="right" valign="top"><?php
// show Cart Details
 if (SHOW_CART_IN_HEADER=='yes') {
?>
        <table class="header-contact">
            <tr height="41px">
                <th colspan="2">
                    <p>Recherche produit :</p>
                    <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'onSubmit="return check_form(this);"') . tep_hide_session_id(); ?>
                    <br />
                    <?php
                    echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
                    echo tep_draw_input_field('keywords', '', 'size="25" maxlength="40" style="width: ' . (BOX_WIDTH-10) . 'px"');
                    echo tep_hide_session_id() .''. tep_image_submit('search-logo.png', BOX_HEADING_SEARCH,'class="log-search"');
                    ?></form>
                    <a class="contact" href="contact_us.php">CONTACT</a>
                </th>
            </tr>
            <tr height="130px" text-align="right">
                <td class="info-contact">
                    <b><p>Vintage-Motors.net<br />
                        <a href="tel:+33143573330">01.43.57.33.30</a><br />
                    du Lundi au Vendredi<br />
                    10h-13h et 14h-18h</p></b>
                    
                    <p><a class="link-point-vente" href="point-de-vente-belstaff-paris.php">Nos boutiques Vintage Motors</a>                    
                    Lundi au Samedi |
                    10h-19h30</p>
                </td>
                <td>
                    <div class="produit-choose">
                    <img src="shopping.png"><br />
                    <?php echo $cart->count_contents() . ($cart->count_contents() == "1" ? " Article" : " Articles "); ?><br />
                    Prix: <?php echo $currencies->format($cart->show_total()); ?>
                </div>
                </td>
				<!--<?php //echo $cart->show_weight() . ($cart->show_weight() == "1" ? " kg" : " kgs ");?> ]-->
				</tr>
				</table>
<?php
}
?></td>
    </tr>
    </table>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1" class="navigation-tool">
  <tr>
    <td class="headerNavigation2"> <?php echo $breadcrumb->trail(' > '); ?></td>
    <td align="right" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="black"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="black"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="black"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
  </tr>
</table>

<?php
}
?>
<!-- header_eof //-->









1
[TiDi] Messages postés 126 Date d'inscription samedi 19 octobre 2013 Statut Membre Dernière intervention 17 juillet 2016 262
29 juil. 2015 à 16:45
Le mieux ça serait à la ligne 102, après je sais pas ce que ça peut donner sur ton site.
<a href="deconnexion.php">Déconnexion</a>


Après pour le code PHP, je ne sais pas du tout comment le code est généré, par quels moyens et tout ... Et à mon avis, même toi, alors que c'est ton site, tu ne dois pas avoir accès au code PHP dit "modèle" et "contrôleur" ... En gros, le code pur du site. Ici, tu m'as donné que le code "vue".
0
beniboyx Messages postés 214 Date d'inscription mercredi 8 juillet 2015 Statut Membre Dernière intervention 29 août 2015 57
29 juil. 2015 à 12:48
0
[TiDi] Messages postés 126 Date d'inscription samedi 19 octobre 2013 Statut Membre Dernière intervention 17 juillet 2016 262
29 juil. 2015 à 12:48
C'est toi qui fait le code de ton site ? Si oui :
<a href="deconnexion.php">Déconnexion</a>

Et sur le script "deconnexion.php" :
$_SESSION = array();
session_destroy();
header("location:index.php");



0
chaima.abdouli Messages postés 94 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 septembre 2015 2
29 juil. 2015 à 12:52
Non c'est pas moi qui fait le code ! c'est un site osccomerce comme prestashop et donc je veux ajouter ce bouton mais je ne sais pas ou exactement j'ajoute ces lignes de code
0
beniboyx Messages postés 214 Date d'inscription mercredi 8 juillet 2015 Statut Membre Dernière intervention 29 août 2015 57
29 juil. 2015 à 12:54
Rooohhh really ? c'est pas bien

apprends à coder en JS PHP et .. c'est beaucoup mieux = D , dsl je peux pas t'aider sur ça :s.
0
[TiDi] Messages postés 126 Date d'inscription samedi 19 octobre 2013 Statut Membre Dernière intervention 17 juillet 2016 262
29 juil. 2015 à 13:11
Copie/colle ton code en commentaire ;) je te dirais où l'ajouter.
0
chaima.abdouli Messages postés 94 Date d'inscription mercredi 17 juin 2015 Statut Membre Dernière intervention 3 septembre 2015 2
29 juil. 2015 à 14:04
<




<?php
/*
$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
  • /define('DIR_WS_TEMPLATE_IMAGES', 'templates/Original/images/');// WebMakers.com Added: Down for Maintenance// Hide header if not to showif (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') {if (SITE_WIDTH!='100%') {?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td> <table CELLSPACING="0" CELLPADDING="0" BORDER="0" class="main" width="<?php echo SITE_WIDTH;?>" align="center"> <tr><td> <table border="0" width="100%"><tr><td><?php }?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="bottom"> <table width="100%"> <tr> <td class="newlogo"> <a href="https://vintage-motors.net/"><img src="logo-vintage.png"></a> </td> <td class="header_moto" rowspan="2"> <!--PLACE DU BANDEAU--> <a href="http://www.vintage-motors.net/products_new.php"> <img src="Vintage-Motors-Magasin-Retro.png"> </a> <!--<object type="application/x-shockwave-flash" data="bvintage-sa.swf" width="600" height="150"> <param name="movie" value="bvintage-sa.swf" /> D?couvrez tous les casques moto sur vintage-motors.net accessoires moto et scooter pour les motards et moto vintage.<br> Des marques prestigieuses de casques, blousons en cuir, bottes, gants ?toffent notre catalogue : BELSTAFF, CROMWELL, DAVIDA, SOUBIRAC, BELL, BLH, SPIDI... </object>--> <!-- FIN BANDEAU --> </td> <td align="right" valign="top"><?php// show Cart Details if (SHOW_CART_IN_HEADER=='yes') {?> <table class="header-contact"> <tr height="41px"> <th colspan="2"> <p>Recherche produit :</p> <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'onSubmit="return check_form(this);"') . tep_hide_session_id(); ?> <br /> <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo tep_draw_input_field('keywords', '', 'size="25" maxlength="40" style="width: ' . (BOX_WIDTH-10) . 'px"'); echo tep_hide_session_id() .''. tep_image_submit('search-logo.png', BOX_HEADING_SEARCH,'class="log-search"'); ?></form> <a class="contact" href="contact_us.php">CONTACT</a> </th> </tr> <tr height="130px" text-align="right"> <td class="info-contact"> <b><p>Vintage-Motors.net<br /> <a href="tel:+33143573330">01.43.57.33.30</a><br /> du Lundi au Vendredi<br /> 10h-13h et 14h-18h</p></b> <p><a class="link-point-vente" href="point-de-vente-belstaff-paris.php">Nos boutiques Vintage Motors</a> Lundi au Samedi | 10h-19h30</p> </td> <td> <div class="produit-choose"> <img src="shopping.png"><br /> <?php echo $cart->count_contents() . ($cart->count_contents() == "1" ? " Article" : " Articles "); ?><br /> Prix: <?php echo $currencies->format($cart->show_total()); ?> </div> </td> <!--<?php //echo $cart->show_weight() . ($cart->show_weight() == "1" ? " kg" : " kgs ");?> ]--> </tr> </table><?php}?></td> </tr> </table> </tr></table><table border="0" width="100%" cellspacing="0" cellpadding="1" class="navigation-tool"> <tr> <td class="headerNavigation2"> <?php echo $breadcrumb->trail(' > '); ?></td> <td align="right" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="black"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="black"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="black"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td> </tr></table><?php}?><!-- header_eof //-->
0