Example #1
0
    echo "<input placeholder='" . $category['name'] . "' class='form-control' id='add_cat' style='width:120px;height:35px; margin:-10px 0px'/><input type='submit' class=' btn btn-primary btn-lg' name='ok' value='submit edit' style='width:120px;height:40px;position:absoulte;margin:0px 130px; margin-top:-35px'/>";
    echo "<input  name='method' class='col-md-1 btn btn-primary btn-lg' value='edit' type='hidden' ></form>";
    echo "</td>";
    echo "</td><td>" . $category['Products'] . "</td>";
    echo "<td><div class='btn-group btn-group-sm'><a class='btn btn-warning' class='show_edit' value='Add new Category' >edit name</a>";
    echo "<a  class='btn btn-danger' href='module/server.php?method=delete&id=" . $id;
    echo "'>Delete</a></div></td></tr>";
}
?>
						</tbody>
							<thead>
							<tr><th colspan="4">Empty Categories</th></tr>
							</thead>
						<tbody>
							<?php 
$cats = $cat->emptyCategory();
foreach ($cats as $key => $category) {
    $id = $category['id'];
    echo "<tr><td> " . $id;
    echo "</td><td class='name'>" . $category['name'] . "</td>";
    echo "<td class='edit' class='hide' style='width:120px'>";
    echo "<form  role='form' class='form-horizontal col-md-5' action='module/server.php?id=' method='post'>";
    echo "<input placeholder='" . $category['name'] . "' name='edit_cat' class='form-control' id='add_cat' style='width:120px;height:35px; margin:-10px 0px'/>";
    echo "<input type='submit' class=' btn btn-primary btn-lg' name='ok' value='submit edit' style='width:120px;height:40px;position:absoulte;margin:0px 130px; margin-top:-35px'/>";
    echo "<input  name='method' value='edit' type='hidden' ></form>";
    echo "</td>";
    echo "</td><td>------------</td>";
    echo "<td><div class='btn-group btn-group-sm'><a class='btn btn-warning' class='show_edit' value='Add new Category' >edit name</a>";
    echo "<a  class='btn btn-danger' href='module/server.php?method=delete&id=" . $id;
    echo "'>Delete</a></div></td></tr>";
}