-
Notifications
You must be signed in to change notification settings - Fork 0
/
360_hinnang.php
executable file
·62 lines (53 loc) · 1.54 KB
/
360_hinnang.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?
/*
variables
$S_x skaala pikkus - 1 (0..689)
$SID
$kys
$rel
$coords
*/
include( "sql_access.php" );
include( "global.php" );
$SID = $_GET['SID'];
$kys = $_GET['kys'];
$rel = $_GET['rel'];
$coords = $_GET['coords'];
$vastus = $_GET['vastus'];
$user_data = handshake( $SID );
if( $user_data === false ) die( "SMP:: forbidden" );
//**/ detect da browser
echo( "<script>
var isNS4 = document.layers ? true : false;
var isIE = document.all ? true : false;
var isDOM = document.getElementById ? true : false;
if( isDOM ) {
var dimages=parent.frames.ww_main.window.document.getElementsByTagName(\"img\");
document.write(\"j\"+dimages.length);
var skaala=dimages.skaala$kys;
var eioska=dimages.eioska$kys;
}
</script>\n" );
$S_x = 689;
$kysitlus = $user_data[kysitlus];
//**/precho( $user_data );
$split = explode( ",", $coords );
$vastus = substr( $split[0], 1 );
if( $vastus != -2 ) $vastus = $S_x - $vastus;
if( !SQL_insert_row( "vastused", "kysitlus='$kysitlus', rel='$rel', kysimus='$kys', vastus='$vastus'", false ) )
SQL_update_row( "vastused", "vastus='$vastus'", "rel='$rel' AND kysimus='$kys'", false );
if( $vastus == -2 ) {
echo(
"<script>
skaala.src = \"http://moos.ww.ee/360/_img/?c1=aaffaa&c2=ffaaaa&w=690&h=18\";
eioska.src = \"./_img/ei-oska$lang-r.gif\";
</script>\n" );
} else {
$vastus = $S_x - $vastus;
echo(
"<script>
skaala.src = \"http://moos.ww.ee/360/_img/?c1=aaffaa&c2=ffaaaa&w=690&h=18&loc=$vastus\";
eioska.src = \"./_img/ei-oska$lang.gif\";
</script>\n" );
}
?>