Bcom Old
Bcom Old
php
session_start();
if($_SESSION['id'] == "") {
$sid = base64_decode($_GET['q']);
$id = 0;
$row = array();
if(mysqli_num_rows($result) > 0) {
$row = mysqli_fetch_assoc($result);
$id = $row['id'];
} else {
mysqli_query($link, $query);
$row = mysqli_fetch_assoc($result);
$id = $row['id'];
echo "<script> window.location.reload(); </script>";
$subject1name = $row['subject1name'];
$subject2name = $row['subject2name'];
$subject3name = $row['subject3name'];
$subject4name = $row['subject4name'];
?>
<!--
Author: W3layouts
-->
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-editable-select.js"></script>
<script src="http://thecodeplayer.com/uploads/js/jquery-1.9.1.min.js"
type="text/javascript"></script>
<script src="http://thecodeplayer.com/uploads/js/jquery.easing.min.js"
type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
});
});
</script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
<style>
.group{
display: none;
.slides {
height: 500px;
background-size: cover;
color: white;
font-weight: bold;
.links {
float: left;
width: 50%;
}
#brand {
font-size: 200%;
margin-top: 10px;
#logo {
float: left;
.hello {
font-size: 70%;
margin-left: 30px;
#slogan {
margin-left: -110px;
float: left;
margin-top: 80px;
}
#helloBrand {
.log_sign {
border-radius: 20px;
margin-right: 20px;
background: transparent;
padding: 10px;
color: black;
font-weight: bold;
.enter {
width: 25%;
border-radius: 10px;
padding: 10px;
#side-nav > li {
color: white;
font-weight: bold;
text-align: center;
background-color: #409688;;
.required
color: red;
#infotext
margin-left: 310px;
text-align: justify;
margin-right: 30px;
.selected {
.input-form {
margin-left: 30px;
.page-buttons {
background: #409688;
color: white;
font-weight: bold;
border-radius: 10px;
margin-left: 30px;
}
.page-buttons:hover {
background: white;
color: #409688;
.view {
color: white;
border-radius: 10px;
background: #409688;
font-weight: bold;
.view:hover {
color: #409688;
border-color: #409688;
background: white;
.upload-button {
color: white;
border-radius: 10px;
background: #409688;
font-weight: bold;
}
.upload-button:hover {
color: #409688;
background: white;
.links {
float: none;
width: 100%;
margin-left: 10px;
#brand {
margin-top: -10px;
#slogan {
margin-left: -70px;
margin-top: 50px;
font-size: 40%;
.hello {
font-size: 45%;
margin-left: 10px;
.enter {
width: 50%;
#infotext
margin-left: 100px;
</style>
</head>
<body>
<div class="header">
<?php
include('nav.php');
?>
<?php
if($error != '') {
echo '.<strong>'.$error.'</strong>';
echo '</div>';
if($success != '') {
echo '.<strong>'.$success.'</strong>';
echo '</div>';
?>
<h2>BCOM - I Semester :: 2023-2024 Admission Form</h2>
<div class='parent'>
</ul>
</div>
<div id='1'>
<label class='input-form'>Gender</label><br><br>
</select><span class="required"> *</span><br><br>
<label class='input-form'>Category</label><br><br>
</select><span class="required"> *</span><br><br>
</select><span class="required"> *</span><br><br>
</select><span class="required"> *</span><br><br>
</div>
<div id='2'>
</div>
<div id='3'>
</select><span class="required"> *</span><br><br>
</select><span class="required"> *</span><br><br>
</div>
<div id='4'>
</select><span class="required"> *</span><br><br>
<!-- next two lines in same row and 4 times in total -->
</select><span class="required"> *</span>
</select><span class="required"> *</span>
</select><span class="required"> *</span>
</select><span class="required"> *</span>;
<div id="geopractical">
</div>
</div>
<div id='5'>
<p id="infotext";>
<strong><u>Note:</u></strong>
<i>Students shall have to submit all documents in original to the college as when
demanded by the College.
if(strlen($row['passportphoto']) > 0) {
$passportphoto = $row['passportphoto'];
?>
<div id="progressbar-passport">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if(strlen($row['tensheetphoto']) > 0) {
$tensheetphoto = $row['tensheetphoto'];
?>
<div id="progressbar-10">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if(strlen($row['twelvesheetphoto']) > 0) {
$twelvesheetphoto = $row['twelvesheetphoto'];
?>
<div id="progressbar-12">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if($row['category'] == 'APST') {
if(strlen($row['apstphoto']) > 0) {
$apstphoto = $row['apstphoto'];
echo "<a class='input-form view' href='https://jncpasighat.edu.in/$apstphoto'
target='_blank'>View Uploaded File</a>";
echo '</div></div><br><br>';
} else {
echo "";
?>
<?php
if(strlen($row['aadhaarphoto']) > 0) {
$aadhaarphoto = $row['aadhaarphoto'];
?>
<div id="progressbar-aadhaar">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if(strlen($row['bloodphoto']) > 0) {
$bloodphoto = $row['bloodphoto'];
?>
<div id="progressbar-blood">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if(strlen($row['signphoto']) > 0) {
$signphoto = $row['signphoto'];
?>
<div id="progressbar-sign">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if(strlen($row['tcphoto']) > 0) {
$tcphoto = $row['tcphoto'];
?>
<div id="progressbar-tc">
<div class="progress-bar"></div>
</div>
</div><br><br>
<?php
if($row['board'] == 'Other') {
echo "<label class='input-form'>Migration Certificate:(Max upload size: 500KB)
</label><span class='required'> *</span><br><br> <input type='file'
accept='application/pdf, image/*' id='migrationphoto' style='margin-left: 320px;'><br>";
if(strlen($row['migrationphoto']) > 0) {
$migrationphoto = $row['migrationphoto'];
echo '</div>';
echo '</div><br><br>';
} else {
echo "";
?>
<?php
if($row['year'] != date('Y')) {
if(strlen($row['gapphoto']) > 0) {
$gapphoto = $row['gapphoto'];
echo '</div>';
echo '</div><br><br>';
} else {
echo "";
if($row['pwd'] == 'Yes') {
if(strlen($row['diffabledphoto']) > 0) {
$diffabledphoto = $row['diffabledphoto'];
echo '</div>';
echo '</div><br><br>';
} else {
echo "";
?>
</form>
</div>
<?php
if($row['geopracticalmarks'] > 0)
?>
</ul>
</p><br>
<?php
if(strlen($row['passportphoto']) > 0) {
$passportphoto = $row['passportphoto'];
?>
</p><br><br>
<?php
if(strlen($row['tensheetphoto']) > 0) {
$tensheetphoto = $row['tensheetphoto'];
?>
</p><br><br>
<?php
if(strlen($row['twelvesheetphoto']) > 0) {
$twelvesheetphoto = $row['twelvesheetphoto'];
?>
</p><br><br>
<?php
if($row['category'] == 'APST') {
if(strlen($row['apstphoto']) > 0) {
$apstphoto = $row['apstphoto'];
echo "</p><br><br>";
} else {
echo "";
?>
<p><strong>Aadhaar Card:</strong>
<?php
if(strlen($row['aadhaarphoto']) > 0) {
$aadhaarphoto = $row['aadhaarphoto'];
?>
</p><br><br>
<p><strong>Blood Group:</strong>
<?php
if(strlen($row['bloodphoto']) > 0) {
$bloodphoto = $row['bloodphoto'];
?>
</p><br><br>
<p><strong>Signature:</strong>
<?php
if(strlen($row['signphoto']) > 0) {
$signphoto = $row['signphoto'];
?>
</p><br><br>
<?php
if(strlen($row['tcphoto']) > 0) {
$tcphoto = $row['tcphoto'];
?>
</p><br><br>
<?php
if($row['board'] == 'Other') {
if(strlen($row['migrationphoto']) > 0) {
$migrationphoto = $row['migrationphoto'];
echo "</p><br><br>";
} else {
echo "";
?>
<?php
if($row['year'] != date('Y')) {
if(strlen($row['gapphoto']) > 0) {
$gapphoto = $row['gapphoto'];
echo "</p><br><br>";
} else {
echo "";
if($row['pwd'] == 'Yes') {
if(strlen($row['diffabledphoto']) > 0) {
$diffabledphoto = $row['diffabledphoto'];
echo "</p><br><br>";
} else {
echo "";
?>
</div>
<div id='7'>
</div>
</div>
</div>
<br><br>
<script>
/*
FORM VALIDATION
*/
function check_empty(num) {
var empty_count = 0;
$('#' + num).children('input').each(function () {
$(this).css('background', '#ffb9b9');
empty_count++
else {
$(this).css('background', '#ffffff');
}
});
$('#' + num).find('form').children('input').each(function () {
$(this).css('background', '#ffb9b9');
empty_count++
else {
$(this).css('background', '#ffffff');
});
$('#' + num).children('select').each(function () {
console.log($(this).val());
if($(this).val() == "1") {
$(this).css('background', '#ffb9b9');
empty_count++
else {
$(this).css('background', '#ffffff');
});
return empty_count;
// Email validation
function isEmail(email) {
return regex.test(email);
}
// Checks per tabs
function check_tabs(num) {
if(num == 1) {
if(!errorString) {
// Email validation
if(!isEmail($('#email').val()))
if($("#whatsapp").val().length != 10)
if ($("#abc_id").val() != $("#abc_id_confirm").val())
} else if(num == 2) {
if(!errorString) {
if($("#pin").val().length != 6)
if($("#pincom").val().length != 6)
} else if(num == 3) {
if(!errorString) {
//if($("#subject1").val() == $("#subject2").val())
} else if(num == 4) {
if(!errorString) {
if($("#subject1name").val() == $("#subject2name").val() || $
("#subject1name").val() == $("#subject3name").val() ||
$("#subject1name").val() == $("#subject4name").val() || $
("#subject1name").val() == $("#subject4name").val() ||
$("#subject2name").val() == $("#subject3name").val() || $
("#subject2name").val() == $("#subject4name").val() ||
$("#subject3name").val() == $("#subject4name").val())
// Check if marks for all subjects are in range [0, 100] and if any subject is geography
errorString += "Invalid marks in subject " + i + " (should be between 0 and 100)";
}
if($("#subject" + i + "name").val() == 'Geography (only theory)') {
is_geo = true;
} else if(num == 5) {
var ten = <?php if($row['tensheetphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?>;
var twelve = <?php if($row['twelvesheetphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?
>;
var aadhaar = <?php if($row['aadhaarphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?>;
//aadhaar//
var blood = <?php if($row['bloodphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?>;
var sign = <?php if($row['signphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?>;
var tc = <?php if($row['tcphoto'] == '') echo '"Req"'; else echo '"NoReq"'; ?>;
if(passport == 'Req') {
$("#passportphoto").css('background', '#ffb9b9');
if(ten == 'Req') {
$("#tensheetphoto").css('background', '#ffb9b9');
if(twelve == 'Req') {
$("#twelvesheetphoto").css('background', '#ffb9b9');
if(apst == 'Req') {
$("#apstphoto").css('background', '#ffb9b9');
if(aadhaar == 'Req') {
$("#aadhaarphoto").css('background', '#ffb9b9');
//aadhaar//
if(blood == 'Req') {
$("#bloodphoto").css('background', '#ffb9b9');
if(sign == 'Req') {
$("#signphoto").css('background', '#ffb9b9');
}
if(tc == 'Req') {
$("#tcphoto").css('background', '#ffb9b9');
if(migration == 'Req') {
$("#migrationphoto").css('background', '#ffb9b9');
if(gap == 'Req') {
$("#gapphoto").css('background', '#ffb9b9');
return errorString;
function show_slink(num) {
if(i != num) {
$('#' + i).hide();
$('.slink[value="' + i + '"]').removeClass('selected');
icon: "error",
title: "Error",
}).then(function() {
show_slink(current_tab);
});
else {
$('#' + i).show();
$('.slink[value="' + i + '"]').addClass('selected');
$("#progressbar-passport").hide();
$("#progressbar-10").hide();
$("#progressbar-12").hide();
$("#progressbar-apst").hide();
$("#progressbar-aadhaar").hide();
$("#progressbar-blood").hide();
$("#progressbar-sign").hide();
$("#progressbar-tc").hide();
$("#progressbar-migration").hide();
$("#progressbar-gap").hide();
$("#progressbar-pwd").hide();
$("#progressbar").hide();
// On page load, start with current tab
$(".slink").click(function() {
show_slink(parseInt($(this).val()));
});
// Editable select
$("#subject1name").editableSelect();
$("#subject2name").editableSelect();
$("#subject3name").editableSelect();
$("#subject4name").editableSelect();
if(subject1name != 'empty') {
} else {
$("#subject1name").val("--Select a value--");
if(subject2name != 'empty') {
$("#subject2name").val("--Select a value--");
if(subject3name != 'empty') {
} else {
$("#subject3name").val("--Select a value--");
if(subject4name != 'empty') {
} else {
$("#subject4name").val("--Select a value--");
$("#geopractical").hide();
function show_hide_geo_practical() {
show_geo_prac = true;
$("#geopractical").show();
break;
if(!show_geo_prac)
$("#geopractical").hide();
}
show_hide_geo_practical();
$(".bcom-sub").on('select.editable-select', function() {
show_hide_geo_practical();
});
// Submit button
$("#submit").click(function() {
if($("#agree").is(":checked")) {
Swal.fire({
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then((result) => {
if (result.value) {
$.ajax({
url: "/submit-form",
type: "post",
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.href = '/profile';
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
})
});
} else {
Swal.fire({
'title': 'Error',
'icon': 'error'
});
});
function push_tab_data(num) {
if(num == 1) {
$.ajax({
url: '/personal_info',
type: 'post',
data: {'id': id, 'sid': sid, 'name': name, 'fname': fname, 'mname': mname, 'gender':
gender, 'dob': dob, 'email': email, 'whatsapp': whatsapp, 'category': category, 'tribe': tribe, 'religion':
religion, 'nationality': nationality, 'aadhaar': aadhaar, 'abc_id': abc_id, 'bloodgp': bloodgp, 'pwd': pwd,
'type': 'bcom'},
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
});
} else if(num == 2) {
var po = $("#po").val();
$.ajax({
url: '/comm_info',
type: 'post',
data: {'id': id, 'sid': sid, 'village': village, 'po': po, 'district': district, 'state': state, 'pin': pin,
'villagecom': villagecom, 'pocom': pocom, 'districtcom': districtcom, 'statecom': statecom, 'pincom':
pincom, 'type': 'bcom'},
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
});
} else if(num == 3) {
console.log(major);
$.ajax({
url: '/sub_info',
type: 'post',
data: {'id': id, 'sid': sid, 'major': major, 'minor': minor, 'aec': aec, 'mdc': mdc, 'vac': vac,
'extracirri': extracirri, 'type': 'bcom'},
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
});
} else if(num == 4) {
$.ajax({
url: '/12_sub_info',
type: 'post',
data: {'id': id, 'sid': sid, 'namelast': namelast, 'addresslast': addresslast, 'english': english,
'subject1name': subject1name, 'subject2name': subject2name, 'subject3name': subject3name,
'subject4name': subject4name, 'subject1marks': subject1marks, 'subject2marks': subject2marks,
'subject3marks': subject3marks, 'subject4marks': subject4marks, 'geopracticalmarks':
geopracticalmarks, 'year': year, 'extracirri': extracirri, 'board': board, 'type': 'bcom'},
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
}
});
} else if(num == 5) {
$.ajax({
url: '/uploads',
type: 'post',
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error'
});
});
} else if(num == 6) {
url: '/preview_done',
type: 'post',
success: function(result) {
Swal.fire({
'title': 'Success',
'icon': 'success',
}).then((result) => {
window.location.reload();
});
},
error: function() {
Swal.fire({
'title': 'Error',
'text': 'There seems to be some kind of error here, please try again later!',
'icon': 'error',
});
},
});
if($("#" + image_id).val().length == 0) {
if(errorString != "") {
Swal.fire({
'title': 'Error',
'text': errorString,
'icon': 'error'
})
} else {
all_data.append('type', 'bcom');
all_data.append('dtype', dtype);
all_data.append('id', id);
all_data.append('sid', sid);
Swal.fire({
'icon': 'info'
});
$.ajax({
xhr: function() {
xhr.upload.addEventListener("progress", function(evt) {
if (evt.lengthComputable) {
$(".progress-bar").html(parseInt(percentComplete) + '%');
}, false);
return xhr;
},
url: '/uploads',
type: 'post',
data: all_data,
dataType: 'json',
contentType: false,
cache: false,
processData:false,
beforeSend: function(){
$("#progressbar-" + progress_id).show();
$(".progress-bar").width('0%');
},
success: function(result) {
Swal.close();
Swal.fire({
'title': 'Success',
'icon': 'success'
}).then((result) => {
window.location.reload();
});
},
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
}
});
$("#passportupload").click(function() {
});
$("#10upload").click(function() {
});
$("#12upload").click(function() {
});
$("#apstupload").click(function() {
});
$("#aadhaarupload").click(function() {
});
$("#bloodupload").click(function() {
});
$("#signupload").click(function() {
upload_doc("signphoto", "sign", "sign", "signature", 100);
});
$("#tcupload").click(function() {
});
$("#migrationupload").click(function() {
});
$("#gapupload").click(function() {
});
$("#pwdupload").click(function() {
});
$(".next").click(function() {
if(errorString) {
Swal.fire({
'title': 'Error',
'text': errorString,
'icon': 'error'
});
slink_num--;
} else {
push_tab_data(slink_num);
});
$(".upload").click(function() {
if(errorString) {
Swal.fire({
'title': 'Error',
'text': errorString,
'icon': 'error'
});
slink_num--;
} else {
push_tab_data(5);
});
$(".previous").click(function() {
show_slink(slink_num);
});
$("#addrcheck").change(function() {
if($(this).is(":checked")) {
$("#villagecom").val($("#village").val());
$("#pocom").val($("#po").val());
$("#districtcom").val($("#district").val());
$("#statecom").val($("#state").val());
$("#pincom").val($("#pin").val());
} else {
$("#villagecom").val("");
$("#pocom").val("");
$("#districtcom").val("");
$("#statecom").val("");
$("#pincom").val("");
});
function show_course_group() {
$(".group").hide();
$("."+course).show();
show_course_group();
$(document).ready(function(){
$("#course").change(function(){
show_course_group();
});
});
function getSelectValuePcm(core_subject_pcm){
*/
</script>
<div class="container">
<h3 class="address">Address</h3>
<address>
<ul>
<li>The Principal,</li>
<li>Arunachal Pradesh.</li>
<li>(India)</li>
</ul>
</address>
</div>
<div class="clearfix"></div>
</div>
</ul>
<div class="copyright">
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
});
</script>
</div>
<script>
$(document).ready(function(){
// Store hash
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified
area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
});
$(window).scroll(function() {
$(".slideanim").each(function(){
$(this).addClass("slide");
});
});
})
</script>
</body>
</html>