Matière : Application Web avec C#

Similar documents
This tutorial assumes that you are familiar with ASP.Net and ActiveX controls.

İNTERNET TABANLI PROGRAMLAMA- 13.ders GRIDVIEW, DETAILSVIEW, ACCESSDATASOURCE NESNELERİ İLE BİLGİ GÖRÜNTÜLEME

Technical Service Bulletin

Web - Travaux Pratiques 1

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire

Audit de sécurité avec Backtrack 5

TP : Système de messagerie - Fichiers properties - PrepareStatement

Solaris 10 Documentation README

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

A PROJECT REPORT ON. SkyDrive. Submitted for the partial fulfillment of the requirement for the Award of the degree of MASTER OF COMPUTER APPLICATION

Sun Management Center Change Manager Release Notes

CERN EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH

N1 Grid Service Provisioning System 5.0 User s Guide for the Linux Plug-In

ASP and ADO (assumes knowledge of ADO)

HTML Fails: What No One Tells You About HTML

Créer une carte. QGIS Tutorials and Tips. Author. Ujaval Gandhi Translations by

Veritas Storage Foundation 5.0 Software for SPARC

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

Big Data Meets Infosec Visualiza4on. Forensics Challenge 10 Honeynet.org

Step-by-Step Guide for Active Directory Federation Services

Sun StorEdge A5000 Installation Guide

Aucune validation n a été faite sur l exemple.

.NET Best Practices Part 1 Master Pages Setup. Version 2.0

(Ch: 1) Building ASP.NET Pages. A. ASP.NET and the.net Framework B. Introducing ASP.NET Controls C. Adding Application logic to an ASP.

Liste d'adresses URL

AgroMarketDay. Research Application Summary pp: Abstract

To be able to use web parts to create a portal-style web application

In-Home Caregivers Teleconference with Canadian Bar Association September 17, 2015

«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08)

General Certificate of Education Advanced Level Examination June 2012

Méthodes ensemblistes pour une localisation robuste de robots sous-marins

