|
Server IP : 217.21.85.138 / Your IP : 216.73.216.103 Web Server : LiteSpeed System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u915722082 ( 915722082) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u915722082/.nvm/../public_html/invoice/../weaving/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
include "_config.php";
include "_helper.php";
$con=new Database;
if(!isset($_SESSION["uname"])){
redirect("index");
}
$pageName="bobbinCategory";
#FORM post
if($_SERVER["REQUEST_METHOD"]=='POST'){
$_POST=filter_input_array(INPUT_POST,FILTER_SANITIZE_STRING);
$con->query("insert into bobbin_category(BNAME) values (:bname)");
$con->bind(":bname",$_POST["bname"]);
if($con->execute()){
flash('msg','Details Added');
}else{
flash('msg','Details Added Failed','danger');
}
}
#Datas
$con->query("select * from bobbin_category");
$data=$con->resultSet();
?>
<?php require_once '_header.php'; ?>
<body class="page-body page-fade" >
<div class="page-container">
<div class="sidebar-menu">
<?php require_once '_sidebar.php'; ?>
</div>
<div class="main-content">
<?php require_once '_nav.php'; ?>
<!--Breadcum-->
<ol class="breadcrumb bc-3" >
<li> <a href="home"><i class="entypo-home"></i>Home</a> </li>
<li class="active"> <strong>Bobbin Category</strong> </li>
</ol>
<!--Form Start-->
<h2>Bobbin Category</h2>
<br />
<div class="row">
<div class="col-md-12">
<?php flash('msg'); ?>
<form role="form" class="form-horizontal" action="<?php echo $_SERVER["REQUEST_URI"];?>" method='POST' enctype='multipart/form-data' autocomplete='off'>
<div class="form-group">
<label for="field-1" class="col-sm-3 control-label">Bobbin Category Name</label>
<div class="col-sm-5">
<input type="text" class="form-control" name='bname' required placeholder="Bobbin Category Name">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-3 col-sm-5">
<input type="submit" class="btn btn-success" value='Submit' name='submit'>
</div>
</div>
</form>
</div>
</div>
<!--Form End-->
<!--Table Start-->
<div class="row">
<div class="col-md-12">
<?php if(count($data)>0):?>
<table class="table table-bordered datatable" id="table-2">
<thead>
<th>SNo</th>
<th>Bobbin Category Name</th>
<th>Edit</th>
<th>Delete</th>
</thead>
<tbody>
<?php $i=0; foreach($data as $row): $i++;?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $row->BNAME;?></td>
<td><a href='kuEdit/<?php echo $row->ID; ?>' target='_BLANK' class='btn btn-primary btn-xs'>Edit</a></td>
<td><a href='kuDelete/<?php echo $row->ID;?>'class='btn btn-danger btn-xs' onclick='return confirm("Are Your Sure?")'>Delete</a></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php else: ?>
<div class="alert alert-danger">No Records</div>
<?php endif; ?>
</div>
</div>
<!--Table End-->
</div>
</div>
<?php require_once '_footer.php'; ?>