Content added after PHP "included" files not positioning correctly - php

I'm using PHP's "include" function to display static elements on all my pages, but the end result is not displaying as it should.
index code:
<?php
require '../../views/sidebar.php';
require '../../views/navbar.php';
?>
<div class="card">
<div class="card-header">
Test
</div>
<div class="card-body">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">Home</li>
<li class="breadcrumb-item active" aria-current="page">Library</li>
</ol>
</nav>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
Go somewhere
</div>
</div>
sidebar code:
<nav class="side-navbar">
<div class="side-navbar-wrapper">
<div class="sidenav-header d-flex align-items-center justify-content-center">
<div class="sidenav-header-inner text-center"><img src="../../views/img/logo.jpg" alt="menulogo" class="img-fluid rounded-circle">
<h2 class="h5">Test</h2><span>Dashboard</span>
</div>
<div class="sidenav-header-logo"> <strong>B</strong><strong class="text-primary">D</strong></div>
</div>
<div class="main-menu">
<h5 class="sidenav-heading">Main</h5>
<ul id="side-main-menu" class="side-menu list-unstyled">
<li> <i class="icon-home"></i>Home </li>
<li> <i class="icon-form"></i>Forms </li>
<li> <i class="fa fa-bar-chart"></i>Charts </li>
<li> <i class="icon-grid"></i>Tables </li>
<li> <i class="icon-interface-windows"></i>Example dropdown
<ul id="exampledropdownDropdown" class="collapse list-unstyled ">
<li>Page</li>
<li>Page</li>
<li>Page</li>
</ul>
</li>
<li> <i class="icon-interface-windows"></i>Login page</li>
<li> <a href="#"> <i class="icon-mail"></i>Demo
<div class="badge badge-warning">6 New</div></a></li>
</ul>
</div>
<div class="admin-menu">
<h5 class="sidenav-heading">Second menu</h5>
<ul id="side-admin-menu" class="side-menu list-unstyled">
<li> <i class="icon-screen"> </i>Demo</li>
<li> <a href="#"> <i class="icon-flask"> </i>Demo
<div class="badge badge-info">Special</div></a></li>
<li> <i class="icon-flask"> </i>Demo</li>
<li> <i class="icon-picture"> </i>Demo</li>
</ul>
</div>
</div>
</nav>
this is a snippet from a bootstrapious template I'm using for learning purposes, and the css is both bootstrap and the template's, untouched.

Related

Position of side bar menu to top

