-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharticle.php
82 lines (71 loc) · 2.09 KB
/
article.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
// Enable debug mode by setting IAP_DEBUG, could be false even.
// $IAP_DEBUG_ = true;
// Include useful scripts.
include '.include/article_age.php';
include '.include/utilities.php';
$dbuser = 'rsinnet_webuser';
$dbpass = 'Z?Z07uwL#(4g';
$con = iap_sql_connect();
$topics_list = iap_get_topics($con);
$article_id = $_GET['id'];
$article_blog_file = "resources/" . $article_id . ".php";
$sql_query = "SELECT title, subtitle, date, topic_id,
(SELECT name FROM topics WHERE id=topic_id) AS topic,
TO_DAYS(NOW()) - TO_DAYS(date) AS age
FROM articles WHERE id='" . $article_id . "'";
$result = $con->query($sql_query);
$row = $result->fetch_array();
$article_title = $row['title'];
$article_subtitle = $row['subtitle'];
$article_date = $row['date'];
$article_topic_id = $row['topic_id'];
$article_topic = $row['topic'];
$topic = $article_topic;
$article_age = new ArticleAge($row['age']);
$result->close();
include '.include/recent_articles.php';
?>
<!DOCTYPE HTML>
<!--
TXT 2.0 by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title><?php echo $article_title; ?> - I AM PHILOSOPHER</title>
<?php echo file_get_contents('.include/topic_html_head.html'); ?>
</head>
<body>
<!-- Header -->
<?php include '.include/topic_header.php' ?>
<!-- Nav -->
<?php include '.include/navbar.php' ?>
<!-- Main -->
<div id="main-wrapper">
<div id="main" class="container">
<div class="row">
<div class="12u skel-cell-mainContent">
<div class="content">
<!-- Content -->
<article class="is-page-content">
<?php
$foo_article_title = $article_title;
$foo_article_subtitle = $article_subtitle;
$foo_article_age = $article_age;
include '.include/article_header.php';
include $article_blog_file;
?>
</article>
<!-- /Content -->
</div>
</div>
</div>
</div>
</div>
<!-- /Main -->
<!-- Footer -->
<?php include '.include/topic_footer.php'; ?>
</body>
</html>