ASP.NET(C#) ile Kayıt Listeleme, Silme ve Düzenleme İşlemi

Office of the Auditor General / Bureau du vérificateur général FOLLOW-UP TO THE 2010 AUDIT OF COMPRESSED WORK WEEK AGREEMENTS 2012 SUIVI DE LA

CSS : petits compléments

Real-World ASP.NET: Building a Content Management System

POB-JAVA Documentation

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme

BILL C-665 PROJET DE LOI C-665 C-665 C-665 HOUSE OF COMMONS OF CANADA CHAMBRE DES COMMUNES DU CANADA

Survey on Conference Services provided by the United Nations Office at Geneva

Archived Content. Contenu archivé

Licence Informatique Année Exceptions

PROCEDURE INSERTION(NUM IN EMPLOYES.NUMEMP%TYPE, NOM VARCHAR2, PRENOM IN VARCHAR2, PPHOTO IN BLOB, SALAIRE IN NUMBER);

Sun Enterprise Optional Power Sequencer Installation Guide

The new French regulation on gaming: Anything new in terms of payment?

Upgrading the Solaris PC NetLink Software

TIMISKAMING FIRST NATION

Optimizing Solaris Resources Through Load Balancing

Office of the Auditor General / Bureau du vérificateur général FOLLOW-UP TO THE 2007 AUDIT OF THE DISPOSAL OF PAVEMENT LINE MARKER EQUIPMENT 2009

MODx Web Development. Antano Solar John. Chapter No. 5 "Authentication and Authorization"

GEMFIND. We Handle The Journey. So You Can Focus On The Destination. WEB TECHNOLOGIES FOR THE JEWELRY INDUSTRY - Est. 1999

SunFDDI 6.0 on the Sun Enterprise Server

Langages Orientés Objet Java

Security API Cookbook

How To Become A Foreign Language Teacher

Architecture design. Use of some Microsoft patterns & practices for Architecture Guidance (

DIRECTIVE ON ACCOUNTABILITY IN CONTRACT MANAGEMENT FOR PUBLIC BODIES. An Act respecting contracting by public bodies (chapter C-65.1, a.

2 RENSEIGNEMENTS CONCERNANT L ASSURÉ SI CELUI-CI N EST PAS LE REQUÉRANT INFORMATION CONCERNING THE INSURED PERSON IF OTHER THAN THE APPLICANT

Sun Cluster 2.2 7/00 Data Services Update: Apache Web Server

STUDENT APPLICATION FORM (Dossier d Inscription) ACADEMIC YEAR (Année Scolaire )

HEALTH CARE DIRECTIVES ACT

Archived Content. Contenu archivé

Sun StorEdge RAID Manager Release Notes

Sun Management Center 3.5 Update 1b Release Notes

Service Level Definitions and Interactions

Tool & Asset Manager 2.0. User's guide 2015

Thursday, February 7, DOM via PHP

Proposition d intervention

Archived Content. Contenu archivé

THE DEVELOPMENT OF OFFICE SPACE AND ERGONOMICS STANDARDS AT THE CITY OF TORONTO: AN EXAMPLE OF SUCCESSFUL INCLUSION OF ERGONOMICS AT THE DESIGN STAGE

CASifier une application

Modifier le texte d'un élément d'un feuillet, en le spécifiant par son numéro d'index:

EPREUVE D EXPRESSION ORALE. SAVOIR et SAVOIR-FAIRE

Archived Content. Contenu archivé

Brazil + JDBC Juin 2001, douin@cnam.fr

Archived Content. Contenu archivé

COLLABORATIVE LCA. Rachel Arnould and Thomas Albisser. Hop-Cube, France

Creating Form Rendering ASP.NET Applications

ENABLING OBJECTIVE AND TEACHING POINTS. DRILL: TIME: One 30 minutes period. 6. METHOD/APPROACH: a. demonstration; and. b. performance.

Solaris 9 9/05 Installation Roadmap

An Empirical Study of NoSQL Databases by Using MongoDB Databases

Qu est-ce que le Cloud? Quels sont ses points forts? Pourquoi l'adopter? Hugues De Pra Data Center Lead Cisco Belgium & Luxemburg

Archived Content. Contenu archivé

Sun Management Center 3.6 Version 5 Add-On Software Release Notes

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

Agenda. 1. ZAPms Konzept. 2. Benutzer-Kontroller. 3. Laout-Aufbau. 4. Template-Aufbau. 6. Konfiguration. 7. Module.

This document is a preview generated by EVS

Sun TM SNMP Management Agent Release Notes, Version 1.6

Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008)

Scrubbing Disks Using the Solaris Operating Environment Format Program

Remote Method Invocation

Transcription:

UNIVERSITÉ ANTONINE Faculté d ingénieurs en Informatique, Multimédia, Réseaux & Télécommunications Matière : Application Web avec C# Effectué par : NOM Prénom MATTA Elie et al. INF# Privacy applied Copyright 2010-2011, eliematta.com. All rights reserved

On va introduire dans ce rapport les différentes étapes qu on a suivi avec des exemples et des images : Master Page : Copyright 2010-2011, eliematta.com. All rights reserved Page 1

Dans cette page on a mis un contentplaceholder dans lequel vont ouvrir les pages secondaires du website. L autre partie ne change pas de page en page. Elle contient des links vers des pages contenant : Des informations sur les professeurs ; Des conseils pour la beauté ; Les sponsors ; Des informations concernant les concurrentes avec un gallery ; Le box du login et logout ; Des informations a propos des jurées ; Un bouton home menant a la page principale ; Un contact us pour nous donner tous les commentaires. Deux panels servent a la démarche d authentification : La première contient le username et le password avec un login button qui est visible par défaut. Si l authentification est correcte ce dernier panel sera invisible et un autre contenant le logout button apparait. MasterPage.master.cs : using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class MasterPage : System.Web.UI.MasterPage string userid; protected void Page_Load(object sender, EventArgs e) if (Session["user"] == null) Copyright 2010-2011, eliematta.com. All rights reserved Page 2

Panel1.Visible = true; Panel2.Visible = false; else Panel1.Visible = false; Panel2.Visible = true; protected void LinkButton1_Click1(object sender, EventArgs e) user u = new user(); u.username = TextBox1.Text; u.password = TextBox2.Text; if (u.login()) Panel1.Visible = false; Panel2.Visible = true; Session.Add("user", u); Response.Redirect("Juree_Login.aspx"); protected void TextBox2_TextChanged(object sender, EventArgs e) protected void TextBox1_TextChanged(object sender, EventArgs e) protected void LinkButton3_Click(object sender, EventArgs e) Panel1.Visible = true; Panel2.Visible = false; Session.Remove("user"); Response.Redirect("Default.aspx"); protected void LinkButton2_Click(object sender, EventArgs e) Response.Redirect("Juree_Login.aspx"); Copyright 2010-2011, eliematta.com. All rights reserved Page 3

MasterPage.master.aspx <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>.:: Miss Lebanon 2009 ::.</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript"> // <!CDATA[ function P1_onclick() function Text1_onclick() // ]]> </script> </head> <body> <form id="form1" runat="server"> <div id="topheader"> <div class="topmenu_area"><a href="default.aspx" class="home">home</a> <a href="aboutus.aspx" class="about">about</a> <a href="jurylist.aspx" class="search">jury</a> <div class="banner_textarea" style="width: 494px"> <p class="banner_head">a lucky girl will be wearing a crown and the title of Miss Lebanon 2009 this Year! Who will this beauty be? </p> <p>miss Lebanon is the only national beauty contest that awards prizes worth more than half a million US dollars to its winners. Keep on joining this website to vote for your favorite participant.</p> <div class="search_menu_banner"> <div class="menu_area"><a href="gallery.aspx" class="addidea">gallery</a> <a href="news.aspx" class="loginhere">news</a> <a href="comments.aspx" class="comments">comments</a> <a href="contactus.aspx" class="contact">contact Us </a> <div id="body_area"> <div class="left"> <div class="morelinks_top"> Copyright 2010-2011, eliematta.com. All rights reserved Page 4

<div class="morelinks_area"> <div class="morelinks_head">more Links <div class="links_morearea"><a href="default.aspx" class="morelink">home<span class="links_text"> </span></a> <a href="contest.aspx" class="morelink">the contest <span class="links_text"> </span></a> <a href="beautytip.aspx" class="morelink">beauty Tips<span class="links_text"></span></a> <a href="membersarea.aspx" class="morelink">teachers<span class="links_text"></span></a> <br /> <a href="sponsors.aspx" class="morelink">other Sponsors<span class="links_text"></span></a> <br /> <br /> <table> <tr><td></td> <td></td> <td> <asp:image ID="Image1" runat="server" ImageUrl="~/images/image11.jpg" Height="45px" Width="32px" /><br /> </td> <td style="width: 30px"> <asp:image ID="Image2" runat="server" ImageUrl="~/images/image12.jpg" Height="45px" Width="32px" /><br /> </td> <td> <asp:image ID="Image3" runat="server" ImageUrl="~/images/image13.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image4" runat="server" ImageUrl="~/images/image14.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image5" runat="server" ImageUrl="~/images/image15.jpg" Height="45px" Width="32px" /></td> </tr> <tr> <td></td><td></td> <td> <asp:image ID="Image6" runat="server" ImageUrl="~/images/image16.jpg" Height="45px" Width="32px" /></td> <td style="width: 30px"> <asp:image ID="Image7" runat="server" ImageUrl="~/images/image17.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image8" runat="server" ImageUrl="~/images/image18.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image9" runat="server" ImageUrl="~/images/image19.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image10" runat="server" ImageUrl="~/images/image20.jpg" Height="45px" Width="32px" /></td> Copyright 2010-2011, eliematta.com. All rights reserved Page 5

</tr> <tr> <td></td><td></td> <td> <asp:image ID="Image11" runat="server" ImageUrl="~/images/image8.jpg" Height="45px" Width="32px" /></td> <td style="width: 30px"> <asp:image ID="Image12" runat="server" ImageUrl="~/images/image4.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image13" runat="server" ImageUrl="~/images/image21.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image14" runat="server" ImageUrl="~/images/image22.jpg" Height="45px" Width="32px" /></td> <td> <asp:image ID="Image15" runat="server" ImageUrl="~/images/image23.jpg" Height="45px" Width="32px" /></td> </tr> </table> <div class="morelinks_bottom"> <div class="body_area1"> <div class="mid"> <asp:contentplaceholder ID="ContentPlaceHolder1" runat="server"> </asp:contentplaceholder> <div class="right"> <div class="right_area"> <div class="right_top"> <div class="right_head"> <div class="morelinks_head">sponsors <asp:image ID="Image16" runat="server" ImageUrl="~/images/sponsors.gif" Height="210px" Width="195px" /> <div class="right_bottom"> <div class="body_areabackground"> <div id="body_area1"> <div class="inner_tabarea"> <div class="inner_menu"> <div align="center"><a href="#" class="innermenu_hover">features</a> <div class="tab_text"> <p class="tab_head">to know more about them!</p> Copyright 2010-2011, eliematta.com. All rights reserved Page 6

<p><a href="gabriellebourached.aspx" ><span class="tab_head1">gabrielle Bou Rached</span></a><br /> <a href="gabriellebourached.aspx" class="tablink">gabrielle Bou Rached</a> was crowned Miss Campus of USJ University Beirut, she represented...</p> <div class="tab_readmore"> <p align="right" class="tab_head"><a href="gabriellebourached.aspx" class="readmore">read More </a></p> <div class="tab_text"> <p><a href="georginarizk.aspx" ><span class="tab_head1">georgina Rizk</span></a><br /> In the 1972 Miss Universe pageant in Dorado, Puerto Rico, the 1971 winner, <a href="georginarizk.aspx" class="tablink">georgina Rizk</a>, was not allowed to attend...</p> <div class="tab_readmore"> <p align="right" class="tab_head"><a href="georginarizk.aspx" class="readmore">read More </a></p> <div class="login_area"> <asp:panel ID="Panel2" runat="server" Visible="False" Height="33px" Width="288px"> <div class="login_head" style="height: 27px">Welcome Jury <br /> We present to you the voting for the <br /> official Miss Lebanon 2009! You are ready <br /> to start voting. <br /><br /> <a href="juree_login.aspx"><asp:linkbutton ID="LinkButton2" runat="server">click here</asp:linkbutton></a> to see your information<br /><br /> <div class="login_textarea" style="height: 17px"> <asp:linkbutton ID="LinkButton3" CssClass="login" runat="server" Height="20px" OnClick="LinkButton3_Click" Width="70px">Logout</asp:LinkButton> </asp:panel> <asp:panel ID="Panel1" runat="server" Height="1px" Width="286px"> <div class="login_head" style="height: 27px">Already a Member? <div class="login_textarea" style="height: 33px"> <div class="login_name">your Name <div class="login_box"> <label> <asp:textbox ID="TextBox1" runat="server" Width="160px" OnTextChanged="TextBox1_TextChanged"></asp:TextBox></label> <div class="login_textarea" style="height: 33px"> <div class="login_name">password Copyright 2010-2011, eliematta.com. All rights reserved Page 7

<div class="login_box"> <label> <asp:textbox ID="TextBox2" runat="server" Width="160px" OnTextChanged="TextBox2_TextChanged" TextMode="Password"></asp:TextBox></label> <div class="login_textarea" style="height: 17px"> <asp:linkbutton ID="LinkButton1" CssClass="login" runat="server" Height="20px" OnClick="LinkButton1_Click1" Width="50px">Login</asp:LinkButton> </asp:panel> <div class="toolfree_area"> <div class="facing"> <div class="bookmark">for more information <div class="call_free"><span class="callus">call Us</span> <span class="callno">+01-444-333<br /><font size="1"> P.O.Box 14-5225 Adma, Lebanon</font></span> <div id="fotter"> <div id="fotter_1"> <div class="fotter_leftarea"> <div class="fotter_links"> <a href="default.aspx" class="fotterlink">home</a> <a href="aboutus.aspx" class="fotterlink">about Us</a> <a href="sponsors.aspx" class="fotterlink">sponsors</a> <a href="contactus.aspx" class="fotterlink">contact</a> <div class="fotter_designed">designed by: Elie Matta et al. <div class="fotter_rightarea"> <div class="fotter_copyrights">copyright Miss Lebanon 2009. All rights reserved. Managed by E.K & E.M S.A.R.L<br /> </form> </body> </html> Copyright 2010-2011, eliematta.com. All rights reserved Page 8

Default : Default est la page principale du site et qui est la première a être ouverte lors de l exécution du programme. Elle contient un texte qui nous explique a propos du site. Default.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> Copyright 2010-2011, eliematta.com. All rights reserved Page 9

<div class="tick_head">welcome to <span class="tick_head1">"miss Lebanon on line"</span> competition! <p dir="ltr"><font face="arial" color ="#3b3b3b" size="3">to participate please send us your application with some revealing photos and if acceptable we will arrange for professional photos to be taken at our expense.<br/><br/> We provide a total of more than one Million dollars in cash prizes, modeling contacts and scholarships for winners. Also we provide free accommodation for all our contestants as well as spending money when they arrive to the actual live competition following the online competition.</font></p> </asp:content> Default.apx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 10

Jurelogin Suite a l authentification on aboutit a une page nommée Juree_Login où apparait la photo du jure qui est logged in avec des informations de ce dernier qui sont présents suite a une connexion a la data base. Un bouton liste des concurrents est présent au-dessous de ces informations menant a la page concurrents Juree_Login.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Juree_Login.aspx.cs" Inherits="Juree_Login" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <p dir="ltr"><font face="arial" color ="#3b3b3b" size="3"> <asp:image ID="Image1" runat="server" Width="150" Height="180" /></font></p> <p dir="ltr"> Copyright 2010-2011, eliematta.com. All rights reserved Page 11

<font color="#3b3b3b" face="arial" size="3"> <asp:label ID="Label1" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label2" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label3" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label4" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label5" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label6" runat="server" Text=""></asp:Label><br /> <asp:label ID="Label7" runat="server" Text=""></asp:Label><br /> </font> </p> <asp:button ID="Button1" runat="server" Text="List of the contestants" OnClick="Button1_Click" /> </asp:content> Juree_Login.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Juree_Login : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) if (Session["user"] == null) Response.Redirect("Error_Login.aspx"); user u = (user)session["user"]; Label1.Text = "Nom: " + u.nom + " "; Label2.Text = "Prenom: " + u.prenom + " "; Label3.Text = "Sexe: " + u.sexe + " "; Label4.Text = "Profession: " + u.profession + " "; Label5.Text = "Telephone: " + u.telephone + " "; Label6.Text = "E-Mail: " + u.mail + " "; Label7.Text = "Adresse: " + u.adresse + " "; Image1.ImageUrl = u.image; protected void Button1_Click(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 12

Response.Redirect("concurrent.aspx"); //Response.Redirect("concurrents.aspx?conid=" + id); Concurrents : Cette page contient un grid view qui amène de la data base toutes les concurrentes présentes avec les informations sélectionnées de chacune. Le link select nous mène a une page nommée miss qui contient des informations de chaque concurrentes selon le link sélectionné. Concurrent.aspx: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="concurrent.aspx.cs" Inherits="concurent" Title="Untitled Page" %> Copyright 2010-2011, eliematta.com. All rights reserved Page 13

<asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:gridview ID="GridView1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" AutoGenerateSelectButton="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="500px" AllowSorting="True" Height="212px" > <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" /> <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" /> <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" /> </asp:gridview> </asp:content> Concurrent.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections.Generic; public partial class concurent : System.Web.UI.Page string conid; protected void Page_Load(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); string query = "Select * from Concurrent"; DataSet ds = db.select(query); DataTable dt = ds.tables[0]; string queryetape = "Select DISTINCT(etapeID) from Resultat"; DataSet dsetape = db.select(queryetape); DataTable dtetape = dsetape.tables[0]; string queryetape2 = "Select etapeid from Resultat"; DataSet dsetape2 = db.select(queryetape2); DataTable dtetape2 = dsetape2.tables[0]; ArrayList arone = new ArrayList(); List<ArrayList> listall = new List<ArrayList>(); string etapidforresult = ""; if (dtetape.rows.count > 1 dtetape2.rows.count == 30) Copyright 2010-2011, eliematta.com. All rights reserved Page 14

if (dtetape2.rows.count!= 30 && dtetape2.rows.count!= 51 && dtetape2.rows.count!= 66) etapidforresult = dtetape.rows[0][0].tostring(); for (int i = 0; i < dtetape.rows.count; i++) if (dtetape.rows[i][0].tostring().compareto(etapidforresult) == 1) etapidforresult = dtetape.rows[i][0].tostring(); if (etapidforresult == "3- Mesure et poids") etapidforresult = "2 -Beaute"; else if (etapidforresult == "4 -Questions generales") etapidforresult = "3- Mesure et poids"; else if (dtetape2.rows.count == 30) etapidforresult = "2 -Beaute"; else if (dtetape2.rows.count == 51) etapidforresult = "3- Mesure et poids"; else if (dtetape2.rows.count == 66) etapidforresult = "4 -Questions generales"; for (int i = 0; i < dt.rows.count; i++) int finalnote = getconnotebyid(dt.rows[i][0].tostring(), etapidforresult); ArrayList listone = new ArrayList(); listone.add(finalnote.tostring()); listone.add(dt.rows[i][0].tostring()); listall.add(listone); List<ArrayList> listallsorted = listall; for (int i = 0; i < listall.count; i++) for (int j = i + 1; j < listall.count; j++) if (Convert.ToInt32(listAll[j][0]) > Convert.ToInt32(listAllSorted[i][0])) ArrayList templist = listallsorted[i]; listallsorted[i] = listall[j]; listallsorted[j] = templist; Copyright 2010-2011, eliematta.com. All rights reserved Page 15

string qfinal = "Select conid, nom, prenom, lieu_naiss, date_naiss from Concurrent where "; if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 2) for (int i = 0; i < listallsorted.count - 3; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; else if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 3) for (int i = 0; i < listallsorted.count - 5; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; else if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 4) for (int i = 0; i < listallsorted.count - 7; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; Copyright 2010-2011, eliematta.com. All rights reserved Page 16

DataSet dss = db.select(qfinal); DataTable dtt = dss.tables[0]; int aaa = dtt.rows.count; GridView1.DataSource = dtt; GridView1.DataBind(); GridView1.Visible = true; else DataSet ds2 = db.select("select conid, nom, prenom, lieu_naiss, date_naiss FROM Concurrent"); DataTable dt2 = ds2.tables[0]; GridView1.DataSource = dt2; GridView1.DataBind(); private int getconnotebyid(string conid, string etapeid) Database db = new Database("Enquete.mdb"); string q = "Select Notes from Resultat where conid = '" + conid + "' and etapeid = '" + etapeid + "'"; DataSet ds = db.select(q); DataTable dt = ds.tables[0]; int finalnote = 0; if (dt.rows.count > 0) for (int i = 0; i < dt.rows.count; i++) finalnote = finalnote + Convert.ToInt32(dt.Rows[i][0].ToString()); finalnote = finalnote / dt.rows.count; return finalnote; protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) Session["conid"] = GridView1.SelectedRow.Cells[1].Text; if (Session["conid"]!= null) user connecteduser = (user)session["user"]; Database db = new Database("Enquete.mdb"); DataSet ds1 = db.select("select DISTINCT(etapeID) FROM Resultat"); DataTable dt1 = ds1.tables[0]; DataSet ds2 = db.select("select etapeid FROM Resultat"); Copyright 2010-2011, eliematta.com. All rights reserved Page 17

DataTable dt2 = ds2.tables[0]; string etapeid = "2 -Beaute"; if (dt2.rows.count == 30) etapeid = "3- Mesure et poids"; Session["etapeID"] = etapeid; else if (dt2.rows.count == 51) etapeid = "4 -Questions generales"; Session["etapeID"] = etapeid; else if (dt2.rows.count == 66) return; else if (dt1.rows.count > 0) etapeid = dt1.rows[0][0].tostring(); for (int i = 0; i < dt1.rows.count; i++) if (dt1.rows[i][0].tostring().compareto(etapeid) == 1) etapeid = dt1.rows[i][0].tostring(); Session["etapeID"] = etapeid; string a = "SELECT * FROM Resultat WHERE etapeid= '" + etapeid + "' and conid = '" + Session["conid"].ToString() + "' and userid = " + connecteduser.userid; DataSet ds3 = db.select(a); DataTable dt3 = ds3.tables[0]; if (dt3.rows.count > 0) Panel1.Visible = true; return; Response.Redirect("miss.aspx?conid" + conid); Copyright 2010-2011, eliematta.com. All rights reserved Page 18

Miss : Cette page permet de voire une photo de la concurrentes sélectionnée avec toutes les informations nécessaires pour le vote suivies d un bouton vote menant à la page dédiée au vote. Miss.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="miss.aspx.cs" Inherits="miss1" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="javascript" type="text/javascript"> // <!CDATA[ function TABLE1_onclick() // ]]> </script> Copyright 2010-2011, eliematta.com. All rights reserved Page 19

<br /><br /> <asp:image ID="Image1" runat="server" width="163px" Height="172px" /> <table id="table1" onclick="return TABLE1_onclick()"> <tr> <td> <asp:label ID="Label9" runat="server" Text="First Name"></asp:Label></td> <td><asp:label ID="Label1" runat="server"></asp:label><br /> </td></tr> <tr><td> <asp:label ID="Label10" runat="server" Text="Last Name"></asp:Label></td> <td> <asp:label ID="Label2" runat="server" Text="Label"></asp:Label> </td></tr> <tr><td> <asp:label ID="Label11" runat="server" Text="Place of birth"></asp:label></td> <td> <asp:label ID="Label3" runat="server" Text="Label"></asp:Label> </td></tr> <tr><td> <asp:label ID="Label12" runat="server" Text="Date of birth"></asp:label></td> <td> <asp:label ID="Label4" runat="server"></asp:label> </td> </tr> <tr><td> <asp:label ID="Label13" runat="server" Text="Profession"></asp:Label></td> <td> <asp:label ID="Label5" runat="server" Text="Label"></asp:Label></td> </tr> <tr><td> <asp:label ID="Label14" runat="server" Text="Height"></asp:Label></td> <td> <asp:label ID="Label6" runat="server" Text="Label"></asp:Label> </td></tr> <tr><td> <asp:label ID="Label15" runat="server" Text="Hair Color"></asp:Label></td> <td> <asp:label ID="Label7" runat="server" Text="Label"></asp:Label> </td></tr> <tr><td> <asp:label ID="Label16" runat="server" Text="Eye Color"></asp:Label></td> <td> <asp:label ID="Label8" runat="server" Text="Label"></asp:Label> </td></tr> </table> <asp:button ID="Button1" runat="server" OnClick="Button1_Click" Text="Vote" Width="65px" /> </asp:content> Copyright 2010-2011, eliematta.com. All rights reserved Page 20

Miss.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class miss1 : System.Web.UI.Page string conid; string aaa; protected void Page_Load(object sender, EventArgs e) this.button1.enabled = true; if (Session["user"] == null) this.button1.visible = false; aaa = Request.Params.Get("id"); if (aaa == null) conid = Session["conid"].ToString(); Database db = new Database("Enquete.mdb"); DataSet ds = db.select("select * FROM Concurrent where conid='" + conid + "'"); Label1.Text = ds.tables[0].rows[0][1].tostring(); Label2.Text = ds.tables[0].rows[0][2].tostring(); Label3.Text = ds.tables[0].rows[0][3].tostring(); Label4.Text = ds.tables[0].rows[0][4].tostring(); Label5.Text = ds.tables[0].rows[0][6].tostring(); Label6.Text = ds.tables[0].rows[0][10].tostring(); Label7.Text = ds.tables[0].rows[0][11].tostring(); Label8.Text = ds.tables[0].rows[0][12].tostring(); Image1.ImageUrl = ds.tables[0].rows[0][7].tostring(); else Database db = new Database("Enquete.mdb"); if (aaa == "x0010") DataSet ds = db.select("select * FROM Concurrent where conid='x010'"); Label1.Text = ds.tables[0].rows[0][1].tostring(); Label2.Text = ds.tables[0].rows[0][2].tostring(); Copyright 2010-2011, eliematta.com. All rights reserved Page 21

Label3.Text = ds.tables[0].rows[0][3].tostring(); Label4.Text = ds.tables[0].rows[0][4].tostring(); Label5.Text = ds.tables[0].rows[0][6].tostring(); Label6.Text = ds.tables[0].rows[0][10].tostring(); Label7.Text = ds.tables[0].rows[0][11].tostring(); Label8.Text = ds.tables[0].rows[0][12].tostring(); Image1.ImageUrl = ds.tables[0].rows[0][7].tostring(); else DataSet ds = db.select("select * FROM Concurrent where conid='" + aaa + "'"); Label1.Text = ds.tables[0].rows[0][1].tostring(); Label2.Text = ds.tables[0].rows[0][2].tostring(); Label3.Text = ds.tables[0].rows[0][3].tostring(); Label4.Text = ds.tables[0].rows[0][4].tostring(); Label5.Text = ds.tables[0].rows[0][6].tostring(); Label6.Text = ds.tables[0].rows[0][10].tostring(); Label7.Text = ds.tables[0].rows[0][11].tostring(); Label8.Text = ds.tables[0].rows[0][12].tostring(); Image1.ImageUrl = ds.tables[0].rows[0][7].tostring(); protected void Button1_Click(object sender, EventArgs e) Response.Redirect("vote.aspx?conid=" + conid); protected void Button2_Click(object sender, EventArgs e) if (aaa == null) Database ao = new Database("Enquete.mdb"); DataSet ds = ao.select("select * from Concurrent where conid='" + conid + "'"); DataTable dt = ds.tables[0]; int i = 2; if (dt.rows[0]["image"].tostring() == "images/image1.jpg") while (i < 3) Image1.ImageUrl = "images/nadinenjeim/image" + i; i++; this.button1.enabled = false; else Copyright 2010-2011, eliematta.com. All rights reserved Page 22

aaa + "'"); Database ao = new Database("Enquete.mdb"); DataSet ds = ao.select("select * from Concurrent where conid='" + DataTable dt = ds.tables[0]; int i = 1; if (dt.rows[0]["image"].tostring() == "images/image1.jpg") while (i < 3) Image1.ImageUrl = "images/nadinenjeim/image"+i; this.button1.enabled = false; Vote : Copyright 2010-2011, eliematta.com. All rights reserved Page 23

La page vote permet au user de voter pour chaque concurrente selon chaque critère. Trois critères sont présents permettant l élimination de quelques filles suite a la présentation du résultat. Un bouton submit permet la disposition des données dans la data base et mène a une page étape voting. Vote.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="vote.aspx.cs" Inherits="vote" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">voting: <span class="tick_head1">steps and Criterias</span><br /><br /><br /><br /> <table style="width: 241px; height: 137px" border="0"> <tr> <td style="width: 3px; height: 150px; vertical-align: top;" align="left" valign="top"><asp:label ID="lblCrit1" runat="server" /> <asp:label ID="lblCrit1Id" runat="server" Visible="False" /></td> <td style="width: 3px; height: 150px;" valign="top"> <asp:radiobutton ID="RadioButton1" runat="server" GroupName="1" Text="excellent" /><br /> <asp:radiobutton ID="RadioButton3" runat="server" GroupName="1" Text="tresbien" /> <asp:radiobutton ID="RadioButton4" runat="server" GroupName="1" Text="bien" /> <asp:radiobutton ID="RadioButton5" runat="server" GroupName="1" Text="moyen" /> <asp:radiobutton ID="RadioButton6" runat="server" GroupName="1" Text="mauvais" /> <asp:radiobutton ID="RadioButton2" runat="server" GroupName="1" Text="nonreponse" /> </td> <td style="width: 3px; height: 150px;" align="left" valign="top"><asp:label ID="lblCrit2" runat="server" /> <asp:label ID="lblCrit2Id" runat="server" Text="Label" Width="54px" Visible="False"></asp:Label></td> <td style="width: 3px; height: 150px;" valign="top"><asp:radiobutton ID="RadioButton7" runat="server" GroupName="2" Text="excellent" OnCheckedChanged="RadioButton7_CheckedChanged" /><asp:radiobutton ID="RadioButton8" runat="server" GroupName="2" Text="tresbien" OnCheckedChanged="RadioButton8_CheckedChanged" /><br /> <asp:radiobutton ID="RadioButton9" runat="server" GroupName="2" Text="bien" OnCheckedChanged="RadioButton9_CheckedChanged" /><br /> <asp:radiobutton ID="RadioButton10" runat="server" GroupName="2" Text="moyen" OnCheckedChanged="RadioButton10_CheckedChanged" /><br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 24

<asp:radiobutton ID="RadioButton11" runat="server" GroupName="2" Text="mauvais" OnCheckedChanged="RadioButton11_CheckedChanged" /><asp:radiobutton ID="RadioButton12" runat="server" GroupName="2" Text="nonreponse" OnCheckedChanged="RadioButton12_CheckedChanged" /><br /> </td> <td style="width: 3px; height: 150px;" valign="top"> <asp:label ID="lblCrit4" runat="server" Text="Label" Width="57px"></asp:Label> <br /> <asp:label ID="lblCrit4Id" runat="server" Text="Label" Visible="False"></asp:Label><br /> </td> <td style="width: 3px; height: 150px;" valign="top"> <asp:radiobutton ID="RadioButton13" runat="server" OnCheckedChanged="RadioButton13_CheckedChanged" Text="excellent" GroupName="3" /><br /> <asp:radiobutton ID="RadioButton14" runat="server" OnCheckedChanged="RadioButton14_CheckedChanged" Text="tresbien" GroupName="3" /><br /> <asp:radiobutton ID="RadioButton15" runat="server" OnCheckedChanged="RadioButton15_CheckedChanged" Text="bien" GroupName="3" /><br /> <asp:radiobutton ID="RadioButton16" runat="server" OnCheckedChanged="RadioButton16_CheckedChanged" Text="moyen" GroupName="3" /><br /> <asp:radiobutton ID="RadioButton17" runat="server" OnCheckedChanged="RadioButton17_CheckedChanged" Text="mauvais" GroupName="3" /><br /> <asp:radiobutton ID="RadioButton18" runat="server" OnCheckedChanged="RadioButton18_CheckedChanged" Text="nonreponse" GroupName="3" /> </td> </tr> </table> &nbsp ; &nbs p; &nb sp; <asp:button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" /><br /> </asp:content> using System; using System.Data; using System.Configuration; Vote.aspx.cs Copyright 2010-2011, eliematta.com. All rights reserved Page 25

using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class vote : System.Web.UI.Page string etapeid = ""; protected void Page_Load(object sender, EventArgs e) if (Session["etapeID"]!= null) etapeid = Session["etapeID"].ToString(); else etapeid = "2 -Beaute"; user u = (user)session["user"]; Database db = new Database("Enquete.mdb"); DataSet ds = db.select("select etapeid FROM Resultat"); DataSet ds1 = db.select("select userid FROM Resultat"); DataSet ds3 = db.select("select userid FROM [user]"); DataTable dt = ds.tables[0]; DataTable dt1 = ds1.tables[0]; DataTable dt3 = ds3.tables[0]; int b = Convert.ToInt32(dt1.Rows.Count); if (dt.rows.count <= 30) DataSet ds2 = db.select("select* FROM critere where etapeid='" + etapeid + "'");//like ('2%')"); DataTable dt2 = ds2.tables[0]; lblcrit1.text = dt2.rows[0][2].tostring(); lblcrit1id.text = dt2.rows[0][0].tostring(); lblcrit2.text = dt2.rows[1][2].tostring(); lblcrit2id.text = dt2.rows[1][2].tostring(); lblcrit4.text = dt2.rows[2][2].tostring(); lblcrit4id.text = dt2.rows[2][2].tostring(); else if ((dt.rows.count > 30) && (dt.rows.count < 51)) Copyright 2010-2011, eliematta.com. All rights reserved Page 26

DataSet ds2 = db.select("select* FROM critere where etapeid ='" + etapeid + "'");//like ('3%')"); DataTable dt2 = ds2.tables[0]; int a = dt2.rows.count; lblcrit1.text = dt2.rows[0][2].tostring(); lblcrit1id.text = dt2.rows[0][0].tostring(); lblcrit2.text = dt2.rows[1][2].tostring(); lblcrit2id.text = dt2.rows[1][2].tostring(); lblcrit4.text = dt2.rows[2][2].tostring(); lblcrit4id.text = dt2.rows[2][2].tostring(); else if ((dt.rows.count > 51)) DataSet ds2 = db.select("select* FROM critere where etapeid ='" + etapeid + "'"); //like ('4%')"); DataTable dt2 = ds2.tables[0]; lblcrit1.text = dt2.rows[1][2].tostring(); lblcrit1id.text = dt2.rows[0][0].tostring(); lblcrit2.text = dt2.rows[0][2].tostring(); lblcrit2id.text = dt2.rows[1][2].tostring(); lblcrit4.text = dt2.rows[2][2].tostring(); lblcrit4id.text = dt2.rows[2][2].tostring(); else Response.Redirect("etapevoting.aspx"); protected void Button1_Click(object sender, EventArgs e) if (RadioButton1.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,excellent,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 10)"; db.insert(query); Copyright 2010-2011, eliematta.com. All rights reserved Page 27

else if (RadioButton2.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,nonreponse,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 0)"; db.insert(query); else if (RadioButton3.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,tresbien,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 8)"; db.insert(query); else if (RadioButton4.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,bien,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 6)"; db.insert(query); else if (RadioButton5.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,moyen,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 4)"; db.insert(query); else if (RadioButton6.Checked) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,mauvais,userid,etapeid,conid, Notes) values('" + lblcrit1id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 2)"; Copyright 2010-2011, eliematta.com. All rights reserved Page 28

db.insert(query); Server.Transfer("etapevoting.aspx"); protected void RadioButton7_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,excellent,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 10)"; db.insert(query); protected void RadioButton8_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,tresbien,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 8)"; db.insert(query); protected void RadioButton9_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,bien,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 6)"; db.insert(query); protected void RadioButton10_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,moyen,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 4)"; db.insert(query); protected void RadioButton11_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; Copyright 2010-2011, eliematta.com. All rights reserved Page 29

