-
Notifications
You must be signed in to change notification settings - Fork 1
/
article.php
executable file
·164 lines (164 loc) · 8.34 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php
include 'app.php';
if (empty($_GET["state"]) || !ValidState($_GET["state"])) header('location:home.php');
$State = $_GET["state"];
$StateName = getState($State,"name");
?>
<?getHeader()?>
<body>
<div class="ui">
<div class="header-box"><?getMenu()?></div>
<div class="box-container">
<!-- <div class="heroic-header" style="background-image: url(assets/dist/img/test-bg.svg)">-->
<div class="has-crr home-header" data-crr-color='<?=$crr_hex?>'>
<div class="content">
<h3><?=getState($State,"name")?></h3>
<span><?=getState($State,"ins_sentense")?></span>
</div>
<a class="btn fab white lg material-icons" style="margin: 0; position: absolute; bottom: -37.5px; left: 60px; z-index: 50" target="_blank" tabindex="-1" href="https://google.com/search?q=<?= getState($State, "name")?>">public</a>
</div>
<br><br>
<div class="chip pui-col xs-12 md-8 md-offset-2" id="state-info">
<div class="pui-col xs-12 md-6">
<i class="material-icons primary-txt">people</i>
<b id="ppl_title">جمعیت:</b>
<span id="ppl_num" style="cursor: default" data-tooltip-container='#ppl_num' data-tooltip="<?=number_format(getState($State,"Population"))?> نفر">
<?=
formatted_number(getState($State,"Population"));
?> نفر (در سال 1395)
</span>
</div>
<div class="pui-col xs-12 md-6">
<i class="material-icons primary-txt">location_city</i>
<b>مرکز استان:</b>
<span><?=getState($State,"city_center")?></span>
</div>
</div>
<div class="cf"></div>
<?php
$StateCode = getState($State,"n");
$getSouvenirs = mysqli_query($db,"SELECT * FROM `Souvenir` WHERE `fstate`=$StateCode AND `active`=1");
if (mysqli_num_rows($getSouvenirs) >= 1) {
$n = 0;
$i = mysqli_num_rows($getSouvenirs);
echo '<div class="chip pui-col xs-12 md-8 md-offset-2">';
echo '<b>سوغات: </b>';
while ($Souvenirs = mysqli_fetch_assoc($getSouvenirs)) {
echo "$Souvenirs[name]";
$n++;
if ($n !== $i) {
echo '، ';
}
}
echo '</div><div class="cf"></div>';
}
?>
<?php
$StateCode = getState($State,"n");
$getMC = mysqli_query($db,"SELECT * FROM `Major_cities` WHERE `fstate`=$StateCode AND `active`=1");
$getMCM = mysqli_query($db,"SELECT * FROM `Major_cities` WHERE `fstate`=$StateCode AND `active`=1");
if (mysqli_num_rows($getMC) >= 1) {
echo '<ul class="st-impcities">';
while ($MC = mysqli_fetch_assoc($getMC)) {
echo "<li>
<button class='btn simple block' data-modal-target='#description-modal-$MC[n]'>$MC[name]</button>
</li>";
}
echo '</ul>';
while ($MCM = mysqli_fetch_assoc($getMCM)) {
echo "
<div class=\"pui-modal\" id=\"description-modal-$MCM[n]\">
<div class=\"inner\">
<div class=\"header\">
<span class=\"modal-title\">$MCM[name]</span>
<button class=\"close modal-close material-icons\">close</button>
</div>
<div class=\"body\">
$MCM[description]
</div>
<div class=\"footer\">
<button class=\"btn simple secondary modal-close\">بستن</button>
</div>
</div>
</div><div class=\"cf\"></div>";
}
}
?>
<main role="main">
<div class="pui-col xs-12 sm-10 sm-offset-1 md-8 md-offset-2">
<div class="container">
<div class="row">
<p style="white-space: pre-line;word-wrap: break-word;word-break: keep-all;">
<?=getState($State,"description")?>
</p>
<?php
$StateCode = getState($State,"n");
?>
<?php
$getWP = mysqli_query($db,"SELECT * FROM `Wonderful_Places` WHERE `fstate`=$StateCode AND `active`=1");
if (mysqli_num_rows($getWP) >= 1) {
?>
<h3>مکان های دیدنی <?=$StateName?></h3>
<section class="cleared">
<?php
while ($WPS = mysqli_fetch_assoc($getWP)) {
echo "<div class='pui-col xs-12' style='padding: 5px'>
<div class='chip' style='margin: 0'>
<h5 style='font-weight: 400'>$WPS[name]</h5>
<p style='font-weight: bold' class='muted-txt'>$WPS[description]</p>
</div>
</div>";
}
?>
</section>
<?php
}
?>
<?php
$getHeroes = mysqli_query($db,"SELECT * FROM `Heroes` WHERE `fstate`=$StateCode AND `active`=1");
if (mysqli_num_rows($getHeroes) >= 1) {
?>
<h3>مشاهیر <?=$StateName?></h3>
<section class="cleared">
<?php
while ($Heroes = mysqli_fetch_assoc($getHeroes)) {
echo "<div class='pui-col xs-12' style='padding: 5px'><div class='chip' style='margin: 0'><h5 style='font-weight: 400'>$Heroes[name]</h5><p style='font-weight: bold' class='muted-txt'>$Heroes[description]</p></div></div>";
}
?>
</section>
<?php
}
?>
<?php
$getPics = mysqli_query($db,"SELECT * FROM `Pics` WHERE `fstate`=$StateCode AND `active`=1");
if (mysqli_num_rows($getPics) >= 1) {
?>
<h3>تصاویر <?=$StateName?></h3>
<div class="images cleared">
<?php
while ($Pics = mysqli_fetch_assoc($getPics)) {
$url = str_replace("*url*",getSetting('url'),$Pics["url"]);
if (!empty($Pics["description"])) {
echo "<div class='pui-col xs-12 sm-6 md-4 lg-3 center-align' data-tooltip='$Pics[description]'>";
}
else {
echo "<div class='pui-col xs-12 sm-6 md-4 lg-3 center-align'>";
}
echo "<img src='$url' class='img img-raised'>";
echo "</div>";
}
?>
</div>
<?php
}
?>
</div>
</div>
</div>
</main>
</div>
<?getButtons()?>
</div>
<?=setTitle('استان ' . getState($State,"name"),1)?>
<script src="assets/crispRipple.min.js"></script>
<?getFooter()?>