Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/old/admin/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/old/admin/staff-subject-creation.php

<?php
	require_once("lib/functions.php");
	$db = new login_function();
	$flag = 0;
	$f_roll="";
	$success_msg = 0;
	$t_roll = "";
	$succ_flag = 0;
	$department_error = "";
	$department = "";
	$semester = "";
	$semester_error = "";
	$b_name = "";
	$description = "";
	$succ_flag = 0;
	$division_error = "";
	$division = "";
	$division_error = "";
	$staff_error = "";
	$s_type = "";
	$batch_error = "";
	$batch = "";
	$divi_error = "";

	if(!isset($_SESSION['current_login_admin']))
	{
		header("Location:/admin/index.php");
	}
	if(isset($_SESSION['current_login_admin']))
	{
		$email	=	$_SESSION['current_login_admin'];
	}
	if(isset($_POST['add_btn']))
	{	
		$department		= $_POST['department'];
		$semester		= $_POST['semster'];
		$s_name			= $_POST['s_name'];
		$staff 			= $_POST['staff'];
		$s_type 		= $_POST['s_type'];
		$batch 			= $_POST['batch'];
		$division		= $_POST['division'];

		if($department == 'Select Department')
		{
			$department_error ="Please select Department";
			$flag = 1;
		}
		if($semester == 'Select Semester')
		{
			$semester_error = "Please select Semester";
			$flag = 1;
		}
		if($s_name == 'Select Subject Name')
		{
			$division_error = "Please select Subject Name";
			$flag = 1;
		}
		if($staff == 'Select Staff')
		{
			$staff_error = "Please select Staff Name";
			$flag = 1;
		}
		if($batch == 'Select Batch')
		{
			$batch_error = "Please Select Batch Name";
			$flag = 1;
		}
		if($division == 'Select Division')
		{
			$divi_error = "Please Select Division Name";
			$flag = 1;
		}
		
		
		if($flag==0)
		{
			$db->add_staff_subject_creation($department,$semester,$s_name,$staff,$s_type,$batch,$division);
			$succ_flag = 1 ;
			$department = "";
			$semester = "";
			$s_name = "";
			$staff = "";
			$s_type = "";
			$batch = "";
		}
	}
	
?>


<?php
	require_once('header.php');
