1
0

multiup.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /* $Id: multiup.php 2893 2007-04-14 13:20:30Z b4rt $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. // prevent direct invocation
  16. if ((!isset($cfg['user'])) || (isset($_REQUEST['cfg']))) {
  17. @ob_end_clean();
  18. @header("location: ../../index.php");
  19. exit();
  20. }
  21. /******************************************************************************/
  22. // is enabled ?
  23. if ($cfg["enable_multiupload"] != 1) {
  24. AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: ".$cfg["user"]." tried to use multiupload");
  25. @error("multiupload is disabled", "index.php?iid=index", "");
  26. }
  27. // init template-instance
  28. tmplInitializeInstance($cfg["theme"], "page.multiup.tmpl");
  29. // form
  30. $row_list = array();
  31. for ($j = 0; $j < $cfg["hack_multiupload_rows"]; ++$j)
  32. array_push($row_list, array());
  33. $tmpl->setloop('row_list', $row_list);
  34. // queue
  35. $tmpl->setvar('queueActive', (FluxdQmgr::isRunning()) ? 1 : 0);
  36. //
  37. $tmpl->setvar('file_types_label', $cfg['file_types_label']);
  38. //
  39. $tmpl->setvar('_UPLOAD', $cfg['_UPLOAD']);
  40. $tmpl->setvar('_SELECTFILE', $cfg['_SELECTFILE']);
  41. $tmpl->setvar('_ID_IMAGES', $cfg['_ID_IMAGES']);
  42. $tmpl->setvar('_MULTIPLE_UPLOAD', $cfg['_MULTIPLE_UPLOAD']);
  43. //
  44. $tmpl->setvar('enable_multiupload', $cfg["enable_multiupload"]);
  45. tmplSetTitleBar($cfg["pagetitle"].' - '.$cfg['_MULTIPLE_UPLOAD']);
  46. tmplSetFoot();
  47. tmplSetIidVars();
  48. // parse template
  49. $tmpl->pparse();
  50. ?>