File: header.php

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra  >  Giga CMS  >  header.php  >  Download  
File: header.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Giga CMS
Multi-user content management system
Author: By
Last change:
Date: 4 years ago
Size: 12,094 bytes


Class file image Download
 // connect to the database
	$servername = "$set->db_host";
	$username = "$set->db_user";
	$password = "$set->db_pass";
	$dbname = "$set->db_name";

	// Create connection
	$conn = new mysqli($servername, $username, $password, $dbname);

	// Check connection
	if ($conn->connect_error) {
		die("Connection failed: " . $conn->connect_error);
	$query  = "select * from `".MLS_PREFIX."slideshow` order by id desc limit 6";
	$res    = mysqli_query($conn,$query);
	$count  = mysqli_num_rows($res);

    while($row= mysqli_fetch_array ($res))

        $title = $row['title'];
        $desc = $row['desc'];
        $image = $row['image'];
        if($counter == 0)
            $Indicators .='<li data-target="#carousel-example-generic" data-slide-to="'.$counter.'" class="active"></li>';
            $slides .= '<div class="item active">
            <img src="upload/gallery/'.$image.'" alt="'.$title.'" />
            <div class="carousel-caption">

            $Indicators .='<li data-target="#carousel-example-generic" data-slide-to="'.$counter.'"></li>';
            $slides .= '<div class="item">
            <img src="upload/gallery/'.$image.'" alt="'.$title.'"/>
            <div class="carousel-caption">
$query  = "select * from `".MLS_PREFIX."color`";
$res    = mysqli_query($conn,$query);
$count  = mysqli_num_rows($res);

		$color  = $row['color_font'];
		$color_background  = $row['color_background'];

$query  = "select * from `".MLS_PREFIX."color_theme`";
$res    = mysqli_query($conn,$query);
$count  = mysqli_num_rows($res);

		$color_theme  = $row['color_theme'];
		$link_color = $row['link_color'];
		$body_color = $row['body_color'];

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
	<!-- Meta -->
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<!-- SEO -->
	<title><?php echo $page->title; ?></title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="<?php echo $page->description; ?>">
	<meta name="keywords" content="<?php echo $page->keyword; ?>">
	// get results from database
	$result = mysqli_query($conn, "SELECT * FROM `".MLS_PREFIX."seo` WHERE `id`='1'") 
		or die(mysqli_error());  	

	// loop through results of database query, displaying them in the table
	while($row = mysqli_fetch_array( $result )) {
	<meta name="google-site-verification" content="<?php echo $row['google_webmaster']; ?>" />
	<meta name="msvalidate.01" content="<?php echo $row['bing_webmaster']; ?>" />
	<meta name="alexaVerifyID" content="<?php echo $row['alexa']; ?>" />
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

	  ga('create', '<?php echo $row['google_analytic']; ?>', 'auto');
	  ga('send', 'pageview');

	<meta name="revisit-after" content="<?php echo $row['revisit_after']; ?>">
	<meta name="robots" content="<?php echo $row['robots']; ?>">		
	<!-- include summernote css/js-->
	<link href="" rel="stylesheet">
	<script src=""></script>
	<!-- Google Webfonts -->
	<link href=',300,100,500' rel='stylesheet' type='text/css'>
	<link href=',700' rel='stylesheet' type='text/css'>
	<!-- favicon -->
	<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
	<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
	<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
	<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
	<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
	<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
	<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
	<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
	<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
	<link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
	<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
	<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
	<link rel="manifest" href="favicon/manifest.json">
	<meta name="msapplication-TileColor" content="#ffffff">
	<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
	<meta name="theme-color" content="#ffffff">
	<!-- Animate.css -->
	<link rel="stylesheet" href="theme/css/animate.css">
	<!-- Icomoon Icon Fonts-->
	<link rel="stylesheet" href="theme/css/icomoon.css">
	<!-- Owl Carousel -->
	<link rel="stylesheet" href="theme/css/owl.carousel.min.css">
	<link rel="stylesheet" href="theme/css/owl.theme.default.min.css">
	<!-- Magnific Popup -->
	<link rel="stylesheet" href="theme/css/magnific-popup.css">
	<!-- Theme Style -->
	<link rel="stylesheet" href="theme/css/style.css">
	<!-- Modernizr JS -->
	<script src="theme/js/modernizr-2.6.2.min.js"></script>
	<!-- FOR IE9 below -->
	<!--[if lt IE 9]>
	<script src="theme/js/respond.min.js"></script>
	<!-- CSS -->
	<link rel="stylesheet" href="<?php echo $set->url; ?>/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="<?php echo $set->url; ?>/bootstrap/css/style-front.css">
	<style type="text/css">
		img {border-width: 0}
			* {font-family:'Lucida Grande', sans-serif;}

		.carousel-caption {
			background-color: <?php echo $color_background;?>;
			position: absolute;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 10;
			padding: 0 0 0px 25px;
			color: <?php echo $color;?>;
			text-align: left;
		@media only screen and (max-width: 480px) {
			h3 {
				font-size: 15px;
				margin-bottom: 2px;
			p {
				font-size: 10px;
				margin-bottom: 2px;
		.fh5co-feature .fh5co-feature-icon i{
			color: <?php echo $color_theme;?>;
		#fh5co-clients {
			background: <?php echo $color_theme;?>;
		.color-social {
			color:<?php echo $color_theme;?>;
		a {
			color:<?php echo $link_color;?>;
		body {
			color:<?php echo $body;?>;

	<!-- Javascript -->
	<script src="js/jquery.touchSwipe.min.js"></script>
	<script src="<?php echo $set->url; ?>/js/303ccf41dc.js"></script>
	<link href=',300,700' rel='stylesheet' type='text/css'>


<body onload="changePagination('0','first')">		
<header id="fh5co-header" role="banner">
<nav class="navbar navbar-default" role="navigation">
	<div class="container">
	  <div class="container-fluid">		  
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				<a class="navbar-brand" href="<?php echo $set->url; ?>"><span><img alt="<?php echo $set->site_name; ?>" src="<?php echo $set->logo; ?>" width="25px"></span> <?php echo $set->site_name; ?></a>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav navbar-right">
					$query1 = "SELECT * FROM `".MLS_PREFIX."mainmenu` ORDER BY id ASC";
					$menu = mysqli_query ($conn, $query1);
					//if connect to menu error
					if (!$menu) {
					while($dataMenu = mysqli_fetch_assoc($menu)){
						$menu_id = $dataMenu['id'];
						$query2 = "SELECT * FROM `".MLS_PREFIX."submenu` WHERE mainmenu_id='$menu_id' ORDER BY id ASC";
						$submenu = mysqli_query ($conn, $query2);
						//if connect to submenu error
						if (!$submenu) {
						if(mysqli_num_rows($submenu) == 0){
							echo '<li><a href="'.$dataMenu['menu_link'].'">'.$dataMenu['menu'].'</a></li>';
							echo '
							<li class="dropdown">
								<a href="'.$dataMenu['menu_link'].'" role="button" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle" data-toggle="dropdown">'.$dataMenu['menu'].' <b class="caret"></b></a>
								<ul class="dropdown-menu">';
								while($dataSubmenu = mysqli_fetch_assoc($submenu)){
									echo '<li><a href="'.$dataSubmenu['submenu_link'].'">'.$dataSubmenu['submenu'].'</a></li>';
							echo '
					if($user->islg()) { 
								<li style="background-color:#53B3E1">
								<a href="'.$set->url.'/admin/" style="color:#000">
								<i class="fa fa-tachometer" aria-hidden="true"></i> 
			</div><!--/.nav-collapse -->
<script type="text/javascript">
	$(document).ready(function () {
		var url = window.location;
		$('ul.nav a[href="'+ url +'"]').parent().addClass('active');
		$('ul.nav a').filter(function() {
			 return this.href == url;

if($user->data->banned) {
// we delete the expired banned
$_unban = $db->getAll("SELECT `userid` FROM `".MLS_PREFIX."banned` WHERE `until` < ".time());
    foreach ($_unban as $_usr) {
        $db->query("DELETE FROM `".MLS_PREFIX."banned` WHERE `userid` = ?i", $_usr->userid);
        $db->query("UPDATE `".MLS_PREFIX."users` SET `banned` = '0' WHERE `userid` = ?i", $_usr->userid);             

$_banned = $user->getBan();
$options->error("You were banned by <a href='$set->url/profile.php?u=$_banned->by'>".$user->showName($_banned->by)."</a> for `<i>".$options->html($_banned->reason)."</i>`.
    Your ban will expire in ".$options->tsince($_banned->until, "from now.")."

if($user->islg() && $set->email_validation && ($user->data->validated != 1)) {
    $options->fError("<div style='padding-top:100px'><div class='alert alert-danger' role='alert'>Your account is not yet acctivated ! Please check your email !</div></div>");

if(file_exists('install.php')) {
    $options->fError("<div class='alert alert-danger' role='alert' style='padding-top:100px'>You have to delete the install.php file before you start using this app.</div>");

flush(); // we flush the content so the browser can start the download of css/js


For more information send a message to info at phpclasses dot org.