HEX
Server: LiteSpeed
System: Linux in-mum-web921.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: u590867752 (590867752)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: /home/u590867752/domains/himanshuartinstitute.com/public_html/wall/user/register.php
<?php
session_start();

if(isset($_SESSION['wall_user']) && !empty($_SESSION['wall_user'])){
    header("location:user-view-wall.php");
    exit;
}

$old = $_SESSION['old'] ?? [];
$error = $_SESSION['error'] ?? "";
$error_field = $_SESSION['error_field'] ?? "";

function old($key){
    global $old;
    return htmlspecialchars($old[$key] ?? '');
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<title>Register on HAI Wall | Join Himanshu Art Institute Art Community</title>
<meta name="description" content="Create your HAI Wall account to share your artwork, connect with artists, and showcase your creativity. Join Himanshu Art Institute’s art community today." />
<meta name="keywords" content="hai wall register, join art community, create art account, share artwork online, student art platform, artist registration India, himanshu art institute wall, signup art website, online art community India" />
<meta name="robots" content="index, follow">

<meta property="og:image" content="https://www.himanshuartinstitute.com/wall/bcknds/hai-wall.jpg">
<meta property="og:title" content="Register on HAI Wall – Start Sharing Your Art">
<meta property="og:description" content="Join HAI Wall and showcase your creativity. Upload artwork, connect with artists, and grow your skills.">
<meta property="og:url" content="https://himanshuartinstitute.com/wall/user/register.php">
<meta property="og:type" content="website">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://www.himanshuartinstitute.com/wall/bcknds/hai-wall.png" type="image/x-icon" >
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.13/cropper.min.css">
<link href="../bcknds/css/wall-register.css" media="screen" rel="stylesheet" type="text/css" />

</head>

<body class="registrpge">
<div class="register-container">
<div class="register-card">
<a href="https://himanshuartinstitute.com/wall/index.php" class="reglogo"><img src="../bcknds/himanshu-art-institute.jpg" alt="HAI Wall, Himanshu Art Institute" title="HAI WALL"></a>
<h2>Share Your Creativity</h2>
<form method="post" action="register-save.php" enctype="multipart/form-data">
<div class="form-group">
<input type="text" name="name" placeholder="Full Name"
value="<?= old('name') ?>"
class="<?= ($error_field=='name') ? 'input-error' : '' ?>">
</div>
<div class="form-group">
<input type="text" name="username" placeholder="Username"
value="<?= old('username') ?>"
class="<?= ($error_field=='username') ? 'input-error' : '' ?>">
</div>


<div class="form-group">
<input type="email" name="email" placeholder="Email Address"
value="<?= old('email') ?>"
class="<?= ($error_field=='email') ? 'input-error' : '' ?>">
</div>





<div class="form-group">
<input type="file" name="image" id="imageInput"
class="<?= ($error_field=='image') ? 'input-error' : '' ?>">
</div>
<input type="hidden" name="croppedImage" id="croppedImage">
<!-- PASSWORD -->
<div class="form-group">
<input type="password" name="password" id="password" placeholder="Password"
class="<?= ($error_field=='password') ? 'input-error' : '' ?>">
<input type="hidden" id="old_password" value="<?= old('password') ?>">
</div>
<!-- CONFIRM PASSWORD -->
<div class="form-group">
<input type="password" name="confirm_password" id="confirm_password" placeholder="Confirm Password"
class="<?= ($error_field=='confirm_password') ? 'input-error' : '' ?>">
<input type="hidden" id="old_confirm" value="<?= old('confirm_password') ?>">
</div>
<button type="submit" class="register-btn">Register</button>
</form>
<div class="crop-modal" id="cropModal">
<div class="crop-modal-content">
<span class="close-crop" id="closeCrop">&times;</span>
<div class="crop-container">
<img id="cropImage">
</div>
<button type="button" class="crop-btn" id="cropBtn">Crop Image</button>
</div>
</div>
<br>
<a class="hvelgn" href="login.php">Already have account? Login</a> | <a class="hvelgn" href="../index.html">Home</a>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.13/cropper.min.js"></script>

<script>

let cropper;
const imageInput = document.getElementById("imageInput");
const cropPreview = document.getElementById("cropImage");
const cropBtn = document.getElementById("cropBtn");
const cropModal = document.getElementById("cropModal");

imageInput.addEventListener("change", function(e){

const file = e.target.files[0];
if(!file) return;

const reader = new FileReader();

reader.onload = function(event){

cropPreview.src = event.target.result;
cropModal.style.display="block";

if(cropper){
cropper.destroy();
}

cropper = new Cropper(cropPreview,{
aspectRatio:1,
viewMode:1,
autoCropArea:1
});

};

reader.readAsDataURL(file);

});


cropBtn.addEventListener("click",function(){

const canvas = cropper.getCroppedCanvas({
width:500,
height:500
});

const croppedImage = canvas.toDataURL("image/jpeg");

document.getElementById("croppedImage").value=croppedImage;

cropModal.style.display="none";

});


document.getElementById("closeCrop").onclick=function(){
cropModal.style.display="none";
}

</script>


<script>
document.addEventListener("DOMContentLoaded", function(){

// Restore password fields
let oldPass = document.getElementById("old_password")?.value;
let oldConfirm = document.getElementById("old_confirm")?.value;

if(oldPass){
    document.getElementById("password").value = oldPass;
}

if(oldConfirm){
    document.getElementById("confirm_password").value = oldConfirm;
}

// Auto focus on error field
<?php if(!empty($error_field)){ ?>
let field = document.querySelector("[name='<?= $error_field ?>']");
if(field){
    field.focus();
}
<?php } ?>

});
</script>


<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>


<script>
<?php if(!empty($error)){ ?>
Swal.fire({
    icon: 'error',
    title: 'Oops...',
    text: '<?= $error ?>',
    confirmButtonColor: '#d33'
});
<?php } ?>
</script>


<?php
unset($_SESSION['error']);
unset($_SESSION['error_field']);
unset($_SESSION['old']);
?>
</body>
</html>