PageRenderTime 75ms CodeModel.GetById 36ms RepoModel.GetById 0ms app.codeStats 0ms

/novo/estrutura/filmes/galeria/enviar_fotos_form.php

https://github.com/dericksaga/ibsite
PHP | 131 lines | 119 code | 12 blank | 0 comment | 6 complexity | be3dbe67cc920bc54ba14af1b5dde3dc MD5 | raw file
Possible License(s): LGPL-2.1
  1. <script Language="JavaScript">
  2. function validate(theForm) {
  3. if (theForm.pasta.value == "")
  4. {
  5. alert("Selecione o Evento!");
  6. theForm.pasta.focus();
  7. return (false);
  8. }
  9. return (true);
  10. }
  11. </script>
  12. <? $arquivo = "?pg=../estrutura/galeria/admin/enviar_fotos_cod.php";?>
  13. <h3><strong>Enviar Fotos para Evento</strong></h3>
  14. <form action="<?=$arquivo?>" method="post" enctype="multipart/form-data" onsubmit="return validate(this);" >
  15. <fieldset style="width:450;">
  16. <legend><b>Envio de Fotos no formato ZIP</b>&nbsp;</legend>
  17. <br>
  18. <?
  19. $id = $_GET[id];
  20. if(empty($id)){
  21. $sql= mysql_query("SELECT * FROM galeria where destaque='S' order by data desc");
  22. ?>
  23. <select name="pasta" style="width:280">
  24. <option selected>Selecione um Evento</option>
  25. <option>======================================</option>
  26. <? while ($dados=mysql_fetch_array($sql)){?>
  27. <option value=<? echo "$dados[pasta]";?>><? $data=explode("-",$dados[data]); echo "$data[2]/$data[1]/$data[0] - $dados[nome]";?></option>
  28. <? }?>
  29. </select>
  30. <? } else {
  31. $dados=mysql_fetch_array(mysql_query("SELECT * FROM galeria where destaque='S' AND id='$id'"));
  32. ?>
  33. <input type="hidden" name="pasta" value="<?=$dados[pasta]?>">
  34. <? }?>
  35. <br>
  36. <br>
  37. <Table align="center" cellpadding="2" cellspacing="0">
  38. <tr bgcolor="#e5e5e5">
  39. <td width="65" align="right" valign="middle"><strong>Fotos:</strong></td>
  40. <td valign="middle" bgcolor="#e5e5e5">
  41. Arquivo zip com todas as fotos.<br>
  42. <input name='fotos_zip' type='file' size=30>
  43. </td>
  44. </tr>
  45. </table>
  46. <table width="400" align="center" cellpadding="0" cellspacing="0">
  47. <tr>
  48. <td height="35" colspan="4" align="center">
  49. <INPUT Type="submit" Value="Enviar">
  50. </td>
  51. </tr>
  52. </table>
  53. </fieldset>
  54. <input type="hidden" name="acao" value="zip">
  55. </form>
  56. <br>
  57. <br>
  58. <!-- desabilita
  59. <form action="<?=$arquivo?>" method="post" enctype="multipart/form-data" onsubmit="return validate(this);" >
  60. <fieldset style="width:450;">
  61. <legend><b>Envio de Fotos no formato JPG</b> (5 fotos por vez)&nbsp;</legend>
  62. <br>
  63. <select name="pasta" style="width:280">
  64. <option selected>Selecione um Evento</option>
  65. <option>======================================</option>
  66. <?
  67. $sql= mysql_query("SELECT * FROM galeria where destaque='S' order by data desc");
  68. while ($dados=mysql_fetch_array($sql)){?>
  69. <option value=<? echo "$dados[pasta]";?>><? $data=explode("-",$dados[data]); echo "$data[2]/$data[1]/$data[0] - $dados[nome]";?></option>
  70. <? }?>
  71. </select>
  72. <br>
  73. <br>
  74. <Table align="center" cellpadding="2" cellspacing="0">
  75. <tr bgcolor="#e5e5e5">
  76. <td width="65" align="right" valign="middle"><strong>Foto 01:</strong></td>
  77. <td valign="middle" bgcolor="#e5e5e5">
  78. <strong>
  79. <input name='foto01' type='file' size=30>
  80. </strong></td>
  81. </tr> <tr>
  82. <td align="right" valign="middle"><strong>Foto 02:</strong></td>
  83. <td valign="middle">
  84. <strong>
  85. <input name='foto02' type='file' size=30>
  86. </strong></td>
  87. </tr> <tr bgcolor="#e5e5e5">
  88. <td align="right" valign="middle"><strong>Foto 03:</strong></td>
  89. <td valign="middle">
  90. <strong>
  91. <input name='foto03' type='file' size=30>
  92. </strong></td>
  93. </tr> <tr>
  94. <td align="right" valign="middle"><strong>Foto 04:</strong></td>
  95. <td valign="middle">
  96. <strong>
  97. <input name='foto04' type='file' size=30>
  98. </strong></td>
  99. </tr> <tr bgcolor="#e5e5e5">
  100. <td align="right" valign="middle"><strong>Foto 05:</strong></td>
  101. <td valign="middle">
  102. <strong>
  103. <input name='foto05' type='file' size=30>
  104. </strong></td>
  105. </tr>
  106. </table>
  107. <table width="400" align="center" cellpadding="0" cellspacing="0">
  108. <tr>
  109. <td height="35" colspan="4" align="center">
  110. <INPUT Type="submit" Value="Enviar Fotos" name="jpg">
  111. </td>
  112. </tr>
  113. </table>
  114. </fieldset>
  115. <input type="hidden" name="acao" value="normal">
  116. </form>
  117. <br>
  118. <br>
  119. -->