Viewing file: index.php (11.89 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php;
$cache_life = 120;
/*
$visitas = 0;
$fp = fopen("./visitantes.txt","r"); //no olvidar crear al archivo visitantes.txt y poner el path correcto
$visitas = intval(fread($fp,100));
$visitas++;
fclose($fp);
unset ($fp);
$fp2 = fopen("./visitantes.txt","w+") ;
fwrite($fp2, $visitas);
fclose($fp2);
*/
include('cacheton.php');
$timeorigen= microtime();
?>
<?php
session_start();
$_SESSION["autentificado"]= "SI";
$_SESSION["matricula"]="yo";
$_SESSION["grupo"]=mismo;
$_SESSION["autentificado"]= "SI";
$_SESSION["matricula"]=$res['nombre_usuario'];
$_SESSION["grupo"]=$res['grupo'];
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<BASE TARGET='ventana'>
</head>
<?php
include "../frames/conn.php";
//make class file require
require('xpMenu.class.php');
//construct the class
$xpmenu = new xpMenu();
//add category and options on menu
//use the format:
//addMenu("short_name")
//addCategory("short_name", "name", "image", "menu")
//addOption("short_name", "name", "image", "link", "category", "menu")
//remember: short_name can be anything without spaces or specials chars
$querytotal=" SELECT count( * ) as total FROM libros WHERE inftp=1 ";
$restotal=mysql_query($querytotal,$conn);
$rowtotal=mysql_fetch_array($restotal);
$counter=0;
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("inicio", "inicio", "icons/home.png", "menu".$counter);
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$posicion = (strrpos($user_agent, "MSIE") or strrpos($user_agent, "Chro"));
$xpmenu->addOption("inicio", "pagina inicial", "icons/home.png", "../frames/tab/index.php", "inicio", "menu".$counter);
$counter++;
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("Ver TODOS los libros", "Total <font color='red'><b>".$rowtotal['total']." libros</b></font> ", "icons/network.gif", "menu".$counter);
$xpmenu->addOption("Ver TODOS los libros","Ver TODOS los libros", "icons/folder_open.gif", "../frames/listagenero.php","Ver TODOS los libros", "menu".$counter);
$counter++;
$querytotal="select count(distinct(autor)) as autores from libros where inftp=1" ;
$restotal=mysql_query($querytotal,$conn);
$rowtotal=mysql_fetch_array($restotal);
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("Ver TODOS los autores", "Total <font color='red'><b>".$rowtotal['autores']." Autores</b></font> ", "icons/network.gif", "menu".$counter);
$xpmenu->addOption("Ver TODOS los autores","Ver TODOS los autores", "icons/folder_open.gif", "../frames/listaautores.php","Ver TODOS los autores", "menu".$counter);
$counter++;
$querygenero="select distinct(genero) from tipo";
$resgenero=mysql_query($querygenero,$conn);
while($rowgenero=mysql_fetch_array($resgenero)){
$xpmenu->addMenu("menu".$counter);
$squery="SELECT count( * ) as contador FROM libros WHERE genero = '{$rowgenero['genero']}' and inftp=1";
$num=mysql_fetch_array($res=mysql_query("SELECT count( * ) as contador FROM libros WHERE genero = '{$rowgenero['genero']}' and inftp=1",$conn));
$xpmenu->addCategory($rowgenero['genero'], $rowgenero['genero']." <font color='red'><b>".$num['contador']." libros</b></font> ", "icons/network.gif", "menu".$counter);
$querysubgenero="select subgenero from tipo where genero='".$rowgenero['genero']."' order by subgenero asc";
$ressubgenero=mysql_query($querysubgenero,$conn);
echo mysql_error();
while ($rowsubgenero=mysql_fetch_array($ressubgenero)){
//echo "SELECT count( * ) as contador FROM libros WHERE genero = '{$rowgenero['genero']}' and subgenero='{$rowsubgenero['subgenero']}' and inftp=1";
$num=mysql_fetch_array($res=mysql_query("SELECT count( * ) as contador FROM libros WHERE genero = '{$rowgenero['genero']}' and subgenero='{$rowsubgenero['subgenero']}' and inftp=1",$conn));
$xpmenu->addOption($rowsubgenero['subgenero'], $rowsubgenero['subgenero']." <font color='red'><b>".$num['contador']." libros</b></font> ", "icons/folder_open.gif", "../frames/listagenero.php?genero={$rowgenero['genero']}&subgenero={$rowsubgenero['subgenero']}",$rowgenero['genero'], "menu".$counter);
}
$counter++ ;
}
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("misc", "Miscel�nea", "icons/network.gif", "menu".$counter);
$xpmenu->addOption("pruebas", "Compartir libro/<br><img src='../frames/transparente.gif' width=20 height=1'>mis subidas", "icons/news.gif", "../frames/ftp_intermedio.php", "misc", "menu".$counter);
// $xpmenu->addOption("compartir", "compartir libro en FB2", "icons/news.gif", "../frames/AJAX/provincias_ajax/default2.php?libro=fb2", "misc", "menu".$counter);
$xpmenu->addOption("foronuevo", "<b>FORO</B>", "icons/news.gif", "../phpbb3/index.php", "misc", "menu".$counter);
// $xpmenu->addOption("foro", "foro antiguo", "icons/news.gif", "../frames/foroviejoaviso.php", "misc", "menu".$counter);
$xpmenu->addOption("edicion", "Agregar Sinopsis", "icons/news.gif", "../frames/synopsis.php", "misc", "menu".$counter);
$xpmenu->addOption("COOLreader", "COOLreader 3.0.36", "icons/news.gif", "http://9fx.us/cr3_0_36", "misc", "menu".$counter);
$xpmenu->addOption("Gestionarlibros.exe", "Gestionarlibros.exe", "icons/news.gif", "../phpbb3/viewtopic.php?f=4&t=2240", "misc", "menu".$counter);
$counter++;
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("search", "BUSQUEDA Libros/Autores", "icons/search.gif", "menu".$counter);
$xpmenu->addOption("buscar", "busqueda", "icons/search.gif", "../frames/formulbusca.php", "search", "menu".$counter);
$counter++;
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("enlaces", "Enlaces de interes", "icons/link20x20.gif", "menu".$counter,TRUE);
$xpmenu->addOption("enlace", "Lectoreselectronicos.com", "icons/link20x20.gif", "http://www.lectoreselectronicos.com", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace1", "El blog de Darklooker", "icons/link20x20.gif", "http://www.papyrefb2.net/wp/", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace2", "Grammata.es", "icons/link20x20.gif", "http://www.grammata.es", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace3", "compartelibros.com", "icons/link20x20.gif", "http://www.compartelibros.com", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace4", '"Las" Angeles de Charlie', "icons/link20x20.gif", "http://audiosyebooks.blogspot.com/", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace5", "El Blog de Andromeda", "icons/link20x20.gif", "http://fegoal.blogspot.com/search/label/Ebook", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace6", "El Blog de LARdt", "icons/link20x20.gif", "http://mipapyreebookreader.blogspot.com", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace7", "leyendo Digital", "icons/link20x20.gif", "http://www.leyendodigital.com", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace8", "Tinta-E", "icons/link20x20.gif", "http://tinta-e.blogspot.com", "enlaces", "menu".$counter,TRUE);
$xpmenu->addOption("enlace9", "El Blog de Hugo Orell", "icons/link20x20.gif", "http://hugoorell.wordpress.com/category/libros/", "enlaces", "menu".$counter,TRUE);
$counter++;
/*************
$xpmenu->addMenu("menu".$counter);
$xpmenu->addCategory("dime algo!", "dime algo!", "icons/note20x20.gif", "menu".$counter);
$xpmenu->addOption("dejame un comentario", "dejame un comentario", "icons/note20x20.gif", "../frames/comentarios.php", "dime algo!", "menu".$counter);
$counter++;
*/////////////
mysql_close ($conn);
?>
<html>
<head>
<?php
//javascript for the menu
echo $xpmenu->javaScript();
//css for menu
echo $xpmenu->style();
?>
</head>
<body bgcolor='#FFFFFF' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>
<table border='1' cellspacing='1' cellpadding='0' width='100%' height=30 bgcolor='#f1f1ed'>
<tr>
<?php
for ($f=0;$f<$counter;$f++){
echo "<td valign='top'> ";
//show menu (put this where you want to show the XP Menu)
echo $xpmenu->mountMenu("menu".$f);
echo "</td></tr><tr>";
}
?>
</tr>
<tr><td>
<p><a href="http://feeds2.feedburner.com/exofire/NeUY"><img src="http://feeds2.feedburner.com/~fc/exofire/NeUY?bg=99CCFF&fg=444444&anim=0" height="26" width="88" style="border:0" alt="" /></a></p>
<p>
<!-- AddToAny BEGIN -->
<a href="http://www.addtoany.com/subscribe?linkname=Libros%20y%20noticias%20www.papyrefb2.net&linkurl=http%3A%2F%2Ffeeds2.feedburner.com%2Fexofire%2FNeUY"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" border="0" alt="Subscribe"/></a>
<!-- AddToAny END -->
</tr><tr><td>
<?php
/*
*/
// contador de visitas
//echo ' Contador:<font color="red"> '.$visitas.' </font> visitas distintas<br>';
?>
<?php //este el el contador de visita del usuario por cookie ?>
<SCRIPT LANGUAGE="JavaScript">
var caution = false
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000)
document.cookie = curCookie
else
if (confirm("La cookie no puede pesar mas de 4kb!"))
document.cookie = curCookie
}
function getCookie(name) {
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime()
if (skew > 0)
date.setTime(date.getTime() - skew)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000)
var visits = getCookie("counter")
if (!visits)
visits = 1
else
visits = parseInt(visits) + 1
setCookie("counter", visits, now)
document.write("Esta es tu visita numero: <font color='red'>" + visits+"</font>")
</script>
<br>
<!-- c�digo a�adido por ecoestadistica.com -->
<script type="text/javascript" language="JavaScript">
document.write('<script language="Javascript" src="http://www.ecoestadistica.com/Control.php?rp_id=392170154&rp_hrf='+document.getElementById(392170154).href+'&rp_loc='+escape(document.location)+'&rp_ref='+escape(document.referrer)+'&rp_scr='+screen.width+'x'+screen.height+'"><\/script>');
</script>
<!-- fin del c�digo a�adido por ecoestadistica.com -->
<br>
<? //<script type="text/javascript" src="http://jd.revolvermaps.com/r.js"></script><script type="text/javascript">rm_f1st('5','180','false','true','f5f5f5','3kwotsxjhug','false','54ff00');</script><noscript><applet codebase="http://rd.revolvermaps.com/j" code="core.RE" width="180" height="180" archive="g.jar"><param name="cabbase" value="g.cab" /><param name="r" value="false" /><param name="n" value="true" /><param name="i" value="3kwotsxjhug" /><param name="m" value="5" /><param name="s" value="180" /><param name="c" value="54ff00" /><param name="v" value="false" /><param name="b" value="f5f5f5" /><param name="rfc" value="true" /></applet></noscript>
?>
</table>
</body>
</html>
|