Viewing file: recopilatorio_en_zip_generos.php (1.13 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include "../frames/conn.php"; include "../frames/classes/dZip.inc.php"; if (!$_REQUEST['subgenero']){ die("error"); }else{ $subgenero=$_REQUEST['subgenero']; }
$sql="SELECT * FROM ".BBDD.".libros where INFTP=1 and subgenero like '%$subgenero%'order by id asc "; $res=mysql_query($sql,$conn); echo mysql_error();
unlink ("../automatas/recopilacion$subgenero".date("Y-m-d_HH:mi").".zip");
$zip = new dZip("../automatas/recopilacion$subgenero".date("Y-m-d_HH:mi").".zip");
while ($row=mysql_fetch_array($res)){
$vard=split('/libros/', $row['ruta']); echo "\n";
$titulo=trim($vard[1]); echo "el titulo es <pre>"; echo $titulo."<br>"; if (@fopen("./backup/TODOS/$titulo","r")){ echo "$titulo tomado del backup<br>"; $zip->addFile("./backup/TODOS/$titulo","$titulo"); }else{ $zip->addfile("../libros/$titulo","$titulo"); }
//print_r($zip); echo "ok \n"; }
//print_r($zip); $zip->save(); echo "fichero:<br>"; echo "<a href='http://papyrefb2.net/automatas/recopilacion$subgenero".date("Y-m-d_HH:mi").".zip'>recopilacion$subgenero".date("Y-m-d_HH:mi").".zip</a>";
|