Exemplo n.º 1
0
/**
* 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;
    }
}
Exemplo n.º 2
0
	<form id="admin_task_add" method="post" action="">
	<input type="hidden" name="action" value="admin_task_add" />
	<table>
		<thead>
			<tr>
				<th>Anime</th>
				<th>Episode</th>
				<th>Step</th>
				<th>Benutzer</th>
			</tr>
		</thead>
		<tr>
			<td>
				<select id="cmb_anime" name="anime">
					<?php 
    foreach (afmng_db_project_list() as $project) {
        ?>
						<option value="<?php 
        echo $project->project_id;
        ?>
"><?php 
        echo $project->anime_name;
        ?>
</option>
					<?php 
    }
    ?>
				</select>
			</td>
			<td><select id="cmb_episode" name="episode"></select></td>
			<td>