<?php
if(count(get_included_files()) ==1) exit("Direct access not permitted.");
$mod = basename(__FILE__, '.php');
$page->tbCss($mod);
$page->tbJs($mod);

$namaheader2="";
$alamat="";
$telpheader="";
$emailheader="";
$nofax="";
if(isset($datasettingprofile['header2'])) $namaheader2=$datasettingprofile['header2'];
if(isset($datasettingprofile['alamat'])) $alamat=$datasettingprofile['alamat'];
if(isset($datasettingprofile['email'])) $emailheader=$datasettingprofile['email'];
if(isset($datasettingprofile['telp'])) $telpheader=$datasettingprofile['telp'];
if(isset($datasettingprofile['fax'])) $nofax=$datasettingprofile['fax'];
							
$query="select t1.`id`,
			t1.`tanggal`,
			t1.`iduser`,
			t1.`idkategori`,
			t1.`judul`,
			t1.`konten`,
			t1.`status`,
			t1.`utama`,
			t1.`dibaca`,
			t1.`idgambar`,
			if(t2.id is null,0,t2.id) as idbanner,
			if(t2.folder is null,'',t2.folder) as folder,
			if(t2.nama_baru is null,'',t2.nama_baru) as nama_baru
		from tb_konten as t1 
		left join tb_dokumen as t2 on t1.idgambar=t2.id
		where t1.status=1 and t1.utama=1 order by t1.tanggal desc limit 0,1";

$rsberita=$db->loadAssoc($query);
?>
<div class="box_mod_footer" align="center">
	<div class="boxtextfooter" align="left">
		<div class="footer_profile_info">
			<?php
			$logoheader="";
			if(isset($datasettingprofile['idlogo']) && $datasettingprofile['idlogo']>0){
				$query="select * from tb_dokumen where id=?";
				$rsdatalogo=$db->loadAssoc($query,array($datasettingprofile['idlogo']));
				if(isset($rsdatalogo['id'])){
					$logoheader=NPAGE.$rsdatalogo['folder'].$rsdatalogo['nama_baru'];
				}
			}
			?>
			<div class="box_logo_footer">
				<div class="logo_footer">
					<img src="<?php echo $logoheader;?>" />
				</div>
				<div class="txthead_logo">
					<div class="txthead_logo1"><?php echo $namaheader;?></div>
					<!--<div class="txthead_logo2"><?php echo $namaheader2;?></div>-->
				</div>
				<div style="clear: both"></div>
				<div style="width:100%;padding-top: 15px; text-align: justify">E-OFFICE BDK SEMARANG</div>
				<div class="footer_profile_alamat">
					<a href="https://twitter.com/">
						<div class="footer_twitt"></div>
					</a>
					<a href="https://www.facebook.com/">
						<div class="footer_fb"></div>
					</a>
					<a href="https://www.instagram.com/">
						<div class="footer_insta"></div>
					</a>
					<a href="">
						<div class="footer_ggogl"></div>
					</a>
					<div style="clear: both;"></div>
				</div>
			</div>
			<div class="box_deskripsi">
				<div class="footer_deskripsi" style="padding-bottom: 15px;text-align: justify">Tentang BDK</div>
				<div style="clear: both"></div>
				<div class="detail_deskripsi">
					<div style="width:100%;text-align: center">
						<?php echo $datasettingprofile['deskripsi'];?>
					</div>
				</div>
			</div>
		</div>
		<div class="footer_profile_link" align="right">
			<div class="box_deskripsi_info">
				<div class="footer_deskripsi_link" style="padding-bottom: 15px">Alamat Kantor</div>
				<div style="clear: both"></div>
				<div class="detail_deskripsi_link">
					<div class="titile_nama_pt"><?php echo $namaheader3;?></div>
					<div class="titile_nama_alamat"><?php echo $alamat;?></div>
					<div class="titile_nama_alamat titile_nama_telp"><?php echo $telpheader;?></div>
					<div class="titile_nama_alamat titile_nama_fax"><?php echo $nofax;?></div>
					<div class="titile_nama_alamat titile_nama_email"><?php echo $emailheader;?></div>
				</div>
			</div>
		</div>
		<div style="clear: both;"></div>
	</div>
	<div style="clear: both;"></div>
	<div class="box_footer_cpr" align="center">
		<p class="footerc">Copyright <?php echo $namaheader;?> 2020.All Right Reserved</p>
	</div>
</div>

