Hello, I am altering this cms to my own html5 with bootstrap 5 and I also altered the word so it is salted.
Now here is my problem at the backend,
$owner = $_SESSION['id'];
if($_SESSION['role'] == 1){
$x = "";
}else{
$x = "WHERE pauthor = $owner";
}
$limit = 3;
$page = (!empty($_GET['page']) && is_numeric($_GET['page'])) ? $_GET['page']:1;
$offset = ($page - 1) $limit;
$query = "SELECT FROM posts p JOIN category c ON p.pcat = c.cid JOIN users u ON p.pauthor = u.uid $x ORDER BY pid DESC LIMIT $offset,$limit";
i have made myself as a admin but I don't and can't see all the posts only those that I made, which to me seems not right. I want to be able as a admin to see all the posts so I can alter whatever I like. I also extended the users so they can makeup their own profile settings like name, address and so on.
Hello, I am altering this cms to my own html5 with bootstrap 5 and I also altered the word so it is salted. Now here is my problem at the backend, $owner = $_SESSION['id']; if($_SESSION['role'] == 1){ $x = ""; }else{ $x = "WHERE pauthor = $owner"; } $limit = 3; $page = (!empty($_GET['page']) && is_numeric($_GET['page'])) ? $_GET['page']:1; $offset = ($page - 1) $limit; $query = "SELECT FROM posts p JOIN category c ON p.pcat = c.cid JOIN users u ON p.pauthor = u.uid $x ORDER BY pid DESC LIMIT $offset,$limit";
i have made myself as a admin but I don't and can't see all the posts only those that I made, which to me seems not right. I want to be able as a admin to see all the posts so I can alter whatever I like. I also extended the users so they can makeup their own profile settings like name, address and so on.
any idea why as a admin I don't see all posts??