string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,mauvais,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 2)"; db.insert(query); protected void RadioButton12_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,nonreponse,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 0)"; db.insert(query); protected void RadioButton13_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,excellent,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 10)"; db.insert(query); protected void RadioButton14_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,tresbien,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 8)"; db.insert(query); protected void RadioButton15_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,bien,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 6)"; db.insert(query); Copyright 2010-2011, eliematta.com. All rights reserved Page 30

protected void RadioButton16_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,moyen,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 4)"; db.insert(query); protected void RadioButton17_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,mauvais,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 2)"; db.insert(query); protected void RadioButton18_CheckedChanged(object sender, EventArgs e) Database db = new Database("Enquete.mdb"); user u = (user)session["user"]; string conid = Session["conid"].ToString(); string query = "insert into resultat (criid,nonreponse,userid,etapeid,conid, Notes) values('" + lblcrit2id.text.tostring() + "',1," + u.userid + ",'" + etapeid + "', '" + conid + "', 0)"; db.insert(query); Copyright 2010-2011, eliematta.com. All rights reserved Page 31

Etape voting : Cette page est une page de séparation entre la page du vote et celle du résultat dans laquelle un message se présente pour informer l utilisateur qu il attende le vote des autre utilisateurs afin de pouvoir afficher le résultat final et un link vers la page concurrent pour pouvoir voter aux autres concurrentes. Suite au vote de tous les users pour toutes les concurrentes, un bouton résultat initialement invisible apparait menant a la page des résultats. Etapevoting.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; Copyright 2010-2011, eliematta.com. All rights reserved Page 32

