Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  

CATEGORII DOCUMENTE





AccessAdobe photoshopAlgoritmiAutocadBaze de dateC
C sharpCalculatoareCorel drawDot netExcelFox pro
FrontpageHardwareHtmlInternetJavaLinux
MatlabMs dosPascalPhpPower pointRetele calculatoare
SqlTutorialsWebdesignWindowsWordXml

Lucrare pentru obtinerea atestatului professional Profil Matematica-Informatica - Site pentru burlaci

calculatoare

+ Font mai mare | - Font mai mic







DOCUMENTE SIMILARE

Trimite pe Messenger
AUTOMATIZARI - PROIECTAREA SISTEMELOR DE CONDUCERE CU AUTOMATE PROGRAMABILE
INTRODUCERE IN UTILIZAREA LIMBAJULUI VHDL COMPILAREA SI SIMULAREA UNUI DESIGN
Problema Labirintului - Lucrare de atestat
STRUCTURA SI FUNCTIA CALCULATORULUI. SISTEME DE OPERARE
Clase in OOP
DRAFTING - DESENE DE EXECUTIE - CATIA
Simularea receptiei optime pentru o secventa Barker
Administrarea unei instante Oracle9I
CRIMINALITATEA INFORMATICA
Gruparea datelor in clase - Biostatistica

                                               

Grup Scolar Industrial Energetic Turceni



Lucrare pentru obtinerea atestatului professional

Profil Matematica-Informatica

TEMA ATESTATULUI:

Site pentru burlaci

                        Cuprins:

1.     Argumentul alegerii temei

2.     Continutul site-ului

3.     Caracteristici generale prezente in site:

·        Head

·        Body

4.     Caracteristici prezente fiecarei pagini:

·        Caracteristici specifice paginii principale index.html

·        Caracteristici specifice paginii Ce pot gati.html

·        Caracteristici specifice paginii reteta.html

·        Caracteristici specifice paginii adauga reteta.html

5.     Stilizare text:

·        Text pentru intreaga pagina

·        Text pentru titlul paginii

6.     Stilizare meniu:

·        Link neactiv, nevizitat

·        Link fara operatii

·        Link vizitat

·        Link in momentul in care mouse-ul se afla asupra lui

·        Link active

7.     Conectarea la server

8.     Serverul Wamp

9.     Bibliografie

 

                         1.Argumentul alegerii temei :



            Multe persoane nu stiu sa gateasca, altii nu sunt siguri daca au suficiente ingrediente in frigider pentru a gati o anumita reteta, iar altii poate nu dispun inca de o carte de bucate care sa le vina in ajutor pentru a realiza o reteta.

            Acest site vine in sprijunul acestor categorii de persoane si nu numai. Persoanele necasatorite pot accesa acest site pentru a realiza o retata cu ingredientele care le au in frigider.

 

                       

  2.Continutul site-ului :

   Pagina index html.Contine :

  -benner-ul site-ului fara efect miscator. Este reprezentat de o poza si titlul site-ului.

  -legaturile catre celelalte pagini ale site-ului :

                             *Acasa- ne duce la aceeasi pagina, reprezentand pagina principala a site-ului.

                             *Ce pot gati- ne va duce la o pagina ce ne va permite sa selectam ingredientele disponibile de catre utilizator pentru prepararea unei retete. Aceste ingtrediente selective sunt : 

·               bors,

·               branza,

·               bulion,cartofi,

·               ceapa,

·               fasole,

·               lapte,

·               malai,

·               morcov,

·               orez,

·               oua,

·               peste,

·               porc,

·               pui,

·               rosii,

·               smantana,

·               ulei,

·               varza,

·               verdeata,

·               vita.

                              *Retete- va afisa o lista de retete impartite pe categorii.

                              *Adauga reteta- ne va permite adaugarea unei retete de catre utilizator.

Adaugarea unei retete se face dupa nume, ingrediente, timp de pregatire, categorie, mod de preparare si o poza.

                               *Contact- contine date de contact catre utilizatorii acestui site.

            Pagina de index contine o structura de baza ce se pastreaza si la celelalte pagini de legatura.

 

3. Caracteristici generale prezente in site :

 a) Head :

 1) <?php

include('conexiune_baza_de_date.php');

?>

-realizeaza conexiunea catre o baza de date numita baza_de_date.

 2) <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 T   ransitional//EN'>

-realizeaza simularea introducerii documentelor CSS.

            3) <link rel='stylesheet' type='text/css' href='stil.css'>

-realizeaza introducerea documentelor CSS, avand introdusa si adresa url la care se gaseste documentul CSS folosit in pagina: href =”stil.css”.

b) Body:

             In corpul programului intalnim impartirea continutului unei pagini.Impartirea este realizata cu ajutorul etichetelor <DIV> si <TABLE>.Acestea sunt folosite pe baza principiului LIFO (Last In First Out), adica ultima eticheta deschisa este prima inchisa.

  In cadrul etichetei <DIV> intalnim atributul align ce realizeaza alinierea continutului Div-ului, respectiv intr-o anumita pozitie.Alinierea poate fi la stanga (left), dreapta (right), centru (center).

            Div-ul principal este impartit in ,,compartimente” folosind eticheta <TABLE>. Eticheta TABLE contine atribute pentru spatierea textului si a componentelor introduse in tabel : width pentru latime, height pentru lungime, cellpadding, cellspacing.

  Folosim imbricarea tabelelor pentru a continua impartirea spatiului folosit in site, mai precis, aceasta portiune de program realizeaza impartirea partii de inceput a programului.

 

 




Structura de program :

            Urmatoarea portiune de program

<body>

            <div align='center'>

                        <table width='1003' height='768' cellpadding='0' cellspacing='0'>

                                    <tr>

                                                <td align='center' valign='top'>

                                                            <table cellpadding='0' cellspacing='0' width='761' style='border: 1px solid black;' height='768'>

                                                                        <tr>

                                                                                    <td valign='top'>

                                                                                                <table width='761' height='191' cellpadding='0' cellspacing='0'>

                                                                                                            <tr>

                                                                                                                        <td style='background: url(images/front.jpg) no-repeat;' valign='bottom' height='191'>

                                                                                                                                    <span class='title'>Retete Culinare</span>

                                                                                                                        </td>

                                                                                                            </tr>

                                                                                                            <tr>

                                                                                                                        <td style='background: url(images/menu.jpg) repeat-x;' height='25'>

                                                                                                                                    <table width='761'>

                                                                                                                                                <tr>

                                                                                                                                                            <td width='172' align='center'><a href='index.php' class='menuLink'>Acasa</a></td>

                                                                                                                                                            <td width='282' align='center'><a href='ce_pot_gati.php' class='menuLink'>Ce pot gati</a></td>

                                                                                                                                                            <td width='162' align='center'><a href='retete.php' class='menuLink'>Retete</a></td>

                                                                                                                                                            <td width='282' align='center'><a href='adauga_reteta.php' class='menuLink'>Adauga Reteta</a></td>

                                                                                                                                                            <td width='162' align='center'><a href='contact.php' class='menuLink'>Contact</a></td>

                                                                                                                                                </tr>

                                                                                                                                    </table>

                                                                                                                        </td>

va realiza urmatorul continut :

             Pentru stabilirea fontului in cadrul paginii folosim atributul background.

            Definirea link-urilor se face in cadrul celulelor unei linii :

<td width='172' align='center'><a href='index.php' class='menuLink'>Acasa</a></td>

<td width='282' align='center'><a href='ce_pot_gati.php' class='menuLink'>Ce pot gati</a></td>

<td width='162' align='center'><a href='retete.php' class='menuLink'>Retete</a></td>

<td width='282' align='center'><a href='adauga_reteta.php' class='menuLink'>Adauga Reteta</a></td>

<td width='162' align='center'><a href='contact.php' class='menuLink'>Contact</a></td>

  Celula este aliniata in centru prin intermediul atributului align. Introducerea unei legaturi in cadrul paginii se face cu ajutorul etichetei <A>.Aceasta va avea atribut href ce va avea ca valoare adresa url a paginii catre care se va face legatura si extensia acesteia, de regula html.  Link-urile sunt formatate cu ajutorul claselor CSS introduse in documentul HTML in capul programului. Sintaxa generala de utilizare a unui link are urmatoarea structura :

<A href=’’nume pagina.html’’> nume link < /A>.

 4.Caracteristici specifice fiecarei pagini:

 a) Caracteristici specifice paginii principale index.html.

  Folosim functii PHP pentru a realiza anumite setari in cadrul paginii.

  Ex:  1. <?php

                                                                                                                                                                        $res = mysql_query('SELECT * FROM categorii');

                                                                                                                                                                        while ($row = mysql_fetch_assoc($res) )

                                                                                                                                                                                   

                                                                                                                                                            ?>

-realizeaza afisarea tuturor categoriilor de retete prin conexiunea la baza de date retete.

2.    <?php

                                                                                                                                                                                                            $res = mysql_query('SELECT * FROM retete ORDER BY id DESC LIMIT 0, 10');//afisam ultimele 10 intrari din baza de date

                                                                                                                                                                                                           

                                                                                                                                                                                                            $o = 0;

                                                                                                                                                                                                            while ( $row = mysql_fetch_assoc($res) )

                                                                                                                                                                                                                       

                                                                                                                                                                                                ?>

-realizeaza afisarea ultimelor zece retete adaugate de utilizatorul site-ului.

             b)Caracteristici specifice paginii Ce pot gati. html:

  Continutul general al paginii este structurat in cadrul unei etichete <TABLE>.

  In cadrul acestei etichete definim un formular cu ajutorul etichetei FORM, folosind ca metoda de validare si transmitere a datelor , metoda post. In formular se intalnesc casute de validare (checkbox), prin marcarea lor utilizatorul va alege ingredientul disponibil.

  Ex: Casuta de validare bors este obtinuta cu sintaxa : <input type='Checkbox' name='nume1' value='bors'><span class='text'> bors</span>

 

