Ga naar inhoud

PhP Login systeem wil niet werken.


kunoke

Aanbevolen berichten

Hallo,

 

Ik heb een tijd geleden bij m'n webhosting op het domein mijn.claes.online een login systeem gemaakt. Nu besloot ik een VPS te huren daarop zelf cPanel installeren en zo m'n websites gaan hosten. Alles werkt op het eerste zicht vlekkeloos. Daarna ben ik begonnen met het login systeem op mijn.claes.online te verplaatsen naar mijn.claes-online.com die ook nog op mijn webhosting staat. Dat werkt ook vlekkeloos, toen dacht ik het domein claes.online te gebruiken voor cPanel & WHM en opnieuw het subdomein installeren ook dit werkt vlekkeloos. Maar toen wou ik het hele systeem downloaden + alle mysql databases ook zo in te stellen en alle MYSQL gebruikers aanmaken. Eens dat was gebeurd probeerde ik mijn.claes.online te berijken die nu op m'n eigen server draait. Toen kreeg ik de fout Unknown Collumn " . Nu heb ik die fout weg gekregen maar als ik naar de site "mijn.claes.online" ga wil die niet laden. Ik krijg geen fout meer, ik word niet meer geredirect naar "mijn.claes.online/page-login.php". Volgens mij wilt de session_start() niet meer werken aan het begin van de code om te kijken of ik ingelogd ben. Ik heb ook verschillende PHP versies geprobeerd: 5.6(Die ik ook in m'n webhosting gebruik), 7,0,7,1 maar ik krijg het niet opgelost.

Kan iemand bij helpen?
Alvast Bedankt,

Met Vriendelijke Groet,

Kuno Claes

 

P.S: Hier heeft u nog de code's van de login van de database en de index page van mijn.claes.online:

Connection.php:

<?php
$DBi = mysqli_connect("localhost", "die zie je niet","die zie je niet", "die zie je niet");

?>
<?php
/* Database connection settings */
$host = 'localhost';
$user = 'die zie je niet';
$pass = 'die zie je niet';
$db = 'die zie je niet';
$mysqli = new mysqli($host,$user,$pass,$db) or die($mysqli->error);
Werkt enkel als je ingelogd bent.
Variables.php:
<?php



//Aantal sites van de persoon, Voor Dashboard nummer en balk!


//Aantal domeinen opvragen van de ingelogde gebruiker (Mysql database: claesonl_clients , tabel: users, Domeinen)
$q_myQuerydomeinen = "SELECT Domeinen FROM users WHERE id LIKE '$id'";
$rsmyQuerydomeinen = mysqli_query($DBi, $q_myQuerydomeinen) or die(mysqli_error($DBi));
$row_rsmyQuerydomeinen = mysqli_fetch_assoc($rsmyQuerydomeinen);

$domeinen = $row_rsmyQuerydomeinen['Domeinen'];
//Aantal sites opvragen van de ingelogde gebruiker (Mysql database: claesonl_clients , tabel: users, sites)
$q_myQuerysites = "SELECT sites FROM users WHERE id LIKE '$id'";
$rsmyQuerysites = mysqli_query($DBi, $q_myQuerysites) or die(mysqli_error($DBi));
$row_rsmyQuerysites = mysqli_fetch_assoc($rsmyQuerysites);

$sites = $row_rsmyQuerysites['sites'];

//Bezoekers van de laatste week.
$q_myQuerylwbezoekers = "SELECT lwbezoekers FROM `$id` WHERE Site LIKE '$nowsite'";
$rsmyQuerylwbezoekers = mysqli_query($DBi, $q_myQuerylwbezoekers) or die(mysqli_error($DBi));
$row_rsmyQuerylwbezoekers = mysqli_fetch_assoc($rsmyQuerylwbezoekers);

$lwbezoekers = $row_rsmyQuerylwbezoekers['lwbezoekers'];


//Post opvragen voor menu
$q_myQuerypostsmenu = "SELECT posts FROM `$id` WHERE Site LIKE '$nowsite'";
$rsmyQuerypostsmenu = mysqli_query($DBi, $q_myQuerypostsmenu) or die(mysqli_error($DBi));
$row_rsmyQuerypostsmenu = mysqli_fetch_assoc($rsmyQuerypostsmenu);

$posts = $row_rsmyQuerypostsmenu['posts'];

//Forms opvragen voor menu
$q_myQueryformsmenu = "SELECT forms FROM `$id` WHERE Site LIKE '$nowsite'";
$rsmyQueryformsmenu = mysqli_query($DBi, $q_myQueryformsmenu) or die(mysqli_error($DBi));
$row_rsmyQueryformsmenu = mysqli_fetch_assoc($rsmyQueryformsmenu);

$formsmenu = $row_rsmyQueryformsmenu['forms'];

