![]() |
![]() |
--bercow-- |
![]()
Post
#1
|
Goście ![]() |
A wiec tak budujemy sobie home site bo ma ferie i mi sie nudzi, i teraz, chcial bym aby index.php nie mialo w sobie ilus stron, ale wyswietlane ono byly za pomoca include. Na razie czesc jest razem, a dokladnie panele lewy i prawy. I widział bym sobi to tak, mamy link Home i on by prowadzil by link do strony news.php, ale tak aby wsywietlala sie ona na srodku bez przeladowania. Tak samo z galeria, po rozwinieciu listy odpowiedni odnosniki maja prowadzic do odpowiednich galerii.
A wiec narazie podam wszytsko co mam, i wyglada to tak: http://bercow.ovh.org/xxx/ index.php CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>bercw.pl - home site</title> <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #252525; margin: 0; padding: 0; text-align: center; color: 252525; } .thrColAbsHdr #container { position: relative; width: 95%; background: 262626; margin: 0 auto; border: 1px solid #000000; text-align: left; background-color: #252525; } .thrColAbsHdr #header { height: 100px; background: 252525; padding: 0 10px 0 20px; } .thrColAbsHdr #header h1 { margin: 0; padding: 10px 0; background: 262626; color: #ffffff; } .thrColAbsHdr #sidebar1 { position: absolute; background: #252525; top: 100px; left: 0; width: 150px; background: 252525; padding: 15px 10px 15px 20px; } .thrColAbsHdr #sidebar2 { position: absolute; top: 100px; right: 0; width: 160px; background: #252525; padding: 15px 10px 15px 20px; } .thrColAbsHdr #mainContent { margin: 0 200px; padding: 0 10px; background: #252525; } .thrColAbsHdr #footer { padding: 0 10px 0 20px; background: #252525; } .thrColAbsHdr #footer p { margin: 0; padding: 10px 0; background: 262626; color: #252525; } .fltrt { float: right; margin-left: 8px; } .fltlft { float: left; margin-right: 8px; } .styl1 { color: #FFFFFF; font-size: 16px; } --> </style> <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .styl4 {color: #FFFFFF} .styl5 { font-size: 12px } --> </style> </head> <body class="thrColAbsHdr"> <div id="container"> <div id="header"> <h1 align="left"><img src="img/logo.png" width="442" height="91" /></h1> </div> <div class="styl1" id="sidebar1"> <h3><img src="img/menu.png" /></h3> <p>Home</p> <p>O mnie</p> <div id="CollapsiblePanel1" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0">Galeria</div> <div class="CollapsiblePanelContent"> <p align="left" class="styl5">- Portrety</p> <p align="left" class="styl5">- Makro</p> <p align="left" class="styl5">- Architektura</p> </div> </div> <p>Kontakt</p> <p> </p> <!-- end #sidebar1 --></div> <div id="sidebar2"> <h3><img src="img/archiwum.png"" /></h3> <!-- end #sidebar2 --></div> <div id="mainContent"> <script type="text/javascript" src="res/flashobject.js"></script> <style type="text/css"> <!-- body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0; padding: 0; font-size: 10px; background-color: #191919; color: #191919; background: ""; } html, body { height:100%; overflow-y: auto; overflow-x: auto; margin: 0; padding: 0; border: 0; } /* hide from ie on mac \*/ html { height: 100%; overflow: hidden; } #flashcontent { height: 600px; text-align:center; } #news { height: 600px; background-color: #191919; overflow-y: auto; margin: 5; } /* end hide */ --> </style> </head> <body> <div id="news"> <?php include ('news.php'); ?> </div> <script type="text/javascript"> var fo = new FlashObject("res/viewer.swf", "viewer", "100%", "100%", "6", "#191919", ""); fo.addParam("quality", "best"); fo.write("flashcontent"); </script> <!-- end #mainContent --></div> <div id="footer"> <p>Footer<span class="styl4">by</span> <span class="styl4"> bercow 2008</span></p> <!-- end #footer --></div> <!-- end #container --></div> <script type="text/javascript"> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false}); //--> </script> </body> </html> news.php CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link rel="stylesheet" href="style.css" type="text/css" /> </head> <p><span class="news"> <?php mysql_connect ("mysql.60free.ovh.org", "bercow", "xxxxxx") or die ("Nie mozna polaczyc sie z mysql"); mysql_select_db ("bercow") or die ("nie mozna polaczyc sie z baza bercow"); $wynik = mysql_query ("SELECT * FROM news WHERE ok=1 ". "ORDER BY nr LIMIT 0,4"); while ($wynik && $rekord = mysql_fetch_assoc ($wynik)) { print "<P><B><u>"; print $rekord['tytul']."</u></b><br>".$rekord['tresc_krotka']."</p>"; print "<p align=rigcht><i>".$rekord['data']."</i></p>\n"; } ?> </span></p> </html> style.css CODE .news { color: #FFFFFF; font: 100% Verdana, Arial, Helvetica, sans-serif; font-size: 12px} bercow.sql CODE -- phpMyAdmin SQL Dump [code][/code]
-- version 2.8.2.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Czas wygenerowania: 25 Sty 2008, 18:59 -- Wersja serwera: 5.0.24 -- Wersja PHP: 5.1.5 -- -- Baza danych: `bercow` -- -- -------------------------------------------------------- -- -- Struktura tabeli dla `news` -- CREATE TABLE `news` ( `nr` int(11) NOT NULL auto_increment, `data` datetime NOT NULL, `tytul` text NOT NULL, `tresc_krotka` text NOT NULL, `tresc` text NOT NULL, `osoba` text NOT NULL, `ok` tinyint(4) NOT NULL, PRIMARY KEY (`nr`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin2 AUTO_INCREMENT=4 ; -- -- Zrzut danych tabeli `news` -- INSERT INTO `news` (`nr`, `data`, `tytul`, `tresc_krotka`, `tresc`, `osoba`, `ok`) VALUES (1, '2008-01-25 16:14:12', 'news1', 'news1_kr', 'news1_all', 'ja', 1), (3, '2008-01-24 16:15:18', '1111111111111111', '4444444444444444444', '1111111111112qwe2wfgtr54ewadsewradsewrasdae', 'rwsdzrwewqedwarsdaer', 1); |
|
|
![]() |
--bercow-- |
![]()
Post
#2
|
Goście ![]() |
nastepny problem wyglada tak mamy plik album.php i w nim umieszczam kod
CODE <?php include ('album/Desktop/album/sv.html'); ?> reszta taka sam jak index.php ale nie wiem czemu galeria nie chce dzialac http://bercow.ovh.org/xxx/album.php ale pod linkiem http://bercow.ovh.org/xxx/album/Desktop/album/sv.html juz dziala dobrze |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Co do 2 pytanie jak ma działać skoro ścieżki musisz zmienić tez dla galerii.
Co do pierwszego to nie wiem co chcesz osiągnąć. -------------------- |
|
|
--bercow-- |
![]()
Post
#4
|
Goście ![]() |
nie bardzo rozumiem, zmienilem link do galerii, wstawione jest "album/Desktop/album/sv.html", oba sa w katalogu xxx, wiec nizesz sciezki nie musze podawac.
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 1 568 Pomógł: 192 Dołączył: 7.03.2005 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
A sciezki simpleviewer?
Includujesz galerie do innej lokalizacji, popatrz sie w kod zródlowy galerii i zobacz co trzeba zrobic Ten post edytował potreb 26.01.2008, 09:11:14 -------------------- |
|
|
--bercow-- |
![]()
Post
#6
|
Goście ![]() |
Co do galeri, to w calym sv.html dodaje "album/Desktop/album/", bo taka jest sciezka do folderu galeri, ale dalej nic :/ http://bercow.ovh.org/xxx/album/Desktop/album/sv.html dziala prawidlowo, ale http://bercow.ovh.org/xxx/album.php, juz nie
CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="album/Desktop/album/res/flashobject.js"></script> <style type="text/css"> <!-- body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; margin: 0; padding: 0; font-size: 10px; background-color: #191919; color: #666666; } html, body { height:100%; overflow-y: auto; overflow-x: auto; margin: 0; padding: 0; border: 0; } /* hide from ie on mac \*/ html { height: 100%; overflow: hidden; } #flashcontent { height: 100%; text-align:center; } /* end hide */ --> </style> </head> <body> <div id="flashcontent">SimpleViewer requires Macromedia Flash. <p><a href="http://www.macromedia.com/go/getflashplayer/" target="_top"><img src="album/Desktop/album/res/get_flash_player.gif" alt="Get Flash Player" width="88" height="31" border="0"></a></p> <p>If you have Flash installed, <a href="album/Desktop/album/index.html?detectflash=false" target="_top">click to view gallery</a></p></div> <script type="text/javascript"> var fo = new FlashObject("album/Desktop/album/res/viewer.swf", "viewer", "100%", "100%", "6", "#191919"); fo.addParam("quality", "best"); fo.write("flashcontent"); </script> </body> </html> |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 19.07.2025 - 15:46 |