I have one web page it includes the the page sidebar.php.This menu appears at the left side of the web page verticaly.I want this to be on the top of the page and display horizantally.I could not identify the class which keeps it on the left side.I am not posting the css file.Kindly help me to keep it on the top.Though my code is length still iam posting it here.I am net very familiar with css .
<aside id="slide-out" class="side-nav white fixed">
<div class="side-nav-wrapper">
<div class="sidebar-profile">
<div class="sidebar-profile-image">
<img src="../assets/images/profile-image.png" class="circle" alt="">
</div>
<div class="sidebar-profile-info">
<p>Admin</p>
</div>
</div>
<ul class="sidebar-menu collapsible collapsible-accordion" data-collapsible="accordion">
<li class="no-padding"><a class="waves-effect waves-grey" href="dashboard.php"><i class="material-icons">settings_input_svideo</i>Dashboard</a></li>
<li class="no-padding">
<a class="collapsible-header waves-effect waves-grey"><i class="material-icons">apps</i>Department<i class="nav-drop-icon material-icons">keyboard_arrow_right</i></a>
<div class="collapsible-body">
<ul>
<li>Add Department</li>
<li>Manage Department</li>
</ul>
</div>
</li>
<li class="no-padding">
<a class="collapsible-header waves-effect waves-grey"><i class="material-icons">account_box</i>Recommending Officer<i class="nav-drop-icon material-icons">keyboard_arrow_right</i></a>
<div class="collapsible-body">
<ul>
<li>Add Recommending Officer</li>
<li>Manage Recommending Officer</li>
</ul>
</div>
</li>
<!-- <li class="no-padding">
<a class="collapsible-header waves-effect waves-grey"><i class="material-icons">desktop_windows</i>Stationary Type<i class="nav-drop-icon material-icons">keyboard_arrow_right</i></a>
<div class="collapsible-body">
<ul>
<li>Add Stationary Type</li>
<li>Manage Stationary Type</li>
</ul>
</div>
</li>-->
<li class="no-padding">
<a class="collapsible-header waves-effect waves-grey"><i class="material-icons">account_box</i>Employees<i class="nav-drop-icon material-icons">keyboard_arrow_right</i></a>
<div class="collapsible-body">
<ul>
<li>Add Employee</li>
<li>Manage Employee</li>
</ul>
</div>
</li>
<li class="no-padding">
<a class="collapsible-header waves-effect waves-grey"><i class="material-icons">desktop_windows</i>Stationary Management<i class="nav-drop-icon material-icons">keyboard_arrow_right</i></a>
<div class="collapsible-body">
<ul>
<li>Add Stationary Stock</li>
<li>All Stationary Request </li>
<li>Pending Request </li>
<li>Approved Request</li>
<li>Not Approved Request</li>
</ul>
</div>
</li>
<li class="no-padding"><a class="waves-effect waves-grey" href="changepassword.php"><i class="material-icons">settings_input_svideo</i>Chnage Password</a></li>
<li class="no-padding">
<a class="waves-effect waves-grey" href="logout.php"><i class="material-icons">exit_to_app</i>Sign Out</a>
</li>
</ul>
<div class="footer">
<p class="copyright">SMS ©</p>
</div>
</div>
</aside>

Select database with laravel 5.5

