]> git.r.bdr.sh - rbdr/r.bdr.sh/blob - jekyll/rosa/index.php
893fd551b37f7d2dbb528d30aeb7bd5d04e41068
[rbdr/r.bdr.sh] / jekyll / rosa / index.php
1 <?php
2 $db = mysql_connect("localhost","abuguet","CambiamE!!");
3 mysql_select_db("abuguet");
4 mysql_set_charset('utf8',$db);
5 ?>
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <title>Generador de Episodios de la Rosa de Guadalupe</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11 <style type="text/css">
12 *{margin: 0; padding: 0;}
13 body{
14 background-image: url(bluebg.png);
15 font-size: .625em;
16 font-family: "Trebuchet MS", sans-serif;
17 }
18 #wrapper{
19 width:460px;
20 margin: 0 auto;
21 }
22 #header{
23 display: block;
24 background-image: url(proximoepisodio.png);
25 height: 147px;
26 }
27
28 #header span{ display: none; }
29
30 #episodio{
31 border-radius: 5px;
32 border: 1px solid #757d83;
33 box-shadow: 0 2px 0 #bdd7e6;
34 font-size: 1.8em;
35 color: #000;
36 background-image: url(whitebg.png);
37 }
38
39 #episodio p{
40 margin: 10px;
41 }
42
43 #refresh{
44 font-size: 1.4em;
45 color: #6a8294;
46 text-shadow: 0 1px 0 #c0d7e5;
47 text-align: center;
48 margin-top: 10px;
49 }
50 </style>
51 <script type="text/javascript">
52
53 var _gaq = _gaq || [];
54 _gaq.push(['_setAccount', 'UA-20018878-2']);
55 _gaq.push(['_trackPageview']);
56
57 (function() {
58 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
59 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
60 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
61 })();
62
63 </script>
64 </head>
65 <body>
66 <div id="wrapper">
67 <a href="/" id="header"><span>En el proximo episodio de la rosa de guadalupe</span></a>
68 <div id="episodio"><p>
69 <?php
70 $nombre = mysql_fetch_row(mysql_query("SELECT * FROM `rosa_de_guadalupe` WHERE `tipo` = 'nombre' order by rand() limit 1"))or die(mysql_error());
71 $causa = mysql_fetch_row(mysql_query("SELECT * FROM `rosa_de_guadalupe` WHERE `tipo` = 'causa' order by rand() limit 1"));
72 $tema = mysql_fetch_row(mysql_query("SELECT * FROM `rosa_de_guadalupe` WHERE `tipo` = 'tema' order by rand() limit 1"));
73 $efecto = mysql_fetch_row(mysql_query("SELECT * FROM `rosa_de_guadalupe` WHERE `tipo` = 'efecto' order by rand() limit 1"));
74 $familiar = mysql_fetch_row(mysql_query("SELECT * FROM `rosa_de_guadalupe` WHERE `tipo` = 'familiar' order by rand() limit 1"));
75 printf("<strong>%s</strong> Hizo <strong>%s</strong> porque su <strong>%s</strong> <strong>%s</strong>. La tratan de matar, se da cuenta que <strong>%s</strong> es <strong>%s</strong>, y la virgencita le ayuda a sobresalir.", $nombre[1], $tema[1], $familiar[1], $causa[1], $tema[1], $efecto[1]);
76 ?>
77 </p></div>
78 <div id="refresh">Refresca para más</a>
79 </div>
80 </body>
81 </html>