session_start();
function getHeader($tp, $innerJS, $conn){
$usr = $_SESSION["userinfo"]["username"];
$cia = $_SESSION["userinfo"]["userciades"];
$fecact = date("Y-m-d");
if ($tp == "main"){
$titlepage = $cia;
} else {
$titlepage = $tp;
}
//INICIA HTML
?>
echo $titlepage; ?>
if($innerJS != null){
echo $innerJS;
}
$sqldat = "select a.cve_pag,b.des_pag,b.url_pag from sis_per_pag a, cat_pag b where a.cve_pag=b.cve_pag and a.usr='$usr'";
//echo $sqldat;
//echo print_r($conn);
?>
echo $titlepage;?>
Dashboard echo $fecact; ?>
} else {?>
echo $titlepage; ?>
}
}
function getFooter(){
$year = date("Y");
?>
//TERMINA HTML
}
function getData($conn, $sql){
$response = array();
//echo $sql;
$stmt = $conn->prepare($sql);
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_assoc())
array_push($response, $row);
$stmt->close();
return $response;
}
?>