-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ali Mokhtari
committed
Sep 8, 2019
1 parent
b21e073
commit 676a525
Showing
113 changed files
with
98 additions
and
11,485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
include('config/db_connect.php'); | ||
|
||
//write query for all addons | ||
$sql_addons = 'SELECT id, addon_name, addon_area FROM ara_addons'; | ||
|
||
//make query and get resualt -addons | ||
$result_addons = mysqli_query($conn, $sql_addons); | ||
|
||
//fetch the resualting rows as an array -addons | ||
$addons = mysqli_fetch_all($result_addons, MYSQLI_ASSOC); | ||
|
||
//mysqli_free_result($result); | ||
|
||
//close connection | ||
mysqli_close($conn); | ||
|
||
?> | ||
<div class="container-fluid"> | ||
<h1 class="float-left">Extentions</h1> | ||
<br> | ||
</div> | ||
<div class="card p-3" style="width: 100%;"> | ||
<ul class="list-group list-group-flush"> | ||
<?php foreach($addons as $addon) { ?> | ||
<li class="list-group-item"><?php echo htmlspecialchars($addon['addon_name']); ?></li> | ||
<?php } ?> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,54 @@ | ||
<?php | ||
include('config/db_connect.php'); | ||
|
||
//write query for all posts | ||
$sql_posts = 'SELECT * FROM posts'; | ||
|
||
//make query and get resualt -posts | ||
$result_posts = mysqli_query($conn, $sql_posts); | ||
|
||
//fetch the resualting rows as an array -posts | ||
$posts = mysqli_fetch_all($result_posts, MYSQLI_ASSOC); | ||
|
||
//mysqli_free_result($result); | ||
|
||
//close connection | ||
mysqli_close($conn); | ||
?> | ||
<form action="d-tabs/new.php" method="POST"> | ||
<div class="row"> | ||
<div class="container-fluid"> | ||
<h1 class="float-left">New</h1> | ||
<br> | ||
<button class="btn btn-outline-primary float-right" type="button" data-toggle="collapse" data-target="#collapse_new" aria-expanded="false" aria-controls="collapseExample"> | ||
New | ||
</button> | ||
</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']); | ||
$featured_image = mysqli_real_escape_string($conn, $_POST['new-featured-image']); | ||
$sql = "INSERT INTO posts(title,author,content,featured_image) VALUES ('$title', '$author', '$content', '$featured_image')"; | ||
//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="card p-3 mb-3" style="width: 100%" id="post-list"> | ||
<div class="accordion" id="accordionExample"> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Title</th> | ||
<th>Author</th> | ||
<th>Created_at</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php foreach($posts as $post) { ?> | ||
<tr> | ||
<td><?php echo htmlspecialchars($post['title']); ?></td> | ||
<td><?php echo htmlspecialchars($post['author']); ?></td> | ||
<td><?php echo htmlspecialchars($post['created_at']); ?></td> | ||
</tr> | ||
<?php } ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
</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" name="new-featured-image"> | ||
<div class="collapse" id="collapse_new"> | ||
<div class="card card-body"> | ||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
n | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.