//Pagina's van de gebruiker's site opvragen voor een functie (BEWEREKEN, VERWIJDEREN, "LATER TOEVOEGEN")
$q_myQuerypagesmenu = "SELECT pages FROM `$id` WHERE Site LIKE '$nowsite'";
$rsmyQuerypagesmenu = mysqli_query($DBi, $q_myQuerypagesmenu) or die(mysqli_error($DBi));
$row_rsmyQuerypagesmenu = mysqli_fetch_assoc($rsmyQuerypagesmenu);

$pagesmenu = $row_rsmyQuerypagesmenu['pages'];


//Pagina's van de gebruiker's site opvragen voor een functie (BEWEREKEN, VERWIJDEREN, "LATER TOEVOEGEN")
$q_myQuerygallerysmenu = "SELECT gallerys FROM `$id` WHERE Site LIKE '$nowsite'";
$rsmyQuerygallerysmenu = mysqli_query($DBi, $q_myQuerygallerysmenu) or die(mysqli_error($DBi));
$row_rsmyQuerygallerysmenu = mysqli_fetch_assoc($rsmyQuerygallerysmenu);

$gallerysmenu = $row_rsmyQuerygallerysmenu['gallerys'];




?>



<!doctype html>
<html lang="en">
    <div id="home">
	<head>
	    <script src="//code.jquery.com/jquery-3.3.1.js"></script>
	    
	    		<script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script type="text/javascript">
    setInterval("my_function();",500); 
    function my_function(){
      $('#refresh').load(location.href + ' #lwbezoekers');
      $('#refresh1').load(location.href + ' #php');
    }
  </script>
  <div id="refresh1">
      <div id="php">
  
  <?php



/* Displays user information and some useful messages */
session_start();
$id = $_SESSION['id'];
include('php/connection.php');

$q_myQueryactive = "SELECT active FROM users WHERE id LIKE '$id'";
$rsmyQueryactive = mysqli_query($DBi, $q_myQueryactive) or die(mysqli_error($DBi));
$row_rsmyQueryactive = mysqli_fetch_assoc($rsmyQueryactive);

$thisactive = $row_rsmyQueryactive['active'];

// Check if user is logged in using the session variable
if ( $_SESSION['logged_in'] != 1 ) {
  $_SESSION['message'] = "You must log in before viewing your profile page!";
  header("location: page-login.php");    
}
else if ( $row_rsmyQueryactive['active'] != 1 ){
  $_SESSION['message'] = "Uw profiel is niet geactiveerd! Klik eerst op de link die u per mail is verzonden!";
  header("location: event.php");  
}
else {
    // Makes it easier to read
    $first_name = $_SESSION['first_name'];
    $last_name = $_SESSION['last_name'];
    $email = $_SESSION['email'];
    $active = $_SESSION['active'];
    
}
$nowsite = $_GET["site"];
include "php/variables.php";








?>
</div>
</div>
	    
		<title>Dashboard | Claes Online</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<!-- VENDOR CSS -->
		<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="assets/vendor/themify-icons/css/themify-icons.css">
		<link rel="stylesheet" href="assets/vendor/pace/themes/orange/pace-theme-minimal.css">
		<link rel="stylesheet" href="assets/css/vendor/animate/animate.min.css">
		<link rel="stylesheet" href="assets/vendor/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css">
		<link rel="stylesheet" href="assets/vendor/x-editable/bootstrap3-editable/css/bootstrap-editable.css">
		<link rel="stylesheet" href="assets/vendor/bootstrap-tour/css/bootstrap-tour.min.css">
		<link rel="stylesheet" href="assets/vendor/jqvmap/jqvmap.min.css">
		<!-- MAIN CSS -->
		<link rel="stylesheet" href="assets/css/main.css">
		<link rel="stylesheet" href="assets/css/skins/sidebar-nav-darkgray.css" type="text/css">
		<link rel="stylesheet" href="assets/css/skins/navbar3.css" type="text/css">

		<!-- ICONS -->
		<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
		<link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon.png">
