Skip to content

Commit

Permalink
v-2.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Mokhtari committed Sep 8, 2019
1 parent bab567e commit 59b4761
Show file tree
Hide file tree
Showing 119 changed files with 1,659 additions and 442 deletions.
54 changes: 33 additions & 21 deletions ara2/d-tabs/dashboard.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
<h1>Dashboard</h1>
<br>
<style>
@media (min-width: 34em) {
.card-columns {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
}
}
</style>
<div class="container-fluid">
<h1 class="float-left">Dashboard</h1>
<br>
</div>
<div class="card p-3" style="width: 100%;">
<?php
$web_dir = "website";
if(is_dir($web_dir))
{
echo ("<p><strong>Welcome to Ara....</strong></p>");
}
else
{
echo ("lets create your first website <br> Loading....");
include 'AraNewDirectory.php';
function newFolder(){
mkdir("website");
echo "done";
}
newFolder();
mkdir("media");
}
?>
</div>
<?php
$web_dir = "website";
if(is_dir($web_dir))
{
echo ("<p><strong></strong></p>");
echo ("<p></p>");
echo '<blockquote class="blockquote"><p class="mb-0">Welcome to Ara....</p><footer class="blockquote-footer">Lets get ready</footer></blockquote>'; }
else
{
echo ("lets create your first website <br> Loading....");
include 'AraNewDirectory.php';
function newFolder(){
mkdir("website");
echo "done";
}
newFolder();
mkdir("media");
}
?>
</div>
19 changes: 0 additions & 19 deletions ara2/d-tabs/files.php

This file was deleted.

12 changes: 8 additions & 4 deletions ara2/d-tabs/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
}
}
</style>
<h1>Media</h1>
<br>
<div class="card p-3 rounded" style="width: 100%;">
<div class="container-fluid">
<h1 class="float-left">Media</h1>
<!-- Button trigger modal -->
<button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#exampleModalCenter" style="width: 79px;">
<button type="button" class="btn btn-outline-primary float-right" data-toggle="modal" data-target="#exampleModalCenter" style="width: 79px;">
Upload
</button>
<br>
</div>

<br>
<div class="card p-3" style="width: 100%;">
<!-- upload modal start -->
<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog"aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
Expand Down
52 changes: 31 additions & 21 deletions ara2/d-tabs/new.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
<h1>New</h1>
<br>
<div class="card p-3" style="width: 100%">
<?php
include('extention/extention-dir/editor/tinyMCE/tinyMCE.php');
if(isset($_POST['submitme'])){
include('../config/db_connect.php');
$title = mysqli_real_escape_string($conn, $_POST['new-post-title']);
$author = mysqli_real_escape_string($conn, $_POST['new-post-author']);
$content = mysqli_real_escape_string($conn, $_POST['new-post-content']);
$sql = "INSERT INTO posts(title,author,content) VALUES ('$title', '$author', '$content')";
//save to db and check
if(mysqli_query($conn, $sql)){
//success
header('location: ../index.php');//redirect to the index page
}else{
//error
echo 'query error: ' . mysqli_error($conn);
}
}
?>
<div class="row">
<div class="container-fluid">
<h1 class="float-left">New</h1>
<br>
</div>
<div class="card p-3 col-md-9" style="width: 100%">
<?php
include('extention/extention-dir/editor/tinyMCE/tinyMCE.php');
if(isset($_POST['submitme'])){
include('../config/db_connect.php');
$title = mysqli_real_escape_string($conn, $_POST['new-post-title']);
$author = mysqli_real_escape_string($conn, $_POST['new-post-author']);
$content = mysqli_real_escape_string($conn, $_POST['new-post-content']);
$sql = "INSERT INTO posts(title,author,content) VALUES ('$title', '$author', '$content')";
//save to db and check
if(mysqli_query($conn, $sql)){
//success
header('location: ../index.php');//redirect to the index page
}else{
//error
echo 'query error: ' . mysqli_error($conn);
}
}
?>
</div>
<div class="col-md-3">
<div class="card p-3 col-md-10" style="width: 100%">
featured image:
<input type="text"><input type="submit" value="ok">
</div>
</div>
</div>
6 changes: 4 additions & 2 deletions ara2/d-tabs/settings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1>Settings</h1>
<br>
<div class="container-fluid">
<h1 class="float-left">Settings</h1>
<br>
</div>
<div class="card p-3" style="width: 100%;">
<h3>Themes</h3>
</div>
15 changes: 15 additions & 0 deletions ara2/d-tabs/sheet.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="container-fluid">
<h1 class="float-left">Sheets</h1>
<br>
</div>
<div class="card p-3" style="width: 100%">
<?php
include('extention/extention-dir/editor/tinyMCE/tinyMCE.php');
if(isset($_POST['submitme'])){
$myfile = fopen("sheet.txt", "w") or die("Unable to open file!");
$txt = $_POST['submitme'];
fwrite($myfile, $txt);
fclose($myfile);
}
?>
</div>
27 changes: 27 additions & 0 deletions ara2/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ body {
font-size: .875rem;
}

button, object, embed, * {
outline: 0;
}

