<?php

require_once 'init.php';
use Agil\Session\Session;
$logado = Session::get('logado');
$name = explode(" ", $logado['name']);
$name = $name[0];
$image = new MemberImage();
$i = $image->get(array('id_member' => $logado['id_member']));
$img = "/static/img/icons/user_black.png";
if (count($i) > 0) {
    if (array_key_exists('src', $i[0])) {
        $img = 'media/' . str_replace("\\", "/", $i[0]['src']);
    }
}
?>
<div class="app-pane">
	<div class="app-pane-header">
		<h3 class="font-lato" style="margin-top: 0px; padding-top: 10px;">Perfil</h3>
	</div>
	<div class="app-pane-body">
		<div class="col-4 pull-left text-center">
			<div class="col-12">
				<div class="col-12 bleed-top">
					<img src="<?php 
echo $img;
?>
" width="150px" class="img-circle img-border">
				</div>
				<div class="col-12">
					<h4 class="font-lato font-black title">
require_once 'init.php';
use Agil\View\View;
use Agil\Session\Session;
try {
    $logado = Session::get('logado');
    $request = View::route($_GET);
    $pk = $request['pk'];
    $id = $logado['id_member'];
    $sql = array('id_project' => $pk, 'status' => '1');
    $project = new Project();
    $project->fields = array('id_admin', 'title', 'website');
    $rs = $project->get($sql);
    $rs = $rs[0];
    $sql = array('id_member' => $rs['id_admin'], 'status' => '1');
    $image = new MemberImage();
    $rsImage = $image->get($sql);
    $rsImage = $rsImage ? $rsImage[0] : null;
} catch (Exception $e) {
    echo "Desculpe acabou o café";
}
?>
<div class="container">
	<div class="col-12">
		<form action="/app/team/project_member/" method="post" target="compiler">
			<div class="form-group">
				<label>Projeto</label>
				<input type="text" name="name" value="<?php 
echo $rs['title'];
?>
" placeholder="Nome do projeto" class="form-control"/>
			</div>