<?php
	date_default_timezone_set("Asia/Jakarta");
	include "../libs/functiondb.php";
	include "../libs/functiondate.php";
	include "tagmanagerhead.php";
	include "analytics.php";
	include "visitor.php";
	
	$id = mysqli_real_escape_string($koneksi, $_GET['id']);
	$pdb = mysqli_query($koneksi, "SELECT * FROM cmas_konten WHERE konten_id='$id'");
	$pdt = mysqli_fetch_array($pdb);
	if ($pdt['konten_imageid'] == 0) {
		$konten_image = "assets/images/noimage.jpg";
	} else {
		$konten_image = "assets/images/konten/$pdt[konten_image]";
	}
	
	$mdb = mysqli_query($koneksi, "SELECT * FROM cmas_metadata");
	$mdt = mysqli_fetch_array($mdb);
?>

<title><?php echo $pdt['konten_metatitle']; ?></title>
<meta charset="<?php echo $mdt['metadata_charset']; ?>">
<meta name="generator" content="<?php echo $mdt['metadata_generator']; ?>">
<meta name="robots" content="<?php echo $mdt['metadata_robots']; ?>">
<meta name="developer" content="<?php echo $mdt['metadata_developer']; ?>">
<meta name="viewport" content="<?php echo $mdt['metadata_viewport']; ?>">
<meta name="description" content="<?php echo $pdt['konten_metadesc']; ?>">
<meta name="keywords" content="<?php echo $pdt['konten_metakey']; ?>">
<meta name="author" content="<?php echo $mdt['metadata_author']; ?>">
<meta name="copyright" content="<?php echo $mdt['metadata_copyright']; ?>">
<link href="<?php echo PATH; ?>assets/images/<?php echo $mdt['metadata_gambar']; ?>" rel="shortcut icon" type="image/x-icon">
<meta property="og:title" content="<?php echo $pdt['konten_judul']; ?>">
<meta property="og:description" content="<?php echo $pdt['konten_metadesc']; ?>">
<meta property="og:image" content="<?php echo PATH; ?><?php echo $konten_image; ?>">
<meta property="fb:app_id" content="<?php echo $mdt['metadata_appid']; ?>">
<meta property="og:type" content="<?php echo $mdt['metadata_type']; ?>">
<meta name="google-site-verification" content="<?php echo $mdt['metadata_googlesite']; ?>" />
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-<?php echo $mdt['metadata_addthisid']; ?>"></script>
<?php $tb = mysqli_query($koneksi, "SELECT * FROM cmas_kontentag WHERE konten_id='$pdt[konten_id]' ORDER BY kontentag_id ASC"); while($tt = mysqli_fetch_array($tb)) { ?>
<meta property="article:tag" content="<?php echo $tt['kontentag_title']; ?>">
<?php } ?>

<link href="assets/css/design.css" rel="stylesheet" type="text/css" />
<link href="assets/css/table.css" rel="stylesheet" type="text/css" />

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600&display=swap" rel="stylesheet">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<script src='https://code.jquery.com/jquery-2.1.3.min.js'></script>