public partial class erreurlogin : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) user u = (user)session["user"]; Database db = new Database("Enquete.mdb"); DataSet ds1 = db.select("select * FROM Resultat"); DataSet ds2 = db.select("select * FROM Resultat WHERE etapeid ='3- Mesure et poids'"); DataSet ds3 = db.select("select * FROM Resultat WHERE etapeid ='4 - Questions generales'"); DataTable dt1 = ds1.tables[0]; DataTable dt2 = ds3.tables[0]; DataTable dt3 = ds3.tables[0]; if (dt1.rows.count < 30) Button1.Visible = false; Label1.Visible = true; else if ((dt1.rows.count > 30) && (dt1.rows.count < 51)) Button1.Visible = false; Label1.Visible = true; else if ((dt3.rows.count > 51) && (dt1.rows.count < 66)) Button1.Visible = false; Label1.Visible = true; else Button1.Visible = true; Label1.Visible = false; protected void Button1_Click(object sender, EventArgs e) Response.Redirect("resultat.aspx"); protected void LinkButton1_Click(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 33

Etapevoting.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="etapevoting.aspx.cs" Inherits="erreurlogin" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">voting:<span class="tick_head1">results</span><br /><br /><br /> <asp:label ID="Label1" runat="server" Height="50px" Text="Your vote has been casted, please wait while the other juries give their vote" Width="514px"> </asp:label> <br /><br /><asp:button ID="Button1" runat="server" OnClick="Button1_Click" Text="Results!" /> <br /><br /><a href="concurrent.aspx">click here</a> at any time to see the contestants. </asp:content> Résultat : Copyright 2010-2011, eliematta.com. All rights reserved Page 34

Cette page représente un grid view dans lequel sont affichées les sept filles restantes dans ce concours. En cliquant sur select on aboutit a la page miss qui nous permet d aboutir de nouveau a la page du vote mais cette fois pour l étape 2. Et ainsi de suite jusqu'à l annonce des trois premières gagnantes du concours. Resultat.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="resultat.aspx.cs" Inherits="resultat" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:gridview ID="GridView1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" AutoGenerateSelectButton="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="500px" AllowSorting="True" Height="212px" > <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" /> <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" /> <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" /> </asp:gridview> </asp:content> Resultat.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections; using System.Web.UI.MobileControls; using System.Collections.Generic; public partial class resultat : System.Web.UI.Page DataTable dt5 = new DataTable(); protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 35

== 1) Database db = new Database("Enquete.mdb"); string query = "Select * from Concurrent"; DataSet ds = db.select(query); DataTable dt = ds.tables[0]; string queryetape = "Select DISTINCT(etapeID) from Resultat"; DataSet dsetape = db.select(queryetape); DataTable dtetape = dsetape.tables[0]; ArrayList arone = new ArrayList(); List<ArrayList> listall = new List<ArrayList>(); string etapidforresult = ""; if (dtetape.rows.count > 0) etapidforresult = dtetape.rows[0][0].tostring(); for (int i = 0; i < dtetape.rows.count; i++) if (dtetape.rows[i][0].tostring().compareto(etapidforresult) etapidforresult = dtetape.rows[i][0].tostring(); if (etapidforresult == "2 -Beaute") Session["etapeID"] = "3- Mesure et poids"; else if (etapidforresult == "3- Mesure et poids") Session["etapeID"] = "4 -Questions generales"; for (int i = 0; i < dt.rows.count; i++) int finalnote = getconnotebyid(dt.rows[i][0].tostring(), etapidforresult); ArrayList listone = new ArrayList(); listone.add(finalnote.tostring()); listone.add(dt.rows[i][0].tostring()); listall.add(listone); List<ArrayList> listallsorted = listall; for (int i = 0; i < listall.count; i++) for (int j = i + 1; j < listall.count; j++) if (Convert.ToInt32(listAll[j][0]) > Convert.ToInt32(listAllSorted[i][0])) ArrayList templist = listallsorted[i]; listallsorted[i] = listall[j]; listallsorted[j] = templist; string qfinal = "Select conid, nom, prenom, lieu_naiss, date_naiss from Concurrent where "; if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 2) Copyright 2010-2011, eliematta.com. All rights reserved Page 36

