Viewing: index.php
<?php require_once('configuration/configuration.php'); $oComman = new CommonClass(); $oGeneral = new GeneralClass(); $oProduct = new ProductClass(); $oUser = new UserClass(); if($_SESSION['F_USERID']!='') { header('location:dashboard.php'); } $sMode = $_REQUEST['type']; if($sMode == "") { $sMode = "add"; } if($sMode == 'add') { if(isset($_POST['_hiddenTXT'])) { if($_POST['fld_email']!=$_POST['fld_cemail']) { header("Location:index.php?message=3"); } $sTableName = 'tbl_admin'; $aData = $_POST; $oGeneral->check_duplicate_record($sTableName, 'fld_username', $_POST['fld_username']); $iCount = $oGeneral->icount; $oGeneral->check_duplicate_record($sTableName, 'fld_email', $_POST['fld_email']); $iCount2 = $oGeneral->icount; if($iCount>0 || $iCount2>0 ) { header('location:index.php?message=1'); } else { $aData['fld_date'] = date('Y-m-d h:i:s'); $iPageInsertId = $oGeneral->insert_data($sTableName, $aData); header("Location:index.php?message=2"); } } } if($_POST['_hidCheckSubmit'] == "2") { $sUserName = $_POST['_txtUserName']; $sPassword = $_POST['_txtPassword']; $sSession = $_POST['_txtSession_Id']; $oUser->check_user($sUserName,$sPassword,'',1); $iResults = $oUser->iResults; $aResults = $oUser->aResults; // print_r($aResults); if($iResults > 0 ) { $_SESSION['F_USERNAME'] = $aResults[0]['fld_username']; $_SESSION['F_USERID'] = $aResults[0]['fld_id']; $_SESSION['_txtSession_Id'] = $sSession; header('location:dashboard.php'); } else { header('location:index.php?message=4'); } } ?> <!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Login & Sign Up Forms</title> <meta name="author" content="Reverie Tech" /> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="tabs.css" /> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> </head> <body> <style> #overlay { display:none; /*hidden on pageload*/ position:fixed; /*this will disable it from scrolling*/ width:100%; /*this will give the full width*/ height:100%; /*this will give the full height*/ z-index:999; /*this will keep it above all elements in the page*/ left:0; /*this will align it to the left*/ top:0; /*this will align it to the top*/ background:#000; /*this will give it a black background*/ } .popup { display:none; /*hidden on pageload*/ width:50%; /*width of popup*/ height:400px; /*height of popup*/ padding:10px; /*padding for popup*/ background:#fff; /*background of popup*/ border:5px solid #ccc; /*border of popup*/ position:fixed; /*this will keep it relative to the body*/ z-index:9999; /*this will keep it above the overlay*/ top:10%; /*keep popup in center*/ left:25%; /*keep popup in center*/ color:#000000; } .popup .close { /* close link*/ float:right; color:#000; text-decoration:none;/*remove underline from the close link*/ } .popup p { /*popup text*/ padding:10px 0; color:#333333; font-size:18px; } </style> <div id="overlay"></div> <div class="popup" id="popup1"> <a href="#" class="close">X</a> <p> <h2>Terms and Conditions</h2><br> <br> It’s up to you to set the rules and guidelines that the user must agree to. You can think of your Terms and Conditions agreement as the legal agreement where you maintain your rights to exclude users from your app in the event that they abuse your app, and where you maintain your legal rights against potential app abusers, and so on.<br><br><br> Terms and Conditions are also known as Terms of Service or Terms of Use.<br> <br> This type of legal agreement can be used for both your website and your mobile app. It’s not required (it’s not recommended actually) to have separate Terms and Conditions agreements: one for your website and one for your mobile app. </p> </div> <header> <h1><img src="images/logo.png" style=" width:400px;" ><span>Login or Sign Up to start</span> <hr></h1> </header> <div class="container"> <!-- <div class="democolors"> <a class="blue" href="index.html">blue</a> <a class="red" href="red.html">red</a> <a class="purple" href="purple.html">purple</a> </div>--> </div> <style> .left{ float:left; width:30%; text-align:center;} .right{ float:right; width:30%; text-align:center;} .center{ float:left; width:40%;} @media only screen and (max-width: 767px) { .left{ float:left; width:100%; text-align:center;} .right{ float:right; width:100%; text-align:center; padding-top: 44px;} .center{ float:left; width:100%; text-align:center;} .left img, .right img{ width:100%;} } </style> <?php $oProduct->getAddBanner($iPageId); $aBanner = $oProduct->aResults; ?> <div class="container" style="width:90%;"> <div class="left"> <?php for($a=1; $a<=11; $a++) { if($aBanner[0]['fld_image_left'.$a]!='') { ?> <a href="<?php echo $aBanner[0]['left_link'.$a];?>" target="_blank"> <img src="banner/<?php echo $aBanner[0]['fld_image_left'.$a]; ?>"> <?php } } ?> </a> </div> <section class="tabblue center"> <ul class="tabs blue"> <li> <input type="radio" name="tabs blue" id="tab1" checked /> <label for="tab1">Register</label> <div id="tab-content1" class="tab-content"> <p>Register now and kick start your career as a Software Testing Pro!</p> <?php if(isset($_REQUEST['message'])) { if($_REQUEST['message']==1) { ?> <div id="close" class="alert alert-danger"> <span class="vd_alert-icon"><i class="fa fa-exclamation-circle vd_red"></i></span> User / email id not available. Please try another </div> <?php } } ?> <?php if(isset($_REQUEST['message'])) { if($_REQUEST['message']==2) { ?> <div class="alert alert-success"> <span class="vd_alert-icon"><i class="fa fa-check-circle vd_green"></i></span> <?php echo 'User is successfully Register. Now You can Login'; ?> </div> <?php } } ?> <?php if(isset($_REQUEST['message'])) { if($_REQUEST['message']==3) { ?> <div class="alert alert-danger"> <span class="vd_alert-icon"><i class="fa fa-exclamation-circle vd_red"></i></span> <?php echo 'Mismatched both email id'; ?> </div> <?php } } ?> <?php if(isset($_REQUEST['message'])) { if($_REQUEST['message']==4) { ?> <div class="alert alert-danger"> <span class="vd_alert-icon"><i class="fa fa-exclamation-circle vd_red"></i></span> <?php echo 'Invalid Email id / Password'; ?> </div> <?php } } ?> <br> <form method="post" name="register" action="#"> <input name="_hiddenTXT" type="hidden" value="1"> <span class="tabaddon"><i class="fa fa-user fa-2x"></i></span> <input class="field" name="fld_username" required type="text" placeholder="myusername" value="<?php echo $_REQUEST['fld_username']; ?>" /> <span class="tabaddon"><i class="fa fa-envelope fa-2x"></i></span> <input class="field" name="fld_email" required type="email" placeholder="myusername@gmail.com" value="<?php echo $_REQUEST['fld_email']; ?>" /> <span class="tabaddon"><i class="fa fa-lock fa-2x"></i></span> <input class="field" name="fld_password" required type="password" placeholder="Password" value="<?php echo $_REQUEST['fld_password']; ?>"/> <span class="tabaddon"><i class="fa fa-lock fa-2x"></i></span> <input class="field" name="fld_cpassword" required type="password" placeholder="Confirm password" value="<?php echo $_REQUEST['fld_cpassword']; ?>"/> <span class="tabaddon"><i class="fa fa-calendar-o fa-2x"></i></span> <input type="text" id="datepicker" name="dob" placeholder="Date of birth" value="<?php echo $_REQUEST['dob']; ?>"> <span class="tabaddon"><i class="fa fa-phone fa-2x"></i></span> <input type="text" placeholder="Phone" name="phone" value="<?php echo $_REQUEST['phone']; ?>"> <span class="tabaddon"><i class="fa fa-map fa-2x"></i></span> <input type="text" placeholder="Address" name="address" value="<?php echo $_REQUEST['address']; ?>"> Address type : <input style="position:inherit;" name="add_type" type="radio" value="home" <?php if($_REQUEST['add_type']=='home') {?> checked <?php } ?>>Home <input style="position:inherit;" name="add_type" type="radio" value="office" <?php if($_REQUEST['add_type']=='office') {?> checked <?php } ?>>Office <select name="sex" required> <option value="">Choose Gender</option> <option <?php if($_REQUEST['sex']=='1') {?> selected <?php } ?> value="1">Male</option> <option <?php if($_REQUEST['sex']=='1') {?> selected <?php } ?> value="2">Female</option> </select> <select name="country" class="last countries " id="countryId"> <option value="">Select Country</option> </select> <select name="state" class="states" id="stateId"> <option value="">Select State</option> </select> <select name="city" class="last cities" id="cityId"> <option value="">Select City</option> </select> <span class="tabaddon"><i class="fa fa-map fa-2x"></i></span> <input type="text" placeholder="Zip code" name="zip"> <div class="btn"> <input type="checkbox" name="terms" required> <em>I agree with terms and conditions <a href="#" style=" color:#fff;font-size: 21px;" class="displayPopup">Read Detail</a> </em> <input type="submit" value="Sign up"/> </div> </form> </div> </li> <li> <input type="radio" name="tabs blue" id="tab2" /> <label for="tab2">Login</label> <div id="tab-content2" class="tab-content"> <form method="post" name="register" action=""> <input name="_hidCheckSubmit" type="hidden" value="2"> <span class="tabaddon"><i class="fa fa-envelope fa-2x"></i></span> <input class="field" name="_txtUserName" required type="text" placeholder="Username" value="<?php echo $_REQUEST['_txtUserName']; ?>"/> <span class="tabaddon"><i class="fa fa-lock fa-2x"></i></span> <input class="field" name="_txtPassword" required type="password" placeholder="mypassword" value="<?php echo $_REQUEST['_txtPassword']; ?>"/> <div class="btn"> <input type="checkbox" name="terms"> <em>Keep me logged in </em> <input type="submit" value="Login"/> </div> </form> </div> </li> </ul> </section> <div class="right"> <?php for($a=1; $a<=11; $a++) { if($aBanner[0]['fld_image_right'.$a]!='') { ?> <a href="<?php echo $aBanner[0]['right_link'.$a];?>" target="_blank"> <img src="banner/<?php echo $aBanner[0]['fld_image_right'.$a]; ?>"> <?php } } ?> </a> </div> </div> <footer> <p>Login & Sign Up </p> </footer> <style> select[disabled]{ color:#aaa; } </style> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#datepicker" ).datepicker(); } ); </script> <script src="js/location.js"></script> <script> $(function() { //document ready $(".displayPopup").on("click", function() { //click event of the button $("#overlay").fadeTo(100, .3); //this will show the overlay awith a crossbrowser transparency $("#popup1").show(); // show popup1 return false; //disable event propogation (avoid addition of "#" to url) }) $(".popup .close").on("click", function() { //click event of the close button in popup $("#overlay").hide(); //hide overlay $(".popup").hide(); //hide popup return false; //disable event propogation (avoid addition of "#" to url) }) }) </script> </body> </html>
Return