Разработка Web сайта

Автор: Пользователь скрыл имя, 12 Декабря 2010 в 15:38, курсовая работа

Описание работы

Цель работы:
Разработать сайт о компьютерных играх. Он должен предоставлять возможность регистрации, просмотра новостей сайта, статей и пользователей, возможность добавления новой информации и комментариев.

Работа содержит 1 файл

курсовая.docx

— 641.45 Кб (Скачать)

    $KI=$_POST["KI"];

    $DI =$_POST["DI"];

    $LO1 =$_POST["LO1"];

    $d = time();

    $data = date('d - F - Y',$d);

    echo "$go";

    $error=false;

    if ($D == "" or $KI == "" )

          {$error=true;

          print "<div align=center><font size=3>Ошибка!!!<br>

    Заполните пожалуйста все поля и <ahref=index.php>попробуйте еще раз</a></font></div>";

          }

    else {$query = "select * from vacansii where D like \"".$D."\"";

                $result=mysql_query($query);

                $query="INSERT INTO `vacansii` ( `id_vac` , `D` ,`ZP` ,`obr` , `opit` ,`GR` , `Age` , `KI` , `DI` , `Data`, `Log`)

                            VALUES ('', '$D', '$ZP','$obr', '$opit','$GR', '$Age', '$KI', '$DI', '$data', '$LO1')";

                      $result=mysql_query($query); 

          print "<HTML><HEAD>\n";

          print "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=index.php'>\n";

          print "</HEAD></HTML>\n"; 

                }?>

    </body>

    </html>

    search.php

    <?php session_start();

    include("top.php");?>

    <table class="main">

    <tr><td class="left"><table class="left1" >

                <tr class="avt">

                <td><? include("aut.php");?>

    </td>

                </tr>

                <tr class="add"><td><? include("add.php");?></td></tr>

                <tr><td></td></tr></table>

          <td class="right">

    <table class="left1" >

    <tr><td height="10%" valign="top" >

    <center><u><font color="#1020F0"></font></u><br>

    <form action="search.php" method="POST" >

    <Table >

    <tr><td colspan=3><center>Должность<input type='checkbox' name='dol'></td></tr>

          <tr><td>Выбрать</td>

          <td><select name="d0">

                            </select></td><td><input type='checkbox' name='d1'></td>

                </tr>

          <tr><td>Написать</td>

                <td><input name="d" type="text" value="" size="10"></td>

                <td><input type='checkbox' name='d2'></td></table>

    <Table >

    <tr><td colspan=3><center>График работы<input type='checkbox' name='gra'></td></tr>

    <tr><td colspan=3

                            </select></td>

                      </tr> 

    </table>

                <input type="submit" name='submit'  value="Найти">

                </form></td></tr>

    <tr><td  valign="top">

    <? include ('db_connect.php');

    $dol=$_POST['dol'];

    $d1=$_POST['d1'];

    $d2=$_POST['d2'];

    if ($dol=='on')

    {if ($d1=='on'){$P=$_POST['d0'];}

    else {if ($d2=='on') {$P=$_POST['d'];}};

    $s="select * from vacansii where (D='$P')";

    $r3=mysql_query($s);

    $n3=mysql_num_rows($r3);

    echo ": ".$n3;

    echo "<center><table  border=2 width=100% >";

    echo "<tr bgcolor=ffffaa><td width=30%>Должность</td><td>ФИО</td><td width=150>Дата</td></tr>";

    while ($myrow=mysql_fetch_array($r3))

          {

          echo "<tr bgcolor=eeeeee>"; if ($myrow['Log']!==$_SESSION['user']){ $put='vacansii3.php?id_vac';}

          else {if ($myrow['Log']==$_SESSION['user']) {$put='vacansii2.php?id_vac';}}

          echo "<td width=550><a href='".$put."=".$myrow['id_vac']."'>".$myrow['D']."</td>";

          echo "<td>".$myrow['ZP']."</td>";

          echo "<td>".$myrow['Data']."</td>";

          echo "</tr>";

          }

    echo "</table></center>";}

    else {if ($_POST['gra']=='on')

    {$G=$_POST['g0'];}

    $s="select * from vacansii where (GR='$G')";

    $r3=mysql_query($s);

    $n3=mysql_num_rows($r3);

    echo "Результатов поиска: ".$n3;

    echo "<center><table  border=2 width=100% >";

    echo "<tr bgcolor=ffffaa><td width=30%>Должность</td><td>Заработная  плата</td><td width=150>Дата</td></tr>";

    while ($myrow=mysql_fetch_array($r3))

          {echo "<tr bgcolor=eeeeee>"; if ($myrow['Log']!==$_SESSION['user']){ $put='vacansii3.php?id_vac';}

          else {if ($myrow['Log']==$_SESSION['user']) {$put='vacansii2.php?id_vac';}}

          echo "<td width=550><a href='".$put."=".$myrow['id_vac']." '>".$myrow['D']."</td>";

          echo "<td>".$myrow['ZP']."</td>";

          echo "<td>".$myrow['Data']."</td>";

          echo "</tr>"; }

    echo "</table></center>";}

    echo "</td></td></tr>";

    include("niz.php");?>

    searchr.php

    <?php session_start();

    include("top.php");?>

    <table class="main">

    <tr><td class="left"><table class="left1" >

                <tr class="avt">

                <td><? include("aut.php");?>

    </td> </tr>

                <tr class="add"><td><? include("add.php");?></td></tr>

                <tr><td></td></tr></table>

          <td class="right">

    <table class="left1" >

    <tr><td height="10%" valign="top" >

    <center><u><font color="#1020F0"></font></u><br>

    <form action="searchr.php" method="POST" >

    <Table >

    <tr><td colspan=3><center>Специальность<input type='checkbox' name='cpec'></td></tr>

          <tr><td>Выбрать</td>

          <td><select name="c0">

                            </select></td><td><input type='checkbox' name='c1'></td>

                </tr>

          <tr><td>Написать</td>

                <td><input name="c" type="text" value="" size="10"></td>

                <td><input type='checkbox' name='c2'></td></table>

    <Table >

    <tr><td colspan=3><center>Образование<input type='checkbox' name='ob'></td></tr>

    <tr><td colspan=3><select name="ob0">

                            <option>Среднее</option>

                            <option>Среднее специальное</option>

                            <option>Высшее</option>

                            </select></td>

                      </tr> 

    </table>  <input type="submit" name='submit'  value="Найти">

                </form></td></tr>

    <tr><td  valign="top">

    <? include ('db_connect.php');

    $cpec=$_POST['cpec'];

    $c1=$_POST['c1'];

    $c2=$_POST['c2'];

    if ($cpec=='on')

    {if ($c1=='on'){$P=$_POST['c0'];}

    else {if ($c2=='on') {$P=$_POST['c'];}};

    $s="select * from rez where (cpec='$P')";

    $r3=mysql_query($s);

    $n3=mysql_num_rows($r3);

    echo "Результатов поиска: ".$n3;

    echo "<center><table  border=2 width=100% >";

    echo "<tr bgcolor=ffffaa><td width=50% height=10>Специальность</td><td width=50%>ФИО</td ></tr>";

    while ($myrow=mysql_fetch_array($r3))

          {

          echo "<tr bgcolor=eeeeee>"; if ($myrow['Log']!==$_SESSION['user']){ $put='rezum3.php?id_rez';}

          else {if ($myrow['Log']==$_SESSION['user']) {$put='rezum2.php?id_rez';}}

          echo "<td width=550><a href='".$put."=".$myrow['id_rez']."'>".$myrow['cpec']."</td>";

          echo "<td>".$myrow['F']." ".$myrow['I']." ".$myrow['O']."

    </td>";

          echo "</tr>";

          }

    echo "</table></center>";}

    else {if ($_POST['ob']=='on')

    {$G=$_POST['ob0'];}

    $s="select * from rez where (obr='$G')";

    $r3=mysql_query($s);

    $n3=mysql_num_rows($r3);

    echo "Результатов поиска: ".$n3;

    echo "<center><table border=2 width=100% >";

    echo "<tr bgcolor=ffffaa><td width=50% height=10>Специальность</td><td width=50%>ФИО</td ></tr>";

    while ($myrow=mysql_fetch_array($r3))

          {

          echo "<tr bgcolor=eeeeee>"; if ($myrow['Log']!==$_SESSION['user']){ $put='rezum3.php?id_rez';}

          else {if ($myrow['Log']==$_SESSION['user']) {$put='rezum2.php?id_rez';}}

          echo "<td width=550><a href='".$put."=".$myrow['id_rez']."'>".$myrow['cpec']."</td>";

          echo "<td>".$myrow['F']." ".$myrow['I']." ".$myrow['O']."

    </td>";

          echo "</tr>";

          }

    echo "</table></center>";}

    echo "</td></td></tr>";

    include("niz.php");?>

    reg.php

Информация о работе Разработка Web сайта