Exemplo n.º 1
0
<?php

require_once 'bo/config.php';
$articleid = filter_var($_GET['a'], FILTER_SANITIZE_NUMBER_INT);
$dbFunctions = new dbFunctions();
$functions = new functions();
$article = $dbFunctions->select("SELECT * FROM articles WHERE id = '{$articleid}'");
$univers = $dbFunctions->select("SELECT * FROM articles INNER JOIN univers ON univers.id = articles.fk_id_univ");
?>

<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="description" content="$nomunivers | Bienvenue dans l'univers $nomunivers. Ici, on parle de tout, mais surtout de n'importe quoi."/><!--cf index.php-->
		<link type="text/css" rel="stylesheet" href="asset/css/style.css" />
		<link type="text/css" rel="stylesheet" href="asset/css/smallresponsive.css" />
		<link href='https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
		<title><?php 
echo $article[0]->nom;
?>
 || Bienvenue dans l'univers du BALLA et d'Eli'. Ici, on parle de tout, mais surtout de n'importe quoi et ce, sans tabou</title>
	</head>
	
	<body>
		<?php 
include_once 'asset/php/menu.php';
include_once 'asset/php/logisfil.php';
?>
			<h2 class="titlearticle"><?php 
echo $article[0]->nom;
Exemplo n.º 2
0
<?php

include_once 'bo/config.php';
$universid = filter_var($_GET['u'], FILTER_SANITIZE_NUMBER_INT);
$dbFunctions = new dbFunctions();
$univers = $dbFunctions->select("SELECT * FROM univers WHERE id = '{$universid}'");
$articles = $dbFunctions->select("SELECT * FROM articles WHERE fk_id_univ = '{$universid}'");
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="description" content="$nomunivers | Bienvenue dans l'univers $nomunivers. Ici, on parle de tout, mais surtout de n'importe quoi."/><!--cf index.php-->
		<link type="text/css" rel="stylesheet" href="asset/css/style.css" />
		<link type="text/css" rel="stylesheet" href="asset/css/smallresponsive.css" />
		<link href='https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
		<title>Bienvenue dans l'univers du BALLA et d'Eli'. Ici, on parle de tout, mais surtout de n'importe quoi et ce, sans tabou</title>
	</head>
	
	<body>
		<?php 
include_once 'asset/php/menu.php';
include_once 'asset/php/logisfil.php';
?>
		<?php 
foreach ($univers as $u) {
    echo '<section class="containerlastwords">' . '<article class="bigcontainerlastwords">' . '<img src="asset/images/' . $u->image . '" alt="bg article"/>' . '<a><h4>' . $u->nom . '</h4></a>' . '</article>' . '<a><h4>' . $u->nom . '</h4></a>' . '</section>';
}
?>
		<section class="containerprearticle">
			<!--En fait la boucle démarre à partir du <article> et se termine après le </article>, avec la <div class="cb"></div>. 
Exemplo n.º 3
0
<?php

session_start();
require_once 'bo/config.php';
$function = new dbFunctions();
$univers = $function->select("SELECT * FROM univers ORDER BY id LIMIT 10");
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="description" content="Bienvenue dans l'univers du BALLA et d'Eli'. Ici, on parle de tout, mais surtout de n'importe quoi." />
		<link type="text/css" rel="stylesheet" href="asset/css/style.css" />
		<link href='https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
		<title>Bienvenue dans l'univers du BALLA et d'Eli'. Ici, on parle de tout, mais surtout de n'importe quoi et ce, sans tabou</title>
	</head>
	
	<body>
		<?php 
include_once 'asset/php/menu.php';
include_once 'asset/php/logisfil.php';
?>
		<h2 class="hugecatetitle">Last wor(l)ds</h2>
		<h4 style='text-align:center;color:red;'><?php 
if (isset($_SESSION['error'])) {
    echo $_SESSION['error'];
    unset($_SESSION['error']);
}
?>
</h4>
		<?php 
Exemplo n.º 4
0
		foreach($ids as $key => $value){
			$bind[$key] = &$ids[$key];
		}
		array_unshift($bind, $types);
		call_user_func_array(array($stmt, "bind_param"), $bind);
		$rc = $stmt->execute();
		$stmt->close();
		return true;
	}
	
	public function setKeywords($id, $keywords) {
		$con = &$this->db;
		$files = &$this->files;
		$stmt = $con->prepare("UPDATE $files SET keywords=? WHERE id=?");
		$rc = $stmt->bind_param("si", $keywords, $id);
		$rc = $stmt->execute();
		$stmt->close();
		return true;
	}
}

require_once('dbcon.php');

/*
	Initialize the dbFunctions() object and set connection & tables
*/
$dbf = new dbFunctions();
$dbf->setDb($con);
$dbf->setFileTable(/*some_table*/);
$dbf->setExtensionTable(/*another_table*/);
?>
Exemplo n.º 5
0
<nav class="logisfil">
	<?php 
if (isset($_SESSION['pseudo'])) {
    $pseudo = $_SESSION['pseudo'];
    $function = new dbFunctions();
    $user = $function->select("SELECT * from users WHERE pseudo = '{$pseudo}'");
    $level = $user[0]->level;
    ?>

		<figure class='containeravatarlogisfil'>
			<img src='asset/images/avatar/<?php 
    echo $user[0]->pseudo;
    ?>
_avatar.jpg' alt='Avatar <?php 
    echo $user[0]->pseudo;
    ?>
'/>
			<span class='modifavatar'>Modifier l'avatar</span>
			<figcaption>
				<h5><?php 
    echo $user[0]->pseudo;
    ?>
</h5>
				<p><?php 
    echo $user[0]->titre;
    ?>
</p>
			</figcaption>
		</figure>
		<?php 
    if ($level >= 4) {
Exemplo n.º 6
0
<?php

session_start();
require '../../bo/config.php';
if (isset($_SESSION['pseudo'])) {
    $_SESSION['error'] = "Vous êtes déjà connecté";
    echo '<meta http-equiv="refresh" content="0; URL=../../index.php">';
}
if (!isset($_POST['pseudo'], $_POST['password'])) {
    $_SESSION['error'] = "Pseudo ou mot de passe manquant";
    echo '<meta http-equiv="refresh" content="0; URL=../../index.php">';
} elseif (ctype_alnum($_POST['pseudo']) != true) {
    $_SESSION['error'] = "Pseudo invalide";
    echo '<meta http-equiv="refresh" content="0; URL=../../index.php">';
} elseif (ctype_alnum($_POST['password']) != true) {
    $_SESSION['error'] = "Mot de pass invalide";
    echo '<meta http-equiv="refresh" content="0; URL=../../index.php">';
} else {
    $pseudo = filter_var($_POST['pseudo'], FILTER_SANITIZE_STRING);
    $password = filter_var($_POST['password'], FILTER_SANITIZE_STRING);
    $password = sha1($password . $pseudo);
    try {
        $function = new dbFunctions();
        $login = $function->login($pseudo, $password);
    } catch (Exception $e) {
        $_SESION['error'] = "Impossible d&#39;effectuer la requête. Veuillez réesayer plus tard. (" . $e . ")";
    }
    // echo '<meta http-equiv="refresh" content="0; URL=../../index.php">';
}