[ Index ]
 

Code source de DokuWiki 2006-11-06

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/exe/ -> mediamanager.php (source)

   1  <?php
   2      if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
   3      define('DOKU_MEDIAMANAGER',1);
   4      require_once (DOKU_INC.'inc/init.php');
   5      require_once (DOKU_INC.'inc/lang/en/lang.php');
   6      require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
   7      require_once (DOKU_INC.'inc/media.php');
   8      require_once (DOKU_INC.'inc/common.php');
   9      require_once (DOKU_INC.'inc/search.php');
  10      require_once (DOKU_INC.'inc/template.php');
  11      require_once (DOKU_INC.'inc/auth.php');
  12      session_write_close();  //close session
  13  
  14  
  15      // get namespace to display (either direct or from deletion order)
  16      if($_REQUEST['delete']){
  17          $DEL = cleanID($_REQUEST['delete']);
  18          $NS  = getNS($DEL);
  19      }elseif($_REQUEST['edit']){
  20          $IMG = cleanID($_REQUEST['edit']);
  21          $NS  = getNS($IMG);
  22      }elseif($_REQUEST['img']){
  23          $IMG = cleanID($_REQUEST['img']);
  24          $NS  = getNS($IMG);
  25      }else{
  26          $NS = $_REQUEST['ns'];
  27          $NS = cleanID($NS);
  28      }
  29  
  30      // check auth
  31      $AUTH = auth_quickaclcheck("$NS:*");
  32  
  33      // create the given namespace (just for beautification)
  34      if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); }
  35  
  36      // handle upload
  37      if($_FILES['upload']['tmp_name']){
  38          $JUMPTO = media_upload($NS,$AUTH);
  39          if($JUMPTO) $NS = getNS($JUMPTO);
  40      }
  41  
  42      // handle meta saving
  43      if($IMG && $_REQUEST['do']['save']){
  44          $JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']);
  45      }
  46  
  47      // handle deletion
  48      if($DEL) {
  49          $INUSE = media_delete($DEL,$AUTH);
  50      }
  51  
  52      // finished - start output
  53      header('Content-Type: text/html; charset=utf-8');
  54      include(template('mediamanager.php'));


Généré le : Tue Apr 3 20:47:31 2007 par Balluche grâce à PHPXref 0.7