<script src="//cdn.jsdelivr.net/npm/sweetalert2"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/sweetalert2@7.25.0/dist/sweetalert2.min.css">
<link rel="stylesheet" href="//sweetalert2.github.io/styles/bootstrap4-buttons.css">
<script src="//cdn.jsdelivr.net/npm/promise-polyfill"></script>


	</head>
	<body>
		<!-- WRAPPER -->
		
		<div id="wrapper">
			<!-- NAVBAR -->
			<nav class="navbar navbar-default navbar-fixed-top">
				<div class="brand">
					<a href="index.html">
						<img src="//cdn.claes.online/986292274_5f84a62c-8082-4efd-9ae1-9c29a8322ee8.png" alt="" class="img-responsive logo">
					</a>
				</div>
				<div class="container-fluid">
					<div id="tour-fullwidth" class="navbar-btn">
						<button type="button" class="btn-toggle-fullwidth"><i class="ti-arrow-circle-left"></i></button>
					</div>

					<div id="navbar-menu">
						<ul class="nav navbar-nav navbar-right">
							<li>
								<a href="#" class="btn-toggle-rightsidebar">
									<i class="ti-layout-sidebar-right"></i>
								</a>
							</li>
							<li class="dropdown">
								<a href="#" class="dropdown-toggle icon-menu" data-toggle="dropdown">
									<i class="ti-bell"></i>
									<span class="badge bg-danger">1</span>

								</a>
								<ul class="dropdown-menu notifications">
									<li>U heeft 1 nieuwe melding!</li>



									<li>
										<a href="#" class="notification-item">
											<i class="fa fa-bullhorn custom-bg-purple"></i>
											<p>
												<span class="text">Info: Ons controlepaneel is nog in bèta, houd er alstublieft rekening mee dat nog niet alle<br> functies zullen werken. Indien u toch grote fouten opmerkt kan u contact met ons<br> opnemen via reports@claes.online!</span>
												<span class="timestamp">2 hours ago</span>
											</p>
										</a>
									</li>
									
								</ul>
							</li>
							<li class="dropdown">
								<a href="#" id="tour-help" class="dropdown-toggle" data-toggle="dropdown"><i class="ti-help"></i> <span class="hide">Help</span></a>
								<ul class="dropdown-menu">
									<li><a href="#"><i class="ti-direction"></i> Basic Use</a></li>
									<li><a href="#"><i class="ti-server"></i> Working With Data</a></li>
									<li><a href="#"><i class="ti-lock"></i> Security</a></li>
									<li><a href="#"><i class="ti-light-bulb"></i> Troubleshooting</a></li>
								</ul>
							</li>
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">
									<img src="assets/img/user.png" alt="Avatar">
									<span><?php echo $first_name ?> <?php echo $last_name ?></span>
								</a>
								<ul class="dropdown-menu logged-user-menu">
									<li><a href="profile.php"><i class="ti-user"></i> <span>Mijn Profiel</span></a></li>
									<li onclick="" id="test" onclick="" style="cursor: pointer;"><a onclick="sweet();"><i class="ti-power-off"></i> <span>Uitloggen</span></a></li>
									<script>
function sweet(){
const swalWithBootstrapButtons = swal.mixin({
  confirmButtonClass: 'btn btn-success',
  cancelButtonClass: 'btn btn-danger',
  buttonsStyling: false,
})

const swalWithBootstrapButtons1 = swal.mixin({
  confirmButtonClass: 'btn btn-success',
  cancelButtonClass: 'btn btn-danger',
  buttonsStyling: false,
   onClose: () => {
    window.location.href = "https://mijn.claes.online/";
  }
})

swalWithBootstrapButtons({
  title: 'Weet u zeker dat u wilt uitloggen?',
  type: 'warning',
  showCancelButton: true,
  confirmButtonText: 'Ja!',
  cancelButtonText: 'Nee breng me terug!',
  reverseButtons: false
}).then((result) => {
  if (result.value) {
      $.ajax({
  url: 'logout.php',
  success: function(data) {
    $('.result').html(data);
  }
});
    swalWithBootstrapButtons1(
      'U bent successvol uitgelogd!',
      'Hopelijk zien we u de volgende keer!.',
      'success'
      
      
    )
   
  } else if (
    // Read more about handling dismissals
    result.dismiss === swal.DismissReason.cancel
  ) {
    swalWithBootstrapButtons(
      'Cancelled',
      'Your imaginary file is safe :)',
      'error'
    )
  }
})

}




