· 9 years ago · Mar 28, 2017, 09:26 PM
1/* Landing Page */
2<!DOCTYPE html>
3<html lang="en">
4<head>
5 <meta http-equiv="content-type" content="text/html" charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1" >
7 <link rel="stylesheet" type="text/css" media="screen" href="CSS/screen.css">
8</head>
9<body>
10<div id="mainpage">
11 <header>
12 <A class="rtn loginpage" title="login" href="login.html" >Login </A>
13 <a class="logo" title="Dechassa psychPharma" href="http://hailedechassa.com"><span>Dechassa psychPharma</span></a>
14 <div class="hero">
15 <h1>Enjoy Your Sleep Time With our Fictional Pharmaceutical Products</h1><br><br>
16 <br> <a class="rtn contact" title=" Contact our professionals" href="contactus.html">Contact our professionals</a>
17
18 </div>
19
20 </header>
21 <section class="main">
22 <aside>
23 <div class="content WE">
24 <h3> <a href="#">Who Are we</a></h3>
25 <p>
26 You might have thought that there is no cure for your problem. But <a href="http://hailedechassa.com"> WE</a> are telling you now there is always a solution for every problem.
27 Are you scared to go to bed at night because of your night mare? No worries, you came to the right page and your solution is just a few clicks away.
28 </p>
29 </div>
30
31 </aside>
32 <aside>
33 <div class="content product">
34 <h3> <a href="products.php">Our Products </a></h3>
35 <p>
36 We have Thousend's of collections. you can register to our page and see the list of our products.
37 </p>
38 </div>
39
40 </aside>
41 <aside>
42 <div class="content location">
43 <h3> <a href="Storelocations.html">Our Physical Locations </a></h3>
44 <p>
45 We have stores in all 50 States in USA and our main office is located at down town Washington, DC. We do have also locations in Canada, Mexico, India, Germany and Ethiopia. our 12 new shops will soon be open in Africa, asia and Middle East.
46 </p>
47 </div>
48 </aside>
49 </section>
50 <section class="mehal">
51 <article>
52 <h3> <a href="register.html">Be our Member</a></h3>
53 <p>
54 By just registering to our page you can get a membership discount on all our products,
55 and you can also receive the Monthly newsletter and promotions free of cost. The Registration process takes only a few minutes.
56 <br><br> <a class="rtn" title="Be our Member" href="register.html">Register</a>
57 </p>
58 </article>
59
60 </section>
61 <section class="event">
62 <aside>
63 <div class="content">
64 <img alt="Enjoy our Sales and Discount Events" src="images/salesevent.png" width="400" height="250">
65 <h4>Sales and Discount Events </h4>
66 <p>we have annual sales event on the first week of December. If you would like to support our free giveaway books for kids, you can buy and put it in donation box at the front door of our store
67 if you have old book and would like to donate it let us know about it <a title="contact Us" href="contactus.html">Contact Us</a>
68 and we will send you a stamp to mail it to our address</p>
69 </div>
70 </aside>
71
72 <aside>
73 <div class="content">
74 <img alt="Contribute your ideas" src="images/contactus.jpg" width="400" height="250">
75 <h4>What can we improve </h4>
76 <p> If you have any idea, comments about our services, we are more than happy to receive your voice.
77 <a title=" Comment and suggestions" href="contactus.html">You can tell us what you think about us</a>
78 </p>
79
80 </div>
81 </aside>
82
83 <blockquote>
84 <p class="slogun"><strong>Our Mission</strong></p>
85 <p class="statment">
86 A nightmare can be cause by different factors from the basic physical factors like sleeping somewhere uncomfortable to more complex psychological causes such as stress and mental health problem. Nightmare might be normal on kids however it is a big health issue when it happens frequently on adults. Taking medication will aggravate the problem. Taking alternative treatment is the right solution and that’s why Dechassa Psychpharma established. We are here to help you. Just tell us about you and we will give you the right solution designed just for you. Guaranteed you will be happy because we are the experts and we know what we are doing !!!!
87
88 </p>
89 </blockquote>
90 </section>
91 <nav >
92 <ul>
93 <li>
94 <a title="About Us" href="#">About Us</a>
95 </li>
96 <li>
97 <a title="Our Products" href="products.php">Our Products</a>
98 </li>
99 <li>
100 <a title="Register" href="register.html">Register </a>
101 </li>
102 <li>
103 <a title="Contact Us" href="contactus.html">Contact Us </a>
104 </li>
105 </ul>
106
107 </nav>
108 <footer>
109© Dechassa PhsychPharma
110 <div class="pt">
111 <a title="privacy policy" href="#">privacy policy</a>
112 <a title="Terms of Service" href="#">Terms of Service</a>
113 </div>
114 </footer>
115</div>
116</body>
117</html>
118
119
120
121
122
123/* Register.html page */
124
125
126
127
128<!DOCTYPE html>
129<html lang="en">
130<head>
131 <meta charset="UTF-8">
132 <title>Registration</title>
133 <script src='https://www.google.com/recaptcha/api.js'></script>
134</head>
135<body>
136<h4> Regstration Form</h4>
137
138<p class="regtext1"> Thank you for choosing Psychpaharma, the leading company on the sector and home for thousands of pharmaceutical products for nightmares.<br>
139 Please start your registration process to recive more about our products by filling the form bellow.<br>
140 you can choose a username and password that you can use to login to our page to see specific products.<br>
141 Please check the box at the end if you are willing to use your information for marketing</p>
142
143<form class="regis" action="register.php" method="post">
144 <table class="TbForm">
145 <tr>
146 <td ><strong>Registration From</strong></td>
147 </tr>
148 <tr>
149 <td >Username: </td>
150 <td ><input type="text" name="Cusername" ></td>
151 </tr>
152 <tr>
153 <td>Password</td>
154 <td><input type="password" name="Cpassword" ></td>
155 </tr>
156 <tr>
157 <td >FirstName</td>
158 <td ><input TYPE="text" name="FirstName" ></td>
159 </tr>
160 <tr>
161 <td >LastName</td>
162 <td ><input Type="text" name="LastName" ></td>
163 </tr>
164 <tr>
165 <td >EmailAddress</td>
166 <td ><input Type="text" name="Email" ></td>
167 </tr>
168 <tr>
169 <td >PhoneNumber</td>
170 <td ><input Type="text" name="Phone" ></td>
171 </tr>
172 <tr>
173 <td>Education</td>
174 <td><select name="Education" >
175 <option value = "0"> No Formal Education</option>
176 <option value = "1">Grade level</option>
177 <option value = "2">High School Diploma or equivalent</option>
178 <option value = "3">Collage Degree</option>
179 <option value = "4">Graduate and above</option>
180 </tr>
181 <tr>
182 <td >Address1</td>
183 <td ><input Type="text" name="Address1" ></td>
184 </tr>
185 <tr>
186 <td >City</td>
187 <td ><input Type="text" name="City" ></td>
188 </tr>
189 <tr>
190 <td >State</td>
191 <td ><input Type="text" name="State" ></td>
192 </tr>
193 <tr>
194 <td >Country</td>
195 <td ><input Type="text" name="Country" ></td>
196 </tr>
197 <tr>
198
199 <td>Can be contacted</td>
200 <td><select name="Canbecontacted">
201 <option value = "1">Yes</option>
202 <option value = "0">No</option>
203
204 </select> Please select 'Yes' if you would like to receive email about our products and promotions</td>
205 </tr>
206 <tr>
207 <td class="g-recaptcha" data-sitekey="6LdFRhkUAAAAAEKfOWa0LZD40aqChT3SRnGCB-p6"></td>
208 <td><input type="submit" name="Submit" value="Register"></td>
209 </tr>
210
211 </table>
212</form>
213</body>
214</html>
215
216
217
218
219/* Regsister.php page */
220
221
222
223
224<!DOCTYPE html>
225<html lang="en">
226<head>
227 <meta charset="UTF-8">
228 <title>Registration Page</title>
229</head>
230<body>
231<h4>Regisgter new Customer/users</h4>
232<hr>
233<?php
234if ($_POST["Email"] == ""){
235 echo "Email address is mandatory and you didnt submit it";
236 echo "<br> <a href='index.php'>Retrun to the main Page </a> ";
237 exit;
238}
239if (! ereg("[a-z]+@[a-z]+\.[a-z]+", $_POST["Email"])){
240 echo "The email address is not valid. Please check and sumbit a valid and functional email";
241 exit;
242}
243if (!ereg("^[2-9]{1}[0-9]{9}$", $_POST["Phone"])) {
244 echo "You didn't enter correctly formatted phone number. Please Enter a valid phone number!!";
245 exit;
246}
247
248if(isset($_POST['g-recaptcha-response']))
249 $captcha=$_POST['g-recaptcha-response'];
250
251if(!$captcha){
252 echo 'Please check the the captcha form.';
253 exit;
254}
255$secretkey = "6LdFRhkUAAAAABEskjmpKx-ewoYiHHnE4VIoeLyD";
256$ip = $_SERVER['REMOTE_ADDR'];
257$response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
258
259$responseKeys = json_decode($response,true);
260if(intval($responseKeys["success"]) !== 1) {
261 echo '<h2>You did not proof as you are Human</h2>';
262} else {
263 echo '<h2>Thanks for your registration.</h2>';
264}
265
266$Cusername = trim($_POST["Cusername"]);
267$Cpassword = trim($_POST["Cpassword"]);
268$FirstName = trim($_POST["FirstName"]);
269$LastName = trim($_POST["LastName"]);
270$Email = trim($_POST["Email"]);
271$Phone = trim($_POST["Phone"]);
272$Canbecontacted = trim($_POST["Canbecontacted"]);
273$Education = trim($_POST["Education"]);
274
275$Address1 = trim($_POST["Address1"]);
276$City = trim($_POST["City"]);
277$State = trim($_POST["State"]);
278$Country = trim($_POST["Country"]);
279
280$Cusername = addslashes($Cusername);
281$Cpassword = addslashes($Cpassword);
282$FirstName = addslashes($Cpassword);
283$LastName = addslashes($LastName);
284$Email = addslashes($Email);
285$Phone = addslashes($Phone);
286$Canbecontacted = addslashes($Canbecontacted);
287$Education = addslashes($Education);
288$Address1 = addslashes($Address1);
289$City = addslashes($City);
290$State = addslashes($State);
291$Country = addslashes($Country);
292try{
293 $db = new PDO("mysql:host=localhost;dbname=<My Database name>", "<My UserID>", "<My Password>");
294 $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
295}
296catch (PDOException $e){
297 printf("Unable to open database: %s\n", $e->getMessage());
298 printf("<br><a href='index.php'>Retrun to home page </a> ");
299}
300$stmt = $db->prepare("insert into Users Values (null, ?, ?, ?, ?,null, ?, ?,1,null, null,?, ? )");
301$stmt->execute(array("$FirstName", "$LastName","$Email", "$Phone", "$Cusername", "$Cpassword","$Canbecontacted","$Education"));
302
303$stmt = $db->prepare("insert into UserAddress Values (null, ?, ?, ?, ?)");
304$stmt->execute(array("$Address1", "$City","$State", "$Country" ));
305printf ("<br>The data has been entered ");
306printf ("<br><a href=thankyou.php> Return to home page </a> ");
307header("location:thankyou.php");
308exit;
309?>
310</body>
311</html>
312
313/* thankyou.php page */
314
315
316<!DOCTYPE html>
317<html lang="en">
318<head>
319 <meta charset="UTF-8">
320 <title>Title</title>
321</head>
322<body>
323<link type="text/css" rel="stylesheet" href="amazing.css">
324
325<p class="Thankyou" >Thank you. Your message has been successfully sent.
326 I will get back to you if it was a request or will come back soon with my fully functional site.
327<br>
328 <br>
329<A><img src="Pictures/awsome.jpg" width="600" height="500">
330</body>
331</html>