Skip to content
Snippets Groups Projects
Commit a8a338df authored by SofianeLasri's avatar SofianeLasri
Browse files

v1c

initial release on Github.
parent f0692caa
No related branches found
No related tags found
No related merge requests found
Showing
with 2491 additions and 0 deletions
# VBcms # VBcms
VBcms est un panel intuitif qui vous facilitera la vie dans la création de votre loading screen. VBcms est un panel intuitif qui vous facilitera la vie dans la création de votre loading screen.
# English:
Hi there and thank you for download VBcms! I'm sorry for the French rental of the panel, I'm working on an English translation.
If you need help, don't hesitate to send me a PM, but also to read the panel documentation.
Doc: https://vbcms.sl-projects.com/ (in french only for the moment)
To download themes PSD's, go to this link: https://cloud.sl-projects.com/index.php/s/TtSEGfyLK5pQ9W3 :)
# Français
Salut cop1 :D
Merci infiniment d'avoir téléchargé VBcms. Si tu as besoin d'aide, n'hésite surtout pas à m'envoyer un MP, mais aussi à lire la documentation du panel.
Doc: https://vbcms.sl-projects.com/
Pour télécharger les fichiers PSD des thèmes, va sur ce lien: https://cloud.sl-projects.com/index.php/s/TtSEGfyLK5pQ9W3 :)
\ No newline at end of file
<?php
if (!isset($_COOKIE["login"])) {
header('Location: login.php');
exit;
}
include 'includes/constants.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?=$siteInfos[0]?> | 404</title>
<link rel="icon" type="image/png" href="images/vbcms-logo-mini.png"/>
<?php include 'includes/depedencies.php';?>
</head>
<body>
<?php include 'includes/navbar.php'; ?>
<div class="d-flex">
<?php include 'includes/sidebar.php'; ?>
<div class="page-content container-fluid">
<h1>Mayday! Nous avons perdu le contact!</h1>
<p>Il semblerait que tu te sois perdu. :/</p>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php
if (!isset($_COOKIE["login"])) {
header('Location: login.php');
exit;
}
include 'includes/constants.php';
if (isset($_GET["deletealert"])) {
$sql = $bdd->prepare( "DELETE FROM alerts WHERE id =:id" );
$sql->bindParam(':id', $_GET["deletealert"]);
$sql->execute();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?=getParameters("siteName")?> | Admin</title>
<link rel="icon" type="image/png" href="images/vbcms-logo-mini.png"/>
<?php include 'includes/depedencies.php';?>
</head>
<body>
<?php include 'includes/navbar.php'; ?>
<div class="d-flex">
<?php include 'includes/sidebar.php'; ?>
<div class="page-content container-fluid">
<h1>Alertes</h1>
<p>Utiles pour avertir tes joueurs.</p>
<?php
if (isset($_GET["success"])) {
echo ('<div class="alert alert-success" role="alert">alerte créée avec succès!</div>');
}
?>
<a href="editor.php?type=alert" class="btn btn-success">Créer une nouvelle alerte</a>
<div class="d-flex flex-wrap">
<?php
$res=$bdd->query("SELECT * FROM alerts");
$result = $res->fetchAll();
foreach($result as $row) {
?>
<!-- Carte alert -->
<div class="card m-2" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title"><?=$row["title"]?></h5>
<p class="card-text"><?=$row["description"]?></p>
<a href="editor.php?type=alert&id=<?=$row["id"]?>" class="btn btn-primary">Modifier</a>
<a href="alerts.php?deletealert=<?=$row["id"]?>" class="btn btn-danger"><i class="far fa-trash-alt"></i></a> - <b><?=$row["duration"]?> ms</b>
</div>
</div>
<!-- /carte alert -->
<?php } ?>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php
if (!isset($_COOKIE["login"])) {
header('Location: login.php');
exit;
}
include 'includes/constants.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?=getParameters("siteName")?> | Backgrounds</title>
<link rel="icon" type="image/png" href="images/vbcms-logo-mini.png"/>
<?php include 'includes/depedencies.php';?>
</head>
<body>
<style type="text/css">
.gallery img {
width: 100%;
}
.gallery2 img{
width: 25vw;
border-radius: 10px;
margin: 1vw;
}
</style>
<?php include 'includes/navbar.php'; ?>
<?php include getTranslation("backgrounds"); ?>
</body>
</html>
\ No newline at end of file
@font-face {font-family: "Refrigerator Delx W01 Bold";
src: url("../fonts/d664bf6951144f64f00f5b48099019d3.eot"); /* IE9*/
src: url("../fonts/d664bf6951144f64f00f5b48099019d3.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../fonts/d664bf6951144f64f00f5b48099019d3.woff2") format("woff2"), /* chrome、firefox */
url("../fonts/d664bf6951144f64f00f5b48099019d3.woff") format("woff"), /* chrome、firefox */
url("../fonts/d664bf6951144f64f00f5b48099019d3.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("../fonts/d664bf6951144f64f00f5b48099019d3.svg#Refrigerator Delx W01 Bold") format("svg"); /* iOS 4.1- */
}
@font-face {font-family: "Refrigerator Delx W02 Reg";
src: url("../fonts/c0a349550b33f079982cf073e98cc67c.eot"); /* IE9*/
src: url("../fonts/c0a349550b33f079982cf073e98cc67c.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../fonts/c0a349550b33f079982cf073e98cc67c.woff2") format("woff2"), /* chrome、firefox */
url("../fonts/c0a349550b33f079982cf073e98cc67c.woff") format("woff"), /* chrome、firefox */
url("../fonts/c0a349550b33f079982cf073e98cc67c.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("../fonts/c0a349550b33f079982cf073e98cc67c.svg#Refrigerator Delx W02 Reg") format("svg"); /* iOS 4.1- */
}
@font-face {font-family: "LTKaliber Bold";
src: url("../fonts/884a957ee2d127a16ff887ffec407798.eot"); /* IE9*/
src: url("../fonts/884a957ee2d127a16ff887ffec407798.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../fonts/884a957ee2d127a16ff887ffec407798.woff2") format("woff2"), /* chrome、firefox */
url("../fonts/884a957ee2d127a16ff887ffec407798.woff") format("woff"), /* chrome、firefox */
url("../fonts/884a957ee2d127a16ff887ffec407798.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("../fonts/884a957ee2d127a16ff887ffec407798.svg#Linotype Kaliber Bold") format("svg"); /* iOS 4.1- */
}
\ No newline at end of file
@import "fonts.css";
:root{
--85-grey: #111111;
--10-grey: #ebebeb;
--main-blue2: #2C5FFF;
--light-blue: #40739e;
}
.bg-dark{
background-color: var(--85-grey) !important;
}
.bg-light{
background-color: #f8f9fa!important;
}
.navbar{
background: linear-gradient(90deg,rgba(0,0,0,.5),rgba(0,0,0,.5)),url("../images/black-back-pattern.jpg");
background-size: auto 200%;
}
.loginCard{
max-width: 25rem;
background-color: var(--10-grey);
}
.loginCard h1,h2,h3,h4,h5{
font-family: "Refrigerator Delx W02 Reg";
}
.navbar-brand{
font-family: "LTKaliber Bold";
color: white !important;
}
.disconnectButton{
font-family: "Refrigerator Delx W02 Reg" !important;
color: white !important;
}
.sidebar{
margin-left: 0;
min-height: 100vh;
}
.sidebar .list-group {
width: 15rem;
}
.border-right {
border-right: 1px solid #dee2e6!important;
}
.page-content{
margin-top: 1rem;
}
.page-content h1,h2,h3{
font-family: "Refrigerator Delx W01 Bold";
}
.galleryImage{
background: linear-gradient(90deg,rgba(0,0,0,.5),rgba(0,0,0,.5)),url("../images/black-back-pattern.jpg");
}
.fullwidthContainer{
width: 100%;
background-color: var(--10-grey);
}
\ No newline at end of file
<?php
if (!isset($_COOKIE["login"])) {
header('Location: login.php');
exit;
}
include 'includes/constants.php';
if (isset($_GET["type"])) {
$action = "create";
$btnValue = "create".$_GET["type"];
}
if (isset($_GET["id"]) AND (isset($_GET["type"]) AND ($_GET["type"] == "tip" OR $_GET["type"] == "alert"))) {
if ($_GET["type"] == "tip") {
$res=$bdd->query("SELECT * FROM posts WHERE id = ".$_GET["id"]);
$result = $res->fetch();
} elseif ($_GET["type"] == "alert") {
$res=$bdd->query("SELECT * FROM alerts WHERE id = ".$_GET["id"]);
$result = $res->fetch();
}
$action = "update";
$btnValue = "update".$_GET["type"];
$titre = $result["title"];
$content = $result["description"];
$id = $_GET["id"];
$frontImage = $result["picPath"];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?=getParameters("siteName")?> | Editor</title>
<link rel="icon" type="image/png" href="images/vbcms-logo-mini.png"/>
<?php include 'includes/depedencies.php';?>
<link rel="stylesheet" href="vendors/summernote/dist/summernote-lite.css">
<script type="text/javascript" src="vendors/summernote/dist/summernote-lite.js"></script>
</head>
<body>
<style type="text/css">
.editorDiv{
padding: 1vh;
}
.articleTitle{
margin-bottom: 1vh;
}
.gallery{
width: inherit;
margin: 1vh;
}
.gallery img{
width: 100%;
border-radius: 10px;
}
</style>
<?php include 'includes/navbar.php'; ?>
<div class="d-flex">
<?php include 'includes/sidebar.php'; ?>
<div class="page-content container-fluid">
<h1>Editor</h1>
<p>Here you can create and edit text.</p>
<form action = "editorSend.php" method = "POST">
<input required class="input-group-text text-left my-1" type="text" name="articleName" <?php if(isset($action) AND $action == "update"){echo 'value="'.$titre.'"';} ?> placeholder="Title">
<?php
if (isset($_GET["type"]) AND $_GET["type"] != "alert") { ?>
<button type="button" class="btn btn-primary btn-sm my-1" data-toggle="modal" data-target="#chooseMediaModal">Choose an illustration image</button>
<input class="input-group-text text-left mb-2 my-1" type="text" id="frontImage" name="frontImage" <?php if(isset($action) AND $action == "update"){echo 'value="'.$frontImage.'"';} ?> placeholder="Image link">
<?php } ?>
<?php
if (isset($_GET["type"]) AND $_GET["type"] == "alert") { ?>
<input required class="input-group-text text-left my-1" type="text" id="alertDuration" name="alertDuration" <?php if(isset($action) AND $action == "update"){echo 'value="'.$frontImage.'"';} ?> placeholder="Alert duration (in ms)">
<?php } ?>
<?php if(isset($action) AND $action == "update"){echo '<input required class="input-group-text text-left my-1" type="text" id="articleId" name="articleId" value="'.$id.'">';} ?>
<!-- Modal -->
<div class="modal fade" id="chooseMediaModal" tabindex="-1" role="dialog" aria-labelledby="chooseMediaModalTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="chooseMediaModalTitle">Choose an image</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<?php
$res=$bdd->query("SELECT * FROM gallery ORDER BY id DESC");
$result = $res->fetchAll();
$count= count($result);
if($count > 0){
foreach( $result as $row ) {
$picPath = (getParameters("siteUrl")."admin/upload/".$row["1"]);
echo ('<div class="gallery d-flex flex-column"><img src="'.$picPath.'"><button class="btn btn-primary" onclick="changePath('."'".$picPath."'".')" id="chooseImageBtn" data-dismiss="modal">Choisir</button></div>');
}
} else {
echo "Aucun média n'est encore ajouté. :(";
}
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Fin du Modal -->
<?php
$res=$bdd->query("SELECT * FROM gallery");
$count= count($res->fetchAll());
if($count == 0){ ?>
<div class="alert alert-warning border-0 alert-dismissible">
<span class="font-weight-semibold">Hep hep hep!</span> It is better to have an image in stock. Check <a href="gallery.php" class="alert-link">here</a>.
</div>
<?php }
?>
<textarea required id="summernote" name="articleContent"><?php if(isset($action) AND $action == "update"){echo $content;}?></textarea>
<button type="submit" name="submit" value="<?=$btnValue?>" class="btn btn-success my-2"><?php if(isset($action) AND $action == "update"){echo 'Mettre à jour';}else{echo 'Créer';} ?></button>
</form>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#summernote').summernote({
placeholder: "Ceci est un texte.",
tabsize: 2,
height: 300,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['paragraph']],
['view', ['codeview', 'help']]
]
});
});
function changePath(x) {
console.log(arguments[0]);
$("#frontImage").val(arguments[0]);
}
</script>
</body>
</html>
\ No newline at end of file
<?php
include 'includes/bdd.php';
if (isset($_POST["submit"])) {
if ($_POST["submit"] == "createtip") {
$sql = "INSERT INTO posts (id, title, description, picPath) VALUES (?,?,?,?)";
$bdd->prepare($sql)->execute([null, $_POST["articleName"], $_POST["articleContent"], $_POST["frontImage"]]);
header('Location: tips.php?success');
} elseif ($_POST["submit"] == "updatetip") {
$id = $_POST["articleId"];
$sql = "UPDATE posts SET title=?, description=?, picPath=? WHERE id = ?";
$bdd->prepare($sql)->execute([$_POST["articleName"], $_POST["articleContent"], $_POST["frontImage"], $_POST["articleId"]]);
header('Location: tips.php?success');
} elseif ($_POST["submit"] == "createalert") {
$sql = "INSERT INTO alerts (id, title, description, duration) VALUES (?,?,?,?)";
$bdd->prepare($sql)->execute([null, $_POST["articleName"], $_POST["articleContent"], $_POST["alertDuration"]]);
header('Location: alerts.php?success');
} elseif ($_POST["submit"] == "updatealert") {
$id = $_POST["articleId"];
$sql = "UPDATE alerts SET title=?, description=?, duration=? WHERE id = ?";
$bdd->prepare($sql)->execute([$_POST["articleName"], $_POST["articleContent"], $_POST["alertDuration"], $_POST["articleId"]]);
header('Location: alerts.php?success');
}
}
?>
\ No newline at end of file
File added
This diff is collapsed.
File added
File added
File added
File added
This diff is collapsed.
File added
File added
File added
File added
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment