felipelm3g 9 de nov. de 2017
<! DOCTYPE html >
< html lang = "pt-br" >
< head >
< meta charset = "utf-8" >
< meta http - equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< title > Accenture | Status Diario </ title >
< link rel = "icon" href = "../img/favicon-16.ico" sizes = "16x16" >
< link rel = "icon" href = "../img/favicon-32.ico" sizes = "32x32" >
< link rel = "icon" href = "../img/favicon-48.ico" sizes = "48x48" >
< link href = "../css/bootstrap.min.css" rel = "stylesheet" >
< link href = "../css/body.css" rel = "stylesheet" >
< link href = "../css/main.css" rel = "stylesheet" >
< script type = "text/javascript" >
window . onload = function () {
select ();
};
function select () {
var table = document . querySelector ( ' . emailenviar ' );
var range = document . createRange ();
range . selectNode ( table );
window . getSelection (). addRange ( range );
setTimeout ( function () {
copiar ();
}, 1000 );
}
function copiar () {
try {
var copiar = document . execCommand ( ' copy ' );
if ( copiar ) {
console . log ( copiar );
console . log ( ' Conteudo nao copiado ' );
location . href = ' mailto : [ email removido ] ? subject = Status Diario & body = ' ;
setTimeout ( function () {
location . href = "../status" ;
}, 2000 );
} else {
console . log ( copiar );
console . warn ( ' Conteudo nao copiado ' );
}
} catch ( err ) {
console . error ( ' Comando COPIAR invalido ' );
}
}
</ script >
</ head >
< body >
< section class = "areadetrabalho" >
< table class = "emailenviar" id = "emailenviar" >
< thead >
< tr >
< th > Nº Chamado </ th >
< th > Descrição </ th >
< th > Horas </ th >
< th > Data </ th >
< th > Status </ th >
< th > Funcional </ th >
< th > Projeto </ th >
</ tr >
</ thead >
< tbody >
<? php
include_once "conexao.php" ;
if ( isset ( $_GET [ ' data ' ])) {
$data = $_GET [ ' data ' ];
include_once "conexao.php" ;
$sql = "SELECT * FROM t_statusd WHERE SD_DATA = '$data'" ;
$result = mysqli_query ( $conexao , $sql );
while ( $row = mysqli_fetch_array ( $result , MYSQL_ASSOC )) {
switch ( $row [ "SD_STATUS" ]){
case 0 :
$status = "<td id='status0'>Concluído</td>" ;
break ;
case 1 :
$status = "<td id='status1'>Testes</td>" ;
break ;
case 2 :
$status = "<td id='status2'>Desenvolvimento</td>" ;
break ;
case 3 :
$status = "<td id='status3'>Análise</td>" ;
break ;
case 4 :
$status = "<td id='status4'>Standby</td>" ;
break ;
}
$array = explode ( '-' , $row [ "SD_DATA" ]);
$ano = $array [ 0 ];
$mes = $array [ 1 ];
$dia = $array [ 2 ];
echo "<tr id='$row[SD_COD]'>
< td > $row [ SD_CHAMA ] </ td >
< td > $row [ SD_DESCR ] </ td >
< td > $row [ SD_HORAT ] </ td >
< td > $dia / $mes / $ano </ td >
$status
< td > $row [ SD_FUNC ] </ td >
< td > $row [ SD_PROJT ] </ td >
</ tr > ";
}
mysqli_free_result ( $result );
mysqli_close ( $conexao );
} else {
header ( "Location: ../status" );
exit ;
}
?>
</ tbody >
</ table >
</ section >
< script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" ></ script >
< script src = "../js/bootstrap.min.js" ></ script >
</ body >
</ html >