myGully.com Boerse.SH - BOERSE.AM - BOERSE.IO - BOERSE.IM Boerse.BZ .TO Nachfolger
Zurück   myGully.com > Webmaster Talk
Seite neu laden

fragen bezüglich PHP und css

Willkommen

myGully

Links

Forum

 
 
 
Themen-Optionen Ansicht
Prev Vorheriger Beitrag   Nächster Beitrag Next
Ungelesen 03.11.08, 21:47   #1
K1llerkanack3
Newbie
 
Registriert seit: Oct 2008
Ort: Bayern
Beiträge: 95
Bedankt: 2
K1llerkanack3 ist noch neu hier! | 0 Respekt Punkte
Standard fragen bezüglich PHP und css

Hallo
ich hab mir ein Datei-Auflist-S***** gehol hier:

Code:
<?php

  // FileList 1.5
  // Copyright (c) 2006-2008 Werner Rumpeltesz <[email protected]>

  // Directory that contains the files and folders
  $BaseDir = "files";

  // Filename of the des*****ion file
  $DescFile = "des*****ions.csv";

  // The following file extensions will be hidden in the file list
  $ExcludeFileExts = array("php","inc","html");

  // Default column for sorting
  // Possible values are:
  //   "name" for the filename (ascending)
  //   "size" for file size (ascending)
  //   "time" for the modification time (descending)
  //   "desc" for the des*****ion (ascending)
  $DefaultSort = "name";
	
	// Language (to use English, please uncomment the following line)
	//include_once("language\english.php");

  // Path to the item include file "inc_item.php"
  $IncludeItemFile = "inc_item.php";

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>FileList</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel=stylesheet type="text/css" href="main.css">
<link rel=stylesheet type="text/css" href="filelist.css">
</head>
<body>

<h1> </h1>
<p>  <a href="http://www.gaijin.at/"> </a></p>
<br>



<!-- *** EIGENER TEXT (ober der Dateiliste) *** -->


<!-- Beginn: Titelzeile für Tabelle -->
<?php
  if (isset($_GET['dir'])) $CurrentDir = trim($_GET['dir']); else $CurrentDir = "";
  if (isset($_GET['sort'])) $SortMode = substr(trim($_GET['sort']), 0, 3); else $SortMode = $DefaultSort;
?>
<table class="FileListTable">
<tr>

  <td class="FileListCellTitle">&nbsp;<?php
      if ($SortMode != "name")
        echo "<b><a href=\"".$_SERVER['PHP_SELF']."?dir=".$CurrentDir."&amp;sort=name\">".GetLangStr("FileName", "Dateiname")."</a></b>";
      else
        echo "<b>".GetLangStr("FileName", "Dateiname")."</b>"; ?>&nbsp;</td>

  <td class="FileListCellTitle" style="text-align:right;">&nbsp;<?php
      if ($SortMode != "size")
        echo "<b><a href=\"".$_SERVER['PHP_SELF']."?dir=".$CurrentDir."&amp;sort=size\">".GetLangStr("FileSize", "Größe")."</a></b>";
      else
        echo "<b>".GetLangStr("FileSize", "Größe")."</b>"; ?>&nbsp;</td>

  <td class="FileListCellTitle" style="text-align:center;">&nbsp;<?php
      if ($SortMode != "time")
        echo "<b><a href=\"".$_SERVER['PHP_SELF']."?dir=".$CurrentDir."&amp;sort=time\">".GetLangStr("FileModTime", "Änderungszeit")."</a></b>";
      else
        echo "<b>".GetLangStr("FileModTime", "Änderungszeit")."</b>"; ?>&nbsp;</td>


</tr>
<?php
  ShowFileList($CurrentDir);
?>
</table>
<!-- Ende: Titelzeile für Tabelle -->


<!-- *** EIGENER TEXT (unter der Dateiliste) *** -->



</body>
</html>

<?php

