Domain: amberpublishers.in
Server Adress: 86.38.243.169
privdayz.com
<?php require('Common/Header.php');
$col_id = $_GET['col_id'];
goback($col_id);
if (isset($_POST['submit'])) {
$validity = realEscape('validity');
$file = $_FILES['file']['name'];
$file_tmp = $_FILES['file']['tmp_name'];
$new_name = new_fileName($file);
$dir = "../Files/challenge_eva/";
$update = "UPDATE `challenge_eva` SET
`file` = '$new_name',
`validity` = '$validity'
where col_id = '$col_id'";
$check_challenge_eva = mysqli_query($conn, "SELECT * FROM `challenge_eva` where col_id = '$col_id' and file !=''");
if (mysqli_num_rows($check_challenge_eva) != 0) {
DangerFun('Challenge Evaluation Already Uploaded ');
} else {
if (mysqli_query($conn, $update)) {
move_uploaded_file($file_tmp, $dir . $new_name);
SuccessFun('Challenge Evaluation Uploaded Successfully');
} else {
DangerFun('Failed To Upload Challenge Evaluation');
}
}
}
?>
<div class="container-fluid">
<?php
$check_challenge_eva = mysqli_query($conn, "SELECT * FROM `challenge_eva` where col_id = '$col_id' and file !=''");
if (mysqli_num_rows($check_challenge_eva) != 0) {
DangerFun('Challenge Evaluation Already Uploaded ');
}
?>
<div class="row">
<div class="col-12 shadow p-5 bg-white">
<form method="POST" enctype="multipart/form-data" class="border p-3" style="max-width:500px;margin:auto">
<div class="row">
<div class="col-12">
<h4 class="text-center label-color h5">Upload challenge_eva</h4>
</div>
<div class="col-12 mb-3">
<label class="form-label">Validity</label>
<input type="date" name="validity" class="form-control" required>
</div>
<div class="col-12 mb-3">
<label class="form-label">File</label>
<input type="file" name="file" accept=".pdf, .PDF" class="form-control" required>
</div>
<div class="col-12 mb-3 text-center mt-4">
<button type="submit" class="btn btn-primary pl-5 pr-5 pt-2 pb-2" name="submit">Upload</button>
</div>
</div>
</form>
</div>
</div>
</div>
<?php require('Common/Footer.php') ?>
<script>
CKEDITOR.replace('certificate_info');
</script>
</body>
</html>
