<tbody> <?php $rv = aGetAllSubCats(); if (count($rv) > 0) { if (is_array($rv)) { foreach ($rv as $rv1) { echo "<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>" . $rv1['sub_category_name'] . "</td>"; if ($rv1['show_in_app'] == 1) { echo "<td><span class='label-success label label-default'>Active</span></td>"; } else { echo "<td><span class='label-warning label label-default'>InActive</span></td>"; } echo "<td>"; $cat = md5($rv1['category_id']); $pu = aGetCatById($cat); //print_r ($pu); //for($i = 0; $i < count($pu); $i++){ echo $pu['category_name']; //} echo "</td>\n\t\t\t\t\t\t\t\t\t<td>"; $categoryid = $rv1['category_id']; $subcatid = $rv1['sub_category_id']; $target_dir = "categoryimages/"; $images = scandir($target_dir); $icon_name = "{$categoryid}" . "_" . "{$subcatid}" . "_icon.jpg"; //echo $icon_name; foreach ($images as $image) { if ($image == $icon_name) { echo '<a name="changecategoryiconname" href="categoryimages/' . $image . '" target="_blank"> <img class=' . "'img'" . ' src="categoryimages/' . $image . '" style="width: 40px; height: 40px; background-color: #111; alignment-adjust: middle"> </a>'; }
} if ($_REQUEST['in'] == 7) { echo "No Change in Image"; } if ($_REQUEST['in'] == 8) { echo "Imjefd"; } if ($_REQUEST['in'] == 9) { echo "Imhbfrj"; } } ?> <?php if (isset($_REQUEST['id'])) { $id = $_REQUEST['id']; $data = aGetCatById($id); $categoryid = $data['category_id']; echo '<form name="submit" role="form" enctype="multipart/form-data" method="post" action="process/catEditProcess.php?id=' . $categoryid . '">'; //print_r($data); echo "<div class='form-group'>\n\t\t\t\t\t\n <label class='control-label' for='selectError'>Category Name</label>\n <div class='controls'>\n <input type='text' class='form-control' name='categoryname' style='width:45%' value='" . $data["category_name"] . "'/>\n </div>\n </div>\n\t\t\t\t<div class='form-group'>\n\t\t\t\t\t\t <label class='control-label' f>Current Icon</label>"; echo "<br>"; $target_dir = "categoryimages/"; $images = scandir($target_dir); $icon_name = "{$categoryid}" . "_icon.jpg"; //echo $icon_name; foreach ($images as $image) { if ($image == $icon_name) { echo '<a name="changecategoryiconname" href="categoryimages/' . $image . '" target="_blank"> <img class=' . "'img'" . ' src="categoryimages/' . $image . '" style="width: 40px; height: 40px; background-color: #111; alignment-adjust: middle"> </a>'; } } echo "<br>";