/
ex.php
131 lines (80 loc) · 3.15 KB
/
ex.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>I Will</title>
<meta name="description" content="A continuous rendering of future representations">
<meta name="author" content="gui machiavelli, guilherme machiavelli">
<meta name="keywords" content="glitching, glitch, glitches, databending, twitter, guilherme machiavelli, gui machiavelli" />
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
-->
<!-- CSS : implied media="all" -->
<link href='http://fonts.googleapis.com/css?family=IM+Fell+French+Canon:400,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/styles.css" type="text/css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="js/libs/modernizr-1.6.min.js"></script>
<script src="js/libs/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
function loadPics() {
$.getJSON('tweets.json', function(data) {
var html = '';
window.nAux = data.images.length;
var counter = 0;
$.each(data.images, function(i, item) {
setTimeout(function(){
html = '<a href="' + item.file + '.jpg"><img width="43" src="' + item.file + '.jpg" alt="" title="' + item.text + '" /></a> <p>' + item.text +'</p>';
counter++;
$('#main.render a:first-child').before(html);
if ( i == 100 ) return false;
if(--window.nAux == 0) //If cycle ended...
setTimeout('loadPics()', 6000); //Start again in 6 seconds
}, 6000*i); //Wait 6 seconds
});
//$('#main').prepend(html);
//setTimeout("loadPics()",30000);
});
};
setTimeout("loadPics()",6000);
setTimeout("location.reload(true);",360000);
</script>
</head>
<body>
<div id="wrap">
<header>
<h1><a href="index.php">I Will</a></h1>
<h2>A continuous rendering of future representations</h2>
</header>
<?php
require_once('includes/con.php');
//$result = mysql_query("SELECT * FROM tweet_info ORDER BY id DESC LIMIT 200 ");
$result = mysql_query("SELECT * FROM tweet_info ORDER BY id DESC LIMIT 30");
?>
<section id="main" class="render">
<?php
$counter = 0;
while($row = mysql_fetch_array($result)) {
/*
$counter++;
if ($counter < 100) {
continue;
} else {
*/
$the_tweet = $row['tweet'];
$the_user = 'images/future/';
$the_user .= $row['user'];
$the_user .= $row['file_extension'];
echo("<a href=\"$the_user\"><img src=\"$the_user\" title=\"$the_tweet\" alt=\"\" width=\"43\"></a>");
echo("<p>$the_tweet</p>");
//}
}
mysql_close($con);
?>
</section>
</div>
</body>
</html>