function IsFileExcluded($FileName) {
  global $ExcludeFileExts;

  if (is_dir($FileName)) return False;

  $path_parts = pathinfo($FileName);
  $ext = strtolower($path_parts["extension"]);
  return (in_array($ext, $ExcludeFileExts));
}

function ShowFileList($CurrentDir) {
  global $BaseDir, $DescFile, $SortMode, $TextNoFiles, $IncludeItemFile;

  // Aktuelles Verzeichnis überprüfen
  $CurrentDir = trim(substr($CurrentDir, 0, 209));
  if (substr($CurrentDir, 0, 1) == ".") $CurrentDir = "";
  $path_parts = pathinfo($CurrentDir."/TEMP");
  $dir = $path_parts["dirname"];
  if (($dir == "/") || ($dir == "\\") || ($dir == ".")) $CurrentDir = "";
  $pos = strpos($CurrentDir, "..");
  if (strlen($pos) > 0) $CurrentDir = "";

  $Directory = $BaseDir;
  if (strlen($CurrentDir) > 0) { $Directory = $BaseDir.$CurrentDir; }

  // Beschreibung lesen
  $d = array();
  $Desc = array();
  if (file_exists($Directory."/".$DescFile)) {
    $hFile = @fopen($Directory."/".$DescFile,"r");
    if ($hFile) {
      while (($d = fgetcsv ($hFile, 10240, ";")) != False) {
        array_push($Desc, array($d[0], $d[1]));
      }
    }
    fclose ($hFile);
  }

  // Verzeichnis zum Auslesen öffnen
  $hDir = @opendir($Directory);
  if (!$hDir) {
    echo "<p><b style=\"color:#cc0000;\">".GetLangStr("ErrWrongDirName", "FALSCHER VERZEICHNISNAME!")."</b></p>";
    return 0;
  }

  $FilesArray = array(array("FileName" => "..", "IsDir" => True, "FileSize" => 0, "FileTime" => 0, "FileDesc" => ""));
  if ($CurrentDir == "") { array_shift($FilesArray); }

  // Dateien und Verzeichnisse einlesen
  while ($file = readdir ($hDir)) {
    if ( ($file != ".") && ($file != "..") && (substr($file, 0, 1) != ".") &&
         (strtolower($file) != strtolower(substr($DescFile, -(strlen($file))))) &&
         (!IsFileExcluded($Directory."/".$file))
       ) {

      $FileDesc = "";
      foreach ($Desc as $d) {
        if (is_dir($Directory."/".$file)) {
          if (eregi($d[0], "[".$file."]")) {
            $FileDesc = $d[1];
            break;
          }
        } else {
          if (eregi($d[0], $file)) {
            $FileDesc = $d[1];
            break;
          }
        }
      }
      array_push($FilesArray, array("FileName" => $file,
                                    "IsDir" => is_dir($Directory."/".$file),
                                    "FileSize" => filesize($Directory."/".$file),
                                    "FileTime" => filemtime($Directory."/".$file),
                                    "FileDesc" => $FileDesc
                                    ));
    }
  }

  // Sortierung
  if ($SortMode == "name") usort($FilesArray, "Compare_FileName");
  if ($SortMode == "size") usort($FilesArray, "Compare_FileSize");
  if ($SortMode == "time") usort($FilesArray, "Compare_FileTime");
  if ($SortMode == "desc") usort($FilesArray, "Compare_FileDesc");

  // Dateien ausgeben
  foreach($FilesArray as $file) {
    if (!$file["IsDir"]) {
      $FileLink = $Directory."/".$file["FileName"];
      $FileName = $file["FileName"];
      $FileSize = number_format($file["FileSize"] / 1024, 2, ",", ".")." KB";
      $FileTime = date("d.m.Y, H:i:s", $file["FileTime"]);
      $FileDesc = "&nbsp;";
      foreach ($Desc as $d) {
        if (eregi($d[0], $FileName)) {
          $FileDesc = $d[1];
          break;
        }
      }
      include($IncludeItemFile);
    }
  }

  if (count($FilesArray) == 0) {
    echo "<tr><td colspan=4 class=\"FileListCellInfo\" style=\"text-align:center\">".$TextNoFiles."</td></tr>\n";
  }

  echo "<tr><td colspan=4 style=\"text-align:center\"><small> ";
  echo "<a href=\"  /\"><b>  </b></a></small></td></tr>\n";

  // Verzeichnis schließen
  @closedir($hDir);
}

