Ir para conteúdo
Fórum Script Brasil

imultimidia

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre imultimidia

imultimidia's Achievements

0

Reputação

  1. Boa tarde pessoal, Estou tendo uma certa dificuldade, neste arquivo envio multiplas imagens está funcionando, porém preciso redimensioná-las, qual classe vocês indicam e como devo implantar neste código: Desde já agradeço a todos pela ajuda! <?php if(session_is_registered("$var_sessaor")) { ?> <?php include("FCKeditor/fckeditor.php"); include_once ('Redimensiona.php'); $id=$_GET['id']; require('saidas.php'); if(isset($_POST['enviar'])) { $i = 0; foreach ($_FILES['foto']["error"] as $key => $error) { $name = md5(uniqid(rand(),true)); $nome = $name.'.jpg'; $destino = '../imgs/projetos_fotos/' .$nome; move_uploaded_file( $_FILES['foto']['tmp_name'][$i], $destino ); { mysql_query("INSERT INTO projetos_fotos (projetos,foto,legenda) VALUES ('$id','$nome','$legenda')"); } $i++; } throw_alert('Fotos enviadas com sucesso!','?p=projetos_fotos2&id='.$id); } elseif(isset($_GET['foto'])) { $fotoid=$_GET['foto']; $select=mysql_query("SELECT * FROM projetos_fotos WHERE id='$fotoid'"); $vessel=mysql_fetch_array($select); @unlink('../imgs/projetos_fotos/'.$vessel['foto']); $del=mysql_query("DELETE FROM projetos_fotos WHERE id='$fotoid'"); if($del) throw_alert('Foto removida com sucesso.','?p=books_fotos&id='.$vessel['books']); } ?> <!--Stylesheets--> <link href="uploader/jquery.filer.css" type="text/css" rel="stylesheet" /> <link href="uploader/themes/jquery.filer-dragdropbox-theme.css" type="text/css" rel="stylesheet" /> <!--jQuery--> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript" src="uploader/jquery.filer.min.js?v=1.0.5"></script> <script type="text/javascript" src="uploader/custom.js?v=1.0.5"></script> <!--GERAL--> <div class="panel panel-default"> <div style="margin-top:10px; padding:5px;" class="borda"> <h1>Fotos para o Book</h1> <p><a href="?p=projetos" class="btn btn-default" style="width: 115px;">Voltar</a></p> </div> <div class="panel-heading no-collapse"> <span >Cadastrar fotos para: </span> <span style="font-weight:bold;"> <?php $id=$_GET['id']; $select=mysql_query("SELECT * FROM projetos WHERE id='$id'"); $display=mysql_fetch_array($select); print ''.$display['titulo'].''; ?> </span> </div> <!--form--> <div style="margin-top:30px; padding:10px; overflow:hidden; max-width:800px;" > <form action="?p=projetos_fotos2&id=<?php print $id; ?>" method="post" enctype="multipart/form-data"> <input type="file" name="foto[]" id="filer_input" multiple="multiple"> <input type="submit" value="Submit" name="enviar"> </form> </div> <!-- form--> <div class="panel-heading no-collapse" style="margin-top:40px;"> <span >Fotos Cadastradas</span> </div> <!--fotos--> <div style="margin-top:30px; overflow:hidden;"> <?php $sql = mysql_query("SELECT * FROM projetos_fotos WHERE projetos='$id' ORDER BY id DESC LIMIT 100"); while($x = mysql_fetch_array($sql)) { ?> <div align="center" style="width:200px; height:200px; float:left; background-color:#F4F4F4; padding:7px; margin:10px;"> <img src="../imgs/projetos_fotos/<?=$x['foto'];?>" width="185" height="139" border="0" /><br> <!--<div style="font-size:11px; margin-top:10px;">'.$display['legenda'].'</div><br />--> <div align="center" style="margin-top:10px;"> <a href="?p=projetos_fotos&foto=<?=$x['id'];?>" class="btn btn-default" onclick="return confirm('Deseja mesmo remover?')" > Excluir Foto</a> </div> </div> <?php } ?> </div> <!--fotos--> </div> <!--GERAL--> <?php } ?>
×
×
  • Criar Novo...