0% found this document useful (0 votes)
23 views3 pages

Remove Htaccess

Remove Htaccess Procedures

Uploaded by

Ahmed Gabr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Remove Htaccess

Remove Htaccess Procedures

Uploaded by

Ahmed Gabr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

find . -name ".

htaccess" -exec rm -rf {} \;


find . -name "about.php" -exec rm -rf {} \;

<IfModule mod_rewrite.c>
Options -Indexes
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
</IfModule>

<?php
session_start();
if (isset($_SESSION['userId'])){
header("location: /apps/tatbeqey/rest/main.html");
} else {
// If the values are posted, insert them into the database.
if (isset($_POST['email']) && isset($_POST['password'])){
require('apps/tatbeqey/connect.php');
$connection->query("SET NAMES utf8");
$connection->query("SET CHARACTER SET utf8");
$email = $_POST['email'];
$password = $_POST['password'];

$query = "SELECT * FROM `users` WHERE email = '$email' AND


password = '$password'";
$result = mysqli_query($connection, $query);
if($result){
if ($result->num_rows == 1) {
while($row = $result->fetch_assoc()){
session_start();
$_SESSION['userId'] = $row['id'];
$_SESSION['userName'] = $row['name'];
$_SESSION['app'] = $row['app'];

header("location:
/apps/tatbeqey/rest/main.html");
}
} else {
$fmsg ="Email or Password is incorrect";
}
} else {
$fmsg ="Connection Error";
}
}
}
?>

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Tatbeqey - ‫<تطبيقي‬/title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="icon" type="image/x-icon"
href="apps/tatbeqey/rest/images/tatbeqey_favicon.png">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">

<!--JQuery-->
<script src='https://code.jquery.com/jquery-3.1.0.min.js' integrity='sha256-
cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=' crossorigin='anonymous'></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>

<style>
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #eee;
text-align: center;

.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
</style>
</head>

<body>

<br><br>

<div id="mainDiv" class="container">

<a href="main.html"><img src="apps/tatbeqey/rest/images/tatbeqey.png" id="logo_img"


class="center" style="width: 20%;"></a>

<br>
<br>

<div class="container">
<form class="form-signin" method="POST">
<?php if(isset($smsg)){ ?><div class="alert alert-success"
role="alert"> <?php echo $smsg; ?> </div><?php } ?>
<?php if(isset($fmsg)){ ?><div class="alert alert-danger"
role="alert"> <?php echo $fmsg; ?> </div><?php } ?>
<br><br>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" name="email" id="inputEmail" class="form-
control" placeholder="Email address" required autofocus>
<br>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="password" id="inputPassword"
class="form-control" placeholder="Password" required>
<br>
<br>
<button class="btn btn-lg btn-primary btn-block" type="submit">
‫<تسجيل الدخول‬/button>
</form>
</div>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-90912273-2', 'auto');


ga('send', 'pageview');

</script>
</body>
</html>

You might also like