for (int i = 0; i < listallsorted.count - 3; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; else if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 3) for (int i = 0; i < listallsorted.count - 5; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; else if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 4) for (int i = 0; i < listallsorted.count - 7; i++) if (i == 0) qfinal = qfinal + "conid = '" + listallsorted[i][1].tostring() + "' "; else qfinal = qfinal + "or conid = '" + listallsorted[i][1].tostring() + "' "; DataSet dss = db.select(qfinal); DataTable dtt = dss.tables[0]; int aaa = dtt.rows.count; GridView1.DataSource = dtt; GridView1.DataBind(); Copyright 2010-2011, eliematta.com. All rights reserved Page 37

from GridView1.Visible = true; if (Convert.ToInt32(etapIDForResult.Substring(0, 1).ToString()) == 4) string qmiss = "Select conid, nom, prenom, lieu_naiss, date_naiss Concurrent where conid ='" + listallsorted[0][1].tostring() + "'"; DataSet dsmiss = db.select(qfinal); DataTable dtmiss = dsmiss.tables[0]; string missname = dt.rows[0][2].tostring(); private int getconnotebyid(string conid, string etapeid) Database db = new Database("Enquete.mdb"); string q = "Select Notes from Resultat where conid = '" + conid + "' and etapeid = '" + etapeid + "'"; DataSet ds = db.select(q); DataTable dt = ds.tables[0]; int finalnote = 0; if (dt.rows.count > 0) for (int i = 0; i < dt.rows.count; i++) finalnote = finalnote + Convert.ToInt32(dt.Rows[i][0].ToString()); finalnote = finalnote / dt.rows.count; return finalnote; protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) Session["conid"] = GridView1.SelectedRow.Cells[1].Text; Response.Redirect("miss.aspx?conid" + Session["conid"].ToString()); Copyright 2010-2011, eliematta.com. All rights reserved Page 38