.feather {
width: 16px;
height: 16px;
Expand Down Expand Up @@ -120,4 +124,27 @@ body {

.bg-lighter {
background-color: #e6ecf0 !important;
}

.card {
border-radius: 7px !important;
}

.list-group .list-group-item {
background-color: #343a40 !important;
border-top: 1px solid #343a40 !important;
border-left-color: #343a40 !important;
border-right-color: #343a40 !important;
color: #f0f0f0;
}

.list-group .list-group-item:hover {
background-color: #46494d !important;
color: #fff;
}

.list-group .list-group-item.active {
background-color: #7b78ff !important;
color: #fff;
border: none;
}
53 changes: 0 additions & 53 deletions ara2/dashboard.js

This file was deleted.

12 changes: 6 additions & 6 deletions ara2/dashboard_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@
</head>

<body class="bg-lighter">
<nav class="navbar navbar-white bg-white">
<a class="navbar-brand bg-white" href="#"><img src="ara.svg" width="30" height="30" class="d-inline-block align-top" alt="ara">Ara</a>
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand bg-dark" href="#"><img src="ara.svg" width="30" height="30" class="d-inline-block align-top" alt="ara">Ara</a>
<form class="form-inline my-2 my-lg-0" action="dashboard_admin.php" method="post">
<input type="submit" value="Log out" class="btn btn-outline-danger my-2 my-sm-0" name="logout">
<?php
if(isset($_POST['logout'])){
unset($_SESSION['loggedin']);
if (!isset($_SESSION['loggedin'])){
header('location: index.php');
header('location: login.php');
}
}
?>
</form>
</nav>
<div class="container-fluid">
<div class="row">
<div class="panel border-right p-0 bg-white sticky-top">
<div class="panel border-right p-0 bg-dark sticky-top">
<div class="list-group list-group-flush" id="list-tab" role="tablist">
<a class="list-group-item list-group-item-action active" id="list-dashboard-list" data-toggle="list" href="#list-dashboard" role="tab" aria-controls="dashboard"><i class="fas fa-home"></i></a>
<a class="list-group-item list-group-item-action" id="list-new-list" data-toggle="list" href="#list-new" role="tab" aria-controls="new"><i class="fas fa-plus"></i></a>
<a class="list-group-item list-group-item-action" id="list-sheet-list" data-toggle="list" href="#list-sheet" role="tab" aria-controls="sheet"><i class="fas fa-sticky-note"></i></a>
<a class="list-group-item list-group-item-action" id="list-media-list" data-toggle="list" href="#list-media" role="tab" aria-controls="media"><i class="fas fa-photo-video"></i></a>
<a class="list-group-item list-group-item-action" id="list-files-list" data-toggle="list" href="#list-files" role="tab" aria-controls="files"><i class="fas fa-folder-open"></i></a>
<a class="list-group-item list-group-item-action" id="list-settings-list" data-toggle="list" href="#list-settings" role="tab" aria-controls="settings"><i class="fas fa-cog"></i></a>
</div>
</div>
<div class="col-md-11">
<div class="tab-content container mt-5" id="nav-tabContent">
<div class="tab-pane fade show active" id="list-dashboard" role="tabpanel" aria-labelledby="list-dashboard-list"><?php include('d-tabs/dashboard.php'); ?></div>
<div class="tab-pane fade" id="list-new" role="tabpanel" aria-labelledby="list-new-list"><?php include('d-tabs/new.php'); ?></div>
<div class="tab-pane fade" id="list-sheet" role="tabpanel" aria-labelledby="list-sheet-list"><?php include('d-tabs/sheet.php'); ?></div>
<div class="tab-pane fade" id="list-media" role="tabpanel" aria-labelledby="list-media-list"><?php include('d-tabs/media.php'); ?></div>
<div class="tab-pane fade" id="list-files" role="tabpanel" aria-labelledby="list-files-list"><?php include('d-tabs/files.php'); ?></div>
<div class="tab-pane fade" id="list-settings" role="tabpanel" aria-labelledby="list-settings-list"><?php include('d-tabs/settings.php'); ?></div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ara2/extention/extention-dir/editor/tinyMCE/tinyMCE.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script src="extention/extention-dir/editor/tinyMCE/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: '#mytextarea'
selector: '.mytextarea'
});
</script>

Expand All @@ -11,6 +11,6 @@
<label for="" class="margin">Author : </label>
<input type="text" name="new-post-author" id="" class="margin" style="width: 100%;">
<label for="" class="margin">Content : </label>
<textarea id="mytextarea" name="new-post-content">Hello, World!</textarea>
<textarea class="mytextarea" name="new-post-content">Hello, World!</textarea>
<input type="submit" value="submit" name="submitme">
</form>
43 changes: 2 additions & 41 deletions ara2/index.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
<?php
require_once 'config/db.php';
if(isset($_SESSION['loggedin'])){
header('location: dashboard_admin.php');
}
?>

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>login</title>
<link rel="stylesheet" href="signin.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
</head>

<body>
<form class="form-signin" action="do-login.php" method="post">
<img class="mb-4" src="ara.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" name="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>
<button class="btn btn-lg btn-primary btn-block" type="submit" name="do-login">Sign in</button>
</form>
</body>

</html>
header("location: website");
?>
Loading

0 comments on commit 59b4761

Please sign in to comment.