?>

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Staff Subject Creation </h1>
					<?php
					if($succ_flag == 1)
					{
					?>
					<div class="alert alert-success">
						Saved Successfully.
					 </div>
					<?php
					}
					?>
					<?php
					if($success_msg == 2)
					{
					?>
					<div class="alert alert-danger">
					 Deleted Successfully.
					 </div>
					<?php
					}
					?>
					
                </div>
                
            </div>
            
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Staff Subject Creation
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <form role="form" method="post" enctype="multipart/form-data">
										<div class="form-group">
                                            <label> Select Department </label>
                                            <select class="form-control" name="department">
												<?php
													if($department != "")
													{
												?>
												<option value="<?php echo $department; ?>"> <?php echo $department; ?> </option>
												<?php
													}
												?>
												<option value="Select Department">Select Department</option>
											<?php
									
												$report_details = $db->get_all_department();
												if(!empty($report_details))
												{
													$counter =0;
													foreach($report_details as $record)
													{
														$id				=	$report_details[$counter][0];
														$department_name=	$report_details[$counter][1];
											?>
												<option value="<?php echo $department_name; ?>"><?php echo $department_name; ?></option>
											<?php
													$counter++;
													}
												}
											?>
											</select>
											<span style="color:red;"><?php echo $department_error; ?></span>                                      
									   </div>
									    <div class="form-group">
                                            <label> Select Semester </label>
                                            <select class="form-control" name="semster">
											<?php
													if($semester != "")
													{
											?>
												<option value="<?php echo $semester; ?>"> <?php echo $semester; ?> </option>
											<?php
													}
											?>
											<option value="Select Semester">Select Semester</option>
											<?php
									
												$report_details = $db->get_all_semester();
												if(!empty($report_details))
												{
													$counter =0;
													foreach($report_details as $record)
													{
														$id				=	$report_details[$counter][0];
														$semester_name  =	$report_details[$counter][1];
											?>
												<option value="<?php echo $semester_name; ?>"><?php echo $semester_name; ?></option>
											<?php
													$counter++;
													}
												}
											?>
											</select>
											<span style="color:red;"><?php echo $semester_error; ?></span>                                      
									   </div>
									   <div class="form-group">
                                            <label> Subject Name </label>
                                            <select class="form-control" name="s_name" required>
												<?php
													if($s_name != "")
													{
												?>
												<option value="<?php echo $s_name; ?>"> <?php echo $s_name; ?> </option>
												<?php
													}
												?>
												<option value="Select Subject Name">Select Subject Name</option>
												<?php
									
													$report_details = $db->fetch_class_subject_data_only();
													if(!empty($report_details))
													{
														$counter =0;
														foreach($report_details as $record)
														{
															$subject_name	=	$report_details[$counter][1];
															
												?>
												<option value="<?php echo $subject_name; ?>"><?php echo $subject_name; ?></option>
												<?php
														$counter++;
														}
													}
												?>
											</select>
											<span style="color:red;"><?php echo $division_error; ?></span>  
									   </div>
									   <div class="form-group">
                                            <label> Select Staff </label>
                                            <select class="form-control" name="staff" required>
												<?php
													if($staff != "")
													{
												?>
												<option value="<?php echo $staff; ?>"> <?php echo $staff; ?> </option>
												<?php
													}
												?>
												<option value="Select Staff">Select Staff</option>
												<?php
									
													$report_details = $db->fetch_staff_name();
													if(!empty($report_details))
													{
														$counter =0;
														foreach($report_details as $record)
														{
															$id				=	$report_details[$counter][0];
															$first_name		=	$report_details[$counter][1];
															$last_name		=	$report_details[$counter][2];
															$email_id		=	$report_details[$counter][3];
															
												?>
												<option value="<?php echo $email_id; ?>"><?php echo $first_name." ".$last_name; ?></option>
												<?php
														$counter++;
														}
													}
												?>
											</select>
											<span style="color:red;"><?php echo $staff_error; ?></span>  
									   </div>
										<div class="form-group">
                                            <label> Subject Type </label>
											<?php
											if($s_type == 'Theory')
											{
											?>
											<input name="s_type" type="radio" value="Theory" checked> Theory
											<input name="s_type" type="radio" value="Practical" > Practical
											<?php
											}else
											{
											?>
                                            <input name="s_type" type="radio" value="Theory"> Theory
											<input name="s_type" type="radio" value="Practical" checked> Practical
											<?php
											}
											?>
									   </div>
																			    <div class="form-group">
                                            <label> Select Division </label>
                                            <select class="form-control" name="division">
											<?php
													if($division != "")
													{
											?>
												<option value="<?php echo $division; ?>"> <?php echo $division; ?> </option>
											<?php
													}
											?>
											<option value="Select Division">Select Division</option>
											<?php
									
												$report_details = $db->get_all_section();
												if(!empty($report_details))
												{
													$counter =0;
													foreach($report_details as $record)
													{
														$id				=	$report_details[$counter][0];
														$division_name  =	$report_details[$counter][1];
											?>
												<option value="<?php echo $division_name; ?>"><?php echo $division_name; ?></option>
											<?php
													$counter++;
													}
												}
											?>
											</select>
											<span style="color:red;"><?php echo $divi_error; ?></span>                                      
									   </div>
									   <div class="form-group">
                                            <label> Select Batch </label>
											<select class="form-control" name="batch" required>
												<?php
													if($batch != "")
													{
												?>
												<option value="<?php echo $batch; ?>"> <?php echo $batch; ?> </option>
												<?php
													}
												?>
												<option value="Select Batch">Select Batch</option>
												<?php
									
													$report_details = $db->fetch_batches_data();
													if(!empty($report_details))
													{
														$counter =0;
														foreach($report_details as $record)
														{
															$b_name			=	$report_details[$counter][0];
												?>
												<option value="<?php echo $b_name; ?>"><?php echo $b_name; ?></option>
												<?php
														$counter++;
														}
													}
												?>
											</select>
											<span style="color:red;"><?php echo $batch_error; ?></span>  
									 </div>
                                        <button type="submit" class="btn btn-success" name="add_btn">Submit</button>	<br /><br />
                                    </form>
                                </div>
							
                
                               
                                
                            </div>
                           
                        </div>
                        
                    </div>
                    
                </div>
              
            </div>
            
        </div>
       

    </div>
    

</body>

</html>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4