About us : Aboutus.aspx: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Aboutus.aspx.cs" Inherits="Aboutus" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">welcome to <span class="tick_head1">"miss Lebanon on line"</span> competition! <p dir="ltr"><font face="arial" color ="#3b3b3b" size="3"> For over 30 years, Miss Lebanon Committee has been devoted to bringing you everything that you need in relation to the world of Beauty Pageants.<br /> Lebanon has won many International Beauty Titles in the past. To name but a few, Miss Universe in 1972, Ms Globe in 2000, Miss International in 2002, Miss Model of the World in 2005, Mr. Teen of The World in 2005, Mr. International in 2006.<br /> Miss Lebanon is the only national beauty contest that awards big prizes worth over half a million US dollars to its winners. <br /> We Strictly DENY any relation to other fake websites pretending to represent any beauty contests taking place in Lebanon such as Miss Lebanon, Miss Lebanon Emigrant, Mr. Lebanon and all other official titles given.<br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 39

Surf our site, choose the section of your interest, submit your application and let your journey in the world of fame and beauty begins! To know more about us, you can contact us at any time you want just <asp:linkbutton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">click here</asp:linkbutton>!<br /> </font></p></asp:content> Aboutus.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Aboutus : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void LinkButton1_Click(object sender, EventArgs e) Response.Redirect("Contactus.aspx"); Copyright 2010-2011, eliematta.com. All rights reserved Page 40

