-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.php
31 lines (31 loc) · 1 KB
/
post.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require 'static/php/system/database.php';
require 'static/php/system/config.php';
if(isset($_COOKIE['iduser']) and (isset($_COOKIE['inisession'])) and (isset($_COOKIE['thecry']))){
$iduser = DBEscape( strip_tags(trim($_COOKIE['iduser']) ) );
$thecry = DBEscape( strip_tags( trim( $_COOKIE['thecry'] ) ) );
$user = DBRead( 'user', "WHERE id = '{$iduser}' and thecry = '{$thecry}' LIMIT 1" );
if (!$user){
setcookie("iduser" , "");
setcookie("inisession" , "");
setcookie("thecry" , "");
header("location: /?errorlogin");
}
else{
$user = $user[0];
$idcry = DBEscape( strip_tags(trim($_COOKIE['thecry']) ) );
$usercry = DBRead('user', "WHERE thecry = '{$idcry}' LIMIT 1 ");
$usercry = $usercry[0];
if(isset($_GET['id'])){
require 'static/php/header.php';
require 'static/php/postagem.php';
}
else{
echo '404 not found';
}
}
// if($user['configurado'] == 0){
// require 'static/php/configure.php';
// }
}
?>