$req = obtenirReqSelectCategories(); $idJeuCat = mysql_query($req, $idConnexion); echo mysql_error($idConnexion); $lgCat = mysql_fetch_assoc($idJeuCat); while (is_array($lgCat)) { ?> <tr> <td><a href="index.php?cat_name=<?php echo $lgCat["cat_name"]; ?> "><?php echo $lgCat["cat_name"]; ?> </a></td> <td><?php echo countCategory($idConnexion, $lgCat['cat_id']); ?> </td> <td> <form method="post" action="admin.php"> <input type="hidden" name="cat_id" value="<?php echo $lgCat["cat_id"]; ?> "> <button type="button" class="btn btn-info"><span class="glyphicon glyphicon-edit" onClick="parent.location='categ-edit.php?cat_id=<?php echo $lgCat["cat_id"]; ?> '"></span></button> <button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span></button> </form> </td>
// static/general.php $page = $pgdata['page']; $query_per_page = $pgdata['query_per_page']; $sort_by = $pgdata['sort_by']; $first_record = $pgdata['first_record']; $search_parameter = $pgdata['search_parameter']; $search_value = $pgdata['search_value']; $search_query = $pgdata['search_query']; $search = $pgdata['search']; $full_product = get_full_category($search_query, $sort_by, $first_record, $query_per_page); $total_query = $full_product['total_query']; $total_page = $full_product['total_page']; // RESULT // CALL FUNCTION $listing_category = get_category($search_query, $sort_by, $first_record, $query_per_page); $count = countCategory(); // HANDLING ARROW SORTING if ($sort_by == "category_name DESC") { $arr_category_name = "<span class=\"sort-arrow-up\"></span>"; } else { if ($sort_by == "category_name") { $arr_category_name = "<span class=\"sort-arrow-down\"></span>"; } else { if ($sort_by == "total_recipes DESC") { $arr_total_recipes = "<span class=\"sort-arrow-up\"></span>"; } else { if ($sort_by == "total_recipes") { $arr_total_recipes = "<span class=\"sort-arrow-down\"></span>"; } else { if ($sort_by == "category_active DESC") { $arr_category_active = "<span class=\"sort-arrow-up\"></span>";