-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Ajout du nouveau usager de la page inscription.php
- Loading branch information
Nicolas Mc Clure
committed
Apr 26, 2013
1 parent
47c3f18
commit 35be072
Showing
12 changed files
with
265 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
$produits = array ('prod01'=>array( | ||
'titre'=>'Canon EOS 60D', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/canon_eos_60d.jpg', | ||
'prix'=>'1600', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
'prod02'=>array( | ||
'titre'=>'GOPRO HERO 3', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/gopro_hero3_silver.jpg', | ||
'prix'=>'800', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
|
||
), | ||
'prod03'=>array( | ||
'titre'=>'Trepier en carbon', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/trepier.jpg', | ||
'prix'=>'249', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
'prod04'=>array( | ||
'titre'=>'Photoshop CS6', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/cs6.jpg', | ||
'prix'=>'449', | ||
'details'=>'Logiciel de retouche photos et + encore -compatible Windows,Mac et Linux' | ||
|
||
), | ||
'prod05'=>array( | ||
'titre'=>'Objectif Nikon', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/nikon_objectif.png', | ||
'prix'=>'999', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
'prod06'=>array( | ||
'titre'=>'EOS Rebel T5i', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/canon_eos.jpg', | ||
'prix'=>'929', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
'prod07'=>array( | ||
'titre'=>'Nikon F6', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/nikonf6.png', | ||
'prix'=>'2499', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
'prod08'=>array( | ||
'titre'=>'Nikon S1', | ||
'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet, nunc vitae aliquet egestas, nunc nisl varius augue, quis interdum risus nunc sed lorem. Cras at dolor orci. Phasellus et purus odio, vitae consequat magna. Suspendisse sit amet purus quis justo dignissim euismod. Suspendisse felis dolor, lobortis eget gravida id, sagittis at nisl. Cras et diam enim, sodales pretium sapien. Praesent nec velit sapien.', | ||
'image'=>'assets/images/produits/nikons1.png', | ||
'prix'=>'529,95', | ||
'details'=>'Dimensions : 145,5 mm (L) × 112,5 mm (H) × 80,0 mm (P)' | ||
), | ||
); | ||
|
||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1 @@ | ||
<?php | ||
$users = array( | ||
'jv6dmc' =>array( | ||
'nom' => "Mc Clure", | ||
'prenom' => "Nicolas", | ||
'email' => 'nicolas.mcclure@hotmail.ca', | ||
'password'=> '1234', | ||
'favoris' => array( | ||
'prod01', | ||
'prod03', | ||
'prod04' | ||
) | ||
), | ||
'briou' =>array( | ||
'nom' => "Riou", | ||
'prenom' => "Brice", | ||
'email' => 'briou69@gmail.ca', | ||
'password'=> '4321', | ||
'favoris' => array( | ||
'prod01', | ||
'prod03', | ||
'prod04' | ||
) | ||
) | ||
); | ||
?> | ||
a:1:{s:2:"br";a:5:{s:3:"nom";s:4:"riou";s:6:"prenom";s:5:"brice";s:5:"email";s:17:"briou69@gmail.com";s:8:"password";s:4:"1234";s:7:"favoris";a:0:{}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ define('REP_USERS',ROOT.'data/' ); | |
define('UTILISATEUR', 'user'); | ||
|
||
|
||
|
||
?> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
<?php | ||
|
||
function open_file($chemin){ | ||
$fichier = fopen( $chemin, "r"); | ||
$contenu_du_fichier = fread($fichier, filesize($chemin)); | ||
$users= unserialize($contenu_du_fichier); | ||
fclose($fichier); | ||
return($users); | ||
} | ||
|
||
|
||
|
||
function save_file($chemin, $contenu_du_fichier) { | ||
$fichier = fopen($chemin, "w"); | ||
fwrite($fichier, $contenu_du_tableau); | ||
function read_file($chemin){ | ||
$fichier= fopen($chemin , "r"); | ||
$contenu_du_fichier=fread($fichier,filesize($chemin)); | ||
$users= unserialize($contenu_du_fichier); | ||
fclose($fichier); | ||
|
||
return $users; | ||
|
||
} | ||
|
||
|
||
function write_file($chemin,$users){ | ||
$contenu_du_tableau= serialize($users); | ||
save_file($chemin, $contenu_du_tableau); | ||
} | ||
|
||
|
||
function open_file($chemin) { | ||
$fichier = fopen($chemin, "r"); | ||
$contenu_du_fichier = fread($fichier, filesize($chemin)); | ||
function save_file($chemin, $contenu_du_fichier) { | ||
$fichier = fopen($chemin, "w"); | ||
fwrite($fichier, $contenu_du_fichier); | ||
fclose($fichier); | ||
return($contenu_du_fichier); | ||
} | ||
|
||
|
||
?> |
Oops, something went wrong.