I am trying to query the database and get user information.
I use the adminlte System but when I run the view it returns a variable error.
HomeController.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* #return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* #return \Illuminate\Http\Response
*/
public function index()
{
$users = DB::select('select * from users');
return view('vendor.adminlte.page', ['users' => $users]);
}
}
Page.blade.php
#extends('adminlte::master')
#section('adminlte_css')
<link rel="stylesheet"
href="{{ asset('vendor/adminlte/dist/css/skins/skin-' . config('adminlte.skin', 'blue') . '.min.css')}} ">
#stack('css')
#yield('css')
#stop
#section('body_class', 'skin-' . config('adminlte.skin', 'blue') . ' sidebar-mini ' . (config('adminlte.layout') ? [
'boxed' => 'layout-boxed',
'fixed' => 'fixed',
'top-nav' => 'layout-top-nav'
][config('adminlte.layout')] : '') . (config('adminlte.collapse_sidebar') ? ' sidebar-collapse ' : ''))
#section('body')
<div class="wrapper">
<div class="wrapper" style="height: auto; min-height: 100%;">
<header class="main-header">
<!-- Logo -->
<a href="/home" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>U</b></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>UNIDAS</b></span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">Você tem 4 mensagens</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Informática
<small><i class="fa fa-clock-o"></i> 5 minutos</small>
</h4>
<p>Está conseguindo concluir?</p>
</a>
</li>
<!-- end message -->
<li>
<a href="#">
<div class="pull-left">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Financeiro
<small><i class="fa fa-clock-o"></i> 2 horas</small>
</h4>
<p>Está conseguindo concluir?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Contabilidade
<small><i class="fa fa-clock-o"></i> Hoje</small>
</h4>
<p>Está conseguindo concluir?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Institucional
<small><i class="fa fa-clock-o"></i> Ontem</small>
</h4>
<p>Está conseguindo concluir?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Gerência
<small><i class="fa fa-clock-o"></i> 2 Dias</small>
</h4>
<p>Está conseguindo concluir?</p>
</a>
</li>
</ul>
</li>
<li class="footer">Ler todas Mensagens</li>
</ul>
</li>
<!-- Notifications: style can be found in dropdown.less -->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">Você tem 10 notificações</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-users text-aqua"></i>Não Imprimir Colorido
</a>
</li>
<li>
<a href="#">
<i class="fa fa-warning text-yellow"></i>Nova Reunião Redir
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users text-red"></i>Aviso Copa
</a>
</li>
<li>
<a href="#">
<i class="fa fa-shopping-cart text-green"></i>Data Congresso Internacional
</a>
</li>
<li>
<a href="#">
<i class="fa fa-user text-red"></i> Banco de Horas
</a>
</li>
</ul>
</li>
<li class="footer">Ver todas Notificações</li>
</ul>
</li>
<!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag-o"></i>
<span class="label label-danger">9</span>
</a>
<ul class="dropdown-menu">
<li class="header">Você tem 9 tarefas</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->
<a href="#">
<h3>
Desenvolver Intranet
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">20% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Desenvolver novo layout
<small class="pull-right">40%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">40% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Desenvolver novo Administrador
<small class="pull-right">60%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">60% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Unificar superitêndencias
<small class="pull-right">80%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">80% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
Ver todas Tarefas
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="images/usuarios/richardnicson.jpg" class="user-image" alt="User Image">
<span class="hidden-xs">Richard Nicson</span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
<p>
Richard Nicson Costa de Lima - Desenvolvedor Web
<small>Membro desde Agosto. 2018</small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
Perfil
</div>
<div class="pull-right">
<a href="#" class="btn btn-default btn-flat" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="fa fa-fw fa-power-off"></i> Sair
</a>
<form id="logout-form" action="http://intranet.unidas.org.br/logout" method="POST" style="display: none;">
<input type="hidden" name="_token" value="jmubQRfJenzcLKmbpvyjeMCVeafWedS5IPC36tmk">
</form>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</header>
#if(config('adminlte.layout') != 'top-nav')
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<img src="images/usuarios/richardnicson.jpg" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p>Richard Nicson</p>
<i class="fa fa-circle text-success"></i> Online
</div>
</div>
<!-- search form -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Pesquisar...">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu tree" data-widget="tree">
#each('adminlte::partials.menu-item', $adminlte->menu(), 'item')
</ul>
</section>
<!-- /.sidebar -->
</aside>
#endif
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" style="min-height: 1265px;">
#if(config('adminlte.layout') == 'top-nav')
<div class="container">
#endif
<!-- Content Header (Page header) -->
<section class="content-header">
#yield('content_header')
</section>
<!-- Main content -->
<section class="content">
#yield('content')
</section>
<!-- /.content -->
#if(config('adminlte.layout') == 'top-nav')
</div>
<!-- /.container -->
#endif
</div>
<!-- /.content-wrapper -->
</div>
<!-- ./wrapper -->
#stop
#section('adminlte_js')
<script src="{{ asset('vendor/adminlte/dist/js/adminlte.min.js') }}"></script>
#stack('js')
#yield('js')
#stop
Error:
ErrorException (E_ERROR) Undefined variable: adminlte (View:
/home/unidas/intranet/resources/views/vendor/adminlte/page.blade.php)

Navbar won't collapse Bootstrap v4.0.0-alpha.5

