function os_poker_shop_admin_page() { require_once drupal_get_path('module', 'os_poker') . "/shop.class.php"; drupal_set_message(t('Usage of this interface is discouraged as it has not been thougfully designed or tested.'), 'warning'); $cats = CShop::ListCategories(); $vcats = array_keys($cats); $form .= "<table><tr><td>category</td><td>name</td><td>picture</td><td>price</td><td>expiry</td><td>av.</td></tr>"; foreach ($vcats as $catid) { $items = CShop::ListItems($catid); if ($items) { foreach ($items as $item) { $form .= "<tr>" . drupal_get_form("os_poker_shop_admin_form_" . $item->id_item, array($item->id_item, $cats, $catid)) . "</tr>"; } } } $form .= "<tr><td>ADD NEW</td></tr><tr>" . drupal_get_form("os_poker_shop_admin_form_" . 0, array(0, $cats, $catid)) . "</tr>"; $form .= "</table>"; return $form; }