public void info_client() { if (db.read.HasRows) { while (db.read.Read()) { Label1.Text += "<tr><td><img style='float:left;padding-right:10;' src='img/identity1.jpg ' width='35'/></td>" + "<td>" + db.read[1] + "</td></tr>" + "<tr><td><img style='float:left;padding-right:10;' src='img/location1.jpg ' width='35'/></td>" + "<td>" + db.read[2] + "</td></tr>" + "<tr> <td><img style='float:left;padding-right:10;' src='img/phone1.jpg ' width='35'/></td>"+ "<td>" + db.read[4] + "</td></tr>" + "<tr> <td><img style='float:left;padding-right:10;' src='img/client1.jpg ' width='35'/></td>"+ "<td>" + db.read[5] + "</td></tr>" + "<tr><td><img style='float:left;padding-right:10;' src='img/mail1.jpg ' width='35'/></td>" + "<td>" + db.read[2] + "</td></tr>" + "<tr><td></td><td align=right>" + "<a href='modifierCompte.aspx'><div id='start'><center>Modifier</center></div>" + "</td></tr>"; } } db.read.Close(); db.closeConn(); }
public void listArticles() { Label1.Text = null; if (read.HasRows) { while (read.Read()) { Label1.Text += "<a href='article.aspx?id=" + read[0] + "'>" + "<div id='annonce'>" + "<div class=frame >" + "<span class=helper></span>" + "<img class=image src=" + read[1] + " width='180' />" + " </div>" + "<img id='arrow' src='img/arrow.jpg' height='180'/>" + "<center> <br>" + "<font style=' font-size:40;'>" + read[2] + "</font>Dh<br>" + "<font style=' font-size:20;'> " + read[3] + " </font><br> " + "<font style=' font-size:15;'> "+ read[5] + " </font><br> " + "<font style=' font-size:15;'>" + read[6] + " </font><br> " + "</center></div></a>"; } } read.Close(); db.closeConn(); }
protected void Button1_Click(object sender, EventArgs e) { SqlDataReader read; Bdd db = new Bdd(); read = db.findClient(Request.Form["TextBox1"], Request.Form["TextBox2"]); if (read.HasRows) { while (read.Read()) { if (read[5].Equals("admin") && read[6].Equals("123")) { Session["isAdmin"] = "1"; Session["isOpen"] = "1"; Session["Client"] = read[0]; } else { Session["isOpen"] = "1"; Session["Client"] = read[0]; } } read.Close(); db.closeConn(); Response.Redirect("compte.aspx"); } else { Label1.Text = "Erreur"; } read.Close(); }
protected void Button1_Click(object sender, EventArgs e) { SqlDataReader read ; Bdd db = new Bdd(); read = db.findClient(Request.Form["TextBox1"], Request.Form["TextBox2"]); if( read.HasRows){ while (read.Read()) { if (read[5].Equals("admin") && read[6].Equals("123")) { Session["isAdmin"] = "1"; Session["isOpen"] = "1"; Session["Client"] = read[0]; } else { Session["isOpen"] = "1"; Session["Client"] = read[0]; } } read.Close(); db.closeConn(); Response.Redirect("compte.aspx"); } else Label1.Text="Erreur"; read.Close(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["isOpen"] != "1") { Response.Redirect("login.aspx"); } else { string c = Request.QueryString["idc"]; string a = Request.QueryString["ida"]; db.signalerArticle(a, c); db.closeConn(); db.nombreSignaler(a); db.closeConn(); Response.Redirect("annonces.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { string a = Request.QueryString["id"]; db.suppSuivi(a); db.closeConn(); db.suppArticle(a); Response.Redirect("compte.aspx"); }
public void info_client() { if (db.read.HasRows) { while (db.read.Read()) { Label2.Text = "<b style='font-size:30;font-family:'1';padding: 0 220 0 220; '>" + db.read[1] + "</b><br> "; Label1.Text = "<tr><td><img style='float:left;padding-right:10;' src='img/client1.jpg ' width='50'/></td>" + "<td>" + db.read[1] + "</td></tr><tr>" + "<td><img style='float:left;padding-right:10;' src='img/location1.jpg' width='50'/></td>" + "<td>" + db.read[3] + "</td></tr><tr>" + "<td><img style='float:left;padding-right:10;' src='img/phone1.jpg' width='50'/></td>" + "<td>" + db.read[4] + "</td></tr><tr>" + "<td><img style='float:left;padding-right:10;'src='img/mail1.jpg' width='50'/></td>" + "<td>" + db.read[2] + "</td></tr>"; } } db.read.Close(); db.closeConn(); }
public void listArticles() { if (db.read.HasRows) { while (db.read.Read()) { Session["id"] = db.read[5]; Session["nomC"] = db.read[3]; Label1.Text = "<div id='article'>" + "<div id='info1'>" + " <b style=' font-size:32;color:#ddd;'>" + db.read[2] + " / " + db.read[1] + " Dh<br> </b>" + "diposé par <a href='contact.aspx?num=" + db.read[5] + "' style='color:#1799dd;'>" + db.read[3] + "</a> le " + db.read[6] + "</div>" + "<img id='' src=" + db.read[0] + " width='900'/>" + "<div id='info2'>" + "<ul id='options'>" + "<li><a href='contact.aspx?num=" + db.read[5] + "'><img style='float:left;padding-right:10;' src='img/client1.jpg ' width='60'/>Contacter l'annonceur</a></li>" + "<li><a href='EnregistrerAnnonce.aspx?ida=" + numArticle + "&idc=" + Session["Client"] + "'><img style='float:left;padding-right:10;' src='img/save1.jpg ' width='60'/>Enregistrer l'annonce</a></li>" + "<li><a href='signalerArticles.aspx?ida=" + numArticle + "&idc=" + Session["Client"] + "'><img style='float:left;padding-right:10;' src='img/report1.jpg ' width='60'/>Signaler le contenu</a></li>" + "</ul></div>" + "<img id='arrow' src='img/arrow3.jpg' width='1000'/>" + "<div id='details'>" + " <p align=justify>" + "<b style=' font-size:26;color:#eee;'>Description :</b>" + db.read[4] + "" + "</p></div></div>"; } } db.read.Close(); db.closeConn(); }
public void listArticle() { if (db.read.HasRows) { while (db.read.Read()) { url = "" + db.read[4]; numArticle = "" + db.read[0]; Label1.Text += "<td>Titre</td>" + "<td><input name='nom' class='champ' required type='text' value='" + db.read[2] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td>Catégorie</td><td>"; /* "<select class='categorie' type='text' >" + * "<option value='0' >Choisir une catégorie</option>" + * "<option style='background-color:#dcdcc3;' value='1'>-- VEHICULES --</option>" + * "<option value='2'>Cat3</option>" + * "<option value='3'>Cat4</option>" +*/ // Label2.Text="<option style='background-color:#dcdcc3;' value='8'>-- IMMOBILIER --</option>" + // "<option value='9'>Cat6</option>" + // "<option style='background-color:#dcdcc3;' value='37'>--</option>" + // "<option value='38'>Autres</option>" + Label2.Text = "</select></td></tr>" + "</tr><tr valign=middle align=left>" + "<td>Prix</td>" + "<td><input name='prix' class='champ' type='text' required value='" + db.read[7] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td>Lieu</td>" + "<td><input name='ville' class='champ' type='text' required value='" + db.read[3] + "'/></td></tr>" + "<tr valign=middle align=left>" + "<td>Description</td>" + "<td><textarea name='descr' class='area' >" + db.read[5] + "</textarea></td>" + "</tr><tr valign=middle align=left><td>Image</td>"; } db.read.Close(); db.closeConn(); } }
public void info_client() { if (db.read.HasRows) { while (db.read.Read()) { Label1.Text = "<td><input name='nom' class='champ' required type='text' value='" + db.read[1] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/client1.jpg ' width='50'/></td>" + "<td><input name='user' class='champ' type='text' required value='" + db.read[5] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/key1.jpg ' width='50'/></td>" + "<td><input name='pass1' class='champ' type='password' required value='" + db.read[6] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/key1.jpg ' width='50'/></td>" + "<td><input name='pass2' class='champ' type='password' required value='" + db.read[6] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/mail1.jpg ' width='50'/></td>" + "<td><input name='adresse' class='champ' type='text' required value='" + db.read[2] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/phone1.jpg ' width='50'/></td>" + "<td><input name='tele' class='champ' type='text' required value='" + db.read[4] + "'/></td>" + "</tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/location1.jpg ' width='50'/></td>" + "<td><input name='ville' class='champ' type='text' required value='" + db.read[3] + "'/></td>" + "</tr></tr><tr valign=middle align=left>" + "<td><img style='float:left;padding-right:10;' src='img/key1.jpg ' width='50'/></td>" + "<td><input name='pass' class='champ' type='password' required placeholder='Mot de passe actuel'/></td>" + "</tr><tr valign=middle align=left>"; } } db.read.Close(); db.closeConn(); }