I'm working on a site with php header & footer in the html version works like a charmin but in the php the navbar don't return.
Here is my code header:
<div class="container">
<div class="row">
<div class="col-sm-3">
<div id="logo" class="float-xs-left">
<a class="navbar-brand" href="xxxxxxx/"><img src="img/logo-white.png" /></a>
</div>
</div>
<!--div class="col-sm-6" -->
<div class="float-xs-right">
<!--/div> -->
<!--cols:12 -->
<!--cols:12 -->
<div class="offcanvas">
<div class="navbar yamm col-lg-8 col-md-8 col-sm-6 ">
<div class="navbar-header">
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target=".offcanvas.menu">
<i class="fa fa-bars"></i>
<div class="line line-1"></div>
<div class="line line-2"></div>
<div class="line line-3"></div>
</button>
</div>
<!-- outside -->
<div class="offcanvas menu right">
<div class="navbar-collapse collapse">
<button data-target=".offcanvas.menu" data-toggle="collapse" class="navbar-toggle" type="button">
</button>
<div class="nav navbar-nav">
<div class="list-group">
<!-- li><span class="home">⌂</span></li -->
<img class="logo-img" src="img/logo-full.png" class="img-responsive" />
INICIO
home <b class="fa fa-chevron-down"></b>
<div class="collapse" id="p5">
<a href="page-1.php" class="list-group-item">
Espresso </a>
<a href="page-2.php" class="list-group-item">
Clásico </a>
<a href="page-3.php" class="list-group-item">
Orgánico </a>
<a href="page-4.php" class="list-group-item">
Descafeinado </a>
<a href="page-5.php" class="list-group-item">
Toscana </a>
</div>
<b class="fa fa-chevron-down"></b>
<div class="collapse" id="p6">
<a href="page-11.php" class="list-group-item">
</a>
</div>
<b class="fa fa-chevron-down"></b>
<div class="collapse" id="p4">
<a href="page-13.php" class="list-group-item">
item </a>
<a href="#c1" class="list-group-item" data-toggle="collapse">
another one<b class="fa fa-chevron-down"></b> <span class="cat_url" onclick="location.href='other.php'"><i class="fa fa-mail-forward"></i></span> </a>
<div class="collapse" id="c1">
name
name
name
name
name
</div>
<a href="#" class="list-group-item">
other page </a>
<a href="#" class="list-group-item">
other page </a>
<a href="#" class="list-group-item">
other page </a>
<a href="page-15.php" class="list-group-item">
other name </a>
<a href="page.php" class="list-group-item">
name </a>
<a href="page.php" class="list-group-item">
name </a>
<a href="#" class="list-group-item">
name </a>
</div>
page title <b class="fa fa-chevron-down"></b>
<div class="collapse" id="p7">
<a href="page-16.php" class="list-group-item">
Name </a>
<a href="page-17.php" class="list-group-item">
name </a>
</div>
page
</div>
<br/>
</div>
</div>
</div>
<!-- /.navbar-collapse -->
</div>
<div class="pusher"></div>
<!-- end outside -->
</div>
</div>
</div>
<!--cols:12 -->
<div class="navbar yamm ">
<div class="navbar-header hidden-lg-up">
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-toggleable-md collapse">
<ul class="nav navbar-nav">
<!-- li><span class="home">⌂</span></li -->
<li class="nav-item ">
<a href="contacto.php" >Contáctanos</a>
</li>
<li class="nav-item ">
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div>
</div>
</div>
</header>
In the console get this error:
document.querySelector( "#nav-toggle" )
.addEventListener( "click", function() {
this.classList.toggle( "active" );
});
Does anybody know what the problem is and how I can fix it?
Solved
The issue was in the footer header and pages calling the same file so when the function is called the state doesn't return because repeat the action 3 times
Finally resolve the issue, there was a triple script sentence in the header, footer and index, was erased in the header and the footer and that's it.

My login code loops me back instead of logging me in

