Здравейте,
Правя проект за електронен дневник и в него има бележки но ми излизат ??????? сложил съм charset=windows-1251 но не става ето го кода :
Правя проект за електронен дневник и в него има бележки но ми излизат ??????? сложил съм charset=windows-1251 но не става ето го кода :
PHP:
<?php
/*
+--------------------------------------------------------------------------
| Електронен дневник v1.0.0
| ========================================
| Създатели Cyber eXtream Live
+---------------------------------------------------------------------------
|
| > Скрипта е написан от Любомир Стефанов (Shyne)
| > Дата на създаването: 21 ноември 2005
|
+--------------------------------------------------------------------------
*/
// Настройваме php.ini според наш вкус и отстраняваме евентуални дупки:
ini_set('error_reporting', 0);
ini_set('register_globals', 0);
ini_set('magic_quotes_gpc', 0);
ini_set('magic_quotes_runtime', 0);
session_name();
session_start("id");
Global $check, $id, $user, $name, $name2, $user_id, $db;
$цхецк = 0;
if (!(session_is_registered("id")))
{
session_unset();
session_destroy();
}
else
{
$check = 1;
$name = $_SESSION['name'];
$name2 = $_SESSION['name2'];
$user = $_SESSION['user'];
$user_id = $_SESSION['id'];
}
$ip = $_SERVER['REMOTE_ADDR'];
// Дефиниране на променливи
require_once("./dboption.php");
$connect = mysql_connect($host, $dbuser, $dbpass) OR die ("Не може да се направи връзка с хоста");
$connect = mysql_select_db($db, $connect) OR die ("Не може да се направи връзка с базата данни");
require_once("functions/main_f.php");
require_once('functions/login.php');
school_info();
echo
<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Електронен дневник </title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta http-equiv="Content-Language" content="bg" />
<meta http-equiv="Cache-control" content="no-cache" />
<meta name="Description" content="Електронен дневник ." />
<meta name="Keywords" content="електронен, електронен дневник, $school_town
$school_site, $school_telephone, $school_email" />
<meta name="Author" content="Любомир Стефанов (www.tutorials-bg.org)" />
<meta name="Copyright" content="(c) Cyber eXtreame Live" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/menu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/popup.js"></script>
<script type="text/javascript">
function newWindow(url) {
catWindow=window.open('include/popup/change.php?id=' +url, 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=200,height=300')
}
</script>
<script type="text/javascript">
</script>
</head>
EOF;
?>
<body onload="preloadImages();">
<div style="position:absolute;top:0px;left:130px">
<center>
<table width="664" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="22">
<img src="images/style_0s1.gif" width="2" height="693" alt="" /></td>
<td colspan="6">
<img src="images/style_02.gif" width="123" height="23" alt="" /></td>
<td colspan="5">
<img src="images/style_03.gif" width="222" height="23" alt="" /></td>
<td>
<img src="images/style_04.gif" width="38" height="23" alt="" /></td>
<td colspan="6">
<img src="images/style_05.gif" width="275" height="23" alt="" /></td>
<td rowspan="22">
<img src="images/style_06.gif" width="3" height="693" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="23" alt="" /></td>
</tr>
<tr>
<td colspan="6" rowspan="4">
<img src="images/style_07.gif" width="123" height="95" alt="" /></td>
<td rowspan="4">
<img src="images/style_08.gif" width="13" height="95" alt="" /></td>
<td colspan="4">
<img src="images/style_09.gif" width="209" height="20" alt="" /></td>
<td rowspan="2">
<img src="images/style_10.gif" width="38" height="44" alt="" /></td>
<td colspan="4" rowspan="4">
<img src="images/style_11.gif" width="131" height="95" alt="" /></td>
<td colspan="2" rowspan="4">
<img src="images/style_12.gif" width="144" height="95" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="20" alt="" /></td>
</tr>
<tr>
<td rowspan="3">
<img src="images/style_13.gif" width="8" height="75" alt="" /></td>
<td colspan="3" rowspan="2" valign="bottom" style="background-image: url(images/style_14.gif);" align="center">
<div class="top_s">
<span style="color: #452E2F; font-size: 16px; font-weight: bold;"><? echo $school_name; ?></span>
</div>
</td>
<td>
<img src="images/spacer.gif" width="1" height="24" alt="" /></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/style_15.gif" width="38" height="51" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="16" alt="" /></td>
</tr>
<tr>
<td colspan="3" style="background-image: url(images/style_16.gif);" align="center">
<span class="main_school_town">гр. <? echo $school_town; ?></span>
</td>
<td>
<img src="images/spacer.gif" width="1" height="35" alt="" /></td>
</tr>
<tr>
<td colspan="7" rowspan="2">
<img src="images/style_17.gif" width="136" height="53" alt="" /></td>
<td colspan="6">
<img src="images/style_18.gif" width="255" height="26" alt="" /></td>
<td colspan="3" rowspan="2" style="background-image: url(images/style_19.gif);" height="53" valign="bottom" align="left">
<?
if ($check == 1)
{
echo '<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=profile" class="admin_panel_a">Профил</a><br />';
$i = 0;
$show = mysql_query("SELECT * FROM ls WHERE to_name='$name' AND to_name2='$name2' AND view=0");
while($row = mysql_fetch_array($show))
{
$i=($i+1);
}
echo '<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=ls&CODE=show" class="admin_panel_a">'.$i.' нови съобщения</a><br />';
}
?>
</td>
<td colspan="2" rowspan="2" style="background-image: url(images/style_20.gif);" width="144" valign="bottom" align="left">
<? if (($check == 1) AND ($user == 1))
{
echo '
<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=admin" class="admin_panel_a">Контролен панел</a><br />
<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=admin&code=other" class="admin_panel_a">Общи настройки</a>
';
}
elseif(($check == 1) AND ($user == 2))
{
$querypm = mysql_query("SELECT * FROM ls WHERE to_rank='$teachers' AND view=0 ORDER by id DESC");
$rowpm = mysql_fetch_row($querypm);
$pm = $rowpm[0];
echo '
<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=moderate" class="admin_panel_a">Контролен панел</a><br />
<img src="images/nav_mm.gif" alt="" /> <a href="index.php?act=moderate&code=other" class="admin_panel_a">Общи настройки</a><br />
';
}
?>
</td>
<td>
<img src="images/spacer.gif" width="1" height="26" alt="" /></td>
</tr>
<tr>
<td colspan="6" style="background-image: url(images/style_21.gif);" align="center">
<?if ($check == 1){?>Здравей <span class="main_menu"><? echo $name . " " . $name2 . "</span>"; } ?></td>
<td>
<img src="images/spacer.gif" width="1" height="27" alt="" /></td>
</tr>
<tr>
<td rowspan="8" valign="top">
<img src="images/style_22.gif" width="49" height="175" alt="" /></td>
<td colspan="4">
<a href="index.php"
onmouseover="changeImages('style_23', 'images/style_23-over.gif'); return true;"
onmouseout="changeImages('style_23', 'images/style_23.gif'); return true;">
<img name="style_23" src="images/style_23.gif" width="57" height="26" border="0" alt="" /></a></td>
<td colspan="5" rowspan="3" valign="top">
<img src="images/style_24.gif" width="62" height="54" alt="" /></td>
<td colspan="8" rowspan="12" bgcolor="#f4f4f4" valign="top">
<div class="center_s">
<div style="padding:10px">
<?
switch($_GET['act'])
{
case 'login':
include('./include/login.php'); break;
case 'logout':
include('./include/logout.php'); break;
case 'help':
include('./include/help.php'); break;
case 'help2':
include('./include/help.php'); break;
case 'contact':
include('./include/contat.php'); break;
case 'admin':
include('./include/admin.php'); break;
case 'moderate':
include('./include/moderate.php'); break;
case 'check':
include('./include/check.php'); break;
case 'belevki':
include('./include/belevki.php'); break;
case 'register':
include('./include/register.php'); break;
case 'ls':
include('./include/ls.php'); break;
case 'los':
include('./include/los.php'); break;
case 'profile':
include('./include/profile.php'); break;
default: // разглеждане на index-a
include('./include/index.php');
}
?>
</div>
</div>
</td>
<td>
<img src="images/spacer.gif" width="1" height="26" alt="" /></td>
</tr>
<tr>
<td rowspan="7" valign="top">
<img src="images/style_26.gif" width="8" height="149" alt="" /></td>
<td colspan="3">
<img src="images/style_27.gif" width="49" height="9" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="9" alt="" /></td>
</tr>
<tr>
<td colspan="3">
<?
if ($check == 1)
{
?>
<a href="index.php?act=logout"
onmouseover="changeImages('style_logout', 'images/style_logout_over.gif', 'style_30', 'images/style_30-over.gif'); return true;"
onmouseout="changeImages('style_logout', 'images/style_logout.gif', 'style_30', 'images/style_30.gif'); return true;">
<img name="style_logout" src="images/style_logout.gif" width="49" height="19" border="0" alt="" /></a></td>
<?
}
else
{
?>
<a href="index.php?act=login"
onmouseover="changeImages('style_28', 'images/style_28-over.gif', 'style_30', 'images/style_30-over.gif'); return true;"
onmouseout="changeImages('style_28', 'images/style_28.gif', 'style_30', 'images/style_30.gif'); return true;">
<img name="style_28" src="images/style_28.gif" border="0" alt="" /></a></td><?}?>
</tr>
<tr>
<td rowspan="6" valign="top">
<img src="images/style_29.gif" width="8" height="159" alt="" border="0" /></td>
<td colspan="2">
<a href="#"
onmouseover="changeImages('style_28', 'images/style_28-over.gif', 'style_30', 'images/style_30-over.gif'); return true;"
onmouseout="changeImages('style_28', 'images/style_28.gif', 'style_30', 'images/style_30.gif'); return true;">
<img name="style_30" src="images/style_30.gif" width="41" height="8" border="0" alt="" /></a></td>
<td valign="top">
<img src="images/style_31.gif" width="17" height="8" alt="" /></td>
<td colspan="4" rowspan="2" valign="top">
<img src="images/style_32.gif" width="45" height="31" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="8" alt="" /></td>
</tr>
<tr>
<td colspan="3">
<a href="index.php?act=help"
onmouseover="changeImages('style_33', 'images/style_33-over.gif', 'style_35', 'images/style_35-over.gif'); return true;"
onmouseout="changeImages('style_33', 'images/style_33.gif', 'style_35', 'images/style_35.gif'); return true;">
<img name="style_33" src="images/style_33.gif" width="58" height="23" border="0" alt="" /></a></td>
<td>
<img src="images/spacer.gif" width="1" height="23" alt="" /></td>
</tr>
<tr>
<td rowspan="5">
<img src="images/style_34.gif" width="8" height="139" alt="" /></td>
<td colspan="2">
<a href="index.php?act=contact"
onmouseover="changeImages('style_33', 'images/style_33-over.gif', 'style_35', 'images/style_35-over.gif'); return true;"
onmouseout="changeImages('style_33', 'images/style_33.gif', 'style_35', 'images/style_35.gif'); return true;">
<img name="style_35" src="images/style_35.gif" width="50" height="8" border="0" alt="" /></a></td>
<td colspan="4">
<img src="images/style_36.gif" width="45" height="8" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="8" alt="" /></td>
</tr>
<tr>
<td colspan="4">
<a href="index.php?act=contact"
onmouseover="changeImages('style_37', 'images/style_37-over.gif'); return true;"
onmouseout="changeImages('style_37', 'images/style_37.gif'); return true;">
<img name="style_37" src="images/style_37.gif" width="71" height="24" border="0" alt="" /></a></td>
<td colspan="2" rowspan="8">
<img src="images/style_38.gif" width="24" height="379" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="24" alt="" /></td>
</tr>
<tr>
<td colspan="4" rowspan="4">
<img src="images/style_39.gif" width="71" height="135" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="58" alt="" /></td>
</tr>
<tr>
<td colspan="2" rowspan="2">
<img src="images/style_40.gif" width="57" height="49" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="38" alt="" /></td>
</tr>
<tr>
<td>
<img src="images/style_41.gif" width="8" height="11" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="11" alt="" /></td>
</tr>
<tr>
<td colspan="4" rowspan="5">
<img src="images/style_42.gif" width="73" height="298" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="28" alt="" /></td>
</tr>
<tr>
<td colspan="4" rowspan="3">
<img src="images/style_43.gif" width="71" height="220" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="176" alt="" /></td>
</tr>
<tr>
<td colspan="4" style="background-image: url(images/style_44.gif);" width="242" align="left">
<span class="powerd_by">Powerd by: KrIsKo0o
</span>
</td>
<td colspan="3">
<img src="images/style_45.gif" width="198" height="36" alt="" /></td>
<td rowspan="2">
<img src="images/style_46.gif" width="50" height="44" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="36" alt="" /></td>
</tr>
<tr>
<td colspan="7">
<img src="images/style_47.gif" width="440" height="8" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="8" alt="" /></td>
</tr>
<tr>
<td colspan="4">
<img src="images/style_48.gif" width="71" height="50" alt="" /></td>
<td>
<img src="images/style_49.gif" width="15" height="50" alt="" /></td>
<td colspan="6" style="background-image: url(images/style_50.gif);" width="282" height="50" valign="top" align="лефт">
<span class="sub_menu"><b>Copyright © 2005-2006 cyber eXtreame Life</b></span>
</td>
<td colspan="3" style="background-image: url(images/style_51.gif);" valign="top" align="left">
<a class="valid" href="http://validator.w3.org/check?uri=referer"><img
src="images/valid-xhtml10.png"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a>
</a>
</td>
<td>
<img src="images/spacer.gif" width="1" height="50" alt="" /></td>
</tr>
<tr>
<td colspan="20">
<img src="images/style_52.gif" width="663" height="3" alt="" /></td>
<td>
<img src="images/spacer.gif" width="1" height="3" alt="" /></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="2" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="49" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="8" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="8" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="8" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="33" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="17" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="13" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="8" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="15" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="9" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="177" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="38" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="8" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="19" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="31" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="73" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="94" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="50" height="1" alt="" /></td>
<td>
<img src="images/spacer.gif" width="3" height="1" alt="" /></td>
<td></td>
</tr>
</table>
</center>
</div>
</body>
</html>