Beautytip.aspx: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Beautytip.aspx.cs" Inherits="Beautytip" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <br /> <br /> <br /> <asp:linkbutton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Font-Bold="True" Font-Size="Large">Body care</asp:linkbutton> <asp:linkbutton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click" Font-Bold="True" Font-Size="Large">Eye care</asp:linkbutton> <asp:linkbutton ID="LinkButton3" runat="server" OnClick="LinkButton3_Click" Font-Bold="True" Font-Size="Large">Lip care</asp:linkbutton><br /> <asp:panel ID="Panel1" runat="server" Visible="False" Width="691px"> <br /><br /> <div class="tick_head">body care<br /><br /><br /> <br /><br /><br /><br /> -Mix six-teaspoon petroleum jelly, two-teaspoon glycerin and two-teaspoon lemon juice.<br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 41

Apply this moisturizing lotion at least twice a week if you have dry and flaky, arms and legs<br /> -Peel and grate a cucumber. Squeeze the juice to this, mix half-a-teaspoon glycerin and half-a-teaspoon rose water.<br /> Apply this on sunburns, leave it for some time.<br /> -If you have cracked heels, melt paraffin wax; mix it with little mustard oil and apply on the affected area. Leave it overnight.<br /> After 10 or 15 days, your heels will become smooth. -Massage your body with a mixture of coconut oil and any of your favourite scented oils like lavender or rosemary. <br /> -For rough palms, use a mixture of glycerin and limejuice in equal proportion.<br /> -For cracked heals, massage the foot with coconut oil and keep the foot in warm water for some time. Wipe the water off the feet and apply a mixture of hibiscus flower(10), Henna (1 handful) and juice of half a lemon. when dry wash it off.<br /> -Remove scars on your hands and feet by rubbing them with lemon peel.<br /> </asp:panel> <asp:panel ID="Panel2" runat="server" Visible="False" Width="690px"> <br /><br /> <div class="tick_head"> Eye care<br /><br /> <br /><br /><br /><br /> -Dip wads of cotton in a chilled mixture of cucumber and potato juice. Keep this on your eyelids for 15 to 20 minutes and gently wash it off. Apply a little baby oil. -For long eyelashes.., apply a thin coat of castor oil every night. It strengthens lashes and cools your eyes.<br /> -Massage a few drops of coconut oil around the eyes to get rid off dark circles. <br /> -To reduce puffiness of your eyes, grate a potato; tie in a cloth and place the cloth over your eyes for about 15 minutes.<br /> -Add a small pinch of salt in water and wash for bright and sparkling eyes.<br /> -Mix tomato juice and lemon juice in equal quantity and apply around the eyes. After 30 minutes wash it off with cold and hot water alternatively.<br /> -Make a paste of sandal wood and nutmeg. Apply the paste around the eyes before sleeping and wash it off in the morning.<br /> -Crush a cucumber and take the juice. Add a little rose water and apply around the eyes and wash it after 30 minutes.<br /> -Place cotton wool swabs dipped in cold milk on closed eyes for removing dark circles. <br /> </asp:panel> <asp:panel ID="Panel3" runat="server" Visible="False" Width="690px"> <br /><br /> <div class="tick_head"> Lip Care <br /><br /><br /> <br /><br /><br /><br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 42

-You can mix one-tablespoon cranberry sauce juice with two tablespoons Vaseline for a delicious home made lip balm.<br /> -Apply the juice of lemon skin for avoiding black colour of lips.<br /> -Massage your lips with coriander leaf juice for soft and rosy lips.<br /> </asp:panel> <br /> </asp:content> Beautytip.aspx.cs: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Beautytip : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void LinkButton1_Click(object sender, EventArgs e) Panel1.Visible = true; Panel2.Visible = false; Panel3.Visible = false; protected void LinkButton2_Click(object sender, EventArgs e) Panel1.Visible = false; Panel2.Visible = true; Panel3.Visible = false; protected void LinkButton3_Click(object sender, EventArgs e) Panel1.Visible = false; Panel2.Visible = false; Panel3.Visible = true; Copyright 2010-2011, eliematta.com. All rights reserved Page 43

Comments.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="comments.aspx.cs" Inherits="comments" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">comments<span class="tick_head1"> Area</span> <br /> <br /> <asp:gridview ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" Width="494px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="1" CellSpacing="2"> <RowStyle BorderWidth="0px" /> <Columns> <asp:boundfield DataField="namee" HeaderText="Name" SortExpression="namee" /> <asp:boundfield DataField="comments" HeaderText="Comments" SortExpression="comments" /> </Columns> </asp:gridview> Copyright 2010-2011, eliematta.com. All rights reserved Page 44

<asp:accessdatasource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Enquete.mdb" SelectCommand="SELECT [namee], [comments] FROM [contact]"></asp:accessdatasource> <br /> <br /> Want to cast your comment? <a href="contactus.aspx">click here</a> to contact us at any time! </asp:content> comments.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class comments : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 45

Commentsuccess.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="commentsuccess.aspx.cs" Inherits="commentsuccess" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">thank you for your <span class="tick_head1">feedback</span><br /><br /><br /><br /><br /> Your comment has been casted.<br /> Thank you for your patience, hope you enjoyed our website and dont forget to visit our <a href="gallery.aspx">gallery</a>! </asp:content> using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; Commentsuccess.aspx.cs Copyright 2010-2011, eliematta.com. All rights reserved Page 46

using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class commentsuccess : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Gallery.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="gallery.aspx.cs" Inherits="gallery" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">welcome to <span class="tick_head1">the contestants</span> Photo Gallery! <asp:literal ID="Literal1" runat="server"></asp:literal> </asp:content> Copyright 2010-2011, eliematta.com. All rights reserved Page 47

Gallery.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class gallery : System.Web.UI.Page string reqs; protected void Page_Load(object sender, EventArgs e) Database ao = new Database("Enquete.mdb"); int i = 0; int j=1; reqs = "<table><tr>"; DataSet ds = ao.select("select * from Concurrent"); DataTable dt = ds.tables[0]; while (j-1<dt.rows.count) if (i < 5) reqs += "<td>"; reqs += "<a href=miss.aspx?id=x00" + j + ">"; reqs += "<image src=" + dt.rows[j-1]["image"].tostring() + " width ='100' height ='150'></img>"; reqs += "</a>"; reqs += "</td>"; i++; j++; else i = 0; reqs += "</tr>"; reqs += "<tr>"; reqs += "<td>"; reqs += "<a href=miss.aspx?id=x00" + j + ">"; reqs += "<image src=" + dt.rows[j - 1]["Image"].ToString() + " width ='100' height ='150'>"; Copyright 2010-2011, eliematta.com. All rights reserved Page 48

reqs += "</a>"; reqs += "</img>"; i++; j++; reqs += "</tr>"; reqs += "</table>"; Literal1.Text = reqs; Contactus.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Contest.aspx.cs" Inherits="Contest" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <br /><br /> <div class="tick_head"> Facts & Information about Miss Lebanon<br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 49

