コード例 #1
0
<?php

require_once 'init.php';
use Agil\View\View;
$request = View::route($_GET);
$pk = $request['pk'];
$sql = array('id_project_task_items' => $pk, 'status' => '1');
$fields = array('id_project_task_items', 'id_project_task');
$model = new ProjectTaskItems();
$model->fields = $fields;
$rs = $model->get($sql);
$rsItem = $rs[0];
$sql = array('id_project_task_items' => $rsItem['id_project_task_items'], 'status' => '1');
$fields = array('id_member');
$model = new ProjectTaskItemsMemberSet();
$model->fields = $fields;
$rsItemMembers = $model->get($sql);
$sql = array('id_project_task' => $rsItem['id_project_task'], 'status' => '1');
$fields = array('id_project');
$model = new ProjectTask();
$model->fields = $fields;
$rs = $model->get($sql);
$rs = $rs[0];
$sql = array('id_project' => $rs['id_project'], 'status' => '2');
$fields = array('id_member');
$model = new ProjectMemberSet();
$model->fields = $fields;
$rs = $model->get($sql);
?>
<div class="modal-content">
	<div class="modal-header">
コード例 #2
0
    $comment = $request['comment'];
    $remove = $request['remove'];
    if ($remove) {
        $sql = array('id_project_task_items_comments' => $pk, 'status' => 1);
        $model = new ProjectTaskItemsComments();
        $model->fields = array('status' => 0);
        $update = $model->update($sql);
        if ($update) {
            $sql = array('id_project_task_items_comments' => $pk);
            $model->fields = array('id_project_task_items');
            $rsComments = $model->get($sql);
            $rsComment = $rsComments[0];
            $query = array("id_project_task_items" => $rsComment['id_project_task_items'], "status" => 1);
            $project = new ProjectTaskItems();
            $project->fields = array('id_project_task_items', 'id_project_task');
            $rsItem = $project->get($query);
            $rsItem = $rsItem[0];
            $sql = array('id_project_task' => $rsItem['id_project_task'], 'status' => 1);
            $project = new ProjectTask();
            $project->fields = array('id_project');
            $rs = $project->get($sql);
            $rs = $rs[0];
            ?>
			<script>
				var timePopup = setTimeout(function(){
					window.parent.boss.removeClass('modal_dialog', 'active');
					window.parent.boss.ajax.load('/app/task/view_task/?pk=<?php 
            echo $rs["id_project"];
            ?>
', '#app_pane_body');
				}, 100);
コード例 #3
0
								</div>
								<div id="info_task_<?php 
        echo $i;
        ?>
" class="popover left fade-popover" style="top: -8%; left:30%; width:50%;">
									<div class="arrow"></div>
									<p class="text-white no-bold">Configurações do cartão</p>
								</div>
							</div>
							<div class="card-group culmun">
							<?php 
        $query = array("id_project_task" => $task['id_project_task'], "status" => 1);
        $fields = array("id_project_task_items", "id_project_task", "title", "comment");
        $model = new ProjectTaskItems();
        $model->fields = $fields;
        $items = $model->get($query);
        foreach ($items as $item) {
            if (ctype_upper($item['comment'])) {
                $comment = mb_strimwidth($item['comment'], 0, 229, "...");
            } else {
                $comment = mb_strimwidth($item['comment'], 0, 229, "...");
            }
            ?>
								<div class="card" onclick="boss.modalWindow({'pk':'<?php 
            echo $item['id_project_task_items'];
            ?>
', pk2: '<?php 
            echo $task['id_project'];
            ?>
','title':'<?php 
            echo $item['title'];
コード例 #4
0
require_once 'init.php';
use Agil\View\View;
use Agil\Config\Config;
use Agil\Session\Session;
$request = View::route($_POST);
if ($request['METHOD'] == 'POST' && !empty($request['title']) && !empty($request['pk']) && Session::exist('logado')) {
    $logado = Session::get('logado');
    $title = $request['title'];
    $pk = $request['pk'];
    $fields = array('id_project_task_items' => $pk, 'id_creator' => $logado['id_member'], 'title' => $title, 'checked' => '0');
    $model = new ProjectTaskItemsSubitems($fields);
    $item = $model->save();
    $query = array('id_project_task_items' => $pk, 'status' => '1');
    $project = new ProjectTaskItems();
    $project->fields = array('id_project_task', 'title', 'comment');
    $rsItem = $project->get($query, 'id_project_task_items DESC');
    $rsItem = $rsItem[0];
    $sql = array('id_project_task' => $rsItem['id_project_task'], 'status' => '1');
    $project = new ProjectTask();
    $project->fields = array('id_project');
    $rs = $project->get($sql);
    $rs = $rs[0];
    if ($item) {
        ?>
		<script>
			var timePopup = setTimeout(function(){
				window.parent.boss.removeClass('modal_dialog', 'active');
				window.parent.boss.ajax.load('/app/task/view_task/?pk=<?php 
        echo $rs["id_project"];
        ?>
', '#app_pane_body');
コード例 #5
0
    $model = new ProjectTaskItems();
    $model->fields = $fields;
    $rsItem = $model->get($sql);
    $rsItem = $rsItem[0];
    $sql = array('id_project_task' => $rsItem['id_project_task'], 'id_project' => $pk, 'status' => '1');
    $fields = array('id_project_task');
    $model = new ProjectTask();
    $model->fields = $fields;
    $tasks = $model->get($sql);
    $task = count($tasks) > 0 ? $tasks[0] : $tasks;
    if (count($tasks) > 0) {
        $sql = array('id_project_task' => $task['id_project_task']);
        $fields = array('id_project_task_items', 'id_project_task', 'title', 'comment', 'status');
        $model = new ProjectTaskItems();
        $model->fields = $fields;
        $rsItem = $model->get($sql);
        $rsItem = $rsItem[0];
        if ($rsItem['status'] == 2) {
            if ($rsItem['id_project_task'] == $task['id_project_task'] || $logado['id_member'] == $rsItemMember['id_admin']) {
                ?>
									<div class="card" onclick="boss.popup('Tarefa concluída e arquivada.');" disabled>
										<div class="card-content">
											<div class="col-12 pull-left" style="padding-bottom:1%;">
												<h3><?php 
                echo $rsItem['title'];
                ?>
</h3>
											</div>
											<div class="col-12 pull-left" style="padding-bottom:1%;">
												<p><?php 
                echo $rsItem['comment'];
コード例 #6
0
					</div>
				</div>
				<?php 
if ($count) {
    foreach ($projects as $project) {
        $sql = array("id_project" => $project['id_project'], "status" => 1);
        $fields = array("id_project_task", "title", "color");
        $model = new ProjectTask();
        $model->fields = $fields;
        $tasks = $model->get($sql, 'id_project_task ASC');
        foreach ($tasks as $task) {
            $query = array("id_project_task" => $task['id_project_task'], "status" => 1);
            $fields = array("id_project_task_items", "title", "comment");
            $model = new ProjectTaskItems();
            $model->fields = $fields;
            $items = $model->get($query, 'id_project_task_items DESC', '3');
            foreach ($items as $item) {
                $border = "border-left-" . $task['color'];
                ?>
									<div class="card card-effect <?php 
                echo $border;
                ?>
" onclick="$('#modal_window').empty(); boss.ajax.load('/app/task/view_item/?pk=<?php 
                echo $item['id_project_task_items'];
                ?>
', '#modal_window', 'active');">
										<div class="card-content">
											<h5><?php 
                echo $item['title'];
                ?>
</h5>