Subversion-Projekte lars-tiefland.content-management

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        require_once "connect2.php";
        if (is_array($delete))
        {
                foreach($delete as $elem)
                {
                        unlink($elem);
                }
        }
        
        if ($reenter)
        {
                $query="update $Tab set $Feld = '$reenter' where ID = '$ID'";
                $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");
?>
<script language="Javascript">
opener.location.href=opener.location.href;
</script>
<?
        }

        $query="SELECT Language,$Feld FROM $Tab where ID = '$ID'";
        $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");
        $zeile=mysql_fetch_array($result);
?>
<html>
<head>
<title><? echo $site ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel=stylesheet type="text/css" href="redaktion.css">
<style type="text/css"><? require_once "redaktion.css"; ?></style>
</head>

<body bgcolor="#<? echo $webs[bgcolor_seite]; ?>" leftmargin="0" topmargin="0" marginwidth="00" marginheight="0" text="#000000">
<form name="form1" method="post" action="<? echo $self ?>">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td colspan="2"> 
        <input type="submit" value="markierte Dateien l&ouml;schen" class="button" name="action">
                <input type="hidden" name="Tab" value="<? echo $Tab ?>">
                <input type="hidden" name="Feld" value="<? echo $Feld ?>">
        <input type="hidden" name="bild_dir" value="<? echo $bild_dir ?>">
        <input type="hidden" name="ID" value="<? echo $ID ?>">
      </td>
    
    <?
        $image_Path=$webs[verzeichnis]."/images/".$bild_dir."/";

        $handle=opendir($image_Path); 
        $counter = 0;
        while ($file = readdir ($handle))
        { 
        if ($file != "." && $file != ".." && $file != $zeile[$Feld] && strncmp ($ID."_".$zeile[Language]."_", $file, strpos ($file, "_" ,strpos ($file, "_"))) == 0)
                {
                        $counter++;
                        $size= filesize ($image_Path.$file) >> 10;
                        $imgsize = GetImageSize ($image_Path.$file);
?>
    <tr> 
      <td> 
        <?
        if ($imgsize) { 
?>
        <img src="http://www.<? echo $site."/images/".$bild_dir."/".$file ?>" border="0" height="60"> 
        <? 
        } 
        else
        {
?>
        &nbsp; 
        <?
        }
?>
      </td>
      <td width="100%">
 <a href="http://www.<? echo $site."/images/".$bild_dir."/".$file ?>" target="blank"> 
        <? echo $file ?>
        </a><br>
        <?
        echo "$size KB";
        if ($imgsize) { echo "&nbsp;( $imgsize[0]x$imgsize[1] )"; }
?>
        <br>
        <table border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><a href="<? echo $self ?>?reenter=<? echo $file ?>&Tab=<? echo $Tab ?>&Feld=<? echo $Feld ?>&bild_dir=<? echo $bild_dir ?>&ID=<? echo $ID ?>"><img src="../editor/images/tasklist.gif" alt="Datei einsetzten" border="0"></a></td>
            <td><a href="<? echo $self ?>?delete[]=<? echo $image_Path.$file ?>&Tab=<? echo $Tab ?>&Feld=<? echo $Feld ?>&bild_dir=<? echo $bild_dir ?>&ID=<? echo $ID ?>"><img src="../editor/images/delete.gif" alt="Datei sofort l&ouml;schen" border="0"></a></td>
            <td> 
              <input type="checkbox" name="delete[]" value="<? echo $image_Path.$file ?>">
            </td>
          </tr>
        </table>
      </td>
        </tr>
<tr><td colspan=2>
        <hr noshade width="100%">
      </td></tr>
      <?
                }
        }
?>
<?
        if ($counter == 0)
        {
?>
<tr>
        <td colspan=2>
                <script language="Javascript">
                alert("Es sind keine Dateien gespeichert.");
                window.close();
                </script>
        </td>
</tr>
<?
        }
?>
  </table>
</form>
</body>
</html>