Example #1
0
				</p>
				<h5>Skrivet: <?php 
echo gmdate("Y-m-d H:i:s", $post->getTime());
?>
 '</h5>
				<h3> Detta kommer att ta bort det här inlägget! </h3>
				<?php 
if ($userIsLoggedIn === true) {
    ?>
				<p>
				    <a href="<?php 
    echo \core\Routes::getRoute('blogg', 'deleteConfirmed') . $post->getId();
    ?>
"> Bekräfta borttagning! </a>
				    <a href="<?php 
    echo \core\Routes::getRoute('blogg', 'main');
    ?>
"> Avbryt </a>
		        </p>
		        <?php 
}
?>

			</div>
			<div class="col-md-3">
				<img src="<?php 
echo ROOT_PATH;
?>
img/blogg.png" alt="blogg image">
			</div>
			<div class="col-md-12">
Example #2
0
    if ($loggedInUserId == $post->getUserId() || $adminIsLoggedIn) {
        ?>
				<a href="<?php 
        echo \core\Routes::getRoute('blogg', 'edit') . $post->getId();
        ?>
"> Redigera</a>
			<?php 
    }
    ?>

			<?php 
    if ($adminIsLoggedIn) {
        ?>
  
	        	<a href="<?php 
        echo \core\Routes::getRoute('blogg', 'delete') . $post->getId();
        ?>
"> Ta bort</a>
	        <?php 
    }
    ?>
	    </p>
	    <?php 
}
?>

	</div>
	<div class="<?php 
if ($viewFullBloggPost) {
    echo "col-md-2";
} else {
Example #3
0
}
for ($i = 0; $i < 5; $i++) {
    $nextPosts = $pagingPrev + $numberOfPostsPerPage * $i;
    if ($nextPosts > $numberOfPostsInDb) {
        break;
    }
    ?>
				<a href="<?php 
    echo \core\Routes::getRoute('blogg', 'main') . $nextPosts;
    ?>
"> <?php 
    echo intval($nextPosts / $numberOfPostsPerPage + 1);
    ?>
</a>
		<?php 
}
if ($numberOfPostsPerPage <= count($posts)) {
    ?>
			<a href="<?php 
    echo \core\Routes::getRoute('blogg', 'main') . $pagingNext;
    ?>
"> Nästa sida</a>
		<?php 
} else {
    ?>
				Nästa sida
	<?php 
}
?>
	</div>
</section>
Example #4
0
<section>
	<div class="container">
		<h4>Användaren <?php 
echo $user;
?>
 har skapats! </h4>
		<h3> <?php 
echo $user;
?>
 </h3> 
		<a class="btn btn-default" href="<?php 
echo \core\Routes::getRoute('admin', 'main');
?>
"> Tillbaka</a>
	</div>
</section>
Example #5
0
	</fieldset>
	<?php 
if ($errors !== "") {
    ?>
 
		<ul>
			<?php 
    echo $errors;
    ?>
 
		</ul>
	<?php 
}
?>
	<form action="<?php 
echo \core\Routes::getRoute('admin', 'saveUser');
?>
" method='post' >
			<fieldset>
				<label for="RegisterUserNameID" >Namn  :</label>
				<input type="text" name="<?php 
echo $userNamePost;
?>
" id='RegisterUserNameID' value="">
			</fieldset>
			<fieldset>
				<label for="isAdminCheckbox" >Administratör  :</label>
				<input type="checkbox" name="<?php 
echo $isAdminCheckBox;
?>
" value="Admin" id="isAdminCheckbox">
Example #6
0
?>
</span></h1>
        <a href="#portfolio" class="down-arrow-btn"><i class="fa fa-chevron-down"></i></a>
      </div>
    </div>
  </div>
</section>
<section>
	<div class="container">
		<?php 
foreach ($posts as $post) {
    ?>
		<div class="row bloggpost animated fadeInUp"> 
			<div class="col-md-7">
				<h1 class="bloggTitle"> <a href="<?php 
    echo \core\Routes::getRoute('blogg', 'view') . $post->getId();
    ?>
"> <?php 
    echo $post->getTitel();
    ?>
</a></h1>
				<p class="bloggtext min">
				<?php 
    echo substr($post->getText(), 0, 120);
    ?>
				</p>
				<h5 >Skrivet: <?php 
    echo gmdate("Y-m-d H:i:s", $post->getTime()) . " av: " . $post->getAuthor();
    ?>
</h5>
			</div>
Example #7
0
	<div class="container">
		<h3>Användar inställningar</h3>
		<hr>
		<ul>
		<?php 
    foreach ($userArray as $user) {
        ?>
			<li>	
				<?php 
        echo $user;
        if ($user->getIsAdmin()) {
            echo " Administratör";
        }
        ?>
				<a class="btn btn-danger" href="<?php 
        echo \core\Routes::getRoute('admin', 'deleteUser') . $user->getUserID();
        ?>
"> Ta bort</a>
			</li> 
		<?php 
    }
    ?>
		</ul>
		<hr>
	</div>
</section>
<?php 
    include_once 'new_user_form.php';
}
?>
Example #8
0
            <li <?php 
if (isset($active) && $active == "instagram") {
    echo 'class="active"';
}
?>
><a href="<?php 
echo \core\Routes::getRoute('instagram', 'main');
?>
"> Instagram</a></li>
            <li <?php 
if (isset($active) && $active == "twitter") {
    echo 'class="active"';
}
?>
><a href="<?php 
echo \core\Routes::getRoute('twitter', 'main');
?>
"> Twitter</a></li>
            </ul>
          </div>
          <div class="col-md-6 credit">
            <p>Utvecklad av <a href="http://www.antonledstrom.se/">Anton Ledstörm</a> designen av sidan hämtad från <a href="http://tympanus.net/codrops/"><em>Codrops</em></a></p>
          </div>
        </div>
      </div>
    </footer>
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="<?php 
echo ROOT_PATH;