<div> <p dir="ltr"><font face="arial" color ="#3b3b3b" size="2"> <br /><br /><br /> Miss Lebanon is the most important and the official beauty contest in Lebanon.<br /> While the contest dates back to even before the 1960s.<br /> The last few years, the show undertook major changes, <br /> when the contest took the form of a reality television show thanks to LBC which hosts this beauty contest.<br /> Miss Lebanon is the only national beauty contest that awards big prizes worth over half a million US dollars to its winners.<br /> Thanks to the Lebanese Broadcasting Corporation (LBC) who has been hosting for many years,<br /> the show took a dramatic change in the year 2004.<br /> The beauty contestants who compete for the crown,<br /> live together for six weeks in a Villa in Adma (The same villa which hosts Star Academy Lebanon).<br /> Some Lebanese beauty contestants have reached the semi-finals of Miss World such as Joelle Behlock and Marie Jose Hnein.<br /> However the only Miss Lebanon to have won a title were Georgina Rizk (Miss Universe 1971) and Christina Sawaya (Miss International 2001).<br /> </font></p> </asp:content> Contactus.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class contactus : System.Web.UI.Page int s; protected void Page_Load(object sender, EventArgs e) protected void TextBox1_TextChanged(object sender, EventArgs e) protected void TextBox2_TextChanged(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 50

protected void TextBox3_TextChanged(object sender, EventArgs e) protected void TextBox4_TextChanged(object sender, EventArgs e) protected void TextBox5_TextChanged(object sender, EventArgs e) protected void TextBox6_TextChanged(object sender, EventArgs e) protected void TextBox7_TextChanged(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) contact c = new contact(); c.namee = TextBox1.Text; c.email = TextBox2.Text; c.address = TextBox3.Text; c.phone = TextBox4.Text; c.subject = TextBox5.Text; c.comments = TextBox6.Text; c.tel = TextBox7.Text; if (c.test()) s = 1; else s = 0; if (s == 1) Response.Redirect("commentsuccess.aspx"); Copyright 2010-2011, eliematta.com. All rights reserved Page 51

Contest.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Contest.aspx.cs" Inherits="Contest" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <br /><br /> <div class="tick_head"> Facts & Information about Miss Lebanon<br /> <div> <p dir="ltr"><font face="arial" color ="#3b3b3b" size="2"> <br /><br /><br /> Miss Lebanon is the most important and the official beauty contest in Lebanon.<br /> While the contest dates back to even before the 1960s.<br /> The last few years, the show undertook major changes, <br /> when the contest took the form of a reality television show thanks to LBC which hosts this beauty contest.<br /> Miss Lebanon is the only national beauty contest that awards big prizes worth over half a million US dollars to its winners.<br /> Thanks to the Lebanese Broadcasting Corporation (LBC) who has been hosting for many years,<br /> Copyright 2010-2011, eliematta.com. All rights reserved Page 52

the show took a dramatic change in the year 2004.<br /> The beauty contestants who compete for the crown,<br /> live together for six weeks in a Villa in Adma (The same villa which hosts Star Academy Lebanon).<br /> Some Lebanese beauty contestants have reached the semi-finals of Miss World such as Joelle Behlock and Marie Jose Hnein.<br /> However the only Miss Lebanon to have won a title were Georgina Rizk (Miss Universe 1971) and Christina Sawaya (Miss International 2001).<br /> </font></p> </asp:content> Contest.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Contest : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 53

Jurylist.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="comments.aspx.cs" Inherits="comments" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">jury's<span class="tick_head1"> List</span> <br /> <br /> <asp:gridview ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" Width="531px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="1" CellSpacing="2"> <RowStyle BorderWidth="0px" /> <Columns> <asp:boundfield DataField="prenom" HeaderText="Prenom" SortExpression="prenom" /> <asp:boundfield DataField="nom" HeaderText="Nom" SortExpression="nom" /> <asp:boundfield DataField="sexe" HeaderText="Sexe" SortExpression="sexe" /> <asp:boundfield DataField="profession" HeaderText="Profession" SortExpression="profession" /> Copyright 2010-2011, eliematta.com. All rights reserved Page 54

<asp:boundfield DataField="mail" HeaderText="Mail" SortExpression="mail" /> </Columns> </asp:gridview> <asp:accessdatasource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Enquete.mdb" SelectCommand="SELECT [prenom], [nom], [sexe], [profession], [mail] FROM [user]"></asp:accessdatasource> <br /> </asp:content> Jurylist.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class jurylist : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 55

Membersarea.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Membersarea.aspx.cs" Inherits="Membersarea" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">teachers <p dir="ltr"><font face="arial" color ="#3b3b3b" size="3"> <br /><br /><br /> -Rigina Finianos Director of Bal Des Debutants Company<br /> -Papou Lahoud The international and lebanese fashion designer.<br /> -Sylvio Tabet The international and lebanese fashion director.<br /> -Dr. Sami Helou Doctor and Specialist in cosmetic surgery.<br /> -Magui Farah journalist.<br /> -Mona Fares Head of the unit of tourist improvment in the council of tourism.<br /> -Antoine Kerbaj Lebanese actor and Director of the actors syndicate.<br /> -Jean Louis Mangui Interior Design and decoration.<br /> -Nayla De Freige Vice president of the "L'orient le jour".<br /> </font></p></asp:content> Copyright 2010-2011, eliematta.com. All rights reserved Page 56

Membersarea.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Membersarea : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) News.aspx Puis Copyright 2010-2011, eliematta.com. All rights reserved Page 57

<%@ Page Language= C# MasterPageFile= ~/MasterPage.master AutoEventWireup= true CodeFile= News.aspx.cs Inherits= News Title= Untitled Page %> <asp:content ID= Content1 ContentPlaceHolderID= ContentPlaceHolder1 Runat= Server > <div class= tick_head ><a href= gabriellebourached.aspx ><span class= tick_head1 > Gabrielle Bou Rached </span></a><br /><br /><br /><br /><br /> Gabrielle Bou Rached was crowned Miss Campus of USJ University Beirut, she represented her country in Miss Asia <div class= tab_readmore > <p align= right class= tab_head ><a href= gabriellebourached.aspx class= readmore >Read More </a></p> <div class= tick_head ><a href= christinasawaya.aspx ><span class= tick_head1 > Christina Sawaya </span></a><br /><br /><br /><br /><br /> Christina Sawaya went on to win <div class= tab_readmore > <p align= right class= tab_head ><a href= christinasawaya.aspx class= readmore >Read More </a></p> Copyright 2010-2011, eliematta.com. All rights reserved Page 58

<div class= tick_head ><a href= georginarizk.aspx ><span class= tick_head1 > Georgina Rizk </span></a><br /><br /><br /><br /><br /> In the 1972 Miss Universe pageant in Dorado, Puerto Rico, the 1971 winner, Georgina Rizk, was not allowed to attend due to government restrictions because of fears of a terrorist attack. <div class= tab_readmore > <p align= right class= tab_head ><a href= georginarizk.aspx class= readmore >Read More </a></p> </asp:content> News.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class News : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 59

Sponsors.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="sponsors.aspx.cs" Inherits="sponsors" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">sponsors<br /><br /><br /> <table> <tr> <td style="height: 134px; width: 170px;"> <asp:image ID="Image1" runat="server" ImageUrl="~/images/sponsor12.jpg" Height="100px" Width="150px" /></td> <td style="height: 134px; width: 170px;"> <asp:image ID="Image2" runat="server" ImageUrl="~/images/z1.jpg" Height="100px" Width="150px" /></td> <td style="height: 134px"> <asp:image ID="Image3" runat="server" ImageUrl="~/images/sponsor4.jpg" Height="100px" Width="150px" /></td> </tr> <tr> <td style="width: 170px"> <asp:image ID="Image4" runat="server" ImageUrl="~/images/sponsor22.jpg" Height="100px" Width="150px" /></td> <td> Copyright 2010-2011, eliematta.com. All rights reserved Page 60

<asp:image ID="Image5" runat="server" Height="100px" ImageUrl="~/images/sponsor6.jpg" Width="150px" /></td> <td> <asp:image ID="Image6" runat="server" Height="100px" ImageUrl="~/images/sponsor21.jpg" Width="150px" /></td> </tr> </table> </asp:content> Sponsors.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class sponsors : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Copyright 2010-2011, eliematta.com. All rights reserved Page 61

Error_Login.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Error_Login.aspx.cs" Inherits="Error_Login" Title="Untitled Page" %> <asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="tick_head">access<span class="tick_head1"> Denied</span><br /><br /><br /><br /><br /> <font color="red">you do not have access to this page as you are not logged in.</font> </asp:content> using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; Error_Login.aspx.cs Copyright 2010-2011, eliematta.com. All rights reserved Page 62

using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Error_Login : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Merci d avance! Copyright 2010-2011, eliematta.com. All rights reserved Page 63