</table>
</form>'; */
echo '<br /><br /><form method="POST" action="test.php">
<table border="0" width="953">
<input name="quest_id" value="'.$quest_id.'" type="hidden" />
<tr><td width="80"></td><td colspan="2" align="center"><div>'.$img.'</div></td><td width="80"></td></tr>
<tr><td width="80"></td><td colspan="2" align="left"><div style="padding-left: 5px;">'.$question.'</div></td><td width="80"></td></tr>
<tr><td width="80"></td><td colspan="2" align="left"><div>'.$f.'</div></td><td width="80"></td></tr>
</td></tr>
</table>
</form>';
}
// метод для отображения вопросов и ответов когда их пропустили
public function ShowTest2($perem)
{
$id = $this->getdriver()->PutContent($perem);
$this->getdriver()->Select('t_question', '', 'quest_id='.$id, '', '', '', '', '');
$row = $this->getdriver()->FetchResult();
$quest_id = $row['quest_id'];
$question = $row['quest_question'];
$image = $row['quest_image'];
if (!empty($image)) $img = '<br /><span class="png"><img src="images/'.$image.'" alt="" /></span><br /><br />';
else $img = '';
$this->getdriver()->Select('t_answer', '', 'ans_question_id='.$id, '', '', '', '', '');
$f = '';
while($row1 = $this->getdriver()->FetchResult())
{
$answer_id = $row1['ans_id'];
$answer = $this->getdriver()->Strip($row1['ans_answer']);
$f .= '<input type="radio" name="ans_id" value="'.$answer_id.'" onClick="setButton(\'next_later\');" /> '.$answer.'<br />';
}
/* echo '<form method="POST" action="test.php">
<table border="0" width="100%">
<tr><td>
<input name="quest_id" value="'.$quest_id.'" type="hidden" />
<div>'.$question.'</div>
<div>'.$img.'</div>
<div>'.$f.'</div>
</td></tr>
<tr><td align="center"><br /><span class="kn"><button type="submit" id="next_later" name="next_later" disabled="disabled"><img src="files/img/next.jpg" alt="ответить" /></button>
<button type="submit" name="later" disabled=true><img src="files/img/later.jpg" alt="пропустить" /></button></span></td></tr>
</table>
</form>'; */
echo '<br /><br /><form method="POST" action="test.php">
<table border="0" width="953">
<input name="quest_id" value="'.$quest_id.'" type="hidden" />
<tr><td width="80"></td><td colspan="2" align="center"><div>'.$img.'</div></td><td width="80"></td></tr>
<tr><td width="80"></td><td colspan="2" align="left"><div style="padding-left: 5px;">'.$question.'</div></td><td width="80"></td></tr>
<tr><td width="80"></td><td colspan="2" align="left"><div>'.$f.'</div></td><td width="80"></td></tr>
</td></tr>
<tr><td width="80"></td><td align="center"><span class="kn"><br /><button type="submit" id="next_later" name="next_later" disabled="disabled"><img src="files/img/next.jpg" alt="ответить" /></button></span></td>
<td align="center"><span class="kn"><br /><button type="submit" name="later" disabled=true><img src="files/img/later.jpg" alt="пропустить" /></button></span></td><td width="80"></td></tr>
</table>
</form>';
}
}
?>
Програмний код головної сторінки (файл index.php)
<?
session_start();
include_once('core/core_main.php');
$pi = $popmenu->PathIncludes($sublink);
if (isset($show)) $s = '../';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<?
$seomenu = $menu->ShowSeo($link); $seocontent = $content->ShowSeo($link, $sublink);
if (!empty($seocontent[0]))
{
echo '<title>'.$seocontent[0].'</title>';
echo '<meta name="description" content="'.$seocontent[1].'" />';
echo '<meta name="keywords" content="'.$seocontent[2].'" />';
}
else if (!empty($seomenu[0])){
echo '<title>'.$seomenu[0].'</title>';
echo '<meta name="description" content="'.$seomenu[1].'" />';
echo '<meta name="keywords" content="'.$seomenu[2].'" />';
}
else
{
echo '<title>IQ - тест</title>';
echo '<meta name="description" content="тест" />';
echo '<meta name="keywords" content="тест" />';
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link rel="stylesheet" type="text/css" href="<?echo $pi.$s;?>css/style.css" />
<!-- <link rel="stylesheet" type="text/css" href="<?//echo $pi;?>css/carousel.css" /> -->
<link rel="stylesheet" type="text/css" href="<?echo $pi.$s;?>includes/css/paginator3000.css" />
<link rel="stylesheet" type="text/css" href="<?echo $pi.$s;?>includes/css/jquery.alerts.css" />
<script type="text/javascript" src="<?echo $pi.$s;?>js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.png').pngFix( );
});
</script>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script language="javascript" src="AC_RunActiveContent.js"></script>
<!--<script type="text/javascript">
function Login() {
var str = '';
$.post("modules/users/ajaxlogin.php", str, function(data) {
$("#login").html(data);
});
document.getElementById("button").disabled = true;
document.getElementById("button").style.display = 'none';
}
function checkF(f) {
if (f.fam.value =='') {jAlert("забыли написать фамилию!", "сообщение", function (){f.fam.focus()}); return false; }
if (f.mail.value =='') {jAlert("напишите Ваш мейл!", "сообщение", function (){f.mail.focus()}); return false; }
if (f.pass.value =='') {jAlert("пароль тоже надо написать!", "сообщение", function (){f.pass.focus()}); return false; }
if (f.pass2.value =='') {jAlert("а повторить пароль забыли?", "сообщение", function (){f.pass2.focus()}); return false; }
if (f.pass.value != f.pass2.value) {jAlert("пароли не совпали!\nпопробуйте еще разочек!", "сообщение", function (){f.pass2.focus()}); return false; }
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(f.mail.value)){
return true;
}
jAlert('мейл не принимается!\nисправляем...', "сообщение", function (){f.mail.select()});
return false;
//return true;
}
function checkR(f) {
if (f.name.value =='') {jAlert("Для восстановления пароля нужно написать имя!", "сообщение", function (){f.name.focus()}); return false; }
if (f.mail.value =='') {jAlert("Для восстановления пароля нужно написать мейл!", "сообщение", function (){f.mail.focus()}); return false; }
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(f.mail.value)){
return true;
}
jAlert('мейл не принимается!\nисправляем...', "сообщение", function (){f.mail.select()});
return false;
//return true;
}
function checkL(f) {
if (f.pass.value =='') {jAlert("Если Вы хотите авторизироваться, нужно написать пароль!", "сообщение", function (){f.pass.focus()}); return false; }
if (f.mail.value =='') {jAlert("Если Вы хотите авторизироваться, нужно написать мейл!", "сообщение", function (){f.mail.focus()}); return false; }
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(f.mail.value))) {
jAlert('мейл не принимается!\nисправляем...', "сообщение", function (){f.mail.select()});
return false;
}
var str = $("#f_login").serialize();
$.post("modules/users/ajaxchecklogin.php", str, function(data){
$(".error").html(data);
if (document.getElementById("log").value == 1)
{
window.location = 'modules/users/check_aut.php';
}
});
return false;
}
</script> -->
</head>
<body>
<div id="all-site">
<div id="container">
<div id="flash-holder">
<div id="header">
<noscript><center><h2><div style="color: red;">Javascript выключен! Для прохождения теста включите javascript в настройках Вашего браузера.</div></h2></center></noscript>
<?
if ((empty($link)) or ($link == 1))
{
echo '<a href="'.$pi.$s.'index.php" title="на главную"><img src="'.$pi.$s.'files/img/aroma-header.jpg" alt="на главную" /></a>';
}
?>
</div>
<div class="text-content">
<?
if ((empty($link)))
{
echo '<center><table border="0" width="953"><tr><td valign="top">';
echo '<img src="files/img/maket1.jpg" alt="" />';
if (($link != 20) and ($link != 21))
{
echo '<form action="'.$pi.$s.'test.php" method="post" class="super_knopka">
<div class="kn"><button type="submit" id="button" name="enter"><img src="'.$pi.$s.'files/img/start.jpg" alt="начать тест" /></button></div>
</form>';
}
echo '<br /><br />';
echo '<table style="height: 273px; _height: 270px;" border="0" width="100%"><tr><td align="left" valign="top" width="330"><img src="files/img/maket3.jpg" alt="" /></td>
<td valign="bottom">';
?>
<div style="margin: 23px 0 0 0;">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '160', 'height', '240', 'src', 'video', 'allowFullScreen', 'false',
'allowScriptAccess','sameDomain', 'movie', 'images/SSvideo/video',
'salign', ''); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="160" height="240" id="video" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="images/SSvideo/video.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="images/SSvideo/video.swf" quality="high" bgcolor="#000000" width="160" height="240" name="video" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
<td valign="bottom">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '160', 'height', '240', 'src', 'video', 'allowFullScreen', 'false',
'allowScriptAccess','sameDomain', 'movie', 'images/SSvideo/video',
'salign', ''); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="122" height="182" id="video2" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="images/KSvideo/video.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="images/KSvideo/video.swf" quality="high" bgcolor="#000000" width="122" height="182" name="video2" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
<?
/* echo '<object width="144" height="214" data="../images/aromarich_loop.swf" type="application/x-shockwave-flash">
<param name="quality" value="high" />
<param name="src" value="../images/aromarich_loop.swf" />
<param name="align" value="middle" />