Tak Vám teda děkuji za pomoc ...
Příspěvky odeslané z IP adresy 89.176.186.–
Martin
Martin
Libí se mi Váš návrh "obalit celou stránku do divu (nejlépe identifikátorem), tento div zarovnat vlevo (klidně napozicovat)"
asi by jste mi neporadil jak na to ? Popřípadě ukázat upravený kód ?
Martin
Nepomohlo to ....
Zdroják php :
Ty bílé okánka jsou ve stylu "contentheader"
<?php
/*
MeltingIce File System copyright Ryan LeFevre.
Feel free to modify this script, but please leave this comment here.
user.php: personal directory listing and management
*/
include_once('config.php');
include_once('process.php');
include_once('namecheck.php');
include_once('dirlist.php');
include_once('deldir.php');
include_once('dirsize.php');
include_once('getsize.php');
include_once('modalbox.php');
include_once('dirshare.php');
if (! isset($_SESSION['username'])){
header( 'Location: index.php' ); exit;
}
/*If requesting to view a friends directory*/
if($_POST['frienddir'])
{
if($_POST['frienddir'] != "null")
{
$validcheck = validFriendCheck($_POST['frienddir']);
if($validcheck)
{
$_SESSION['frienddir'] = $_POST['frienddir'];
$_SESSION['perms'] = $validcheck;
}
}
}
/*Checks to see if friends system is enabled*/
$query = "SELECT friendssys FROM ".$mysqlpre."_admin";
$result = mysql_query($query);
$allowed = mysql_fetch_row($result);
if($allowed[0] == "0")
{
$friendssys = false;
}
else
{
$friendssys = true;
}
/*Required for when you start browsing in folders you made*/
if($_GET['dir'])
{
$var = explode("=", $_SERVER['QUERY_STRING']);
$var2 = explode("&", $var[1]);
$viewurl = $var2[0];
if(isset($_SESSION['frienddir']))
{
$userdir = $uploaddir.$_SESSION['frienddir']."/".$viewurl;
}
else
{
$userdir = $uploaddir.$_SESSION['username']."/".$viewurl;
}
}
else
{
if(isset($_SESSION['frienddir']))
{
$userdir = $uploaddir.$_SESSION['frienddir'];
}
else
{
$userdir = $uploaddir.$_SESSION['username'];
}
}
/*If you want to delete a folder*/
if($_GET['delfolder'])
{
if(dirCheck("/".$_GET['delfolder']))
{
if(isset($_SESSION['frienddir']))
{
if($_SESSION['perms'] == "rw")
{
$delfolderres = deleteDirectory("users/".$_SESSION['frienddir'].$_GET['dir']."/".$_GET['delfolder']);
}
}
else
{
$delfolderres = deleteDirectory("users/".$_SESSION['username'].$_GET['dir']."/".$_GET['delfolder']);
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1250" />
<title>meltingice file system - <?php
if(isset($_SESSION['frienddir']))
{
if($_SESSION['frienddir'] == $_SESSION['username'])
{
echo $_SESSION['username']."'s personal files";
}
else
{
echo $_SESSION['username']." viewing ".$_SESSION['frienddir']."'s files";
}
}
else
{
echo "'Profil: ".$_SESSION['username'];
}
?></title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
</head>
<div id="background">
<?php
if($_GET['upload'] || $_GET['mkdir'] || $_GET['renameres'] || $_GET['edit'] || $_GET['moveres'])
{
echo '<body onLoad="new Effect.Appear(\'userstatus\'); new Effect.Fade(\'userstatus\', {delay: 5});">';
}
elseif($_GET['rename'] && dirCheck("/".$_GET['rename']))
{
echo '<body onLoad="new Effect.Appear(\'renamefile\')">';
}
elseif($_GET['uploadbox'] == "true")
{
echo '<body onLoad="new Effect.Appear(\'uploadbox\')">';
}
elseif($_GET['mkdirbox'] == "true")
{
echo '<body onLoad="new Effect.Appear(\'mkdirbox\')">';
}
elseif($_GET['delfileconfirm'])
{
echo '<body onLoad="new Effect.Appear(\'delfilebox\')">';
}
elseif($_GET['movefilebox'])
{
echo '<body onLoad="new Effect.Appear(\'movefilebox\')">';
}
else
{
echo "<body>";
}
?>
<div id="functionboxwrap" style="<?php if(!$_GET['rename'] && !$_GET['uploadbox'] && !$_GET['mkdirbox'] && !$_GET['delfileconfirm'] && !$_GET['movefilebox']){ echo "display: none"; } ?>">
<?php
if(isset($_SESSION['frienddir']))
{
if($_SESSION['perms'] == "rw")
{
if($_GET['rename']){ renameFileBox(); }
if($_GET['uploadbox']){ uploadFileBox(); }
if($_GET['mkdirbox']){ makeDirBox(); }
if($_GET['delfileconfirm']){ delFileConfirm(); }
if($_GET['movefilebox']){ moveFileBox($userdir, $viewurl, $uploaddir); }
}
}
else
{
if($_GET['rename']){ renameFileBox(); }
if($_GET['uploadbox']){ uploadFileBox(); }
if($_GET['mkdirbox']){ makeDirBox(); }
if($_GET['delfileconfirm']){ delFileConfirm(); }
if($_GET['movefilebox']){ moveFileBox($userdir, $viewurl, $uploaddir); }
}
?>
</div>
<div id="userheader"><p style="float: left;">Bluefiles system-
<?php
if(isset($_SESSION['frienddir']))
{
if($_SESSION['frienddir'] == $_SESSION['username'])
{
echo "Soubory uživatele: ".$_SESSION['username'];
}
else
{
echo $_SESSION['username']." viewing ".$_SESSION['frienddir']."'s files";
}
}
else
{
echo "soubory uživatele: ".$_SESSION['username'];
}
?></p><p style="float: right;">[<a href="logout.php">Odhlásit</a>]
<?php
if($friendssys)
{
echo "<div id=\"frienddropdown\" style=\"float: right\">\n";
echo "<form enctype='multipart/form-data' action='user.php' method='post'>\n";
echo "<p>Zobrazit profil přítele: ";
echo "<select name='frienddir'>\n";
if(isset($_SESSION['frienddir']) && $_SESSION['frienddir'] != $_SESSION['username'])
{
echo "<option name=\"".$_SESSION['username']."\" value=\"".$_SESSION['username']."\">Návrat na Váš profil</option>\n";
}
getFriends(true);
echo "</select>\n";
echo "<input type='submit' value='OK' />";
echo "</p></form>\n</div>\n";
}
?>
</div>
<!-- Begin directory path code -->
<div id="dirpathtitle"><p>Složky</p></div>
<div id="dirpath">
<p><a href="user.php">systém/</a><?php
if(!$viewurl)
{
echo $_SESSION['username'];
}
else
{
$urlarray = explode("/",$viewurl);
for($urlindex=1;$urlindex<count($urlarray);$urlindex++)
{
echo '<a href="user.php?dir=';
for($urlindex2=1;$urlindex2<$urlindex+1;$urlindex2++)
{
echo "/" . $urlarray[$urlindex2];
}
echo '">/' . str_replace("_"," ",$urlarray[$urlindex]) . '</a>';
}
}
?></p>
<a href="user.php"><img src="img/house.png" alt="home" style="float: right" /></a>
<p style="float: right; margin-right: 5px;">Zaplňeno:
<?php
if(isset($_SESSION['frienddir']))
{
echo getUserSize($_SESSION['frienddir'], $uploaddir);
}
else
{
echo getUserSize($_SESSION['username'], $uploaddir);
}
?></p>
</div>
<!-- End directory path code -->
<div class="content">
<!-- Begin status display -->
<div id="userstatus" style="display: none">
<?php
if($_GET['upload'] == "fail")
{
echo "<p><strong>Nahrávání neúspěšné.</strong></p>";
}
if($_GET['upload'] == "fail2")
{
echo "<p><strong>Typ souboru není podporován!</strong></p>";
}
if($_GET['upload'] == "quotafail")
{
echo "<p><strong>Maximální prostor zaplněn !</strong></p>";
}
if($_GET['upload'] == "success")
{
echo "<p><strong>Nahrávání úspěšné!</strong></p>";
}
if($_GET['mkdir'] == "true")
{
echo "<p><strong>Složka přidána.</strong></p>";
}
if($_GET['mkdir'] == "false")
{
echo "<p><strong>Složka je již vytvořena nebo obsahuje neplatné znaky(ě,š,č,ř,ž,ý,á,í,é,...).</strong></p>";
}
if($_GET['renameres'] == "success")
{
echo "<p><strong>Přejmenováno</strong></p>";
}
if($_GET['renameres'] == "fail")
{
echo "<p><strong>Nové jméno obsahuje nepovolené znaky (ě,š,č,ř,ž,ý,á,í,é,ú,ů)</strong></p>";
}
if($_GET['renameres'] == "notallowed")
{
echo "<p><strong>Nové jméno obsahuje nepovolené znaky (ě,š,č,ř,ž,ý,á,í,é,ú,ů)</strong></p>";
}
if($_GET['edit'] == "success")
{
echo "<p><strong>Soubor upraven!</strong></p>";
}
if($_GET['edit'] == "fail")
{
echo "<p><strong>Změna souboru neúspěšná.</strong></p>";
}
if($_GET['edit'] == "unable")
{
echo "<p><strong>Neumím upravovat tento typ souboru.</strong></p>";
}
if($_GET['moveres'] == "true")
{
echo "<p><strong>Soubor přesunut.</strong></p>";
}
if($_GET['moveres'] == "false")
{
echo "<p><strong>Přesnouvání souboru neúspěšné.</strong></p>";
}
?>
</div>
<!-- End status display -->
<div class="contentheader"><p>Složky</p></div>
<ul>
<?php get_dirlist_folders($userdir, $viewurl, $uploaddir); ?>
</ul>
</div>
<div class="content">
<div class="contentheader"><p>Soubory</p></div>
<ul>
<?php get_dirlist_files($userdir, $viewurl, $uploaddir); ?>
</ul>
</div>
<div id="buttoncontainer">
</td>
<?php
if(isset($_SESSION['frienddir']))
{
if($_SESSION['perms'] == "rw")
{
echo "<div class=\"button\"><p><a href=\"user.php?dir=".$_GET['dir']."&uploadbox=true\">Nahrát nový soubor</a></p></div>\n";
echo "<div class=\"button\"><p><a href=\"user.php?dir=".$_GET['dir']."&mkdirbox=true\">Vytvořit novou složku</a></p></div>\n";
}
}
else
{
echo "<div class=\"button\"><p><a href=\"user.php?dir=".$_GET['dir']."&uploadbox=true\">Nahrát soubor</a></p></div>\n";
echo "<div class=\"button\"><p><a href=\"user.php?dir=".$_GET['dir']."&mkdirbox=true\">Vytvořit novou složku</a></p></div>\n";
}
if($friendssys)
{
echo "<div class=\"button\"><p><a href=\"friends.php\">Přátelé</a></p></div>\n";
}
?>
</div>
<div id="userfooter"><p>Kódování provedl (c)<?php echo date("Y"); ?> <a href="http://meltingice.net">meltingice designs</a> - design vytvořil <a href="http://07designs.com">07 designs</a></p></div>
</div>
</body>
</html>
Zdroják CSS stylů
body{
font-family: Calibri, arial, sans-serif;
background-color: #888888;
margin: 0;
padding: 0;
min-width: 1000px;
}
#background{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("img/background_grunge.png") no-repeat top right;
min-width: 1065px;
}
#status{
background-color: #b43232;
border: #000000 1px dashed;
margin: 0px auto 0 auto;
width: 350px;
font-size: 18px;
text-align: center;
}
#status p{
color: #FFFFFF;
margin-top: 2px;
margin-bottom: 5px;
}
#status a {
color: #FFFFFF;
}
#header{
background-image: url("img/title.png");
background-repeat: no-repeat;
width: 350px;
height: 78px;
margin: 100px auto 0 auto;
text-align: center;
}
#header img{
margin-top: 50px;
}
#header p{
color: #FFFFFF;
}
#loginform{
background-color: #FFFFFF;
width: 400px;
text-align: center;
margin: auto;
border: #a5b6c8 10px solid;
}
#loginform input{
height: 30px;
font-size: 20px;
margin: 5px 0 5px 0;
width: 100%;
}
#loginform form{
margin: 10px;
}
#loginform a{
color: #b43232;
text-decoration: none;
}
#loginform a:hover{
text-decoration: underline;
}
#loginform table{
margin: auto;
width: 325px;
}
#loginform p{
margin-bottom: 5px;
}
#loginstrip{
width: 100%;
min-width: 320px;
margin-top: 0;
}
#loginstrip img{
border: none;
}
.submitbutton{
background-color: #ededed;
border: 2px #a5b6c8 solid;
width: 100px !important;
}
.submitbutton:hover{
background-color: #c3c3c3;
}
.loginfield:focus, .loginfield:hover{
background-color: #dde5ee;
border: #919191 1px solid;
padding: 1px 0 3px 1px;
}
#footer{
position: absolute;
bottom: 0px;
width:100%;
text-align: center;
font-size: 11px;
}
#footer p{
color: #FFFFFF;
}
#footer a{
color: #FFFFFF;
text-decoration: none;
}
#footer a:hover{
color: #FFFFFF;
text-decoration: underline;
}
#userheader{
background-color: #a5b6c8;
height: 30px;
width: 100%;
text-align: right;
min-width: 510px;
border-bottom: #919294 1px solid;
}
#userheader p{
margin: 0 10px 0 10px;
padding-top: 5px;
color: #FFF;
}
#userheader a{
color: #FFF;
text-decoration: none;
}
#userheader a:hover{
background-color: #cedeec;
}
#dirpath{
background-color: #FFF;
width: 800px;
margin: 10px 0 10px 20px;
float: left;
border: #919294 1px solid;
}
#dirpath p{
font-size: 16px;
padding: 5px 0 5px 5px;
margin: 0;
float: left;
}
#dirpath a{
color: #000000;
text-decoration: none;
padding: 5px 0 5px 0;
margin: 0;
}
#dirpath a:hover{
background-color: #e1e1e1;
}
#dirpath img{
border: none;
float: right;
margin: 6px 10px 0 0;
}
#dirpathtitle{
margin: 10px 0 -10px 20px;
padding: 0;
font-size: 14px;
}
#dirpathtitle p{
margin:0;
padding: 0;
color: #FFF;
}
#userstatus{
background-color: #ffffcc;
border: #feec30 1px solid;
margin: 10px 10px 0 10px;
float: right;
max-width:500px;
font-size: 18px;
text-align: center;
}
#userstatus p{
color: #000000;
margin: 2px 10px 5px 10px;
}
.content{
width: 800px;
min-height: 120px;
margin: 5px 0 5px 20px;
background-color: #FFF;
border: #919294 1px solid;
float: left;
}
.content p{
margin: 0 10px 0 10px;
}
.content li{
list-style: none;
}
.content li:hover{
background-color: #e3e3e3;
}
.content a{
color: #30353a;
text-decoration: none;
}
.content a:hover{
text-decoration: underline;
}
.content img{
border: none;
}
.contentheader{
display: block;
width: 760px;
margin: 0 auto 0 auto;
padding: 0;
border-bottom: #cfcfcf 1px solid;
}
.contentheader p{
margin: 10px 5px 0 5px;
}
#buttoncontainer{
margin: 0;
position: absolute;
top: 110px;
left: 822px;
width: 200px;
}
.button{
float: left;
height: 40px;
width: 200px;
margin: 0 0 20px 0;
text-align: center;
background-color: #656565;
border-top: #919294 1px solid;
border-right: #919294 1px solid;
border-bottom: #919294 1px solid;
}
.button:hover{
background-color: #7e7e7e;
}
.button p{
margin: 9px 5px 3px 5px;
color: #FFF;
}
.button a{
color: #FFF;
text-decoration: none;
}
#functionboxwrap{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-image: url("img/dim_bk.png");
background-repeat: repeat;
z-index: 2;
}
#renamefile{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#renamefile p{
padding-top: 80px;
}
#renamefile form{
margin-top: 60px;
}
#uploadbox{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#uploadbox p{
padding-top: 80px;
}
#uploadbox form{
padding-top: 0;
padding-bottom: 50px;
}
#mkdirbox{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#mkdirbox p{
padding-top: 80px;
}
#mkdirbox form{
padding-top: 10px;
padding-bottom: 50px;
}
#delfilebox{
width: 400px;
height: 150px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#delfilebox a{
text-decoration: none;
padding: 5px 20px 5px 20px;
border: #000 1px dashed;
color: #FFF;
}
#delfilebox a:hover{
text-decoration: underline;
}
#movefilebox{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#movefilebox p{
padding-top: 80px;
}
#movefilebox form{
padding-top: 0;
padding-bottom: 50px;
}
#usersearch{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#usersearch p{
padding-top: 80px;
}
#searchres{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#searchres p{
padding-top: 80px;
}
#addfriend{
width: 300px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
#addfriend p{
padding-top: 80px;
}
#aboutfriends{
width: 400px;
height: 300px;
margin: 100px auto 0 auto;
background-color: #dadada;
text-align: center;
border: #404040 10px solid;
}
.functioncancel{
width: 300px;
height: 25px;
background-color: #b43232;
border-top: #000000 1px dashed;
border-bottom: #000000 1px dashed;
text-align: center;
margin-top: 10px;
padding: 3px 0 0 0;
}
.functioncancel a{
margin: 0;
padding: 0;
text-decoration: none;
color: #FFF;
}
.functioncancel a:hover{
color: #575757;
}
#userfooter{
position: fixed;
width: 100%;
background-image: url("img/dim_bk.png");
right: 0;
bottom: 0;
text-align: right;
font-size: 12px;
}
#userfooter p{
color: #FFF;
margin: 0 5px 2px 0;
}
#userfooter a{
color: #FFF;
text-decoration: none;
}
#userfooter a:hover{
text-decoration: underline;
}
.centeritem{
text-align: center;
}
Martin
Ahoj, potřebuji poradit od nějakého PHP prográmátora...
Upravuji ve volném čase PHP kódy ale s jednou věci si nejsem jistý.
Mám problém u jednoho skriptu pro správu souborů. Když jsem na PC kde mám monitor 1024×768 a tam funguje vše jak má , ale když jsem na monitoru 1920x1080 , tak se 1 "okno" zarovnává doleva.
URL na obrázek s problémem : http://oi45.tinypic.com/mq9fl.jpg
Nemá někdo řešení , nebo tušení kdy by byl problém ?