Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
simpleCMS/article.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
132 lines (110 sloc)
4.95 KB
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
<?php | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
include "functions.php"; | |
?> | |
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="apple-touch-icon" href="apple-touch-icon.png"> | |
<!-- Place favicon.ico in the root directory --> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="css/main.css"> | |
<script src="../js/vendor/modernizr-2.8.3.min.js"></script> | |
</head> | |
<body> | |
<!--[if lt IE 8]> | |
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | |
<![endif]--> | |
<?php | |
$db = getConnected($hostname, $username, $password, $database); | |
$id = $_GET["card"]; | |
$data = getCardByID($id,$db); | |
?> | |
<header class="header"> | |
<nav class="nav"> | |
<!-- <ul class="nav-list"> | |
<li class="nav-list-item home-link"><a href="/index.php">Home</a></li> | |
<li class="nav-list-item"><a href="">Link</a></li> | |
<li class="nav-list-item"><a href="">Link</a></li> | |
<li class="nav-list-item"><a href="">Link</a></li> | |
</ul> --> | |
</nav> | |
<?php | |
echo '<div class="hero" style="background: url('."'$data->imgLink'".')"></div>' | |
?> | |
<h2 class="ribbon"><?php echo $data->name ?></h2> | |
</header> | |
<div class="main container"> | |
<div class="quick-info"> | |
<ul class="quick-info-list"> | |
<li class="mana quick-info-list-item">Mana: <?php echo $data->mana; ?></li> | |
<li class="attack quick-info-list-item">Attack: <?php echo $data->attack; ?></li> | |
<li class="health quick-info-list-item">Health: <?php echo $data->health; ?></li> | |
<li class="dust quick-info-list-item">Dust: <?php echo $data->dust; ?></li> | |
<li class="return-dust quick-info-list-item">Returned Dust: <?php echo $data->returnDust; ?></li> | |
<li class="golden-dust quick-info-list-item">Golden Dust: <?php echo $data->goldenDust; ?></li> | |
<li class="return-golden-dust quick-info-list-item">Return Golden Dust: <?php echo $data->returnGoldenDust; ?></li> | |
</ul> | |
</div> | |
<div class="basic-info"> | |
<ul class="basic-info-list"> | |
<li class="basic-info-list-item type">Type: <? echo $data->type?> | |
<li class="basic-info-list-item subtype">Subtype: <? echo $data->subtype?> | |
<li class="basic-info-list-item class">Class: <? echo $data->class?> | |
<li class="basic-info-list-item description">Description: <? echo $data->description?> | |
</ul> | |
</div> | |
<div class="about"> | |
<div class="info"> | |
<p><?php echo $data->info ?></p> | |
</div> | |
<div class="lore"> | |
<p><?php echo $data->lore ?></p> | |
</div> | |
</div> | |
<div class= "strategy"> | |
<p><?php echo $data->strategy ?></p> | |
</div> | |
<footer class="footer"> | |
<?php | |
$relatedCards = | |
[ | |
1 => getCardByID($data->relatedLink1, $db), | |
2 => getCardByID($data->relatedLink2, $db), | |
3 => getCardByID($data->relatedLink3, $db), | |
4 => getCardByID($data->relatedLink4, $db) | |
]; | |
for ($i=1; $i <= 4; $i++) { | |
echo "<a href='article.php?card=".$relatedCards[$i]->id."'> | |
<div class='related'> | |
<img src='".$relatedCards[$i]->imgLink."'> | |
<label>".$relatedCards[$i]->name."</label> | |
</div> | |
</a> | |
"; | |
} | |
?> | |
</footer> | |
</div> | |
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script> | |
<script src="js/plugins.js"></script> | |
<script src="js/main.js"></script> | |
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> | |
<script> | |
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= | |
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; | |
e=o.createElement(i);r=o.getElementsByTagName(i)[0]; | |
e.src='https://www.google-analytics.com/analytics.js'; | |
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); | |
ga('create','UA-XXXXX-X','auto');ga('send','pageview'); | |
</script> | |
</body> | |
</html> |