</script>
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</nav>
			<!-- END NAVBAR -->
			<!-- LEFT SIDEBAR -->
			<div id="sidebar-nav" class="sidebar">
				<nav>
					<ul class="nav" id="sidebar-nav-menu">
						<li class="menu-group">Functies</li>
                            <li><a href="index.php?site=<?php echo $nowsite ?> " class="active"><i class="ti-dashboard"></i> <span class="title">Dashboard</span></a></li>

						<li class="panel">
							<a href="#posts" data-toggle="collapse" data-parent="#sidebar-nav-menu" class="collapsed"><i class="ti-pin-alt"></i> <span class="title">Berichten</span> <i class="icon-submenu ti-angle-left"></i></a>
							<div id="posts" class="collapse">
								<ul class="submenu">
									<?php eval('?>'.$posts.'<?');  ?>
								</ul>
							</div>
						</li>


						
						
						<li class="panel">
							<a href="#pages" data-toggle="collapse" data-parent="#sidebar-nav-menu" class="collapsed" aria-expanded="false"><i class="ti-notepad"></i> <span class="title">Mijn Pagina's</span> <i class="icon-submenu ti-angle-left"></i></a>
							<div id="pages" class="collapse">
								<ul class="submenu">
									 <?php eval('?>'.$pagesmenu.'<?');  ?>
									 
								</ul>
							</div>
						</li>
						
						<li class="panel">
							<a href="#forms" data-toggle="collapse" data-parent="#sidebar-nav-menu" class="collapsed"><i class="ti-receipt"></i> <span class="title">Forms</span> <i class="icon-submenu ti-angle-left"></i></a>
							<div id="forms" class="collapse">
								<ul class="submenu">
									 <?php eval('?>'.$formsmenu.'<?');  ?>
								</ul>
							</div>
						</li>
						
						
						
						
						
												
						<li class="panel">
							<a href="#gallerys" data-toggle="collapse" data-parent="#sidebar-nav-menu" class="collapsed" aria-expanded="false"><i class="ti-camera"></i> <span class="title">Mijn Gallerijen</span> <i class="icon-submenu ti-angle-left"></i></a>
							<div id="gallerys" class="collapse">
								<ul class="submenu">
									 <?php eval('?>'.$gallerysmenu.'<?');  ?>
									 
								</ul>
							</div>
						</li>
						
						

						


					</ul>
					<button type="button" class="btn-toggle-minified" title="Toggle Minified Menu"><i class="ti-arrows-horizontal"></i></button>
				</nav>
			</div>
			<!-- END LEFT SIDEBAR -->
			<!-- MAIN -->
			<div class="main">
				<!-- MAIN CONTENT -->
				<div class="main-content">
					<div class="content-heading clearfix">
						<div class="heading-left">
							<h1 class="page-title">Welkom bij Claes Online</h1>
							<p class="page-subtitle">De specialist in websites op maat!</p>
						</div>
						<ul class="breadcrumb">
							<li><a href="#"><i class="fa fa-home"></i> Home</a></li>
							<li><a href="#">Functies</a></li>
							<li class="active">Dashboard</li>
						</ul>
					</div>
					<div class="container-fluid">
						<!-- TOP METRICS -->
						<div class="row">
							<div class="col-md-4 col-sm-8">
								<div class="widget widget-metric_1 animate">
									<span class="icon-wrapper custom-bg-blue2"><i class="fa ti-direction-alt"></i></span>
									<div class="right">
										<span class="value"><?php echo "$domeinen"; ?><i class="change-icon change-up fa  text-indicator-green"></i></span>
										<span class="title">Domeinen
											
										</span>
									</div>
								</div>
							</div>
							<div class="col-md-4 col-sm-8">
								<div class="widget widget-metric_1 animate">
									<span class="icon-wrapper custom-bg-lightseagreen"><i class="fa ti-layout"></i></span>
									<div class="right">
										<span class="value"><?php echo "$sites"; ?><i class="change-icon change-up fa  text-indicator-green"></i></span>
										<span class="title">Sites
											
										</span>
									</div>
								</div>
							</div>
							<div class="col-md-4 col-sm-8">
								<div class="widget widget-metric_1 animate">
									<span class="icon-wrapper custom-bg-blue2"><i class="fa fa-user"></i></span>
									<div id="refresh">
									<div id="lwbezoekers">
									<div class="right">
										<span class="value"><?php echo $lwbezoekers ?></i></span>
										<span class="title">Bezoekers de laatste week!
											<span class="change text-indicator-red"></span>
										</span>
									</div>
									</div>
								</div>
							</div>
							</div>
							<?php
							
							
							//<div class="col-md-3 col-sm-6">
								//<div class="widget widget-metric_1 animate">
									//<span class="icon-wrapper custom-bg-purple"><i class="fa fa-envelope"></i></span>
									//<div class="right">
										//<span class="value">56.72% <i class="change-icon change-up fa fa-sort-up text-indicator-green"></i></span>
									//	<span class="title">CLICK
										//	<span class="change text-indicator-green">(+ 12.64%)</span>
										//</span>
									//</div>
								//</div>
							//</div>
						//</div>
							
							?>
						
						<!-- END TOP METRICS -->

								
						
						
							
						
						
								<!-- END PROFILE COMPLETENESS METER -->
							
							
						<!-- END MINI BAR CHARTS -->
						
				<!-- END MAIN CONTENT -->
				<!-- RIGHT SIDEBAR -->
				<div id="sidebar-right" class="right-sidebar">
					<div class="sidebar-widget">
						<h4 class="widget-heading"><i class="fa fa-calendar"></i> TODAY</h4>
						<p class="date">Wednesday, 22 December</p>
						<div class="row margin-top-30">
							<div class="col-xs-4">
								<a href="#">
									<div class="icon-transparent-area custom-color-blue first">
										<i class="fa fa-tasks"></i>
										<span>Tasks</span>
										<span class="badge">5</span>
									</div>
								</a>
							</div>
							<div class="col-xs-4">
								<a href="#">
									<div class="icon-transparent-area custom-color-green">
										<i class="fa fa-envelope"></i>
										<span>Mail</span>
										<span class="badge">12</span>
									</div>
								</a>
							</div>
							<div class="col-xs-4">
								<a href="#">
									<div class="icon-transparent-area custom-color-orange last">
										<i class="fa fa-user-plus"></i>
										<span>Users</span>
										<span class="badge">24</span>
									</div>
								</a>
							</div>
						</div>
					</div>
					<div class="sidebar-widget">
						<div class="widget-header">
							<h4 class="widget-heading">YOUR APPS</h4>
							<a href="#" class="show-all">Show all</a>
						</div>
						<div class="row">
							<div class="col-xs-3">
								<a href="#" class="icon-app" title="Dropbox" data-toggle="tooltip" data-placement="top">
									<i class="fa fa-dropbox dropbox-color"></i>
								</a>
							</div>
							<div class="col-xs-3">
								<a href="#" class="icon-app" title="WordPress" data-toggle="tooltip" data-placement="top">
									<i class="fa fa-wordpress wordpress-color"></i>
								</a>
							</div>
							<div class="col-xs-3">
								<a href="#" class="icon-app" title="Drupal" data-toggle="tooltip" data-placement="top">
									<i class="fa fa-drupal drupal-color"></i>
								</a>
							</div>
							<div class="col-xs-3">
								<a href="#" class="icon-app" title="Github" data-toggle="tooltip" data-placement="top">
									<i class="fa fa-github github-color"></i>
								</a>
							</div>
						</div>
					</div>
					<div class="sidebar-widget">
						<div class="widget-header">
							<h4 class="widget-heading">MY PROJECTS</h4>
							<a href="#" class="show-all">Show all</a>
						</div>
						<ul class="list-unstyled list-project-progress">
							<li>
								<a href="#" class="project-name">Project XY</a>
								<div class="progress progress-xs progress-transparent custom-color-orange">
									<div class="progress-bar" role="progressbar" aria-valuenow="67" aria-valuemin="0" aria-valuemax="100" style="width:67%"></div>
								</div>
								<span class="percentage">67%</span>
							</li>
							<li>
								<a href="#" class="project-name">Growth Campaign</a>
								<div class="progress progress-xs progress-transparent custom-color-blue">
									<div class="progress-bar" role="progressbar" aria-valuenow="23" aria-valuemin="0" aria-valuemax="100" style="width:23%"></div>
								</div>
								<span class="percentage">23%</span>
							</li>
							<li>
								<a href="#" class="project-name">Website Redesign</a>
								<div class="progress progress-xs progress-transparent custom-color-green">
									<div class="progress-bar" role="progressbar" aria-valuenow="87" aria-valuemin="0" aria-valuemax="100" style="width:87%"></div>
								</div>
								<span class="percentage">87%</span>
							</li>
						</ul>
					</div>
					<div class="sidebar-widget">
						<div class="widget-header">
							<h4 class="widget-heading">MY FILES</h4>
							<a href="#" class="show-all">Show all</a>
						</div>
						<ul class="list-unstyled list-justify list-file-simple">
							<li><a href="#"><i class="fa fa-file-word-o"></i>Proposal_draft.docx</a>
								<span>4 MB</span>
							</li>
							<li><a href="#"><i class="fa fa-file-pdf-o"></i>Manual_Guide.pdf</a>
								<span>20 MB</span>
							</li>
							<li><a href="#"><i class="fa fa-file-zip-o"></i>all-project-files.zip</a>
								<span>315 MB</span>
							</li>
							<li><a href="#"><i class="fa fa-file-excel-o"></i>budget_estimate.xls</a>
								<span>1 MB</span>
							</li>
						</ul>
					</div>
					<p class="text-center"><a href="#" class="btn btn-default btn-xs">More Widgets</a></p>
				</div>
				<!-- END RIGHT SIDEBAR -->
			</div>
			<!-- END MAIN -->
			<div class="clearfix"></div>
			<footer>
				<div class="container-fluid">
					<p class="copyright">&copy; 2018 <a href="https://claes.online/" target="_blank">Claes Online</a></p>
				</div>
			</footer>
		</div>
		<!-- END WRAPPER -->
		<!-- Javascript -->

		<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
		<script src="assets/vendor/pace/pace.min.js"></script>
		<script src="assets/vendor/bootstrap-progressbar/js/bootstrap-progressbar.min.js"></script>
		<script src="assets/vendor/Flot/jquery.flot.js"></script>
		<script src="assets/vendor/Flot/jquery.flot.resize.js"></script>
		<script src="assets/vendor/Flot/jquery.flot.time.js"></script>
		<script src="assets/vendor/flot.tooltip/jquery.flot.tooltip.js"></script>
		<script src="assets/vendor/x-editable/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
		<script src="assets/vendor/jquery.maskedinput/jquery.maskedinput.min.js"></script>
		<script src="assets/vendor/moment/min/moment.min.js"></script>
		<script src="assets/vendor/jquery-sparkline/js/jquery.sparkline.min.js"></script>
		<script src="assets/vendor/bootstrap-tour/js/bootstrap-tour.min.js"></script>
		<script src="assets/vendor/jquery-ui/ui/widget.js"></script>
		<script src="assets/vendor/jquery-ui/ui/data.js"></script>
		<script src="assets/vendor/jquery-ui/ui/scroll-parent.js"></script>
		<script src="assets/vendor/jquery-ui/ui/disable-selection.js"></script>
		<script src="assets/vendor/jquery-ui/ui/widgets/mouse.js"></script>
		<script src="assets/vendor/jquery-ui/ui/widgets/sortable.js"></script>
		<script src="assets/vendor/datatables/js-main/jquery.dataTables.min.js"></script>
		<script src="assets/vendor/datatables/js-bootstrap/dataTables.bootstrap.min.js"></script>
		<script src="assets/vendor/jquery-appear/jquery.appear.min.js"></script>
		<script src="assets/vendor/jqvmap/jquery.vmap.min.js"></script>
		<script src="assets/vendor/jqvmap/maps/jquery.vmap.world.js"></script>
		<script src="assets/vendor/jqvmap/maps/jquery.vmap.usa.js"></script>
		<script src="assets/vendor/chart-js/Chart.min.js"></script>
		<script src="assets/vendor/raphael/raphael.min.js"></script>
		<script src="assets/vendor/justgage-toorshia/justgage.js"></script>
		<script src="assets/scripts/klorofilpro-common.js"></script>
	
		<script>
		$(function()
		{
			// sales statistic chart
			var plot, sales, earnings;
			sales = [
				[gt(2013, 1, 1), 54],
				[gt(2013, 2, 1), 75],
				[gt(2013, 3, 1), 66],
				[gt(2013, 4, 1), 80],
				[gt(2013, 5, 1), 75],
				[gt(2013, 6, 1), 85],
				[gt(2013, 7, 1), 90]
			];
			earnings = [
				[gt(2013, 1, 1), 200],
				[gt(2013, 2, 1), 600],
				[gt(2013, 3, 1), 360],
				[gt(2013, 4, 1), 550],
				[gt(2013, 5, 1), 300],
				[gt(2013, 6, 1), 800],
				[gt(2013, 7, 1), 900]
			];
			plot = $.plot($('#sales-stat'),
				// data
				[
				{
					data: sales,
					label: "Sales"
				},
				{
					data: earnings,
					label: "Earnings",
					yaxis: 2
				}],
				// options
				{
					series:
					{
						lines:
						{
							show: true,
							lineWidth: 2,
							fill: false
						},
						points:
						{
							show: true,
							lineWidth: 1,
							fill: true,
							fillColor: "#fff"
						},
						shadowSize: 0
					},
					grid:
					{
						hoverable: true,
						clickable: true,
						borderWidth: 0,
						tickColor: "#EFF1F5",
					},
					colors: ["#45AEEF", "#F89B03"],
					xaxis:
					{
						mode: "time",
						timezone: "browser",
						minTickSize: [1, "day"],
						timeformat: "%a",
						font:
						{
							color: "#a0aeba"
						},
						tickColor: "transparent",
						autoscaleMargin: 0.02
					},
					yaxis:
					{
						font:
						{
							color: "#a0aeba"
						},
					},
					yaxes: [
					{},
					{
						position: "right",
						tickFormatter: function(val, axis)
						{
							return '$' + val;
						}
					}],
					legend:
					{
						show: false
					},
					tooltip:
					{
						show: true,
						cssClass: 'flotTip-black',
						content: '%s: %y'
					}
				}
			);
			// get day function
			function gt(y, m, d)
			{
				return new Date(y, m - 1, d).getTime();
			}
			// profile completeness meter
			var cPbar = $('.completeness-progress');
			cPbar.progressbar(
			{
				display_text: 'fill',
				update: function(current_percentage)
				{
					if (current_percentage == 100)
					{
						$('.complete-info').addClass('text-success').html('<i class="fa fa-check-circle"></i> Hooray, it\'s done!');
						cPbar.removeClass('progress-bar-info').addClass('progress-bar-success');
						$('.completeness-meter .editable').editable('disable');
					}
				}
			});
			$.fn.editable.defaults.mode = 'inline';
			$('#complete-phone-number').on('shown', function(e, editable)
			{
				editable.input.$input.mask('(999) 999-9999');
			}).on('hidden', function(e, reason)
			{
				if (reason == 'save')
				{
					$(this).parent().prepend('Phone: ');
					updateProfileMeter($(this), cPbar, 10);
				}
			});
			$('#complete-sex').on('hidden', function(e, reason)
			{
				if (reason == 'save')
				{
					$(this).parent().prepend('Sex: ');
					updateProfileMeter($(this), cPbar, 10);
				}
			});
			$('#complete-birthdate').on('hidden', function(e, reason)
			{
				if (reason == 'save')
				{
					$(this).parent().prepend('Birthdate: ');
					updateProfileMeter($(this), cPbar, 10);
				}
			});
			$('#complete-nickname').on('shown', function(e, editable)
			{
				editable.input.$input.val('');
			}).on('hidden', function(e, reason)
			{
				if (reason == 'save')
				{
					$(this).parent().prepend('Nickname: ');
					updateProfileMeter($(this), cPbar, 10);
				}
			});
			$('.completeness-meter #complete-phone-number').editable();
			$('#complete-sex').editable(
			{
				source: [
				{
					value: 1,
					text: 'Male'
				},
				{
					value: 2,
					text: 'Female'
				}]
			});
			$('#complete-birthdate').editable();
			$('#complete-nickname').editable();
			function updateProfileMeter(el, pbar, valueAdded)
			{
				// update progress bar
				pbar.attr('data-transitiongoal', parseInt(pbar.attr('data-transitiongoal')) + valueAdded).progressbar();
				// update element
				$(el).parent().find('i').removeClass('fa-circle-o').addClass('fa-check-circle');
				$(el).parent().addClass('done');
			}
			// mini bar charts
			$('#mini-bar-chart1').sparkline('html',
			{
				type: 'bar',
				barWidth: 8,
				height: 45,
				barColor: '#00B9EB',
				chartRangeMin: 0,
				chartRangeMax: 100
			});
			$('#mini-bar-chart2').sparkline('html',
			{
				type: 'bar',
				barWidth: 8,
				height: 45,
				barColor: '#EB9700',
				chartRangeMin: 0,
				chartRangeMax: 100
			});
			$('#mini-bar-chart3').sparkline('html',
			{
				type: 'bar',
				barWidth: 8,
				height: 45,
				barColor: '#72BB23',
				chartRangeMin: 0,
				chartRangeMax: 100
			});
			$('#mini-bar-chart4').sparkline('html',
			{
				type: 'bar',
				barWidth: 8,
				height: 45,
				barColor: '#FB5021',
				chartRangeMin: 0,
				chartRangeMax: 100
			});

			// live chat support
			$('.table-chat-support').dataTable(
			{
				scrollX: false,
				scrollY: "300px",
				ordering: false,
				searching: false,
				info: false,
				scrollCollapse: true,
				paging: false,
			});
			$('.table-chat-support .page-tooltip').tooltip(
			{
				placement: 'bottom',
			});
			$('[data-toggle="popover"]').popover(
			{
				trigger: 'hover',
				container: 'body',
				html: true,
				content: function()
				{
					var visitorContent, visitorImgPath;
					var visitorName = 'Guest';
					if ($(this).attr('data-visitor-img') === undefined)
					{
						visitorContent = '<i class="fa fa-user picture guest-avatar"></i>';
					}
					else
					{
						visitorName = $(this).attr('data-visitor-name');
						visitorImgPath = $(this).attr('data-visitor-img');
						visitorContent = '<img src="' + visitorImgPath + '" class="picture img-circle">';
					}
					console.log($(this).attr('data-visitor'));
					return '<div class="online-visitor-data">' + '<div class="left">' + visitorContent + '<a href="#">Details</a>' + '</div>' + '<div class="right">' + '<div class="data">' + '<span class="label-data">Name :</span>' + '<span>' + visitorName + '</span>' + '</div>' + '<div class="data">' + '<span class="label-data">IP :</span>' + '<span><a href="#">123.111.101.76</a></span>' + '</div>' + '<div class="data">' + '<span class="label-data">Type :</span>' + '<span>Returning</span>' + '</div>' + '</div>' + '</div>';
				}
			});
			var runProgressShareOnce = false;
			$('#progress-share').bind('appear', function()
			{
				if (runProgressShareOnce) return false;
				$(this).each(function()
				{
					var $bar = $(this).find(".bar");
					var $val = $(this).find(".value");
					var perc = parseInt($val.text(), 10);
					var scale = 180 / parseInt($(this).attr('data-max'));
					$(
					{
						p: 0
					}).animate(
					{
						p: perc
					},
					{
						duration: 3000,
						easing: "swing",
						step: function(p)
						{
							$bar.css(
							{
								transform: "rotate(" + (45 + (p * scale)) + "deg)",
							});
							$val.text(p | 0);
						}
					});
				});
				runProgressShareOnce = true;
			});
			var mapData = {
				"us": "2936",
				"dz": "2812",
				"ru": "2735",
				"fr": "2674",
				"mx": "2584",
				"de": "1986",
				"br": "1921",
				"ca": "1865",
				"id": "1352",
				"cn": "1322"
			}
			$('#map-email-opens').vectorMap(
			{
				map: 'world_en',
				backgroundColor: 'transparent',
				color: '#f2f4f6',
				borderColor: '#D1D4D7',
				borderOpacity: 0.5,
				values: mapData,
				scaleColors: ["#E7F5FF", "#9AA9B4"],
				normalizeFunction: 'polynomial'
			});
			$('#sales-performance').sparkline('html',
			{
				width: '70%',
				height: '40px',
				lineWidth: '2',
				lineColor: '#00aaff',
				fillColor: false,
				spotRadius: '2',
				highlightLineColor: '#aedaff',
				highlightSpotColor: '#71aadb',
				spotColor: false,
				minSpotColor: false,
				maxSpotColor: false,
				disableInteraction: false
			});
			// US customer locations
			var usMapData = {
				"al": "2936",
				"ca": "2812",
				"fl": "2735",
				"ga": "2674",
				"il": "2584",
				"ma": "1986",
				"nv": "1921",
				"ny": "1865",
				"ok": "1352",
				"tx": "1322"
			}
			$('#us-customers-map').vectorMap(
			{
				map: 'usa_en',
				backgroundColor: '#FAFBFC',
				color: '#f2f4f6',
				borderColor: '#D1D4D7',
				borderOpacity: 0.7,
				values: usMapData,
				scaleColors: ["#4671E0", "#5AA6F0"],
				normalizeFunction: 'polynomial'
			});
			// age bar chart
			Chart.defaults.global.defaultFontSize = 11;
			var ctxAgeBarChart = document.getElementById("age-chart").getContext("2d");
			var ageBarChart = new Chart(ctxAgeBarChart,
			{
				type: 'horizontalBar',
				data:
				{
					labels: ['18-22', '23-27', '28-32', '33-37', '38-42', '> 42'],
					datasets: [
					{
						data: [400, 800, 500, 450, 300, 250],
						backgroundColor: 'rgba(245,165,35,0.5)',
					}]
				},
				options:
				{
					responsive: true,
					legend:
					{
						display: false
					},
					scales:
					{
						xAxes: [
						{
							display: false,
							ticks:
							{
								min: 0,
								max: 1000,
							}
						}],
						yAxes: [
						{
							gridLines:
							{
								display: false,
								drawBorder: false
							}
						}]
					}
				}
			});
			// gauge chart
			var activityGauge = new JustGage(
			{
				id: "gauge",
				value: getRandomInt(0, 100),
				valueFontColor: '#5E6773',
				valueFontFamily: 'Roboto, sans-serif',
				valueMinFontSize: 28,
				symbol: '%',
				min: 0,
				max: 100,
				minTxt: '0%',
				maxTxt: '100%',
				label: 'resource allocated',
				labelFontColor: '#A0AEBA',
				labelMinFontSize: 12,
				counter: true,
				pointer: true,
				pointerOptions:
				{
					color: '#5E6773'
				}
			});
			setInterval(function()
			{
				activityGauge.refresh(getRandomInt(0, 100));
			}, 2000);
			// sales chart
			var ctxSalesLineChart = document.getElementById("sales-chart").getContext("2d");
			var lineChart = new Chart(ctxSalesLineChart,
			{
				type: 'line',
				data:
				{
					labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
					datasets: [
					{
						data: [400, 450, 370, 299, 205, 142, 120],
						fill: false,
						borderWidth: 2,
						pointRadius: 5,
						pointHoverRadius: 7,
						borderColor: '#AB7DF6',
						backgroundColor: '#fff',
					}]
				},
				options:
				{
					responsive: true,
					legend:
					{
						display: false
					},
					layout:
					{
						padding:
						{
							left: 8,
							right: 8,
							top: 8,
							bottom: 8
						}
					},
					scales:
					{
						xAxes: [
						{
							display: false
						}],
						yAxes: [
						{
							display: false
						}]
					}
				}
			});
		});
		</script>
	</body>
	</div>
</html>
Link naar reactie
Delen op andere sites

Ik weet niet zoveel van maar je bent helemaal niet veilig mee bezig.

Nu weet ik waar uw bestanden zijn en kan ik uitlezen.

Je geeft de hele code maar weet niet waar uw echte code voor uw vraag.

Dan vraag ik mij af of je wel iets van ken.

Mij lijkt het dat je die code gewoon gevonden hebt.

 

Leer zoals ik reeds zei iets simpel zodat je elke regel van uw website ook verstaat.

 

Volgens mij staat uw database gewoon open omdat ik nergens de regel vind om de database te sluiten na openen.

Ik kan mij hierin vergissen.

 

Je ben nog maar pas bezig en doet iets waar iemand jaren over moet doen.

 

 

Link naar reactie
Delen op andere sites

×
×
  • Nieuwe aanmaken...

Belangrijke informatie

We hebben cookies geplaatst op je toestel om deze website voor jou beter te kunnen maken. Je kunt de cookie instellingen aanpassen, anders gaan we er van uit dat het goed is om verder te gaan.