I'm trying to make my system not able to go to my indextemplate.php (main page) without logging in first.
I've learned that $_SESSION is the perfect thing for it. However, I'm having quite a bit of problem with it.
Instead of logging me in, it just loops back to my index1.php (login page) without any error.
Here's my db code for my login page:
<?php
try {
$db = new PDO('mysql:host=localhost;dbname=login', "root", "");
} catch (PDOException $e) {
echo $e->getMessage();
}
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
$sql = "SELECT * FROM `user` WHERE `uid` = :uid AND `pwd` = :pwd";
$statement = $db->prepare($sql);
$userData = [
'uid'=>$uid,
'pwd'=>$pwd,
];
$statement->execute($userData);
if($statement->rowCount() > 0){
$_SESSION['logged'] = true;
header('Location: indextemplate.php');
exit();
}
elseif(empty($uid&$pwd)){
header('Location: index1.php?error=empty1');
exit();
}
elseif ($uid!=$idvariable&$pwd!=$idvarible){
header('Location: index1.php?error=empty2');
exit();
}
?>
and here's the code for my indextemplate (main page):
<?php
session_start();
if(!isset($_SESSION['logged'])){
header('location:index1.php');
}
else
{
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include 'Header.php';
?>
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default top-navbar" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data- toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="Indextemplate.php"><i class="fa fa-comments"></i><strong> JADE HOTEL </strong></a>
</div>
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
<i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-messages">
<li>
<a href="#">
<div>
<strong>John Doe</strong>
<span class="pull-right text-muted">
<em>Today</em>
</span>
</div>
<div>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<strong>John Smith</strong>
<span class="pull-right text-muted">
<em>Yesterday</em>
</span>
</div>
<div>Lorem Ipsum has been the industry's standard dummy text ever since an kwilnw...</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<strong>John Smith</strong>
<span class="pull-right text-muted">
<em>Yesterday</em>
</span>
</div>
<div>Lorem Ipsum has been the industry's standard dummy text ever since the...</div>
</a>
</li>
<li class="divider"></li>
<li>
<a class="text-center" href="#">
<strong>Read All Messages</strong>
<i class="fa fa-angle-right"></i>
</a>
</li>
</ul>
<!-- /.dropdown-messages -->
</li>
<!-- /.dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
<i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-tasks">
<li>
<a href="#">
<div>
<p>
<strong>Task 1</strong>
<span class="pull-right text-muted">60% Complete</span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (success)</span>
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<p>
<strong>Task 2</strong>
<span class="pull-right text-muted">28% Complete</span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="28" aria-valuemin="0" aria-valuemax="100" style="width: 28%">
<span class="sr-only">28% Complete</span>
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<p>
<strong>Task 3</strong>
<span class="pull-right text-muted">60% Complete</span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span>
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<p>
<strong>Task 4</strong>
<span class="pull-right text-muted">85% Complete</span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 85%">
<span class="sr-only">85% Complete (danger)</span>
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a class="text-center" href="#">
<strong>See All Tasks</strong>
<i class="fa fa-angle-right"></i>
</a>
</li>
</ul>
<!-- /.dropdown-tasks -->
</li>
<!-- /.dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
<i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-alerts">
<li>
<a href="#">
<div>
<i class="fa fa-comment fa-fw"></i> New Comment
<span class="pull-right text-muted small">4 min</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<i class="fa fa-twitter fa-fw"></i> 3 New Followers
<span class="pull-right text-muted small">12 min</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<i class="fa fa-envelope fa-fw"></i> Message Sent
<span class="pull-right text-muted small">4 min</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<i class="fa fa-tasks fa-fw"></i> New Task
<span class="pull-right text-muted small">4 min</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<i class="fa fa-upload fa-fw"></i> Server Rebooted
<span class="pull-right text-muted small">4 min</span>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a class="text-center" href="#">
<strong>See All Alerts</strong>
<i class="fa fa-angle-right"></i>
</a>
</li>
</ul>
<!-- /.dropdown-alerts -->
</li>
<!-- /.dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><i class="fa fa-user fa-fw"></i> User Profile
</li>
<li><i class="fa fa-gear fa-fw"></i> Settings
</li>
<li class="divider"></li>
<li><i class="fa fa-sign-out fa-fw"></i> Logout
</li>
</ul>
<!-- /.dropdown-user -->
</li>
<!-- /.dropdown -->
</ul>
</nav>
<!--/. NAV TOP -->
<nav class="navbar-default navbar-side" role="navigation">
<div id="sideNav" href=""><i class="fa fa-caret-right"></i></div>
<div class="sidebar-collapse">
<ul class="nav" id="main-menu">
<li>
<a class="active-menu" href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a>
</li>
<li>
<i class="fa fa-bar-chart-o"></i> Charts
</li>
<li>
<i class="fa fa-table"></i> Database
</li>
<li>
<i class="fa fa-edit"></i> Forms
</li>
<li>
<i class="fa fa-fw fa-file"></i> Empty Page
</li>
</ul>
</div>
</nav>
<!-- /. NAV SIDE -->
<div id="page-wrapper">
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<h1 class="page-header">
Dashboard
</h1>
<ol class="breadcrumb">
<li>Home</li>
<li>Library</li>
<li class="active">Data</li>
</ol>
</div>
</div>
<!-- /. ROW -->
<div class="row">
<div class="col-md-3 col-sm-12 col-xs-12">
<div class="panel panel-primary text-center no-boder bg-color-green green">
<div class="panel-left pull-left green">
<i class="fa fa-bar-chart-o fa-5x"></i>
</div>
<div class="panel-right pull-right">
<h3>8,457</h3>
<strong> Daily Visits</strong>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12 col-xs-12">
<div class="panel panel-primary text-center no-boder bg-color-blue blue">
<div class="panel-left pull-left blue">
<i class="fa fa-shopping-cart fa-5x"></i>
</div>
<div class="panel-right pull-right">
<h3>52,160 </h3>
<strong> Sales</strong>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12 col-xs-12">
<div class="panel panel-primary text-center no-boder bg-color-red red">
<div class="panel-left pull-left red">
<i class="fa fa fa-comments fa-5x"></i>
</div>
<div class="panel-right pull-right">
<h3>15,823 </h3>
<strong> Comments </strong>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12 col-xs-12">
<div class="panel panel-primary text-center no-boder bg-color-brown brown">
<div class="panel-left pull-left brown">
<i class="fa fa-users fa-5x"></i>
</div>
<div class="panel-right pull-right">
<h3>36,752 </h3>
<strong>No. of Visits</strong>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
Line Chart
</div>
<div class="panel-body">
<div id="morris-line-chart"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-md-3">
<div class="panel panel-default">
<div class="panel-body easypiechart-panel">
<h4>Customers</h4>
<div class="easypiechart" id="easypiechart-blue" data-percent="82" ><span class="percent">82%</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel panel-default">
<div class="panel-body easypiechart-panel">
<h4>Sales</h4>
<div class="easypiechart" id="easypiechart-orange" data-percent="55" ><span class="percent">55%</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel panel-default">
<div class="panel-body easypiechart-panel">
<h4>Profits</h4>
<div class="easypiechart" id="easypiechart-teal" data-percent="84" ><span class="percent">84%</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-3">
<div class="panel panel-default">
<div class="panel-body easypiechart-panel">
<h4>No. of Visits</h4>
<div class="easypiechart" id="easypiechart-red" data-percent="46" ><span class="percent">46%</span>
</div>
</div>
</div>
</div>
</div><!--/.row-->
<div class="row">
<div class="col-md-9 col-sm-12 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Bar Chart Example
</div>
<div class="panel-body">
<div id="morris-bar-chart"></div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Donut Chart Example
</div>
<div class="panel-body">
<div id="morris-donut-chart"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
Area Chart
</div>
<div class="panel-body">
<div id="morris-area-chart"></div>
</div>
</div>
</div>
</div>
<!-- /. ROW -->
<div class="row">
<div class="col-md-4 col-sm-12 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Tasks Panel
</div>
<div class="panel-body">
<div class="list-group">
<a href="#" class="list-group-item">
<span class="badge">7 minutes ago</span>
<i class="fa fa-fw fa-comment"></i> Commented on a post
</a>
<a href="#" class="list-group-item">
<span class="badge">16 minutes ago</span>
<i class="fa fa-fw fa-truck"></i> Order 392 shipped
</a>
<a href="#" class="list-group-item">
<span class="badge">36 minutes ago</span>
<i class="fa fa-fw fa-globe"></i> Invoice 653 has paid
</a>
<a href="#" class="list-group-item">
<span class="badge">1 hour ago</span>
<i class="fa fa-fw fa-user"></i> A new user has been added
</a>
<a href="#" class="list-group-item">
<span class="badge">1.23 hour ago</span>
<i class="fa fa-fw fa-user"></i> A new user has added
</a>
<a href="#" class="list-group-item">
<span class="badge">yesterday</span>
<i class="fa fa-fw fa-globe"></i> Saved the world
</a>
</div>
<div class="text-right">
More Tasks <i class="fa fa-arrow-circle-right"></i>
</div>
</div>
</div>
</div>
<div class="col-md-8 col-sm-12 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Responsive Table Example
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table- bordered table-hover">
<thead>
<tr>
<th>S No.</th>
<th>First Name</th>
<th>Last Name</th>
<th>User Name</th>
<th>Email ID.</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John</td>
<td>Doe</td>
<td>John15482</td>
<td>name#site.com</td>
</tr>
<tr>
<td>2</td>
<td>Kimsila</td>
<td>Marriye</td>
<td>Kim1425</td>
<td>name#site.com</td>
</tr>
<tr>
<td>3</td>
<td>Rossye</td>
<td>Nermal</td>
<td>Rossy1245</td>
<td>name#site.com</td>
</tr>
<tr>
<td>4</td>
<td>Richard</td>
<td>Orieal</td>
<td>Rich5685</td>
<td>name#site.com</td>
</tr>
<tr>
<td>5</td>
<td>Jacob</td>
<td>Hielsar</td>
<td>Jac4587</td>
<td>name#site.com</td>
</tr>
<tr>
<td>6</td>
<td>Wrapel</td>
<td>Dere</td>
<td>Wrap4585</td>
<td>name#site.com</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /. ROW -->
<footer></footer>
</div>
<!-- /. PAGE INNER -->
</div>
<!-- /. PAGE WRAPPER -->
</div>
<?php include 'Scripts.php' ?>
</body>
</html>
<?php
}
?>
You need to start session when you are setting session variables.
if($statement->rowCount() > 0){
session_start();
$_SESSION['logged'] = true;
header('Location: indextemplate.php');
exit();
}
This will work.
Explanation : If you will not start session then $_SESSION['logged'] variable won't set itself value as true. So you need to start session before setting session variable. There is other solution like add session_start(); in top of page, but it's not good, because it will start session if user is not valid.
start session at the top of login code page.So that the value can be set to the session.
In your case, the session is not started,so it keeps looping to the same page
session_start();