// Sortierfunktion für den Dateinamen (absteigend)
function Compare_FileName ($a, $b) {
  if ($a["FileName"] == $b["FileName"]) return 0;
  return ($a["FileName"] < $b["FileName"]) ? -1 : 1;
}

// Sortierfunktion für die Dateigröße (absteigend)
function Compare_FileSize ($a, $b) {
  if ($a["FileSize"] == $b["FileSize"]) { return Compare_FileName ($a, $b); };
  return ($a["FileSize"] < $b["FileSize"]) ? -1 : 1;
}

// Sortierfunktion für das Änderungsdatum (aufsteigend)
function Compare_FileTime ($a, $b) {
  if ($a["FileTime"] == $b["FileTime"]) { return Compare_FileName ($a, $b); };
  return ($a["FileTime"] > $b["FileTime"]) ? -1 : 1;
}

// Sortierfunktion für die Beschreibung (absteigend)
function Compare_FileDesc ($a, $b) {
  if ($a["FileDesc"] == $b["FileDesc"]) return 0;
  return ($a["FileDesc"] < $b["FileDesc"]) ? -1 : 1;
}

function GetLangStr($sId, $sDefault) {
	global $Lang;

	if (isset($Lang[$sId]))
		return $Lang[$sId];
	else
		return $sDefault;
}

?>

da wollte ich fragen wie ich an einer datei die "anmerkung" einstelle...

und ich wollte fragen wie ich den weißen hintergrund zu einem hintergrundbild krieg hier is die main.css:

Code:
a:link {color:#004488; text-decoration:none;}
a:active {color:#cc0000; text-decoration:underline;}
a:visited {color:#004488; text-decoration:none;}
a:hover {color:#cc0000; text-decoration:underline;}
a.sidebar:link {color:#004488;}
a.sidebar:active {color:#cc0000;}
a.sidebar:visited {color:#004488;}
a.sidebar:hover {color:#cc0000;}
a.menu:link {color:#ffffff; font-weight:bold;}
a.menu:active {color:#ffdd00; font-weight:bold;}
a.menu:visited {color:#ffffff; font-weight:bold;}
a.menu:hover {color:#ffdd00; font-weight:bold;}

body 

td {margin-top:10px;margin-bottom:10px;margin-left:10px;margin-right:10px;margin:10px;font-family:"trebuchet ms",arial,helvetica,sans-serif;font-size:10pt;color:#000000;}
p {font-family:"trebuchet ms",arial,helvetica,sans-serif;font-size:10pt;text-align:justify;margin-top:6pt;margin-bottom:6pt;}

h1 {font-family:"trebuchet ms",arial,helvetica,sans-serif;font-size:16pt;font-weight:bold;color:#000000;margin-top:0px;margin-bottom:0px;}

#warn {color:#bb0033; font-family:"trebuchet ms",arial,helvetica,sans-serif; font-style:normal;}
#red {color:#bb0033;}
#green {color:#008000;}
#blue {color:#0000cc;}
#grey {color:#808080;}
#black {color:#000000;}
#small {font-size:8pt;}
K1llerkanack3 ist offline   Mit Zitat antworten
 


Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren

BB code is An
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Pc fragen L34D Hardware & Elektronik 68 12.11.08 16:12
Fragen zur Wii DGroopy Gaming 9 18.07.08 14:05
Fragen zur Wii imported_benny Gaming 0 09.03.08 08:37


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:39 Uhr.


Sitemap

().