Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page import="java.sql.ResultSet" %>
- <%@ page import="java.sql.SQLException" %>
- <%@ page import="java.sql.Statement" %>
- <%@ page import="java.sql.Connection" %>
- <%@ page import="java.sql.DriverManager" %>
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@ page trimDirectiveWhitespaces="true"%>
- <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
- <%@ taglib uri="/WEB-INF/tlds/permission.tld" prefix="perm"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
- <!DOCTYPE html>
- <html lang="en" class="no-js">
- <!-- BEGIN HEAD -->
- <head>
- <meta charset="utf-8"/>
- <title>Welcome to Room Renter Management System by CubeSoftTech</title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta content="width=device-width, initial-scale=1" name="viewport"/>
- <meta content="" name="description"/>
- <meta content="" name="author"/>
- <link rel="shortcut icon" href="fav/1.png" />
- <link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/114779/Socicon/style-cf.css?u8vidh">
- <style type="text/css">
- @import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700);
- .thumbnail {
- position: relative;
- }
- .caption {
- position: absolute;
- top: 45%;
- left: 0;
- width: 100%;
- }
- .body {
- width: 100%;
- height: 250px;
- box-sizing: border-box;
- }
- .search {
- padding: 0 30px;
- font-size: 18px;
- width: 60%;
- max-width: 400px;
- height: 80px;
- border: 1px solid darken(white, 300%);
- border-radius: 20px 0 0 20px;
- box-shadow: 10px 10px 0px #000000;
- }
- .submit {
- cursor: pointer;
- border: none;
- box-shadow: 10px 10px 0px #000000;
- background: url('http://thesuiteworld.com/wp-admin/maint/search-icon-white-png-540.png')
- no-repeat center, #ff6600;
- background-size: 35px 35px;
- border-radius: 0 20px 20px 0;
- padding: 15px 25px;
- display: inline-block;
- width: 150px;
- height: 80px;
- }
- .zoom {
- }
- .zoom:hover {
- transform: scale(1.05); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
- }
- </style>
- <!-- GLOBAL MANDATORY STYLES -->
- <link href="http://fonts.googleapis.com/css?family=Hind:300,400,500,600,700" rel="stylesheet" type="text/css">
- <link href="vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" type="text/css"/>
- <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
- <!-- PAGE LEVEL PLUGIN STYLES -->
- <link href="css/animate.css" rel="stylesheet">
- <link href="vendor/swiper/css/swiper.min.css" rel="stylesheet" type="text/css"/>
- <link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet" type="text/css"/>
- <!-- THEME STYLES -->
- <link href="css/layout.min.css" rel="stylesheet" type="text/css"/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="favicon.ico"/>
- <!-- ---------------------------------------------------------------------------------------------------------------- -->
- <link rel='stylesheet' id='ajax-auth-style-css' href='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/css/ajax-auth-style.css?ver=4.9.2' type='text/css' media='all' />
- <link rel='stylesheet' id='brandflow-wp-css' href='https://mdbootstrap.com/wp-content/plugins/brandflow-wp/public/css/brandflow-wp-public.css?ver=1.0.0' type='text/css' media='all' />
- <link rel='stylesheet' id='contact-form-7-css' href='https://mdbootstrap.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=4.9.2' type='text/css' media='all' />
- <link rel='stylesheet' id='dwqa-style-css' href='https://mdbootstrap.com/wp-content/plugins/dw-question-answer-pro/templates/assets/css/style.css?ver=250420160307' type='text/css' media='all' />
- <link rel='stylesheet' id='dwqa-style-rtl-css' href='https://mdbootstrap.com/wp-content/plugins/dw-question-answer-pro/templates/assets/css/rtl.css?ver=250420160307' type='text/css' media='all' />
- <link rel='stylesheet' id='woocommerce-layout-css' href='https://mdbootstrap.com/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css?ver=3.2.6' type='text/css' media='all' />
- <link rel='stylesheet' id='woocommerce-smallscreen-css' href='https://mdbootstrap.com/wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css?ver=3.2.6' type='text/css' media='only screen and (max-width: 768px)' />
- <link rel='stylesheet' id='woocommerce-general-css' href='https://mdbootstrap.com/wp-content/plugins/woocommerce/assets/css/woocommerce.css?ver=3.2.6' type='text/css' media='all' />
- <link rel='stylesheet' id='wsl-widget-css' href='https://mdbootstrap.com/wp-content/plugins/wordpress-social-login/assets/css/style.css?ver=4.9.2' type='text/css' media='all' />
- <!-- <link rel='stylesheet' id='compiled.css-css' href='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/css/compiled.min.css?ver=4.4.0' type='text/css' media='all' /> -->
- <link rel='stylesheet' id='style.css-css' href='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/style.css?ver=4.9.2' type='text/css' media='all' />
- <link rel='stylesheet' id='dwqa_leaderboard-css' href='https://mdbootstrap.com/wp-content/plugins/dw-question-answer-pro/templates/assets/css/leaderboard.css?ver=4.9.2' type='text/css' media='all' />
- <link rel='stylesheet' id='sv-wc-payment-gateway-payment-form-css' href='https://mdbootstrap.com/wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/lib/skyverge/woocommerce/payment-gateway/assets/css/frontend/sv-wc-payment-gateway-payment-form.min.css?ver=4.6.0' type='text/css' media='all' />
- <script type='text/javascript' src='https://mdbootstrap.com/wp-admin/load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate&ver=4.9.2'></script>
- <script type='text/javascript' src='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/js/jquery.validate.js?ver=4.9.2'></script>
- <script type='text/javascript' src='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/js/ajax-auth-script.js?ver=4.9.2'></script>
- <script type='text/javascript' src='https://mdbootstrap.com/wp-content/themes/mdbootstrap4/js/comments-reply-mod.js?ver=4.9.2'></script>
- <script type='text/javascript' src='https://mdbootstrap.com/wp-content/plugins/brandflow-wp/public/js/brandflow-wp-public.js?ver=1.0.0'></script>
- <style type="text/css">
- .zoom-in {cursor: zoom-in;}
- </style>
- <style type="text/css">
- .font {
- font-size: 24px;
- color: #f1f1f1!important;
- text-shadow:2px 1px 0px #545454;
- }</style>
- <!-- ------------------------------------------------------------- -->
- <link href="indexstyle/css/bootstrap.css" rel='stylesheet' type='text/css' />
- <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
- <script src="indexstyle/js/jquery.min.js"></script>
- <!-- Custom Theme files -->
- <!-- <link href="indexstyle/css/style.css" rel='stylesheet' type='text/css' /> -->
- <!-- Custom Theme files -->
- <!---- animated-css ---->
- <link href="indexstyle/css/animate.css" rel="stylesheet" type="text/css" media="all">
- <script type="text/javascript" src="indexstyle/js/jquery.corner.js"></script>
- <script src="indexstyle/js/wow.min.js"></script>
- <script>
- new WOW().init();
- </script>
- <style type="text/css">
- .bggold{
- background: url(https://blog.justlanded.com/wp-content/uploads/2015/05/business-04.jpg);
- background-color: rgba(0, 0, 0, 0.5);
- background-attachment:fixed;
- background-size:cover;
- }</style>
- <style type="text/css">
- .bgw {
- box-shadow: inset 0px 0px 10px 2px rgba(202, 228, 255, 0.8);
- background-color: rgba(208, 212, 255, 0.9);
- border-radius: 2px;
- }
- </style>
- <style type="text/css">
- .f1 {
- font-family: "Calisto MT", "Bookman Old Style", Bookman, "Goudy Old Style", Garamond, "Hoefler Text",
- "Bitstream Charter", Georgia, serif;
- font-style: normal;
- font-variant: normal;
- font-weight: 500;
- line-height: 26.4px;
- }
- </style>
- <!-- ----------------------------------------------- -->
- </head>
- <!-- END HEAD -->
- <!-- BODY -->
- <body id="body" data-spy="scroll" data-target=".header">
- <!--========== HEADER ==========-->
- <header class="header navbar-fixed-top">
- <!-- ---------------------------------------------------------------------------------- -->
- <!-- Navbar -->
- <!-- BEGIN FORGOT PASSWORD FORM -->
- <!-- END FORGOT PASSWORD FORM -->
- <!-- ------------------------------------------------------------------------------------ -->
- <!-- Navbar -->
- <nav class="navbar" role="navigation">
- <div class="container">
- <!-- Brand and toggle get grouped for better mobile display -->
- <div class="menu-container js_nav-item">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="toggle-icon"></span>
- </button>
- <!-- Logo -->
- <div class="logo">
- <a class="logo-wrap" href="#body">
- <img class="logo-img logo-img-main" src="img/cubesofttech.png" alt="Asentus Logo">
- <img class="logo-img logo-img-active" src="img/cubesofttech.png" alt="Asentus Logo">
- </a>
- </div>
- <!-- End Logo -->
- </div>
- <div class="collapse navbar-collapse nav-collapse">
- <div class="menu-container font">
- <ul class="nav navbar-nav navbar-nav-right">
- <li class="js_nav-item nav-item"><a class="nav-item-child nav-item-hover font" href="#body">Home</a></li>
- <li class="js_nav-item nav-item"><a class="nav-item-child nav-item-hover font" href="#products">Apartment</a></li>
- <li class="js_nav-item nav-item"><a class="nav-item-child nav-item-hover font" href="#pricing">Package</a></li>
- <li class="js_nav-item nav-item"><a class="nav-item-child nav-item-hover font" href="#contact">Contact</a></li>
- <li class="js_nav-item nav-item"><a class="nav-item-child nav-item-hover font" href="visitorFeedbackUser">Feedback</a></li>
- <li class="js_nav-item nav-item"><a
- href="javascript:;" class="nav-item-child nav-item-hover"
- data-toggle="dropdown" data-hover="dropdown"
- data-close-others="true"> ${onlineUser.accountId}
- </a>
- <ul class="dropdown-menu dropdown-menu-default"style="background-color: rgba(246, 232, 236, 0.4);text-shadow:2px 1px 0px #a8a6a8;">
- <li class="js_nav-item nav-item"><a href="listProfileUser"> <i class="icon-user"></i> โปรไฟล์ของฉัน
- </a></li>
- <li class="js_nav-item nav-item"><a href="logout"> <i class="icon-key"></i> ออกจากระบบ
- </a></li>
- </ul></li>
- <c:if test="${onlineUser.accountId == null}">
- <li class="js_nav-item nav-item "><a href="#" id="navbar-static-login" class="nav-link nav-item-child nav-item-hover">Log In</a></li>
- </c:if>
- </ul>
- </div>
- </div>
- </div>
- </nav>
- <!-- Navbar -->
- </header>
- <!--========== END HEADER ==========-->
- <!--========== SLIDER ==========-->
- <div class="promo-block">
- <div class="container ">
- <div class="margin-b-40 font">
- <h1 class="promo-block-title" style=" color: #ffca00;">จองหอพักง่ายๆ แค่ปลายนิ้ว...</h1>
- <p class="promo-block-text " style="color: #ffc771;">ค้นหาพอพักได้ที่นี่...</p>
- </div>
- </div>
- <div class="body">
- <div style="margin-top: 2cm;"></div>
- <form action="findApartBykeywordUser" method="POST">
- <div class="wrapper ">
- <input class="search" type="text" placeholder="ชื่อหอพัก,บริเวณที่ต้องการค้นหา" id="search" name="keyword" />
- <input class="submit" type="submit" value=" " onclick="findRoom();" />
- <input type="hidden" class="form-control" placeholder=""
- id="priceMin" name="priceMin" value="0"> <input
- type="hidden" class="form-control" placeholder="" id="priceMax"
- name="priceMax" value="1000000">
- </div></form>
- </div>
- </div>
- <!--========== SLIDER ==========-->
- <!--========== PAGE LAYOUT ==========-->
- <!-- Products -->
- <%
- String connectionURL = "jdbc:mysql://localhost/rfr";
- Connection connection = null;
- Statement statement = null;
- ResultSet rs = null;
- Connection connection1 = null;
- Statement statement1 = null;
- ResultSet rs1 = null;
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- connection = DriverManager.getConnection("jdbc:mysql://localhost/rfr", "root", "1234");
- statement = connection.createStatement();
- rs = statement.executeQuery("select * from apartment inner join address where address.address_id = apartment.address_id order by apartment.time_create DESC limit 0,3 ");
- %>
- <div id="products" class="" style="background-image: url(https://ak8.picdn.net/shutterstock/videos/14103728/thumb/1.jpg);">
- <div class="content-md container">
- <!-- Masonry Grid -->
- <div class="process-grids text-center wow bounce" data-wow-delay="0.4s">
- <div class=" process-grid wow bounceInUp" data-wow-delay="0.4s">
- <div class="f1" align="center"><br><h2 style=" color: #ffca00;text-shadow:2px 1px 0px #545454;">Apartment</h2> <br></div>
- <div class="masonry-grid row row-space-2"><% while((rs!=null) && (rs.next())) { %>
- <div class="masonry-grid-sizer col-xs-6 col-sm-6 col-md-1"></div>
- <div class="masonry-grid-item col-xs-12 col-sm-6 col-md-4 md-margin-b-4">
- <!-- Work -->
- <div class="work work-popup-trigger">
- <div class="work-overlay thumbnail zoom zoom-in">
- <!-- <img class="full-width img-responsive" src="img/397x300/02.jpg" alt="Portfolio Image"> -->
- <img onerror="this.src='https://res.cloudinary.com/apartmentlist/image/upload/t_fullsize/3852ddc38e2e79522108b257653fa0e5.jpg'"
- class="full-width img-responsive" alt="Portfolio Image" src="/ROOT<%=rs.getString("apartment_img_path")%>"
- style="width: 380px; height: 300px;">
- </div>
- <div class="work-popup-overlay">
- <div class="work-popup-content">
- <a href="javascript:void(0);" class="work-popup-close">ปิด</a>
- <div class="margin-b-30">
- <h3 class="margin-b-5">รายละเอียดหอพัก</h3>
- <span>ชื่อหอพัก <%=rs.getString("name")%></span>
- </div>
- <div class="row">
- <div class="col-sm-8 work-popup-content-divider sm-margin-b-20">
- <div class="margin-t-10 sm-margin-t-0">
- <p>ราคา <%=rs.getString("price_min")%> -
- <%=rs.getString("price_max")%> บาท/เดือน </p>
- <p> ที่อยู่ <br><%=rs.getString("detail")%>
- แขวง/ตำบล <%=rs.getString("sub_district")%>
- อำเภอ/เขต <%=rs.getString("district")%>
- จังหวัด <%=rs.getString("province")%>
- <ul class="list-inline work-popup-tag">
- <li class="work-popup-tag-item"><a class="work-popup-tag-link" href="apartmentDetailUser?id=<%=rs.getString("apartment_id")%>">รายละเอียดเพิ่มเติม</a></li>
- </ul>
- </div>
- </div>
- <div class="col-sm-4">
- <div class="margin-t-10 sm-margin-t-0">
- <p class="margin-b-5"><strong>ติดต่อ:</strong></p>
- <p class="margin-b-5"><strong>โทรศัพท์:</strong> <%=rs.getString("phone")%></p>
- <p class="margin-b-5"><strong>Email:</strong> <%=rs.getString("email")%></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- End Work -->
- </div><% } %>
- </div></div></div>
- <div align="right">
- <a style="background:-webkit-gradient(linear, 80% 20%, 10% 100%, from(#B86EA0), to(#59B757));
- box-shadow: 5px 4px 2px 2px rgba(0,0,0,0.6), 8px 4px 16px 0px rgba(20,20,20,1), inset -3px -3px 6px 0px rgba(18,18,14,1);"
- href="findApartmentFront" class="btn-theme btn-theme-sm btn-default-bg text-uppercase f1">More</a>
- </div>
- <!-- End Masonry Grid -->
- </div>
- </div>
- <!-- End Work -->
- <%
- statement.close();
- rs.close();
- %>
- <div id="pricing">
- <div class="bg-info bggold">
- <div class="content-lg container">
- <div class="row row-space-2">
- <div class="col- sm-margin-b-12 bggold">
- <!-- Pricing -->
- <div class="bggold " align="right">
- <div class="process-grids text-center wow bounce f1" data-wow-delay="0.4s">
- <div class=" process-grid wow bounceInUp" data-wow-delay="0.4s">
- <div align="center" class="bggold">
- <h3 style=" color: #ffca00;text-shadow:2px 1px 0px #545454;">PACKAGE $</h3>
- </div>
- <table class="table table-hover" id="table" style="box-shadow: 7px 7px 3px 0px rgba(38,29,99,1);">
- <%
- String connectionURL1 = "jdbc:mysql://localhost/rfr";
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- connection1 = DriverManager.getConnection("jdbc:mysql://localhost/rfr", "root", "1234");
- statement1 = connection1.createStatement();
- ////// CHANGE THE statement TO statement1
- rs1 = statement1.executeQuery("select * from package");
- %>
- <thead>
- <tr class="warning" data-tabullet-map="id">
- <th style="width: 10%;"><center>Name</center></th>
- <th style="text-align: center; width: 10%;">Price</th>
- <th style="text-align: center; width: 10%;">Points</th>
- </tr>
- </thead>
- <%while((rs1!=null) && (rs1.next())) { %>
- <tbody>
- <tr class="bgw">
- <td style="text-align: center;"><%=rs1.getString("package_name")%></td>
- <td style="text-align: center;"><%=rs1.getString("package_price")%></td>
- <td style="text-align: center;"><%=rs1.getString("package_points")%></td>
- </tr>
- </tbody>
- <%} %>
- </table> </div></div>
- <%
- rs1.close();
- statement1.close();
- %>
- <a href="demo?pageName=loginCustomer" class="btn-theme btn-theme-sm btn-default-bg text-uppercase f1"
- style="background:-webkit-gradient(linear, 80% 20%, 10% 100%, from(#B86EA0), to(#59B757));
- box-shadow: 5px 4px 2px 2px rgba(0,0,0,0.6), 8px 4px 16px 0px rgba(20,20,20,1), inset -3px -3px 6px 0px rgba(18,18,14,1);">More</a>
- </div>
- <!-- End Pricing -->
- </div>
- </div>
- <!--// end row -->
- </div>
- </div>
- </div>
- <!-- End Pricing -->
- <!-- Products -->
- <div id="contact">
- </div>
- <!-- End Products -->
- <!-- Promo Banner -->
- <div class="promo-banner f1">
- <div class="container-sm content-lg font">
- <h2 class="promo-banner-title">Contact</h2>
- <p class="promo-banner-text"><strong> Address:</strong> 308 Negra Arroyo Lane Albuquerque, New Mexico, 87111.</p>
- <p class="promo-banner-text"><strong> Cell No:</strong> 1-800-123-456 </p>
- <p class="promo-banner-text"> <strong> Email:</strong> developer@gmail.com </p>
- <div>
- <a href="#" class="socicon-btn socicon-btn-circle socicon-solid bg-yellow font-white bg-hover-grey-salsa socicon-facebook tooltips" data-original-title="Facebook"></a>
- <a href="#" class="socicon-btn socicon-btn-circle socicon-solid bg-yellow font-white bg-hover-grey-salsa socicon-google tooltips" data-original-title="Google"></a>
- <a href="#" class="socicon-btn socicon-btn-circle socicon-lg socicon-solid bg-green bg-hover-grey-salsa font-white bg-hover-white socicon-skype tooltips" data-original-title="Skype"></a>
- <a href="#" class="socicon-btn socicon-btn-circle socicon-lg socicon-solid bg-red bg-hover-grey-salsa font-white bg-hover-white socicon-instagram tooltips" data-original-title="Instagram"></a>
- </div>
- </div>
- </div>
- <!-- End Promo Banner -->
- <!--========== END PAGE LAYOUT ==========-->
- <!--========== FOOTER ==========-->
- <footer class="footer">
- <!-- Copyright -->
- <div class="content container">
- <div class="row">
- <div class="col-xs-6">
- <img class="footer-logo" src="img/cubesofttech.png" alt="Aironepage Logo">
- </div>
- <div class="col-xs-6 text-right">
- <p class="margin-b-0"><a class="fweight-700" href="#">2018 © Cube SoftTech Co., Ltd. Room Renter Management System v._965</a></p>
- </div>
- </div>
- <!--// end row -->
- </div>
- <!-- End Copyright -->
- </footer>
- <!--========== END FOOTER ==========-->
- <!-- Back To Top -->
- <a href="javascript:void(0);" class="js-back-to-top back-to-top">Top</a>
- <!-- JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
- <!-- CORE PLUGINS -->
- <script src="vendor/jquery.min.js" type="text/javascript"></script>
- <script src="vendor/jquery-migrate.min.js" type="text/javascript"></script>
- <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
- <!-- PAGE LEVEL PLUGINS -->
- <script src="vendor/jquery.easing.js" type="text/javascript"></script>
- <script src="vendor/jquery.back-to-top.js" type="text/javascript"></script>
- <script src="vendor/jquery.smooth-scroll.js" type="text/javascript"></script>
- <script src="vendor/jquery.wow.min.js" type="text/javascript"></script>
- <script src="vendor/swiper/js/swiper.jquery.min.js" type="text/javascript"></script>
- <script src="vendor/magnific-popup/jquery.magnific-popup.min.js" type="text/javascript"></script>
- <script src="vendor/masonry/jquery.masonry.pkgd.min.js" type="text/javascript"></script>
- <script src="vendor/masonry/imagesloaded.pkgd.min.js" type="text/javascript"></script>
- <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBsXUGTFS09pLVdsYEE9YrO2y4IAncAO2U&callback=initMap" async defer></script>
- <!-- PAGE LEVEL SCRIPTS -->
- <script src="js/layout.min.js" type="text/javascript"></script>
- <script src="js/components/wow.min.js" type="text/javascript"></script>
- <script src="js/components/swiper.min.js" type="text/javascript"></script>
- <script src="js/components/maginific-popup.min.js" type="text/javascript"></script>
- <script src="js/components/masonry.min.js" type="text/javascript"></script>
- <script src="js/components/gmap.min.js" type="text/javascript"></script>
- <!-- -------------------------------------------------------------------------------------------------------------------- -->
- <!-- Angular or not Angular? -->
- <div class="switch-version hidden-md-down">
- <a href="/material-design-for-bootstrap"><span class="switch-to active mdb-jquery"></span></a>
- <a href="/angular"><span class="switch-to mdb-angular"></span></a>
- <a href="/react"><span class="switch-to mdb-react"></span></a>
- <a href="/vue"><span class="switch-to mdb-vue"></span></a>
- </div>
- <div class="modal fade" id="myModal" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-body">
- <font color="red"><h4>กรุณาใส่ข้อมูลให้ครบถ้วน</h4></font>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn red-mint"
- data-dismiss="modal">ปิด</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="myModal1" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-body">
- <font color="red""><h4>ชื่อผู้ใช้นี้ถูกใช้ไปแล้ว กรุณาระบุชื่อผู้ใช้ใหม่</h4></font>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn red-mint"
- data-dismiss="modal">ปิด</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="myModal2" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-body">
- <font color="red""><h4>รหัสผ่านไม่ตรงกัน!</h4></font>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn red-mint"
- data-dismiss="modal">ปิด</button>
- </div>
- </div>
- <script type="text/javascript">
- //press enter to login
- $(document).ready(function() {
- $('#login').live("submit", function() {
- //any_function()
- });
- });
- //forgetpass
- $(document).ready(function() {
- $("#forget-password").click(function() {
- $("#forgetPass").show();
- $("#login").hide();
- });
- $("#backLogin").click(function() {
- $("#forgetPass").hide();
- $("#login").show();
- });
- });
- //forgetpass
- function checkUserId() {
- var accountId = $('#accountId').val();
- $
- .ajax({
- url : "checkUser",
- method : "POST",
- type : "JSON",
- data : {
- "accountId" : accountId,
- },
- success : function(data) {
- console.log(data);
- if (data.toString().indexOf("1") != -1) {
- $("#myModal1").modal();
- $('#accountId').val("");
- }
- }
- })
- }
- function checkPasswordMatch() {
- var password = $('#password').val();
- var checkPassword = $('#checkPassword').val();
- if (password != checkPassword) {
- //alert("รหัสผ่านไม่ตรงกัน!");
- $("#myModal2").modal();
- $('#checkPassword').val("");
- }
- }
- function saveRegister() {
- var accountId = $('#accountId').val();
- var password = $('#password').val();
- var checkPassword = $('#checkPassword').val();
- var name = $('#name').val();
- var userType = $('#userType').val();
- var email = $('#email').val();
- if(accountId=="" || name==""||email=="" || password=="" ||checkPassword=="" ){
- $("#myModal").modal();
- }
- else if (password == checkPassword) {
- $.ajax({
- url : "userAdd",
- method : "POST",
- type : "JSON",
- data : {
- "accountId" : accountId,
- "password" : password,
- "name" : name,
- "userType" : userType,
- "email" : email,
- },
- success : function(data) {
- if (userType == "renter") {
- document.location = "findApartmentFront";
- } else if (userType == "owner") {
- document.location = "openApartment";
- } else {
- document.location = "findApartmentFront";
- }
- }
- })
- }
- };
- </script>
- </body>
- <!-- END BODY -->
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement