<div class="mymod-overlay" style="display: block;">
<div class="mymod-table">
<div class="mymod-cell">
<div class="mymod-modal" style="min-width: 70%;">
<a href="#close" onclick="return mymod();" class="mymod-close"></a>
<h2>Отчеты для задания №<?php echo $Id ?></h2>
<?php foreach ($ot as $val) { ?>
<div class="panel panel-default" id="otchet_<?=$val['Id']; ?>">
<div class="panel-heading">
<strong>Отчет №<?php echo $val['Id']; ?></strong><br />
<small>Необходимо проверить до: <?php echo date('d.m.Y H:i',($val['OtchetDate']+$r_m->set['chtime']*60*60)); ?></small>
<div>
<?php
$db = new db(dbHost, dbUser, dbPass, dbName);
$task_item_uid = $val['UserId'];
$task_item_login = $db->query("SELECT `login` FROM `db_users` WHERE `id`='$task_item_uid'")->fetchArray();
$task_id = $val['Id'];
$mod_task_screenshot = $db->query("SELECT `filename` FROM `mod_task_screenshot` WHERE `task_id`='$task_id'");
$mod_task_screenshot_fetchAll = $mod_task_screenshot->fetchAll();
?>
Исполнитель: <strong><?php echo $task_item_login['login']; ?></strong>
</div>
<div style="padding-top: 5px;">
<button type="submit" onclick="task_show_ot_blok(this)" value="<?php echo $val['Id']; ?>" class="btn btn-xs btn-danger"><i class="fa fa-exclamation-triangle"></i> Заблокировать пользователя</button>
<!-- -->
<div class="mymod-overlay close_docclick">
<div class="mymod-table">
<div class="mymod-cell">
<div class="mymod-modal" style="min-width: auto;">
<a href="#close" onclick="return mymod();" class="mymod-close"></a>
<div class="clearfix"></div>
<form method="post" class="form-group">
<label>Причина:</label>
<br /><small>(Обязательно укажите причину блокировки)</small>
<textarea name="Comment" class="form-control" rows="4" required="required"></textarea>
<p><button value="<?php echo $val['Id']; ?>" type="submit" name="blok" class="btn btn-danger">Заблокировать</button></p>
<input type="hidden" name="TaskId" value="<?php echo $Id ?>" />
</form>
</div>
</div>
</div>
</div>
<!-- -->
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div class="panel panel-success">
<div class="panel-heading"><strong>Отчет</strong></div>
<div class="panel-body">
<textarea style="margin-bottom: 15px;" rows="4" readonly="readonly" class="form-control"><?php echo $val['Otchet']; ?></textarea>
<style>
.form-row {
margin-bottom: 15px;
}
.form-row label {
display: block;
color: #777;
margin-bottom: 5px;
}
.form-row input[type="text"] {
width: 100%;
padding: 5px;
box-sizing: border-box;
}
/* Стили для вывода превью */
.img-item {
display: inline-block;
margin: 0 20px 20px 0;
position: relative;
user-select: none;
}
.img-item img {
border: 1px solid #767676;
}
</style>
<?php
foreach($mod_task_screenshot_fetchAll as $row){
echo '<div class="img-item"><a href="/assets/img/taskscreenshot/new/'.$row['filename'].'" target="_blank"><img src="/assets/img/taskscreenshot/new/'.$row['filename'].'" class="img-list" style="width:200px;"></a></div>';
}
?>
<form method="post"><input type="hidden" name="TaskId" value="<?php echo $Id ?>" /><p style="text-align: center;"><button type="submit" name="otchetok" onclick="return fade(<?php echo $val['Id']; ?>);" value="<?php echo $val['Id']; ?>" class="btn btn-success"><i class="fa fa-check"></i> ПРИНЯТЬ</button></p></form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-danger">
<div class="panel-heading"><strong>Доработка</strong></div>
<div class="panel-body">
<form method="post">
<input type="hidden" name="TaskId" value="<?php echo $Id ?>" />
<span data-valgroup="prich<?php echo $val['Id']; ?>" data-validel="prich<?php echo $val['Id']; ?>" data-valtype="reqired" data-valerrormes="Укажите причину, по которой задание отправлено на доработку!" class="validator" ></span>
<textarea style="margin-bottom: 15px;" name="Dorabotka" rows="3" id="prich<?php echo $val['Id']; ?>" placeholder="Укажите причину, по которой задание отправлено на доработку ..." class="form-control"></textarea> <p style="text-align: center;"><button onclick="return validator('prich<?php echo $val['Id']; ?>')" type="submit" value="<?php echo $val['Id']; ?>" name="otcheterr" class="btn btn-warning"><i class="fa fa-times"></i> Отправить на<br />доработку</button></p>
</form>
<div style="line-height: 1;font-size: 13px;"><small class="text-danger"><i class="fa fa-fw fa-info-circle"></i> После отправки на доработку, у пользователя будет 24 часа на доработку задания</small></div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function task_show_ot_blok(e){$(e).next().fadeIn(200);}
$(document).ready(function(){
p_init();
$('[data-count_chars]').keyup();
$('[data-churl]').change();
var $sum = $('[data-edit_Sum]');
var sum = $sum.val();
$('[data-edit_sum_per]').html((sum*1 + sum*(<?php echo $r_m->set['per']; ?>/100)).toFixed(2));
$sum.keyup(function(event) {
sum = $sum.val().replace(/[^0-9\.\,]/g, "");
sum = sum.replace(',', ".");
$('[data-edit_sum_per]').html((sum*1 + sum*(<?php echo $r_m->set['per']; ?>/100)).toFixed(2));
});
function fade(id){
$('#otchet_'+id).fadeOut(300);
return false;
}
});
</script>