PLIK HTACESS (USER.INI):
output_buffering = 4092
register_globals = 1
error_reporting = E_ALL
KOD STRONY APP_TOPIC.PHP:
<?php include 'mysql.php'; include 'config.php'; include 'session.php'; $redirection_page=$pathInfo['filename'].'.php'; $session = new session($redirection_page.'?subfor='.$_GET['subfor']); $session_work = $session->session_start(); $sql='SELECT user_login FROM users WHERE user_id='.$session->session_user; $sql='INSERT INTO thread(temat,id_topic,author) VALUES("'.urldecode($_GET['topic']).'",'.$_GET['subfor'].',"'.$row['user_login'].'")'; $sql="SELECT id FROM thread ORDER BY id DESC"; $sql='INSERT INTO answer(temat,id_thread,author) VALUES("'.$_GET['answer'].'",'.$id_thread['id'].',"'.$row['user_login'].'")'; } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"><head> <link rel="Stylesheet" type="text/css" href="styles.css" /> <title>Strona</title> <meta http-equiv="content-type" content="application/x-www-form-urlencoded ; charset=utf-8"> <script type="text/javascript" src="jquery-1.7.1.js"></script> <script type="text/javascript" src="app_topic.js"></script> </head> <body> <div id="top"><div id="tp_left">Witam na forum dyskusyjnym '.((!$session_work)?NULL:$row['user_login']); if(!$session_work){ echo '<div id="form_login"> <form method="POST" action="'.$redirection_page.'"> <div id="obiekt" class="login"> <label for="username">Nazwa użytkownika:</label> <input type="text" id="username" name="login"> <label for="password">Hasło:</label> <input type="password" id="password" name="password"> </div> <div id="button" class="login"> <input type="submit" value="Zaloguj"> </div> </form></div>'; } if($session_work){ echo '<a href="'.$session->redirection_page.'?session_id='.$session->session_id.'"><span class="logout">Wyloguj się</span></a>'; } echo '</div></div> <div id="menu"> menu <br> <a href="index.php"> <b>strona główna</b></a> <br> <a href="index1.php"> <b>bazy danych</b></a> <br> <a href="index2.php"> <b>php</b></a> <br> <a href="index3.php"> <b>inne</b></a> <br> </div> <div id="cont">'; }; }else{ } echo '<form method="GET" id="form_app_topic"> <input type="hidden" name="subfor" value="'.$_GET['subfor'].'"> <div id="info"> <span>temat:</span><input type="text" name="topic" id="topic" > </div> <div id="cont_answer"><textarea name="answer" id="answer"></textarea></div> <div id="app_topic_but"><span>dodaj temat</span></div>'; echo '</form> </div> </body> </html>'; ?>