php ders uygulamaları

Transkript

php ders uygulamaları
PHP DERS UYGULAMALARI
1. panel.php dosyasında ‘else’ den sonra aşağıdaki kırmızı renkli kodları ekleyin:
<?php }else {
echo 'Hoşgeldiniz '.$_SESSION*'kuladi'+;
$kuladi = $_SESSION['kuladi'];
$seviye = mysql_query("SELECT seviye FROM uyeler WHERE uyeadi='$kuladi'");
$seviyeal = mysql_fetch_array($seviye);
$seviye = $seviyeal['seviye'];
?>
<?php if ($seviye=='5') echo '<br /><a href="yonetim/index.php">Yönetim Paneli</a>'; ?>
<br><a href="./cikis.php">ÇIKIŞ</a>
<?php }?>
2. index.php dosyasının yanına yönetim isminde bir klasör ekleyin. yonetim klasörünün içine
index.php isminde bir php dosyası ve siteislem isminde bir klasör oluşturun.
3. siteislem klasörü içine kitaplar.php isminde bir php dosyası oluşturun.
4. yönetim klasörünün içindeki index.php dosyasının içine aşağıdaki kodları yazınız.
<!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=iso-8859-9" />
<title>Proje 2 - Yönetim Paneli</title>
</head>
<body style="margin:0px">
<table height="100" width="950" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#0099CC">
<tr>
<td style="font-family:'Trebuchet MS'; font-size:22px; padding-left:10px">PROJE 2 - YÖNETİM
PANELİ</td>
</tr>
</table>
<table height="40" width="950" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#FF9933">
<tr>
<td style="font-family:'Trebuchet MS'; font-size:14px;" align="center">
<table width="940" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" align="center" height="32"><a href="?" style="text-decoration:none;
color:#FFFFFF">ANA SAYFA</a></td>
<td width="122" align="center"><a href="../index.php" style="text-decoration:none;
color:#FFFFFF">SİTE ANA SAYFA</a></td>
<td width="83" align="center"><a href="?sayfa=1" style="text-decoration:none;
color:#FFFFFF">İLETİŞİM</a></td>
<td width="86" align="center"><a href="?sayfa=2" style="text-decoration:none;
color:#FFFFFF">KİTAPLAR</a></td>
<td width="84" align="center"><a href="?sayfa=3" style="text-decoration:none;
color:#FFFFFF">PROGRAMLAR</a></td>
<td width="338" align="center">&nbsp;</td>
<td width="127" align="center"><a href="../cikis.php" style="text-decoration:none;
color:#FF0000">ÇIKIŞ</a></td>
</tr>
</table>
</td>
</tr>
</table>
<table height="400" width="950" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#0099CC">
<tr>
<td style="font-family:'Trebuchet MS'; font-size:22px; padding-left:10px" valign="top">
<?php
switch ($sayfa)
{
case 1;
include("siteislem/iletisim.php");
break;
case 2;
include("siteislem/kitaplar.php");
break;
case 3;
include("siteislem/programlar.php");
break;
default;
?>
<table width="727" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23" colspan="6" align="left">&nbsp;<b>Site İle İstatistiki Bilgiler</b></td>
</tr>
<tr>
<td height="76" colspan="6" align="center">&nbsp;</td>
</tr>
<tr>
<td height="99" colspan="6" align="center">&nbsp;</td>
</tr>
<tr>
<td height="99" colspan="6" align="center">&nbsp;</td>
</tr>
<tr>
<td height="99" colspan="6" align="center">&nbsp;</td>
</tr>
<tr>
<td height="99" colspan="6" align="center">&nbsp;</td>
</tr>
</table>
<?
break;
}
?>
</td>
</tr>
</table>
<table height="30" width="950" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#0099CC">
<tr>
<td bgcolor="#FF6600" style="font-family:'Trebuchet MS'; font-size:22px; paddingleft:10px"></td>
</tr>
</table>
</body>
</html>

Benzer belgeler