public function fetchData($id)
 {
     $stmt = $this->db->prepare("select * from song where id = ?");
     $stmt->execute(array($id));
     if (!($song = $stmt->fetch(PDO::FETCH_ASSOC))) {
         Page::go404();
     }
     $stmt->closeCursor();
     $this->id = $song['id'];
     $this->title = $song['title'];
     $this->duration = $song['duration'];
     $this->lyrics = $song['lyrics'];
 }
 public function fetchData($id)
 {
     $stmt = $this->db->prepare("select * from artist where id = ?");
     $stmt->execute(array($id));
     if (!($artist = $stmt->fetch(PDO::FETCH_ASSOC))) {
         Page::go404();
     }
     $this->id = $id;
     $this->name = $artist['name'];
     $this->biography = $artist['biography'];
     $this->uploadDate = new Timestamp($artist['uploadDate']);
     $this->uploadUser = new User($artist['uploadUser']);
     $this->picture = $artist['picture'];
 }
 public function fetchData($id)
 {
     $stmt = $this->db->prepare("select * from album where id = ?");
     $stmt->execute(array($id));
     if (!($album = $stmt->fetch(PDO::FETCH_ASSOC))) {
         Page::go404();
     }
     $this->id = $album['id'];
     $this->name = $album['name'];
     $this->disc = $album['disc'];
     $this->releaseDate = new Timestamp($album['releaseDate']);
     $this->uploadDate = new Timestamp($album['uploadDate']);
     $this->uploadUser = new User($album['uploadUser']);
     $this->type = new AlbumType($album['type']);
 }
 protected function fetchData($id)
 {
     $stmt = $this->db->prepare("select * from user where id = ?");
     $stmt->execute(array($id));
     if (!($user = $stmt->fetch(PDO::FETCH_ASSOC))) {
         Page::go404();
     }
     $stmt->closeCursor();
     $this->id = $id;
     $this->username = $user['username'];
     $this->email = $user['email'];
     $this->password = $user['password'];
     $this->publicEmail = $user['publicEmail'];
     $this->picture = $user['picture'];
     $this->active = $user['active'];
 }
Example #5
0
<?php

require_once "config/config.inc";
isset($_GET['q']) && empty($_GET['q']) && Page::go404();
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta author="Jérôme Boesch">
		<title>
			<?php 
print TITLE;
?>
		</title>
		<?php 
require_once "sections/links.php";
?>
	</head>
	<body>
		<?php 
require_once "sections/menu.php";
?>
		<section class="container">
			<div class="row">

				<div class="col-md-3">
					<div class="alizarin">
						<h3 class="padded">Songs</h3>
						<hr>
						<p class="padded">
Example #6
0
<?php

require_once "config/config.inc";
isset($_SESSION['online']) && $_SESSION['online'] || Page::go404();
?>
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title><?php 
print TITLE;
?>
</title>

		<?php 
require_once "sections/links.php";
?>
	</head>

	<body>
		<?php 
require_once "sections/menu.php";
?>

		<section class="container">
			<?php 
require_once "sections/alerts.php";
?>

			<div class="row">
				<div class="col-md-4">