Guest User

Untitled

a guest
Jan 19th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.72 KB | None | 0 0
  1. <?php require('includes/config.php');
  2. j
  3. function test_input($data) {
  4. $data = trim($data);
  5. $data = stripslashes($data);
  6. $data = htmlspecialchars($data);
  7. $data = filter_var($data, FILTER_SANITIZE_STRING);
  8. return $data;
  9. }
  10. //if logged in redirect to members page
  11. if( $user->is_logged_in() ){ header('Location: memberpage.php'); }
  12.  
  13. $getline = test_input($_GET['line']);
  14. $stmt = $db->prepare('SELECT * FROM members WHERE username=:getref');
  15. $stmt->execute(array(':getref' => $getline));
  16. while($result = $stmt->fetch(PDO::FETCH_ASSOC)){
  17.  
  18. $referral = $result['username'];
  19. $referralz = $result['referral'];
  20. }
  21.  
  22. $stmt = $db->prepare('SELECT * FROM members WHERE username = :referrall');
  23. $stmt->execute(array(':referrall' => $referralz));
  24. while($resultt = $stmt->fetch(PDO::FETCH_ASSOC)){
  25.  
  26. $sponsor = $resultt['username'];
  27.  
  28.  
  29. }
  30.  
  31. if (empty($referral)){
  32. $referral = "General";
  33.  
  34. }
  35.  
  36. if (empty($sponsor)){
  37. $sponsor = "Omosco";
  38.  
  39. }
  40.  
  41.  
  42.  
  43. //if form has been submitted process it
  44. if(isset($_POST['submit'])){
  45.  
  46. //very basic validation
  47. if(strlen($_POST['bankaccount']) < 3){
  48. $error[] = 'Bank Account is too short.';
  49. }
  50.  
  51. if(!empty($_POST['bankaccount'])){
  52.  
  53. $bankaccount = test_input($_POST["bankaccount"]);
  54. //Checks if name only contains letters and whitespace
  55. if (!preg_match("/^[0-9]+$/",$bankaccount)) {
  56. $error[] = 'Bank Account: Only numbers are allowed';
  57. }
  58. }
  59. if(strlen($_POST['firstname']) < 2){
  60. $error[] = 'First name is too short.';
  61. }
  62.  
  63. if(!empty($_POST['firstname'])){
  64.  
  65. $firstname = test_input($_POST["firstname"]);
  66. //Checks if name only contains letters and whitespace
  67. if (!preg_match("/^[a-zA-Z .]*$/",$firstname)) {
  68. $error[] = 'Firstname: Only alphabet, dot and white space is allowed';
  69. }
  70. }
  71. if(strlen($_POST['lastname']) < 2){
  72. $error[] = 'Last name is too short.';
  73. }
  74.  
  75. if(!empty($_POST['lastname'])){
  76.  
  77. $lastname = test_input($_POST["lastname"]);
  78. //Checks if name only contains letters and whitespace
  79. if (!preg_match("/^[a-zA-Z .]*$/",$lastname)) {
  80. $error[] = 'Lastname: Only alphabet, dot and white space is allowed';
  81. }
  82. }
  83. if(strlen($_POST['phonenumber']) < 7){
  84. $error[] = 'Phone number is too short.';
  85. }
  86.  
  87. if(!empty($_POST['phonenumber'])){
  88.  
  89. $phonenumber = test_input($_POST["phonenumber"]);
  90. //Checks if name only contains letters and whitespace
  91. if (!preg_match("/^((+)?[1-9]{1,2})?([-s.])?(((d{1,4}))|d{1,4})(([-s.])?[0-9]{1,12}){1,2}(s*(ext|x)s*.?:?s*([0-9]+))?$/",$phonenumber)) {
  92. $error[] = 'Phone Number: Only number and + is allowed';
  93. }
  94. }
  95. if(strlen($_POST['country']) < 1){
  96. $error[] = 'No country selected.';
  97. }
  98.  
  99. if(!empty($_POST['country'])){
  100.  
  101. $country = test_input($_POST["country"]);
  102. //Checks if name only contains letters and whitespace
  103. if (!preg_match("/^[a-zA-Z .]*$/",$country)) {
  104. $error[] = 'Country: Only letters, dot and white space are allowed';
  105. }
  106. }
  107. if(strlen($_POST['bankname']) < 2){
  108. $error[] = 'Bank name is too short.';
  109. }
  110.  
  111. if(!empty($_POST['bankname'])){
  112.  
  113. $bankname = test_input($_POST["bankname"]);
  114. //Checks if name only contains letters and whitespace
  115. if (!preg_match("/^[a-zA-Z0-9 .]*$/",$bankname)) {
  116. $error[] = 'BankName: Only number, alphabet, dot and white space are allowed';
  117. }
  118. }
  119.  
  120. if(!empty($_POST['username'])){
  121.  
  122. $username = test_input($_POST["username"]);
  123. //Checks if name only contains letters and whitespace
  124. if (!preg_match("/^[a-zA-Z0-9]*$/",$username)) {
  125. $error[] = 'Username: Only alphabet and number is allowed';
  126. }
  127. }
  128.  
  129.  
  130. if(strlen($_POST['username']) < 3){
  131. $error[] = 'Username is too short.';
  132. }
  133.  
  134.  
  135.  
  136. else {
  137. $usernamexx = test_input($_POST['username']);
  138. $stmt = $db->prepare('SELECT username FROM members WHERE username = :username');
  139. $stmt->execute(array(':username' => $usernamexx));
  140. $row = $stmt->fetch(PDO::FETCH_ASSOC);
  141.  
  142. if(!empty($row['username'])){
  143. $error[] = 'Username provided is already in use.';
  144. }
  145.  
  146. }
  147.  
  148. if(!empty($_POST['password'])){
  149.  
  150. $password = test_input($_POST["password"]);
  151. //Checks if name only contains letters and whitespace
  152. if (!preg_match("/^[a-zA-Z0-9]*$/",$password)) {
  153. $error[] = 'Password: 1 upper/lower case & number is required';
  154. }
  155. }
  156. if(strlen($_POST['password']) < 3){
  157. $error[] = 'Password is too short.';
  158. }
  159.  
  160. if(strlen($_POST['passwordConfirm']) < 3){
  161. $error[] = 'Confirm password is too short.';
  162. }
  163.  
  164. if($_POST['password'] != $_POST['passwordConfirm']){
  165. $error[] = 'Passwords do not match.';
  166. }
  167.  
  168. //email validation
  169.  
  170.  
  171.  
  172. if(!empty($_POST['email'])){
  173.  
  174. $email = test_input($_POST["email"]);
  175. //Checks if name only contains letters and whitespace
  176. if (!preg_match("/^[a-zA-Z0-9._*@#]*$/",$email)) {
  177. $error[] = 'Email: Invalid email address';
  178. }
  179. }
  180.  
  181. if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){
  182. $error[] = 'Please enter a valid email address';
  183. } else {
  184. $emailxx = test_input($_POST['email']);
  185. $stmt = $db->prepare('SELECT email FROM members WHERE email = :email');
  186. $stmt->execute(array(':email' => $emailxx));
  187. $row = $stmt->fetch(PDO::FETCH_ASSOC);
  188.  
  189. if(!empty($row['email'])){
  190. $error[] = 'Email provided is already in use.';
  191. }
  192.  
  193. }
  194.  
  195.  
  196. //if no errors have been created carry on
  197. if(!isset($error)){
  198.  
  199. //hash the password
  200. $hashedpassword = $user->password_hash($_POST['password'], PASSWORD_BCRYPT);
  201. $thedate = date("Y-m-d H:i:s");
  202. $thepause = "pause";
  203. $thecomment = "Please call me on and after payment. Dont forget to upload the details of your payment.";
  204. //create the activasion code
  205. $activasion = md5(uniqid(rand(),true));
  206.  
  207. try {
  208.  
  209. //insert into database with a prepared statement
  210. $stmt = $db->prepare('INSERT INTO members (username,password,email,active,sponsor,referral,bankaccount,surname,name,bankname,phone,country,joindate,pause,downlinemsg) VALUES (:username, :password, :email, :active, :sponsor, :referral, :bankaccount, :surname, :name, :bankname, :phone, :country, :joindate, :pause, :downlinemsg)');
  211. $stmt->execute(array(
  212. ':username' => $username,
  213. ':password' => $hashedpassword,
  214. ':email' => $email,
  215. ':active' => $activasion,
  216. ':sponsor' => $sponsor,
  217. ':referral' => $referral,
  218. ':bankaccount' => $bankaccount,
  219. ':surname' => $firstname,
  220. ':name' => $lastname,
  221. ':bankname' => $bankname,
  222. ':phone' => $phonenumber,
  223. ':country' => $country,
  224. ':joindate' => $thedate,
  225. ':pause' => $thepause,
  226. ':downlinemsg' => $thecomment
  227. ));
  228. $id = $db->lastInsertId('memberID');
  229.  
  230. //send email
  231. $emailxxx = test_input($_POST['email']);
  232. $to = $emailxxx;
  233. $subject = "Registration Confirmation";
  234. $body = "<p>Thank you for registering at our site.</p>
  235. <p>To activate your account, please click on this link: <a href='".DIR."activate.php?x=$id&y=$activasion'>".DIR."activate.php?x=$id&y=$activasion</a></p>
  236. <p>Regards Site Admin</p>";
  237.  
  238. $mail = new Mail();
  239. $mail->setFrom(SITEEMAIL);
  240. $mail->addAddress($to);
  241. $mail->subject($subject);
  242. $mail->body($body);
  243. $mail->send();
  244.  
  245. //redirect to index page
  246. header('Location: register.php?action=joined');
  247. exit;
  248.  
  249. //else catch the exception and show the error.
  250. } catch(PDOException $e) {
  251. $error[] = $e->getMessage();
  252. }
  253.  
  254. }
  255.  
  256. }
  257.  
  258. //define page title
  259. $title = 'Register';
  260.  
  261. //include header template
  262. require('layout/header.php');
  263. ?>
  264. <!-- jQuery Form Validation code -->
  265. <script type="text/javascript" language="JavaScript">
  266. <!--
  267. // Password check
  268. $.validator.addMethod("pwcheck", function (value) {
  269. return /[a-z]/.test(value) && /[0-9]/.test(value) && /[A-Z]/.test(value)
  270. });
  271.  
  272. $.validator.addMethod("firstnamev", function (value) {
  273. return /^[a-z .]+$/i.test(value)
  274. });
  275. $.validator.addMethod("lastnamev", function (value) {
  276. return /^[a-z .]+$/i.test(value)
  277. });
  278.  
  279. $.validator.addMethod("banknamev", function (value) {
  280. return /^[a-z .]+$/i.test(value)
  281. });
  282. $.validator.addMethod("countryv", function (value) {
  283. return /^[a-z .]+$/i.test(value)
  284. });
  285. $.validator.addMethod("usernamev", function (value) {
  286. return /[a-zA-Z]/.test(value) && /^[a-zA-Z0-9]+$/i.test(value)
  287. });
  288.  
  289. $.validator.addMethod("phonenumberv", function (value) { return (value.match(/^((+)?[1-9]{1,2})?([-s.])?(((d{1,4}))|d{1,4})(([-s.])?[0-9]{1,12}){1,2}(s*(ext|x)s*.?:?s*([0-9]+))?$/)); });
  290.  
  291.  
  292. $.validator.addMethod('bankaccountv', function (value) {
  293. return /^[0-9]+$/.test(value);
  294. }),
  295.  
  296. // Removes Error Message When reCaptcha is Checked Valid
  297. function recaptchaCallback() {
  298. $('#hiddenRecaptcha').valid();
  299. };
  300.  
  301. $(function () {
  302.  
  303. $("#RegisterForm").validate({
  304. ignore: ".ignore",
  305.  
  306. invalidHandler : function() {
  307. $('html, body').animate({
  308. scrollTop: $("#RegisterForm").offset().top // scroll top to your form on error
  309. }, 'slow' );
  310. },
  311. // Specify the validation rules
  312. rules: {
  313. username: {
  314. required: true,
  315. minlength: 6,
  316. usernamev: true,
  317. },
  318. bankaccount: {
  319. required: true,
  320. minlength: 7,
  321. bankaccountv: true,
  322. },
  323. phonenumber: {
  324. required: true,
  325. minlength: 7,
  326. phonenumberv: true,
  327. },
  328. firstname: {
  329. required: true,
  330. minlength: 2,
  331. firstnamev: true,
  332. },
  333. lastname: {
  334. required: true,
  335. minlength: 2,
  336. lastnamev: true,
  337. },
  338. bankname: {
  339. required: true,
  340. minlength: 2,
  341. banknamev: true,
  342. },
  343. country: {
  344. required: true,
  345. countryv: true,
  346. },
  347. email: {
  348. required: true,
  349. email:true,
  350. },
  351. password: {
  352. required: true,
  353. minlength: 8,
  354. pwcheck: true,
  355. },
  356. passwordConfirm: {
  357. required: true,
  358. equalTo: "#password",
  359. },
  360. hiddenRecaptcha: {
  361. required: function () {
  362. if (grecaptcha.getResponse() == '') {
  363. return true;
  364. } else {
  365. return false;
  366. }
  367. }
  368. },
  369. },
  370.  
  371. // Specify the validation error messages
  372. messages: {
  373. username: {
  374. required: "Please enter username",
  375. usernamev: "Invalid username"
  376. },
  377. bankaccount: {
  378. required: "Please enter Bank Account",
  379. bankaccountv: "Enter valid bank account"
  380. },
  381. bankname: {
  382. required: "Please enter Bank Name",
  383. banknamev: "Enter valid bank name"
  384. },
  385. firstname: {
  386. required: "Please enter first name",
  387. firstnamev: "Enter valid Surname"
  388. },
  389. lastname: {
  390. required: "Please enter last name",
  391. lastnamev: "Enter valid name"
  392. },
  393. country: {
  394. required: "Please select country",
  395. countryv: "Enter valid Country"
  396. },
  397. phonenumber: {
  398. required: "Please enter Phone Number",
  399. phonenumberv: "Enter valid phone number"
  400. },
  401. email: {
  402. required: "Please enter an Email",
  403. },
  404. password: {
  405. required: "Password required",
  406. minlength: "Minumum length 8",
  407. pwcheck: "1 upper/lower case & number required"
  408. },
  409. passwordConfirm: {
  410. required: "Please confirm password",
  411. equalTo: "Passwords do not match"
  412. },
  413. hiddenRecaptcha: {
  414. required: "Human response required"
  415. },
  416. submitHandler: function(form) // CALLED ON SUCCESSFUL VALIDATION
  417. // Redirect can be removed from here
  418. {
  419. window.location.replace=''; // Add your custom form submitted redirect page
  420. }
  421. // Redirect can be removed to here
  422. },
  423. });
  424.  
  425. });
  426. -->
  427. </script>
  428. <style type="text/css">
  429. <!--
  430. .outer-margin {
  431. margin:2px;
  432. }
  433. .wrapper{
  434. max-width:320px;
  435. margin: 0 auto; /* position left. right and atuo for middle */
  436. margin-top:18px;
  437. border:solid 1px #DDDDDD;
  438. border-radius:0px 0px 5px 5px;
  439. }
  440. .header {
  441. font-size:20px;
  442. font-weight:normal;
  443. color:white;
  444. background-color:navy;
  445. padding:5px;
  446. margin-bottom:10px;
  447. }
  448. .main {
  449. padding:10px;
  450. }
  451. ::-webkit-input-placeholder {
  452. color:#888;
  453. }
  454. :-moz-placeholder {
  455. color:#888;
  456. }
  457. ::-moz-placeholder {
  458. color:#888;
  459. }
  460. :-ms-input-placeholder {
  461. color:#888;
  462. }
  463. /* Placeholder disappears on focus */
  464. input:focus::-webkit-input-placeholder {color:transparent !IMPORTANT;}
  465. input:focus::-moz-placeholder {color:transparent !IMPORTANT;}
  466. input:-moz-placeholder {color:transparent !IMPORTANT;}
  467. textarea:focus::-webkit-input-placeholder {color:transparent !IMPORTANT;}
  468. textarea:focus::-moz-placeholder {color:transparent !IMPORTANT;}
  469. textarea:-moz-placeholder {color:transparent !IMPORTANT;}
  470. .input-row {
  471. display:block;
  472. min-height:85px;
  473. margin-bottom:-5px;
  474. }
  475. -->
  476. </style>
  477. <div class="outer-margin">
  478. <div class="wrapper">
  479. <!-- Header -->
  480. <div class="header">&nbsp;Registration</div>
  481. <div class="main">
  482. <form name="RegisterForm" id="RegisterForm" role="form" action="" method="post" autocomplete="off">
  483. <?php
  484. //check for any errors
  485. if(isset($error)){
  486. foreach($error as $error){
  487. echo '<p class="bg-danger">'.$error.'</p>';
  488. }
  489. }
  490.  
  491. //if action is joined show sucess
  492. $getacttt = test_input($_GET['action']);
  493. if(isset($getacttt) && $getacttt == 'joined'){
  494. echo "<div class='bg-success'>Registration successful, please check your email to activate your account.</div>";
  495. }
  496. ?>
  497. <!-- Text input-->
  498. <div class="input-row">
  499. <label class="control-label" for="username">Username</label>
  500. <div class="inputGroupContainer">
  501. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  502. <input name="username" id="username" type="text" placeholder="Enter Username" class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $username; } ?>" tabindex="1">
  503. </div>
  504. <label style="color:red; font-weight:normal;" class="error" for="username" generated="true"></label>
  505. </div>
  506. </div>
  507. <!-- Text input-->
  508. <div class="input-row">
  509. <label class="control-label" for="email">Email</label>
  510. <div class="inputGroupContainer">
  511. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
  512. <input type="email" name="email" id="email" placeholder="Enter Email" class="form-control" maxlength="100" value="<?php if(isset($error)){ echo $email; } ?>" tabindex="2">
  513. </div>
  514. <label style="color:red; font-weight:normal;" class="error" for="email" generated="true"></label>
  515. </div>
  516. </div>
  517.  
  518.  
  519. <center><b>Below information can be change any time.</b></center>
  520. <!-- Text input-->
  521. <div class="input-row">
  522. <label class="control-label" for="bankaccount">Bank Account</label>
  523. <div class="inputGroupContainer">
  524. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  525. <input name="bankaccount" id="bankaccount" type="text" placeholder="Enter Bank Account" class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $bankaccount; } ?>" tabindex="1">
  526. </div>
  527. <label style="color:red; font-weight:normal;" class="error" for="bankaccount" generated="true"></label>
  528. </div>
  529. </div>
  530. <!-- Text input-->
  531. <div class="input-row">
  532. <label class="control-label" for="firstname">First Name</label>
  533. <div class="inputGroupContainer">
  534. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  535. <input name="firstname" id="firstname" type="text" placeholder="Correspond With Your Bank Acct" class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $firstname; } ?>" tabindex="1">
  536. </div>
  537. <label style="color:red; font-weight:normal;" class="error" for="firstname" generated="true"></label>
  538. </div>
  539. </div>
  540. <!-- Text input-->
  541. <div class="input-row">
  542. <label class="control-label" for="lastname">Last Name</label>
  543. <div class="inputGroupContainer">
  544. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  545. <input name="lastname" id="lastname" type="text" placeholder="Correspond With Your Bank Acct" class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $lastname; } ?>" tabindex="1">
  546. </div>
  547. <label style="color:red; font-weight:normal;" class="error" for="lastname" generated="true"></label>
  548. </div>
  549. </div>
  550. <!-- Text input-->
  551. <div class="input-row">
  552. <label class="control-label" for="bankname">Bank Name</label>
  553. <div class="inputGroupContainer">
  554. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  555. <input name="bankname" id="bankname" type="text" placeholder="Enter Bank Name" class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $bankname; } ?>" tabindex="1">
  556. </div>
  557. <label style="color:red; font-weight:normal;" class="error" for="bankname" generated="true"></label>
  558. </div>
  559. </div>
  560. <!-- Text input-->
  561. <div class="input-row">
  562. <label class="control-label" for="phonenumber">Phone Number (+)</label>
  563. <div class="inputGroupContainer">
  564. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  565. <input name="phonenumber" id="phonenumber" type="text" placeholder="Enter Phone Number e.g +13..." class="form-control" maxlength="50" value="<?php if(isset($error)){ echo $phonenumber; } ?>" tabindex="1">
  566. </div>
  567. <label style="color:red; font-weight:normal;" class="error" for="phonenumber" generated="true"></label>
  568. </div>
  569. </div>
  570.  
  571.  
  572.  
  573.  
  574. <!-- Text input-->
  575. <div class="input-row">
  576. <label class="control-label" for="password">Password</label>
  577. <div class="inputGroupContainer">
  578. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
  579. <input name="password" id="password" placeholder="Enter Password" class="form-control" maxlength="20" type="password" tabindex="3">
  580. </div>
  581. <label style="color:red; font-weight:normal;" class="error" for="password" generated="true"></label>
  582. </div>
  583. </div>
  584. <!-- Text input-->
  585. <div class="input-row">
  586. <label class="control-label" for="passwordConfirm">Confirm Password</label>
  587. <div class="inputGroupContainer">
  588. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
  589. <input type="password" name="passwordConfirm" id="passwordConfirm" placeholder="Re-Enter Password" maxlength="20" class="form-control" tabindex="4">
  590. </div>
  591. <label style="color:red; font-weight:normal;" class="error" for="passwordConfirm" generated="true"></label>
  592. </div>
  593. </div>
  594.  
  595. <div class="input-row">
  596.  
  597.  
  598. <select name="country" id="country">
  599. <option value="">Select Country</option>
  600. <option value="Nigeria">Nigeria</option>
  601. </select>
  602. </div>
  603.  
  604. <!-- NoCaptcha -->
  605. <div style="display:block; min-height:130px; margin-top:-5px;">
  606. <label class="control-label" for="hiddenRecaptcha">Security</label>
  607. <!-- Google No Captcha Human Security Scripts -->
  608. <input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
  609. <div class="g-recaptcha" data-sitekey="6Ldujg4UAAAAAN2uBXYSYvGpd2LqPglPlgZ2Fqcx" style="transform:scale(0.90);-webkit-transform:scale(0.90);transform-origin:0 0;-webkit-transform-origin:0 0; color:transparent; font-weight:normal; line-height:0px;" tabindex="5"> </div>
  610. <div>
  611. <label style="color:red; font-weight:normal; position:relative; top:-10px;" class="error" for="hiddenRecaptcha" generated="true"></label>
  612. </div>
  613. </div>
  614. <!-- Button -->
  615. <div class="input-row" style="margin-top:-5px; margin-bottom:-30px;">
  616. <!-- For sliver button change btn-primary to btn-default - you can add button width:100%; for full width button -->
  617. <input type="submit" name="submit" value="Register" class="btn btn-primary" tabindex="4">
  618. <span style="position:relative; bottom:-8px; left:5px;">Already a member? <a href="login.php">Login</a></span> </div>
  619. </form>
  620. </div>
  621. </div>
  622. </div>
  623.  
  624. <?php
  625. //include header template
  626. require('layout/footer.php');
  627. ?>
  628.  
  629. <?php
  630. //include config
  631. require_once('includes/config.php');
  632.  
  633. function test_input($data) {
  634. $data = trim($data);
  635. $data = stripslashes($data);
  636. $data = htmlspecialchars($data);
  637. $data = filter_var($data, FILTER_SANITIZE_STRING);
  638. return $data;
  639. }
  640. //check if already logged in move to home page
  641. if( $user->is_logged_in() ){ header('Location: index.php'); }
  642.  
  643. //process login form if submitted
  644. if(isset($_POST['submit'])){
  645.  
  646. $username = test_input($_POST['username']);
  647. $password = test_input($_POST['password']);
  648.  
  649. if($user->login($username,$password)){
  650. $_SESSION['username'] = $username;
  651. header('Location: memberpage.php');
  652. exit;
  653.  
  654. } else {
  655. $error[] = 'Wrong username or password or your account has not been activated.';
  656. }
  657.  
  658. }//end if submit
  659.  
  660. //define page title
  661. $title = 'Login';
  662.  
  663. //include header template
  664. require('layout/header.php');
  665. ?>
  666. <!-- jQuery Form Validation code -->
  667. <script type="text/javascript" language="JavaScript">
  668. <!--
  669. // Removes Error Message When reCaptcha is Checked Valid
  670. function recaptchaCallback() {
  671. $('#hiddenRecaptcha').valid();
  672. };
  673.  
  674. $(function () {
  675.  
  676. $("#UsernameLoginForm").validate({
  677. ignore: ".ignore",
  678.  
  679. invalidHandler : function() {
  680. $('html, body').animate({
  681. scrollTop: $("#UsernameLoginForm").offset().top // scroll top to your form on error
  682. }, 'slow' );
  683. },
  684. // Specify the validation rules
  685. rules: {
  686. username: {
  687. required: true,
  688. minlength: 6,
  689. },
  690. password: {
  691. required: true,
  692. },
  693. hiddenRecaptcha: {
  694. required: function () {
  695. if (grecaptcha.getResponse() == '') {
  696. return true;
  697. } else {
  698. return false;
  699. }
  700. }
  701. },
  702. },
  703.  
  704. // Specify the validation error messages
  705. messages: {
  706. username: {
  707. required: "Please enter your username",
  708. },
  709. password: {
  710. required: "Please enter your password",
  711. },
  712. hiddenRecaptcha: {
  713. required: "Human response required"
  714. },
  715. submitHandler: function(form) // CALLED ON SUCCESSFUL VALIDATION
  716. // Redirect can be removed from here
  717. {
  718. window.location.replace='redirect-when-logged-in.php'; // Add your custom form submitted redirect
  719. }
  720. // Redirect can be removed to here
  721. },
  722. });
  723.  
  724. });
  725. -->
  726. </script>
  727. <style type="text/css">
  728. <!--
  729. .outer-margin {
  730. margin:2px;
  731. }
  732. .wrapper{
  733. max-width:320px;
  734. margin: 0 auto; /* position left. right and atuo for middle */
  735. margin-top:18px;
  736. border:solid 1px #DDDDDD;
  737. border-radius:0px 0px 5px 5px;
  738. }
  739. .header {
  740. font-size:20px;
  741. font-weight:normal;
  742. color:white;
  743. background-color:navy;
  744. padding:5px;
  745. margin-bottom:10px;
  746. }
  747. .main {
  748. padding:10px;
  749. }
  750. ::-webkit-input-placeholder {
  751. color:#888;
  752. }
  753. :-moz-placeholder {
  754. color:#888;
  755. }
  756. ::-moz-placeholder {
  757. color:#888;
  758. }
  759. :-ms-input-placeholder {
  760. color:#888;
  761. }
  762. /* Placeholder disappears on focus */
  763. input:focus::-webkit-input-placeholder {color:transparent !IMPORTANT;}
  764. input:focus::-moz-placeholder {color:transparent !IMPORTANT;}
  765. input:-moz-placeholder {color:transparent !IMPORTANT;}
  766. textarea:focus::-webkit-input-placeholder {color:transparent !IMPORTANT;}
  767. textarea:focus::-moz-placeholder {color:transparent !IMPORTANT;}
  768. textarea:-moz-placeholder {color:transparent !IMPORTANT;}
  769. .input-row {
  770. display:block;
  771. min-height:85px;
  772. margin-bottom:-5px;
  773. }
  774. -->
  775. </style>
  776. <!-- End Head -->
  777. </head><body>
  778. <!-- Place All in Body -->
  779. <div class="outer-margin">
  780. <div class="wrapper">
  781. <!-- Header -->
  782. <div class="header">&nbsp;Login</div>
  783. <div class="main">
  784. <!-- YOUR WILL NEED TO SET YOUR FORM action="" OR REMOVE IF REQUIRED BY YOUR PHP SCRIPT -->
  785. <form name="UsernameLoginForm" id="UsernameLoginForm" role="form" action="" method="post" autocomplete="off">
  786. <?php
  787. //check for any errors
  788. if(isset($error)){
  789. foreach($error as $error){
  790. echo '<p class="bg-danger">'.$error.'</p>';
  791. }
  792. }
  793. $useraction = test_input($_GET['action']);
  794.  
  795. if(isset($useraction)){
  796.  
  797. //check the action
  798. switch ($useraction) {
  799. case 'active':
  800. echo "<div class='bg-success'>Your account is now active you may now log in.</div>";
  801. break;
  802. case 'reset':
  803. echo "<div class='bg-success'>Please check your inbox for a reset link.</div>";
  804. break;
  805. case 'resetAccount':
  806. echo "<div class='bg-success'>Password changed, you may now login.</div>";
  807. break;
  808. }
  809.  
  810. }
  811.  
  812.  
  813. ?>
  814. <!-- Text input-->
  815. <div class="input-row">
  816. <label class="control-label" for="username">Username</label>
  817. <div class="inputGroupContainer">
  818. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  819. <input name="username" id="username" placeholder="Username" class="form-control" type="text" value="<?php if(isset($error)){ echo $username; } ?>" maxlength="50" tabindex="1">
  820. </div>
  821. <label style="color:red; font-weight:normal;" class="error" for="username" generated="true"></label>
  822. </div>
  823. </div>
  824. <!-- Text input-->
  825. <div class="input-row">
  826. <label class="control-label" for="password">Password</label>
  827. <div class="inputGroupContainer">
  828. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
  829. <input name="password" id="password" placeholder="Password" class="form-control" type="password" maxlength="20" tabindex="2">
  830. </div>
  831. <label style="color:red; font-weight:normal;" class="error" for="password" generated="true"></label>
  832. </div>
  833. </div>
  834. <!-- NoCaptcha -->
  835. <div style="display:block; min-height:130px; margin-top:-5px;">
  836. <label class="control-label" for="hiddenRecaptcha">Security</label>
  837. <!-- Google No Captcha Human Security Scripts -->
  838. <input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
  839. <div class="g-recaptcha" data-sitekey="6Ldujg4UAAAAAN2uBXYSYvGpd2LqPglPlgZ2Fqcx" style="transform:scale(0.90);-webkit-transform:scale(0.90);transform-origin:0 0;-webkit-transform-origin:0 0; color:transparent; font-weight:normal; line-height:0px;" tabindex="3"> </div>
  840. <div>
  841. <label style="color:red; font-weight:normal; position:relative; top:-10px;" class="error" for="hiddenRecaptcha" generated="true"></label>
  842. </div>
  843. </div>
  844. <!-- Button -->
  845. <div class="input-row" style="margin-top:-5px; margin-bottom:-30px;">
  846. <!-- For sliver button change btn-primary to btn-default - you can add button width:100%; for full width button -->
  847. <input type="submit" name="submit" value="Login" class="btn btn-primary" tabindex="4">
  848. <span style="position:relative; bottom:-8px; left:5px;"><a href="register.php">Join</a> | <a href="reset.php">Forgot your password?</a></span> </div>
  849. </form>
  850. </div>
  851. </div>
  852. </div>
  853.  
  854. <?php
  855. //include header template
  856. require('layout/footer.php');
  857. ?>
  858.  
  859. <?php require('includes/config.php');
  860.  
  861. function test_input($data) {
  862. $data = trim($data);
  863. $data = stripslashes($data);
  864. $data = htmlspecialchars($data);
  865. $data = filter_var($data, FILTER_SANITIZE_STRING);
  866. return $data;
  867. }
  868. $membereditz = "memberedit";
  869. $memberlogz = "memberlog";
  870. //if not logged in redirect to login page
  871. if(!$user->is_logged_in()){ header('Location: login.php'); }
  872. else
  873. {
  874. $stmt = $db->prepare('SELECT * FROM members WHERE username=:username');
  875. $stmt->execute(array(':username' => $_SESSION['username']));
  876. while($result = $stmt->fetch(PDO::FETCH_ASSOC)){
  877.  
  878.  
  879.  
  880. $email = test_input($result['email']);
  881. $firstname = test_input($result['surname']);
  882. $lastname = test_input($result['name']);
  883. $phonenumber = test_input($result['phone']);
  884. $bankname = test_input($result['bankname']);
  885. $bankaccount = test_input($result['bankaccount']);
  886. $whatsapp = test_input($result['whatsapp']);
  887. $admban = test_input($result['ban']);
  888. $message = test_input($result['downlinemsg']);
  889. }
  890.  
  891.  
  892. if($admban=='0'){
  893.  
  894. //if form has been submitted process it
  895. if(isset($_POST['submit'])){
  896.  
  897. //very basic validation
  898. if(strlen($_POST['bankaccount']) < 3){
  899. $error[] = 'Bank Account is too short.';
  900. }
  901.  
  902. if(!empty($_POST['bankaccount'])){
  903.  
  904. $bankaccount1 = test_input($_POST["bankaccount"]);
  905. //Checks if name only contains letters and whitespace
  906. if (!preg_match("/^[0-9]+$/",$bankaccount)) {
  907. $error[] = 'Bank Account: Only numbers are allowed';
  908. }
  909. }
  910. if(strlen($_POST['firstname']) < 2){
  911. $error[] = 'First name is too short.';
  912. }
  913.  
  914. if(!empty($_POST['firstname'])){
  915.  
  916. $firstname1 = test_input($_POST["firstname"]);
  917. //Checks if name only contains letters and whitespace
  918. if (!preg_match("/^[a-zA-Z .]*$/",$firstname)) {
  919. $error[] = 'Firstname: Only alphabet, dot and white space is allowed';
  920. }
  921. }
  922. if(strlen($_POST['lastname']) < 2){
  923. $error[] = 'Last name is too short.';
  924. }
  925. if(!empty($_POST['lastname'])){
  926.  
  927. $lastname1 = test_input($_POST["lastname"]);
  928. //Checks if name only contains letters and whitespace
  929. if (!preg_match("/^[a-zA-Z .]*$/",$lastname)) {
  930. $error[] = 'Lastname: Only alphabet, dot and white space is allowed';
  931. }
  932. }
  933. if(strlen($_POST['phonenumber']) < 7){
  934. $error[] = 'Phone number is too short.';
  935. }
  936. if(!empty($_POST['phonenumber'])){
  937.  
  938. $phonenumber1 = test_input($_POST["phonenumber"]);
  939. //Checks if name only contains letters and whitespace
  940. if (!preg_match("/^((+)?[1-9]{1,2})?([-s.])?(((d{1,4}))|d{1,4})(([-s.])?[0-9]{1,12}){1,2}(s*(ext|x)s*.?:?s*([0-9]+))?$/",$phonenumber)) {
  941. $error[] = 'Phone Number: Only number and + is allowed';
  942. }
  943. }
  944. if(!empty($_POST['whatsapp'])){
  945.  
  946. $whatsapp1 = test_input($_POST["whatsapp"]);
  947. if (!preg_match("/^((+)?[1-9]{1,2})?([-s.])?(((d{1,4}))|d{1,4})(([-s.])?[0-9]{1,12}){1,2}(s*(ext|x)s*.?:?s*([0-9]+))?$/",$whatsapp1)) {
  948. $error[] = 'Phone Number: Only number and + is allowed';
  949. }}
  950.  
  951. if(strlen($_POST['bankname']) < 2){
  952. $error[] = 'Bank name is too short.';
  953. }
  954.  
  955. if(!empty($_POST['bankname'])){
  956.  
  957. $bankname1 = test_input($_POST["bankname"]);
  958. //Checks if name only contains letters and whitespace
  959. if (!preg_match("/^[a-zA-Z0-9 .]*$/",$bankname)) {
  960. $error[] = 'BankName: Only number, alphabet, dot and white space are allowed';
  961. }
  962. }
  963.  
  964.  
  965. //if no errors have been created carry on
  966. if(!isset($error)){
  967.  
  968.  
  969.  
  970. try {
  971.  
  972. //insert into database with a prepared statement
  973. $idd = $_SESSION['memberID'];
  974.  
  975.  
  976. $dmessage = test_input($_POST["message"]);
  977.  
  978. $sql = "UPDATE members SET bankaccount=:bankaccount, surname=:surname, name=:name, bankname=:bankname, downlinemsg=:downlinemsg, phone=:phone, whatsapp=:whatsapp WHERE memberID=:idd";
  979.  
  980. $stmt = $db->prepare($sql);
  981.  
  982. $stmt->bindValue(":bankaccount", $bankaccount1, PDO::PARAM_STR);
  983. $stmt->bindValue(":surname", $firstname1, PDO::PARAM_STR);
  984. $stmt->bindValue(":name", $lastname1, PDO::PARAM_STR);
  985. $stmt->bindValue(":bankname", $bankname1, PDO::PARAM_STR);
  986. $stmt->bindValue(":phone", $phonenumber1, PDO::PARAM_STR);
  987. $stmt->bindValue(":downlinemsg", $dmessage, PDO::PARAM_STR);
  988. $stmt->bindValue(":whatsapp", $whatsapp1, PDO::PARAM_STR);
  989. $stmt->bindValue(":idd", $idd, PDO::PARAM_STR);
  990. $stmt->execute();
  991.  
  992.  
  993. $id = $db->lastInsertId('memberID');
  994.  
  995. //send email
  996. $to = $email;
  997. $subject = "Your Details Has Changed";
  998. $body = "<p>Your account details successfully changed.</p>
  999.  
  1000. <p>Regards Site Admin</p>";
  1001.  
  1002. $mail = new Mail();
  1003. $mail->setFrom(SITEEMAIL);
  1004. $mail->addAddress($to);
  1005. $mail->subject($subject);
  1006. $mail->body($body);
  1007. $mail->send();
  1008.  
  1009. //redirect to index page
  1010. header('Location: editacct.php?action=changed');
  1011. exit;
  1012.  
  1013. //else catch the exception and show the error.
  1014. } catch(PDOException $e) {
  1015. $error[] = $e->getMessage();
  1016. }
  1017.  
  1018. }
  1019.  
  1020. }
  1021.  
  1022. //define page title
  1023. $title = 'Edit Account';
  1024.  
  1025. //include header template
  1026. require('layout/header.php');
  1027. ?>
  1028. <main id="main-container">
  1029.  
  1030.  
  1031. <!-- Wrapper -->
  1032. <div class="content">
  1033.  
  1034. <div class="row">
  1035.  
  1036. <div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
  1037.  
  1038. <div class="block">
  1039. <div class="block-content">
  1040.  
  1041.  
  1042. <!-- jQuery Form Validation code -->
  1043. <script type="text/javascript" language="JavaScript">
  1044. <!--
  1045. // verification check
  1046.  
  1047. $.validator.addMethod("firstnamev", function (value) {
  1048. return /^[a-z .]+$/i.test(value)
  1049. });
  1050. $.validator.addMethod("lastnamev", function (value) {
  1051. return /^[a-z .]+$/i.test(value)
  1052. });
  1053.  
  1054. $.validator.addMethod("banknamev", function (value) {
  1055. return /^[a-z .]+$/i.test(value)
  1056. });
  1057. $.validator.addMethod("phonenumberv", function (value) { return (value.match(/^((+)?[1-9]{1,2})?([-s.])?(((d{1,4}))|d{1,4})(([-s.])?[0-9]{1,12}){1,2}(s*(ext|x)s*.?:?s*([0-9]+))?$/)); });
  1058.  
  1059.  
  1060. $.validator.addMethod('bankaccountv', function (value) {
  1061. return /^[0-9]+$/.test(value);
  1062. }),
  1063.  
  1064. // Removes Error Message When reCaptcha is Checked Valid
  1065. function recaptchaCallback() {
  1066. $('#hiddenRecaptcha').valid();
  1067. };
  1068.  
  1069. $(function () {
  1070.  
  1071. $("#RegisterForm").validate({
  1072. ignore: ".ignore",
  1073.  
  1074. invalidHandler : function() {
  1075. $('html, body').animate({
  1076. scrollTop: $("#RegisterForm").offset().top // scroll top to your form on error
  1077. }, 'slow' );
  1078. },
  1079. // Specify the validation rules
  1080. rules: {
  1081. bankaccount: {
  1082. required: true,
  1083. minlength: 7,
  1084. bankaccountv: true,
  1085. },
  1086. phonenumber: {
  1087. required: true,
  1088. minlength: 7,
  1089. phonenumberv: true,
  1090. },
  1091. firstname: {
  1092. required: true,
  1093. minlength: 2,
  1094. firstnamev: true,
  1095. },
  1096. lastname: {
  1097. required: true,
  1098. minlength: 2,
  1099. lastnamev: true,
  1100. },
  1101. bankname: {
  1102. required: true,
  1103. minlength: 2,
  1104. banknamev: true,
  1105. },
  1106. hiddenRecaptcha: {
  1107. required: function () {
  1108. if (grecaptcha.getResponse() == '') {
  1109. return true;
  1110. } else {
  1111. return false;
  1112. }
  1113. }
  1114. },
  1115. },
  1116.  
  1117. // Specify the validation error messages
  1118. messages: {
  1119. bankaccount: {
  1120. required: "Please enter Bank Account",
  1121. bankaccountv: "Enter valid bank account"
  1122. },
  1123. bankname: {
  1124. required: "Please enter Bank Name",
  1125. banknamev: "Enter valid bank name"
  1126. },
  1127. firstname: {
  1128. required: "Please enter first name",
  1129. firstnamev: "Enter valid Surname"
  1130. },
  1131. lastname: {
  1132. required: "Please enter last name",
  1133. lastnamev: "Enter valid name"
  1134. },
  1135. phonenumber: {
  1136. required: "Please enter Phone Number",
  1137. phonenumberv: "Enter valid phone number"
  1138. },
  1139. submitHandler: function(form) // CALLED ON SUCCESSFUL VALIDATION
  1140. // Redirect can be removed from here
  1141. {
  1142. window.location.replace=''; // Add your custom form submitted redirect page
  1143. }
  1144. // Redirect can be removed to here
  1145. },
  1146. });
  1147.  
  1148. });
  1149. -->
  1150. </script>
  1151.  
  1152. <div class="outer-margin">
  1153. <div class="wrapper">
  1154. <!-- Header -->
  1155. <div class="header">&nbsp;Edit Information<br/><br/>
  1156. <a href="../resetp.php"> Change Password.</a><br/><br/>
  1157. </div>
  1158. <div class="main">
  1159. <form name="RegisterForm" id="RegisterForm" role="form" action="" method="post" autocomplete="off">
  1160. <?php
  1161. //check for any errors
  1162. if(isset($error)){
  1163. foreach($error as $error){
  1164. echo '<p class="bg-danger">'.$error.'</p>';
  1165. }
  1166. }
  1167.  
  1168. //if action is joined show sucess
  1169. $daction = test_input($_GET['action']);
  1170. if(isset($daction) && $daction == 'changed'){
  1171. echo "<div class='bg-success'>Your account information has successfully changed.</div>";
  1172. }
  1173. ?>
  1174.  
  1175.  
  1176.  
  1177. <!-- Text input-->
  1178. <div class="input-row">
  1179. <label class="control-label" for="bankaccount">Bank Account</label>
  1180. <div class="inputGroupContainer">
  1181. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1182. <input name="bankaccount" id="bankaccount" type="text" placeholder="Enter Bank Account" class="form-control" maxlength="50" value="<?php echo $bankaccount; ?>" tabindex="1">
  1183. </div>
  1184. <label style="color:red; font-weight:normal;" class="error" for="bankaccount" generated="true"></label>
  1185. </div>
  1186. </div>
  1187. <!-- Text input-->
  1188. <div class="input-row">
  1189. <label class="control-label" for="firstname">First Name</label>
  1190. <div class="inputGroupContainer">
  1191. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1192. <input name="firstname" id="firstname" type="text" placeholder="Correspond With Your Bank Acct" class="form-control" maxlength="50" value="<?php echo $firstname; ?>" tabindex="1">
  1193. </div>
  1194. <label style="color:red; font-weight:normal;" class="error" for="firstname" generated="true"></label>
  1195. </div>
  1196. </div>
  1197. <!-- Text input-->
  1198. <div class="input-row">
  1199. <label class="control-label" for="lastname">Last Name</label>
  1200. <div class="inputGroupContainer">
  1201. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1202. <input name="lastname" id="lastname" type="text" placeholder="Correspond With Your Bank Acct" class="form-control" maxlength="50" value="<?php echo $lastname; ?>" tabindex="1">
  1203. </div>
  1204. <label style="color:red; font-weight:normal;" class="error" for="lastname" generated="true"></label>
  1205. </div>
  1206. </div>
  1207. <!-- Text input-->
  1208. <div class="input-row">
  1209. <label class="control-label" for="bankname">Bank Name</label>
  1210. <div class="inputGroupContainer">
  1211. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1212. <input name="bankname" id="bankname" type="text" placeholder="Enter Bank Name" class="form-control" maxlength="50" value="<?php echo $bankname; ?>" tabindex="1">
  1213. </div>
  1214. <label style="color:red; font-weight:normal;" class="error" for="bankname" generated="true"></label>
  1215. </div>
  1216. </div>
  1217. <!-- Text input-->
  1218. <div class="input-row">
  1219. <label class="control-label" for="phonenumber">Phone Number (+)</label>
  1220. <div class="inputGroupContainer">
  1221. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1222. <input name="phonenumber" id="phonenumber" type="text" placeholder="Enter Phone Number e.g +13..." class="form-control" maxlength="50" value="<?php echo $phonenumber; ?>" tabindex="1">
  1223. </div>
  1224. <label style="color:red; font-weight:normal;" class="error" for="phonenumber" generated="true"></label>
  1225. </div>
  1226. </div>
  1227. <!-- Text input-->
  1228. <div class="input-row">
  1229. <label class="control-label" for="whatsapp">Whatsapp Number (+)</label>
  1230. <div class="inputGroupContainer">
  1231. <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  1232. <input name="whatsapp" id="whatsapp" type="text" placeholder="Enter Whatsapp Number e.g +13..." class="form-control" maxlength="50" value="<?php echo $whatsapp; ?>" tabindex="1">
  1233. </div>
  1234. <label style="color:red; font-weight:normal;" class="error" for="whatsapp" generated="true"></label>
  1235. </div>
  1236. </div>
  1237.  
  1238.  
  1239.  
  1240. <div class="form-group">
  1241. <label for="message">Downline message</label>
  1242. <textarea class="form-control" name="message"
  1243. style="resize: none;" rows="4" id="message"
  1244. placeholder="Enter message"><?php echo $message; ?></textarea>
  1245. </div>
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251. <!-- NoCaptcha -->
  1252. <div style="display:block; min-height:130px; margin-top:-5px;">
  1253. <label class="control-label" for="hiddenRecaptcha">Security</label>
  1254. <!-- Google No Captcha Human Security Scripts -->
  1255. <input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
  1256. <div class="g-recaptcha" data-sitekey="6Ldujg4UAAAAAN2uBXYSYvGpd2LqPglPlgZ2Fqcx" style="transform:scale(0.90);-webkit-transform:scale(0.90);transform-origin:0 0;-webkit-transform-origin:0 0; color:transparent; font-weight:normal; line-height:0px;" tabindex="5"> </div>
  1257. <div>
  1258. <label style="color:red; font-weight:normal; position:relative; top:-10px;" class="error" for="hiddenRecaptcha" generated="true"></label>
  1259. </div>
  1260. </div>
  1261. <!-- Button -->
  1262. <div class="input-row" style="margin-top:-5px; margin-bottom:-30px;">
  1263. <!-- For sliver button change btn-primary to btn-default - you can add button width:100%; for full width button -->
  1264. <input type="submit" name="submit" value="Save" class="btn btn-primary" tabindex="4">
  1265. </div>
  1266. </form>
  1267. </div>
  1268. </div>
  1269. </div>
  1270. </div>
  1271.  
  1272. </div></div></div></div>
  1273. </main>
  1274. <?php
  1275. }
  1276. else
  1277. { header('Location: banpage.php'); } }
  1278.  
  1279. //include header template
  1280. require('layout/footer.php');
  1281. ?>
  1282.  
  1283. $stmt = $db->prepare('SELECT * FROM members WHERE username=:username');
  1284. $stmt->execute(array(':username' => $_SESSION['username']));
  1285. while($info = $stmt->fetch(PDO::FETCH_ASSOC)){
  1286.  
  1287. echo "
  1288. ".$info['downlinemsg'] . "";
  1289.  
  1290. }
Add Comment
Please, Sign In to add comment