
Tutaj kod CSS:
body
{
font: 12px Arial, Helvetica, sans-serif;
background:url(images/background.png)black repeat-x;
}
table
{
border-collapse:collapse;
}
table td
{
border: 1px solid #4192AF;
border-bottom-color: #6FC2DF;
background: #DFF7FF;
}
table th
{
border: 1px solid #4192AF;
background: #1D7D9F;
color:white;
}
label
{
width: 40px;
}
#add_form
{
margin-top:10px;
}
#LOGO
{
background:url(images/logo.png)no-repeat 50%;
height:117px;
margin-bottom:15px;
}
#formularz
{
color:white;
}
#ap
{
text-align:right;
font: 7pt/10px "MS Sans Serif", Geneva, sans-serif;
}
a
{
text-decoration: none;
}
#white
{
color:white;
}
#login
{
margin-left:40%;
margin-right:40%;
}
#where
{
text-indent:1%;
background:url(images/test.png);
margin-bottom:1%;
text-decoration: none;
}
#apinctable
{
background-image:url(images/test.png);
width:30%;
float:left;
}
#msg
{
float:right;
width:80%;
}
#content {
font-family:arial;
font-size:11px;
}
Tutaj plik php:
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Ajax Loader - Simplified Version</title> <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.history.js"></script> <script type="text/javascript"> $(document).ready(function () { //Check if url hash value exists (for bookmark) $.history.init(pageload); //highlight the selected link $('a[href=' + document.location.hash + ']').addClass('selected'); //Seearch for link with REL set to ajax $('a[rel=ajax]').click(function () { //grab the full url var hash = this.href; //remove the # value hash = hash.replace(/^.*#/, ''); //for back button $.history.load(hash); //clear the selected class and add the class class to the selected link $('a[rel=ajax]').removeClass('selected'); $(this).addClass('selected'); //hide the content and show the progress bar $('#content').hide(); $('#loading').show(); //run the ajax getPage(); //cancel the anchor tag behaviour return false; }); }); function pageload(hash) { //if hash value exists, run the ajax if (hash) getPage(); } function getPage() { //generate the parameter for the php script var data = 'page=' + encodeURIComponent(document.location.hash); $.ajax({ url: "loader.php", type: "GET", data: data, cache: false, success: function (html) { //hide the progress bar $('#loading').hide(); //add the content retrieved from ajax and put it in the #content div $('#content').html(html); //display the body with fadeIn transition $('#content').fadeIn('slow'); } }); } </script> </head> <html> <div id="Logo"><div id="ap"> <b><a href="index.php?action=logout">[Wyloguj]</a></b> </div></div> <div id="where"> <b><font color="green"><a href="index.php">Support - AirHack.PL >></a> </font></b>Admin Panel <br> </div> <div id="apinctable"> <?php echo '<table id="tab"> <tr><th><center>ID</th><th>Kategoria</th><th>Napisał</th><th>Akcja</center></th></tr>'; // jak chcesz wyświetlić wszystkie wyniki zapytania echo '<td width="80px"><a href="admint.php?id='.$r['id'].'"> [Przeczytaj]</A><a href=#page'.$r['id'].'> [Usun]</A>'; } ?> </div> <div id="content"> <!-- Ajax Content --> </div> </html>
Pogmatwałem juz się w tym moim kodzie CSS bo jestem prawie zielony w tym. I podajcie co pozmieniać. Ja próbowałem to nie wychodziło.