Kyberia v1.0
[mirrors/Kyberia-bloodline.git] / inc / get_eventz.inc
1 <?php
2 define("stastie","UIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
3 define("LASKA","mam vas rad.majte ma radi");
4 define("vykaleny","som na kasu, serte na mna");
5 define("nasrany","23 stoporenych volskych kokotov do riti a kotvu do chrbta. vam vsetkym!");
6 define("depresia","ZABITE MAAAAAAAAAAAAAAAAAA");
7
8 switch ($_GET['get_event']) {
9 case 'switchstatus':
10 $status=eventz::switchstatus();
11 if ($status) {
12 if ($_GET['node_id']) $args="&node_id=".$_GET['node_id'];
13 Header("Location:".SCRIPT."?action=$action$args");
14 }
15 else echo $error;
16 break;
17
18 }
19
20 class eventz {
21
22 function switchstatus() {
23 $statuses['nasrany']="user_agressive";
24 $statuses['vykaleny']="user_drugged";
25 $statuses['LASKA']="user_love";
26 $statuses['stastie']="user_happy";
27 $statuses['depresia']="user_sad";
28
29 global $kyberia;
30 global $user_id;
31 global $user_name;
32 $user_status=$_GET['user_status'];
33
34 if (($user_status!="normal") and ($user_status!="invisible")) {
35 $set=$kyberia->query("select ".$statuses[$user_status]." from user where id='$user_id'");
36 $set->next();
37 $message=$set->getString($statuses[$user_status]);
38 if (empty($message)) $message=constant($user_status);
39
40 }
41 $kyberia->query("update session set user_mode='$user_status',user_id='$user_id',user_mode_message='$message' where user_id='$user_id'");
42 return true;
43
44 }
45 }
This page took 0.393781 seconds and 4 git commands to generate.