-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
164 lines (143 loc) · 6.53 KB
/
index.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 "header.php"; ?>
<div class="container-fluid">
<div class="row-fluid">
<div id="left" class="span4 well">
<?
$tag="dagestan";
$response=getByTag($tag);
$row=1;
unset($_SESSION['response'.$row]);
$_SESSION['response'.$row]=$response;
$len=count($response->data);
for ($i=0; $i < $len ; $i++) {
$thumbnail=$response->data[$i]->images->low_resolution->url;
$link=$response->data[$i]->images->standard_resolution->url;
$author=$response->data[$i]->user->username;
$likes=$response->data[$i]->likes->count;
$comments=$response->data[$i]->comments->count;
if (isset($response->data[$i]->caption->text)) {
$text=$response->data[$i]->caption->text;
$shorttext=cutString($text,$maxlen);
if (strlen($shorttext)<=3) {
$shorttext=substr($text, 0, 54);
}}
else {
$shorttext="Нет описания";
}
$id=$response->data[$i]->id;
?>
<div class="imagediv">
<div class="well image">
<p>by: @<?=$author ?></p>
<a href=imageview.php?id=<?=$i ?>&row=<?=$row ?>><img src=<?=$thumbnail ?>></a>
<div class="info">
<div class="btn-group" style="margin-left: 10px; margin-top: 5px;">
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=2" class="btn"><i class="icon-heart"></i> <?=$likes ?></a>
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=3" class="btn"><i class="icon-comment"></i> <?=$comments ?></a></div>
<p><?=$shorttext ?></p>
</div>
</div>
</div>
<?}?>
</div><!--/span-->
<div id="center" class="span4 well">
<? $response=getByTag("кавказ");
$row=2;
unset($_SESSION['response'.$row]);
$_SESSION['response'.$row]=$response;
$len=count($response->data);
for ($i=0; $i < $len ; $i++) {
$thumbnail=$response->data[$i]->images->low_resolution->url;
$link=$response->data[$i]->images->standard_resolution->url;
$author=$response->data[$i]->user->username;
$likes=$response->data[$i]->likes->count;
$comments=$response->data[$i]->comments->count;
if (isset($response->data[$i]->caption->text)) {
$text=$response->data[$i]->caption->text;
$shorttext=cutString($text,$maxlen);
if (strlen($shorttext)<=3) {
$shorttext=substr($text, 0, 54);
}}
?>
<div class="imagediv">
<div class="well image">
<p>by: @<?=$author ?></p>
<a href=imageview.php?id=<?=$i ?>&row=<?=$row ?> ><img src=<?=$thumbnail ?> /></a>
<div class="info">
<div class="btn-group" style="margin-left: 10px; margin-top: 5px;">
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=2" class="btn"><i class="icon-heart"></i> <?=$likes ?></a>
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=3" class="btn"><i class="icon-comment"></i> <?=$comments ?></a></div>
<p><?=$shorttext ?></p>
</div>
</div>
</div>
<?}?>
</div>
<!--/span-->
<div id="right" class="span4 well">
<? $response=getByTag("анжи");
$row=3;
unset($_SESSION['response'.$row]);
$_SESSION['response'.$row]=$response;
$len=count($response->data);
for ($i=0; $i < $len ; $i++) {
$thumbnail=$response->data[$i]->images->low_resolution->url;
$link=$response->data[$i]->images->standard_resolution->url;
$author=$response->data[$i]->user->username;
$likes=$response->data[$i]->likes->count;
$comments=$response->data[$i]->comments->count;
if (isset($response->data[$i]->caption->text)) {
$text=$response->data[$i]->caption->text;
$shorttext=cutString($text,$maxlen);
if (strlen($shorttext)<=3) {
$shorttext=substr($text, 0, 54);
}}
?>
<div class="imagediv">
<div class="well image">
<p>by: @<?=$author ?></p>
<a href=imageview.php?id=<?=$i ?>&row=<?=$row ?> ><img src=<?=$thumbnail ?>></a>
<div class="info">
<div class="btn-group" style="margin-left: 10px; margin-top: 5px;">
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=2" class="btn"><i class="icon-heart"></i> <?=$likes ?></a>
<a href="/imageview.php?id=<?=$i ?>&row=<?=$row ?>&state=3" class="btn"><i class="icon-comment"></i> <?=$comments ?></a></div>
<p><?=$shorttext ?></p>
</div>
</div>
</div>
<?}?>
</div><!--/span-->
</div><!--/row-->
<footer>
<!--LiveInternet counter--><script type="text/javascript"><!--
document.write("<a href='http://www.liveinternet.ru/click' "+
"target=_blank><img src='//counter.yadro.ru/hit?t11.13;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet: показано число просмотров за 24"+
" часа, посетителей за 24 часа и за сегодня' "+
"border='0' width='88' height='31'><\/a>")
//--></script><!--/LiveInternet-->
<p>© Company 2012</p>
</footer>
</div><!--/.fluid-container-->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/instadag/assets/js/jquery.js"></script>
<script src="assets/js/bootstrap-transition.js"></script>
<script src="assets/js/bootstrap-alert.js"></script>
<script src="assets/js/bootstrap-modal.js"></script>
<script src="assets/js/bootstrap-dropdown.js"></script>
<script src="assets/js/bootstrap-scrollspy.js"></script>
<script src="assets/js/bootstrap-tab.js"></script>
<script src="assets/js/bootstrap-tooltip.js"></script>
<script src="assets/js/bootstrap-popover.js"></script>
<script src="assets/js/bootstrap-button.js"></script>
<script src="assets/js/bootstrap-collapse.js"></script>
<script src="assets/js/bootstrap-carousel.js"></script>
<script src="assets/js/bootstrap-typeahead.js"></script>
</body>
</html>