This commit is contained in:
Bruno Rybársky 2023-06-10 09:46:33 +02:00
parent 5e9bcd0d93
commit 752326a584
No known key found for this signature in database
GPG Key ID: DFE2C061EF985CD4
2 changed files with 12 additions and 3 deletions

@ -69,8 +69,16 @@ if (!empty($action) && $_POST["password"] == $config["admin_pwd"]){
$stmt6->store_result(); $stmt6->store_result();
} }
if ($action == "getlog"&& !empty($_POST["id"])){ if ($action == "getlog"){
$stmt7 = $mysqli->prepare("SELECT `ID`, `Action`, `LinkID`, `ContentID`, `Datetime`, `Timestamp`, `Nickname`, `IP` FROM Logs"); $idcko = $_POST["id"];
if (empty($idcko)||$idcko == "*"){
$query = "SELECT `ID`, `Action`, `LinkID`, `ContentID`, `Datetime`, `Timestamp`, `Nickname`, `IP` FROM Logs";
$stmt7 = $mysqli->prepare($query);
}
else{
$query = "SELECT `ID`, `Action`, `LinkID`, `ContentID`, `Datetime`, `Timestamp`, `Nickname`, `IP` FROM Logs WHERE `LinkID` = ?";
$stmt7->bind_param("s", $idcko);
}
$stmt7->bind_result ($rowidx, $actionx, $linkidx, $contentidx, $datetimex, $timestampx, $nicknamex, $ipx); $stmt7->bind_result ($rowidx, $actionx, $linkidx, $contentidx, $datetimex, $timestampx, $nicknamex, $ipx);
$stmt7->execute(); $stmt7->execute();
$stmt7->store_result(); $stmt7->store_result();

@ -99,6 +99,7 @@
if (data == "OK"){ if (data == "OK"){
getlinks(); getlinks();
getcontents(); getcontents();
getlog();
$("#pwdentry").fadeOut("slow", function(){ $("#pwdentry").fadeOut("slow", function(){
$("#indexmanagement").fadeIn("slow", function(){ $("#indexmanagement").fadeIn("slow", function(){
}); });
@ -179,7 +180,7 @@
</div> </div>
<h1>Log manager:</h1> <h1>Log manager:</h1>
<input type="text" id="logid"><button id="logget">Get log</button><br> <input type="text" id="logid" value="*" placeholder="Link ID"><button id="logget">Get log</button><br>
<div id="loglist"> <div id="loglist">
</div> </div>