I need help with this housekeeping php to rank in the hotel.

Wilfrander

New Member
Aug 10, 2021
1
0
I need help with this php since I don't know why it doesn't rank from housekeepig. I feel like something is missing.
<?php
include_once "includes/head.php";
include_once "includes/header.php";
include_once "includes/navi.php";
$_SESSION['title'] = '';
$_SESSION['slogan'] = '';
$_SESSION['news'] ='';
$activeedituser="1";
?>

<section class='member-data'>
<h1 class='member-data__name'><?= $lang["HkDash"] ?></h1>
<div class='mdl-tabs mdl-js-tabs mdl-js-ripple-effect'>
<nav class='member-data__navigation mdl-tabs__tab-bar'>
<a class='member-data__navigation__item mdl-tabs__tab mdl is-active' href='<?= $config['hotelUrl']; ?>/'><?= $lang["Ncommunity"]; ?></a>
<a class='member-data__navigation__item mdl-tabs__tab mdl' href='<?= $config['hotelUrl']; ?>/logout'><?= $lang["HsignOut"]; ?></a>
<a class='member-data__navigation__item mdl-tabs__tab mdl' href='<?= $config['hotelUrl']; ?>/client'><?= $lang["Menter"]; ?></a>
</nav>
</div>
<div class='member-data-content'>

<header class="panel-heading">
<form name="mygallery" action="" method="POST">
</header>
<div class="panel-body" style=" margin-top: -45px; ">
<?php admin::EditUser("username");
admin::UpdateUser();
?>
<h2><?= $lang["HkRank"]?></h2><hr>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label"><?= $lang["HkRankUser"]?></label>
<div class="col-sm-10">
<?php echo admin::EditUser("username"); ?>
<input type="hidden" value="<?php echo admin::EditUser("username"); ?>" name="naam" class="form-control" disable>
</div>
</div>

<br><br>
<div class="form-group">

<div class="col-sm-10">

<input type="text" value="<?php echo admin::EditUser(rank); ?>" name="rank" class="form-control">
<div class="form-group">







</select>
</div>

</div>
<br><br>



</select>
</div>
</div> <img src=" "
<br><br>
<button style="width: 140px;
float: right;
margin-right: 14px;" name="updaterank" type="submit" class="btn btn-success"><?= $lang["HkRankButton"]?></button></form>
<!--<?php
if (User::userData('rank') > '7')
{
echo'<a href="gebrank.php?user='. admin::EditUser("username") .'&delete='. admin::EditUser("id") .'">
<button style="width: 160px;
float: right;
margin-right: 14px;" name="delete" type="submit" class="btn btn-danger">excluir o usuário</button>
</a><form action="client.php" method="POST" target="_blank">
<input type="hidden" name="sso" value='. admin::EditUser("username") .'>
<button style="width: 140px;
float: right;
margin-right: 14px;" name="postsso" type="submit" class="btn btn-default">Hotel com'.admin::EditUser("username").'</button>
</form>';
}
echo'';
?>-->


</div>
</section>
</main><br>
</div>


</body>
<style>
body {
margin:0;
padding:0;
background: url(<?php echo H. $config['skin']; ?>/assets/images/Pin.png) no-repeat center #f1f1f1;
opacity: 0.9;
}
</style>
</html>


I have this other php where the codes are well organized but of course one was created in DB called cloudcms_recrutement_candidatures. There is no way to adapt this php?

<?php
$page = "";
require '../Global.php';
$Account->IsStaff();

if(isset($_POST['submit'])) {
$ThisPDO = $pdo->query('SELECT * FROM cloudcms_recrutement_candidatures WHERE id = ?', [$Server->Secure($_POST['hidden_id'])]);
if($ThisPDO->rowCount() == 1) {
$ReqPDO = $ThisPDO->fetch();
$texte = $Server->Secure($ReqPDO['candidature']);
$page = "candidature";
} else {
echo '<script>alert("Se ha producido un error.");</script>';
}
}

if(isset($_POST['submit2'])) {
$ThisPDO = $pdo->query('SELECT * FROM cloudcms_recrutement_candidatures WHERE id = ? AND visible = ?', [$Server->Secure($_POST['hidden_id']), "1"]);
if($ThisPDO->rowCount() == 1) {
$ThisPDO2 = $pdo->query('DELETE FROM cloudcms_recrutement_candidatures WHERE id = ?', [$Server->Secure($_POST['hidden_id'])]);
echo '<script>alert("La solicitud ha sido eliminada.");</script>';
} else {
echo '<script>alert("Se ha producido un error.");</script>';
}
}

if(isset($_POST['submit3'])) {
$ThisPDO = $pdo->query('SELECT * FROM cloudcms_recrutement_candidatures WHERE id = ? AND visible = ?', [$Server->Secure($_POST['hidden_id']), "1"]);
if($ThisPDO->rowCount() == 1) {
$ThisPDO2 = $pdo->query('UPDATE cloudcms_recrutement_candidatures SET visible = ? WHERE id = ?', ["0", $Server->Secure($_POST['hidden_id'])]);
echo '<script>alert("La solicitud ha sido aceptada.");</script>';
} else {
echo '<script>alert("Se ha producido un error.");</script>';
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?= NAME; ?> - Candidatura</title>
<meta charset="UTF-8">
<link href="css/metro.css" rel='stylesheet' type='text/css'>
<link href="css/bootflat.php" rel="stylesheet">
<link href="css/bootflat.min.php" rel="stylesheet">
<link rel="stylesheet" href=" ">
<link href="css/site.min.php" rel="stylesheet">
<script src=" "></script>
</head>
<style type="text/css">
#nav .active {
color: #FFF;
cursor: default;
background-color: #2c3034;
border-color: #2c3034;
}
#nav a {
position: relative;
float: left;
padding: 6px 12px;
margin-left: -1px;
line-height: 1.42857;
color: #2c3034;
text-decoration: none;
background-color: #FFF;
border: 1px solid #DDD;
}
.retour_accueil{
margin-top: -30px;
float: left;
}
</style>
<body>
<div class="vertical-center">
<div class="container">
<?php if($page == "") : ?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #2c3034 url('img/header.png') repeat-x scroll center bottom;">
<h3 class="panel-title" style="font-size: 20px;">Solicitudes (en espera de procesamiento)</h3>
</div>
<div class="panel-body">
<table id="cand_1" class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th><i class="fa fa-user"></i> Usuario</th>
<th><i class="fa fa-user-secret"></i> Posición solicitada</th>
<th><i class="fa fa-university"></i> Discord</th>
<th><i class="fa fa-pencil"></i> Acción</th>
</tr>
</thead>
<tbody>
<?php
$ThisPDO = $pdo->query('SELECT * FROM cloudcms_recrutement_candidatures WHERE visible = ?', ["1"]);
while($ReqPDO = $ThisPDO->fetch()) :
$ThisPDO2 = $pdo->query('SELECT * FROM permissions WHERE id = ?', [$ReqPDO['rank_id']]);
if($ThisPDO2->rowCount() == 1) {
$ReqPDO2 = $ThisPDO2->fetch();
$rank = $ReqPDO2['rank_name'];
} else {
$rank = "Introuvable";
}
?>
<tr>
<td><?= $ReqPDO['id']; ?></td>
<td><?= $Account->CloudCMS($ReqPDO['user_id'], 'username'); ?></td>
<td><?= $rank; ?></td>
<td><?= $ReqPDO['discord']; ?></td>
<td><form method="post"><input type="hidden" name="hidden_id" value="<?= $ReqPDO['id']; ?>"><button type="submit" name="submit" class="btn btn-info btn-sm">Mostrar solicitud</button> <button type="submit" name="submit2" class="btn btn-danger btn-sm">Eliminar solicitud</button> <button type="submit" name="submit3" class="btn btn-success btn-sm">Aceptar solicitud</button></form></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<p class="retour_accueil" style="margin-bottom:5px;"><a href="index">Retorno al inicio</a></p>
</div>
</div>
<?php else : ?>
<div class="panel panel-primary">
<div class="panel-heading" style="background: #2c3034 url('img/header.png') repeat-x scroll center bottom;">
<h3 class="panel-title" style="font-size: 20px;">La solicitud de <?= $Account->CloudCMS($ReqPDO['user_id'], 'username'); ?></h3>
</div>
<div class="panel-body">
<h5><?= $texte; ?></h5>
<p class="retour_accueil" style="margin-top:5px;"><a href="candidature">Volver a solicitudes</a></p>
</div>
</div>
<?php endif; ?>
</div>
</div>
<script>
$(document).ready(function(){
$('#cand_1').after('<div style="text-align: center;"><div id="nav" style="display: inline-block;"></div></div>');
var rowsShown = 5;
var rowsTotal = $('#cand_1 tbody tr').length;
var numPages = rowsTotal/rowsShown;
for(i = 0;i < numPages;i++) {
var pageNum = i + 1;
$('#nav').append('<a href="#" rel="'+i+'">'+pageNum+'</a> ');
}
$('#cand_1 tbody tr').hide();
$('#cand_1 tbody tr').slice(0, rowsShown).show();
$('#nav a:first').addClass('active');
$('#nav a').bind('click', function(){

$('#nav a').removeClass('active');
$(this).addClass('active');
var currPage = $(this).attr('rel');
var startItem = currPage * rowsShown;
var endItem = startItem + rowsShown;
$('#cand_1 tbody tr').css('opacity','0.0').hide().slice(startItem, endItem).
css('display','table-row').animate({opacity:1}, 300);
});
});
</script>
</body>
</html>
 

onacceptable

Queen of the Button mashing
Oct 23, 2019
54
23
sorry to ask but what do you mean by does not rank? everyone from a specefied rank or higher should be able to use hk if that is what you are asking :)
 

Users who are viewing this thread

Top