/** * Render the Project Manager Page */ function afmng_menu_projectmng() { //right check //create subpages? //-project (single project + episodes) //-episode (single episode + tasks) //extract view $view = 'overview'; if (afmng_check_post()) { //handle actions: afmng_menu_projectmng_postback(); //extract view if ($_POST["view"]) { $view = $_POST["view"]; } } //show right view and prepare data switch ($view) { case 'overview': $ltpl = new LTemplate(); $ltpl->project_list = afmng_db_project_list(); $ltpl->projects_closed = afmng_db_projects_closed(); $ltpl->is_admin = afmng_user_cap('afmng_admin', null); $ltpl->view = 'overview'; $ltpl->render(afmng_get_tplfile('tpl.ProjectMng.php')); break; case 'episode': $ltpl = new LTemplate(); if ($_POST["release_id"]) { $episode = afmng_db_release_get($_POST["release_id"]); $ltpl->episode = $episode[0]; $ltpl->tasks = afmng_db_release_steps($_POST["release_id"]); } $ltpl->is_admin = afmng_user_cap('afmng_admin', null); $ltpl->view = 'episode'; $ltpl->render(afmng_get_tplfile('tpl.ProjectMng.Episode.php')); break; } }
<table class="afmng_table"> <thead> <tr> <th>#</th> <th>Titel</th> <th>Status</th> </tr> </thead> <?php foreach (afmng_db_project_releases($project->project_id) as $release) { ?> <?php $steps = afmng_db_release_steps($release->release_id); ?> <tr> <td> <a href="#" title="Episode anzeigen" onclick="afmng_episode_show(<?php echo $release->release_id; ?> ); return false;"> <?php echo $release->episode_no; ?> </a> </td> <td> <?php echo $release->episode_title;