Commit | Line | Data |
---|---|---|
bc13d5d6 H |
1 | <html><head><title>user administration</title> |
2 | <link rel=stylesheet type="text/css" href="../css/gr.css"> | |
3 | </head> | |
4 | <body> | |
5 | <? | |
6 | ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config/"); | |
7 | include_once("kyberia.inc"); | |
8 | $database=new CLASS_KYBERIA(); | |
9 | ||
10 | $event=$_POST['event']; | |
11 | if ($event=='accept') { | |
12 | $email=$_POST['email']; | |
13 | $mailbody="zdravim ta clovece\ndocela rad ti oznamujem ze si bol(a) zaregistrovany(a) do diskusneho systemu kyberia.sk s loginom ".$_POST['login']."..takze ked chces, zaloguj sa dnu & uzivaj si kyberpriestor..help k systemu najdes tu: http://www.kyberia.sk/index.php?action=article&node_id=179.....ako prve by som ti asi poradil nastavit si ikonku v sekcii \"nastavenie\"...tot vse..\n\ns pozdravom\nhromi@kyberia.sk\n\n"; | |
14 | if (!empty($_POST['message'])) $mailbody.="poznamka od registratora> ".$_POST['message']; | |
15 | // mail("hromi@kyberia.sk",'registracia na kyberia.sk',$mailbody,"From: hromi@kyberia.sk\nReturn-path: kyberia@kyberia.sk"); | |
16 | mail($email,'registracia na kyberia.sk',$mailbody,"From: kyberia@kyberia.sk\nReturn-path: kyberia@kyberia.sk"); | |
17 | ||
18 | $id=$_POST['id']; | |
19 | $database->query("update user set user_active='yes' where id='$id'"); | |
20 | } | |
21 | ||
22 | elseif ($event=='refuse') { | |
23 | $email=$_POST['email']; | |
24 | $mailbody="zdravim ta clovece\nbohuzial ti musim oznamit ze si nebol zaregistrovany do systemu kyberia.sk....pokial mas este stale zaujem o to stat sa clenom kyberie, pokus sa znova, mozno budes mat tentokrat stastie,alebo budem mat empatickejsiu naladu ;-)\n\ns pozdravom hromi@kyberia.sk"; | |
25 | if (!empty($_POST['message'])) $mailbody.="P.S> ".$_POST['message']; | |
26 | mail($email,'registracia na kyberia.sk',$mailbody,"From: kyberia@kyberia.sk\nReturn-path: kyberia@kyberia.sk"); | |
27 | echo $mailbody; | |
28 | ||
29 | $id=$_POST['id']; | |
30 | $database->query("delete from user where id='$id'"); | |
31 | ||
32 | } | |
33 | ||
34 | ||
35 | elseif ($event=='delete') { | |
36 | $database->query("delete from user where id='$id'"); | |
37 | } | |
38 | ||
39 | ||
40 | echo "<table border=1><tr><td>id</td><td>login</td><td>web</td><td>info</td><td>change status</td></tr>"; | |
41 | $q="select * from user where user_active!='yes' order by id desc"; | |
42 | $set=$database->query($q); | |
43 | while($set->next()) { | |
44 | echo "<tr><td>".$set->getString('id')."</td><Td><a href='mailto:".$set->getString('email')."'>".$set->getString('login')."</a></td><td>".$set->getString('user_www')."</td><td>".$set->getString('user_info')."</td><td><form action='/admin/user_admin.php' method='post'><input type=hidden name='id' value='".$set->getString('id')."'><textarea name=message rows=10 cols=10 style='width: 100pt;'></textarea><br><input type=hidden name=email value='".$set->getString('email')."'><input type='hidden' name='login' value='".$set->getString('login')."'><input type=submit name=event value=accept><input type=submit name=event value=refuse><input type=submit name=event value=delete></form></tr>"; | |
45 | } | |
46 | ||
47 | echo "</table>"; | |
48 | ||
49 | ?> | |
50 | </body></html> |