Structura generala pentru creearea unui formular este :

  <form>

        <input type=”text”/”password”/”radio”/”reset”/”submit”

  name=”numele dat casutei de validare” value=”nume_predefinit”>

  nume </input>

  La sfarsitul definirii tuturor casutelor de validare ce contin posibile ingrediente disponibile, vom defini un buton de validare ce va avea ca valoare ,,Combina Ingrediente”. Acest buton va avea valoarea atributului type setata pe submit.

            Definirea acestui buton se realizeaza cu urmatoarea sintaxa:

<input type='Submit' name='combina' value='Combina Ingredientele'>

Urmatoarea portiune de cod PHP va avea ca efect combinarea ingredientelor in scopul afisarii unui rezultat.Rezultatul va fi reprezentat de posibile retete pe care utilizatorul le poate gati.

<?php

                                                                                                                                                                                    if ( isset($_POST['combina']) ) //daca am apasat pe butonul combina si am trimis forma



                                                                                                                                                                                               

                                                                                                                                                                                                                        }

                                                                                                                                                                                                                       

                                                                                                                                                                                                            for ( $i = 1; $i <= $k; $i++ )//pentru fiecare element din vector, punem in variabila verifica

                                                                                                                                                                                                                       

                                                                                                                                                                                                                       

                                                                                                                                                                                                            if ( $verifica != '' )//daca s-a apasat pe vreun buton, deci cautam in baza de date avand selectat un checkbox

                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                            if ( $p == $k )//daca numarul in baza de date este identic cu numarul de checkboxuri bifate(practic, reteta contine tot ce am introdus noi in checkbox-uri)

                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                    for ( $i = 0; $i < count($result); $i++ )

                                                                                                                                                                                                                                               

?>

  

Caracteristici specifice paginii adauga-reteta :

  Pentru validarea unei retete definite  de utilizator se face cu urmatoarea structura :

  <?php

if ( isset($_POST['salveaza']) )//daca am trimis forma, si exista variabila post 'salveaza'

$nume = 'retete/'.$_FILES['poza']['name'];//setam o variabila cu numele nume pentru numele imaginii ( o sa salvam in baza de date direct calea pozei )

mysql_query('INSERT INTO retete(nume, ingrediente, mod_preparare, timp_preparare, categorie, poza) VALUES('$_POST[nume]', '$_POST[ingrediente]', '$_POST[mod_preparare]', '$_POST[timp_preparare]', '$_POST[categorie]', '$nume')');//inseram in baza de date toate datele din forma

}

?>

           

Pentru adaugarea unei retete vom defini un formular ce contine campuri de completare.

Aceasta sintaxa este folosita pentru a afisa reteta  adaugata de utilizator in cadrul documentului HTML.

<select style='width: 400px;' name='categorie'>

<option value='0'>Alege</option>

<?php

$res = mysql_query('SELECT * FROM categorii');//selectam toate categoriile din tabelul categorii

while ( $row = mysql_fetch_assoc($res) )// selectam toate randurile

?>

</select> Butonul submit din cadrul acestei pagini va realiza validarea datelor.

  In cadrul paginii contact  vom gasi date referitoare la persoana care a realizat site-ul.

 

Documentul stil.css  contine date utilizate in documentul html. Stilul CSS utilizeaza clase apelate in cadrul programului prin sintaxa <span class=”nume clasa”>text</span>.

  

Stilizare text

  a) Text pentru intreaga pagina

1) .body

           

  c) Text pentru titlul paginii

1).title

           

  2) .footerText

           

  3) .text

           

  4) .pageTitle

           

  

Stilizare meniu

 a) Link neactiv, nevizitat

.menuLink:link

           

b)Link fara operatii

 .textLink:link

           

  c) Link vizitat

.menuLink:visited

           

  d) Link hover (cand mouse-ul se afla deasupra lui)

.menuLink:hover

           

  .textLink:hover

           

  e) Link activ

.menuLink:active

           

   .textLink:active

           

   Conectarea la baza de date

            Se foloseste un server mysq Wamp serverl.

            Sintaxa pentru conectare :

<?php

$con = mysql_connect('localhost', 'cosmin', '')//realizeaza conectarea la server.

or die ('Nu ne-am putut conecta la server!');//afiseaza un mesaj in cazul in care nu s-a putut realiza conexiunea.

mysql_select_db('retete_culinare', $con)//selecteaza baza de date catre care se face conexiunea si

or die('Nu exista baza de date $db');//afiseaza un mesaj in cazul in care nu s-a putut realiza conexiunea la baza de date.

?>

 








Politica de confidentialitate

DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 674
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2019 . All rights reserved

Distribuie URL

Adauga cod HTML in site