Created
February 6, 2016 17:06
-
-
Save tofin/163e19c5786efcc8fd15 to your computer and use it in GitHub Desktop.
Tofin-repository
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
alptitude-test-environment-apping |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="WEB_MODULE" version="4"> | |
<component name="FacetManager"> | |
<facet type="google-appengine-php" name="Google App Engine (Python)"> | |
<configuration> | |
<option name="rootFolder" value="D:\XAMPP\htdocs\alptitude-test-environment-apping" /> | |
<option name="sdkFolder" value="C:\Program Files (x86)\Google\google_appengine" /> | |
<option name="pythonPath" value="C:\Python27\pythonw2.7.exe" /> | |
<option name="oauth2" value="true" /> | |
<option name="nocache" value="false" /> | |
</configuration> | |
</facet> | |
</component> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
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
<component name="CopyrightManager"> | |
<settings default="" /> | |
</component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<component name="dataSourceStorage"> | |
<data-source name="MySQL - alptitude@173.194.231.55" uuid="7885d848-5ebd-46eb-80dd-9de0534b0558"> | |
<database-info product="MySQL" version="5.6.26" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.35 ( Revision: 5fb9c5849535c13917c2cf9baaece6ef9693ef27 )"> | |
<extra-name-characters>#@</extra-name-characters> | |
<identifier-quote-string>`</identifier-quote-string> | |
</database-info> | |
<case-sensitivity plain-identifiers="exact" quoted-identifiers="exact"/> | |
<database-model serializer="dbm" rdbms="MYSQL" format-version="2.4"> | |
<schema id="1" name="alptitude"/> | |
<table id="2" parent="1" name="Admin"/> | |
<table id="3" parent="1" name="Adresse"/> | |
<table id="4" parent="1" name="Categorie"/> | |
<table id="5" parent="1" name="Etudiant_CPGE"/> | |
<table id="6" parent="1" name="P_Physique"/> | |
<table id="7" parent="1" name="Professeur"/> | |
<table id="8" parent="1" name="Professionnel"/> | |
<table id="9" parent="1" name="Section"/> | |
<table id="10" parent="1" name="Subsection"/> | |
<table id="11" parent="1" name="User"/> | |
<table id="12" parent="1" name="Ville"/> | |
<table id="13" parent="1" name="p_morale"/> | |
<table id="14" parent="1" name="paiment"/> | |
<table id="15" parent="1" name="parent"/> | |
<table id="16" parent="1" name="pays"/> | |
<table id="17" parent="1" name="type_adresse"/> | |
<column id="18" parent="2" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="19" parent="2" name="username"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="20" parent="2" name="password"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="21" parent="2" name="name"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<key id="22" parent="2" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<column id="23" parent="3" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="24" parent="3" name="Ligne_1"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(60)</data-type> | |
</column> | |
<column id="25" parent="3" name="Ligne_2"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(60)</data-type> | |
</column> | |
<column id="26" parent="3" name="Ligne_3"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(60)</data-type> | |
</column> | |
<column id="27" parent="3" name="Type_Adresse_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="28" parent="3" name="Ville_id"> | |
<data-type>int(11)</data-type> | |
</column> | |
<index id="29" parent="3" name="fk_Adresse_Type_Adresse1_idx"> | |
<columns>Type_Adresse_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<index id="30" parent="3" name="Ville_id"> | |
<columns>Ville_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="31" parent="3" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="32" parent="3" name="fk_Adresse_Type_Adresse1"> | |
<columns>Type_Adresse_id</columns> | |
<ref-key>~.type_adresse.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<foreign-key id="33" parent="3" name="FK_Adresse_Ville"> | |
<columns>Ville_id</columns> | |
<ref-key>~.Ville.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="34" parent="4" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="35" parent="4" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="36" parent="4" name="Montant"> | |
<mandatory>1</mandatory> | |
<data-type>decimal(10,2)</data-type> | |
</column> | |
<key id="37" parent="4" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<column id="38" parent="5" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="39" parent="5" name="P_Physique_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="40" parent="5" name="Animer_Ateliers"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="41" parent="5" name="Contribuer_Promotion"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="42" parent="5" name="Boursier"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<index id="43" parent="5" name="fk_Etudiant_CPGE_P_Physique1_idx"> | |
<columns>P_Physique_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="44" parent="5" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="45" parent="5" name="fk_Etudiant_CPGE_P_Physique1"> | |
<columns>P_Physique_id</columns> | |
<ref-key>~.P_Physique.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="46" parent="6" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="47" parent="6" name="Prenom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="48" parent="6" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="49" parent="6" name="Fonction"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="50" parent="6" name="Grade"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="51" parent="6" name="Activite_Profesionnelle"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="52" parent="6" name="User_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="53" parent="6" name="Societe"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="54" parent="6" name="Date_naissance"> | |
<mandatory>1</mandatory> | |
<data-type>date</data-type> | |
</column> | |
<column id="55" parent="6" name="Nationalite"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="56" parent="6" name="Annees_experience"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="57" parent="6" name="Parent_id"> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="58" parent="6" name="Email"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="59" parent="6" name="Telephone_fixe"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(20)</data-type> | |
</column> | |
<column id="60" parent="6" name="Ancien_eleve"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="61" parent="6" name="Annees_etudiants_de"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="62" parent="6" name="Annees_etudiants_a"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="63" parent="6" name="Actif"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="64" parent="6" name="Diplome1"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="65" parent="6" name="Diplome2"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="66" parent="6" name="Participer_entretiens"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="67" parent="6" name="Adresse_id"> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="68" parent="6" name="Classe"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="69" parent="6" name="Civilite"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<index id="70" parent="6" name="fk_P_Physique_Adresse1_idx"> | |
<columns>Adresse_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<index id="71" parent="6" name="fk_P_Physique_Parent1_idx"> | |
<columns>Parent_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<index id="72" parent="6" name="User_id"> | |
<columns>User_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="73" parent="6" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="74" parent="6" name="fk_P_Physique_Adresse1"> | |
<columns>Adresse_id</columns> | |
<ref-key>~.Adresse.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<foreign-key id="75" parent="6" name="fk_P_Physique_Parent1"> | |
<columns>Parent_id</columns> | |
<ref-key>~.parent.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<foreign-key id="76" parent="6" name="FK_P_Physique_User"> | |
<columns>User_id</columns> | |
<ref-key>~.User.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="77" parent="7" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="78" parent="7" name="P_Physique_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="79" parent="7" name="Fonction"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="80" parent="7" name="Grade"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="81" parent="7" name="Jury_Grand_Ecole"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="82" parent="7" name="Participer_organization"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="83" parent="7" name="Matiere_enseignee"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="84" parent="7" name="Souhaite_commission"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="85" parent="7" name="Commission"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<index id="86" parent="7" name="fk_Professeur_P_Physique1_idx"> | |
<columns>P_Physique_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="87" parent="7" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="88" parent="7" name="fk_Professeur_P_Physique1"> | |
<columns>P_Physique_id</columns> | |
<ref-key>~.P_Physique.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="89" parent="8" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="90" parent="8" name="P_Physique_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="91" parent="8" name="Activite_Professionnelle"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="92" parent="8" name="Societe"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="93" parent="8" name="Participant_ecole"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="94" parent="8" name="Ecole"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="95" parent="8" name="Parranier_etudiant"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="96" parent="8" name="Parciticiper_Carrefour"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="97" parent="8" name="Faire_conference"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<index id="98" parent="8" name="fk_Professionnel_P_Physique1_idx"> | |
<columns>P_Physique_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="99" parent="8" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="100" parent="8" name="fk_Professionnel_P_Physique1"> | |
<columns>P_Physique_id</columns> | |
<ref-key>~.P_Physique.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="101" parent="9" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="102" parent="9" name="Name"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="103" parent="9" name="Status"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="104" parent="9" name="Priority"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<key id="105" parent="9" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<column id="106" parent="10" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="107" parent="10" name="Content"> | |
<mandatory>1</mandatory> | |
<data-type>mediumtext</data-type> | |
</column> | |
<column id="108" parent="10" name="Section_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="109" parent="10" name="status"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="110" parent="10" name="Name"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="111" parent="10" name="Priority"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<index id="112" parent="10" name="fk_Subsection_Section1_idx"> | |
<columns>Section_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="113" parent="10" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="114" parent="10" name="fk_Subsection_Section1"> | |
<columns>Section_id</columns> | |
<ref-key>~.Section.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="115" parent="11" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="116" parent="11" name="status"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="117" parent="11" name="date_creation"> | |
<mandatory>1</mandatory> | |
<data-type>datetime</data-type> | |
</column> | |
<column id="118" parent="11" name="date_derniere_modification"> | |
<mandatory>1</mandatory> | |
<data-type>datetime</data-type> | |
</column> | |
<column id="119" parent="11" name="adresse_email"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="120" parent="11" name="Telephone"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(20)</data-type> | |
</column> | |
<column id="121" parent="11" name="Categorie_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="122" parent="11" name="password"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="123" parent="11" name="Adresse_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="124" parent="11" name="step"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="125" parent="11" name="Public_nom"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(4)</data-type> | |
</column> | |
<column id="126" parent="11" name="Public_adress"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(4)</data-type> | |
</column> | |
<index id="127" parent="11" name="adresse_email"> | |
<columns>adresse_email</columns> | |
<desc-columns></desc-columns> | |
<unique>1</unique> | |
</index> | |
<index id="128" parent="11" name="fk_User_Adresse1_idx"> | |
<columns>Adresse_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<index id="129" parent="11" name="fk_User_Categorie1_idx"> | |
<columns>Categorie_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="130" parent="11" name="adresse_email"> | |
<columns>adresse_email</columns> | |
<underlying-index>adresse_email</underlying-index> | |
</key> | |
<key id="131" parent="11" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="132" parent="11" name="fk_User_Adresse1"> | |
<columns>Adresse_id</columns> | |
<ref-key>~.Adresse.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<foreign-key id="133" parent="11" name="fk_User_Categorie1"> | |
<columns>Categorie_id</columns> | |
<ref-key>~.Categorie.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="134" parent="12" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="135" parent="12" name="Code_postal"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="136" parent="12" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="137" parent="12" name="Pays_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<index id="138" parent="12" name="fk_Ville_Pays1_idx"> | |
<columns>Pays_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="139" parent="12" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="140" parent="12" name="fk_Ville_Pays1"> | |
<columns>Pays_id</columns> | |
<ref-key>~.pays.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="141" parent="13" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="142" parent="13" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="143" parent="13" name="Site_Web"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="144" parent="13" name="Nom_Contact"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="145" parent="13" name="Prenom_Contact"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="146" parent="13" name="Email_Contact"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="147" parent="13" name="Taille_Societe"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="148" parent="13" name="Partenaire"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="149" parent="13" name="Don"> | |
<mandatory>1</mandatory> | |
<data-type>decimal(10,2)</data-type> | |
</column> | |
<column id="150" parent="13" name="User_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="151" parent="13" name="P_Moralecol"> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<column id="152" parent="13" name="Public_nom"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<column id="153" parent="13" name="Public_adress"> | |
<mandatory>1</mandatory> | |
<data-type>tinyint(1)</data-type> | |
</column> | |
<index id="154" parent="13" name="fk_P_Morale_User1_idx"> | |
<columns>User_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="155" parent="13" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="156" parent="13" name="fk_P_Morale_User1"> | |
<columns>User_id</columns> | |
<ref-key>~.User.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="157" parent="14" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="158" parent="14" name="DateT"> | |
<mandatory>1</mandatory> | |
<data-type>datetime</data-type> | |
</column> | |
<column id="159" parent="14" name="User_id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="160" parent="14" name="Description"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<index id="161" parent="14" name="fk_Paiment_User_idx"> | |
<columns>User_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="162" parent="14" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="163" parent="14" name="fk_Paiment_User"> | |
<columns>User_id</columns> | |
<ref-key>~.User.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="164" parent="15" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="165" parent="15" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="166" parent="15" name="Prenom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(100)</data-type> | |
</column> | |
<column id="167" parent="15" name="Email"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<column id="168" parent="15" name="Adresse_id"> | |
<data-type>int(11)</data-type> | |
</column> | |
<index id="169" parent="15" name="fk_Parent_Adresse1_idx"> | |
<columns>Adresse_id</columns> | |
<desc-columns></desc-columns> | |
</index> | |
<key id="170" parent="15" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<foreign-key id="171" parent="15" name="fk_Parent_Adresse1"> | |
<columns>Adresse_id</columns> | |
<ref-key>~.Adresse.PRIMARY</ref-key> | |
<cascade-update-rule>restrict</cascade-update-rule> | |
<cascade-delete-rule>restrict</cascade-delete-rule> | |
</foreign-key> | |
<column id="172" parent="16" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="173" parent="16" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(200)</data-type> | |
</column> | |
<key id="174" parent="16" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
<column id="175" parent="17" name="id"> | |
<mandatory>1</mandatory> | |
<data-type>int(11)</data-type> | |
</column> | |
<column id="176" parent="17" name="Nom"> | |
<mandatory>1</mandatory> | |
<data-type>varchar(45)</data-type> | |
</column> | |
<key id="177" parent="17" name="PRIMARY"> | |
<columns>id</columns> | |
<primary>1</primary> | |
</key> | |
</database-model> | |
</data-source> | |
</component> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="DataSourceManagerImpl" format="xml" hash="4216411277"> | |
<data-source source="LOCAL" name="MySQL - alptitude@173.194.231.55" uuid="7885d848-5ebd-46eb-80dd-9de0534b0558"> | |
<driver-ref>mysql</driver-ref> | |
<synchronize>true</synchronize> | |
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver> | |
<jdbc-url>jdbc:mysql://173.194.231.55:3306/alptitude</jdbc-url> | |
<driver-properties> | |
<property name="zeroDateTimeBehavior" value="convertToNull" /> | |
<property name="tinyInt1isBit" value="false" /> | |
<property name="characterEncoding" value="utf8" /> | |
<property name="characterSetResults" value="utf8" /> | |
<property name="yearIsDateType" value="false" /> | |
</driver-properties> | |
</data-source> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="Encoding"> | |
<file url="PROJECT" charset="UTF-8" /> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/.idea/alptitude-test-environment-apping.iml" filepath="$PROJECT_DIR$/.idea/alptitude-test-environment-apping.iml" /> | |
</modules> | |
</component> | |
</project> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="PhpProjectSharedConfiguration" php_language_level="5.5.0" /> | |
</project> |
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
<?php | |
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php'; | |
use google\appengine\api\cloud_storage\CloudStorageTools; | |
$options = [ 'gs_bucket_name' => 'alptitude-images' ]; | |
$upload_url = CloudStorageTools::createUploadUrl('/upload_handler.php', $options); | |
?> | |
<form action="<?php echo $upload_url?>" method="post"> | |
Files to upload: <br> | |
<input type="file" name="uploaded_files" size="40"> | |
<input type="submit" value="Upload"> | |
</form> |
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
<?php | |
require_once("./Models/Section.php"); | |
require_once("./Models/Subsection.php"); | |
require_once("functions.php"); | |
$sectionsDAO = new SectionDAO(); | |
$subsectionsDAO = new SubsectionDAO(); | |
$sections = $sectionsDAO->readAll(true); | |
$subSectionsRoot = $subsectionsDAO->readAllFrom($sections[0]->getId(),true); | |
$iconsArray = array("news_icon_blue.png","testimonials_icon_blue.png","camera_icon_blue.png","video_icon_blue.png"); | |
$indexIcons=0; | |
$message = ""; | |
$error =""; | |
if(isset($_GET['stat'])){ | |
switch($_GET['stat']){ | |
case "error": | |
$error = "Username / Password not found"; | |
break; | |
case "activate": | |
$message = "Your account has been activated"; | |
break; | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<?php echo Template::printHeaderOptions(); ?> | |
<script type="text/javascript"> | |
function checkNotification(){ | |
if($("#notificationBar").html()){ | |
notifyUser( $("#notificationBar").html() ); | |
} | |
if($("#alertBar").html()){ | |
alertUser( $("#alertBar").html() ); | |
} | |
} | |
</script> | |
<body onload="checkNotification();"> | |
<div id="alertBar"><?php echo $error; ?></div> | |
<div id="container"> | |
<div id="logo"> | |
<a href="/index.php"><img src="images/alptitudeLOGO.png" width="400" /></a> | |
</div> | |
<!--Start Main Menu--> | |
<!--Start Main Menu--> | |
<div id="menu"> | |
<ul class="menu"> | |
<?php for($i=1; $i<sizeof($sections); $i++): ?> | |
<li> | |
<a href="#"><?php echo $sections[$i]->getName();?>▾</a> | |
<ul class="dropdown"> | |
<?php | |
$arraySubSections = $subsectionsDAO->readAllFrom($sections[$i]->getId(),true); | |
foreach($arraySubSections as $subSectionTemp): | |
?> | |
<li><a href="index2.php?id=<?php echo $subSectionTemp->getId(); ?>"><?php echo $subSectionTemp->getName(); ?></a></li> | |
<?php endforeach;?> | |
</ul> | |
</li> | |
<?php endfor; ?> | |
<li> | |
<a href="connecter.php">Se connecter</a> | |
</li> | |
</ul> | |
</div> | |
<!--End Main Menu--> | |
<div id="inner"> | |
<!-- Start Left Menu Box --> | |
<div id="leftblock"> | |
<?php foreach($subSectionsRoot as $subSectionTemp):?> | |
<a href="index2.php?id=<?php echo $subSectionTemp->getId();?>"> | |
<img src="images/<?php echo $iconsArray[$indexIcons++];?>" class="block_icon" /> | |
<figcaption><?php echo $subSectionTemp->getName() ?></figcaption></a> | |
<?php endforeach; ?> | |
</div> | |
<!-- End Left Menu Box --> | |
<!--Content Start--> | |
<div id="content_home"> | |
<h2>Login</h2> | |
<form method="post" action="login.php"> | |
<input type="email" placeholder="Email" name="email" required> | |
<br> | |
<input type="password" placeholder="Password" name="password" required> | |
<br> | |
<br> | |
<input type="submit" value="Se connecter"> | |
</form> | |
</div> | |
<!--Content END--> | |
</div> | |
</div> | |
</div> | |
<?php | |
echo Template::printFooter(); | |
?> | |
</body> | |
</html> |
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
<?php | |
class Connection{ | |
private $link; | |
private $data; | |
private $arreglo; | |
private $row; | |
private $sql; | |
public function __construct($DBname, $DBuser, $DBpw, $ProjectID,$InstanceName){ | |
//error_reporting(0); | |
//$this->sql = new mysqli( null,$DBuser, $DBpw, $DBname, null, '/cloudsql/'.$ProjectID.':'.$InstanceName ); //Deploy mode | |
$this->sql = new mysqli("localhost", "root", "root", $DBname); //Local Mode | |
if($this->sql->connect_error > 0){ | |
die('Unable to connect to database [' . $this->sql->connect_error . ']'); | |
} | |
//mysql_select_db($DBname, $this->link) or trigger_error(mysql_error(),E_USER_ERROR); | |
$this->row = 0; | |
$this->data = Array(); | |
$this->arreglo = Array(); | |
} | |
public function query($queryString, $nombreConsulta = 'default'){ | |
//$this->data[$nombreConsulta] = mysql_query($queryString, $this->link); | |
$this->data[$nombreConsulta] = $this->sql->query($queryString); | |
if( !empty($this->sql->error) ) throw new Exception($this->sql->error); | |
//print_r($this->sql); | |
return $this->data[$nombreConsulta]; | |
} | |
public function siguienteArreglo( $nombreConsulta='default' ){ | |
//$this->arreglo[ $nombreConsulta ] = mysql_fetch_array($this->data[ $nombreConsulta ]); | |
$this->arreglo[ $nombreConsulta ] = $this->data[$nombreConsulta]->fetch_assoc(); | |
return $this->arreglo[ $nombreConsulta ]; | |
} | |
public function getCampo( $campo, $nombreConsulta = 'default' ){ | |
return $this->arreglo[$nombreConsulta][ $campo ]; | |
} | |
public function getError(){ | |
return 0; | |
} | |
public function getErrorMessage(){ | |
return $this->sql->error; | |
} | |
public function getQueryData($nombreConsulta = 'default'){ | |
return $this->data[$nombreConsulta]; | |
} | |
public function __destruct(){ | |
//mysql_close( $this->link ); | |
} | |
public function getLastId(){ | |
return $this->sql->insert_id; | |
} | |
public function close(){ | |
$this->sql->close(); | |
} | |
public function getNumResults( $nombreConsulta = 'default'){ | |
return $this->data[$nombreConsulta]->num_rows; | |
} | |
public function wasUpdated(){ | |
$affected = $this->sql->affected_rows; | |
if($affected > 0) | |
return true; | |
else | |
return false; | |
} | |
public function escape_string($string){ | |
return $this->sql->real_escape_string($string); | |
} | |
} | |
class Conexion extends Connection { | |
public function __construct(){ | |
//parent::__construct('alptitude','root','','alptitude-1044','maindb'); | |
parent::__construct('alptitude','root','','alptitude-1044','alptitude'); | |
} | |
} | |
?> |
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
[.ShellClassInfo] | |
InfoTip=This folder is shared online. | |
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe | |
IconIndex=16 | |
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
<?php | |
require_once("./Models/user.php"); | |
//Array ( [email] => email@hotmail.com [password] => password ) | |
$idEmail = UserDAO::Authenticate($_POST['email']); | |
if($idEmail <=0){ | |
header("Location: emailcheck.php?stat=error&messageError=User"); | |
}else{ | |
session_start(); | |
$_SESSION['id_user'] = $idEmail; | |
$userDAO = new UserDAO(); | |
$user = $userDAO->search($idEmail); | |
if( $user->getStep() == 0 ){ | |
header("Location: resendEmail.php"); | |
}elseif($user->getStep() < 4){ | |
header("Location: ./Forms/step".$user->getStep().".php"); | |
}else{ | |
header("Location: ./member/index.php"); | |
} | |
} | |
?> |
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
<?php | |
require_once("./Models/Section.php"); | |
require_once("./Models/Subsection.php"); | |
require_once("functions.php"); | |
$sectionsDAO = new SectionDAO(); | |
$subsectionsDAO = new SubsectionDAO(); | |
$sections = $sectionsDAO->readAll(true); | |
$subSectionsRoot = $subsectionsDAO->readAllFrom($sections[0]->getId(),true); | |
$iconsArray = array("news_icon_blue.png","testimonials_icon_blue.png","camera_icon_blue.png","video_icon_blue.png"); | |
$indexIcons=0; | |
$message = ""; | |
$error =""; | |
if(isset($_GET['stat'])){ | |
switch($_GET['stat']){ | |
case "error": | |
$error = "Username / Password not found"; | |
break; | |
case "activate": | |
$message = "Your account has been activated"; | |
break; | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<?php echo Template::printHeaderOptions(); ?> | |
<script type="text/javascript"> | |
function checkNotification(){ | |
if($("#notificationBar").html()){ | |
notifyUser( $("#notificationBar").html() ); | |
} | |
if($("#alertBar").html()){ | |
alertUser( $("#alertBar").html() ); | |
} | |
} | |
</script> | |
<body onload="checkNotification();"> | |
<div id="alertBar"><?php echo $error; ?></div> | |
<div id="container"> | |
<div id="logo"> | |
<a href="/index.php"><img src="images/alptitudeLOGO.png" width="400" /></a> | |
</div> | |
<!--Start Main Menu--> | |
<!--Start Main Menu--> | |
<div id="menu"> | |
<ul class="menu"> | |
<?php for($i=1; $i<sizeof($sections); $i++): ?> | |
<li> | |
<a href="#"><?php echo $sections[$i]->getName();?>▾</a> | |
<ul class="dropdown"> | |
<?php | |
$arraySubSections = $subsectionsDAO->readAllFrom($sections[$i]->getId(),true); | |
foreach($arraySubSections as $subSectionTemp): | |
?> | |
<li><a href="index2.php?id=<?php echo $subSectionTemp->getId(); ?>"><?php echo $subSectionTemp->getName(); ?></a></li> | |
<?php endforeach;?> | |
</ul> | |
</li> | |
<?php endfor; ?> | |
<li> | |
<a href="connecter.php">Se connecter</a> | |
</li> | |
</ul> | |
</div> | |
<!--End Main Menu--> | |
<div id="inner"> | |
<!-- Start Left Menu Box --> | |
<div id="leftblock"> | |
<?php foreach($subSectionsRoot as $subSectionTemp):?> | |
<a href="index2.php?id=<?php echo $subSectionTemp->getId();?>"> | |
<img src="images/<?php echo $iconsArray[$indexIcons++];?>" class="block_icon" /> | |
<figcaption><?php echo $subSectionTemp->getName() ?></figcaption></a> | |
<?php endforeach; ?> | |
</div> | |
<!-- End Left Menu Box --> | |
<!--Content Start--> | |
<div id="content_home"> | |
<h2>Mot de passe oublie</h2> | |
<form method="post" action="maintenance.php"> | |
<input type="email" placeholder="Email" name="email" required> | |
<input type="submit" value="Reset"> | |
</form> | |
</div> | |
<!--Content END--> | |
</div> | |
</div> | |
</div> | |
<?php | |
echo Template::printFooter(); | |
?> | |
</body> | |
</html> |
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
<?php | |
use \google\appengine\api\mail\Message; | |
class Utilities{ | |
public static function sendMail($to,$subject,$body){ | |
try | |
{ | |
$message = new Message(); | |
$message->setSender("noreply@alptitude-test-environment.appspot.com"); | |
$message->addTo($to); | |
$message->setSubject($subject); | |
//$message->addHeader("Content-type", "text/html"); | |
$message->setHtmlBody($body); | |
$message->send(); | |
} catch (InvalidArgumentException $e) { | |
die("Not Send"); | |
} | |
} | |
} | |
class Template{ | |
const REGISTER_PROFESSOR = 1; | |
const REGISTER_PROFESIONAL = 2; | |
const REGISTER_STUDENT_COMERCE = 3; | |
const REGISTER_STUDENT_CPGE = 4; | |
const REGISTER_FUTURE = 5; | |
const REGISTER_MORALE = 6; | |
public static function printHeaderOptions($root = "./"){ | |
//Array that should contain the name of the backgrounds | |
//that are going to be displayed randomly | |
$arrayBackgrounds = array("Alpbackground.png","bgLaDent.png","bgLaTournette.png","bgMontBlanc.png"); | |
echo '<head> | |
<link rel="stylesheet" href="'.$root.'alptitude.css"> | |
<link rel="shortcut icon" href="'.$root.'/images/favicon.png" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript" src="'.$root.'jquery-2.1.3.min.js"></script> | |
<script type="text/javascript" src="'.$root.'script.js"></script> | |
<title>Alptitude</title> | |
<style type="text/css"> | |
body{ | |
background: url('.$root.'images/'.$arrayBackgrounds[array_rand($arrayBackgrounds)].') no-repeat center center fixed; | |
background-size:cover; | |
} | |
</style> | |
</head>'; | |
} | |
public static function printFooter($root = "./"){ | |
echo '<div id="footer"> | |
<div class="footerlink"> | |
<a href="#" class="footer">Notre Adresse</a> | |
</div> | |
<div class="footerlink"> | |
<a href="#" class="footer">Plan du site</a> | |
</div> | |
<div class="footer_partenaires"> | |
<p style="color:#fff;vertical-align:top;margin:0;padding:0;display:inline-block;">Nos partenaires</p> | |
<a href="http://www.ac-grenoble.fr/lycee/berthollet.annecy/"><img src="'.$root.'images/LeLyceeBerthollet1.png" height="50" style="margin-top:5px;margin-right:5px;"style="margin-top:5px;margin-right:5px;"/></a><a href="http://www.lions103cs.org/club/annecy_doyen-49/"><img src="'.$root.'images/LyonsClub.png" height="50" style="margin-top:5px;margin-right:5px;"/></a><a href="http://www.erdf.fr/"><img src="'.$root.'images/ERDF.png" height="50" style="margin-top:5px;"/></a> | |
</div> | |
</div> '; | |
} | |
} | |
?> |
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
<form action='' method='POST' enctype='multipart/form-data'> | |
<input type='file' name='userFile'><br> | |
<input type='submit' name='upload_btn' value='upload'> | |
</form> | |
<?php | |
$target_Path = "images/Test"; | |
$target_Path = $target_Path.basename( $_FILES['userFile']['name'] ); | |
move_uploaded_file( $_FILES['userFile']['tmp_name'], $target_Path ); | |
?> |
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
<?php | |
require_once("./Models/Section.php"); | |
require_once("./Models/Subsection.php"); | |
require_once("functions.php"); | |
$sectionsDAO = new SectionDAO(); | |
$subsectionsDAO = new SubsectionDAO(); | |
$sections = $sectionsDAO->readAll(true); | |
$subSectionsRoot = $subsectionsDAO->readAllFrom($sections[0]->getId(),true); | |
$iconsArray = array("news_icon_blue.png","testimonials_icon_blue.png","camera_icon_blue.png","video_icon_blue.png"); | |
$indexIcons=0; | |
$message = ""; | |
if(isset($_GET['stat'])){ | |
switch($_GET['stat']){ | |
case "activate": | |
$message = "Your account has been activated"; | |
break; | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<?php echo Template::printHeaderOptions(); ?> | |
<body onLoad="checkNotification();"> | |
<div id="notificationBar"><?php echo $message; ?></div> | |
<div id="container"> | |
<div id="logo"> | |
<a href="/index.php"><img src="images/alptitudeLOGO.png" width="400" /></a> | |
</div> | |
<!--Start Main Menu--> | |
<!--Start Main Menu--> | |
<div id="menu"> | |
<ul class="menu"> | |
<?php for($i=1; $i<sizeof($sections); $i++): ?> | |
<li> | |
<a href="#"><?php echo $sections[$i]->getName();?>▾</a> | |
<ul class="dropdown"> | |
<?php | |
$arraySubSections = $subsectionsDAO->readAllFrom($sections[$i]->getId(),true); | |
foreach($arraySubSections as $subSectionTemp): | |
?> | |
<li><a href="index2.php?id=<?php echo $subSectionTemp->getId(); ?>"><?php echo $subSectionTemp->getName(); ?></a></li> | |
<?php endforeach;?> | |
</ul> | |
</li> | |
<?php endfor; ?> | |
<li> | |
<a href="connecter.php">Se connecter</a> | |
</li> | |
</ul> | |
</div> | |
<!--End Main Menu--> | |
<div id="inner"> | |
<!-- Start Left Menu Box --> | |
<div id="leftblock"> | |
<?php foreach($subSectionsRoot as $subSectionTemp):?> | |
<a href="index2.php?id=<?php echo $subSectionTemp->getId();?>"> | |
<img src="images/<?php echo $iconsArray[$indexIcons++];?>" class="block_icon" /> | |
<figcaption class="left_block"><?php echo $subSectionTemp->getName() ?></figcaption></a> | |
<?php endforeach; ?> | |
</div> | |
<!-- End Left Menu Box --> | |
<!--Content Start--> | |
<div id="content_home"> | |
<h2>Bienvenue</h2> | |
<p><h2 id="slogan">Notre slogan: l'excellence pour tous</h2></p> | |
<p><h3>De la Prépa à l'Entreprise</h3></p> | |
<p><h4>- Pour accompagner les étudiants pendant leur prépa CPGE du Lycée Berthollet</h4></p> | |
<p><h4>- Pour aider les étudiants d'ECE et ECS à s'orienter et à réaliser leur projet personnel</h4></p> | |
<p><h4>- Pour les aider à intégrer les meilleures Grandes Ecoles de Commerce Management et d'Ingénieurs</h4></p> | |
<p><h4>- Pour renforcer les liens avec l'Entreprise, l'Enseignement supérieur national et international, les Grandes Ecoles</h4></p> | |
<marquee bgcolor=fuschia> Ne manquez pas la soirée parrainages du 10 Décembre 2015 avec la participation de M. Jacques Longuet, Directeur Inter Régional Rhône-Alpes Bourgogne d'ERDF</marquee> | |
<!-- <p><b>Actualités</b></p> | |
<ul class="news"> | |
<li>Actualités 1</li> | |
<li>Actualités 2</li> | |
<li>Actualités 3</li> | |
</ul> --> | |
</div> | |
<!--Content END--> | |
</div> | |
</div> | |
</div> | |
<?php | |
echo Template::printFooter(); | |
?> | |
</body> | |
</html> |
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
Backlogs of current sprint | |
Datamodel for profile page | |
Plan of releasing finished new features | |
Plan about payment module | |
- stripe.com | |
Regarding documents | |
sprint1 - version | |
Retrospective | |
------------- | |
Code optimisation | |
Documentation | |
after error, all data missing | |
reposition field | |
remove start from telephone | |
remove class from teacher, under step 1 | |
address 1 mandatory | |
step 2 | |
anees etuduian au lucee - not mandatory | |
by default - actif | |
step 3 | |
wildcard search | |
first name | |
show attributes | |
(will discuss) | |
based on yes/no attributes | |
https://console.developers.google.com/storage/browser/alptitude-images | |
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
password 5f4dcc3b5aa765d61d8327deb882cf99 | |
update admin set password=sha1(password) where username='admin1'; | |
update user set password=md5(password) where adresse_email='oberthe2@gmail.com'; | |
INSERT INTO `admin` (`id`, `username`, `password`, `name`) VALUES (NULL, 'admin2', '5f4dcc3b5aa765d61d8327deb882cf99', 'Admin2'); | |
INSERT INTO `user` (`id`, `status`, `date_creation`, `date_derniere_modification`, `adresse_email`, `Telephone`, `Categorie_id`, `password`, `Adresse_id`, `step`, `Public_nom`, `Public_adress`) VALUES (NULL, '0', '2015-12-18 17:59:26', '2015-12-18 17:59:26', 'tofin@gmail.com', '', '6', '5f4dcc3b5aa765d61d8327deb882cf99', '1', '0', '0', '0'); | |
$sql = new mysqli(null,'root','',alptitude,null,'/cloudsql/alptitude-test-environment:testdb' ); | |
- url: /(.+) | |
script: index.php | |
login: optional |
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
<?php | |
session_start(); | |
if(!isset($_SESSION['id_user'])){ | |
header("Location: login.php"); | |
return; | |
} | |
require_once("./Models/Section.php"); | |
require_once("./Models/Subsection.php"); | |
require_once("./Models/Categorie.php"); | |
require_once("./Models/user.php"); | |
require_once("./functions.php"); | |
$sectionsDAO = new SectionDAO(); | |
$subsectionsDAO = new SubsectionDAO(); | |
$userDAO = new UserDAO(); | |
$user = $userDAO->search($_SESSION['id_user']); | |
if($user->getStep() > 1){ | |
die("Error"); | |
} | |
$sections = $sectionsDAO->readAll(true); | |
$subSectionsRoot = $subsectionsDAO->readAllFrom($sections[0]->getId(),true); | |
$iconsArray = array("news_icon_blue.png","testimonials_icon_blue.png","camera_icon_blue.png","video_icon_blue.png"); | |
$indexIcons=0; | |
$message = ""; | |
$error = "Your account is not confirmed"; | |
if(isset($_GET['stat'])){ | |
switch($_GET['stat']){ | |
case "activate": | |
$message = "Your account has been activated"; | |
break; | |
case "error": | |
$error = $_GET['messageError']; | |
break; | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<?php echo Template::printHeaderOptions("../"); ?> | |
<script type="text/javascript"> | |
function checkNotification(){ | |
if($("#notificationBar").html()){ | |
notifyUser( $("#notificationBar").html() ); | |
} | |
if($("#alertBar").html()){ | |
alertUser( $("#alertBar").html() ); | |
} | |
} | |
</script> | |
<body onload="checkNotification();"> | |
<div id="notificationBar"><?php echo $message; ?></div> | |
<div id="alertBar"><?php echo $error; ?></div> | |
<div id="container"> | |
<div id="logo"> | |
<a href="../index.php"><img src="../images/alptitudeLOGO.png" width="400" /></a> | |
</div> | |
<!--Start Main Menu--> | |
<!--Start Main Menu--> | |
<div id="menu"> | |
<ul class="menu"> | |
<?php for($i=1; $i<sizeof($sections); $i++): ?> | |
<li> | |
<a href="#"><?php echo $sections[$i]->getName();?>▾</a> | |
<ul class="dropdown"> | |
<?php | |
$arraySubSections = $subsectionsDAO->readAllFrom($sections[$i]->getId(),true); | |
foreach($arraySubSections as $subSectionTemp): | |
?> | |
<li><a href="../index2.php?id=<?php echo $subSectionTemp->getId(); ?>"><?php echo $subSectionTemp->getName(); ?></a></li> | |
<?php endforeach;?> | |
</ul> | |
</li> | |
<?php endfor; ?> | |
<li> | |
<a href="../connecter.php">Se connecter</a> | |
</li> | |
</ul> | |
</div> | |
<!--End Main Menu--> | |
<div id="inner"> | |
<!-- Start Left Menu Box --> | |
<div id="leftblock"> | |
<?php foreach($subSectionsRoot as $subSectionTemp):?> | |
<a href="../index2.php?id=<?php echo $subSectionTemp->getId();?>"> | |
<img src="../images/<?php echo $iconsArray[$indexIcons++];?>" class="block_icon" /> | |
<figcaption><?php echo $subSectionTemp->getName() ?></figcaption></a> | |
<?php endforeach; ?> | |
</div> | |
<!-- End Left Menu Box --> | |
<!--Content Start--> | |
<div id="content_home"> | |
<h2>Confirm your account</h2> | |
A confirmation email has been sent to <strong><?php echo $user->getAdress_email(); ?></strong>. Please confirm your account to login. | |
<br> | |
<br> | |
If you don't receive the email after 5 min, please check your Spam Folder. | |
<a href="sendPassword.php">Click here</a> to send the email again. | |
</div> | |
<!--Content END--> | |
</div> | |
</div> | |
</div> | |
<?php | |
echo Template::printFooter("../"); | |
?> | |
</body> | |
</html> |
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
<?php | |
require_once("../Models/Section.php"); | |
require_once("../Models/Subsection.php"); | |
require_once("../functions.php"); | |
$sectionsDAO = new SectionDAO(); | |
$subsectionsDAO = new SubsectionDAO(); | |
$sections = $sectionsDAO->readAll(true); | |
$subSectionsRoot = $subsectionsDAO->readAllFrom($sections[0]->getId(),true); | |
$iconsArray = array("news_icon_blue.png","testimonials_icon_blue.png","camera_icon_blue.png","video_icon_blue.png"); | |
$indexIcons=0; | |
$message = ""; | |
$error = ""; | |
?> | |
<!DOCTYPE html> | |
<html> | |
<?php echo Template::printHeaderOptions("../"); ?> | |
<script type="text/javascript"> | |
function checkNotification(){ | |
if($("#notificationBar").html()){ | |
notifyUser( $("#notificationBar").html() ); | |
} | |
if($("#alertBar").html()){ | |
alertUser( $("#alertBar").html() ); | |
} | |
} | |
</script> | |
<body onload="checkNotification();"> | |
<div id="notificationBar"><?php echo $message; ?></div> | |
<div id="alertBar"><?php echo $error; ?></div> | |
<div id="container"> | |
<div id="logo"> | |
<a href="../index.php"><img src="../images/alptitudeLOGO.png" width="400" /></a> | |
</div> | |
<!--Start Main Menu--> | |
<!--Start Main Menu--> | |
<div id="menu"> | |
<ul class="menu"> | |
<?php for($i=1; $i<sizeof($sections); $i++): ?> | |
<li> | |
<a href="#"><?php echo $sections[$i]->getName();?>▾</a> | |
<ul class="dropdown"> | |
<?php | |
$arraySubSections = $subsectionsDAO->readAllFrom($sections[$i]->getId(),true); | |
foreach($arraySubSections as $subSectionTemp): | |
?> | |
<li><a href="../index2.php?id=<?php echo $subSectionTemp->getId(); ?>"><?php echo $subSectionTemp->getName(); ?></a></li> | |
<?php endforeach;?> | |
</ul> | |
</li> | |
<?php endfor; ?> | |
<li> | |
<a href="../connecter.php">Se connecter</a> | |
</li> | |
</ul> | |
</div> | |
<!--End Main Menu--> | |
<div id="inner"> | |
<!-- Start Left Menu Box --> | |
<div id="leftblock"> | |
<?php foreach($subSectionsRoot as $subSectionTemp):?> | |
<a href="../index2.php?id=<?php echo $subSectionTemp->getId();?>"> | |
<img src="../images/<?php echo $iconsArray[$indexIcons++];?>" class="block_icon" /> | |
<figcaption><?php echo $subSectionTemp->getName() ?></figcaption></a> | |
<?php endforeach; ?> | |
</div> | |
<!-- End Left Menu Box --> | |
<!--Content Start--> | |
<div id="content_home"> | |
<form action="registerUser.php" method="post"> | |
<fieldset style="width:inherit"> | |
<legend>Change Password</legend> | |
<div class="registration_form"> | |
<input type="password" name="user_password" id="user_password" maxlength="80" size="30" placeholder="Password" required>* | |
<input type="password" name="confirm_password" id="confirm_password" maxlength="80" size="30" placeholder="Confirm Password" required>* </div> | |
<input type="submit" value="Soumettre"> | |
</fieldset> | |
</form> | |
</div> | |
<!--Content END--> | |
</div> | |
</div> | |
</div> | |
<?php | |
echo Template::printFooter("../"); | |
?> | |
</body> | |
</html> |
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
<?php | |
/* | |
Generado por Daniel Rodr�guez | |
@DanielRC91 | |
*/ | |
//require_once( dirname(__FILE__)."/Connection.php"); | |
require_once("Connection.php"); | |
class User { | |
private $id; | |
private $status; | |
private $date_creation; | |
private $date_derniere_modification; | |
private $adresse_email; | |
private $Telephone; | |
private $Pass; | |
private $Categorie_id; | |
private $Adresse_id; | |
private $step; | |
private $Public_nom; | |
private $Public_adress; | |
public function __construct($id,$status,$date_creation,$date_derniere_modification,$adress_email,$Telephone,$password,$Categorie_id,$Adresse_id,$step,$Public_nom,$Public_adress) | |
{ | |
$this->id = $id; | |
$this->status = $status; | |
$this->date_creation = $date_creation; | |
$this->date_derniere_modification = $date_derniere_modification; | |
$this->adress_email = $adress_email; | |
$this->Telephone = $Telephone; | |
$this->Pass = $password; | |
$this->Categorie_id = $Categorie_id; | |
$this->Adresse_id = $Adresse_id; | |
$this->step = $step; | |
$this->Public_nom = $Public_nom; | |
$this->Public_adress = $Public_adress; | |
} | |
public function setPublic_nom($public_nom){ | |
if($public_nom == 0 || $public_nom == 1){ | |
$this->Public_nom = $public_nom; | |
}else{ | |
throw new Exception("Invalid value of Public_nom"); | |
} | |
} | |
public function setPublic_adress($public_add){ | |
if($public_add == 0 || $public_add == 1){ | |
$this->Public_adress = $public_add; | |
}else{ | |
throw new Exception("Invalid value of Public_add"); | |
} | |
} | |
public function getPublic_nom(){ | |
return $this->Public_nom; | |
} | |
public function getPublic_adress(){ | |
return $this->Public_adress; | |
} | |
public function getId(){ | |
return $this->id; | |
} | |
public function setId($id){ | |
if(empty($id)){ | |
throw new Exception("Invalid value of id"); | |
} | |
$this->id= $id; | |
} | |
public function getStatus(){ | |
return $this->status; | |
} | |
public function setStatus($status){ | |
if(empty($status)){ | |
throw new Exception("Invalid value of status"); | |
} | |
$this->status= $status; | |
} | |
public function getDate_creation(){ | |
return $this->date_creation; | |
} | |
public function setDate_creation($date_creation){ | |
if(empty($date_creation)){ | |
throw new Exception("Invalid value of date_creation"); | |
} | |
$this->date_creation= $date_creation; | |
} | |
public function getDate_derniere_modification(){ | |
return $this->date_derniere_modification; | |
} | |
public function setDate_derniere_modification($date_derniere_modification){ | |
if(empty($date_derniere_modification)){ | |
throw new Exception("Invalid value of date_derniere_modification"); | |
} | |
$this->date_derniere_modification= $date_derniere_modification; | |
} | |
public function getAdress_email(){ | |
return $this->adress_email; | |
} | |
public function setAdress_email($adress_email){ | |
if(empty($adress_email)){ | |
throw new Exception("Invalid value of adress_email"); | |
} | |
$this->adress_email= $adress_email; | |
} | |
public function getTelephone(){ | |
return $this->Telephone; | |
} | |
public function setTelephone($Telephone){ | |
if(empty($Telephone)){ | |
throw new Exception("Invalid value of Telephone"); | |
} | |
$this->Telephone= $Telephone; | |
} | |
public function getpassword(){ | |
return $this->Pass; | |
} | |
public function setpassword($password){ | |
if(empty($password)){ | |
throw new Exception("Invalid value of password"); | |
} | |
$this->Pass= $password; | |
} | |
public function getCategorie_id(){ | |
return $this->Categorie_id; | |
} | |
public function setCategorie_id($Categorie_id){ | |
if(empty($Categorie_id)){ | |
throw new Exception("Invalid value of Categorie_id"); | |
} | |
$this->Categorie_id= $Categorie_id; | |
} | |
public function getAdresse_id(){ | |
return $this->Adresse_id; | |
} | |
public function setAdresse_id($Adresse_id){ | |
if(empty($Adresse_id)){ | |
throw new Exception("Invalid value of Adresse_id"); | |
} | |
$this->Adresse_id= $Adresse_id; | |
} | |
public function getStep(){ | |
return $this->step; | |
} | |
public function setStep($step){ | |
if(empty($step)){ | |
throw new Exception("Invalid value of step"); | |
} | |
$this->step= $step; | |
} | |
public function save() | |
{ | |
$db = new Conexion(); | |
$sql = sprintf( "UPDATE User SET status= %d, date_creation= '%s', date_derniere_modification= NOW(), adresse_email= '%s', Telephone= '%s', password= '%s', Categorie_id= %d, Adresse_id= %d,step= %d , Public_nom = %d, Public_adress = %d WHERE id = %d", | |
$this->status, | |
$db->escape_string($this->date_creation), | |
$db->escape_string($this->adress_email), | |
$db->escape_string($this->Telephone), | |
$db->escape_string($this->Pass), | |
$this->Categorie_id, | |
$this->Adresse_id, | |
$this->step, | |
$this->Public_nom, | |
$this->Public_adress, | |
$this->id ); //echo $sql; | |
$db->query($sql); | |
$db->close(); | |
} | |
}class UserDAO{ | |
public function search($id) | |
{ | |
if(!is_numeric($id)) { | |
throw new Exception("ID NOT Numeric"); | |
} | |
$db = new Conexion(); | |
$sql = sprintf( "SELECT * FROM User WHERE id=%d ", $id ); | |
$db->query($sql); | |
if($db->getNumResults() <= 0 ){ | |
$db->close(); | |
throw new Exception("ID NOT FOUND"); | |
} | |
$this->id = $id; | |
$db->siguienteArreglo(); | |
$temp = new User($db->getCampo("id"), | |
$db->getCampo("status"), | |
$db->getCampo("date_creation"), | |
$db->getCampo("date_derniere_modification"), | |
$db->getCampo("adresse_email"), | |
$db->getCampo("Telephone"), | |
$db->getCampo("password"), | |
$db->getCampo("Categorie_id"), | |
$db->getCampo("Adresse_id"), | |
$db->getCampo("step"), | |
$db->getCampo("Public_nom"), | |
$db->getCampo("Public_adress")); | |
$db->close(); | |
return $temp; | |
} | |
public function readAll(){ | |
$db = new Conexion(); | |
$sql = sprintf( "SELECT id, status, date_creation, date_derniere_modification, adresse_email, Telephone, password, Categorie_id, Adresse_id, step, Public_nom, Public_adress FROM User;"); | |
$db->query($sql); | |
$result = $db->getQueryData(); | |
$arr = array(); | |
while($newArray = $result->fetch_assoc()) { | |
$UserTemp = new User($newArray['id'], | |
$newArray['status'], | |
$newArray['date_creation'], | |
$newArray['date_derniere_modification'], | |
$newArray['adresse_email'], | |
$newArray['Telephone'], | |
$newArray['password'], | |
$newArray['Categorie_id'], | |
$newArray['Adresse_id'], | |
$newArray['step'], | |
$newArray['Public_nom'], | |
$newArray['Public_adress']); | |
array_push($arr, $UserTemp); | |
} | |
$db->close(); | |
return $arr; | |
} | |
public static function Authenticate($email, $password){ | |
$db = new Conexion(); | |
$sql = sprintf("SELECT id FROM User WHERE adresse_email = '%s' AND password = MD5('%s');", | |
$db->escape_string($email), | |
$db->escape_string($password)); | |
$db->query($sql); | |
if($db->getNumResults()<=0) | |
return 0; | |
$db->siguienteArreglo(); | |
$id = $db->getCampo("id"); | |
$db->close(); | |
return $id; | |
} | |
public static function DBCrear($status, $date_creation, $date_derniere_modification, $adress_email, $Telephone, $password, $Categorie_id, $Adresse_id, $step, $Public_nom, $Public_adress) | |
{ | |
if(empty($adress_email)) { | |
throw new Exception("Invalid value of adress_email"); | |
} | |
if(empty($password)) { | |
throw new Exception("Invalid value of password"); | |
} | |
if(empty($Categorie_id)) { | |
throw new Exception("Invalid value of Categorie_id"); | |
} | |
$db = new Conexion(); | |
$sql = sprintf( "INSERT INTO User(status, date_creation, date_derniere_modification, adresse_email, Telephone, password, Categorie_id, Adresse_id, step, Public_nom, Public_adress)VALUES(%d, NOW(), NOW(), '%s', '%s', MD5('%s'), %d, %d, %d,%d,%d)", | |
0, | |
$db->escape_string($adress_email), | |
$db->escape_string($Telephone), | |
$db->escape_string($password), | |
$Categorie_id, | |
1, | |
0, | |
0, | |
0);//echo $sql; | |
$db->query($sql); | |
$idUsuario = $db->getLastId(); | |
$db->close(); | |
if($idUsuario > 0) { | |
return $idUsuario; | |
} | |
else { | |
throw new Exception("Database Error:".$db->getError()); | |
} | |
} | |
}class UserController{ | |
public function saveHandler($postArray){ | |
if ( !isset($postArray['User_id']) )throw new Exception("Missing field: id"); | |
if ( !isset($postArray['User_status']) )throw new Exception("Missing field: status"); | |
if ( !isset($postArray['User_date_creation']) )throw new Exception("Missing field: date_creation"); | |
if ( !isset($postArray['User_date_derniere_modification']) )throw new Exception("Missing field: date_derniere_modification"); | |
if ( !isset($postArray['User_adresse_email']) )throw new Exception("Missing field: adresse_email"); | |
if ( !isset($postArray['User_Telephone']) )throw new Exception("Missing field: Telephone"); | |
if ( !isset($postArray['User_password']) )throw new Exception("Missing field: password"); | |
if ( !isset($postArray['User_Categorie_id']) )throw new Exception("Missing field: Categorie_id"); | |
if ( !isset($postArray['User_Adresse_id']) )throw new Exception("Missing field: Adresse_id"); | |
if ( !isset($postArray['User_step']) )throw new Exception("Missing field: step"); | |
$userDAO = new UserDAO(); | |
$user = $sectionDAO->search($_POST['id']); | |
$user->setId($postArray['User_id']); | |
$user->setStatus($postArray['User_status']); | |
$user->setDate_creation($postArray['User_date_creation']); | |
$user->setDate_derniere_modification($postArray['User_date_derniere_modification']); | |
$user->setAdress_email($postArray['User_adresse_email']); | |
$user->setTelephone($postArray['User_Telephone']); | |
$user->setpassword($postArray['User_password']); | |
$user->setCategorie_id($postArray['User_Categorie_id']); | |
$user->setAdresse_id($postArray['User_Adresse_id']); | |
$user->setStep($postArray['User_step']); | |
$user->save(); | |
} | |
public function postHandler($postArray){ | |
if($postArray['user_password'] != $postArray['confirm_password']) throw new Exception("Error Passwords don't match"); | |
if ( !isset($postArray['user_adresse_email']) )throw new Exception("Missing field: adresse_email"); | |
if ( !isset($postArray['user_password']) )throw new Exception("Missing field: password"); | |
if ( !isset($postArray['user_Categorie_id']) )throw new Exception("Missing field: Categorie_id"); | |
$idUser = UserDAO::DBCrear(0, "", | |
"", $postArray['user_adresse_email'], | |
"", $postArray['user_password'], | |
$postArray['user_Categorie_id'], "1", | |
0,0,0); | |
return $idUser; | |
} | |
} | |
?> |
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
<?php | |
/* | |
Generado por Daniel Rodr�guez | |
@DanielRC91 | |
*/ | |
//require_once( dirname(__FILE__)."/Connection.php"); | |
require_once("Connection.php"); | |
class User { | |
private $id; | |
private $status; | |
private $date_creation; | |
private $date_derniere_modification; | |
private $adresse_email; | |
private $Telephone; | |
private $Pass; | |
private $Categorie_id; | |
private $Adresse_id; | |
private $step; | |
private $Public_nom; | |
private $Public_adress; | |
public function __construct($id,$status,$date_creation,$date_derniere_modification,$adress_email,$Telephone,$password,$Categorie_id,$Adresse_id,$step,$Public_nom,$Public_adress) | |
{ | |
$this->id = $id; | |
$this->status = $status; | |
$this->date_creation = $date_creation; | |
$this->date_derniere_modification = $date_derniere_modification; | |
$this->adress_email = $adress_email; | |
$this->Telephone = $Telephone; | |
$this->Pass = $password; | |
$this->Categorie_id = $Categorie_id; | |
$this->Adresse_id = $Adresse_id; | |
$this->step = $step; | |
$this->Public_nom = $Public_nom; | |
$this->Public_adress = $Public_adress; | |
} | |
public function setPublic_nom($public_nom){ | |
if($public_nom == 0 || $public_nom == 1){ | |
$this->Public_nom = $public_nom; | |
}else{ | |
throw new Exception("Invalid value of Public_nom"); | |
} | |
} | |
public function setPublic_adress($public_add){ | |
if($public_add == 0 || $public_add == 1){ | |
$this->Public_adress = $public_add; | |
}else{ | |
throw new Exception("Invalid value of Public_add"); | |
} | |
} | |
public function getPublic_nom(){ | |
return $this->Public_nom; | |
} | |
public function getPublic_adress(){ | |
return $this->Public_adress; | |
} | |
public function getId(){ | |
return $this->id; | |
} | |
public function setId($id){ | |
if(empty($id)){ | |
throw new Exception("Invalid value of id"); | |
} | |
$this->id= $id; | |
} | |
public function getStatus(){ | |
return $this->status; | |
} | |
public function setStatus($status){ | |
if(empty($status)){ | |
throw new Exception("Invalid value of status"); | |
} | |
$this->status= $status; | |
} | |
public function getDate_creation(){ | |
return $this->date_creation; | |
} | |
public function setDate_creation($date_creation){ | |
if(empty($date_creation)){ | |
throw new Exception("Invalid value of date_creation"); | |
} | |
$this->date_creation= $date_creation; | |
} | |
public function getDate_derniere_modification(){ | |
return $this->date_derniere_modification; | |
} | |
public function setDate_derniere_modification($date_derniere_modification){ | |
if(empty($date_derniere_modification)){ | |
throw new Exception("Invalid value of date_derniere_modification"); | |
} | |
$this->date_derniere_modification= $date_derniere_modification; | |
} | |
public function getAdress_email(){ | |
return $this->adress_email; | |
} | |
public function setAdress_email($adress_email){ | |
if(empty($adress_email)){ | |
throw new Exception("Invalid value of adress_email"); | |
} | |
$this->adress_email= $adress_email; | |
} | |
public function getTelephone(){ | |
return $this->Telephone; | |
} | |
public function setTelephone($Telephone){ | |
if(empty($Telephone)){ | |
throw new Exception("Invalid value of Telephone"); | |
} | |
$this->Telephone= $Telephone; | |
} | |
public function getpassword(){ | |
return $this->Pass; | |
} | |
public function setpassword($password){ | |
if(empty($password)){ | |
throw new Exception("Invalid value of password"); | |
} | |
$this->Pass= $password; | |
} | |
public function getCategorie_id(){ | |
return $this->Categorie_id; | |
} | |
public function setCategorie_id($Categorie_id){ | |
if(empty($Categorie_id)){ | |
throw new Exception("Invalid value of Categorie_id"); | |
} | |
$this->Categorie_id= $Categorie_id; | |
} | |
public function getAdresse_id(){ | |
return $this->Adresse_id; | |
} | |
public function setAdresse_id($Adresse_id){ | |
if(empty($Adresse_id)){ | |
throw new Exception("Invalid value of Adresse_id"); | |
} | |
$this->Adresse_id= $Adresse_id; | |
} | |
public function getStep(){ | |
return $this->step; | |
} | |
public function setStep($step){ | |
if(empty($step)){ | |
throw new Exception("Invalid value of step"); | |
} | |
$this->step= $step; | |
} | |
public function save() | |
{ | |
$db = new Conexion(); | |
$sql = sprintf( "UPDATE User SET status= %d, date_creation= '%s', date_derniere_modification= NOW(), adresse_email= '%s', Telephone= '%s', password= '%s', Categorie_id= %d, Adresse_id= %d,step= %d , Public_nom = %d, Public_adress = %d WHERE id = %d", | |
$this->status, | |
$db->escape_string($this->date_creation), | |
$db->escape_string($this->adress_email), | |
$db->escape_string($this->Telephone), | |
$db->escape_string($this->Pass), | |
$this->Categorie_id, | |
$this->Adresse_id, | |
$this->step, | |
$this->Public_nom, | |
$this->Public_adress, | |
$this->id ); //echo $sql; | |
$db->query($sql); | |
$db->close(); | |
} | |
}class UserDAO{ | |
public function search($id) | |
{ | |
if(!is_numeric($id)) { | |
throw new Exception("ID NOT Numeric"); | |
} | |
$db = new Conexion(); | |
$sql = sprintf( "SELECT * FROM User WHERE id=%d ", $id ); | |
$db->query($sql); | |
if($db->getNumResults() <= 0 ){ | |
$db->close(); | |
throw new Exception("ID NOT FOUND"); | |
} | |
$this->id = $id; | |
$db->siguienteArreglo(); | |
$temp = new User($db->getCampo("id"), | |
$db->getCampo("status"), | |
$db->getCampo("date_creation"), | |
$db->getCampo("date_derniere_modification"), | |
$db->getCampo("adresse_email"), | |
$db->getCampo("Telephone"), | |
$db->getCampo("password"), | |
$db->getCampo("Categorie_id"), | |
$db->getCampo("Adresse_id"), | |
$db->getCampo("step"), | |
$db->getCampo("Public_nom"), | |
$db->getCampo("Public_adress")); | |
$db->close(); | |
return $temp; | |
} | |
public function readAll(){ | |
$db = new Conexion(); | |
$sql = sprintf( "SELECT id, status, date_creation, date_derniere_modification, adresse_email, Telephone, password, Categorie_id, Adresse_id, step, Public_nom, Public_adress FROM User;"); | |
$db->query($sql); | |
$result = $db->getQueryData(); | |
$arr = array(); | |
while($newArray = $result->fetch_assoc()) { | |
$UserTemp = new User($newArray['id'], | |
$newArray['status'], | |
$newArray['date_creation'], | |
$newArray['date_derniere_modification'], | |
$newArray['adresse_email'], | |
$newArray['Telephone'], | |
$newArray['password'], | |
$newArray['Categorie_id'], | |
$newArray['Adresse_id'], | |
$newArray['step'], | |
$newArray['Public_nom'], | |
$newArray['Public_adress']); | |
array_push($arr, $UserTemp); | |
} | |
$db->close(); | |
return $arr; | |
} | |
public static function Authenticate($email, $password){ | |
$db = new Conexion(); | |
$sql = sprintf("SELECT id FROM User WHERE adresse_email = '%s' AND password = MD5('%s');", | |
$db->escape_string($email), | |
$db->escape_string($password)); | |
$db->query($sql); | |
if($db->getNumResults()<=0) | |
return 0; | |
$db->siguienteArreglo(); | |
$id = $db->getCampo("id"); | |
$db->close(); | |
return $id; | |
} | |
public static function DBCrear($status, $date_creation, $date_derniere_modification, $adress_email, $Telephone, $password, $Categorie_id, $Adresse_id, $step, $Public_nom, $Public_adress) | |
{ | |
if(empty($adress_email)) { | |
throw new Exception("Invalid value of adress_email"); | |
} | |
if(empty($password)) { | |
throw new Exception("Invalid value of password"); | |
} | |
if(empty($Categorie_id)) { | |
throw new Exception("Invalid value of Categorie_id"); | |
} | |
$db = new Conexion(); | |
$sql = sprintf( "INSERT INTO User(status, date_creation, date_derniere_modification, adresse_email, Telephone, password, Categorie_id, Adresse_id, step, Public_nom, Public_adress)VALUES(%d, NOW(), NOW(), '%s', '%s', MD5('%s'), %d, %d, %d,%d,%d)", | |
0, | |
$db->escape_string($adress_email), | |
$db->escape_string($Telephone), | |
$db->escape_string($password), | |
$Categorie_id, | |
1, | |
0, | |
0, | |
0);//echo $sql; | |
$db->query($sql); | |
$idUsuario = $db->getLastId(); | |
$db->close(); | |
if($idUsuario > 0) { | |
return $idUsuario; | |
} | |
else { | |
throw new Exception("Database Error:".$db->getError()); | |
} | |
} | |
}class UserController{ | |
public function saveHandler($postArray){ | |
if ( !isset($postArray['User_id']) )throw new Exception("Missing field: id"); | |
if ( !isset($postArray['User_status']) )throw new Exception("Missing field: status"); | |
if ( !isset($postArray['User_date_creation']) )throw new Exception("Missing field: date_creation"); | |
if ( !isset($postArray['User_date_derniere_modification']) )throw new Exception("Missing field: date_derniere_modification"); | |
if ( !isset($postArray['User_adresse_email']) )throw new Exception("Missing field: adresse_email"); | |
if ( !isset($postArray['User_Telephone']) )throw new Exception("Missing field: Telephone"); | |
if ( !isset($postArray['User_password']) )throw new Exception("Missing field: password"); | |
if ( !isset($postArray['User_Categorie_id']) )throw new Exception("Missing field: Categorie_id"); | |
if ( !isset($postArray['User_Adresse_id']) )throw new Exception("Missing field: Adresse_id"); | |
if ( !isset($postArray['User_step']) )throw new Exception("Missing field: step"); | |
$userDAO = new UserDAO(); | |
$user = $sectionDAO->search($_POST['id']); | |
$user->setId($postArray['User_id']); | |
$user->setStatus($postArray['User_status']); | |
$user->setDate_creation($postArray['User_date_creation']); | |
$user->setDate_derniere_modification($postArray['User_date_derniere_modification']); | |
$user->setAdress_email($postArray['User_adresse_email']); | |
$user->setTelephone($postArray['User_Telephone']); | |
$user->setpassword($postArray['User_password']); | |
$user->setCategorie_id($postArray['User_Categorie_id']); | |
$user->setAdresse_id($postArray['User_Adresse_id']); | |
$user->setStep($postArray['User_step']); | |
$user->save(); | |
} | |
public function postHandler($postArray){ | |
if($postArray['user_password'] != $postArray['confirm_password']) throw new Exception("Error Passwords don't match"); | |
if ( !isset($postArray['user_adresse_email']) )throw new Exception("Missing field: adresse_email"); | |
if ( !isset($postArray['user_password']) )throw new Exception("Missing field: password"); | |
if ( !isset($postArray['user_Categorie_id']) )throw new Exception("Missing field: Categorie_id"); | |
$idUser = UserDAO::DBCrear(0, "", | |
"", $postArray['user_adresse_email'], | |
"", $postArray['user_password'], | |
$postArray['user_Categorie_id'], "1", | |
0,0,0); | |
return $idUser; | |
} | |
} | |
?> |
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
�PNG | |