Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
- Fixed and updated some css, js stuff.
- Added missing images, not all tho
- Fixed logEdit
- Moved to /opt/hexc instead of /root
  • Loading branch information
Vip3rLi0n committed May 20, 2024
1 parent e8fe699 commit 4295416
Show file tree
Hide file tree
Showing 88 changed files with 15,911 additions and 64,404 deletions.
Binary file not shown.
5 changes: 0 additions & 5 deletions HTMLPurifier/teste.php

This file was deleted.

2 changes: 1 addition & 1 deletion about.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
?>

<html>
<?php require 'template/templateTop.php';
<?php require 'template/contentStart.php';

if($session->issetLogin()){

Expand Down
3,109 changes: 1,633 additions & 1,476 deletions ajax.php

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions bitcoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
if($session->issetLogin()){

$result['status'] = 'OK';

require 'template/gameHeader.php'; //TODO: is it really needed? (perhaps for set_time, but..)

if(isset($_POST['func'])){

Expand Down
4 changes: 1 addition & 3 deletions certs.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,4 @@
)

);


?>
?>
1 change: 1 addition & 0 deletions clan.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
$session = new Session();
$system = new System();
ob_start();
$sub = 'Clan';
require 'template/contentStart.php';

$clan = new Clan();
Expand Down
20 changes: 0 additions & 20 deletions classes/Internet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2432,26 +2432,6 @@ private function showActionMenu($ip) {
?>
</div>
<div style="text-align: center;">
<?php if($_SESSION['premium'] != 1) { ?>
<style type="text/css">
@media (min-width : 320px) { .adslot_internet_un { width: 234px; height: 60px;} }
@media (min-width : 360px) and (max-width : 480px) { .adslot_internet_un { width: 320px; height: 50px;} }
@media (min-width : 768px) and (max-width : 1024px) { .adslot_internet_un { width: 320px; height: 50px; } }
@media (min-width:1024px) { .adslot_internet_un { width: 125px; height: 125px;} }
@media (min-width:1280px) { .adslot_internet_un { width: 234px; height: 60px; margin-top: 20px} }
@media (min-width:1366px) { .adslot_internet_un { width: 234px; height: 60px; margin-top: 20px} }
@media (min-width:1824px) { .adslot_internet_un { width: 320px; height: 100px; margin-top: 0px} }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- internet responsive -->
<ins class="adsbygoogle adslot_internet_un"
style="display:inline-block"
data-ad-client="ca-pub-7193007468156667"
data-ad-slot="5776909757"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<?php } ?>
</div>
<div class="widget-box">
<div class="widget-title">
Expand Down
11 changes: 0 additions & 11 deletions classes/Mission.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1100,17 +1100,6 @@ public function showListMissionSideBar($hidden){
@media (min-width:1366px) { .adslot_mission { width: 250px; height: 250px; } }
@media (min-width:1824px) { .adslot_mission { width: 336px; height: 280px; } }
</style>
<div class="center">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- missions responsive -->
<ins class="adsbygoogle adslot_mission"
style="display:inline-block"
data-ad-client="ca-pub-7193007468156667"
data-ad-slot="7907947758"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<?php } ?>

</div>
Expand Down
72 changes: 52 additions & 20 deletions classes/PC.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6649,6 +6649,36 @@ public function listLog($id, $pcType, $local) {
}
}

public function editLog($uid, $npc) {
// Check if log is VPC or NPC
if ($npc == 1 || $npc === 'NPC') {
if ($this->npc->issetNPC($uid)) {
$valid = '1';
$npc = '1';
}
} elseif (parent::verifyID($uid)) {
$valid = '1';
$npc = '0';
}
$this->session->newQuery();
$sqlSelect = "SELECT logText FROM log_edit WHERE editorID = :uid AND isNPC = :npc";
$stmt = $this->pdo->prepare($sqlSelect);
$stmt->bindParam(':uid', $uid, PDO::PARAM_INT);
$stmt->bindParam(':npc', $npc, PDO::PARAM_INT);
$stmt->execute();
$logText = $stmt->fetchColumn();

if ($valid == 1) {
$this->session->newQuery();
$sql = "UPDATE log SET text = :logText WHERE userID = :uid AND isNPC = :npc";
$stmt = $this->pdo->prepare($sql);
$stmt->bindParam(':logText', $logText, PDO::PARAM_STR);
$stmt->bindParam(':uid', $uid, PDO::PARAM_INT);
$stmt->bindParam(':npc', $npc, PDO::PARAM_INT);
$stmt->execute();
}
}

public function addLog($uid, $logText, $npc) {
$logFinal = date('Y-m-d H:i') . ' - ';
$logFinal .= $logText;
Expand Down Expand Up @@ -6689,11 +6719,28 @@ public function getLogValue($uid, $npc) {
}

public function tmpLog($uid, $npc, $text) {
// Start a new query session
$this->session->newQuery();

// SQL query to insert a new log entry into the log_edit table
$sql = 'INSERT INTO log_edit (vicID, isNPC, editorID, logText) VALUES (:uid, :npc, :id, :text)';

// Prepare the SQL statement
$stmt = $this->pdo->prepare($sql);
$stmt->execute(array(':uid' => $uid, ':npc' => $npc, ':id' => $_SESSION['id'], ':text' => $text));
return $this->pdo->lastInsertId();

// Execute the prepared statement with bound values
$stmt->execute(array(
':uid' => $uid,
':npc' => $npc,
':id' => $_SESSION['id'],
':text' => $text
));

// Retrieve the ID of the newly inserted row
$insertedId = $this->pdo->lastInsertId();

// Return the ID of the newly inserted row
return $insertedId;
}

public function deleteTmpLog($logID) {
Expand All @@ -6708,24 +6755,9 @@ public function getTmpLog($logID) {
$sql = "SELECT logText FROM log_edit WHERE id = :logID LIMIT 1";
$stmt = $this->pdo->prepare($sql);
$stmt->execute(array(':logID' => $logID));
return $stmt->fetch(PDO::FETCH_OBJ)->logText;
}

public function showLog($logID, $uid) {
$logText = $this->getTmpLog($logID);

?>
<div class="span2 center"></div>
<div class="span8 center">
<form action="logEdit" method="POST" class="log">
<input type="hidden" name="id" value="<?php echo $logID; ?>">
<textarea class="logarea" rows="15" name="log" spellcheck="false"><?php echo $logText; ?></textarea><br/><br/>
<input class="btn btn-inverse" type="submit" value="<?php echo _('Edit log file'); ?>">
</form>
<br/>
</div>
<div class="span2"></div>
<?php
$result = $stmt->fetch(PDO::FETCH_OBJ);

return $result->logText;
}

public function issetLog($logID) {
Expand Down
Loading

0 comments on commit 4295416

Please sign in to comment.