Skip to content

Commit

Permalink
Story Write Page
Browse files Browse the repository at this point in the history
  • Loading branch information
enderimen committed May 26, 2018
1 parent 0d3bb37 commit 9bf622a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
8 changes: 6 additions & 2 deletions css/create.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ body{

.head h1{
margin-left: 20px;
color: gray;
}

.content{
Expand All @@ -59,6 +60,7 @@ body{
justify-content: flex-start;
align-items: center;
background-color: #fff;
font-weight: normal;
}

.content a {
Expand All @@ -81,10 +83,12 @@ body{
}

.story-detail p , .story-other{
margin-top: 30px;
margin-top: 20px;
}

.story-detail .story-other{
width: 150px;
display: flex;
justify-content: space-between;
justify-content: space-around;
align-items: flex-start;
}
35 changes: 35 additions & 0 deletions story-write.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php require_once 'config.php';
if ($_SESSION['session_control'] == true) {
include 'header.php';
@$max_story_ID_sql = mysqli_query( $connection , "SELECT max(storyID) as storyID FROM stories WHERE userID = '".$_SESSION['id']."'");
$storyID = mysqli_fetch_array($max_story_ID_sql);
?>
<?php echo '<script>alert("Önce kapak resminizi seçiniz. Aksi takdirde yazdıklarınız silinecektir.")</script>' ?>
<div class="container">
<form action="transaction.php" method="POST" class="mind flex-row" enctype="multipart/form-data">
<div class="story-cover">
<img src="img/story_photo/story_photo.png" alt="" height="300" width="200" id="story-upload">
<input type="file" name="story-cover-file" id="story-cover-file" hidden="hidden">
<input type="submit" name="story-cover-save" value="Resmi Kaydet" class="button">
</div>

<div class="write-group flex-column">
<h2>Hikaye Yaz</h2><br>
<input type="text" name="story-branch-title" class="input" placeholder="Bölüm Başlığı">
<textarea name="story-branch-content" id="" cols="70" rows="40">
</textarea>
<input type="text" value="<?=$storyID['storyID']?>" name="storyID" hidden="hidden">
<input type="submit" name="story-branch-save" value="Hikayeyi Kaydet" class="button">
</div>
</form>
</div>

<?php } else {
header("Location:login.php");
} ?>

<!--Js-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="js/customize.js"></script>
</body>
</html>

0 comments on commit 9bf622a

Please sign in to comment.