<span class="pull-right"><?php echo get_var('menu') == 'edit' ? '<a class="btn btn-default btn-xs" href="' . $options['site_url'] . '/index.php?p=zeelunch#innolunch">Cancel</a> <button class="btn btn-primary btn-xs" type="submit" name="save">Save</button>' : '<a href="' . get_page_url() . '&menu=edit#innolunch">Edit</a>'; ?> </span></h4> <table class="table table-bordered table-hover"> <thead> <tr> <th>Day</th> <th>Item</th> <th>Price</th> </tr> </thead> <tbody> <?php foreach (Innolunch::getMenu() as $menu) { ?> <tr> <td width="20%"> <?php echo $menu->getDay(); ?> </td> <td width="70%'"> <?php echo get_var('menu') == 'edit' ? '<input class="form-control" name="innolunch_item_' . $menu->getID() . '" type="text" value="' . $menu->getItem() . '" />' : $menu->getItem(); ?> </td> <td width="10%"> <?php
/** * VenturaApps base app main index file * * Displays dashboard links and the Innolunch menu */ #################################################################### # App setup & config # #################################################################### require_once 'apps-core.php'; $app = new App(); $app->name = 'Base'; $app->version = '1.0.0'; $app->prefix = 'apps'; $app->url = $options['site_url']; $template = new Template($options, $app); $p = get_var('p'); #################################################################### if ($p == 'zeelunch') { $menu = get_var('menu'); if ($menu && $menu == 'edit' && isset($_POST['save'])) { Innolunch::Save($_POST); redirect($options['site_url'] . '/index.php?p=zeelunch#innolunch'); } $template->parent_page = 'zeelunch'; $template->page_title = 'Zeeland Lunch Schedule'; load_template('zeelunch'); } else { $template->parent_page = 'home'; $template->page_title = 'Dashboard'; load_template('home'); }