How to add a another li container after ul container wp_nav_menu wordpress and other html tag?

Please help me custome wp_nav_menu with walker , thanks
<ul class="nav navbar-nav">
<li class="dropdown yamm-fw">PROJECT<b class="caret"></b>
<ul class="dropdown-menu">
<li class="grid-demo">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-4">Introduction</div>
<div class="col-sm-4">Floor Plans A Type</div>
<div class="col-sm-4">Floor Plans B Type</div>
<div class="col-sm-4">Floor Plans C Type</div>
<div class="col-sm-4">Floor Plans D Type</div>
<div class="col-sm-4">Floor Plans E Type</div>
</div>
</div>
</li>
</ul>
</li>
how can i add some container tag after ul tag like <li class="grid-demo">
<div class="row">
<div class="col-sm-5">
<li>LOCATION</li>
<li>FEATURES</li>
<li class="dropdown yamm-fw">PAYMENT<b class="caret"></b>
<ul class="dropdown-menu">
<li class="grid-demo">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-4">Playment T&C</div>
<div class="col-sm-4">Financial Services</div>
</div>
</div>
</li>
</ul>
</li>
<div class="spanLogo">aaa</div>
and how can i add one <div class="spanLogo">aaa</div> here
continue
<li class="dropdown yamm-fw">PUBLICITY<b class="caret"></b>
<ul class="dropdown-menu">
<li class="grid-demo">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-4">News & Events</div>
<div class="col-sm-4">Testimonial</div>
</div>
</div>
</li>
</ul>
</li>
and here > > and how can i add one a tag with image like code above , thanks
<li>CONTACT</li>
<a class="navbar-brand" href="#"><img src="images/logo_paujar_top.jpg"/></a>
</ul>
I would like suggest you should used wp_get_nav_menu_items() function. In this function you can get separately all your menu title and url, So easily you manage your html.
Here is demonstration
<?php $menu_item = wp_get_nav_menu_items($menuId);
foreach($menu_item as $menu):?>
<a class="menu-iterm" href="<?php echo $menu->url;?>">
<?php echo $menu->title;?>
</a>
<?php endforeach;?>
For more information you get here http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items

Categories