diff --git a/page_user/user.php b/page_user/user.php index ac527307db6260db252954fdc7f06b1336935f50..9f2917f875938a03ec94452a81a540b93084033f 100644 --- a/page_user/user.php +++ b/page_user/user.php @@ -1,231 +1,19 @@ <?php -require_once('../API_Twitter/requestsFunctions.php'); +require_once('../facto.php'); session_start(); ?> -<script> - // function for suggestions of the research - function showSuggestions(){ - var field = document.getElementById("searchField"); - var keyword = field.value; - - var xhttp; - if (keyword.length == 0) { - document.getElementById('usernames').innerHTML = ""; - return; - } - xhttp = new XMLHttpRequest(); - xhttp.onreadystatechange = function() { - if (this.readyState == 4 && this.status == 200) {// 4 = request finished and response is ready, 200 = "OK" - - var tab = JSON.parse(this.responseText); - //document.getElementById("h1").innerHTML = tab; - - var options = ""; - for(var i = 0; i < tab.length; i++) { - options += '<button id="userSuggesBtn" class="suggestionButton" onclick="window.location.href=\'../page_profile/profil.php?username='+tab[i].username+'\'"><img src="'+ - tab[i].profile_image + - '" alt="icone" style="vertical-align:middle; position:relative; width:50px; height: 50px;" /><span style="margin-left:10px;">'+ - tab[i].username + - '</span></button>'; - } - - document.getElementById('suggestionButtons').innerHTML = options; - } - }; - xhttp.open("GET", "../API_Twitter/userSuggestions.php?w="+keyword, true); - xhttp.send(); - } -</script> <!DOCTYPE html> <html lang="zxx"> -<head> - <title>FIND YOUR INFLUENCER</title> - <!-- Meta tag Keywords --> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta charset="UTF-8" /> - <meta name="keywords" content="" /> - <script> - addEventListener("load", function () { - setTimeout(hideURLbar, 0); - }, false); - - function hideURLbar() { - window.scrollTo(0, 1); - } - </script> - <!--// Meta tag Keywords --> - - <!-- icon --> - <link rel="shortcut icon" href="images/logo.png" type="image/x-icon"> - <!-- Custom-Files --> - <link rel="stylesheet" href="css/bootstrap.css"> - <!-- Bootstrap-Core-CSS --> - <link rel="stylesheet" href="css/smoothbox.css" type='text/css' media="all" /> - <!-- gallery light box --> - <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /> - <!-- Style-CSS --> - <link rel="stylesheet" href="css/fontawesome-all.css"> - <!-- Font-Awesome-Icons-CSS --> - <!-- //Custom-Files --> - - <!-- Web-Fonts --> - <link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&subset=latin-ext" - rel="stylesheet"> - <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=latin-ext" - rel="stylesheet"> - <!-- //Web-Fonts --> - <link rel="stylesheet" href="css/log.css"> - - <script src="js/jquery-2.2.3.min.js"></script> - <script src="js/leanModal.js"></script> - - -</head> +<?php head(); ?> <body> - <!-- header --> - <header> - <nav class="navbar navbar-expand-lg navbar-light py-4"> - <div class="container"> - <h1 style="margin: auto"> - <a class="navbar-brand" href="../page_welcome/index.php"> - <!-- <i class="fas fa-utensils"></i> --> - <img width="50" height="50" src="images/ll.png" alt="logo"> - Know Your Influencer - </a> - </h1> - <button class="navbar-toggler ml-md-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" - aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - -<!-- <div class="collapse navbar-collapse" id="navbarSupportedContent">--> -<!----> -<!-- <ul class="navbar-nav mx-auto text-center">--> -<!-- <li class="nav-item active">--> -<!-- <a class="nav-link" href="../page_welcome/index.php">Home--> -<!-- <span class="sr-only">(current)</span>--> -<!-- </a>--> -<!-- </li>--> -<!-- </ul>--> -<!-- <div class="forms-w3ls-agilesm text-center mt-lg-0 mt-4">--> -<!-- <ul>--> -<!-- <li class="login-list-w3ls d-inline border-right pr-3 mr-3">--> -<!-- --><?php //if (!$_SESSION['username']) -// echo '<a id="modal_trigger" href="#modal" class="text-white">Login | Register</a>'; -// else { -// echo '<span style="color: #fff; letter-spacing: 2px; font-size: 15px; padding: 0.5em 0; font-family: "Source Sans Pro", sans-serif">'.$_SESSION['username'] .' | <a href="logout.php" style="color: #fff; letter-spacing: 2px; font-size: 15px; padding: 0.5em 0; font-family: "Source Sans Pro", sans-serif">Log out</a></span>'; -// } -// ?> -<!-- </li>--> -<!-- </ul>--> -<!-- </div>--> -<!-- </div>--> - </div> - </nav> - </header> - <!-- //header --> - <div id="modal" class="popupContainer" style="display:none;"> - <header class="popupHeader"> - <span class="header_title">Login</span> - <span class="modal_close"><i class="fa fa-times"></i></span> - </header> - - <section class="popupBody"> - <!-- Social Login --> - <div class="social_login"> - <!-- <div class=""> - <a href="#" class="social_box fb"> - <span class="icon"><i class="fa fa-facebook"></i></span> - <span class="icon_title">Connect with Facebook</span> - - </a> - - <a href="#" class="social_box google"> - <span class="icon"><i class="fa fa-google-plus"></i></span> - <span class="icon_title">Connect with Google</span> - </a> - </div> - - <div class="centeredText"> - <span>Or use your Email address</span> - </div> --> - - <div class="action_btns"> - <div class="one_half"><a href="#" id="login_form" class="btn">Login</a></div> - <div class="one_half last"><a href="#" id="register_form" class="btn">Sign up</a></div> - </div> - </div> - - <!-- Username & Password Login form --> - <div class="user_login"> - <form action="login.php" method="post"> - <label>Username</label> - <input type="text" name="username"/> - <br /> - - <label>Password</label> - <input type="password" name="password"/> - <br /> - - <!-- <div class="checkbox"> - <input id="remember" type="checkbox" /> - <label for="remember">Remember me on this computer</label> - </div> --> - - <div class="action_btns"> - <div class="one_half"><a href="#" class="btn back_btn"><i class="fa fa-angle-double-left"></i> Back</a></div> - <div class="one_half last"><input type="submit" class="btn btn_red" name="login" value="Login" style="border:none"/></div> - </div> - </form> - - <a href="#" class="forgot_password">Forgot password?</a> - </div> - - <!-- Register Form --> - <div class="user_register"> - <form action="register.php" method="post"> - <!-- <label>First name</label> - <input type="text" name="firstname" /> - <br /> - - <label>Last name</label> - <input type="text" name="lastname"/> - <br /> --> - - <label>User name</label> - <input type="text" name="username"/> - <br /> - - <label>Email Address</label> - <input type="email" name="email"/> - <br /> - - <label>Password</label> - <input type="password" name="password1"/> - <br /> - <label>Confirm password</label> - <input type="password" name="password2"/> - <br /> +<?php header2('../page_welcome/index.php'); ?> - <!-- <label>Birthday</label> - <input type="date" name="birthday"/> - <br/> - <br/> --> - <div class="action_btns"> - <div class="one_half"><a href="#" class="btn back_btn"><i class="fa fa-angle-double-left"></i> Back</a></div> - <div class="one_half last"><input type="submit" class="btn btn_red" name="register" value="Register" style="border:none"/></div> - </div> - </form> - </div> - </section> - </div> - <!-- banner --> <div class="callbacks_container"> <ul class="rslides" id="slider3"> <li> diff --git a/page_welcome/userpage.php b/page_welcome/userpage.php index d44a6a77e6e40a9211bab239cc64de54220c1b83..deec8c0faba0431db56cd97a5415decfa15826f3 100644 --- a/page_welcome/userpage.php +++ b/page_welcome/userpage.php @@ -1,136 +1,23 @@ <?php // require_once('../API_Twitter/twitter-api-php/APIExchange.php'); require_once('../API_Twitter/requestsFunctions.php'); +require_once('../facto.php'); session_start(); ?> -<script> - function showSuggestions(){ - var field = document.getElementById("searchField"); - var keyword = field.value; - - var xhttp; - if (keyword.length == 0) { - document.getElementById('usernames').innerHTML = ""; - return; - } - xhttp = new XMLHttpRequest(); - xhttp.onreadystatechange = function() { - if (this.readyState == 4 && this.status == 200) {// 4 = request finished and response is ready, 200 = "OK" - - var tab = JSON.parse(this.responseText); - //document.getElementById("h1").innerHTML = tab; - - var options = ""; - for(var i = 0; i < tab.length; i++) { - options += '<option value="'+tab[i]+'" />'; - } - document.getElementById('usernames').innerHTML = options; - } - }; - xhttp.open("GET", "../API_Twitter/userSuggestions.php?w="+keyword, true); - xhttp.send(); - } -</script> <!DOCTYPE html> <html lang="en" dir="ltr"> - <head> - <title><?php echo $_SESSION['username']; ?></title> - <!-- Meta tag Keywords --> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta charset="UTF-8" /> - <meta name="keywords" content="" /> - <script> - addEventListener("load", function () { - setTimeout(hideURLbar, 0); - }, false); - - function hideURLbar() { - window.scrollTo(0, 1); - } - </script> - <!-- icon --> - <link rel="shortcut icon" href="images/logo.png" type="image/x-icon"> - <!-- Custom-Files --> - <link rel="stylesheet" href="css/bootstrap.css"> - <!-- Bootstrap-Core-CSS --> - <link rel="stylesheet" href="css/smoothbox.css" type='text/css' media="all" /> - <!-- gallery light box --> - <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /> - <!-- Style-CSS --> - <link rel="stylesheet" href="css/fontawesome-all.css"> - <!-- Font-Awesome-Icons-CSS --> - <!-- //Custom-Files --> - - <!-- Web-Fonts --> - <link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&subset=latin-ext" - rel="stylesheet"> - <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=latin-ext" - rel="stylesheet"> - <!-- //Web-Fonts --> - <link rel="stylesheet" href="css/log.css"> - - <script src="js/jquery-2.2.3.min.js"></script> - <script src="js/jquery.leanModal.min_.js"></script> - </head> - - <body> - <header> - <nav class="navbar navbar-expand-lg navbar-light py-4"> - <div class="container"> - <h1 style="margin: auto"> - <a class="navbar-brand" href="index.php"> - <!-- <i class="fas fa-utensils"></i> --> - <img width="50" height="50" src="images/ll.png" alt="logo"> - Know Your Influencer - </a> - </h1> - <button class="navbar-toggler ml-md-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" - aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> +<?php head(); ?> - <div class="collapse navbar-collapse" id="navbarSupportedContent"> +<body> - <ul class="navbar-nav mx-auto text-center"> - <li class="nav-item active"> - <a class="nav-link" href="index.php">Home - <span class="sr-only">(current)</span> - </a> - </li> - <li class="nav-item"> - <a class="nav-link scroll" href="#semaine">Influencer</a> - </li> - </ul> - <div class="forms-w3ls-agilesm text-center mt-lg-0 mt-4"> - <ul> - <li class="login-list-w3ls d-inline pr-3 mr-3"> - <?php if (!$_SESSION['username']) - echo '<a id="modal_trigger" href="#modal" class="text-white">Login | Register</a>'; - else { - echo '<span style="color: #fff; letter-spacing: 2px; font-size: 15px; padding: 0.5em 0; font-family: "Source Sans Pro", sans-serif"><a href="userpage.php" style="color: #fff; letter-spacing: 2px; font-size: 15px; padding: 0.5em 0; font-family: "Source Sans Pro", sans-serif">'.$_SESSION['username'] .'</a> | <a href="logout.php" style="color: #fff; letter-spacing: 2px; font-size: 15px; padding: 0.5em 0; font-family: "Source Sans Pro", sans-serif">Log out</a></span>'; - } - ?> - </li> - </ul> - </div> +<?php header2('../page_welcome/index.php'); ?> - <div> - <?php if ($_SESSION['username']) - echo '<button onclick="tz()">跳转</button>'; - ?> - - </div> - - - </div> - </div> - </nav> - </header> + <!-- banner --> <div class="callbacks_container"> <ul class="rslides" id="slider3">