fix log
This commit is contained in:
parent
5e9bcd0d93
commit
752326a584
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user