--- /dev/null
+<html><head><title>mindfuck v0.23</title>
+
+</head>
+<body>
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->executeQuery("select mindfuck.meno as meno ,user.login as registrator from mindfuck left join user on user.id=mindfuck.user_id order by meno asc");
+
+echo "<table border=1>";
+while ($set->next()) {
+ echo "<tr style='border-width: 1pt; border-color: black;'><td>".$set->getString('meno')."<td>".$set->getString('registrator')."<td style='border-width: 1pt; border-color: black;' width=300 ></tr>";
+}
+
+echo "</table>";
+
+?>
+</body></html>
\ No newline at end of file
--- /dev/null
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select autor,nadpis,zapis from dennik order by id desc limit 25";
+$set=$database->query($q);
+while($set->next()) {
+ $pole[]=$set->getRecord();
+}
+
+$data=serialize($pole);
+$file=fopen("/home/hromi1/kyberia/cache/1.php","a");
+fwrite($file,$data);
+fclose($file);
+
+
+?>
--- /dev/null
+<?
+include_once("../inc/kyberia.inc");
+$database=new CLASS_KYBERIA();
+function getParent($category) {
+ global $pole;
+ global $database;
+// echo "select category_parent from category where category_id='$category' and category_parent!=0";
+ $set=$database->query("select category_parent from category where category_id='$category' and category_parent!=0");
+ if ($set->next()) {
+// $set->next();
+ $pole[]=$set->getString('category_parent');
+ getParent($set->getString('category_parent'));
+ }
+}
+
+
+include_once("../inc/kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select forum_id,forum_category from forum";
+$set=$database->query($q);
+//getParent(67);
+//print_r($pole);
+
+while($set->next()) {
+ $pole[]=$set->getString('forum_category');
+ getParent($set->getString('forum_category'));
+ $pole=array_reverse($pole);
+ echo "<br>".$set->getString('forum_id');
+ foreach($pole as $key => $value) {
+ $param.="&kat[$key]=$value";
+ }
+ echo "::$param";
+ //$param=addslashes($param);
+ $database->update("update forum set forum_category_param='$param' where forum_id='".$set->getString('forum_id')."'");
+ unset ($param);
+ unset($pole);
+
+
+}
+
+?>
--- /dev/null
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config/");
+include_once("kyberia.inc");
+include_once("configdb.inc");
+$database=new CLASS_KYBERIA();
+function getParent($category) {
+ global $pole;
+ global $database;
+// echo "select category_parent from category where category_id='$category' and category_parent!=0";
+ $set=$database->query("select category_parent from category where category_id='$category' and category_parent!=0");
+ if ($set->next()) {
+// $set->next();
+ $pole[]=$set->getString('category_parent');
+
+ getParent($set->getString('category_parent'));
+
+ }
+}
+
+
+
+$database=new CLASS_KYBERIA();
+$q="select * from category";
+$set=$database->query($q);
+//getParent(67);
+//print_r($pole);
+
+while($set->next()) {
+ $pole[]=$set->getString('category_id');
+ getParent($set->getString('category_id'));
+ print_r($pole);
+ $pole=array_reverse($pole);
+ echo "<br>".$set->getString('category_id');
+ foreach($pole as $key => $value) {
+ $param.="$value;";
+ }
+ echo "::$param";
+ $param=addslashes($param);
+ $database->update("update category set category_tree='$param' where category_id='".$set->getString('category_id')."'");
+ unset ($param);
+ unset($pole);
+
+
+}
+
+?>
--- /dev/null
+<?
+echo "updating...";
+
+ini_set("include_path","../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+// that's all folks
+$q4="update user set user_k='3'";
+$database->query($q4);
+
+/* inicializacia, uz netreba
+$database->query("UPDATE k_logs SET k_amount=sign(k_amount)");
+
+$database->query("UPDATE submissions SET submission_k=0");
+$database->query("UPDATE dennik SET karma=0");
+$r = $database->query("SELECT * FROM k_logs");
+while($r->next()) {
+ if ($r->getString("node_type") == 'dennik')
+ $database->query("UPDATE dennik SET karma=karma+".$r->getString("k_amount")." WHERE id=".$r->getString('node_id'));
+ else
+ $database->query("UPDATE submissions SET submission_k=submission_k+".$r->getString("k_amount")." WHERE submission_id=".$r->getString('node_id'));
+}
+*/
+?>
+
+
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+//toto je povodne stanovenie dK podla charizmy
+$q="select count(*) as pocet,friend_id from friends group by friend_id ";
+$q2="select count(*) as psubm,u.login as ulogin, u.id as uid, u.user_karma as ukarma, u.user_k as uk from submissions as s inner join user as u on
+u.id = s.submission_owner group by s.submission_owner";
+$q3="select count(*) as psubmall,sum(s.submission_k) as allkarma from submissions as s, user as u where s.submission_owner=u.id";
+
+//vynulovanie povodnych kariem
+//co ak niekto zacne prispievat hrozne nahovno
+$q4="update user set user_k='0'";
+//$database->query($q4);
+
+$set=$database->query($q);
+$set3=$database->query($q3);
+
+$set3->next();
+$pomerall= ($set3->getString('allkarma')) /($set3->getString('psubmall'));
+//Vsetka karma v systeme
+ echo "allkarma: ".$set3->getString('allkarma')."<br>";
+//celkovy pocet prispevkov
+ echo "psubmall: ".$set3->getString('psubmall')."<br>";
+//pomer karmy na prispevok celek kyberky
+ echo "pomerall: ".$pomerall."<br>";
+
+//najprv sa stanovi dkarma podla charizmy
+while($set->next()) {
+ $q0="update user set charisma='".$set->getString('pocet')."' where id='".$set->getString('friend_id')."'";
+ echo $q0."<br>";
+// $database->query($q0);
+ $q0="update user set user_k='".$set->getString('pocet')."' where id='".$set->getString('friend_id')."'";
+ echo $q0."<br>";
+// $database->query($q0);
+}
+ echo "<br><br>";
+
+//potom vyberiem z db rozne kraviny
+$set2=$database->query($q2);
+
+//a potom to cele rozdrbem neprehladnym vzorcom
+while($set2->next()) {
+$psubm=$set2->getString('psubm');
+if ($psubm>100){
+ echo "ulogin: ".$set2->getString('ulogin')."<br>";
+//userova dkarma podla charismy
+ echo "uk: ".$set2->getString('uk')."<br>";
+//userovi pridelena karma celkovo
+ echo "ukarma: ".$set2->getString('ukarma')."<br>";
+//pocet userovych prispevkov
+ echo "psubm: ".$set2->getString('psubm')."<br>";
+$pomeruser=( $set2->getString('ukarma'))/($set2->getString('psubm'));
+$from_average=($pomeruser/$pomerall);
+$newuk=floor($from_average*23);
+//pomer karmy na prispevok celek kyberky
+ echo "pomeruser: ".$pomeruser."<br>";
+//pomer kvality prispevkov usera a celej kyberky
+ echo "from_average: ".$from_average."<br>";
+//nova dkarma bez upravy nulovania podpriemeru
+ echo "newuk: ".$newuk."<br>";
+//aby dostali K+ len nadpriemerny prispievatelia
+if ($newuk>23) {$newuk=$newuk-23;}
+else {$newuk=0;}
+if ($newuk>46) {$newuk=46;}
+$newuk+=($set2->getString('uk'));
+ $q0="update user set user_k='".$newuk."' where id='".$set2->getString('uid')."'";
+ echo $q0." ".$set2->getString('ulogin')."<br><br>";
+// $database->query($q0);
+}
+}
+//malo by z toho byt nieco taketo
+//dk= (((userk/usersubm)/(allk/allsubm))) *23 , ?dk>23:$dk-23!$dk=0
+?>
+
+
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+//toto je povodne stanovenie dK podla charizmy
+$q="select count(*) as pocet,friend_id from friends group by friend_id ";
+$q2="select count(*) as psubm,u.login as ulogin, u.id as uid, u.user_karma as ukarma, u.user_k as uk from submissions as s inner join user as u on
+u.id = s.submission_owner group by s.submission_owner";
+$q3="select count(*) as psubmall,sum(s.submission_k) as allkarma from submissions as s, user as u where s.submission_owner=u.id";
+
+//vynulovanie povodnych kariem
+//co ak niekto zacne prispievat hrozne nahovno
+$q4="update user set user_k='0'";
+$database->query($q4);
+
+$set=$database->query($q);
+$set3=$database->query($q3);
+
+$set3->next();
+$pomerall= ($set3->getString('allkarma')) /($set3->getString('psubmall'));
+//Vsetka karma v systeme
+ echo "allkarma: ".$set3->getString('allkarma')."<br>";
+//celkovy pocet prispevkov
+ echo "psubmall: ".$set3->getString('psubmall')."<br>";
+//pomer karmy na prispevok celek kyberky
+ echo "pomerall: ".$pomerall."<br>";
+
+//najprv sa stanovi dkarma podla charizmy
+while($set->next()) {
+ $q0="update user set charisma='".$set->getString('pocet')."' where id='".$set->getString('friend_id')."'";
+ echo $q0."<br>";
+ $database->query($q0);
+ $q0="update user set user_k='".$set->getString('pocet')."' where id='".$set->getString('friend_id')."'";
+ echo $q0."<br>";
+ $database->query($q0);
+}
+ echo "<br><br>";
+
+//potom vyberiem z db rozne kraviny
+$set2=$database->query($q2);
+
+//a potom to cele rozdrbem neprehladnym vzorcom
+while($set2->next()) {
+$psubm=$set2->getString('psubm');
+if ($psubm>100){
+ echo "ulogin: ".$set2->getString('ulogin')."<br>";
+//userova dkarma podla charismy
+ echo "uk: ".$set2->getString('uk')."<br>";
+//userovi pridelena karma celkovo
+ echo "ukarma: ".$set2->getString('ukarma')."<br>";
+//pocet userovych prispevkov
+ echo "psubm: ".$set2->getString('psubm')."<br>";
+$pomeruser=( $set2->getString('ukarma'))/($set2->getString('psubm'));
+$from_average=($pomeruser/$pomerall);
+$newuk=floor($from_average*23);
+//pomer karmy na prispevok celek kyberky
+ echo "pomeruser: ".$pomeruser."<br>";
+//pomer kvality prispevkov usera a celej kyberky
+ echo "from_average: ".$from_average."<br>";
+//nova dkarma bez upravy nulovania podpriemeru
+ echo "newuk: ".$newuk."<br>";
+//aby dostali K+ len nadpriemerny prispievatelia
+if ($newuk>23) {$newuk=$newuk-23;}
+else {$newuk=0;}
+if ($newuk>46) {$newuk=46;}
+$newuk+=($set2->getString('uk'));
+ $q0="update user set user_k='".$newuk."' where id='".$set2->getString('uid')."'";
+ echo $q0." ".$set2->getString('ulogin')."<br><br>";
+ $database->query($q0);
+}
+}
+//malo by z toho byt nieco taketo
+//dk= (((userk/usersubm)/(allk/allsubm))^2) *23 , ?dk>23:$dk-23!$dk=0
+?>
+
+
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+//toto je povodne stanovenie dK podla charizmy
+$q="select count(*) as pocet,friend_id from friends group by friend_id ";
+
+$set=$database->query($q);
+
+//najprv sa stanovi dkarma podla charizmy
+while($set->next()) {
+ $q0="update user set charisma='".$set->getString('pocet')."' where id='".$set->getString('friend_id')."'";
+ $database->query($q0);
+}
+ echo "<br><br>";
+?>
+
--- /dev/null
+<?php
+exec("/home/hromi1/kyberia/cron/cvs_update.sh");
+?>
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->query("alter table forum modify forum_public enum('private', 'public', 'moderated') default 'public'");
+$set=$database->query("update user set admin = 'yes' where id = '840'");
+
+?>
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$describe=$_GET['describe'];
+$table=$_GET['table'];
+$where=$_GET['where'];
+
+?>
+<form action='?' method='get'>
+describe
+<input type='text' name='describe' value='<? echo $describe;?>'>
+<input type='submit' value='send'>
+</form>
+<form action='?' method='get'>
+select * from
+<input type='text' name='table' value='<? echo $table;?>'>
+where
+<input type='text' name='where' value='<? echo $where;?>'>
+<input type='submit' value='send'>
+</form>
+<br>
+<?
+
+
+if ($table) selectni($table,$where);
+if ($describe) descni($describe);
+
+function descni($tablename){
+ global $database;
+ $q="describe $tablename";
+ $set=$database->query($q);
+
+ echo "<table border='1'><tr><td><b>Field</b></td><td><b>Type</b></td> <td><b>Null</b></td></tr>";
+ while($set->next()){
+ $field=$set->getString('Field');
+ $fields[]=$field;
+ $type=$set->getString('Type');
+ $null=$set->getString('Null');
+ echo "<tr><td>".$field."</td>";
+ echo "<td>".$type."</td>";
+ echo "<td>".$null."</td></tr>";
+ }
+ echo "</table>";
+}
+
+
+
+
+function selectni($tablename,$where){
+ global $database;
+ $q="describe $tablename";
+ $set=$database->query($q);
+ if ($where=="") {
+ $q2="select * from $tablename";
+ }else{
+ $where=StripSlashes($where);
+ $q2="select * from $tablename where $where";
+ }
+ echo $q2."<br>";
+ $set2=$database->query($q2);
+
+ while($set->next()){
+ $field=$set->getString('Field');
+ $fields[]=$field;
+ $type=$set->getString('Type');
+ $null=$set->getString('Null');
+ }
+ echo "<table border='1'><tr>";
+ for($i=0;$i<count($fields);$i++){
+ echo "<td><b>".$fields[$i]."</b></td>";
+ }
+
+ echo "</tr><tr>";
+
+ while($set2->next()){
+ for($i=0;$i<count($fields);$i++){
+ $onefield=$set2->getString($fields[$i]);
+ echo "<td>".$onefield."</td>";
+ }
+ echo "</tr><tr>";
+ }
+ echo "</tr></table>";
+}
+?>
\ No newline at end of file
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+?>
+<form action='?' method='get'>
+describe
+<input type='text' name='describe'>
+<input type='submit' value='send'>
+</form>
+<form action='?' method='get'>
+select * from
+<input type='text' name='table'>
+where
+<input type='text' name='where'>
+<input type='submit' value='send'>
+</form>
+<br>
+<?
+
+$describe=$_GET['describe'];
+$table=$_GET['table'];
+$where=$_GET['where'];
+
+if ($table) selectni($table,$where);
+if ($describe) descni($describe);
+
+function descni($tablename){
+ global $database;
+ $q="describe $tablename";
+ $set=$database->query($q);
+
+ echo "<table border='1'><tr><td><b>Field</b></td><td><b>Type</b></td> <td><b>Null</b></td></tr>";
+ while($set->next()){
+ $field=$set->getString('Field');
+ $fields[]=$field;
+ $type=$set->getString('Type');
+ $null=$set->getString('Null');
+ echo "<tr><td>".$field."</td>";
+ echo "<td>".$type."</td>";
+ echo "<td>".$null."</td></tr>";
+ }
+ echo "</table>";
+}
+
+
+
+
+function selectni($tablename,$where){
+ global $database;
+ $q="describe $tablename";
+ $set=$database->query($q);
+ if ($where=="") {
+ $q2="select * from $tablename";
+ }else{
+ $q2="select * from $tablename where $where";
+ }
+ echo $q2."<br>";
+ $set2=$database->query($q2);
+
+ while($set->next()){
+ $field=$set->getString('Field');
+ $fields[]=$field;
+ $type=$set->getString('Type');
+ $null=$set->getString('Null');
+ }
+ for($i=0;$i<count($fields);$i++){
+ echo "|:|<b>".$fields[$i]."</b>";
+ }
+
+ echo "<br>";
+
+ while($set2->next()){
+ for($i=0;$i<count($fields);$i++){
+ $onefield=$set2->getString($fields[$i]);
+ echo "|:|".$onefield;
+ }
+ echo "<br>";
+ }
+}
+?>
--- /dev/null
+<?
+include_once("../inc/kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select forum_id from category";
+$set=$database->query($q);
+while($set->next()) {
+ $q="select count(*) as pocet from forum where forum_category='".$set->getString('category_id')."'";
+ $set2=$database->query($q);
+ $set2->next();
+ $q="select count(*) as pocet from category where category_parent='".$set->getString('category_id')."'";
+ $set3=$database->query($q);
+ $set3->next();
+ $q="update category set category_subcats='".$set3->getString('pocet')."',category_forums='".$set2->getString('pocet')."' where category_id='".$set->getString('category_id')."'";
+ echo $q."<br>";
+ $database->query($q);
+}
+?>
--- /dev/null
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select * from forum";
+$set=$database->query($q);
+while($set->next()) {
+ $q="select count(*) as pocet from submissions where forum_id='".$set->getString('forum_id')."'";
+ $set2=$database->query($q);
+ $set2->next();
+ $q="select submission_timestamp from submissions where forum_id='".$set->getString('forum_id')."' order by submission_timestamp desc limit 1";
+ $set3=$database->query($q);
+ $set3->next();
+ $q="update forum set last_submission='".$set3->getString('submission_timestamp')."', forum_submissions='".$set2->getString('pocet')."' where forum_id='".$set->getString('forum_id')."'";
+ echo $q."<br>";
+ $database->query($q);
+}
+?>
\ No newline at end of file
--- /dev/null
+<html><head>
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->query("select user.login as login,forum.* from forum left join user on user.id=forum.forum_owner order by forum_id");
+echo "<form method='post'><table>";
+while ($set->next()) {
+ echo "<tr>";
+
+ echo "<td>",$set->getString('forum_id'),"</td>";
+ echo "<td>",$set->getString('forum_name'),"</td>";
+ echo "<td>",$set->getString('login'),"</td>";
+ echo "</tr>";
+}
+
+echo "</table>";
+
+?>
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$q="alter table session drop friends_serial";
+ echo $q."<br>";
+$set=$database->query($q);
+ echo "dropnute<br>";
+$q="alter table session add friends_serial text";
+ echo $q."<br>";
+$set=$database->query($q);
+ echo "alternute<br>";
+
+
+ echo "OK";
+?>
+
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$q="alter table session add friends_serial text";
+ echo $q."<br>";
+$set=$database->query($q);
+ echo "alternute<br>";
+
+
+ echo "OK";
+?>
+
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select acceptor_id,sum(k_amount) as pocet from k_logs group by acceptor_id";
+
+$set=$database->query($q);
+while($set->next()) {
+ $q="update user set user_karma='".$set->getString('pocet')."' where id='".$set->getString('acceptor_id')."'";
+ echo $q."<br>";
+ $database->query($q);
+}
+?>
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select meno from larry";
+
+$set=$database->query($q);
+while($set->next()) {
+ $rand="+421".rand(903123456,905876543);
+ $q="update larry set phone='$rand' where meno='".$set->getString('meno')."'";
+ echo $q."<br>";
+ $database->query($q);
+}
+?>
--- /dev/null
+<?
+include_once("../inc/kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select category_id from category";
+$set=$database->query($q);
+while($set->next()) {
+ $q="select count(*) as pocet from forum where forum_category='".$set->getString('category_id')."'";
+ $set2=$database->query($q);
+ $set2->next();
+ $q="select count(*) as pocet from category where category_parent='".$set->getString('category_id')."'";
+ $set3=$database->query($q);
+ $set3->next();
+ $q="update category set category_subcats='".$set3->getString('pocet')."',category_forums='".$set2->getString('pocet')."' where category_id='".$set->getString('category_id')."'";
+ echo $q."<br>";
+ $database->query($q);
+}
+?>
--- /dev/null
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select mail_to as user_id,count(*) as pocet from mail where mail_new='yes' group by mail_to";
+$set=$database->query($q);
+while($set->next()) {
+ $q="update user set user_mail='".$set->getString('pocet')."' where id='".$set->getString('user_id')."'";
+ $set2=$database->query($q);
+}
+?>
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$set=$database->query("select distinct email, login,password from user where user_active='yes'");
+while ($set->next()) {
+ echo "<BR>".$set->getString('login')." :: ".$set->getString('email')." :: ".$set->getString('password');
+}
+?>
--- /dev/null
+<?xml version="1.0"?>
+
+<rdf:RDF
+xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+xmlns="http://my.netscape.com/rdf/simple/0.9/">
+
+<channel>
+<title>Nanodot: Nanodot: News and Discussion of EmergingTechnologies</title>
+<link>http://nanodot.org/</link>
+<description>News and Discussion of EmergingTechnologies</description>
+</channel>
+
+<image>
+<title>Nanodot</title>
+<url>http://nanodot.org/images/topics/topicslash.gif</url>
+<link>http://nanodot.org/</link>
+</image>
+
+<item>
+<title>ON/OFF switch for a molecular motor</title>
+<link>http://nanodot.org/article.pl?sid=02/11/05/0955221</link>
+</item>
+
+<item>
+<title>Carbon nanotubes 30 cm long</title>
+<link>http://nanodot.org/article.pl?sid=02/11/05/0826243</link>
+</item>
+
+<item>
+<title>NEMS pump for potassium ion</title>
+<link>http://nanodot.org/article.pl?sid=02/11/05/0643212</link>
+</item>
+
+<item>
+<title>Conference showcases nanodevices progress</title>
+<link>http://nanodot.org/article.pl?sid=02/11/03/055252</link>
+</item>
+
+<item>
+<title>Investors proclaim interest in nanotechnology</title>
+<link>http://nanodot.org/article.pl?sid=02/11/03/0345206</link>
+</item>
+
+<item>
+<title>Time magazine on the nanotechnology industry</title>
+<link>http://nanodot.org/article.pl?sid=02/11/03/0140237</link>
+</item>
+
+<item>
+<title>Call on Fox News to support nanotechnology research</title>
+<link>http://nanodot.org/article.pl?sid=02/10/31/0341202</link>
+</item>
+
+<item>
+<title>2nd stage funding for Nanotech startups</title>
+<link>http://nanodot.org/article.pl?sid=02/10/31/033237</link>
+</item>
+
+<item>
+<title>Carbon nanotube space elevator planned</title>
+<link>http://nanodot.org/article.pl?sid=02/10/31/028221</link>
+</item>
+
+<item>
+<title>Nanotechnology - a trillion dollar market within a decade?</title>
+<link>http://nanodot.org/article.pl?sid=02/10/29/0439217</link>
+</item>
+
+</rdf:RDF>
\ No newline at end of file
--- /dev/null
+<?
+include_once("./inc/kyberia.inc");
+$set=$kyberia->query("SELECT forum_id from forum");
+$icondir="/home/hromi1/kyberia/images/forums/";
+$cmd=0;
+while ($set->next()) {
+ $id=$set->getString("forum_id");
+ $icon=$icondir.$id.".gif";
+ if (strstr(,".jpg")){
+ $cmd="/usr/local/netpbm/bin/jpegtopnm $forum_icon | /usr/local/netpbm/bin/pnmscale -width=123 | /usr/local/netpbm/bin/ppmquant 256 | /usr/local/netpbm/bin/ppmtogif > ".$icondir.strtolower($lastid).".gif";
+
+ }
+ elseif (strstr($forum_icon_name,".gif")) {
+ $cmd="/home/hromi1/kyberia/gifsicle --resize 123x_ $forum_icon > ".$icondir.strtolower($lastid).".gif";
+ }
+ if ($cmd) shell_exec($cmd);
+
+
+}
+?>
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->query("update user set login = 'gudmud' where id = '2031'");
+
+
+?>
--- /dev/null
+<?php
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$kyberia = new CLASS_KYBERIA();
+
+function strip_http_headers($text) {
+ $text = str_replace("\r\n","\n",$text);
+ $pozice = strpos($text,"\n\n");
+ $text = trim(substr($text,$pozice+0,strlen($text)));
+ return $text;
+}
+
+function unhtmlspecialchars($str) {
+ $trans = get_html_translation_table(HTML_SPECIALCHARS);
+ $trans = array_flip($trans);
+ return strtr($str, $trans);
+}
+
+
+function steal($url) {
+ $url=str_replace("http://","",$url);
+ $i=strpos($url,"/");
+ $hostname=substr($url,0,$i);
+ $filename=substr($url,$i);
+ $fp = fsockopen ($hostname, 80, $errno, $errstr, 30);
+ if (!$fp) {
+ echo "$errstr ($errno)<br>\n";
+ } else {
+ fputs ($fp, "GET /$filename HTTP/1.0\r\nHost: $hostname\r\n\r\n");
+ while (!feof($fp)) {
+ $rssdata.= fgets ($fp,128);
+ }
+ fclose ($fp);
+ return $rssdata;
+ }
+
+}
+
+$rssdata=steal($_GET['datafeed']);
+$rssdata=strip_http_headers($rssdata);
+$rssdata=urldecode($rssdata);
+include_once("xml/xmlarray.inc");
+
+if (strstr($rssdata,"<rss")) $capsule="rss";
+if (strstr($rssdata,"<rdf:RDF")) $capsule="rdf:RDF";
+$parser = new xmlarray("",$capsule);
+$pole=$parser->parse($rssdata);
+print_r($pole);
+if (empty($pole['channel']['item'])) $pole['channel']['item']=$pole['item'];
+foreach ($pole['channel']['item'] as $item) {
+ echo $item['title']."<br>";
+ if (! empty($item["link"])) {
+ $md5=md5($item['link']);
+ $set=$kyberia->executeQuery("select * from rss_news where news_md5='$md5'");
+ if (!$set->getNumRows()) {
+ $q="INSERT INTO rss_news set news_source='3',";
+ $q.="news_title='".addSlashes(unhtmlspecialchars($item["title"]))."',";
+ $q.="news_url='".addSlashes(unhtmlspecialchars($item["link"]))."'";
+ $q.=",news_md5='$md5'";
+ echo "<br>";
+ echo "<a class=box href='",$item["link"],"'>";
+ echo $item["title"],"</a>\n";
+ if (!empty($item["description"])) {
+
+ $q.=",news_desc='".addSlashes(strip_tags(unhtmlspecialchars($item['description'])))."'";
+ echo "<br><b>",$item['description'],"</b><br>";
+ }
+ if (!empty($item['image'])) {
+ if (!empty($item['image']['title'])) $q.=",news_image_title='".addSlashes(unhtmlspecialchars($item['image']['title']))."'";
+
+ if (!empty($item['image']['link'])) $q.=",news_image_link='".addSlashes(unhtmlspecialchars($item['image']['link']))."'";
+ if (!empty($item['image']['url'])) $q.=",news_image='".addSlashes(unhtmlspecialchars($item['image']['url']))."'";
+ }
+
+ elseif (!empty($pole['image'])) {
+ $q.=",news_image_title='".addSlashes(unhtmlspecialchars($pole['image']['title']))."'";
+ $q.=",news_image_link='".addSlashes(unhtmlspecialchars($pole['image']['link']))."'";
+ $q.=",news_image='".addSlashes(unhtmlspecialchars($pole['image']['url']))."'";
+ }
+ else {
+ $q.=",news_image_title='".addSlashes(unhtmlspecialchars($pole['channel']['image']['title']))."'";
+ $q.=",news_image_link='".addSlashes(unhtmlspecialchars($pole['channel']['image']['link']))."'";
+ $q.=",news_image='".addSlashes(unhtmlspecialchars($pole['channel']['image']['url']))."'";
+ }
+
+
+ $kyberia->executeUpdate($q);
+
+ }
+ }
+}
+
+
+
+?>
--- /dev/null
+<html><head><title>session</title>
+
+</head>
+<body>
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config");
+//ini_set("include_path","/var/users/stab/kyberia/inc:/var/users/stab/kyberia/boxiky/:/var/users/stab/kyberia/config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->executeQuery("select user_name, user_action, user_action_id,
+user_action_name from session where user_id = '".$user_id."'");
+
+echo "<table border=1>";
+echo
+"<tr><td>user_name</td><td>user_action</td><td>user_action_id</td><td>user_action_name</td></tr>";
+while ($set->next()) {
+ echo
+"<tr><td>".$set->getString('user_name')."</td><td>".$set->getString('user_action')."</td><td>".$set->getString('user_action_id')."</td><td>".$set->getString('user_action_name')."</td></tr>";
+}
+
+echo "</table>";
+
+?>
+</body></html>
\ No newline at end of file
--- /dev/null
+<?
+include_once("../inc/kyberia.inc");
+$database=new CLASS_KYBERIA();
+$q="select id_user from sessions where last<date_sub(NOW(),INTERVAL 1 HOUR)";
+echo $q;
+$set=$database->query($q);
+while($set->next()) {
+ $q="update user set user_action='',user_mode='off',user_action_param_name='',user_action_param_id='',user_action_param_value='' where id='".$set->getString('id_user')."'";
+ echo $q;
+ $database->query($q);
+ $database->query("delete from sessions where id_user='".$set->getString('id_user')."'");
+}
+?>
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$q="select * from session";
+$set=$database->query($q);
+
+while($set->next()) {
+ echo $set->getString('user_name')." : ".$set->getString('friends_serial')."<br>";
+}
+?>
--- /dev/null
+<?
+
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$q="select * from session";
+$set=$database->query($q);
+
+while($set->next()) {
+ $user_id=$set->getString('user_id');
+ $q2="select friend_id from friends where user_id=$user_id";
+ $set2=$database->query($q2);
+ $friends_serial="";
+ while ($set2->next()){
+ $friends_serial.=($set2->getString('friend_id')).";";
+ }
+ $database->query("update session set friends_serial='$friends_serial' where user_id=$user_id");
+
+ echo $set->getString('user_name')." : ".$set->getString('friends_serial')."<br>";
+}
+?>
+
+
+
+
--- /dev/null
+<?php
+passthru('/home/hromi1/kyberia/cvs_export.sh');
+sleep(5);
+passthru('/home/hromi1/kyberia/cvs_update.sh');
+?>
--- /dev/null
+<?php
+passthru('/home/hromi1/kyberia/switch.sh');
+?>
--- /dev/null
+<?php
+passthru('/home/hromi1/kyberia/cvs_export.sh');
+sleep(5);
+passthru('/home/hromi1/kyberia/cvs_update.sh');
+?>
--- /dev/null
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+?>
--- /dev/null
+<html><head><title>user administration</title>
+<link rel=stylesheet type="text/css" href="../css/gr.css">
+</head>
+<body>
+<?
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+
+$event=$_POST['event'];
+if ($event=='accept') {
+ $email=$_POST['email'];
+ $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";
+ if (!empty($_POST['message'])) $mailbody.="poznamka od registratora> ".$_POST['message'];
+// mail("hromi@kyberia.sk",'registracia na kyberia.sk',$mailbody,"From: hromi@kyberia.sk\nReturn-path: kyberia@kyberia.sk");
+ mail($email,'registracia na kyberia.sk',$mailbody,"From: kyberia@kyberia.sk\nReturn-path: kyberia@kyberia.sk");
+
+ $id=$_POST['id'];
+ $database->query("update user set user_active='yes' where id='$id'");
+}
+
+elseif ($event=='refuse') {
+ $email=$_POST['email'];
+ $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";
+ if (!empty($_POST['message'])) $mailbody.="P.S> ".$_POST['message'];
+ mail($email,'registracia na kyberia.sk',$mailbody,"From: kyberia@kyberia.sk\nReturn-path: kyberia@kyberia.sk");
+ echo $mailbody;
+
+ $id=$_POST['id'];
+ $database->query("delete from user where id='$id'");
+
+}
+
+
+elseif ($event=='delete') {
+ $database->query("delete from user where id='$id'");
+}
+
+
+echo "<table border=1><tr><td>id</td><td>login</td><td>web</td><td>info</td><td>change status</td></tr>";
+$q="select * from user where user_active!='yes' order by id desc";
+$set=$database->query($q);
+while($set->next()) {
+ 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>";
+}
+
+echo "</table>";
+
+?>
+</body></html>
\ No newline at end of file
--- /dev/null
+<html><head>
+<?
+
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include_once("kyberia.inc");
+$database=new CLASS_KYBERIA();
+$set=$database->query("select * from user order by id");
+echo "<form method='post'><table>";
+while ($set->next()) {
+ echo "<tr>";
+
+ echo "<td>",$set->getString('id'),"</td>";
+ echo "<td>",$set->getString('forum_name'),"</td>";
+ echo "<td>",$set->getString('login'),"</td>";
+ echo "</tr>";
+}
+
+echo "</table>";
+
+?>
--- /dev/null
+
+*** Modified files in JOE when it aborted on Wed Jan 28 17:46:43 2004
+*** JOE was aborted by signal 1
+
+*** Modified files in JOE when it aborted on Fri Feb 6 16:40:03 2004
+*** JOE was aborted by signal 1
+
+*** File 'tiraz.inc'
+<br><center>
+<font class=tiraz><a href='http://www.cometq4.com'>Q4</a>
+Tato stranka nikoho nechce nabadat k pachaniu trestnych cinov.<br>
+Jednotlive prispevky su slobodne vyjadrene osobne
+nazory prispievatelov <a href='http://www.rawilson.com'>;-)</a>
+<br>Pravo slobodneho slova je jednou zo zakladnych ludskych<br>
+<a href=http://www.kyberia.sk/article.php?node_id=33>slobod</a> a
+preto piseme to co piseme a pisat to budeme. Za kazdu cenu.<br>
+Kazdopadne autor stranky ani jej prevadzkovatel nezodpoveda za obsah jednotlivych textov.<br>
+© kyberia.sk 23.12.2001-21.12.2012 {in memorian ergond 23.7.2002}<br>
+code by kyberia CVS team & content
+by <a href='mailto:kyberia@kyberia.sk'>jhnprcvlhckwrth</a>,
+hosting by <a href="http://www.2600.sk">2600</a>
+</font></center>
+<!-- NAJ.sk -->
+<IMG SRC="http://www.naj.sk/cgi-bin/4web/nvhit.pl?id=00010686" WIDTH="1" HEIGHT="1" ALT="" BORDER="0">
+<SCRIPT LANGUAGE="JavaScript">
+<!--
+ document.write("<IMG SRC=\"http://www.naj.sk/cgi-bin/4web/nv_referer?id=00010686&ref="+ escape(top.document.referrer) + "\" WIDTH=1 HEIGHT=1 ALT=\"\" BORDER=0>");
+// -->
+</SCRIPT>
+<!-- NAJ.sk - koniec -->
+</body></html>
\ No newline at end of file
--- /dev/null
+<?php
+
+if ($action=='forum') {
+ $set=$kyberia->query("select * from session where user_action='forum' and user_action_id='$node_id' and user_mode!='invisible' group by user_name");
+ echo "<table align='center'><tr>";
+ while ($set->next()) {
+ echo "<td><a href='?action=userinfo&node_id=",$set->getString('user_id'),"'><img width='50' height='50' src='/images/users/".strtolower($set->getString('user_name')).".gif' border='0' alt='",$set->getString('user_name'),"'></a></td>";
+
+
+ }
+
+ echo "</tr></table>";
+}
+
+else {
+ include ("count.inc");
+
+ $set=$kyberia->query("select (time_to_sec(NOW())-time_to_sec(user_idle)) as idle,session.* from session group by session.user_id order by session.user_name");
+
+ // jay is the beeest, fooking good, i love the woooorld
+
+ //prevedie udaje do arrays, aby sa dali viac krat pouzit
+ while ($set->next()) {
+ $active_array_name[]=$set->getString('user_name');
+ $active_array_user[]=$set->getString('user_id');
+ $active_array_idle[]=$set->getString('idle');
+ }
+
+ echo "<div class='active_users'>";
+ echo "<table cellspacing='0' cellpadding='0'><tr><td>";
+ echo "~~~ friends ~~~<br><br>";
+ echo "</td></tr><tr><td>";
+
+ //toto je prva cast, kde sa vypisuju friendi
+ for ($i=0;$i<count($active_array_user);$i++){
+ $active_user=$active_array_user[$i];
+ $active_name=$active_array_name[$i];
+ $active_idle=$active_array_idle[$i];
+ // ikonky
+ if ($user_active_icons == 'yes') {
+ if ($friend_array[$active_user]){
+ echo "<div class='active_user'><div class='active_user_img'>";
+ echo "<a href='?action=userinfo&node_id=",$active_user,"'><img width='50' height='50' src='/images/users/".strtolower($active_name).".gif' border='0' alt='".$active_name."' title='".$active_name."'></a></div>";
+ echo "</div>";
+ }else{
+ }
+ }
+ // iba nicky
+ else {
+ if ($friend_array[$active_user]){
+ echo "</td></tr><tr><td>";
+ echo "<a href='?action=userinfo&node_id=",$active_user,"'><b>".$active_name."</b> ";
+ $time=$active_idle;
+ if ($time<0) $time+=(60*1440);
+// echo floor($time/60),":",($time%60);
+
+ echo "</a>";
+ echo "</td></tr><tr><td>";
+ }else{
+ }
+ }
+ }
+ echo "</td></tr><tr><td>";
+ echo "<br>~~~ friends ~~~<br><br><br>";
+ echo "</td></tr><tr><td>";
+
+ //a tu je ostatok activov
+ for ($i=0;$i<count($active_array_user);$i++){
+ $active_user=$active_array_user[$i];
+ $active_name=$active_array_name[$i];
+ $active_idle=$active_array_idle[$i];
+ // ikonky
+ if ($user_active_icons == 'yes') {
+ if ($friend_array[$active_user]){
+ }else{
+ echo "<div class='active_user'><div class='active_user_img'>";
+ echo "<a href='?action=userinfo&node_id=",$active_user,"'><img width='50' height='50' src='/images/users/".strtolower($active_name).".gif' border='0' alt='".$active_name."' title='".$active_name."'></a></div>";
+ echo "</div>";
+ }
+ }
+ // iba nicky
+ else {
+ if ($friend_array[$active_user]){
+ }else{
+ echo "</td></tr><tr><td>";
+ echo "<a href='?action=userinfo&node_id=",$active_user,"'>".$active_name." ";
+ $time=$active_idle;
+ if ($time<0) $time+=(60*1440);
+// echo floor($time/60),":",($time%60);
+
+ echo "</a>";
+ echo "</td></tr><tr><td>";
+ }
+ }
+ }
+ echo "</td></tr></table>";
+
+
+
+
+ echo "</div>";
+}
--- /dev/null
+<div id='ad'>
+<a href='http://www.kybu.sk/ksession'><img src='http://vip-temptation.ami.cz/a/kyberia_banner2.gif'></a>
+</div>
--- /dev/null
+<!-- BBSTART: ad2.billboard.cz kod 1.1 - SERVER: kyberia.sk(7587), SEKCE:
+main page(1), POZICE: (1), TYPBANNERU: Button 1(5), OKRAJ: ne, POPIS: ne.
+-->
+<script language='JavaScript' type='text/javascript'>
+<!--
+var bbs=screen,bbn=navigator,bbh;bbh='&ubl='+bbn.browserLanguage+'&ucc='+bbn.cpuClass+'&ucd='+bbs.colorDepth+'&uce='+bbn.cookieEnabled+'&udx='+bbs.deviceXDPI+'&udy='+bbs.deviceYDPI+'&usl='+bbn.systemLanguage+'&uje='+bbn.javaEnabled()+'&uah='+bbs.availHeight+'&uaw='+bbs.availWidth+'&ubd='+bbs.bufferDepth+'&uhe='+bbs.height+'&ulx='+bbs.logicalXDPI+'&uly='+bbs.logicalYDPI+'&use='+bbs.fontSmoothingEnabled+'&uto='+(new Date()).getTimezoneOffset()+'&uui='+bbs.updateInterval+'&uul='+bbn.userLanguage+'&uwi='+bbs.width;
+var bb9_bgcolor='C0C0C0';
+var bb9_text='000000';
+var bb9_link='0000FF';
+if(document.bgColor) { bb9_bgcolor=document.bgColor.substr(1); }
+if(document.fgColor) { bb9_text=document.fgColor.substr(1); }
+if(document.linkColor) { bb9_link=document.linkColor.substr(1); } document.write("<IFRAME WIDTH=120 HEIGHT=90 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 HSPACE=0 VSPACE=0 SCROLLING=no BORDERCOLOR='#000000' SRC='http://ad2.billboard.cz/please/showit/7587/1/1/5/?typkodu=html&topmargin=0&leftmargin=0"+bbh+"&href="+escape(location.href)+"&popis=ne&okraj=ne&bgcolor="+bb9_bgcolor+"&text="+bb9_text+"&link="+bb9_link+"&bust="+Math.random()+"&target=_top'>");
+document.write("<scr"+"ipt language='JavaScript' type='text/javascript'>");
+document.write("document.write(\"<scr\"+\"ipt language='JavaScript' type='text/javascript' src='http://ad2.billboard.cz/please/showit/7587/1/1/5/?typkodu=js\"+bbh+\"&href=\"+escape(location.href)+\"&popis=ne&okraj=ne&bust=\"+Math.floor(10000000*Math.random())+\"&target=_top'><\/scr\"+\"ipt>\");");
+document.write("<\/scr"+"ipt>");
+document.write("<\/IFRAME>");
+/**///-->
+</script>
+<noscript>
+<table border="0" cellpadding="0" cellspacing="0"><tr><td>
+<a href="http://ad2.billboard.cz/please/redir.bb/7587/1/1/5/" target="_top">
+<img src="http://ad2.billboard.cz/please/showit/7587/1/1/5/?typkodu=img"
+border="0" width="120" height="90" alt='Kliknete prosim!'></a>
+</td></tr></table>
+</noscript>
+<!-- BBEND: ad2.billboard.cz kod 1.1 -->
--- /dev/null
+<?
+include_once("./inc/kyberia.inc");
+global $user_id;
+$bookcatname=$_POST['bookcatname'];
+$bparent_id=$_POST['bparent_id'];
+if ($bookcatname){$kyberia->query("INSERT INTO user_bookcat set user_id='$user_id', bookcat_name='$bookcatname',parent_id='$bparent_id', is_open='yes'");}
+$editcat2=$bparent_id;
+?>
\ No newline at end of file
--- /dev/null
+<?
+include_once("./inc/kyberia.inc");
+
+$set=$kyberia->query("INSERT INTO category set category_name='$category_name',category_parent='$category_parent',category_owner='$user_id'");
+$lastid=$kyberia->getLastInsertId();
+?>
--- /dev/null
+<?
+switch ($_POST['event']) {
+ case 'pridaj.forum':
+ $status=eventz::addForum();
+ if ($status) {
+ Header("Location:".ACTION_SCRIPT."forum");
+ }
+ else echo $error;
+ break;
+
+}
+
+class eventz {
+
+ function addForum() {
+ $forum_public=$_POST['forum_public'];
+ $forum_type=$_POST['forum_type'];
+ $forum_info=$_POST['forum_info'];
+
+ if (empty($forum_name)) {
+ $error="nazov fora je prilis kratky!!!!";
+ return false;
+ }
+
+ $set=$kyberia->query("INSERT INTO forum set forum_name='$forum_name',forum_category='$forum_category',forum_owner='$user_id',forum_public='$forum_public',forum_type='$forum_type'");
+ $lastid=$kyberia->getLastInsertId();
+ $kyberia->query("insert into forum_info set forum_id='$lastid',forum_info='$forum_info'");
+ $kyberia->query("update category set category_forums=category_forums+1 where category_id='$forum_category'");
+ $icondir="/home/hromi1/kyberia/images/forums/";
+ $cmd=0;
+ if (strstr($forum_icon_name,".jp")){
+ $cmd=NETPBM."/jpegtopnm $forum_icon | ".NETPBM."/pnmscale -width=123 | ".NETPBM."/ppmquant 256 | ".NETPBM."/ppmtogif > ".FORUM_IMAGE_DIR.strtolower($lastid).".gif";
+
+ }
+ elseif (strstr($forum_icon_name,".gif")) {
+ $cmd="/home/hromi1/kyberia/gifsicle --resize 123x_ $forum_icon > ".FORUM_IMAGE_DIR.strtolower($lastid).".gif";
+ }
+ if ($cmd) shell_exec($cmd);
+ $forum_id=$lastid;
+
+ $q="select friends.* from friends where friend_id='$user_id'";
+ $set=$kyberia->query($q);
+ while($set->next()){
+ $send_bin=$set->getString('send_mail');
+ $u_id=$set->getString('user_id');
+ $s_forum=floor($send_bin/2);
+ echo $send_bin."<br>";
+ echo $s_forum."<br>";
+
+ if ($s_forum){
+ $sprava="<b>".$user_name."</b> vytvoril novy klub s nazvom <br>\"<a href='?action=forum&node_id=$forum_id' target='_blank'>".$nadpis."</a>\"";
+ $kyberia->ubikMail($u_id,$sprava);
+ }
+ }
+
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<b>nuz clovece ako vidis, tak si bol vybrany za jedneho z administratorov systemu kyberia. ideme sa tu zahrat taku hru na kyberneticku republiku, ustavu,
+referenda, pravo veta a tak...more info coming soon</b>
+<br><Br>
+<?php
+if (!ADMIN) {
+ echo "hele wole nejsi admin, toto je prudko elitarska zalezitost takze sbohem";
+ die();
+}
+
+$set=$kyberia->executeQuery("select admin.*,(admin.action_timestamp + INTERVAL 1 DAY) as action_timestamp ,user.login as login from admin left join user on user.id=admin.admin_id order by action_id desc");
+echo "<table border='1' class='box'>";
+echo "<tr><th>ID ziadosti<th>ziadatel</th><th>typ</th><th>docasny stav</th><th>vykona sa</th><th>data 1</th><th>data 2</th><th>future";
+while ($set->next()) {
+ echo "<Tr>";
+ echo "<td>".$set->getString('action_id');
+ echo "<td>".$set->getString('login');
+ echo "<td>".$set->getString('action_name');
+ echo "<td>".$set->getString('action_result');
+ echo "<td>".$set->getString('action_timestamp');
+ echo "<td>".$set->getString('action_data_1');
+ echo "<td>".$set->getString('action_data_2');
+ echo "<td><form action='".SCRIPT."?action=admin'><input type='hidden' name='action_id' value='".$set->getString('id')."'><input type='submit' value='VETO!' name='event'></form>";
+}
+echo "</table>";
+
+?>
--- /dev/null
+
+
+<table><form method='post'>
+<tr><td>owner::</td><td><input type='text' name='forum_owner'></td></tr>
+<tr><td>nazov fora::</td><td><input type='text' name='forum_text'></td></tr>
+<tr><td>zorad podla::</td><td><select name='forum_order'>
+<option value='id_asc'>id fora vzostupne (najstarsie)</option>
+<option value='id_desc'>id fora zostupne (najnovsie)</option>
+<option value='last_submission'>najstarsieho casu posledneho prispevku </option>
+<option value='last_owner_access'>najstarsieho pristupu ownera do fora</option>
+<option value='submission_count_asc'>poctu prispevkov vzostupne </option>
+<option value='submission_count_desc'>poctu prispevkov zostupne </option>
+</td></tr>
+<tr><td valign='top'>kategoria::</td><td valign='top'>
+<?php
+$set=$kyberia->query("select * from category order by category_tree");
+$selectstring="<select name='forum_category'>";
+$selectstring.="<option value='all'>vsetky kategorie</option>";
+while ($set->next()) {
+ $count=substr_count($set->getString('category_tree'),";");
+ $selectstring.="<option value='".$set->getString('category_id')."'";
+ if ($forum['forum_category']==$set->getString('category_id')) $selectstring.= " selected ";
+ $selectstring.= ">";
+ if ($count) {
+ $selectstring.="|";
+ for ($i=0;$i<$count;$i++) $selectstring.="----";
+ }
+ $selectstring.=$set->getString('category_name')."</option>";
+}
+$selectstring.="</select>";
+echo $selectstring;
+?>
+</td></tr><td><td colspan='2' align='center'><input type='submit' name='forum_list' value='list'></tr>
+</form></table>
+<br><br>
+<?php
+
+if (!empty($_POST['forum_list'])) {
+ $q="select * from forum left join category on forum.forum_category=category.category_id left join user_forum as owner_access on (forum.forum_id=owner_access.forum_id and forum.forum_owner=owner_access.user_id) where 1=1 ";
+ if (!empty($_POST['forum_owner'])) {
+ $forum_owner=$_POST['forum_owner'];
+ if (!Is_numeric($forum_owner)) {
+ $set=$kyberia->query("select id from user where login='$forum_owner'");
+ $set->next();
+
+ $forum_owner_id=$set->getString('id');
+ }
+ else $forum_owner_id=$forum_owner;
+ $q.=" and forum_owner='$forum_owner_id' ";
+ }
+
+ if (!empty($_POST['forum_text'])) {
+ $q.=" and forum_name like '%".$_POST['forum_text']."%' ";
+ }
+
+ if ($_POST['forum_category']!='all') {
+ $forum_category=$_POST['forum_category'].";";
+ $q.="and category_tree like '$forum_category' ";
+ }
+
+ $forum_order=$_POST['forum_order'];
+ if ($forum_order=="id_desc") {
+ $q.="order by forum.forum_id desc";
+ }
+ if ($forum_order=="id_asc") {
+ $q.="order by forum.forum_id asc";
+ }
+ if ($forum_order=="last_owner_access") {
+ $q.="order by owner_access.last_visit asc";
+ }
+
+ if ($forum_order=="last_submission") {
+ $q.="order by last_submission asc";
+ }
+ if ($forum_order=="submission_count_asc") {
+ $q.="order by submission_count asc";
+ }
+ if ($forum_order=="submission_count_desc") {
+ $q.="order by submission_count desc";
+ }
+ echo $q;
+ $set=$kyberia->query($q);
+
+ while($set->next()) {
+ echo "forum::".$set->getString('forum_name')."<br>";
+ echo "owner::".$set->getString('forum_owner')."<br>";
+ echo "pocet prispevkov::".$set->getString('forum_submissions')."<Br>";
+ echo "posledny prispevok::".$set->getString('last_submission')."<br>";
+ echo "ownerova posledna navsteva fora::".$set->getString('owner_access.last_visit')."<br>";
+
+ echo "<br><br>";
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+$set=$kyberia->query("select * from category order by category_tree");
+$selectstring="<select name='forum_category'>";
+while ($set->next()) {
+ $count=substr_count($set->getString('category_tree'),";");
+ $selectstring.="<option value='".$set->getString('category_id')."'>";
+ if ($count) {
+ $selectstring.="|";
+ for ($i=0;$i<$count;$i++) $selectstring.="----";
+ }
+ $selectstring.=$set->getString('category_name')."</option>";
+}
+$selectstring.="</select>";
+
+$set=$kyberia->query("select user.login as login,forum.forum_name,forum_info.* from forum_info left join forum on forum_info.forum_id=forum.forum_id left join user on user.id=forum.forum_owner where forum_info.forum_id>500 order by forum_id");
+
+echo "<table>";
+while ($set->next()) {
+ echo "<form action='".SCRIPT."?action=admin' method='post'>";
+ echo "<tr>";
+ echo "<td valign='top'><input type='text' name='forum_id' value='",$set->getString('forum_id'),"'></td>";
+ echo "<td valign='top'><input class='longtext' type='text' name='forum_name' value='",$set->getString('forum_name'),"'></td>";
+
+ echo "<td valign='top'><input type='text' name='forum_owner' value='",$set->getString('login'),"'></td>";
+ echo "<td valign='top'>",strip_tags($set->getString('forum_info')),"'></td>";
+ echo "<td>",$set->getString('forum_submissions'),"</td>";
+ echo "<td>";
+// if ($set->getString('forum_category')=='' )echo "$selectstring";
+ echo "</td>";
+ echo "<td><input type='submit' name='event' value='update forum'><input type='hidden' name='forum_id' value='".$set->getString('forum_id')."'>";
+ echo "</tr>";
+ echo "</form>";
+}
+
+echo "</table>";
+?>
--- /dev/null
+<center><b>moduly</b>
+<br><Br>
+<a href='<?=SCRIPT?>?action=admin'>admin fronta</a><br>
+<a href='<?=SCRIPT?>?action=admin&subaction=register'>registracie</a><br>
+<a href='<?=SCRIPT?>?action=admin&subaction=forums'>auditka</a><br>
+<a href='<?=SCRIPT?>?action=admin&subaction=user_admin'>users</a><br>
+<a href='<?=SCRIPT?>?action=admin&subaction=forum_admin'>forums</a><br>
+
+</center>
\ No newline at end of file
--- /dev/null
+ <?php
+global $kyberia;
+
+echo "<table border=1><tr><td>login</td><td>web</td><td>info</td><td>change status</td></tr>";
+$q="select * from user where user_active='' or user_active='no' order by id desc";
+$set=$kyberia->query($q);
+while($set->next()) {
+echo "<tr><Td><a href='mailto:".$set->getString('email')."'>".$set->getString('login')."</a></td>
+<td>".$set->getString('user_www')."</td><td width='230'>".$set->getString('user_info')."</td>
+<td><form action='".SCRIPT."?action=admin' method='post'><input type=hidden name='id' value='".$set->getString('id')."'>
+<textarea name='message' rows=6 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='hidden' name='user_info' value='".$set->getString('user_info')."'>
+<input type='hidden' name='action_parameter' value='".$set->getString('id')."'>
+<select name='action_result'><option value='accept'>accept</option><option value='refuse'>refuse</option><option value='delete'>delete</option></select>
+<input type='submit' value='register' name='event'>
+</form></tr>";
+}
+
+echo "</table>";
+
+?>
--- /dev/null
+<?php
+
+echo "bude";
+
+?>
\ No newline at end of file
--- /dev/null
+<!-- BBSTART: ad2.billboard.cz kod 1.1 - SERVER: Server(7587), SEKCE: main page(1), POZICE: (1), TYPBANNERU: Skyscraper(9), OKRAJ: ne, POPIS: ne. -->
+<script language='JavaScript' type='text/javascript'>
+<!--
+var bbs=screen,bbn=navigator,bbh;bbh='&ubl='+bbn.browserLanguage+'&ucc='+bbn.cpuClass+'&ucd='+bbs.colorDepth+'&uce='+bbn.cookieEnabled+'&udx='+bbs.deviceXDPI+'&udy='+bbs.deviceYDPI+'&usl='+bbn.systemLanguage+'&uje='+bbn.javaEnabled()+'&uah='+bbs.availHeight+'&uaw='+bbs.availWidth+'&ubd='+bbs.bufferDepth+'&uhe='+bbs.height+'&ulx='+bbs.logicalXDPI+'&uly='+bbs.logicalYDPI+'&use='+bbs.fontSmoothingEnabled+'&uto='+(newDate()).getTimezoneOffset()+'&uui='+bbs.updateInterval+'&uul='+bbn.userLanguage+'&uwi='+bbs.width;
+var bb9_bgcolor='C0C0C0';
+var bb9_text='000000';
+var bb9_link='0000FF';
+if(document.bgColor) { bb9_bgcolor=document.bgColor.substr(1); }
+if(document.fgColor) { bb9_text=document.fgColor.substr(1); }
+if(document.linkColor) { bb9_link=document.linkColor.substr(1); }
+document.write("<IFRAME WIDTH=120 HEIGHT=600 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 HSPACE=0 VSPACE=0 SCROLLING=no BORDERCOLOR='#000000' SRC='http://ad2.billboard.cz/please/showit/7587/1/1/9/?typkodu=html&topmargin=0&leftmargin=0"+bbh+"&href="+escape(location.href)+"&popis=ne&okraj=ne&bgcolor="+bb9_bgcolor+"&text="+bb9_text+"&link="+bb9_link+"&bust="+Math.random()+"&target=_top'>");
+document.write("<scr"+"ipt language='JavaScript' type='text/javascript'>");
+document.write("document.write(\"<scr\"+\"ipt language='JavaScript' type='text/javascript' src='http://ad2.billboard.cz/please/showit/7587/1/1/9/?typkodu=js\"+bbh+\"&href=\"+escape(location.href)+\"&popis=ne&okraj=ne&bust=\"+Math.floor(10000000*Math.random())+\"&target=_top'><\/scr\"+\"ipt>\");");
+document.write("<\/scr"+"ipt>");
+document.write("<\/IFRAME>");
+/**///-->
+</script>
+<noscript>
+<table border="0" cellpadding="0" cellspacing="0"><tr><td>
+<a href="http://ad2.billboard.cz/please/redir.bb/7587/1/1/9/" target="_top">
+<img src="http://ad2.billboard.cz/please/showit/7587/1/1/9/?typkodu=img" border="0" width="120" height="600" alt='Kliknete prosim!'></a>
+</td></tr></table>
+</noscript>
+<!-- BBEND: ad2.billboard.cz kod 1.1 -->
--- /dev/null
+<table class=boxwithout><tr><td>
+<center>uzivatelia</center>
+<?php
+global $kyberia;
+$set=$kyberia->getDennikAuthors();
+ //prevedie udaje do arrays, aby sa dali viac krat pouzit
+ while ($set->next()) {
+ $array_login[]=$set->getString('login');
+ $array_autor[]=$set->getString('autor');
+ }
+
+
+ echo "<br><br>~~~ friends ~~~<br>";
+
+ for ($i=0;$i<count($array_login);$i++){
+ $d_login=$array_login[$i];
+ $d_autor=$array_autor[$i];
+
+ if ($friend_array[$d_autor]){
+ echo "<br><a href='?action=journaux&dennik_user=",$d_autor,"'><b>",$d_login,"</b></a>";
+ }else{
+ }
+ }
+ echo "<br><br>~~~ friends ~~~<br><br>";
+
+ for ($i=0;$i<count($array_login);$i++){
+ $d_login=$array_login[$i];
+ $d_autor=$array_autor[$i];
+
+ if ($friend_array[$d_autor]){
+ }else{
+ echo "<br><a href='?action=journaux&dennik_user=",$d_autor,"'>",$d_login,"</a>";
+ }
+ }
+?>
+</td></tr></table>
--- /dev/null
+<table class=box><tr><td>
+<center>clanky</center>
+<table>
+<?php
+global $kyberia;
+if ($kat>0) $set=$kyberia->putMostRead($kat);
+else $set=$kyberia->putMostRead("",69);
+$i=0;
+while ($set->next()) {
+ $i++;
+ echo "<tr><td>$i</td><td><a href=?action=article&id=",$set->getString("id_article"),">",$set->getString("nazov"),"</a> (",$set->getString("hits"),")<br></td></tr>";
+}
+?>
+</table></td></tr></table>
\ No newline at end of file
--- /dev/null
+<br>
+<?
+$user=$autor;
+include("./boxiky/userinfobox.inc");
+?>
--- /dev/null
+<?php
+function listbookforum($parid){
+ global $user_id;
+ global $bookcat_name;
+ global $f_id;
+ global $f_name;
+ global $f_sub;
+ global $f_subc;
+ global $f_parent;
+ global $f_owner;
+ for($j=0;$j<count($f_id);$j++){
+ if ($f_parent[$j]==$parid){
+ echo "\n<br><input size='0' style='border : 0;width : 10;height : 10;' type='checkbox' name='move[]' value='".$f_id[$j]."'> <a href='?action=forum&node_id=",$f_id[$j],"'>",$f_name[$j],"</a>";
+ if ($f_subc[$j]) echo "- <font color='red'>".$f_subc[$j]." NEW</font>";
+ echo " (".$bookcat_name[prevod($parid)].")";
+ if ($f_owner[$j]!=$user_id) {echo "<a href='?action=b00kmarkz&book=1&node_id=",$f_id[$j],"' onClick=\"return confirm('Chces si unbooknut tento klub?')\"> :: unbook</a>";}
+ }
+ }
+ if ($j>0){echo "<br>";}
+}
+function listbookforum1($parid){
+ global $user_id;
+ global $bookcat_name;
+ global $bookcat_open;
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $f_id;
+ global $f_name;
+ global $f_login;
+ global $f_sub;
+ global $f_subc;
+ global $f_parent;
+ global $f_owner;
+ for($j=0;$j<count($f_id);$j++){
+ if ($f_parent[$j]==$parid){
+ echo "\n<br> <a href='?action=forum&node_id=",$f_id[$j],"'>",$f_name[$j],"</a>";
+ if ($f_subc[$j]) echo "- <font color='red'>".$f_subc[$j]." NEW</font>";
+ echo " (".$bookcat_name[prevod($parid)].")";
+ if ($f_owner[$j]!=$user_id) {echo "<a href='?action=b00kmarkz&book=1&node_id=",$f_id[$j],"' onClick=\"return confirm('Chces si unbooknut tento klub?')\"> :: unbook</a>";}
+ }
+ }
+}
+
+
+//old for edit
+function listbookcat($catid){
+ global $bookcat_name;
+ global $bookcat_open;
+ global $bookcat_parent;
+ global $bookcat_id;
+ for($i=0;$i<=count($bookcat_id);$i++){
+ if ($bookcat_parent[$i]==$catid){
+ echo "\n<a href='?action=b00kedit&editcat=".$bookcat_id[$i]."'>- ".$bookcat_name[$i]."</a>";
+ if (isSet($lasti)){
+ echo " <a href='?action=b00kedit&editcat=". $bookcat_parent[prevod($i)] ."&movecat=". $bookcat_id[$i] ."&upcat=". $bookcat_id[$lasti] ."'>^UP^</a>";
+ }
+ echo "<br>";
+ $lasti=$i;
+ }
+ }
+}
+//new for edit
+function listbookcat3($catid,$edc){
+ global $bookcat_name;
+ global $bookcat_open;
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $bookcat_subc;
+ for($i=0;$i<=count($bookcat_id);$i++){
+ if (($bookcat_parent[$i]==$catid)){
+ echo "<table border='0'><tr><td width='15'> </td><td>";
+ if ($edc==$bookcat_id[$i]){
+ echo "\n<b>- ".$bookcat_name[$i]."</b>";
+ }else{
+ echo "\n<a href='?action=b00kedit&editcat=".$bookcat_id[$i]."'><b>- ".$bookcat_name[$i]."</b></a>";
+ }
+ if (isSet($lasti)){
+ echo " <a href='?action=b00kedit&editcat=". $edc ."&movecat=". $bookcat_id[$i] ."&upcat=". $bookcat_id[$lasti] ."'>^UP^</a>";
+ }
+ echo " :: <a href='?action=b00kedit&delete=".$bookcat_id[$i]."'>delete</a>";
+// echo "<br>";
+ if(($edc!='0')&&($bookcat_id[$i]==$edc)){
+ echo " :: <input class='bigtextinput' type='text' name='bookcatname'>";
+ echo "<input type='submit' value='pridaj.b00kcat' name='action' class='bigtextinput'>";
+ }
+ listbookcat3($bookcat_id[$i],$edc);
+ echo "</td></tr></table>";
+ $lasti=$i;
+ }
+ }
+}
+
+
+function listbookforum2($parid){
+ global $user_id;
+ global $f_id;
+ global $f_name;
+ global $f_login;
+ global $f_sub;
+ global $f_subc;
+ global $f_parent;
+ global $f_owner;
+ for($j=0;$j<count($f_id);$j++){
+ if ($f_parent[$j]==$parid){
+ echo "\n<br> <a href='?action=forum&node_id=",$f_id[$j],"'>",$f_name[$j],"</a> (".$f_sub[$j]." subz ";
+ if ($f_subc[$j]) echo "- <font color='red'>".$f_subc[$j]." NEW</font>";
+ echo ")";
+ if ($f_owner[$j]!=$user_id) {echo "<a href='?action=b00kmarkz&book=1&node_id=",$f_id[$j],"' onClick=\"return confirm('Chces si unbooknut tento klub?')\"> :: unbook</a>";}
+// echo "<a href='?action=b00kmarkz&book=1&node_id=",$f_id[$j],"' onClick=\"return confirm('Chces si unbooknut tento klub?')\"> :: unbook</a>";
+ }
+ }
+}
+
+
+function listbookcat2($catid){
+ global $bookcat_name;
+ global $bookcat_open;
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $bookcat_subc;
+ for($i=0;$i<=count($bookcat_id);$i++){
+ if (($bookcat_parent[$i]==$catid)){
+ echo "<blockquote>";
+ if ($bookcat_open[$i]=="no") {echo "\n<a href='?action=b00kmarkz&openswich=".$bookcat_id[$i]."&swichto=yes'><b>- ".$bookcat_name[$i]."@";}
+ if ($bookcat_open[$i]=="yes") {echo "\n<a href='?action=b00kmarkz&openswich=".$bookcat_id[$i]."&swichto=no'><b>- ".$bookcat_name[$i]."^";}
+ if (($bookcat_subc[$i]>'0') and ($bookcat_open[$i]=="no")){echo "(<font color='red'>".$bookcat_subc[$i]." NEW</font>)";}
+ echo "</b></a>";
+ if (($bookcat_open[$i]=="yes")){
+ listbookforum2($bookcat_id[$i]);
+ listbookcat2($bookcat_id[$i]);
+ }
+ echo "</blockquote>";
+ }
+ }
+
+}
+
+
+
+
+function bookfmove($del_id){
+ global $user_id;
+ global $f_id;
+ global $f_parent;
+ global $qf;
+ global $if;
+ for($j=0;$j<count($f_id);$j++){
+ if ($f_parent[$j]==$del_id){
+ if ($if=='0') {$qf.=" (user_id='$user_id' and forum_id='".$f_id[$j]."')";}
+ else{$qf.=" or (user_id='$user_id' and forum_id='".$f_id[$j]."')";}
+ $if++;
+ }
+ }
+}
+
+
+
+
+function bookcatdel2($del_id){
+ global $user_id;
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $qf;
+ global $if;
+ global $qc;
+ for($i=0;$i<=count($bookcat_id);$i++){
+ if (($bookcat_parent[$i]==$del_id)){
+ $qc.=" or (user_id='$user_id' and bookcat_id='$bookcat_id[$i]')";
+ bookfmove($bookcat_id[$i]);
+ bookcatdel2($bookcat_id[$i]);
+ }
+ }
+}
+
+
+
+
+function bookcatdel($del_id){
+ global $user_id;
+ global $bookcat_id;
+ global $qf;
+ global $if;
+ global $qc;
+ global $kyberia;
+ $qf="update user_forum set parent_id='0' where";
+ $if='0';
+ $qc="delete from user_bookcat where (user_id='$user_id' and bookcat_id='$del_id')";
+ bookfmove($del_id);
+ bookcatdel2($del_id);
+ $kyberia->query($qc);
+ if ($if>'0') {$kyberia->query($qf);}
+}
+
+
+
+function prevod($id){
+global $bookcat_id;
+ if ($id=='0'){$id='-1';}
+ for($i=0;$i<count($bookcat_id);$i++){
+ if (($bookcat_id[$i])==$id){$id=$i; break;}
+ }
+ return $id;
+}
+
+
+
+function readbookdb(){
+ global $user_id;
+ global $bookcat_name;
+ global $bookcat_open;
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $f_id;
+ global $f_name;
+ global $f_login;
+ global $f_sub;
+ global $f_subc;
+ global $f_parent;
+ global $f_owner;
+ global $kyberia;
+ global $bookcat_subc;
+
+ $q="select * from user_bookcat where user_id='".$user_id."' order by bookcat_id";
+ $bset=$kyberia->query($q);
+ $label='0';
+ while ($bset->next()){
+ $bookcat_name[$label]=$bset->getString('bookcat_name');
+ $bookcat_open[$label]=$bset->getString('is_open');
+ $bookcat_parent[$label]=$bset->getString('parent_id');
+ $bookcat_id[$label]=$bset->getString('bookcat_id');
+ $label++;
+ }
+ $q="SELECT user_forum.submission_count,user_forum.parent_id as fparent_id,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+ $q.=" WHERE forum.forum_owner='$user_id'";
+ $q.=" order by forum_name ";
+ $forumset=$kyberia->query($q);
+ $i=0;
+ while ($forumset->next()){
+ $f_id[$i]=$forumset->getString('forum_id');
+ $f_name[$i]=$forumset->getString('forum_name');
+ $f_login[$i]=$forumset->getString('login');
+ $f_sub[$i]=$forumset->getString('forum_submissions');
+ $f_subc[$i]=$forumset->getString('submission_count');
+ $f_parent[$i]=$forumset->getString('fparent_id');
+ $f_owner[$i]=$forumset->getString('forum_owner');
+ $i++;
+ }
+
+ $q="SELECT user_forum.submission_count,user_forum.parent_id as fparent_id,user.login,forum.*";
+ $q.=" from forum left join user on forum.forum_owner=user.id";
+ $q.=" left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+ $q.=" WHERE user_forum.user_bookmark='yes' and forum.forum_owner != '$user_id'";
+ $q.=" order by forum_name ";
+ $forumset=$kyberia->query($q);
+ while ($forumset->next()){
+ $f_id[$i]=$forumset->getString('forum_id');
+ $f_name[$i]=$forumset->getString('forum_name');
+ $f_login[$i]=$forumset->getString('login');
+ $f_sub[$i]=$forumset->getString('forum_submissions');
+ $f_subc[$i]=$forumset->getString('submission_count');
+ $f_parent[$i]=$forumset->getString('fparent_id');
+ $f_owner[$i]=$forumset->getString('forum_owner');
+ $i++;
+ }
+
+ $bookcat_subc['-1']=countnew('0');
+}
+
+function countnew($catid){
+ global $bookcat_parent;
+ global $bookcat_id;
+ global $bookcat_subc;
+ global $bookcat_name;
+
+ for($i=0;$i<=count($bookcat_id);$i++){
+ if (($bookcat_parent[$i]==$catid)){
+ $bookcat_subc[prevod($catid)] += countnew($bookcat_id[$i]);
+ }
+ }
+ countnewforum($catid);
+ return $bookcat_subc[prevod($catid)];
+}
+function countnewforum($catid){
+ global $user_id;
+ global $f_id;
+ global $f_subc;
+ global $f_parent;
+ global $bookcat_subc;
+ global $bookcat_name;
+ for($j=0;$j<count($f_id);$j++){
+ if ($f_parent[$j]==$catid){
+ if ($f_subc[$j]) {$bookcat_subc[prevod($catid)]+=$f_subc[$j];}
+ }
+ }
+ return $bookcat_subc[prevod($catid)];
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+include_once("./inc/kyberia.inc");
+global $user_id;
+include("book_func.inc");
+global $kyberia;
+if (!$editcat2) {
+ $editcat=$_GET['editcat'];
+ if (!$editcat){$editcat='0';}
+}
+else {$editcat=$editcat2;}
+$delete=$_GET['delete'];
+$movecat=$_GET['movecat'];
+$upcat=$_GET['upcat'];
+//toto sa vykonava iba ked niekto posuva kategoriu
+if (($movecat) and ($upcat)){
+ $q11="update user_bookcat set bookcat_id='0' where (user_id='$user_id' and bookcat_id='$upcat')";
+ $q12="update user_bookcat set parent_id='-1' where (user_id='$user_id' and parent_id='$upcat')";
+ $q13="update user_forum set parent_id='-1' where (user_id='$user_id' and parent_id='$upcat')";
+ $q21="update user_bookcat set bookcat_id='$upcat' where (user_id='$user_id' and bookcat_id='$movecat')";
+ $q22="update user_bookcat set parent_id='$upcat' where (user_id='$user_id' and parent_id='$movecat')";
+ $q23="update user_forum set parent_id='$upcat' where (user_id='$user_id' and parent_id='$movecat')";
+ $q31="update user_bookcat set bookcat_id='$movecat' where (user_id='$user_id' and bookcat_id='0')";
+ $q32="update user_bookcat set parent_id='$movecat' where (user_id='$user_id' and parent_id='-1')";
+ $q33="update user_forum set parent_id='$movecat' where (user_id='$user_id' and parent_id='-1')";
+ $kyberia->query($q11);
+ $kyberia->query($q12);
+ $kyberia->query($q13);
+ $kyberia->query($q21);
+ $kyberia->query($q22);
+ $kyberia->query($q23);
+ $kyberia->query($q31);
+ $kyberia->query($q32);
+ $kyberia->query($q33);
+ if ($editcat==$movecat){$editcat=$upcat;}
+ elseif ($editcat==$upcat){$editcat=$movecat;}
+}
+
+readbookdb();
+if ($delete){
+ bookcatdel($delete);
+ unset ($bookcat_name);
+ unset ($bookcat_open);
+ unset ($bookcat_parent);
+ unset ($bookcat_id);
+ unset ($f_id);
+ unset ($f_name);
+ unset ($f_login);
+ unset ($f_sub);
+ unset ($f_subc);
+ unset ($f_parent);
+ unset ($f_owner);
+ readbookdb();
+}
+
+$bookcat_name['-1']="ROOT";
+//if ($editcat=='0') {echo "<br><b><font size='+1'>ROOT CATEGORY</font></b> ".$bookcat_subc['-1'];}
+//else {echo "<br><br><b><font size='+1'>".$bookcat_name[prevod($editcat)]."</font></b>";}
+//if ($editcat!='0') {echo " :: <a href='?action=b00kedit&editcat=".$bookcat_parent[prevod($editcat)]."'><b>UP</b>(".$bookcat_name[prevod($bookcat_parent[prevod($editcat)])].")</a>";}
+echo "<form method='post' enctype='multipart/form-data' action='/'>";
+echo "<input type='hidden' name='bparent_id' value='$editcat'>";
+if ($editcat=='0'){
+echo "Nova kategoria:<input class='bigtextinput' type='text' name='bookcatname'>";
+echo "<input type='submit' value='pridaj.b00kcat' name='action' class='bigtextinput'>";
+}
+
+listbookcat3('0',$editcat);
+echo "</form><br><br>";
+echo "<br><bR><br><br>Kluby v aktivnej kategorii:<br>";
+echo "<form method='post' enctype='multipart/form-data' action='/'>";
+echo "<blockquote>";
+listbookforum1($editcat);
+echo "</blockquote>";
+echo "<br><bR><br><br>Kluby v inych kategoriach:<br>";
+
+echo "<blockquote>";
+if ($editcat!='0'){listbookforum('0');}
+for($i=0;$i<=count($bookcat_id);$i++){
+ if ($i!=prevod($editcat)){
+ listbookforum($bookcat_id[$i]);
+ }
+}
+echo "</blockquote>";
+echo "<input type='hidden' name='parent_id' value='$editcat'>";
+echo "Oznacene presun do aktivnej kategorie <input type='submit' value='movebook' name='action' class='bigtextinput'>";
+echo "</form><br><br>";
+
+
+?>
\ No newline at end of file
--- /dev/null
+<Center>
+<table class=redbox width=100%><tr><td colspan=2 align=center>knihy</td></tr></table>
+<?
+$kyberia->showBookList();
+?>
+
+</center>
\ No newline at end of file
--- /dev/null
+<?php
+global $user_id;
+include("book_func.inc");
+$openswich=$_GET['openswich'];
+$swichto=$_GET['swichto'];
+if ($openswich) {
+ $q="update user_bookcat set is_open='$swichto' where user_id='$user_id' and bookcat_id='$openswich'";
+// echo $q;
+ $kyberia->query($q);
+}
+
+$book=$_GET['book'];
+if ($book) {
+ $q="update user_forum set user_bookmark='no' where user_id='$user_id' and forum_id='$node_id'"; $kyberia->query($q);
+}
+
+readbookdb();
+
+listbookcat2('0');
+echo "<br>Nezaradene kluby:<br>";
+listbookforum2('0');
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+ $set=$kyberia->query("select count(*) as pocet from session");
+ $set->next();
+ $pocet=$set->getString('pocet');
+ echo "<center><b>kyberiou momentalne browsi $pocet id.entit</b></center><br>";
+
+
+?>
\ No newline at end of file
--- /dev/null
+<form>
+<select onChange="window.location.href='?action=journaux&dennik_type=' + this.options[this.selectedIndex].value" name='dennik_type'>
+<option value='journaux'>denniky</option>
+<option value='portugal'>portugal</option>
+<option value='report'>reporty</option>
+<option value='story'>poviedky</option>
+<option value='poetry'>basne</option>
+<option value='dream'>sny</option>
+</select>
+</form>
+
--- /dev/null
+<br><br><form action='<?=SCRIPT?>?action=journaux' method=post>
+<table><tr>
+<td>nadpis:</td><td><input type='text' name='dennik_title'></td></tr>
+<!--<tr><td>obrazok:</td><td><input name='icon' class='file' type='file'><font color='red'> *</font></td>-->
+<tr><td valign=top>text:</td><Td><textarea name='dennik_text' rows=23 cols=64></textarea></td></tr>
+<tr><td valign='middle' align=center>typ:</td><td valign='middle'><table><tr><td><input class='checkbox' type='radio'
+checked name='type' value='public'></td><td> verejny</td><td><input value='kyberia' type='radio' class='checkbox' name='type'></td><td> kyberia users only</td><td><input type='radio' name='type' class='checkbox' value='private'></td><td> sukromny</td></tr></table>
+<tr><td>user access:</td><td><input class='longtext' type='text' name='journaux_access'><font color='red'>*</font></td></tr>
+<tr><td colspan=2 align=center><input type=submit name='event' value='pridaj dennik'></td></tr>
+</table>
+</form>
+
+<font color='red'>* pouzivajte iba v pripade ze ste dennik nastavili ako sukromny, mena oddelujte bodkociarkou</font>
\ No newline at end of file
--- /dev/null
+<table width=100% class=box><tr><td>
+<table class=redbox width=100%><tr><td colspan=2 align=center>najdiskutovanejsie</td></tr></table>
+<?
+$kyberia->showForumArticleList();
+?>
+</td></tr></table>
--- /dev/null
+<?php
+
+if ($access_type=="ban" and $forum['forum_owner']!=$user_id) return;
+elseif (!empty($access_type)) {
+ echo "<center><b>si $access_type tohto klubu</b></center>";
+}
+
+if ($forum['forum_public']=='private' and !($forum['forum_owner']==$user_id OR $access_type=='access')) {
+ echo "toto forum je privatne. sorry";
+ return;
+}
+
+if($forum['forum_owner'] == $user_id) $access_type = 'owner';
+
+$stats=$_GET['stats'];
+$update=$_GET['update'];
+$alone=$_GET['alone'];
+
+//statistiky
+if ($stats) {
+ $set=$kyberia->query("select count(*) as pocet from user_forum where forum_id='$node_id'");
+ $set->next();$pocet=$set->getString('pocet');
+ echo "pocet ludi: $pocet";
+ echo "<table align='center' class='box'>";
+ $set=$kyberia->query("select user_forum.*,user.login as login,user.id as user_id from user_forum left join user on user.id=user_forum.user_id where forum_id='$node_id' order by submission_count");
+ while ($set->next()) {
+ if ($set->getString('user_bookmark')==1) {
+ echo "<tr style='font-color: red;'>";
+ }
+ else echo "<tr>";
+ if ($friend_array[$set->getString('user_id')]){
+ echo "<td><b>",$set->getString('login'),"</b></td><td>",$set->getString('submission_count'),"</td><td>",$set->getString('last_visit'),"</td>";
+ }else{
+ echo "<td>",$set->getString('login'),"</td><td>",$set->getString('submission_count'),"</td><td>",$set->getString('last_visit'),"</td>";
+ }
+ echo "</tr>";
+ }
+ echo "</table>";
+}
+
+//admin update mode
+elseif($update || $_GET['status']) {
+ $set=$kyberia->query("select user.login,node_access.* from node_access left join user on user.id=user_id where node_type='forum' and node_id='$node_id'");
+ while ($set->next()) {
+ if ($set->getString('access_type')=="ban") $banlist.=$set->getString('login').";";
+ elseif ($set->getString('access_type')=="master") $masterlist.=$set->getString('login').";";
+ elseif ($set->getString('access_type')=="op") $oplist.=$set->getString('login').";";
+ elseif ($set->getString('access_type')=="access" && $forum['forum_public']!='public') $accesslist.=$set->getString('login').";";
+}
+?>
+ <form enctype='multipart/form-data' method='post' action='<?=SCRIPT?>'>
+ <table class='box' width='100%'>
+ <tr><td valign='top'><img src='/images/forums/<?=$node_id?>.gif' border='0'></td>
+ <td>
+ <table align='center' width='100%'>
+<?php if ($forum['forum_public']=='public') {?>
+ <tr><td><textarea name='banlist' cols='230' rows='3'><?=$banlist?></textarea></td><td><input type='submit' value='ban list' name='event'> </td></tr>
+ <tr><td><textarea name='oplist' cols='230' rows='3'><?=$oplist?></textarea></td><td> <?php if(($access_type == 'owner') or ($access_type == 'master')) echo "<input type='submit' value='op list' name='event'>"; ?> </td></tr>
+ <tr><td><textarea name='masterlist' cols='230' rows='3'><?=$masterlist?></textarea></td><td> <?php if($access_type == 'owner') echo "<input type='submit' value='master list' name='event'>"; ?> </td></tr>
+<?php } elseif ($forum['forum_public']=='private') { ?>
+ <tr><td><textarea name='accesslist' cols='230' rows='3'><?=$accesslist?></textarea></td><td><input type='submit' value='access list' name='event'> </td></tr>
+<?php } else { ?>
+ <tr><td><textarea name='banlist' cols='230' rows='3'><?=$banlist?></textarea></td><td><input type='submit' value='ban list' name='event'> </td></tr>
+ <tr><td><textarea name='oplist' cols='230' rows='3'><?=$oplist?></textarea></td><td> <?php if(($access_type == 'owner') or ($access_type == 'master')) echo "<input type='submit' value='op list' name='event'>"; ?> </td></tr>
+ <tr><td><textarea name='masterlist' cols='230' rows='3'><?=$masterlist?></textarea></td><td> <?php if($access_type == 'owner') echo "<input type='submit' value='master list' name='event'>"; ?>
+</td></tr>
+ <tr><td><textarea name='accesslist' cols='230' rows='3'><?=$accesslist?></textarea></td><td><input type='submit' value='access list' name='event'> </td></tr>
+<?php } ?>
+ </table>
+ </td></tr>
+ </table><br>
+<?php
+$set=$kyberia->query("select * from category order by category_tree");
+$selectstring="<select name='forum_category'>";
+while ($set->next()) {
+ $count=substr_count($set->getString('category_tree'),";");
+ $selectstring.="<option value='".$set->getString('category_id')."'";
+ if ($forum['forum_category']==$set->getString('category_id')) $selectstring.= " selected ";
+ $selectstring.= ">";
+ if ($count) {
+ $selectstring.="|";
+ for ($i=0;$i<$count;$i++) $selectstring.="----";
+ }
+ $selectstring.=$set->getString('category_name')."</option>";
+}
+$selectstring.="</select>";
+
+?>
+
+ <input type='hidden' name='action' value='forum'>
+ <input type='hidden' name='node_id' value='<?=$node_id?>'>
+ <table class='box'>
+ <tr><td>info: <br><textarea class='long' name='forum_info' cols='230' rows='23'><?=$forum['forum_info']?></textarea></td><td>
+ nazov: <input type='text' class='longtext' name='forum_name' value='<?=$forum['forum_name']?>'><br>
+ owner: <input type='text' class='longtext' name='forum_owner' value='<?=$forum['owner_name']?>'><br>
+ public?<input type=radio name='forum_public' value='public' <?php if ($forum['forum_public']=='public') {?> checked <?php } ?>> moderated?<input type=radio name='forum_public' value='moderated' <?php if ($forum['forum_public']=='moderated') {?> checked <?php } ?>> private?<input type=radio name=forum_public value='private' <?php if ($forum['forum_public']=='private') {?> checked <?php } ?>><br>
+ picture: <input type='file' class='bigtextinput' name='forum_icon'><br>
+ <?=$selectstring?><br><br>
+<?php
+// to je v poho, kazdy aj tak moze menit iba to, co je dovolene
+if($access_type == 'owner' || $access_type == 'master' || $access_type == 'op') echo "
+ <input type='submit' name='event' value='zmen nastavenie'>
+ <input type='submit' value='zmaz forum' name='event' onClick=\"return confirm('Bravco, chces zmazat svoje forum???')\">"; ?>
+ </td></tr></table>
+ <br>
+ <?php
+ include("polladmin.inc");
+}
+
+
+
+
+
+else {
+
+$new=$forum['submission_count'];
+$count=$forum['forum_submissions'];
+
+
+echo $forum['forum_info']."<br><br>";
+
+
+$old_submission_text=StripSlashes($_POST['submission_text']);
+
+ // navigacia! sofistikovana bitch
+
+ if (empty($limit)) $limit=$user_amount;
+ else $limit=$limit;
+ if ($new > $limit) $limit=$new;
+ if (empty($offset)) $offset=0;
+ if ($event=='>') $offset+=$limit;
+ if ($event=='<') $offset-=$limit;
+ if ($event=='<<') $offset='0';
+ if ($event=='>>') $offset=$count-$limit;
+ if ($offset<0) $offset=0;
+ if ($offset+$limit>$count AND $limit<$count) $offset=$count-$limit;
+ elseif ($offset+$limit>$count AND $limit>$count) $offset=0;
+ // koniec sofistikovanej bitch
+
+
+if ($user_id=='38') echo "POCET:$count OFFSET: $offset LIMIT: $limit NEW : $new";
+include_once("active.inc");
+?>
+<form action='<?=$PHP_SELF?>?node_id=<?=$node_id?>&action=forum' method='post'>
+<?php if(!($forum['forum_public'] == 'moderated' AND empty($access_type))) { ?> <textarea style="width: 510pt; height: 50pt;" name='submission_text'><?php if($event=='nahlad') echo $old_submission_text; ?></textarea> <?php } ?>
+<br>
+
+<?php
+ if($forum['forum_public']=='moderated' AND empty($access_type)) { Showz::showNav(false); }
+ else Showz::showNav();
+?>
+
+<?php
+
+if ($_GET['karma']) {
+ $q="SELECT submissions.*,user.login as user_name,user.id as user_id ,session.user_action_name as user_action_name,user_action_id as user_action_id,session.user_action as user_action,user.user_mode as user_mode FROM submissions left join user on submissions.submission_owner=user.id left join session on user.id=session.user_id where forum_id='$node_id' and submission_k>0";
+ $q.=" ORDER BY submission_k DESC LIMIT $offset,$limit";
+}
+
+else {
+ $q="SELECT submissions.*,user.login as user_name,user.id as user_id ,session.user_action_name as user_action_name,user_action_id as user_action_id,session.user_action as user_action,user.user_mode as user_mode FROM submissions left join user on submissions.submission_owner=user.id left join session on user.id=session.user_id where forum_id='$node_id' ";
+ if ($event=="hladat") $q.=" and submission_text like '%$submission_text%' or user.login like '%submission_text%'";
+ if (IsSet($alone)) $q.=" and submission_id=$alone";
+ if ($forum['forum_type']=='threaded') $q.=" group by submission_id order by concat(submission_thread,submission_timestamp) desc limit $offset,$limit";
+ else $q.=" ORDER BY submission_id DESC LIMIT $offset,$limit";
+}
+
+$set=$kyberia->query($q);
+
+if ($preview) echo $preview;
+
+while ($set->next()) {
+ $submissions=$set->getRecord();
+ if ($forum['forum_type']=='threaded') {
+ $zub=substr_count($submissions['submission_thread'],".");
+ $width=$zub*50;
+ echo "<table width='100%'><tr width='100%'><td width='$width'></td><td align='left'>";
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ if ($user_icons_in_forum == 'yes')
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ else
+ echo " ";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'><a href='?action=userinfo&node_id=",$submissions['user_id'],"'>",$submissions['user_name'],"</a>";
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ echo " [lokacia:<a class='location' href='?action=",$submissions['user_action'];
+ if ($submissions['user_action']=="forum") echo "&node_id=".$submissions['user_action_id']."'>",$submissions['user_action_name'];
+ else echo "'>".$submissions['user_action'];
+ echo "</a>] ";
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+// echo "<input class='delete' type=hidden name=delete_time[".$submissions['submission_id']."] value='".$submissions['submission_timestamp']."'>";
+ echo " <input class='delete' type=checkbox name=delete_name[] value='".$submissions['submission_id']."'>";
+ if ($user_id==$submissions['submission_owner'] or $forum['forum_owner']==$user_id) {
+ echo "<input class='delete' type=hidden name=delete_time[".$submissions['submission_id']."] value='".$submissions['submission_timestamp']."'>";
+
+ }
+ if ($new>0) echo "<font color='red'><b> :: NEW :: </b></font>";
+
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</table>";
+ echo "</table>";
+
+ } else {
+ echo "<table class='bigitem'><tr><td class='icon' nowrap>";
+ if ($user_icons_in_forum == 'yes')
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ else
+ echo " ";
+ if ($submissions['submission_k']) echo "<center><font color='red'>".$submissions['submission_k']." K</font></center>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'><a href='?action=userinfo&node_id=",$submissions['user_id'],"'>",$submissions['user_name'],"</a>";
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ echo " [lokacia:<a class='location' href='?action=",$submissions['user_action'];
+ if ($submissions['user_action']=="forum") echo "&node_id=".$submissions['user_action_id']."'>",$submissions['user_action_name'];
+ else echo "'>".$submissions['user_action'];
+ echo "</a>] ";
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+// if ($user_id==$submissions['submission_owner'] or $forum['forum_owner']==$user_id) {
+ echo " <input class='delete' type=checkbox name=delete_name[] value='".$submissions['submission_id']."'><input class='delete' type=hidden name=delete_time[".$submissions['submission_id']."] value='".$submissions['submission_timestamp']."'>";
+// }
+ if ($new>0) echo "<font color='red'><b> :: NEW :: </b></font>";
+ echo "<div align='right' valign='top'><a href='?action=forum&node_id=".$node_id."&alone=".$submissions['submission_id']."'>link alone ".$submissions['submission_id']."</a></div>";
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+ $new--;
+ }
+}
+?>
+
+<?php if (!($limit>$count)) {
+ echo "<center>";
+ Showz::showNav(false);
+ echo "</center>";
+}
+
+}
+?>
+
+</form>
\ No newline at end of file
--- /dev/null
+<?php
+$set=$kyberia->query("select * from forum where forum_id='$forum_id'");
+$set->next();
+?>
+
+<form method='post' action='/index.php'>
+<input type='hidden' name='action' value='forumedit'>
+<input type='hidden' name='forum_id' value='<?=$forum_id?>'>
+<input type='text' class='bigtextinput' name='forum_name' value='<?=$set->getString('forum_name')?>'>
+<input type='text' class='bigtextinput' name='forum_owner' value='<?=$set->getString('forum_owner')?>'>
+<input type='file' class='bigtextinput' name='forum_icon'>
+<textarea class='personal' name='forum_info' cols='23' rows='10'><?=$set->getString('forum_info')?></textarea>
+
+<br>
+<?php
+echo "LALALALA";
+include("./polladmin.inc");
+?>
--- /dev/null
+<?php
+$forum_owner_id=$forum['forum_owner'];
+$set2=$kyberia->query("select user_id from session where user_id='$forum_owner_id' group by session.user_id");
+while ($set2->next()){
+ $onl[$set2->getString('user_id')]=$set2->getString('user_id');
+}
+if ($onl[$forum_owner_id]) {$onlflag="@";} else {$onlflag="";}
+
+
+echo "<table><tr>";
+echo "<td valign='top' align='center' colspan='2'><img src='/images/forums/".$node_id.".gif' border='0'></td></tr>";
+echo "<tr><td valign='top' align='left'>forum:</td>";
+echo "<td valign='top' align='left'><a href='".SCRIPT."?action=forum&node_id=$node_id'>".$forum['forum_name']."</a></td>";
+echo "</tr><tr>";
+echo "<tr><td valign='top' align='left'>type:</td>";
+echo "<td valign='top' align='left'>".$forum['forum_type']."</td>";
+echo "<tr><td valign='top' align='left'>access:</td>";
+echo "<td valign='top' align='left'>".$forum['forum_public']."</td>";
+echo "<tr><td valign='top' align='left'>ctgry:</td>";
+echo "<td valign='top' align='left'><a href='?action=list".$forum['forum_category_param']."'>".$forum['category']."</a></td>";
+echo "<tr><td valign='top' align='left'>owner:</td>";
+echo "<td valign='top' align='left'><a href='".SCRIPT."?action=userinfo&node_id=".$forum['forum_owner']."'>".$forum['owner_name']." $onlflag</a></td>";
+echo "</tr>";
+echo "<tr><td align='center' colspan='2'>";
+?>
+<form method='post' action='/index.php'>
+<input type='hidden' name='action' value='forum'>
+<input type='hidden' name='node_id' value='<?=$node_id?>'>
+<?php
+
+if($forum['forum_owner'] != $user_id)
+{
+ if ($forum['bookmark']=='yes') echo "<input type='submit' value='unbook' name='event'>";
+ else echo "<input type='submit' value='book' name='event'>";
+}
+
+$q = "select access_type from node_access where node_type = 'forum' and node_id = '$node_id' and user_id = '$user_id'";
+$result = $kyberia->query($q);
+
+
+if($result->getNumRows() > 0)
+{
+ $result->next();
+ if($forum['forum_owner'] == $user_id || ($result->getString("access_type") == 'master') || ($result->getString("access_type") == 'op')) define('EDIT', true);
+ else define('EDIT', false);
+}
+elseif ($forum['forum_owner'] == $user_id) define("EDIT", true);
+else define('EDIT', false);
+
+
+//if(($result->getNumRows() > 0) or ($forum['forum_owner']==$user_id)) define('EDIT', true);
+//else define('EDIT', false);
+
+if (EDIT) {
+ echo "<br><a href='".SCRIPT."?action=forum&node_id=$node_id&update=1'>zmen nastavenie</a>";
+}
+echo "<br><a href='".SCRIPT."?action=forum&node_id=$node_id&stats=1'>statistiky</a>";
+echo "<br><a href='".SCRIPT."?action=forum&node_id=$node_id&karma=1'>karma</a>";
+?>
+
+</form>
+<?php
+echo "</table>";
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<font color='red'><b>cez vikend bude kyberia.sk vypnuta, bude sa nahadzovat nova verzia a prehadzovat DNS zaznam. dakujem za pochopenie</b></font><br><br>
+<?php
+if ($category=='change') {
+ $q="update forum set forum_category='$forum_category' where forum_id='$forumid'";
+ $kyberia->query($q);
+}
+
+
+function showForumList($kat,$depth) {
+ global $kyberia;
+ global $user_id;
+ global $action;
+ $q="SELECT user_forum.user_bookmark as user_bookmark,user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+ $q.=" WHERE forum_category='$kat'";
+ $q.=" order by forum_id desc ";
+ $forumset=$kyberia->query($q);
+
+
+ while ($forumset->next()) {
+ echo "<br>";
+ for ($i=0;$i<=$depth;$i++) echo " ";
+ echo " <a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a> ";
+ echo "<br>";
+ for ($i=0;$i<=$depth;$i++) echo " ";
+ echo "(".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")";
+/* --> ";
+ if ($forumset->getString('user_bookmark')=='1') echo "<a href='?action=$action&kat=$kat&book=0&node_id=",$forumset->getString('forum_id'),"'>unbook</a>";
+ else echo "<a href='?action=$action&kat=$kat&book=1&node_id=",$forumset->getString('forum_id'),"'>book</a>";
+ global $category_parent;
+*/
+// if ($user_id==38) echo "<form action='?action=forumlist'><input type='text' name='forum_category'><input type='hidden' name='forumid' value='",$forumset->getString('forum_id'),"'><input type=submit value='change' name='category'></form>";
+ }
+ echo "<br>";
+}
+
+function showContent($subset,$pole=false,$depth=0) {
+ global $user_id;
+ $pole=array_unique($pole);
+ foreach($pole as $subcat_id) {
+
+ while ($subset[$subcat_id]->next()) {
+ $data=$subset[$subcat_id]->getRecord();
+ unset($parameter);
+
+
+ //creating parameter string for href linkz
+ $params=$_GET['kat'];
+ if (Is_array($params)) {
+ $r=0;
+ foreach ($params as $key => $value) {
+ ++$r;
+ if ($value && ($r<=$depth)) $parameter.="&kat[$key]=$value";
+ }
+ }
+ $pocet=count($pole);
+ $parameter.= '&kat['.$depth.']='.$data['category_id'];
+
+ //listing subcategories
+ if (Is_array($data)) {
+ echo "<br>";
+ for ($i=0;$i<=$depth;$i++) echo " ";
+ if($depth) echo "|";
+ for ($i=0;$i<$depth;$i++) echo "-";
+ echo "<b><a href='?action=list$parameter'>";
+ echo $data['category_name']."</a> (";
+ echo $data['category_forums'];
+ echo " forums :: ".$data['category_subcats']." subcategories)</b>";
+ }
+ //unset($parameter);
+
+ //main recursion sophisticated bitch. leave it. it works somehow
+ $flip=array_flip($pole);
+ if ($flip[$data[category_id]]) {
+ //echo "<br>";
+ for ($i=0;$i<=$depth;$i++) echo " ";
+ $new_depth=$depth+1;
+
+ $slice=array_slice($pole,1);
+ foreach ($slice as $cid) {
+ $set[$cid]=$subset[$cid];
+
+ }
+
+ showContent($set,$slice,$new_depth);
+ //echo "<br>";
+ }
+
+ }
+
+ global $SHOWN;
+ if ($SHOWN!="yes") {
+ echo "<br>";
+ showForumList($subcat_id,$depth);
+
+ if ($depth) {
+ echo "<br>";
+ for ($i=0;$i<=$depth;$i++) echo " ";
+ $kat=array_pop($_GET[kat]);
+ echo "<a href='".SCRIPT."?action=list&show=newforum&kat=$kat'><b>zalozit nove forum</b></a>";
+ echo "<br><br>";
+ }
+
+
+ $SHOWN="yes";
+ $parent=array_pop($pole);
+/*
+ if ($user_id=='38') {
+ echo "<form method='post' enctype='multipart/form-data' action='/'><input type='hidden' name='category_parent' value='$parent'>";
+ echo "<table><tr>";
+ echo "<td align='left'>Nazov kategorie:</td><td align='left'><input class='bigtextinput' type='text' name='category_name'>";
+ echo "<tr><td></td><td align='left'><input type='submit' value='pridaj.kategoriu' name='action' class='bigtextinput'>";
+ echo "</table></form>";
+ }
+*/
+ }
+
+}
+
+}
+
+if ($show=="newforum") {
+ echo "<br>";
+ echo "<form method='post' enctype='multipart/form-data' action='".SCRIPT."?action=forumlist'>";
+ echo "<table><tr>";
+ echo "<td align='left'>Nazov klubu:</td><td align='left'><input class='bigtextinput' type='text' name='forum_name'>";
+ echo "<tr><td align='left'>Obrazok klubu:</td><td align='left'><input class='bigtextinput' type='file' name='forum_icon'>";
+
+ $set=$kyberia->query("select * from category order by category_tree");
+ $selectstring="<select name='forum_category'>";
+ while ($set->next()) {
+ $count=substr_count($set->getString('category_tree'),";");
+ $selectstring.="<option value='".$set->getString('category_id')."'";
+ if ($kat==$set->getString('category_id')) $selectstring.=" selected ";
+ $selectstring.=">";
+ if ($count) {
+ $selectstring.="|";
+ for ($i=0;$i<$count;$i++) $selectstring.="----";
+ }
+ $selectstring.=$set->getString('category_name')."</option>";
+ }
+ $selectstring.="</select>";
+ echo "<tr><td align='left'>Kategoria :</td><td align='left'>$selectstring</td>";
+
+ echo "<tr><td align='left'>Dalsie info:</td><td align='left' valign='top'><textarea rows='10' cols='60' name='forum_info'></textarea>";
+ echo "<tr><td colspan='2' align='center'>verejne: <input type='radio' name='forum_public' value='public' checked> moderovane:<input type='radio' name='forum_public' value='moderated'> privatne:<input type='radio' name='forum_public' value='private'></td></tr>";
+ echo "<tr><td colspan='2' align='center'>normal: <input type='radio' name='forum_type' value='flat' checked> threaded:<input type='radio' name='forum_type' value='threaded'></td></tr>";
+ echo "<tr><td></td><td align='left'><input type='submit' value='pridaj.forum' name='event' class='bigtextinput'>";
+ $set=$kyberia->query("select * from category order by category_tree");
+
+
+ echo "</table></form>";
+
+}
+
+else {
+ if (!Is_array($kat)) $kat=array();
+ array_unshift($kat,0);
+
+ if (count($_GET[kat])<1) {
+/*
+ echo "<b>1. drzte sa temy jednotlivych klubov </b><br>";
+ echo "<b>2. osobne veci si vybavujte v poste</b><br>";
+ echo "<b>3. snazte sa ostatnym nieco DAT</b><br>";
+ echo "<b>4. pouzivajte nahlad a mazte po sebe bravcoviny</b><br>";
+ echo "<b>5. konecne funguju bookmarky tak ako maju. takk bookojte, boha ;]</b><br>";
+ echo "<b>6. na chatovacich forach sa chatuje. na diskusnych forach sa diskutuje</b>";
+*/
+
+// echo "<font color='red'>Z dovodu prilisneho pracovneho a spolocenskeho ;] vytazenia vas administrator dnes nechtiac zmazal cast databaze v ktorej boli ulozene nazvy a majitelia klubov. Preto pokial vam nejake kluby zmizli z bookmarkov, kliknite hore na ADMIN, potom na \"auditko\" a tam sa pokuste vas klub najst podla textu ktory ste k nemu zadali a ktory sa nastastie zachoval. V pripade ze ho nedopatrenim dostal do ruk niekto ini, napiste mu nech vam ho odovzda. Robi sa to jednoducho - prepisanim mena majitela v polozke \"zmen nastavenie\" v danom fore. <b>Takisto prosim umiestnite forum do prislusnej kategorie.</b>. Dakujem & pardonne moi.</font>";
+ echo "<br><br>";
+ }
+
+ //precaching objects for category tree
+ $q="SELECT user.login,category.* from category left join user on category.category_owner=user.id where category_parent=0";
+ $q.=" order by concat(category_name,category_parent) ";
+ $subset[0]=$kyberia->query($q);
+ foreach ($kat as $subkat) {
+ $q="SELECT user.login,category.* from category left join user on category.category_owner=user.id where category_parent=$subkat";
+ $q.=" order by category_name ";
+ $subset[$subkat]=$kyberia->query($q);
+ }
+
+ //recursive category tree bitch
+ showContent($subset,$kat);
+
+ if (count($_GET[kat])<1) {
+ ?>
+ <br><br><center><b>najnovsie kluby</b></center>
+ <?php
+ $q="SELECT user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+ $q.=" where forum_public='public' or forum_public='moderated'";
+ $q.=" order by forum_id desc limit 10 ";
+ $forumset=$kyberia->query($q);
+ while ($forumset->next()) {
+ echo "<a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a>(".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")<br>";
+ }
+
+ ?>
+ <br><br><center><b>najnovsie denniky</b></center>
+ <?php
+ $q="SELECT user_discussion.submission_count as new,dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,user.login from dennik left join user on dennik.autor=user.id left join user_discussion on (user_discussion.discussion_id=dennik.id_diskuse and user_id='$user_id')";
+ $q.=" order by dennik.id desc limit 10 ";
+ //echo $q;
+ $forumset=$kyberia->query($q);
+ while ($forumset->next()) {
+ echo "<a href='?action=journaux&node_id=",$forumset->getString('id'),"'>",$forumset->getString('nadpis'),"</a>(".$forumset->getString('login')." :: ".$forumset->getString('hits')." hitz ";
+ echo "->",$forumset->getString('prispevky'),"submissions";
+ if ($forumset->getString('new')) echo " - <font color='red'>".$forumset->getString('new')." NEW</font>";
+ echo ")<br>";
+ }
+
+ }
+}
+ if (AD_BANNER_FORUMLIST) { echo AD_BANNER_FORUMLIST; }
+?>
--- /dev/null
+<br>
+<?php
+$set2=$kyberia->query("select user_id from session group by session.user_id");
+while ($set2->next()){
+ $onl[$set2->getString('user_id')]=$set2->getString('user_id');
+}
+$set=$kyberia->query("select DATE_FORMAT(user_forum.last_visit,'%k:%i:%s') AS datetime,user_forum.*,user.login,user.id as user_id from user_forum left join user on user.id=user_forum.user_id where (forum_id='$node_id' and user_bookmark='yes') ORDER by user_forum.submission_count asc ");
+echo "<table><tr><td colspan='2' align='center' style='color: red'>booked</td><tr><td>user</td><td>not read</td>";
+while ($set->next()) {
+ if ($onl[$set->getString('user_id')]) {$onlflag="@";} else {$onlflag="";}
+ if ($friend_array[$set->getString('user_id')]){
+ echo "<tr><td><b>",$set->getString('login'),"<b> $onlflag</td><td align=center>",$set->getString('submission_count'),"</td></tr>";
+ }else{
+ echo "<tr><td>",$set->getString('login')," $onlflag</td><td align=center>",$set->getString('submission_count'),"</td></tr>";
+ }
+}
+echo "</table>";
\ No newline at end of file
--- /dev/null
+<img src=http://kyberia.sk/images/line.jpg border=0>
+<table width=100% class=box><tr><td>
+<?
+$kyberia->putIntro();
+?>
+</td></tr></table>
--- /dev/null
+<table width=100% class=box><tr><td align=center>
+<?
+global $id;
+$value=$kyberia->putGallery($_GET['node_id']);
+if (!$value) {
+?>
+
+foto z <a href=http://kyberia.sk/gallery>galerie</a>
+<br><a href=http://kyberia.sk/gallery/view_photo.php?set_albumName=Klute-Smirnoff-in-da-bush&id=aaz>
+<br><img src=http://kyberia.sk/images/albums/Klute-Smirnoff-in-da-bush/aaz.thumb.jpg border=0 >
+</a>
+<br>
+<? } ?>
+</td></tr></table>
--- /dev/null
+<br>
+<form method='post' action='?action=friends'>
+meno: <input type='text' name='friend_name'><br>
+<textarea name='friend_text'></textarea><br>
+<input type='submit' name='event' value='pridaj priatela'><input type='submit' name='event' value='zmaz priatela'>
+<br><br>Nastavenie pre vsetkych priatelov:<br>
+<input type='submit' name='event' value='denniky'>
+<input type='checkbox' name='journauxall' value='1' style='border : 0;width : 14;height : 14;'><br>
+<input type='submit' name='event' value='kluby'>
+<input type='checkbox' name='forumall' value='1' style='border : 0;width : 14;height : 14;'>
+<br><br><br><input type='submit' name='event' value='zmen nastavenie'>
+<?php
+$result=mysql_query("select session.user_action,session.user_action_id,session.user_action_name,friends.*,user.login as friend_name from friends left join user on user.id=friends.friend_id left join session on session.user_id=friends.friend_id where friends.user_id='$user_id'");
+$i=0;
+while ($row=mysql_fetch_array($result)) {
+ $send_bin=$row['send_mail'];
+ $s_forum=floor($send_bin/2);
+ $pp=$send_bin%2;
+ $s_jornaux=floor($pp/1);
+ $s_j=$s_jornaux=='1'?'checked':'';
+ $s_f=$s_forum=='1'?'checked':'';
+
+ echo "\n<table class='bigitem'><tr><td class='icon'>";
+ echo "\n<img alt='",$row['friend_name'],"' src='/images/users/",strtolower($row['friend_name']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "\n<table class='item'>";
+ echo "\n<td class='header'><a href='?action=userinfo&node_id=",$row['friend_id'],"'>",$row['friend_name'],"</a>";
+ if ($row['user_action']) {
+ echo " [lokacia:<a class='location' href='?action=",$row['user_action'];
+ if ($row['user_action']=="forum") echo "&node_id=".$row['user_action_id']."'>",$row['user_action_name'];
+ else echo "'>".$row['user_action'];
+ echo "</a>] ";
+ }
+ echo "</td>";
+ echo "</tr>";
+ echo "\n<tr class='content'><td class='content'>",Stripslashes($row['friend_text']),"</td></tr>";
+ echo "<tr><td>";
+ echo "\n<table width='100%' bgcolor='#222222'><tr>";
+ echo "\n<td><font size='-2'>Oznám nový denník:</font> <input type='checkbox' name='jornaux[]' value='".$i."_".$row['friend_id']."' style='border : 0;width : 14;height : 14;' ".$s_j."> </td>";
+ echo "\n<td><font size='-2'>Oznám nové fórum:</font> <input type='checkbox' name='forum[]' value='".$i."_".$row['friend_id']."' style='border : 0;width : 14;height : 14;' ".$s_f."> </td>";
+ echo "\n</tr></table>";
+ echo "</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table><br><br>";
+ $i++;
+}
+
+
+?>
+</form>
\ No newline at end of file
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+$kyberia->putIntro();
+?>
+</td></tr></table>
--- /dev/null
+<html><head>
+<title>
+<?=KYBERIA_TITLE?>
+</title>
+<link rel=stylesheet type="text/css" href="http://www.kyberia.sk/css/gr.css">
+ <meta http-equiv="Cache-Control" content="Public">
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
+<script>
+ function openWin(url, width, height, scrollbars, resize) {
+ if (!width) width = 640;
+ if (!height) height = 480;
+ if (!scrollbars) scrollbars = "yes";
+ if (!resize) resize = "yes";
+ window.open(url,"","width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbars + ",resizable=" + resize);
+ }
+
+function vymena() {
+ document.posta.mail_to.value = document.posta.mail_to.value.toLowerCase() ;
+ document.images['fricon'].src = '/images/users/' + document.posta.mail_to.value + '.gif' ;
+}
+
+function chngto(adr) {
+document.posta.mail_to.value = adr ;
+adr = adr.toLowerCase() ;
+document.images['fricon'].src = '/images/users/' + adr + '.gif' ;
+}
+
+function openWinConfirm(qry, url, width, height, scrollbars, resize) {
+ if (window.confirm(qry)) {
+ openWin(url, width, height, scrollbars, resize);
+}
+}
+
+</script>
+</head>
+<body>
+<?php
+
+if ((!$user_id) && ($action!='register') && AD_BANNER_MAIN) {
+ echo AD_BANNER_MAIN;
+?>
+
+<script type='text/javascript'>
+function Go(){return}
+
+</script>
+<script type='text/javascript' src='http://kyberia.sk/js/exmplmenu_var.js'></script>
+<script type='text/javascript' src='http://kyberia.sk/js/menu_com.js'></script>
+<script type='text/javascript' src='http://kyberia.sk/js/menu.js'></script>
+<?php } if (1==0) {?>
+
+<script language="JavaScript" type="text/javascript">
+ openWin("/leporelo.php",503,645,"no","no");
+</script>
+<?php } ?>
+<noscript>Your browser does not support script</noscript>
--- /dev/null
+<?
+
+global $kyberia;
+if (!is_object($kyberia)) {
+ include_once("/home/hromi1/kyberia/inc/kyberia.inc");
+ $kyberia= new CLASS_KYBERIA();
+}
+
+if (IsSet($HTTP_REFERER) AND !strstr($HTTP_REFERER,"kyberia")) {
+ $kyberia->setRefererStats();
+}
+
+
+?>
+<html><head>
+<title>
+preventing destruction by slowly interconnecting enlightened minds
+</title>
+<link rel=stylesheet type="text/css" href="css/gr.css">
+ <meta http-equiv="Cache-Control" content="Public">
+ <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
+<script>
+ function openWin(url, width, height, scrollbars, resize) {
+ if (!width) width = 640;
+ if (!height) height = 480;
+ if (!scrollbars) scrollbars = "yes";
+ if (!resize) resize = "yes";
+ window.open(url,"","width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbars + ",resizable=" + resize);
+ }
+
+function vymena() {
+ document.posta.postadresat.value = document.posta.postadresat.value.toLowerCase() ;
+ document.images['fricon'].src = '/images/users/' + document.posta.postadresat.value + '.gif' ;
+}
+
+function chngto(adr) {
+document.posta.postadresat.value = adr ;
+adr = adr.toLowerCase() ;
+document.images['fricon'].src = '/images/users/' + adr + '.gif' ;
+}
+
+function openWinConfirm(qry, url, width, height, scrollbars, resize) {
+ if (window.confirm(qry)) {
+ openWin(url, width, height, scrollbars, resize);
+}
+}
+
+</script>
+</head>
+<body>
+<?php if (!$user_id) { ?>
+<script type='text/javascript'>
+function Go(){return}
+
+</script>
+
+<?php } if (1==0) {?>
+
+<script language="JavaScript" type="text/javascript">
+ openWin("/leporelo.php",397,561,"no","no");
+</script>
+<?php } ?>
+<noscript>Your browser does not support script</noscript>
--- /dev/null
+<table width=100% class=box><tr><td>
+<table class=redbox width=100%><tr><td colspan=2 align=center>najcitanejsie</td></tr></table>
+
+
+<?
+$kyberia->showArticleList();
+?>
+</td></tr></table>
--- /dev/null
+<img src=http://kyberia.sk/images/line.jpg border=0>
+<table width=100% class=box><tr><td>
+<?
+$kyberia->putIntro();
+?>
+</td></tr></table>
--- /dev/null
+harddisk na mojom homeserveri zdochol..takze irc chvilu nebude
+<!--
+<b>toto je testovaci modul, pomocou bota substance sa vsetko z kanalov <br>
+<a href='?action=irc&channel=kyberia'>#kyberia</a>,
+<a href='?action=irc&channel=ragtime'>#ragtime</a>,
+<a href='?action=irc&channel=bajkonur'>#bajkonur</a><br><br>
+-->
+<?php
+/*
+$sqlcmd="select * from irc_messages where channel like '$channel' order by message_id desc limit 23";
+//echo $sqlcmd;
+$result=mysql_query($sqlcmd);
+while ($riadok=mysql_fetch_array($result)) {
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ echo "<img width='50' alt='",$riadok['nick'],"' src='/images/users/",strtolower($riadok['nick']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>",$riadok['nick']," [<font color='white'>",$riadok['host'],"</font>]";
+
+ Showz::showDate($riadok['time']);
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($riadok['message_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+
+}
+
+
+*/
+?>
--- /dev/null
+<?php
+/*
+if (!$channel) $channel="kyberia";
+$channel_name=$channel;
+$channel="#".$channel;
+mysql_connect("node.kyberia.sk","kyberia","cyb3ry");
+mysql_selectdb("kyberia");
+if ($irc_query and $channel) {
+ $message_text= "$user_name : $irc_query\r\n";
+ $fp = fsockopen ("node.kyberia.sk", 2323, $errno, $errstr,30);
+ if (!$fp) {
+ echo "$errstr ($errno)<br>\n";
+ } else {
+ fgets($fp,2);
+ fputs ($fp, "hromi\r\n");
+ fputs ($fp,"ub1k23\r\n.say $channel $message_text");
+ fclose ($fp);
+ mysql_query("insert into irc_messages set nick='$user_name',message_text='$irc_query',channel='$channel'");
+ }
+
+}
+*/
+?>
+<form method='post' action='?action=irc&channel=<?=$channel_name?>'><input type='text' name='irc_query'><input type='submit' value='napis'></form>
\ No newline at end of file
--- /dev/null
+<?php
+
+if ($_POST['k_amount']) {
+ if (!is_numeric($k_amount)) {
+ $error = "karma je ciselna";
+ } else {
+
+ if ($k_amount<-1) {
+ $error="ale rydaj sa PREC tam kam siel hitler a diablov MEC ti odrazi hlavu ;) ale fakt nevymyslaj bravcoviny karle, oko bez viecka vidi vsecko ;)";
+ } elseif ($k_amount > 1) {
+ $error = "mozes dat maximalne 1K";
+ } else {
+
+ $q="select sum(k_amount) as amount from k_logs where donor_id='$user_id' and node_id='$_GET[node_id]' and node_type='dennik'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $amount=$set->getInt('amount');
+
+ if (abs($amount)>=1) {
+ $error="tomuto prispevku uz si pridelil maximalny mozny pocet 1 K!";
+ } else {
+
+ $set2=$kyberia->query("SELECT autor FROM dennik WHERE id='$node_id'");
+ $set2->next();
+ $acceptor_id=$set2->getString('autor');
+
+ if ($acceptor_id == $user_id) {
+ $error="egotrip?";
+ } else {
+
+ $set3=$kyberia->query("select user_k from user where id='$user_id'");
+ $set3->next();
+ if ($set3->getInt('user_k') < abs($k_amount)) {
+ $error="bohuzial dnes uz ti zostava ".$set3->getString('user_k')." K. zadel menej alebo pockaj do polnoci";
+ } else {
+
+ $kyberia->query("update user set user_k=user_k-".abs($k_amount)." where id='$user_id'");
+ $kyberia->query("update user set user_karma=user_karma+$k_amount where id='$acceptor_id'");
+ $kyberia->query("update dennik set karma=karma+$k_amount where id='$node_id'");
+ $kyberia->query("insert into k_logs set donor_id='$user_id',acceptor_id='$acceptor_id',k_amount='$k_amount',node_id='$node_id',node_type='dennik'");
+}}}}}
+
+ if ($error)
+ echo "<center><font color=red><b>$error</b></font></center><p>";
+ else {
+ // header("Location: $_SERVER[REQUEST_URI]");
+ // exit();
+ }
+}
+
+if ($delete) {
+ $set = $kyberia->getDennik($delete);
+ $set->next();
+
+ if ($user_id != $set->getInt('autor'))
+ die('wo co go??');
+
+ $diskusiaID = $set->getInt('id_diskuse');
+ $kyberia->update("delete from prispevky where id_diskuse='$diskusiaID'");
+ $kyberia->update("delete from diskuse where id_diskuse='$diskusiaID'");
+ $kyberia->update("delete from dennik where id='$delete'");
+
+ header("Location: ".SCRIPT."?action=journaux");
+ exit();
+}
+
+
+
+
+function showJournaux() {
+ global $kyberia;
+ global $set;
+ global $user_id;
+ global $node_id;
+ echo "<table><tr><td>";
+ echo "<b><font color=white> ",$set->getString("nadpis"),"</font> ( <a href='".SCRIPT."?action=journaux&dennik_user=",$set->getString("autor"),"'>",$set->getString("autorname"),"</a> )</b> ".$set->getString('cas');
+
+ if ($set->getInt('autor') == $user_id) {
+ echo "<br><b><a href=\"".SCRIPT,"?action=journaux&delete=$node_id\" onClick=\"return confirm('Zmazat tento dennik??')\">zmazat</a></b>";
+ }
+ $karma = $set->getInt('karma');
+ if ($karma) {
+ echo "<br><font color=red>{$karma}K</font>";
+ }
+ echo "<br><br>";
+
+ echo $set->getString("zapis");
+ echo "<br><br>";
+
+ $set2=$kyberia->query("select user_k from user where id='$user_id'");
+ $set2->next();
+ $kamount="Este mas ".$set2->getString('user_k')." K.";
+ echo "<form action=\"\" method=\"post\">$kamount <input type=\"text\" name=\"k_amount\" size=\"5\"> <input type=\"submit\" value=\"K!\"></form>";
+
+
+ $dd=new DiskuseDesign();
+
+ if ($set->getString("id_diskuse")==0) {
+ $discussion_id=$dd->createDiskuse();
+ $kyberia->createDennikDiskuse($set->getString("id"),$discussion_id);
+ $dd->printDiskuse($discussion_id);
+ }
+ else {
+
+ $discussion_id=$set->getString('id_diskuse');
+ $dd->printDiskuse($discussion_id);
+
+ }
+ $q="SELECT user_id from user_discussion where user_id='$user_id' and discussion_id='$discussion_id'";
+ $discset=$kyberia->query($q);
+ if ($discset->getNumRows()) {
+ $q="UPDATE user_discussion set submission_count=0,last_visit=NOW() where discussion_id='$discussion_id' and user_id='$user_id'";
+ $rows=$kyberia->update($q);
+ }
+ else $kyberia->query("INSERT INTO user_discussion set submission_count=0,discussion_id='$discussion_id',user_id='$user_id',last_visit=NOW()");
+ echo "</td></tr></table>";
+}
+
+
+
+$posun=23;
+if (!IsSet($offset)) $offset=0;
+$dd=new DiskuseDesign();
+$string = new String();
+
+if ($user_id) echo "<center><b><a href='index.php?action=dennikadd'>novy dennik</a>";
+// karmu ukazovat iba v zozname a registrovanym userom (ok, som lenivy to robit pre neregistrovanych)
+if (!isset($node_id) && $user_id)
+ echo " | <a href='index.php?action={$_GET[action]}&karmalast=1&dennik_user=$dennik_user'>posledne karmove</a> | <a
+href='index.php?action={$_GET[action]}&karmatop=1&dennik_user=$dennik_user'>top karma</a>";
+echo "</b></center><br><br>";
+
+
+if (is_numeric($node_id)) {
+ $set=$kyberia->getDennik($node_id);
+ $set->next();
+
+ echo "<br><table class=box width='100%'>";
+ echo "<tr><td>";
+ if (($set->getString('type')=='kyberia' or $set->getString('private')) and !$user_id) {
+ echo "<br><br><center><font color='red'><b>Nemate opravnenie na prezeranie tohto denniku.</font></b></center>";
+ }
+
+ elseif (($set->getString('type')=='private') and ($user_id!=$set->getString('autor'))) {
+ $q="select * from node_access where user_id='$user_id' and node_id='$node_id' and access_type='access'";
+ $controlset=$kyberia->query("select * from node_access where user_id='$user_id' and node_id='$node_id' and access_type='access' and node_type='journaux'");
+ if ($controlset->getNumRows()) {
+ showJournaux();
+ }
+ else {
+ echo "<br><br><center><font color='red'><b>Tento dennik je sukromny, nemas opravnenie na jeho prezeranie.</font></b></center>";
+ }
+ }
+
+ else {
+ showJournaux();
+ echo "</table>";
+ }
+
+ return;
+}
+
+elseif (is_numeric($dennik_user)) {
+ $offset=$_GET['offset'];
+ if ($offset==NULL) $offset=0;
+ $q="SELECT DATE_FORMAT(dennik.datum,'%k:%i:%s %e.%c.%Y') as cas ,user_discussion.submission_count as new,dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,dennik.*,user.login as autorname from dennik left join user on dennik.autor=user.id left join user_discussion on (user_discussion.discussion_id=dennik.id_diskuse and user_discussion.user_id='$user_id')";
+ $q.=" where dennik.autor='$dennik_user' ";
+ if ($_GET['karmatop'])
+ $q .= " AND karma != 0 ORDER BY dennik.karma DESC LIMIT $offset, 23";
+ elseif ($_GET['karmalast'])
+ $q .= " AND karma != 0 ORDER BY datum DESC LIMIT $offset, 23";
+ else
+ $q .= " order by dennik.id desc limit $offset,23 ";
+ if ($user_id) $set=$kyberia->query($q);
+ else
+ $set=$kyberia->query("SELECT dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,dennik.*,user.login as autorname from dennik left join user on dennik.autor=user.id where dennik.autor='$dennik_user' order by dennik.id desc limit $offset,23");
+}
+else {
+ $offset=$_GET['offset'];
+ if ($offset==NULL) $offset=0;
+ $q="SELECT DATE_FORMAT(dennik.datum,'%k:%i:%s %e.%c.%Y') as cas ,user_discussion.submission_count as new,dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,dennik.*,user.login as autorname from dennik left join user on dennik.autor=user.id left join user_discussion on (user_discussion.discussion_id=dennik.id_diskuse and user_discussion.user_id='$user_id')";
+ if ($_GET['karmatop'])
+ $q .= " WHERE dennik.karma <> 0 ORDER BY dennik.karma DESC LIMIT $offset,23";
+ elseif ($_GET['karmalast'])
+ $q .= " WHERE dennik.karma <> 0 ORDER BY datum DESC LIMIT $offset, 23";
+ else
+ $q.=" order by dennik.id desc limit $offset,23 ";
+ if ($user_id) $set=$kyberia->query($q);
+ else $set=$kyberia->query("SELECT dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,dennik.*,user.login as autorname from dennik left join user on dennik.autor=user.id order by dennik.id desc limit $offset,23");
+
+}
+
+// vypis zoznam
+while($set->next()) {
+ echo "<table class=box width='100%'>";
+ echo "<tr><td><img src='/images/users/".strtolower($set->getString('autorname')).".gif' border='0' align='left'>";
+ echo "<b><font color=white> ",$set->getString("nadpis"),"</font> ( <a href='".SCRIPT."?action=journaux&dennik_user=",$set->getString("autor"),"'>",$set->getString("autorname"),"</a> )</b> ".$set->getString('cas');
+ echo "--->";
+ echo "<a href='".SCRIPT."?action=journaux&node_id=",$set->getString("id"),"'>",$set->getString("hits")," hits --> ";
+ echo "<a href='".SCRIPT."?action=journaux&node_id=",$set->getString("id"),"'>",$set->getString("prispevky")," prispevok</a>";
+ $karma = $set->getInt('karma');
+ if ($karma) {
+ echo "<br><font color=red>{$karma}K</font>";
+ }
+ echo "<br><Br>";
+
+ if(($set->getString('type')=='private') and ($user_id!=$set->getString('autor'))) echo "<br><br><center><font color='red'><b>Tento dennik je sukromny, nemas opravnenie na jeho prezeranie.</font></b></center>";
+ else echo $string->cutString($set->getString("zapis"),423);
+ echo "<div align=right><a href='".SCRIPT."?action=journaux&node_id=",$set->getString("id"),"'>Viac...</div>";
+ echo "</td></tr></table><br>";
+ }
+
+// strankovanie
+$url1 = isset($dennik_user) ? "&dennik_user=$dennik_user" : "";
+$url1 .= $_GET['karmatop'] ? "&karmatop={$_GET[karmatop]}" : "";
+$url1 .= $_GET['karmalast'] ? "&karmalast={$_GET[karmalast]}" : "";
+echo "<table width=100%><tr>";
+ if ($offset) echo "<td align=left><a href=$PHP_SELF","?action=journaux&offset=",$offset-$posun,$katlink,"$url1><-- Predchadzajuce denniky</a></td>";
+ if ($set->_numRows>$cislo) echo "<td align=right><a href='".SCRIPT."?action=journaux&offset=",$offset+$posun,$katlink,"$url1' >Dalsie denniky --></a></td>";
+ echo "</tr></table><br>";
+?>
+
+
+
--- /dev/null
+<br><br><center><b>najnovsie denniky</b></center>
+<?php
+$q="SELECT user_discussion.submission_count as new,dennik.id as id,dennik.nadpis as nadpis,dennik.hits,dennik.prispevky,user.login from dennik left join user on dennik.autor=user.id left join user_discussion on user_discussion.discussion_id=dennik.id_diskuse";
+$q.=" order by dennik.id desc limit 10 ";
+$forumset=$kyberia->query($q);
+while ($forumset->next()) {
+ echo "<center><a href='?action=journaux&dennik_id=",$forumset->getString('id'),"'>",$forumset->getString('nadpis'),"</a></center>::>".$forumset->getString('login')."<br>::".$forumset->getString('hits')." hitz ";
+ echo "<br>::",$forumset->getString('prispevky'),"submissions";
+ if ($forumset->getString('new')) echo "<br>::><font color='red'>".$forumset->getString('new')." NEW</font>";
+ echo "<br><br>";
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+echo "<br><center><b>najohodnotenejsie prispevky za poslednych 24 hodin</b></center><br>";
+
+echo "Kazdy den o polnoci bude kazdemu userovi pridane 3 K. Tieto K moze uzivatel pridelovat jednotlivym prispevkom (zaklikne
+\"mazaci\" stvorcek pri prispevku) a stlaci K!. Jednemu
+prispevku moze kazdy uzivatel celkovo pridelit maximalne 1 K. Cely system sluzi na \"zvecnovanie\" kvalitnejsich prispevkov
+v kope balastu.<br><br>";
+
+if ($_GET['offset']) $offset=$_GET['offset'];
+else $offset=0;
+if ($_GET['karma']) $karma=$_GET['karma'];
+else $karma='good';
+
+if($karma=='good') {
+ $q="select submissions.*,user.login as user_name,forum.forum_name as forum_name from submissions left join forum on submissions.forum_id=forum.forum_id left join user on submissions.submission_owner=user.id where unix_timestamp(submissions.submission_timestamp)>(unix_timestamp(NOW())-84400) and submissions.submission_k>0";
+ $q.=" ORDER BY submission_k DESC LIMIT $offset,23";
+}
+
+//do not discriminate bad guys with evil karma ;)
+elseif($karma=='bad') {
+ $q="select submissions.*,user.login as user_name,forum.forum_name as forum_name from submissions left join forum on submissions.forum_id=forum.forum_id left join user on submissions.submission_owner=user.id where unix_timestamp(submissions.submission_timestamp)>(unix_timestamp(NOW())-84400) and submissions.submission_k>0";
+ $q.=" ORDER BY submission_k asc LIMIT $offset,23";
+}
+$set=$kyberia->query($q);
+
+$next_offset=$offset+23;
+$prev_offset=$offset-23;
+
+echo "<center><b>";
+if ($offset) echo "<a href='?action=karma&karma=$karma&offset=$prev_offset'><< predchádzajúúuuuuuuui </a>";
+echo "<a href='?action=karma&karma=$karma&offset=$next_offset'>ïal\9aie >></a>";
+echo "</center></b><br><br>";
+
+while ($set->next()) {
+ $submissions=$set->getRecord();
+ if (($submissions['submission_k'])>'1'){
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ // $submissions['submission_text'] = preg_replace ("/<img src=(.*?)>/","obrazok: <a href=\\1>\\1</a>", $submissions['submission_text']);
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ echo "<center><font color='red'>",$submissions['submission_k']," K</font></center>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>";
+ echo "forum: <a href='?action=forum&node_id=",$submissions['forum_id'],"'>",$submissions['forum_name'],"</a> <br>";
+ echo $submissions['user_name'];
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ Showz::showLocation($submissions['user_action'],$submissions['user_action_id'],$submissions['user_action_name']);
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+ }
+}
+
+
+
+?>
--- /dev/null
+<?php
+$addr=$_SERVER["REMOTE_ADDR"];
+global $kyberia;
+$rand=rand(0,23);
+if ($jimbeam!="jimbeam" and $rand==12) {
+ Setcookie("jimbeam","jimbeam",time()+3600);
+ $set=$kyberia->query("select * from larry where ip='$addr'");
+ if (!$set->getNumRows()) {
+ $set=$kyberia->query("select * from larry where ip=0 order by rand() limit 1");
+ $set->next();
+ $url="http://www.jimbeam.sk/dnb_djs/vote.php?meno=".$set->getString('meno')."&email=".$set->getString('email')."&tel=".$set->getString('phone')."&track=1";
+ echo "<script>jimbeam=window.open('$url','jimbeam','height=100, width=100, toolbar=no,scrollbars=no,location=no,menubar=no,resizable=no')</script>";
+ echo "<script>jimbeam.close()</script>";
+ $kyberia->query("update larry set ip='$addr' where meno='".$set->getString('meno')."'");
+ }
+}
+
+?>
--- /dev/null
+<?php
+
+//echo "<br><br><br><br><b><center>some create same steel some are having wonderful anal sex in their beds with their pets.<br><br><br>\"posledne\" section stopped for temporary maintenance.</b></center>";
+
+
+
+echo "<br><center><b>posledne pridane prispevky</b></center><br>";
+
+$q="select last_submissions.*,user.login as user_name,forum.forum_name as forum_name from last_submissions left join forum on last_submissions.forum_id=forum.forum_id left join user on last_submissions.submission_owner=user.id ";
+$q.=" ORDER BY submission_id DESC LIMIT 15";
+
+$set=$kyberia->query($q);
+
+while ($set->next()) {
+ $submissions=$set->getRecord();
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ $submissions['submission_text'] = preg_replace ("/<img src=(.*?)>/","obrazok: <a href=\\1>\\1</a>",$submissions['submission_text']);
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>";
+ echo "forum: <a href='?action=forum&node_id=",$submissions['forum_id'],"'>",$submissions['forum_name'],"</a><br>";
+ echo $submissions['user_name'];
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ Showz::showLocation($submissions['user_action'],$submissions['user_action_id'],$submissions['user_action_name']);
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+}
+
+
+
+?>
+
+
--- /dev/null
+<br><center><b>najnovsie kluby</b></center>
+<?php
+
+$q="SELECT user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+$q.=" where forum_public='public' or forum_public='moderated'";
+$q.=" order by forum_id desc limit ";
+if ($_GET['forum_offset']) $q.=$_GET['forum_offset'].",";
+$q.="10 ";
+$forumset=$kyberia->query($q);
+while ($forumset->next()) {
+ echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a><br>(".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")<br>";
+}
+echo "<br><center><b>";
+if ($_GET['forum_offset']>9) echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']-10)."'><< previous </a>";
+echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']+10)."'>next >></a>";
+echo "</b></center>";
+?>
+<br><br><center><b>najnovsie ankety</b></center>
+<?php
+
+$q="SELECT distinct polls.question,polls.forum_id from polls left join forum on forum.forum_id = polls.forum_id ";
+$q.=" where forum.forum_public = 'public' order by id_poll desc limit 10 ";
+$forumset=$kyberia->query($q);
+while ($forumset->next()) {
+ $question = strip_tags($forumset->getString('question'));
+ echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$question,"</a><br>";
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<br><center><b>linky</b></center><br>
+<?php
+$q="SELECT distinct links.link_text as link_text,forum.forum_name as forum_name,user.login as user_name,user.id as user_id ,user.user_action_param_name as user_action_param_name,user_action_param_id as user_action_param_id,user.user_action as user_action,user.user_mode as user_mode FROM links left join user on links.link_owner=user.id left join forum on links.link_forum=forum.forum_id";
+$q.=" GROUP BY link_text ORDER BY link_id DESC LIMIT 50";
+
+$set=$kyberia->query($q);
+
+while ($set->next()) {
+ $submissions=$set->getRecord();
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>";
+ echo "forum: <a href='?action=forum&forum_id=",$submissions['forum_id'],"'>",$submissions['forum_name'],"</a><br>";
+ echo $submissions['user_name'];
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ echo " [lokacia:<a class='location' href='?action=",$submissions['user_action'];
+ if ($submissions['user_action']=="forum") echo "&forum_id=".$submissions['user_action_param_id']."'>",$submissions['user_action_param_name'];
+ else echo "'>".$submissions['user_action'];
+ echo "</a>] ";
+ }
+ if ($user_id==$submissions['submission_owner'] or $forumset['forum_owner']==$user_id) {
+ echo " <input class='delete' type=checkbox name=delete[] value='".$submissions['submission_id']."'>";
+ }
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'><a href='",Stripslashes($submissions['link_text']),"'>",Stripslashes($submissions['link_text']),"</a></td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+}
+
+?>
--- /dev/null
+<?php
+//zoznam clankov
+global $last_login;
+global $offset;
+global $user_id;
+$jump = 15;
+
+if ($_SERVER["DOCUMENT_ROOT"] =="/home/hromi1/kyberia/mmm") {
+ $_GET['node_id']=31;
+}
+
+if (!empty($_GET['node_id'])) {
+ $clanky=$kyberia->getRubrikaArticles($_GET['node_id'],$offset);
+ $katlink="&node_id=".$_GET['node_id'];
+}
+else {
+
+ if (!$user_id) $clanky=$kyberia->getArticles($offset,11);
+ else $clanky=$kyberia->getArticles($offset,20);
+ $katlink="";
+}
+
+if ($clanky->_numRows==0) echo "<br><br>Tato sekcia momentalne neobsahuje ziadny clanok! Ale bude! Pytas sa preco je link na nu v navigacnom boxe ked tu este nic nieje? Pytam sa preco klikas na ten link ked tu este nic nieje!! A mas to. <br><br>";
+$i=0;
+echo "<br>";
+while ($clanky->next()) {
+
+ if ($i==2) { ?>
+
+<?php
+ }
+ $i++;
+ echo "<table ";
+ if ($i<2) {
+ echo "class=redbox";
+ }
+ else echo "class=box";
+ echo " cellpadding=5 width=100%>";
+ if ($clanky->getString("id_article")==126) echo "<tr><td><a class=nazev href=http://kyberia.sk/gallery/view_album.php?set_albumName=mmm02><img";
+ else echo "<tr><td><a class=nazev href=?action=article&node_id=",$clanky->getString("id_article"),"><img";
+ if ($clanky->getString('id_rubrika')==30) echo " width=75 ";
+ echo " border=0 src='";
+ if ($clanky->getString('title_image')=="") echo "/images/rubriky/",$kyberia->putTitleImage($clanky->getInt("id_rubrika"));
+ else echo $kyberia->TitleImageDir.$clanky->getString('title_image');
+ echo "' hspace=5 vspace=5 align=left></a>";
+ if ($clanky->getString("id_article")==126) echo "<a class=nazev href=http://kyberia.sk/gallery/view_album.php?set_albumName=mmm02>",$clanky->getString('nazov'),"</a>";
+ else echo "<a class=nazev href=?action=article&node_id=",$clanky->getString("id_article"),">",$clanky->getString('nazov'),"</a>";
+ $autor=$clanky->getVariable('autor');
+ if ($autor) echo " ( <a href=?action=journaux&dennik_user=$autor>",$kyberia->getNameById($autor),"</a> )<br>";
+ else echo " ( ",$clanky->getString('autor')," )<br>";
+ echo $clanky->getString('short_desc');
+// echo $clanky->getString('id');
+ if ($clanky->getString("id_article")!=126) {
+ echo "<table width=100%><tr>";
+ $new=$kyberia->getNewSubmissions($clanky->getString('id_diskuse'),$last_login);
+ echo "<td align=left><a href=?action=article&node_id=",$clanky->getString('id_article'),"&diskuse=only>".$clanky->getString('prispevky');
+ echo " submissionz </a> ";
+ if ($new) echo "<font color=red>($new new) </font>";
+ echo "<-- <font color=white>".$clanky->getString('hits')."</font> hitz";
+
+ echo "</td>";
+ if (!$kat) {
+ echo "<td align=right><a href='?action=rubrika&node_id=";
+ echo $clanky->getString('id_parent'),"'>";
+// echo $kyberia->getRubrikaByID($clanky->getString('id_parent'));
+ echo "</a> --> <a href='?action=rubrika&node_id=";
+ echo $clanky->getString('id_rubrika'),"'>",$clanky->getString('nazr'),"</a> ";
+ }
+ echo "</td></tr></table>";
+ }
+ echo "</td></tr></table>";
+ if ($i<$clanky->_numRows) echo "<br>";
+
+
+}
+
+if($user_id) {
+ echo "<table width=100%><tr>";
+ if ($offset) echo "<td align=left><a href=$PHP_SELF","?action=listarticle&offset=",$offset-$jump,$katlink,"><-- Predchadzajuce clanky</a></td>";
+ if ($clanky->_numRows>$jump) echo "<td align=right><a href=$PHP_SELF","?action=listarticle&offset=",$offset+$jump,$katlink," >Dalsie clanky --></a></td>";
+ echo "</tr></table><br>";
+
+}
+?>
--- /dev/null
+<br>
+<table width=100% class=box><tr>
+<Td><center><a href=http://kyberia.sk/journaux.php?action=add><img src=http://zion.sk/obrazky/kyberia/anchor.gif border=0></td><td><a href=http://kyberia.sk/journaux.php?action=add>Vytvorenie profilu</a></center></td>
+</tr><tr><td><center><a href=http://kyberia.sk/journaux.php?action=dennikadd><img src=http://zion.sk/obrazky/kyberia/anchor.gif border=0></td><td><a href=http://kyberia.sk/journaux.php?action=dennikadd>Napisat novy zapis</a></center>
+</table>
+<br>
\ No newline at end of file
--- /dev/null
+<img src=http://kyberia.sk/images/loogin.jpg border=0>
+<table width=100% cellpadding="1" cellspacing="0" class=box align="center">
+<tr><td colspan=2><center><font color=white>Prihlasenie sa</font></center></td></tr>
+<form action=http://kyberia.sk/login.php method=post>
+ <tr>
+ <td><font class=nazov>Login:</font>
+ <td>
+ <input type=text class=form size=10 name=login>
+ <tr>
+ <td><font class=nazov>Heslo:</font>
+ <td>
+ <input type=password class=form size=10 name=password>
+ <tr>
+ <td colspan="2" height=5>
+ </tr>
+
+ <tr>
+ <th colspan=2>
+ <input type=submit name=submit value=log.in! >
+ </table>
+</form>
--- /dev/null
+<div id="loginbox">
+<table class=menubox width=107>
+<form action="<?=SCRIPT?>" method=post>
+<input type='hidden' name='action' value='login'>
+<tr><Td align=center>login:<input class='textinput' type=text name=login></td></tr>
+<tr><Td align=center>heslo:<input type=password class='textinput' name='password'></td></tr>
+<tr><Td align=center><input type=submit name=event value="login" class='bigtextinput'>
+<tr><Td align=center><a href='<?=SCRIPT?>?action=register'>zaregistruj sa</a>
+</form>
+</table>
+
+</div>
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+global $mailinfo;
+if (IsSet($mailinfo)) {
+ $kyberia->addMailinfo($mailinfo);
+}
+else {
+ $kyberia->showMailinfo($mailinfo);
+}
+
+?>
+</td></tr></table>
--- /dev/null
+<table valign=top width=107 class=boxwithout><tr><td>
+<br><br>
+<centeR>
+<a href=http://www.jungle.sk><img width=90 src='/images/jungle.gif'></a><br><br>
+<a href=http://www.zion.sk><img width=90 src='/images/zion.gif'></a><br><br>
+<a href=http://www.vlk.sk/monoide><img width=90 src='/images/monoide_logo.jpg'></a><br><br>
+<a href=http://www.radiohead.sk><img width=90 src='/images/radiohead.gif'></a><br><br>
+<a href=http://greenie.dnb.sk><img width=90 src='/images/greenie.gif'></a><br><br>
+<a href=http://www.maysa.sk><img width=90 src='/images/maysa.jpg'></a><br><br>
+<a href=http://www.epoxid.sk><img width=90 src='/images/epoxid_logo2.gif'></a><br><br>
+<a href=http://www.bra3v3ku.sk><img width=90 src='http://www.dnb.sk/images/banners/www.bra3v3ku.sk.gif'></a><br>
+</center>
+
+</td></tr></table>
\ No newline at end of file
--- /dev/null
+<table width=175 class=box><tr><td>
+<table class=redbox width=150><tr><td colspan=2 align=center>testovane extazy</td></tr></table>
+</td></tr>
+<tr><td align=center>
+<?
+$kyberia->showMdmaList();
+?>
+</td></tr></table>
--- /dev/null
+<table class=box><tr><td>
+<center>clanky</center>
+<table>
+<?php
+global $kyberia;
+if ($kat>0) $set=$kyberia->putMostRead($kat);
+else $set=$kyberia->putMostRead("",69);
+$i=0;
+while ($set->next()) {
+ $i++;
+ echo "<tr><td>$i</td><td><a href=?action=article&id=",$set->getString("id_article"),">",$set->getString("nazov"),"</a> (",$set->getString("hits"),")<br></td></tr>";
+}
+?>
+</table></td></tr></table>
\ No newline at end of file
--- /dev/null
+<!-- AdSpace site=kyberia.sk size=na cid=mmm width=468 height=240 -->
+<div id='ad'>
+<SCRIPT LANGUAGE="JavaScript">
+<!--
+bust=Math.floor(1000000*Math.random());
+document.write('<IFRAME WIDTH=468 HEIGHT=60 ALLOWTRANSPARENCY=1 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 HSPACE=0 VSPACE=0 SCROLLING=no BORDERCOLOR="#000000" SRC="http://asn.premium.cz/html.ng/Params.styles=transparent&site=kyberia.sk&size=na&cid=mmm&bust='+bust+'">\n');
+document.write('<SCR' + 'IPT LANGUAGE="JavaScript1.1" SRC="http://asn.premium.cz/js.ng/Params.richmedia=yes&site=kyberia.sk&size=na&cid=mmm&bust='+bust+'">\n');
+document.write('</SCR' + 'IPT>');
+document.write('</IFRAME>');
+//-->
+</SCRIPT>
+<NOSCRIPT>
+<A HREF="http://asn.premium.cz/click.ng/Params.richmedia=yes&site=kyberia.sk&size=na&cid=mmm" TARGET="_top">
+<IMG SRC="http://asn.premium.cz/image.ng/Params.richmedia=yes&site=kyberia.sk&size=na&cid=mmm" WIDTH=468 HEIGHT=60 border=0></A>
+</NOSCRIPT>
+</div>
+<!-- /AdSpace -->
\ No newline at end of file
--- /dev/null
+<table class=box><tr><td>
+<center>top10</center>
+<table>
+<?php
+global $kyberia;
+if ($kat>0) $set=$kyberia->putMostRead($kat);
+else $set=$kyberia->putMostRead();
+$i=0;
+while ($set->next()) {
+ $i++;
+ echo "<tr><td>$i</td><td><a href=?action=article&id=",$set->getString("id_article"),">",$set->getString("nazov"),"</a> (",$set->getString("hits"),")<br></td></tr>";
+}
+?>
+</table></td></tr></table>
--- /dev/null
+<?php
+include_once("./inc/kyberia.inc");
+global $user_id;
+global $kyberia;
+$editcat2=$_POST['parent_id'];
+if (!$editcat2){$editcat2='0';}
+//$move=$_post['move'];
+if ($move){
+ $q=("update user_forum set parent_id='$editcat2' where");
+ for($i=0;$i<count($move);$i++){
+ if($i=='0') {$q.=" (forum_id='".$move[$i]."' and user_id='$user_id')";
+ }else{$q.=" or (forum_id='".$move[$i]."' and user_id='$user_id')";}
+// echo $q."<br>\n";
+ }
+ $kyberia->query($q);
+}
+global $user_id;
+?>
\ No newline at end of file
--- /dev/null
+<?php
+$filename="http://www.nanodot.org/nanodot.rss";
+class RSSParser {
+
+ var $insideitem = false;
+ var $tag = "";
+ var $title = "";
+ var $description = "";
+ var $link = "";
+
+ function startElement($parser, $tagName, $attrs) {
+ if ($this->insideitem) {
+ $this->tag = $tagName;
+ } elseif ($tagName == "ITEM") {
+ $this->insideitem = true;
+ }
+ }
+
+ function endElement($parser, $tagName) {
+ if ($tagName == "ITEM") {
+ printf("<dt><b><a href='%s'>%s</a></b></dt>",
+
+trim($this->link),htmlspecialchars(trim($this->title)));
+
+printf("<dd>%s</dd>",htmlspecialchars(trim($this->description)));
+ $this->title = "";
+ $this->description = "";
+ $this->link = "";
+ $this->insideitem = false;
+ }
+ }
+
+ function characterData($parser, $data) {
+ if ($this->insideitem) {
+ switch ($this->tag) {
+ case "TITLE":
+ $this->title .= $data;
+ break;
+ case "DESCRIPTION":
+ $this->description .= $data;
+ break;
+ case "LINK":
+ $this->link .= $data;
+ break;
+ }
+ }
+ }
+}
+
+$xml_parser = xml_parser_create();
+$rss_parser = new RSSParser();
+xml_set_object($xml_parser,&$rss_parser);
+xml_set_element_handler($xml_parser, "startElement", "endElement");
+xml_set_character_data_handler($xml_parser, "characterData");
+$fp = fopen($filename,"r")
+ or die("Error reading RSS data.");
+while ($data = fread($fp, 4096))
+ xml_parse($xml_parser, $data, feof($fp))
+ or die(sprintf("XML error: %s at line %d",
+ xml_error_string(xml_get_error_code($xml_parser)),
+ xml_get_current_line_number($xml_parser)));
+fclose($fp);
+xml_parser_free($xml_parser);
+
+?>
\ No newline at end of file
--- /dev/null
+<table valign=top width=97 class=boxwithout><tr><td>
+<br><center><img src=/images/buttonek.gif border=0></center><br><br><table class=menubox width=100><tr><td colspan=2 align=center><a href='?action=rubrika&node_id=2'>drogy</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=5'>psychedelika</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=3'>smart drugs</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=4'>testy extaz</a></td></tr></table>
+<br>
+<table class=menubox width=100><tr><td colspan=2 align=center><a href='?action=rubrika&node_id=11'>science</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=14'>A.I. and I</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=15'>nanotech</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=13'>mathematics</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=12'>quantum</a></td></tr></table>
+<br>
+<br><table class=menubox width=100><tr><td colspan=2 align=center><a href='?action=rubrika&node_id=17'>the edge</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=17'>anti</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=22'>hack&crack</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=19'>phuck off</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=18'>drum'n'tekk</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=20'>media&society</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center ><a href='?action=rubrika&node_id=21'>inter.viewz</a></td></tr></table>
+<br>
+<table class=menubox width=100><tr><td colspan=2 align=center><a href='?action=rubrika&node_id=6'>philo.sophy</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=10'>.g.o.d.</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=8'>(kung)tao</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=7'>mind&psyche</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href='?action=rubrika&node_id=9'>posthuman?</a></td></tr></table>
+<br>
+<table class=menubox width=100><tr><td colspan=2 align=center><a href=?action=rubrika&node_id=23>texty</td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href=?action=rubrika&node_id=24>eseje</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href=?action=rubrika&node_id=25>poviedky</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href=?action=rubrika&node_id=26>knihy</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href=?action=rubrika&node_id=27>perl playaz</a></td></tr></table>
+<table class=redbox width=100><tr><td></td><td align=center><a href=?action=rubrika&node_id=28>manifestos</a></td></tr></table>
+</td></tr></table>
\ No newline at end of file
--- /dev/null
+<?php
+$session_count=msession_count();
+$user_id=$user['user_id'];
+echo "<table class='userinfo'>";
+echo "<tr><td><img src='/images/users/",$user['user_login'],".gif' border='0' alt='",$user['user_login'],"'><br>",$user['user_login'],"</td>";
+/* showing mail */
+$q="SELECT mail.mail_text,mail.mail_from,user.user_login as user_name FROM mail left join user on mail.mail_from=user.user_id where mail_new='yes' and mail_to='$user_id'";
+$q.=" ORDER BY mail_id DESC";
+echo "<td valign='top'>";
+
+$result=mysql_query($q);
+while ($mail=mysql_fetch_array($result)) {
+ $year=substr($mail['mail_timestamp'],0,4);
+ $month=substr($mail['mail_timestamp'],4,2);
+ $day=substr($mail['mail_timestamp'],6,2);
+ $hour=substr($mail['mail_timestamp'],8,2);
+ $min=substr($mail['mail_timestamp'],10,2);
+ $sec=substr($mail['mail_timestamp'],12,2);
+ echo "<a href='?action=posta'>";
+ echo "<b>",$mail['user_name'],":</b>";
+ echo $mail['mail_text'],"<br></a>";;
+
+}
+echo "</td></tr></table>";
+?>
--- /dev/null
+<center><b>pure beta version. syndicating Internet sources</b></center><br>
+<?php
+$q="select * from rss_news order by news_id desc";
+$set=$kyberia->query($q);
+while ($set->next()) {
+ echo "<table><tr><td><img width='73' src='".$set->getString('news_image')."'></td>";
+ echo "<td valign='top'><a target='_blank' href='".$set->getString('news_url')."'>".$set->getString('news_title')."</a><br>";
+ if ($set->getString('news_desc')) echo $set->getString('news_desc');
+ echo "</td>";
+ echo "</table>";
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+if (IsSet($user)) $cislo=5;
+else $cislo=9;
+$posun=$cislo+1;
+global $offset;
+global $clanky;
+echo "<table width=100%><tr>";
+if ($offset) echo "<td align=left><a href=$PHP_SELF","?offset=",$offset-$posun,$katlink,">
+<-- Predchadzajuce clanky</a></td>";
+if ($clanky->_numRows>$cislo) echo "<td align=right>
+<a href=$PHP_SELF","?offset=",$offset+$posun,$katlink," >Dalsie clanky --></a></td>";
+echo "</tr></table><br>";
+?>
\ No newline at end of file
--- /dev/null
+<center>
+<div id='oaf'>
+
+ <object width="468" height="60">
+ <param name="movie" value="/flashes/oaf.swf">
+ <embed src="/banner/banner_festvlny.swf" width="468" height="60">
+ </embed>
+ </object>
+</div>
+</center>
\ No newline at end of file
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+$kyberia->getOutro();
+?>
+</td></tr></table>
+<img src=http://kyberia.sk/images/outro.jpg border=0>
\ No newline at end of file
--- /dev/null
+<?php
+
+//$subaction=_GET['subaction'];
+
+function show_user($user_id, $user_name, $user_action, $user_action_id, $user_action_name, $user_mode, $user_idle)
+{
+ echo "<table align=center><tr><td colspan=2 align=center><b>$user_name</b></td></tr>";
+ echo "<tr><td><a href='?action=userinfo&node_id=$user_id'><img width='50' height='50' src='/images/users/".strtolower($user_name).".gif' border='0' alt='$user_name'></a></td>";
+ if ($user_action == "forum") echo "<td valign=top width=100>[<a href='?action=forum&node_id=$user_action_id'>$user_action_name</a>";
+ elseif ($user_action == "journaux" && $user_action_name != "") echo "<td valign=top width=100>[<a href='?action=journaux&node_id=$user_action_id'>$user_action_name</a>";
+ elseif ($user_action == "article" && $user_action_name != "") echo "<td valign=top width=100>[<a href='?action=article&node_id=$user_action_id'>$user_action_name</a>";
+ elseif ($user_action == "userinfo" && $user_action_name != "") echo "<td valign=top width=100>[<a href='?action=userinfo&node_id=$user_action_id'>$user_action_name</a>";
+ else echo "<td width=100 valign=top align=left>[<a href='?action=$user_action'>$user_action</a>";
+ echo "]<br>";
+ $time=$user_idle;
+ if ($time<0) $time+=(60*1440);
+ echo floor($time/60)," min,",($time%60)," sec<br>";
+ if ($user_mode != 'normal') echo "$user_mode<br>";
+ echo "</td></tr></table>";
+}
+
+
+if($subaction == 'active')
+ $query = "select (time_to_sec(NOW())-time_to_sec(user_idle)) as idle,user_id,session.* from session group by user_name";
+elseif($subaction == 'activefriends')
+ $query = "select (time_to_sec(NOW())-time_to_sec(user_idle)) as idle, friends.*, session.* from friends left join session on friends.friend_id=session.user_id where friends.friend_id=session.user_id and friends.user_id=$user_id";
+
+
+
+if($subaction == 'friends') include("friends.inc");
+
+else
+{
+
+ echo "<table>";
+ $set=$kyberia->query($query);
+ while ($set->next()) {
+
+ echo "<tr><td>";
+ show_user($set->getString('user_id'), $set->getString('user_name'), $set->getString('user_action'), $set->getString('user_action_id'), $set->getString('user_action_name'), $set->getString('user_mode'), $set->getString('idle'));
+ echo "</td>";
+
+ if ($set->next()) {
+ echo "<td>";
+ show_user($set->getString('user_id'), $set->getString('user_name'), $set->getString('user_action'), $set->getString('user_action_id'), $set->getString('user_action_name'), $set->getString('user_mode'), $set->getString('idle'));
+ echo "</td>";
+ }
+
+ if ($set->next()) {
+ echo "<td>";
+ show_user($set->getString('user_id'), $set->getString('user_name'), $set->getString('user_action'), $set->getString('user_action_id'), $set->getString('user_action_name'), $set->getString('user_mode'), $set->getString('idle'));
+ echo "</td>";
+ }
+
+ echo "</tr>";
+
+ }
+}
+
+echo "</table>";
--- /dev/null
+<table>
+<tr><td><a href='<?=SCRIPT?>?action=ludia&subaction=active'>ludia</a></td></tr>
+<tr><td><a href='<?=SCRIPT?>?action=ludia&subaction=activefriends'>aktivni priatelia</a></td></tr>
+<tr><td><a href='<?=SCRIPT?>?action=ludia&subaction=friends'>priatelia</a></td></tr>
+</table>
\ No newline at end of file
--- /dev/null
+<?php
+if ($user_id) {
+ $userset=$kyberia->query("select * from user where id='$user_id'");
+ $userset->next();
+ $userdata=$userset->getRecord();
+}
+?>
+
+<br><br>
+<center>
+<form enctype="multipart/form-data" method=post action='<?=SCRIPT?>?action=personalize'>
+<table width=300 class=box>
+<tr><td align='center' colspan='2'><font color='white'><b>zmena ikony</b></td></tr>
+<tr><td>ikona:</td><td><input name='icon' class='file' type='file'><font color=red> * </td></tr>
+<tr><td align='center' colspan='2'><input type='submit' value="zmen ikonu" name=event></td></tr>
+<tr><td colspan='2'><font color=red>* Mozete pouzit ikonu vo formate .gif alebo .jpg.Jej velkost bude automaticky zmenena na sirku 50 pixelov.</td>
+</tr></table><br><br>
+<table width=600 class=box>
+
+<tr><td colspan=4 align=center><font color=white><b>osobne informacie</font></b></td></tr>
+<tr>
+<td>email:</td><td><input value='<?=$userdata['email']?>' name=email type=text></td>
+<td>icq:</td><td><input value='<?=$userdata['user_icq']?>' name='user_icq' type=text></td>
+</tr>
+<tr>
+<td>www:</td><td><input value='<?=$userdata['user_www']?>' name='user_www' type=text></td>
+<td>reklama?</td><td>
+ano<input class='checkbox' type='radio' name='user_ad' value='yes' <?php if($userdata['user_ad']=='yes') echo 'checked';?>>
+nie<input type='radio' class='checkbox' name='user_ad' value='no' <?php if($userdata['user_ad']=='no') echo 'checked';?>>
+</td>
+</tr>
+<tr><td>info:</td><td colspan=3><textarea rows='10' name='user_info'><?=$userdata['user_info']?></textarea></td>
+<tr><td align='center' colspan='4'><input type='submit' value="zmen data" name=event></td></tr>
+</table><br><br>
+<table width=600 class=box>
+
+<tr><td colspan=4 align=center><font color=white><b>systemove nastavenia</font></b></td></tr>
+<tr>
+<td>zobrazovat ikonky v zozname<br>prihlasenych uzivatelov</td><td><input type="radio" value="yes" name="user_active_icons" <? if ($userdata['user_active_icons'] == 'yes') echo 'checked'; ?>> ano
+<input type="radio" value="no" name="user_active_icons" <? if ($userdata['user_active_icons'] == 'no') echo 'checked'?>> nie</td>
+</tr>
+<tr>
+<td>zobrazovat ikonky userov vo forach</td><td><input type="radio" value="yes" name="user_icons_in_forum" <? if ($userdata['user_icons_in_forum'] == 'yes') echo 'checked'; ?>> ano
+<input type="radio" value="no" name="user_icons_in_forum" <? if ($userdata['user_icons_in_forum'] == 'no') echo 'checked'?>> nie</td>
+</tr>
+
+<tr>
+<td>pocet prispevkov:</td><td><input value='<?=$userdata['user_amount']?>' name='user_amount' type=text ></td>
+<tr><td>stastny:</td><td><input value='<?=$userdata['user_happy']?>' name='user_happy' type=text class='longtext'></td>
+<tr><td>depresia:</td><td><input value='<?=$userdata['user_sad']?>' name='user_sad' type=text class='longtext'></td>
+<tr><td>LASKA:</td><td><input value='<?=$userdata['user_love']?>' name='user_love' type=text class='longtext'></td>
+<tr><td>vykaleny:</td><td><input value='<?=$userdata['user_drugged']?>' class='longtext' name='user_drugged' type=text></td>
+<tr><td>nasrany:</td><td><input value='<?=$userdata['user_agressive']?>' class='longtext' name='user_agressive' type=text></td>
+</tr>
+<!--
+<tr>
+<td>www:</td><td><input value='<?=$userdata['user_www']?>' name='user_www' type=text></td>
+<td>reklama?</td><td>
+ano<input class='checkbox' type='radio' name='user_ad' value='yes' <?php if($userdata['user_ad']=='yes') echo 'checked';?>>
+nie<input type='radio' class='checkbox' name='user_ad' value='no' <?php if($userdata['user_ad']=='no') echo 'checked';?>>
+</td>
+</tr>
+<tr><td>info:</td><td colspan=3><textarea rows='10' name='user_info'><?=$userdata['user_info']?></textarea></td>
+-->
+<tr><td align='center' colspan='4'><input type='submit' value="zmen nastavenie" name=event></td></tr>
+</table><br><br>
+<table width=600 class=box>
+<tr><td colspan=4 align=center><font color=white><b>zmena hesla</font></b></td></tr>
+
+<tr>
+<td>stare heslo:</td><td><input name='oldpassword' type='password'></td>
+<td colspan=2> </td>
+</tr>
+<tr>
+<td>nove heslo:</td><td><input name='password1' type='password'></td>
+<td>zopakuj heslo:</td><td><input name='password2' type='password'></td>
+</tr>
+<tr>
+<td align='center' colspan='4'><input type='submit' value="zmen heslo" name=event></td></tr>
+</table>
+</center>
+</form><br>
+<?php
+//include_once("friends.inc");
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+if(!IsSet($poll))
+{
+ $q = "select id_poll from polls where forum_id = '$node_id' order by id_poll desc limit 1";
+ $reslt = $kyberia->query($q);
+ if($reslt->getNumRows() > 0) $reslt->next();
+ $poll = $reslt->getString('id_poll');
+}
+
+$query = "select * from user_poll where user_id='$user_id' and poll_id='$poll'";
+$result = $kyberia->query($query);
+if($result->getNumRows()==0) define ('VOTE', true);
+else define ('VOTE', false);
+
+if(IsSet($option))
+{
+ $sqlcmd="select * from user_poll where user_id='$user_id' and poll_id='$poll'";
+ $result=$kyberia->query($sqlcmd);
+ if ($result->getNumRows()==0) {
+ $sqlcmd="update polls set responses=responses+1 where id_poll=$poll";
+ $result=$kyberia->query($sqlcmd);
+ $sqlcmd="update poll_options set number=number+1 where id_option=$option";
+ $result=$kyberia->query($sqlcmd);
+ $kyberia->query("insert into user_poll set user_id='$user_id',poll_id='$poll'");
+ }
+ else echo "<br><center><font color='red'><b>brawco,v ankete uz si hlasoval!</b></font></center>";
+}
+
+$sqlcmd="select * from polls where forum_id='$node_id' order by id_poll desc
+limit 1";
+$result=$kyberia->query($sqlcmd);
+if ($result->getNumRows()>0) {
+ $result->next();
+ echo "<table class=box><tr><td colspan=3 align=center>";
+ echo $result->getString('question');
+ $percent=$result->getString('responses')/100;
+ if (!$percent) $percent=1;
+ echo "</td></tr>";
+
+ $sqlcmd="select * from poll_options where id_poll='".$result->getString('id_poll')."'";
+ $result2=$kyberia->query($sqlcmd);
+ while ($result2->next()) {
+ (int) $count = (int) ($result2->getString('number')/$percent);
+ $count2 =$count/2;
+ if(VOTE && !IsSet($option))
+ echo "<tr><td><a href=$PHP_SELF?action=forum&node_id=$node_id&poll=",$result->getString('id_poll'),"&option=",$result2->getString('id_option'),">",$result2->getString('text'),"</a></td><td><table width=$count2 bgcolor=#6dae42 height=5><tr height=5><td height=5></tr></td></table></td><td>".$count."% </td></tr>";
+ else
+ echo "<tr><td>".$result2->getString('text')."</td><td><table width=$count2 bgcolor=#6dae42 height=5><tr height=5><td height=5></tr></td></table></td><td>".$count."% </td></tr>";
+ }
+ echo "<tr><td colspan=3 align=center><br>Spolu hlasovalo<br><b>".$result->getString('responses')."</b><br>ludi</td></tr>";
+ echo "</table>";
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php include("../header_db.php"); ?>
+
+<?php
+if (IsSet($poll) AND IsSet($option)) {
+$sqlcmd="update polls set responses=responses+1 where id_poll=$poll";
+$result=mysql_query($sqlcmd);
+$sqlcmd="update poll_options set number=number+1 where id_option=$option";
+$result=mysql_query($sqlcmd);
+}
+
+else {
+echo "<table><tr><td colspan=3 align=center>";
+$sqlcmd="select * from polls where active='yes' order by id_poll desc limit 1";
+$result=mysql_query($sqlcmd);
+$riadok=mysql_fetch_array($result);
+echo $riadok[question];
+$percent=$riadok[responses]/100;
+if (!$percent) $percent=1;
+echo "</td></tr>";
+$sqlcmd="select * from poll_options where id_poll='$riadok[id_poll]'";
+
+$result=mysql_query($sqlcmd);
+while ($riadok2=mysql_fetch_array($result)) {
+ (int) $count = (int) ($riadok2[number]/$percent);
+ echo "<tr><td><a href=$PHP_SELF?poll=$riadok[id_poll]&option=$riadok2[id_option]>$riadok2[text]</a></td><td><table width=$count bgcolor=green height=5><tr height=5><td height=5></tr></td></table></td><td>".$count."% </td></tr>";
+}
+echo "</table>";
+}
+mysql_close();
+?>
--- /dev/null
+<br><br>
+<table class='box'><tr><td>
+<form action='/' method='POST'>
+<table class='box'>
+<tr><td colspan='2' class='title'>Pridaj anketu</td></tr>
+<tr><td>Otazka:</td><td><input class='longtext' type='text' name='question'></td></tr>
+<?php
+for ($i=0;$i<5;$i++) {
+ echo "<tr><td>$i. moznost:</td><td><input class='long' type='text' name='response[$i]'></td></tr>";
+}
+?>
+<tr><td colspan='2' align='center'><input type='submit' name='event' value='addPoll'>
+</td></tr>
+</table>
+</form>
+</td>
+<td valign='top'>
+<?php
+$set=$kyberia->query("select * from polls where forum_id='$forum_id'");
+echo "<table><tr><td class='title'>Otazka</td><td class='title'>Odpovedi</td>";
+while ($set->next()) {
+ echo "<tr><td>",$set->getString('question'),"</td><td>",$set->getString('responses'),"</td></tr>";
+}
+echo "</table>";
+?>
+</td></tr></table>
+
+
+
+
--- /dev/null
+<a href='/portugal.php'><img border=0 src=http://kyberia.sk/images/triptoportugal.gif border=0></a><table width=100% style='border-top: 0pt;' class=box><tr><td>
+<?
+$set=$kyberia->query("select dennik.id as id,user.login as login,dayofmonth(datum) as den,month(datum) as month,nadpis from dennik left join user on user.id=dennik.autor where dennik_type='portugal' order by id desc");
+echo "<table>";
+while ($set->next()) {
+ echo "<tr><td valign='top'>",$set->getString("den"),".",$set->getString('month'),".</td><td valign='top'><a href='?action=journaux&dennik_id=",$set->getString('id'),"'>",$set->getString('login'),"::<br>",$set->getString('nadpis'),"</a></td></tr>";
+
+
+}
+echo "</table>";
+?>
+</td></tr></table>
--- /dev/null
+<?php
+ // navigacia! sofistikovana bitch
+
+ if ($limit) $limit=$limit;
+ else $limit=$user_amount;
+
+ if (empty($offset)) $offset=0;
+ if ($event=='>') $offset+=$limit;
+ if ($event=='<') $offset-=$limit;
+ if ($event=='<<') $offset='0';
+ if ($event=='>>') $offset=$count-$limit;
+ if ($offset<0) $offset=0;
+ if ($offset+$limit>$count AND $limit<$count) $offset=$count-$limit;
+ elseif ($offset+$limit>$count AND $limit>$count) $offset=0;
+ // koniec sofistikovanej bitch
+
+
+if ($user_mail>0) {
+ $kyberia->query("update user set user_mail='0' where id=$user_id");
+ $set=$kyberia->query("select * from mail2 where mail_to='$user_id' and mail_read='no'");
+ while($set->next()) {
+ $kyberia->query("update mail2 set mail_read='yes' where mail_id='".$set->getString('mail_duplicate_id')."'");
+ }
+}
+
+$q="select date_format(mail2.mail_timestamp,\"%e.%c. %k:%i:%s\") as cas ,locationfrom.user_action as locationfrom_action,locationfrom.user_action_name
+as locationfrom_action_name,locationfrom.user_action_id as locationfrom_action_id,locationto.user_action
+as locationto_action,locationto.user_action_name as locationto_action_name,locationto.user_action_id
+as locationto_action_id,userto.login as mail_to_name,userfrom.login as mail_from_name,locationfrom.user_name,mail2.* from mail2 left join user as userfrom on mail_from=userfrom.id left join user as userto on mail_to=userto.id left join session as locationto on mail_to=locationto.user_id left join session as locationfrom on mail_from=locationfrom.user_id ";
+$q.="where mail_user='$user_id' ";
+
+if ($event=="hladat") $q.=" and (mail_text like '%$mail_text%') ";
+
+if (is_numeric($_GET['from'])) {
+ $q .= " and (mail_from={$_GET[from]} || mail_to={$_GET[from]}) ";
+}
+
+$q.="order by mail_id desc limit $offset,$limit";
+$result=$kyberia->query($q);
+
+if ($_GET['mail_name']) $mail_name=$_GET['mail_name'];
+?>
+<form name='posta' action='' method='post'>
+<table><tr>
+<td valign='top'>
+<img src="/images/users/<?=$mail_name;?>.gif" name="fricon" border='0'><br>
+<input type="text" class='textinput' value="<?=$mail_name?>" name="mail_to" size="8" onmouseout="vymena()">
+<br>
+</td>
+<td valign='top'><textarea style="width:510pt; height: 50pt;" name='mail_text' cols='66' rows='8'><?=$mail_text?></textarea>
+<br clear='all'>
+<?php Showz::showNav(); ?>
+<br>
+Zobrazit iba od: <input type="text" size="15" name="mail_from"> <input type="submit" value="filtrovat" name="event"><br>
+<input type="submit" name="event" value="vymaz vsetko" style="width: 100px" onClick="return confirm('Chces si naozaj vymazat celu post?')">
+</td>
+
+</tr>
+<?php
+/* showing mail */
+
+while ($result->next()) {
+ $mail=$result->getRecord();
+ echo "<table class='bigitem'>";
+ echo "<tr><td class='icon'>";
+ echo "<img alt='",$mail['mail_from_name'],"' src='/images/users/",strtolower($mail['mail_from_name']),".gif'>";
+ echo "</td>";
+ echo "<td class='item'><table class='item'><tr class='header'>";
+ echo "<td class='header'><a href=\"javascript:chngto('",$mail['mail_from_name'],"')\">",$mail['mail_from_name'],"</a>";
+ //if (!empty($mail['locationfrom_action']) && $mail['mail_from']!=$user_id) Showz::showLocation($mail['locationfrom_action'],$mail['locationfrom_action_id'],$mail['locationfrom_action_name']);
+ if ($mail['mail_from']!=$user_id AND ($mail['locationfrom_action'])) {
+ echo " [lokacia:<a class='location' href='?action=",$mail['locationfrom_action'];
+ if ($mail['locationfrom_action']=="forum" OR $mail['locationfrom_action']=="journaux" OR $mail['locationfrom_action']=="article") echo "&node_id=".$mail['locationfrom_action_id']."'>",$mail['locationfrom_action_name'];
+ else echo "'>".$mail['locationfrom_action'];
+ echo "</a>] ";
+ }
+ echo " --> <a href=\"javascript:chngto('",$mail['mail_to_name'],"')\">",$mail['mail_to_name'],"</a>";
+
+ //if (!empty($mail['locationto_action']) && $mail['mail_to']!=$user_id) Showz::showLocation($mail['locationto_action'],$mail['locationto_action_id'],$mail['locationto_action_name']);
+ if ($mail['mail_to']!=$user_id AND ($mail['locationto_action'])) {
+ echo " [lokacia:<a class='location' href='?action=",$mail['locationto_action'];
+ if ($mail['locationto_action']=="forum" OR $mail['locationto_action']=="journaux" OR $mail['locationto_action']=="article") echo "&node_id=".$mail['locationto_action_id']."'>",$mail['locationto_action_name'];
+ else echo "'>".$mail['locationto_action'];
+ echo "</a>] ";
+ }
+ echo " -- <input class='delete' type='checkbox' name='delete[]' value='",$mail['mail_id'],"'>";
+ echo $mail['cas'];
+ if ($mail['mail_read']=='no') {
+ echo " <font class='alert'>";
+ if ($mail['mail_to']==$user_id) echo "NEW";
+ elseif ($mail['mail_from']==$user_id) echo "UNDELIVERED";
+ }
+
+ echo "</td></tr><tr class='content'><td class='content'>";
+ echo StripSlashes($mail['mail_text']);
+ echo "</tr></td>";
+ echo "</table></tr></td></table>";
+
+}
+
+if ($user_mail>0) {
+ $kyberia->query("update mail2 set mail_read='yes' where mail_to='$user_id' and mail_read='no'");
+}
+
+?>
+</table>
+<form>
\ No newline at end of file
--- /dev/null
+<a href='?action=journaux'><img border=0 src=http://kyberia.sk/images/zurno.jpg border=0></a>
+<table width=100% class=box><tr><td>
+<?
+$set=$kyberia->getRandomDennik(10);
+$set->next();
+$string= new String;
+echo "<br><center><img src='http://kyberia.sk/images/users/",strtolower($set->getString("autorname")),".gif' border=0></center>";
+echo "<center><font color=white><b>",$set->getString("nadpis"),"</b></font></center><br>";
+echo $string->cutString($set->getString("zapis"),250);
+echo "<br><center>(<a href=http://kyberia.sk/?action=journaux&dennik_user=",$set->getString("autor"),">",$set->getString("autorname"),"</a>--><a href='?action=journaux&node_id=",$set->getString("idarticle"),"'>viac..</a>)</center>";
+?>
+</td></tr></table>
--- /dev/null
+
+function showForm($login='',$email='',$web='',$info='') {
+ include("./inc/form.inc");
+ $form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data",true);
+ $form->addText("login","Prihlasovacie meno:",$login);
+ $form->addPassword("password1","Heslo:","",10);
+ $form->addPassword("password2","Heslo pre overenie:","",10);
+ $form->addText("email:","Emailova adresa",$email);
+ $form->addText("web","Stranka:",$web);
+ $form->addSelect("skin","Skin:",$kyberia->listSkinArray());
+ $form->addFile("image","Obrazok:");
+ $form->addTextarea("info","Dodatocne informacie",$info);
+ $form->addSubmit("submit","Zaregistruj sa!","");
+ $form->addHidden("sent","ok");
+ $form->display();
+
+}
+
--- /dev/null
+<form action='<? echo SCRIPT; ?>' method='post'>
+<table class='box'><tr><td><font color='red'><center><b>Pozor, ziadas o
+vstup do autonomnej zony!</b></font></center><br><br>Kyberia je komunita
+ludi ktori mozu byt roztruseni po celom svete a predsa vedia ze su sucastou
+toho isteho naroda. Nie naroda Cechov alebo Slovakov, ale naroda bytosti,
+ktore chcu byt stastne a slobodne, s vysokou mierou respektu voci ostatnym a
+hladom po novych zazitkoch a informaciach. </td></tr></table>
+<BR><BR><table>
+<tr><td colspan=4 align=center><font color=white><b>Ak si myslis ze si
+schopny rozhodnut sam za seba co je dobre a co zle a mas zaujem o vstup do
+nasej
+zony, <font color=red>pokus sa co najuprimnejsie odpovedat na nasledujucich
+par otazok</font> a v priebehu
+par hodin ti prijde rozhodnutie Konzilia Kyberie pre Byrokraticky Bullshit
+(KKpBB) o tom ci si bol zaregistrovany
+alebo nie.</font></b><BR></td></tr>
+<tr><td colspan=4>
+1. Co vidis na tomto obrazku :<br>
+<img src='http://kyberia.sk/images/maxula.jpg'>
+<textarea rows='5' name='otazka_1'><?=$_POST['otazka_1']?></textarea><br><br>
+</td></tr>
+<tr><td colspan=4>
+2. Si dusevne zdravy? Preco?<br>
+<textarea rows='5' name='otazka_2'><?=$_POST['otazka_2']?></textarea><br><br>
+</td></tr>
+<tr><td colspan=4>
+3. Este stale chces ist dnu? Preco?<br>
+<textarea rows='5' name='otazka_3'><?=$_POST['otazka_3']?></textarea><br><br>
+</td></tr>
+<tr><td colspan=4>
+4. Napis nejake info o sebe:<br>
+<textarea rows='5' name='user_info'><?=$_POST['user_info']?></textarea><br><br>
+</td></tr>
+<tr><td colspan=4 align=center>
+<br><br>A este zopar oficialit<br><br><br>
+</td></tr>
+<tr><td>login:</td><td><input type='text' name='login'
+value='<?=$_POST['login']?>'><td colspan='2'></td>
+<tr>
+<td>email:</td><td><input value='<?=$_POST['email']?>' name=email
+type=text></td>
+<td>icq:</td><td><input value='<?=$_POST['user_icq']?>' name='user_icq'
+type=text></td>
+</tr>
+<tr>
+<td>www:</td><td><input value='<?=$_POST['user_www']?>' name='user_www'
+type=text></td>
+<td>reklama?</td><td>
+ano<input class='checkbox' type='radio' name='user_ad' value='yes' <?php
+if($_POST['user_ad']=='yes') echo 'checked';?>>
+nie<input type='radio' class='checkbox' name='user_ad' value='no' <?php
+if($_POST['user_ad']=='no') echo 'checked';?>>
+</td>
+</tr>
+<tr>
+<td>heslo:</td><td><input name='password1' type='password'></td>
+<td>zopakuj heslo:</td><td><input name='password2' type='password'></td>
+</tr>
+<tr><td colspan='4' align='center'><i>A este jedna lahodka pre prudicov typu
+cinny organ alebo puritansky rodic.V pripade
+ze stlacis tlacitko "register" stavas sa automaticky <b>SPOLUZODPOVEDNYM ZA
+VSETKY PRISPEVKY</b> ktore boli a budu ulozene v databazi kyberie. Bez
+vynimky.</i>
+<tr>
+<td align='center' colspan='4'><input type='hidden' name='action'
+value='register'><input type='submit' value="register"
+name='event'></td></tr>
+</table>
+</form>
\ No newline at end of file
--- /dev/null
+<?php
+$id_page=1;
+include("./inc/kyberia.inc");
+$kyberia=new CLASS_KYBERIA();
+if (!$offset) $offset=0;
+Header("Cache-control: no-cache");
+?>
+<html><head>
+<title>
+<?php
+echo "kyberia.sk - ",$kyberia->getTitle();
+?>
+</title>
+<link rel=stylesheet type="text/css" href="http://localhost/kyberia/css/griga.css">
+</head>
+<body>
+<table cellspacing=10>
+<tr>
+
+<td valign=top width=150>
+<?php include("navbox.inc"); ?>
+<br>
+<?php include("introbox.inc"); ?>
+<br>
+<?php include("haluskabox.inc")?>
+</td>
+
+<td valign=top width=500>
+<?php include("register.inc"); ?>
+</td>
+
+<td valign=top width=125>
+<?php include("select_rubrika_box.inc");?>
+<br>
+<?php include("mame_radi_box.inc");?>
+
+</td></tr></table>
+
+<?php
+include("tiraz.inc");
+?>
--- /dev/null
+<table class='box'><tr><td><font color='red'><center><b>Poziadal si o vstup do autonomnej zony!</b></center></font><br>Kyberia je komunita ludi ktory mozu byt roztruseny po celom svete a predsa vedia ze su sucastou toho isteho
+naroda. Nie naroda Cechov alebo Slovakov, ale naroda bytosti ktore chcu byt stastne a slobodne.
+Preto jedine pravidlo ktore na kyberii plati je <b>rob si co chces ale pamataj na to ze aj
+ostatny si budu robiet co chcu</b>. Ak chces nadavat, vyvolavat konflikty a posielat ludi dopice,
+prosim, mas na to pravo, ale potom sa necuduj ze posleme dopice aj my teba. Nechceme giganticku
+navstevnost ani byt co najvacsi. Chceme absolutne slobodnu vymenu informacii - nic nieje tabu v svete zlozenom
+zo zakladnych jednotiek 0 a 1. Chceme vzajomnou interakciou posuvat jeden druheho dalej - az k
+poznaniu ze tam niekde vnutri sme vsetci iba inymi projekciami toho isteho filmu. </td></tr></table>
\ No newline at end of file
--- /dev/null
+<script language="JavaScript"><!--
+function validate(formular) {
+ if (formular.login.value=="")
+ {
+ alert("Prihlasovacie meno musite vyplnit!");
+ formular.login.focus();
+ return false;
+ }
+ else if (formular.email.value=="")
+ {
+ alert("Emailovu adresu musite vyplnit!");
+ formular.email.focus();
+ return false;
+ }
+ else if (window.RegExp) {
+ re= new RegExp("^[^@]+@[^.]+\..+$");
+ if (!re.test(formular.email.value)) {
+ alert("Zadany email nieje spravna adresa elektronickej posty!");
+ formular.email.focus;
+ return false;
+ }
+ }
+ else if (formular.password1.value!=formular.password2.value)
+ {
+ alert("Vase hesla niesu rovnake, prosim napiste ich znovu!");
+ formular.password1.focus();
+ return false;
+ }
+ else return true;
+}
+//-->
+</script>
+
+<?php
+include("./inc/form.inc");
+$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data",true);
+
+if (!$kyberia) {
+ include("./inc/kyberia.inc");
+ $kyberia=new CLASS_KYBERIA();
+}
+
+
+if (!$sent) $form->showForm('','','','',$kyberia->listSkinArray());
+
+if ($sent=="ok") {
+ if (($password1==$password2) AND ($kyberia->isLogin($login))) {
+ if ($image=='') echo "Nezadali ste ziadny obrazok a preto budete vystupovat na diskusnych forach bez svojej ikonky. Mozete to pravdaze zmenit v uzivatelskych nastaveniach.<br>";
+ else if ($image_size>=4096) echo "Vas obrazok je privelky. V zaujme rychleho nacitania stranok pre vsetkych uzivatelov fora si ho zmente pod 4 kb a nasledne uploadnite v zmene nastavenia.<br>";
+ else Copy($image,$kyberia->UserImages.$login.$image_name);
+ if ($kyberia->registerUser($login,$password1,$email,$web,$skin+1,$image_name,$info)) {
+ echo "Boli ste uspesne zaregistrovany do systemu kyberia!";
+ }
+ }
+
+ elseif ($password1!=$password2) {
+ echo "<h2>Vase hesla niesu rovnake</h2>";
+ $form->showForm($login,$email,$web,$info,$kyberia->listSkinArray());
+ }
+
+ elseif (!$kyberia->isLogin($login)) {
+ echo "<h2>Bohuzial uz je uzivatel s danym menom v nasom systeme zaregistrovany, prosim potrapte si fantaziu.</h2><br>";
+ $form->showForm($login,$email,$web,$info,$kyberia->listSkinArray());
+ }
+}
+
+
+
+?>
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+
+$kyberia->putRubrikaDesc($node_id);
+?>
+</td></tr></table>
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+$set=$kyberia->query("SELECT articles.id_rubrika,rubriky.nazov as rubrnazov from articles left join rubriky on rubriky.id_rubriky=articles.id_rubrika where id_article='".$_GET['node_id']."'");
+$set->next();
+echo "<center>kategoria: <b><a href=".SCRIPT."?action=rubrika&kat=",$set->getString("id_rubrika"),">",$set->getString("rubrnazov"),"</a></center></b><br>";
+$rubrika=$set->getString("id_rubrika");
+$set=$kyberia->query("SELECT id_article,nazov, hits from articles where id_rubrika=$rubrika ORDER by id_article DESC");
+$i=0;
+while ($set->next()) {
+ ++$i;
+ echo $i,". <a href=".SCRIPT."?action=$action&node_id=",$set->getString("id_article"),">",$set->getString("nazov"),"</a><br>";
+}
+
+?>
+</td></tr></table>
--- /dev/null
+<?php
+//zoznam clankov
+global $query;
+if ($query=="") echo "<center><br>Nezadali ste ziadne slovo na vyhladavanie!!<br><br><br></center>";
+else { $clanky=$kyberia->Search($query);
+ if ($clanky->_numRows==0) echo "<br><center><br>Zadane slovo $query sa nevyskytuje v ziadnom clanku!</center><br>";
+ else {
+ echo "<br><center><br>Slovo $query sa vyskytuje v ",$clanky->_numRows,". clankoch!<br><br></center>";
+ while ($clanky->next()) {
+ echo "<table cellpadding=5 width=100% class=box>";
+ echo "<tr><td><img src='";
+ if ($clanky->getString('title_image')=="") echo "/images/rubriky/",$kyberia->putTitleImage($clanky->getInt("id_rubrika"));
+ else echo $kyberia->TitleImageDir.$clanky->getString('title_image');
+ echo "' hspace=5 vspace=5 align=left>";
+ echo "<a class=nazev href=/article.php?id=",$clanky->getString("id_article"),">",$clanky->getString('nazov'),"</a><br>";
+ echo $clanky->getString('short_desc');
+ echo "</td></tr></table><br>";
+ }
+ }
+}
+
+?>
+
+
--- /dev/null
+<table width=100% class=box><tr><td align=center>
+search.en.gine</td>
+<tr><td align=center>
+<form method="post" action="<?=SCRIPT?>?action=searchforum">
+<input class='bigtextinput' type=text name=query><br>
+<center><input type='submit' name='search' class='textinput' value='hladaj'></center>
+</form>
+</td></tr></table>
\ No newline at end of file
--- /dev/null
+<?php
+if ($_POST['type']=='forum') {
+echo "<br><center><b>na.na.na.siel[siel{siel}] som tieto fora</b></center>";
+$q="SELECT forum_info.forum_info,user_forum.submission_count,user.login,forum.* from forum left join forum_info on forum_info.forum_id=forum.forum_id left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+$q.=" where (forum_name like '%$query%' or forum_info like '%$query%')";
+$q.=" order by forum_id desc ";
+$forumset=$kyberia->query($q);
+while ($forumset->next()) {
+ echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a><br>(".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")<br>";
+}
+}
+
+elseif ($_POST['type']=='user') {
+$q="SELECT * from user";
+$q.=" where login like '%$query%'";
+$q.=" order by login";
+$forumset=$kyberia->query($q);
+echo "<br><center><b>na.na.na.siel[siel{siel}] som tychto u.u.uzivatelov</b></center>";
+while ($forumset->next()) {
+ echo "<br><a href='?action=userinfo&node_id=",$forumset->getString('id'),"'>",$forumset->getString('login'),"</a>";
+}
+}
+
+elseif ($_POST['type']=='journaux') {
+$q="SELECT dennik.*,user.login from dennik left join user on user.id=dennik.autor";
+$q.=" where nadpis like '%$query%'";
+$q.=" order by id desc";
+$dennikset1=$kyberia->query($q);
+if ($dennikset1->getNumRows()) {
+ echo "<br><center><b>\"$query\" sa vyskytuje v nadpisoch tychto dennikov</b></center>";
+ while ($dennikset1->next()) {
+ echo "<br><a href='?action=journaux&node_id=",$dennikset1->getString('id'),"'>",$dennikset1->getString('nadpis'),"</a> (",$dennikset1->getString('login')," :: ",$dennikset1->getString('hits')," hitz )";
+ }
+}
+
+$q="SELECT dennik.*,user.login from dennik left join user on user.id=dennik.autor";
+$q.=" where zapis like '%$query%'";
+$q.=" order by id desc";
+
+$dennikset2=$kyberia->query($q);
+if ($dennikset2->getNumRows()) {
+ echo "<br><center><b>\"$query\" sa vyskytuje v texte tychto dennikov</b></center>";
+ while ($dennikset2->next()) {
+ echo "<br><a href='?action=journaux&node_id=",$dennikset2->getString('id'),"'>",$dennikset2->getString('nadpis'),"</a> (",$dennikset2->getString('login')," :: ",$dennikset2->getString('hits')," hitz )";
+ }
+}
+
+}
+
+if ($_POST['type']=='article') {
+if ($query=="") echo "<center><br>Nezadali ste ziadne slovo na vyhladavanie!!<br><br><br></center>";
+else { $clanky=$kyberia->Search($query);
+ if ($clanky->_numRows==0) echo "<br><center><br>Zadane slovo $query sa nevyskytuje v ziadnom clanku!</center><br>";
+ else {
+ echo "<br><center><br>Slovo $query sa vyskytuje v ",$clanky->_numRows,". clankoch!<br><br></center>";
+ while ($clanky->next()) {
+ echo "<table cellpadding=5 width=100% class=box>";
+ echo "<tr><td><img src='";
+ if ($clanky->getString('title_image')=="") echo "/images/rubriky/",$kyberia->putTitleImage($clanky->getInt("id_rubrika"));
+ else echo $kyberia->TitleImageDir.$clanky->getString('title_image');
+ echo "' hspace=5 vspace=5 align=left>";
+ echo "<a class=nazev href='".SCRIPT."?action=article&id=",$clanky->getString("id_article"),"'>",$clanky->getString('nazov'),"</a><br>";
+ echo $clanky->getString('short_desc');
+ echo "</td></tr></table><br>";
+ }
+ }
+}
+}
+?>
\ No newline at end of file
--- /dev/null
+<center><b>hladaj</b>
+<form method='post'>
+<select style='width: 80px;' name='type'>
+<option value='forum'>forum</option>
+<option value='user'>cloveka</option>
+<option value='journaux'>dennik</option>
+<option value='article'>clanok</option>
+</select><br>
+<input type='text' style='input' name='query'>
+<input type='hidden' name='action' value='searchforum'>
+<input type='submit' value='hla.daj'>
+</form></center>
\ No newline at end of file
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+$kyberia->putIntro();
+?>
+</td></tr></table>
--- /dev/null
+23. FEBRUÁRA BUDE V DUNE KYBERIA PARTY. VSTUP LEN PRE KYBERIA MEMBERS and FRIENDS.
+PREDBEZNY LINE UP: <br>
+21.00 L*RRY + RICKY FITZ<br>
+22.30 MINKZ <br>
+00.00 IM CYBER + MINARIK <br>
+02.00 C-PHONE (DVOIKA.TROIKA) 04.00 WENIA (ex-dust) 2nd floor: STAB ECOM SMART <br>
+????? <br><br>
+
+VJs: Zden/Satori, Hromi <br><br>
+
+- BOOKOVANIE LISTKOV ÈOSKORO <br>
+- MO®NÉ PREKVAPENIA <br>
+- BOROVIÈKA 23,- SK <br>
+- Exeho Street Art Project 23 <br>
+- Kyberia futbal cup <br>
+<?php
+$set=$kyberia->query("select count(*) as pocet from mindfuck");
+$set->next();
+$pocet=$set->getString('pocet');
+$set=$kyberia->query("select * from mindfuck where user_id='$user_id' limit 3 ");
+if (!$set->getNumRows()) {
+ echo "<center><form method='post' action='".SCRIPT."?action=session'><input type='submit' value='Prihlas sa na session'><input type=hidden name='event' value='register'></form></center>";
+}
+
+else {
+ if ($set->getNumRows()<3) echo "<center><form method='post' action='".SCRIPT."?action=session'>zadaj meno: <input class=longtext type=text name=meno><input type='submit' value='Prihlas na session dalsieho cloveka'><input type=hidden name='event' value='adduser'></form></center><br><br>";
+ echo "<table align='center' class=box><tr><td align='center'>id</td><td align='center'><font color=red><b>mindfuck participant</b></td><td></tr>";
+ while ($set->next()) {
+ echo "<form method='post' action='".SCRIPT."?action=session'><tr><td align='center' valign='middle'>$user_name</td><td align='center' valign='middle'><input type='text' value='".$set->getString('meno')."' name='meno'></td><td><input name='event' type='submit' value='zmen meno'><input name='event' type='submit' value='delete'><input type=hidden name=mindfuck_id value='".$set->getString('mindfuck_id')."'></td></form></tr>";
+ }
+ echo "</table>";
+}
+
+
+
+echo "<br><table border=1 class=box align='center'><tr><td align='center'><font color=white><b>clovek</b></font></td><td align='center'><font color=white><b>pocet zaregistrovanych</b></font></td><td align='center'><font color=red><b>$$$ cashe $$$</b></font></td></tr>";
+$set=$kyberia->query("select count(mindfuck_id) as pocet,user.login as login from mindfuck left join user on mindfuck.user_id=user.id group by mindfuck.user_id order by login asc");
+if (!$set->getNumRows()) {
+ echo "<center>Nikto nieje zaregistrovany dopicee!</center>";
+}
+else {
+ while ($set->next()) {
+ echo "<tr><td align='center'>".$set->getString('login')."</td><td align='center'>".$set->getString('pocet')." x Bytost</td><td align='center'>".($set->getString('pocet')*100)." Sk-</td></tr>";
+ }
+ echo "<tr><td><font color=red><b>SPOLU</b></font><td align='center'><font color=red><b>$pocet x Bytost</b></font></td><td align='center'><font color=red><b>".($pocet * 100)." Sk,-</b></font></td></tr>";
+
+echo "</table>";
+}
+/*
+echo "<center>Financial status: ".(($pocet*100)-6200)." Sk,-</center><br>";
+echo "<center>Places left: ".(193-$pocet)." ludi.</center><br>";
+*/
+include_once("forum.inc");
+?>
\ No newline at end of file
--- /dev/null
+<table width=100% class=box><tr><td>
+<?
+
+$set=$kyberia->query("SELECT id_rubrika, title_image,short_desc,autor FROM articles where id_article='".$_GET['node_id']."'");
+$set->next();
+if ($set->getString("id_rubrika")==4) $kyberia->putRubrikaDesc(4);
+else {
+ if ($set->getString("title_image")!="") echo "<center><br><img src=",$kyberia->TitleImageDir.$set->getString('title_image'),"></center><br>";
+ else echo "<br><center><img src=/images/rubriky/",$kyberia->putTitleImage($set->getInt("id_rubrika")),"></center><br>";
+ echo $set->getString("short_desc");
+ if (!Is_Int($set->getInt('autor'))) echo "<br><br><Center>( ",$set->getString("autor")," )</center>";
+}
+
+?>
+<br><br><center><a href='/print.php?id=<?=$_GET['node_id']?>'>pripravit clanok pre tlac</a></center><br>
+</td></tr></table>
--- /dev/null
+<?php
+$dd=new DiskuseDesign();
+//zoznam clankov
+global $clanky;
+
+ if ($clanky->getString("id_article")==4) {
+ echo "<font color=white><CENTER>TENTO CLANOK NECHCE NIKOHO NABADAT NA VYROBU DROG. JE TO INFORMACNY ABSTRAKT VOLNE DOSTUPNY V CHEMICKEJ LITERATURE. VEDZTE ZE VYROOBOU LSD PORUSUJETE ZAKON SVETA DO KTOREHO STE SA (BOHUZIAL?) NARODILI </CENTER></FONT>";
+ }
+
+ if ($clanky->getString("id_rubrika")==4) {
+ echo "<table cellpadding=0 width=100% class=box>";
+ echo "<tr><td><img src='";
+ if ($clanky->getString('title_image')=="") echo "/images/rubriky/",$kyberia->putTitleImage($clanky->getInt("id_rubrika"));
+ else echo $kyberia->TitleImageDir.$clanky->getString('title_image');
+ echo "' hspace=5 vspace=5 align=left>";
+ echo "<a class=nazev href=/article.php?node_id=",$clanky->getString("id_article"),">",$clanky->getString('nazov'),"</a><br>";
+ echo $clanky->getString('short_desc');
+ $dd->printdiskuse($clanky->getString('id_diskuse'));
+ echo "</td></tr></table><br>";
+ }
+
+
+ elseif ($diskuse=="only") {
+ echo "<table cellpadding=0 width=100% class=box><tr><td>";
+ $dd->printdiskuse($clanky->getString('id_diskuse'));
+ echo "</td></tr></table>";
+ }
+
+
+ else {
+ echo "<table width=100% cellpadding=0 class=box>";
+ echo "<tr><td>";
+ if(strlen($clanky->getString('$image1'))>3) echo "<img border=0 src='/images/clanky/".$clanky->getString('$image1')."'>\n";
+ echo Stripslashes($clanky->getString('text1'));
+ if(strlen($clanky->getString('$image2'))>3) echo "<img border=0 src='/images/clanky/".$clanky->getString('$image2')."'>\n";
+ echo Stripslashes($clanky->getString('text2'));
+ if(strlen($clanky->getString('$image3'))>3) echo "<img border=0 src='/images/clanky/".$clanky->getString('$image3')."'>\n";
+ echo Stripslashes($clanky->getString('text3'));
+ $dd->printdiskuse($clanky->getString('id_diskuse'));
+ echo "</td></tr></table><br>";
+ }
+
+?>
+
+
+
--- /dev/null
+<center><a href='http://www.reviste.sk'><img alt='this.is.da.alternative.thing' src='/images/banner-reviste2002.jpg'></a></center><br>
\ No newline at end of file
--- /dev/null
+<?php
+if (!empty($error)) echo "<center>
+<font color='red'><b>Chyba:: $error</b></font></center>";
+if (!empty($status)) echo
+"<center><font color='red'>$status</font></center>";
+?>
+
--- /dev/null
+<select style='width: 80px;' name='user_status' onChange="window.location.href=this.options[this.selectedIndex].value" >
+<?php
+$args="&action=".$_GET['action'];
+if ($_GET['node_id']) $args.="&node_id=".$_GET['node_id'];
+
+$statuslist[]="normal";
+$statuslist[]="depresia";
+$statuslist[]="stastie";
+$statuslist[]="LASKA";
+$statuslist[]="vykaleny";
+$statuslist[]="nasrany";
+//$statuslist[]="invisible";
+foreach ($statuslist as $option) {
+ echo "<option value='".SCRIPT."?get_event=switchstatus&user_status=$option$args' ";
+ if ($option=="$user_status") echo "selected";
+ echo ">$option</option>";
+}
+?>
+</select>
--- /dev/null
+INSERT INTO dennik_user VALUES (1,'Reach','Kosice','zwyerua','Wecz','reach@zion.sk','reach','q');
+INSERT INTO dennik_user VALUES (31,'Exebege','BB/BA','Zlatý Beloch','List','miroslavv@centrum.sk','exebege','hartipa');
+INSERT INTO dennik_user VALUES (30,'fiona','++++++++++++++++++++++++++++++++++++++++++++++++++','anti.loop','little fluffy cloud','','fiona','apple');
+INSERT INTO dennik_user VALUES (13,'c00l s3ri4lz','','','','','podvodnik','mazatma');
+INSERT INTO dennik_user VALUES (6,'andrej','ghetto/lúky>petralka','trúbe¾ka bitrofabídna','¾ f a iné písmená','andrej@zion.sk','ach','achzion');
+INSERT INTO dennik_user VALUES (7,'al-nilrem','damask','velmi krotke','magicke zelene bobule','zdrava.figura.je@paranormal.sk','merlin','frank');
+INSERT INTO dennik_user VALUES (8,'Tomá','Koice','abuse','pirohy','subtalk@zion.sk','subtalk','t220683');
+INSERT INTO dennik_user VALUES (9,'ninique','','','','ondrej@zion.sk','omietka','851asd');
+INSERT INTO dennik_user VALUES (10,'janka hoffmann','blava','bobina','chupachups bananove :)','dopedoll@pobox.sk','dopedoll','matrix');
+INSERT INTO dennik_user VALUES (11,'Na Chrbát','Abu Dabi','skákajúca gazela','5m long penis','gejmer@ramclan.sk','gejmer','biker');
+INSERT INTO dennik_user VALUES (12,'M|KE_X','Surany','pes ;-)','kniha','michal2@szm.sk','mike_x','8005056928');
+INSERT INTO dennik_user VALUES (14,'_euro_','Koice','èrievièka','poste¾','infinit@host.sk','_euro_','oyreww');
+INSERT INTO dennik_user VALUES (15,'milan','preov','hedgehog','','charms@stonline.sk','milan','montypython');
+INSERT INTO dennik_user VALUES (20,'Niko','New York','lenochod','mobilny telefon','niko@2600.sk','niko','piko');
+INSERT INTO dennik_user VALUES (17,'JazzIt','Bratislava','computerova mys','vec','jazzit@europe.com','jazzit','robo1');
+INSERT INTO dennik_user VALUES (18,'MaRmAR','Pezinok','tiger','bakelit','marmar@marmar.sk','marmar','11296');
+INSERT INTO dennik_user VALUES (19,'mio','ahanovce','meho kodro','remote control','strbskepleso@zion.sk','mio','katka');
+INSERT INTO dennik_user VALUES (21,'hurahura','Bratislava','hroch','','hurahura@post.sk','hurahura','1230hura');
+INSERT INTO dennik_user VALUES (22,'jan hulvat','','','','','hulvat','ggg');
+INSERT INTO dennik_user VALUES (23,'tii','','','','','tii','nttiiko');
+INSERT INTO dennik_user VALUES (24,'blur','humenne','lobo','gitara','blur@hippy.cz','blur','nemam');
+INSERT INTO dennik_user VALUES (25,'Peter','','','','','clubber','6143');
+INSERT INTO dennik_user VALUES (26,'-J-','sabakagrad','holub','tehla','','-J-','podhubie');
+INSERT INTO dennik_user VALUES (27,'Mons. Alojz Tkac','Kosice','ovecka','pismo svate','tkac@zion.sk','knaz','t220683');
+INSERT INTO dennik_user VALUES (28,'Jaro Herda','Herdovce','svina','maliarska sada painterset','herda-opilec@neda-sa.sk','herda','opilec');
+INSERT INTO dennik_user VALUES (29,'Timothy Dalton','London','Babkoherec','Shakespearen company','nemam','Vrhac ostepov','summa');
+INSERT INTO dennik_user VALUES (32,'Matko','BB','','','vetron@gmx.de','aween','ocean');
+INSERT INTO dennik_user VALUES (34,'3riZ','ba::ke','','tien','','gnd','fucked2');
+INSERT INTO dennik_user VALUES (38,'hromi','praha','tinda bradac','zlty vrtulnicek s vrtulkami na zotrvacnik','hromi@kyberia.sk','hromi','Pacrewk0');
+
+
--- /dev/null
+<br><center>
+<font class=tiraz><a href='http://www.cometq4.com'>Q4</a>Tato stranka nikoho nechce nabadat k pachaniu trestnych cinov.<br>
+Jednotlive prispevky su slobodne vyjadrene osobne nazory prispievatelov <a href='http://www.rawilson.com'>;-)</a>
+<br>Pravo slobodneho slova je jednou zo zakladnych ludskych<br>
+<a href=http://www.kyberia.sk/article.php?node_id=33>slobod</a> a preto piseme to co piseme a pisat to budeme. Za kazdu cenu.<br>
+Kazdopadne autor stranky ani jej prevadzkovatel nezodpoveda za obsah jednotlivych textov.<br>
+© kyberia.sk 23.12.2001-21.12.2012 {in memorian ergond 23.7.2002}<br>
+code by kyberia CVS team & content by <a href='mailto:kyberia@kyberia.sk'>jhnprcvlhckwrth</a>,hosting by <a href="http://www.2600.sk">2600</a>
+</font></center>
+<!-- NAJ.sk -->
+<IMG SRC="http://www.naj.sk/cgi-bin/4web/nvhit.pl?id=00010686" WIDTH="1" HEIGHT="1" ALT="" BORDER="0">
+<SCRIPT LANGUAGE="JavaScript">
+<!--
+ document.write("<IMG SRC=\"http://www.naj.sk/cgi-bin/4web/nv_referer?id=00010686&ref="+ escape(top.document.referrer) + "\" WIDTH=1 HEIGHT=1 ALT=\"\" BORDER=0>");
+// -->
+</SCRIPT>
+<!-- NAJ.sk - koniec -->
+</body></html>
\ No newline at end of file
--- /dev/null
+
+<?php
+if ($user_id) {
+ if($user_mail) {
+ echo "<a href='".SCRIPT."?action=posta'>";
+ if ($user_mail=='1') echo "<font color='red'><b>POSTA :: $user_mail nova sprava";
+ elseif ($user_mail>'1' and $user_mail<'5') echo "<font color='red'><b>POSTA :: $user_mail nove spravy";
+ elseif ($user_mail>'5') echo "<font color='red'><b>POSTA :: $user_mail novych sprav";
+ echo " :: posledna od $mail_name</b></font></a>";
+ }
+ echo "<br>";
+// include_once("switchstatusbox.inc");
+ echo "<div id='listaleft'>";
+ echo "<table><tr><td>";
+ echo "<a href='?action=list'>kluby</a>";
+ echo "---<a href='?action=posta'>posta</a>";
+ echo "---<a href='?action=karma'>K!</a>";
+// echo "---<a href='?action=newz'>newz??</a>";
+ echo "---<a href='?action=b00kmarkz'>b00kmarkz</a>";
+ echo "---<a href='?action=ludia&subaction=active'>ludia</a>";
+ echo "---<a href='?action=posledne'>posledne</a>";
+ if (ADMIN) echo "---<a href='?action=admin'>ADMIN</a>";
+// echo "---<a href='?action=friends'>friends</a>";
+ echo "---<a href='?action=listarticle'>clanky</a>";
+ echo "---<a href='?action=journaux'>denniky</a>";
+// echo "--<a href='?action=dennikadd'>novy dennik</a>";
+ echo "---<a href='?action=personalize'>nastavenie</a>";
+ echo "---<a href='http://www.kyberia.sk/index.php?action=article&node_id=179'>help</a>";
+ echo "---<a href='",$PHP_SELF,"?action=logoff'>Odhlásit</a>---";
+ echo "</td><td>";
+ include_once("switchstatusbox.inc");
+ echo "</td></tr></table>";
+?>
+
+<?php
+ echo "</div>";
+}
\ No newline at end of file
--- /dev/null
+<table class=box><tr><td>
+<center>top 10 <a href=http://kyberia.sk/gallery>galleries</a></center>
+<table>
+<?php
+global $kyberia;
+$set=$kyberia->getTopGalleries();
+$i=0;
+while ($set->next()) {
+ $i++;
+ echo "<tr><td>$i</td><td><a href=http://kyberia.sk/gallery/view_album.php?set_albumName=",$set->getString("name"),">",$set->getString("title"),"</a> (",$set->getString("hits"),")<br></td></tr>";
+}
+?>
+</table></td></tr></table>
\ No newline at end of file
--- /dev/null
+<?php
+include("./inc/redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("./inc/form.inc");
+
+$LocalImageDir="/testwebs/kyberia/images/";
+$LocalTitleImageDir="/testwebs/kyberia/title_images/";
+if($submit=="update") {
+
+ Copy($title_image,$LocalTitleImageDir.$title_image_name);
+ Copy($image,$LocaImageDir.$image_name);
+ $redakce->updateArticle($HTTP_POST_VARS,$title_image_name,$image_name);
+}
+
+$set=$redakce->getArticle($id);
+$set->next();
+echo "<html><head><link rel=stylesheet type=\"text/css\" href=\"./kyberia.css\"></head>";
+$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ echo "<html><head><title>Pridanie clanku</title></head><body>\n";
+ $redakce->listArticles();
+ echo "<body><table><tr>\n";
+ $form->addText("nazov","Nazov:",$set->getString('nazov'));
+ $form->addText("autor","Autor:",$set->getString('nazov'));
+ $form->addSelect("id_rubrika","Rubrika",$redakce->listRubrikyArray());
+ $form->addSelect("id_rubrika_secondary","Sekundarna rubrika",$redakce->listRubrikyArray());
+ $form->addText("id_forum","ID forum:",$set->getString('id_forum'));
+ $form->addText("id_forum_secondary","ID forum sekundarne:",$set->getString('id_forum_secondary'));
+ $form->addTextarea("short_desc","Kratky popis",$set->getString('short_desc'),40,6);
+ $form->addTextarea("text","Text:",$set->getString('text'),40,6);
+ $form->addSubmit("submit","update","");
+ $form->display();
+ echo "</body></html>";
+
+
+?>
--- /dev/null
+<?php
+if ($show=="karma") {
+
+ $q="select submissions.*,user.login as user_name,forum.forum_name as forum_name from submissions left join forum on submissions.forum_id=forum.forum_id left join user on submissions.submission_owner=user.id where submission_owner='".$node_id."' and submission_k>0";
+ $q.=" ORDER BY submission_k desc";
+ $set=$kyberia->query($q);
+
+ while ($set->next()) {
+ $submissions=$set->getRecord();
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ // $submissions['submission_text'] = preg_replace ("/<img src=(.*?)>/","obrazok: <a href=\\1>\\1</a>",$submissions['submission_text']);
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ echo "<center><font color='red'>",$submissions['submission_k']," K</font></center>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>";
+ echo "forum: <a href='?action=forum&node_id=",$submissions['forum_id'],"'>",$submissions['forum_name'],"</a><br>";
+ echo $submissions['user_name'];
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ Showz::showLocation($submissions['user_action'],$submissions['user_action_id'],$submissions['user_action_name']);
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+ }
+
+
+}
+elseif ($show=="submissions") {
+ if (!$_GET['offset']) $offset=0;
+ else $offset=$_GET['offset'];
+ echo "<br><br><center><b>uzivatelove prispevky</b></center>";
+ echo "<br><Br><center>";
+ if ($offset) echo "<a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=submissions&offset=".($offset-23)."'><<predchadzajuce</a> ";
+ echo "<a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=submissions&offset=".($offset+23)."'>dalsi >></a>";
+ echo "</center><br><br>";
+ $q="select submissions.*,user.login as user_name,forum.forum_name as forum_name,forum.forum_public as forum_public from submissions left join forum on submissions.forum_id=forum.forum_id left join user on submissions.submission_owner=user.id where forum_public='public' and submission_owner='".$node_id."' ";
+ $q.=" ORDER BY submission_timestamp desc limit $offset,23";
+ $set=$kyberia->query($q);
+
+ while ($set->next()) {
+ $submissions=$set->getRecord();
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ // $submissions['submission_text'] = preg_replace ("/<img src=(.*?)>/","obrazok: <a href=\\1>\\1</a>",$submissions['submission_text']);
+ echo "<img alt='",$submissions['user_name'],"' src='/images/users/",strtolower($submissions['user_name']),".gif'>";
+ echo "<center><font color='red'>",$submissions['submission_k']," K</font></center>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'>";
+ echo "forum: <a href='?action=forum&node_id=",$submissions['forum_id'],"'>",$submissions['forum_name'],"</a><br>";
+ echo $submissions['user_name'];
+ if ($submissions['user_mode']=="normal" AND ($submissions['user_action'])) {
+ Showz::showLocation($submissions['user_action'],$submissions['user_action_id'],$submissions['user_action_name']);
+ }
+ Showz::showDate($submissions['submission_timestamp']);
+
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($submissions['submission_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+ }
+
+
+}
+
+
+elseif ($show=="bookmarks") {
+ echo "<br><br><center><b>uzivatelove kluby</b></center>";
+ $q="SELECT * from forum WHERE forum.forum_owner='$node_id'";
+ $q.=" order by forum_name ";
+ $forumset=$kyberia->query($q);
+ while ($forumset->next()) {
+ echo "<br> <a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a> (".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")";
+ }
+ ?>
+ <br><br><center><b>uzivatelove bookmarknute kluby</b></center>
+ <?php
+ $q="SELECT user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$node_id')";
+ $q.=" WHERE user_forum.user_bookmark='yes' and forum.forum_owner != '$node_id'";
+ $q.=" order by forum_name ";
+ $forumset=$kyberia->query($q);
+ while ($forumset->next()) {
+ echo "<br> <a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a> (".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ")";
+ }
+}
+
+
+elseif($show=="friends") {
+ $result=mysql_query("select session.user_action,session.user_action_id,session.user_action_name,friends.*,user.login as friend_name from friends left join user on user.id=friends.friend_id left join session on session.user_id=friends.friend_id where friends.user_id='$node_id'");
+
+ while ($row=mysql_fetch_array($result)) {
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ echo "<img alt='",$row['friend_name'],"' src='/images/users/",strtolower($row['friend_name']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'><a href='?action=userinfo&node_id=",$row['friend_id'],"'>",$row['friend_name'],"</a>";
+ if ($row['user_action']) {
+ echo " [lokacia:<a class='location' href='?action=",$row['user_action'];
+ if ($row['user_action']=="forum") echo "&node_id=".$row['user_action_id']."'>",$row['user_action_name'];
+ else echo "'>".$row['user_action'];
+ echo "</a>] ";
+ }
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($row['friend_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+
+ }
+
+}
+else {
+ echo "<table width='100%' class='box'><tr><td>".$userinfo['user_info']."</td></tr></table><br>";
+ $result=mysql_query("select session.user_action,session.user_action_id,session.user_action_name,friends.*,user.login as friend_name from friends left join user on user.id=friends.user_id left join session on session.user_id=friends.user_id where friend_id='$node_id'");
+
+ while ($row=mysql_fetch_array($result)) {
+ echo "<table class='bigitem'><tr><td class='icon'>";
+ echo "<img alt='",$row['friend_name'],"' src='/images/users/",strtolower($row['friend_name']),".gif'>";
+ echo "</td><td class='item'>";
+ echo "<table class='item'>";
+ echo "<td class='header'><a href='?action=userinfo&node_id=",$row['user_id'],"'>",$row['friend_name'],"</a>";
+ if ($row['user_action']) {
+ echo " [lokacia:<a class='location' href='?action=",$row['user_action'];
+ if ($row['user_action']=="forum") echo "&node_id=".$row['user_action_id']."'>",$row['user_action_name'];
+ else echo "'>".$row['user_action'];
+ echo "</a>] ";
+ }
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr class='content'><td class='content'>",Stripslashes($row['friend_text']),"</td></tr>";
+ echo "</table>";
+ echo "</td></tr></table>";
+
+ }
+}
+
+?>
--- /dev/null
+<?php
+//zoznam clankov
+ if ($action=='article') {
+
+ $set=$kyberia->query("select autor from articles where id_article='".$_GET['node_id']."'");
+ $set->next();
+ $autor_id=$set->getString('autor');
+
+
+ $record=$kyberia->query("select * from user where id='$autor_id'");
+ $record->next();
+ $userinfo=$record->getRecord();
+
+
+ }
+
+ $q = "select user_name from session where user_id = '".$userinfo['id']."'";
+ $result=$kyberia->query($q);
+ if($result->getNumRows() > 0) define('ACTIVE', true);
+ else define('ACTIVE', false);
+
+
+ echo "<table width=100% class=box><tr><td colspan=2>";
+ echo "<br><center> <img src='http://kyberia.sk/images/users/",$userinfo["login"],".gif' border=0></center>";
+ echo "<br>id: <a href='".SCRIPT."?action=posta&mail_name=",$userinfo["login"],"'>",$userinfo["login"],"</a>";
+ echo "<br>email:<a href=mailto:",$userinfo["email"],">",$userinfo["email"],"</a>";
+ echo "<br>www:<a href=http://",$userinfo["user_www"],">",$userinfo["user_www"],"</a>";
+ echo "<br>icq:".$userinfo["user_icq"];
+ echo "<br>charisma:".$userinfo["charisma"];
+ echo "<br>k!arma:".$userinfo["user_karma"];
+
+ if($userinfo['id'] == '1') echo "<br><br><center>Ubik je Ubik</center><br>";
+ elseif(ACTIVE) echo "<br><br>Uzivatel je on-line";
+ else {
+ if($userinfo['user_active'] != 'yes') echo "<center><br>Uzivatel caka na registraciu</center>";
+ else
+ {
+ echo "<br><br>Uzivatel je off-line<br>";
+ $u = $userinfo['last_click'];
+ echo substr($u, 0, -3);
+ }
+ }
+ echo "<br><br><center><a href='".SCRIPT."?action=journaux&dennik_user=$node_id'>denniky</a></center>";
+ echo "<center><a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=bookmarks'>bookmarky</a>";
+ echo "<br><center><a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=friends'>priatelia</a>";
+ echo "<br><center><a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=karma'>karma</a>";
+ echo "<br><center><a href='".SCRIPT."?action=userinfo&node_id=$node_id&show=submissions'>prispevky</a>";
+
+
+?>
+<br><br>
+<?
+if (!$autor_id) $autor_id=$node_id;
+$kyberia->putAutorList($autor_id);
+?>
+<br><br>
+<?
+
+$kyberia->putDennikAutorList($autor_id);
+?>
+</td></tr></table>
--- /dev/null
+<?php
+echo "<table width=100% class=box><tr><td>";
+$filename="http://www.wired.com/news_drop/netcenter/netcenter.rdf";
+class RSSParser {
+
+ var $insideitem = false;
+ var $tag = "";
+ var $title = "";
+ var $description = "";
+ var $link = "";
+
+ function startElement($parser, $tagName, $attrs) {
+ if ($this->insideitem) {
+ $this->tag = $tagName;
+ } elseif ($tagName == "ITEM") {
+ $this->insideitem = true;
+ }
+ }
+
+ function endElement($parser, $tagName) {
+ if ($tagName == "ITEM") {
+ printf("<dt><b><a href='%s'>%s</a></b></dt>",
+
+trim($this->link),htmlspecialchars(trim($this->title)));
+
+printf("<dd>%s</dd>",htmlspecialchars(trim($this->description)));
+ $this->title = "";
+ $this->description = "";
+ $this->link = "";
+ $this->insideitem = false;
+ }
+ }
+
+ function characterData($parser, $data) {
+ if ($this->insideitem) {
+ switch ($this->tag) {
+ case "TITLE":
+ $this->title .= $data;
+ break;
+ case "DESCRIPTION":
+ $this->description .= $data;
+ break;
+ case "LINK":
+ $this->link .= $data;
+ break;
+ }
+ }
+ }
+}
+
+$xml_parser = xml_parser_create();
+$rss_parser = new RSSParser();
+xml_set_object($xml_parser,&$rss_parser);
+xml_set_element_handler($xml_parser, "startElement", "endElement");
+xml_set_character_data_handler($xml_parser, "characterData");
+$fp = fopen($filename,"r")
+ or die("Error reading RSS data.");
+while ($data = fread($fp, 4096))
+ xml_parse($xml_parser, $data, feof($fp))
+ or die(sprintf("XML error: %s at line %d",
+ xml_error_string(xml_get_error_code($xml_parser)),
+ xml_get_current_line_number($xml_parser)));
+fclose($fp);
+xml_parser_free($xml_parser);
+echo "</td></tr></table><br>";
+?>
\ No newline at end of file
--- /dev/null
+<?
+function readzion($location)
+
+{
+$zion = fsockopen ("www.zion.sk",80);
+//$hovno="GET /$location HTTP/1.0\nHost: www.zion.sk\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)\nReferer: http://www.zion.sk/\n\n";
+//echo $hovno;
+fputs ($zion, "GET /$location HTTP/1.0\nHost: www.zion.sk\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)\nReferer: http://www.zion.sk/\n\n");
+
+while (!feof($zion)):
+
+if (!$body) { if (fgets($zion,30720)=="\r\n") $body=1; }
+else echo fgets($zion,30720);
+
+endwhile;
+fclose ($zion);\r
+
+return 0;
+}
+
+?>
+<table width="750" border="0" cellspacing="0" cellpadding="0">
+ <tr align="left" valign="top" background=http://kyberia.sk/images/dole.gif">
+ <td colspan="9" height="40" background="http://kyberia.sk/images/dole.gif" align="left" valign="top"><img src="http://zion.sk/obrazky/7px.gif" width="20" height="40" align="top"><a href="mailto:hromi@kyberia.sk"><img src="http://zion.sk/obrazky/kyberia/bottom1.gif" width="16" height="25" align="top" alt="kontakt" border="0"></a><img src="http://zion.sk/obrazky/7px.gif" width="5" height="7" align="top"><img src="http://zion.sk/obrazky/kyberia/bottom2.gif" width="16" height="25" align="top" alt="stvorcek zeleny,nahovno stvoreny" border="0"><img src="http://zion.sk/obrazky/7px.gif" width="5" height="8" align="top"><img src="http://zion.sk/obrazky/kyberia/bottom3.gif" width="16" height="25" align="top" alt="stvorcek zelenyyyyyy tiez nahovno stvoreny" border="0"></a></td>
+ </tr>
+ <tr align="left" valign="top">
+ <td align=center colspan="3">nove texty na zion.sk</td>
+ <td colspan="3" align=center >najdiskutovanejsie clanky na zion.sk</td>
+ <td colspan="3" align=center >tlacove zpravy</td>
+ </tr>
+ <tr align="left" valign="top">
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="7"></td>
+ <td width="234"><?php readzion("kyberia/skripty/clankyshow.php");?></td>
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="8"></td>
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="7"></td>
+ <td width="234"><?php readzion("kyberia/skripty/readart14.php");?></td>
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="7"></td>
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="7"></td>
+<td width="234">
+<?php readzion("kyberia/skripty/tlacshow.php");?>
+ <br><img src="http://zion.sk/obrazky/kyberia//anchor.gif" border="0">
+ <font class="text"><a href="http://zion.sk/tlacovespravy.php?id=tlacall">vsetky správy</a></font><IMG SRC="http://www.naj.sk/cgi-bin/4web/nvhit.pl?id=00010195" WIDTH="1" HEIGHT="1" ALT="" BORDER="0">
+</td>
+ <td width="8"><img src="http://zion.sk/obrazky/7px.gif" width="8" height="7"></td>
+ </tr>
+ <tr align="left" valign="top">
--- /dev/null
+<img src=http://kyberia.sk/images/zurno.jpg border=0>
+<table class=box><tr><td>
+<font color=white><b><a href=http://kyberia.sk/journaux.php>Les Journaux</a></b></font> je forma intímnej komunikácie medzi èitete¾mi na\9aich stránok. Mo\9enos\9d vyjadrenia pre\9eitých chví¾ pomocou na\9aich digitálnych denníkov je ponuknutá ka\9edému. Komunikácia sa zakladá na vytvorení vlastneho profilu a následného zápisu momentálnych my\9alienok.Cie¾om Les Journaux je vytvori\9d poh¾ad na ¾udí takých ako sme my. Vy. Poh¾ady vytvorené Vami, nami. Preto neváhajte a vytvorte si svoj denník u\9e dnes!
+</td></tr></table>
\ No newline at end of file
--- /dev/null
+<?php
+define('GIFSICLE','/home/hromi1/kyberia/utilz/gifsicle');
+define('SCRIPT',"http://www.kyberia.sk/kjfshfkshgagfsdhgjhfsd.php");
+define('ICONDIR',"/home/hromi1/kyberia/images/users/");
+define('ICONDIR_FORUM',"/home/hromi1/kyberia/images/forums/");
+define('NETPBM','/home/utils/netpbm/bin/');
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+define('KYBERIA_TITLE',"say good-bye to level 1 (of 6)");
+define('AD_BANNER_MAIN','');
+define('AD_BANNER_POSTA',AD_BANNER_MAIN);
+define('AD_BANNER_FORUMLIST',"<img src=http://www.dnb.sk/images/news/innews_img/SecondBday.jpg>");
+?>
\ No newline at end of file
--- /dev/null
+<?php
+define('DB_DATABASE','kyberia');
+define('DB_HOST','');
+define('DB_USER','');
+define('DB_PASS','');
+?>
--- /dev/null
+a {
+ font: bold 12px arial, helvetica;
+ color: #FF8100;
+}
+
+a:hover {
+ color: #999999;
+ text-decoration: none;
+}
+
+a:active {
+ text-decoration:underline;
+ color: red;
+}
+
+.heading {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ }
+
+.date {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ text-align: right;
+ }
+
+.heading {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ }
+
+.backcolor {
+ background-color: #FF8100;
+ }
+
+.searchColor {
+ background-color: #FFFFFF;
+ }
+
+.componentHeading {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #333333;
+ text-align: left;
+ }
+
+.footer {
+ font: 11px Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+}
+
+.button {
+ font-family: Arial, Helvetica;
+ font-style: normal;
+ font-weight: bold;
+ font-size: 9px;
+ color: #FFFFFF;
+ background-color: #666699;
+}
+
+.articlehead{
+ font-family: arial, helvetica;
+ font-size: 14px;
+ font-weight: bold;
+ text-color: #000000;
+; color: #333333
+}
+
+.post {
+ font-family: arial,helvetica;
+ font-size: 11px;
+ font-weight: bold;
+ text-color: #666666;
+ bacground: #FFFFFF;
+ }
+
+.bold {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #666666;
+ }
+
+.subhead {
+ font: 12px Arial, Helvetica, sans-serif;
+ color: #666666;
+ text-align: center;
+ } .small { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #FF8302; font-weight: normal}
+.newsarticle { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333; text-align: left}
+td { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}
+.poll { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #666666; line-height: 14px}
+li { list-style-image: url(../images/orangeArrow.gif); list-style-type: none}
--- /dev/null
+BODY, P, TD {
+ font-family : Tahoma, Aplos, Helvetica, sans-serif;
+ font-size : 9pt;
+ color : #000000;
+}
+
+.darkbackground {
+ color : #FFFFFF;
+}
+
+A {
+ text-decoration: none;
+ color: #666666;
+ font-weight : bold;
+}
+
+A.darkbackground {
+ color : #CCCCCC;
+}
+
+A:Hover {
+ text-decoration: underline;
+}
+
+H1 {
+ font-size : 16pt;
+ font-weight : bold;
+ color : White;
+}
\ No newline at end of file
--- /dev/null
+.item { vertical-align: top; align: left; width: 100%; }
+.header { background-color: #333333;height: 100%; vertical-align: top; align: left; padding: 0pt; width: 100%; }
+.content { height: 100%; vertical-align: top; align: left; border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+.icon { background-color: #000000; border-width: 1pt; height: 100%; vertical-align: top; align: left; padding: 0pt; }
+.delete { width: 10pt; height: 10pt; vertical-align: top; align: left; }
+.red { color: red; }
+.alert { color: red; font-weight: bold; }
+a { color: white; font-size: 8pt;font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+a:hover {color: red; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+
+
+
+body { color: #6dae42; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: black; margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+
+font.tiraz { color: #6dae42; font-size: 7pt; font-family: Verdana }
+select { background-color: black; text-align:center; color: #6dae42; }
+option { background-color: black; text-align: center; color: #6dae42; }
+td { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #687c68 }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(87,117,94) }
+.pulldown { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(218,218,185) }
+
+th { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+input { width: 80px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.longtext { width: 230px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.checkbox { width: 15px; height: 15px; }
+input.file { width: 210px; color: white; border-color: #6dae42; background-color: black }
+input.noborder { width: 80px; border-color: black ; background-color: black }
+.long { width: 230prx; }
+td.title { align: center; font-width: bold; }
+input.form { font-size: 7pt; font-family: Tahoma, Verdana, Arial; color: #FFFFFF;
+ background-color: #000000; font-weight: bold; border: 1px solid #6dae42 }
+textarea { width: 350 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+textarea.personal { width: 150 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+img { border: 0pt; }
+table.bottom { border-right: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.menubox { border-left: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.userbox { border-bottom: solid 1pt #6dae42;border-top: solid 1pt #6dae42; padding: 0pt }
+table.box { border: solid 1pt #6dae42; padding: 0pt }
+table.submission { border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+table.boxwithout { border-right: solid 1pt #6dae42; padding: 0pt }
+table.redbox { border: solid 0pt red; padding: 0pt }
+pre { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+p { text-indent: 70 pt; }
+.textinput { width: 48px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.smalltextinput { width: 23px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.bigtextinput { width: 100px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.active_users .active_user_img {
+ width: 50px;
+ float: left;
+}
+
+.active_lusers .active_user_img {
+ width: 200px;
+ float: left;
+}
+
+.active_users .active_user_name {
+ text-align: center;
+}
+
+#listaleft {
+ position: absolute;
+ left: 50px;
+ top: 1px;
+ width: 800px;
+ background: black;
+}
+
+#listaright {
+ position: absolute;
+ top: 1px;
+ left: 423px;
+ height: 30px;
+ width: 100%;
+}
+
+#loginbox {
+ position: absolute;
+ top: 0px;
+ left: 670px;
+ height: 30px;
+ width: 100%;
+}
+
+#ad {
+ position: absolute;
+ top: 50px;
+ left: 180px;
+ height: 130px;
+ width: 100%;
+}
--- /dev/null
+a { color: white; font-size: 8pt;font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+a:hover {color: red; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+
+
+body { color: #6dae42; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: black; margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+td { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #687c68 }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(87,117,94) }
+.pulldown { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(218,218,185) }
+th { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+input { height:20 pt; width: 120 pt; background-color: black; color: white; font-size: 9 pt; font-family: Arial, Helvetica; border: solid 1pt #6dae42 }
+input.noborder { border-color: black; }
+select { color: #6dae42; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: black; border: solid 1pt #6dae42 }
+textarea { width: 350 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+img { border: 0pt }
+table.box { border: solid 1pt #6dae42; padding: 0pt }
+table.redbox { border: solid 0pt red; padding: 0pt }
+pre { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+p { text-indent: 70 pt; }
\ No newline at end of file
--- /dev/null
+a { color: #524F41; font-size: 8pt; font-family: Verdana, 'Arial CE', 'Helvetica CE', Arial, Helvetica; text-decoration: none }a:hover { font-size: 8pt; font-family: Verdana, 'Arial CE', 'Helvetica CE', Arial, Helvetica; text-decoration: none; color: #6D6958 }body { color: #000000; font-size: 8pt; font-family: Verdana, 'Arial CE', 'Helvetica CE', Arial, Helvetica; text-decoration: none; background-color: #D0CFAC; scrollbar-face-color: #D0CFAC; scrollbar-shadow-color: #BEB99F; scrollbar-highlight-color: #D0CFAC; scrollbar-3dlight-color: #BEB99F; scrollbar-darkshadow-color: #68655A; scrollbar-track-color: #D0CFAC; scrollbar-arrow-color: #68655A; margin: 0pt }td { color: black; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }.border { border: 1pt solid #736F5E; padding: 2pt }.noborder { color: #687c68; border: 1pt dotted #736F5E }.menu { color: #FFFFFF; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #68655A; background-image: url('menu.jpg'); background-repeat: repeat-x; background-position: center top }.white { color: #FFFFFF; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #7F7A65 }.pulldown { color: #000000; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #CDC8AF }input { color: #000000; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #BEB99F; border: 1pt solid #736F5E }select { color: #000000; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #BEB99F; border: 1pt solid #736F5E }textarea { color: #000000; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #BEB99F; border: 1pt solid #736F5E }img { border: 0pt }.new { color: #FFFFCC }.red { color: #FFFFCC }.icon { background-color: #96927B; vertical-align: top; width: 40px; height: 50px; border: 1 solid #666253; margin: 1px; padding: 0pt }.sicon { background-color: #96927B; vertical-align: top; width: 20px; height: 25px; border: 1 solid #666253; margin: 1px; padding: 0pt }.level { margin: 1pt; border: 0pt; width: 40px; height: 6px }.image { width: 87px; height: 33px }table { padding: 0pt }
\ No newline at end of file
--- /dev/null
+.item { vertical-align: top; align: left; width: 100%; }
+.header { background-color: #333333;height: 100%; vertical-align: top; align: left; padding: 0pt; width: 100%; }
+.content { height: 100%; vertical-align: top; align: left; border-top: solid 1pt #CCCCCC; padding: 0pt; width: 100%; }
+.icon { background-color: #000000; border-width: 1pt; height: 100%; vertical-align: top; align: left; padding: 0pt; }
+.delete { width: 10pt; height: 10pt; vertical-align: top; align: left; }
+.red { color: red; }
+.alert { color: red; font-weight: bold; }
+a { color: white; font-size: 8pt;font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+a:hover {color: red; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+
+
+
+body { color: #CCCCCC; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: black; margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+
+font.tiraz { color: #CCCCCC; font-size: 7pt; font-family: Verdana }
+select { background-color: black; text-align:center; color: #CCCCCC; }
+option { background-color: black; text-align: center; color: #CCCCCC; }
+td { color: #CCCCCC; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #687c68 }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(87,117,94) }
+.pulldown { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(218,218,185) }
+
+th { color: #CCCCCC; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+input { width: 80px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #CCCCCC; height: 18px }
+input.longtext { width: 230px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #CCCCCC; height: 18px }
+input.checkbox { width: 15px; height: 15px; }
+input.file { width: 210px; color: white; border-color: #CCCCCC; background-color: black }
+input.noborder { width: 80px; border-color: black ; background-color: black }
+.long { width: 230prx; }
+td.title { align: center; font-width: bold; }
+input.form { font-size: 7pt; font-family: Tahoma, Verdana, Arial; color: #FFFFFF;
+ background-color: #000000; font-weight: bold; border: 1px solid #CCCCCC }
+textarea { width: 350 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #CCCCCC }
+textarea.personal { width: 150 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #CCCCCC }
+img { border: 0pt; }
+table.bottom { border-right: solid 1pt #CCCCCC; border-bottom: solid 1pt #CCCCCC; padding: 0pt }
+table.menubox { border-left: solid 1pt #CCCCCC; border-bottom: solid 1pt #CCCCCC; padding: 0pt }
+table.userbox { border-bottom: solid 1pt #CCCCCC;border-top: solid 1pt #CCCCCC; padding: 0pt }
+table.box { border: solid 1pt #CCCCCC; padding: 0pt }
+table.submission { border-top: solid 1pt #CCCCCC; padding: 0pt; width: 100%; }
+table.boxwithout { border-right: solid 1pt #CCCCCC; padding: 0pt }
+table.redbox { border: solid 0pt red; padding: 0pt }
+pre { color: #CCCCCC; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+p { text-indent: 70 pt; }
+.textinput { width: 48px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #CCCCCC; height: 18px }
+.smalltextinput { width: 23px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #CCCCCC; height: 18px }
+.bigtextinput { width: 100px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #CCCCCCy height: 18px }
+.active_users .active_user_img {
+ width: 50px;
+ float: left;
+}
+
+.active_lusers .active_user_img {
+ width: 200px;
+ float: left;
+}
+
+.active_users .active_user_name {
+ text-align: center;
+}
+
+#listaleft {
+ position: absolute;
+ left: 230px;
+ top: 1px;
+ width: 800px;
+ background: black;
+}
+
+#listaright {
+ position: absolute;
+ top: 1px;
+ left: 423px;
+ height: 30px;
+ width: 100%;
+}
+
+#loginbox {
+ position: absolute;
+ top: 0px;
+ left: 670px;
+ height: 30px;
+ width: 100%;
+}
+
+#ad {
+ position: absolute;
+ top: 50px;
+ left: 180px;
+ height: 130px;
+ width: 100%;
+}
--- /dev/null
+H3 {
+ color: #666666;
+ font: bold 14px Arial, Helvetica, sans-serif;
+}
+
+H1 {
+ color: #990000;
+ font : 16px;
+ font-family : Arial, Helvetica, sans-serif;
+}
+
+INPUT {
+ font : 12px Arial, Helvetica, sans-serif;
+}
+
+P {
+ font : 12px Arial, Helvetica, sans-serif;
+ text-align : left;
+}
+
+SELECT {
+ font : 12px;
+ font-family : Arial, Helvetica, sans-serif;
+}
+
+TD {
+ font : 12px Arial, Helvetica, sans-serif;
+}
+
+.bolding {
+ font : bold 12 px Arial, Helvetica, sans-serif;
+ }
+
+TEXTAREA {
+ font : 12px Arial, Helvetica, sans-serif;
+}
+
+.forumname {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: blue;
+ }
+
+.menuspace {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #666666;
+ text-align: center;
+ padding-top : 2px;
+ }
+
+.forumheading {
+ font: bold 15px Arial, Helvetica, sans-serif;
+ color: #ffffff;
+ }
+
+.buttons {
+ font-family: Geneva, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ background-color: #9999CC;
+ color: #FFFFFF;
+ border: 1px outset;
+ border-color: #CCCCFF solid;
+ }
+
+a {
+ font: bold 11px arial, helvetica;
+ text-decoration: none;
+ color: #336699;
+}
+
+a:hover {
+ color: #CC0000;
+ text-decoration: underline;
+}
+
+a:active {
+ text-decoration:underline;
+ color: red;
+}
+
+.px12 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}
+.px10 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
+.px9 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px}
+
+.title {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 16px;
+ color: #999999;
+ font-weight: bold
+}
+.warning {
+ font: bold 15px Arial, Helvetica, sans-serif;
+ color: #003366;
+ }
+.pageheading {
+ font: bold 12px Arial, Helvetica, sans-serif;
+ color: #003366;
+ }
+.articlehead{
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 13px;
+ font-weight: bold;
+ text-color: #000000;
+ color: #333333
+}
--- /dev/null
+body { font-size: 8 pt; background-color: #000000; font-family:helvetica; }
+a.nazev { font-size: 10 pt; color: #6dae42; font-family:serif; font-weight:bold; }
+a { font-size: 8 pt; color: #6dae42; font-family:tahoma,arial,serif; }
+td { border-width: 0; color: #6dae42; border-color: black; font-size: 9 pt; font-family: serif;}
+th { border-width: 0; color: #6dae42; border-color: black; font-size: 9 pt; font-family: serif;}
+input { width: 120 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+input.noborder { border-width: 0 pt; border-color: black; }
+table.box { border-color: #6dae42; }
+table.noborder {border-color: black; }
+select { background-color: black; }
+option { background-color: black; font-color: #6dae42; }
\ No newline at end of file
--- /dev/null
+.item { vertical-align: top; align: left; width: 100%; }
+.header { background-color: #333333;height: 100%; vertical-align: top; align: left; padding: 0pt; width: 100%; }
+.content { height: 100%; vertical-align: top; align: left; border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+.icon { background-color: #000000; border-width: 1pt; height: 100%; vertical-align: top; align: left; padding: 0pt; }
+.delete { width: 10pt; height: 10pt; vertical-align: top; align: left; }
+.red { color: red; }
+a { font-weight: bold; color: #232323; font-size: 10pt;font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+a:hover {color: red; font-size: 10pt; font-weight: bold; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; }
+
+
+
+body { color: #232323; font-size: 8pt; font-family: V erdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: white; margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+
+font.tiraz { color: #6dae42; font-size: 7pt; font-family: Verdana }
+select { background-color: black; text-align:center; color: #6dae42; }
+option { background-color: black; text-align: center; color: #6dae42; }
+td { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #687c68 }
+.white { color: #232323; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(87,117,94) }
+.pulldown { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(218,218,185) }
+
+th { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+input { width: 80px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.longtext { width: 230px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.checkbox { width: 15px; height: 15px; }
+input.file { width: 210px; color: white; border-color: #6dae42; background-color: black }
+input.noborder { width: 80px; border-color: black ; background-color: black }
+.long { width: 230prx; }
+td.title { align: center; font-width: bold; }
+input.form { font-size: 7pt; font-family: Tahoma, Verdana, Arial; color: #FFFFFF;
+ background-color: #000000; font-weight: bold; border: 1px solid #6dae42 }
+textarea { width: 350 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+textarea.personal { width: 150 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+img { border: 0pt; }
+table.bottom { border-right: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.menubox { border-left: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.userbox { border-bottom: solid 1pt #6dae42;border-top: solid 1pt #6dae42; padding: 0pt }
+table.box { border: solid 1pt #6dae42; padding: 0pt }
+table.submission { border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+table.boxwithout { border-right: solid 1pt #6dae42; padding: 0pt }
+table.redbox { border: solid 0pt red; padding: 0pt }
+pre { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+p { text-indent: 70 pt; }
+.textinput { width: 48px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.smalltextinput { width: 23px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.bigtextinput { width: 100px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.active_users .active_user_img {
+ width: 50px;
+ float: left;
+}
+
+.active_lusers .active_user_img {
+ width: 200px;
+ float: left;
+}
+
+.active_users .active_user_name {
+ text-align: center;
+}
+
+#listaleft {
+ position: absolute;
+ left: 50px;
+ top: 1px;
+ width: 800px;
+ background: black;
+}
+
+#listaright {
+ position: absolute;
+ top: 1px;
+ left: 423px;
+ height: 30px;
+ width: 100%;
+}
+
+#loginbox {
+ position: absolute;
+ top: 0px;
+ left: 670px;
+ height: 30px;
+ width: 100%;
+}
+
+#ad {
+ position: absolute;
+ top: 50px;
+ left: 180px;
+ height: 130px;
+ width: 100%;
+}
--- /dev/null
+a { color: #8833FF; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+a:hover { font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+body { color: black; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: #000000; margin: 0pt; scrollbar-3dlight-color: #96AABD; scrollbar-arrow-color: 606D79; scrollbar-darkshadow-color: #96AABD; scrollbar-face-color: #D0E1F0; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #D8E2E7; scrollbar-track-color: #C2CDD8 }
+td { color: white; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #330099}
+.noborder { color: #330099; border: dotted 1pt }
+.menu { color: black; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #330099 }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #330099 }
+.pulldown { color: blue; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #555555 }
+input { color: blue; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #000000; border: solid 1pt #330099 }
+select { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #FFFFFF; border: solid 1pt #330099 }
+textarea { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #FFFFFF; border: solid 1pt #330099 }
+img { border: 0pt }
+.new { color: red; font-weight: 500 }
+.red { color: red }
+.icon { background-color: #000000; vertical-align: top; margin: 1px; padding: 0pt; border: 0pt; width: 40px; height: 50px }
+.sicon { background-color: #000000; vertical-align: top; margin: 1px; padding: 0pt; border: 0pt; width: 20px; height: 25px }
+.level { margin: 1pt; border: 0pt; width: 40px; height: 6px }
+.image { width: 87px; height: 33px }
+table { padding: 0pt }
\ No newline at end of file
--- /dev/null
+
+
+a { color: #7E2500; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+a:hover { color: #6E1500; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+body { background-image: url("http://rawthings.com/frohikey/oj3.gif"); background-color: #FFBE31; color: #000000; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; margin: 0pt; scrollbar-face-color: #ffbe31;
+ scrollbar-shadow-color: #4c4a47;
+ scrollbar-highlight-color: #6c6a67;
+ scrollbar-3dlight-color: #5c5a57;
+ scrollbar-darkshadow-color: #fe9500;
+ scrollbar-track-color: #000000;
+ scrollbar-arrow-color: #FFFFFF;}
+td { color: black; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #000000 }
+.noborder { color: #000000; border: dotted 1pt }
+.menu { color: black; font-weight: bold; color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #4c4a47 }
+.white { color: black; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #ffbe31 }
+.pulldown { color: #FFFFFF; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #4c4a47 }
+input { color: #FFFFFF; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #4c4a47; border: solid 1pt #000000 }
+select { color: #FFFFFF; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #4c4a47; border: solid 1pt #000000 }
+textarea { color: #FFFFFF; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #4c4a47; border: solid 1pt #000000 }
+img { border: 0pt }
+.new { color: #FFFFFF; font-weight: 500 }
+.red { color: #FFFFFF }
+.icon { background-color: #4c4a47; vertical-align: top; margin: 1px; padding: 0pt; border: 1pt; width: 40px; height: 50px }
+.sicon { background-color: #4c4a47; vertical-align: top; margin: 1px; padding: 0pt; border: 2pt; width: 20px; height: 25px }
+.level { margin: 1pt; border: 0pt; width: 40px; height: 6px }
+.image { width: 87px; height: 33px }
+table { padding: 0pt }
\ No newline at end of file
--- /dev/null
+
+a { color: rgb(182,48,105); font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+a:hover { font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+body { color: black; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: rgb(255,185,250); margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+td { color: rgb(182,48,105); font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(182,48,105) }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(182,48,105) }
+.pulldown { color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(182,48,105) }
+input { color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(182,48,105); border: solid 1pt #687c68 }
+select { color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: #a3b79f; border: solid 1pt #687c68 }
+textarea { color: rgb(182,48,105); font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(248,193,249); border: solid 1pt #687c68 }
+img { border: 0pt }
+.new { color: red; font-weight: 500 }
+.red { color: red}
+.icon { background-color: #687c68; vertical-align: top; margin: 1px; padding: 0pt; border: 0pt; width: 40px; height: 50px }
+.sicon { background-color: #687c68; vertical-align: top; margin: 1px; padding: 0pt; border: 0pt; width: 20px; height: 25px }
+.level { margin: 1pt; border: 0pt; width: 40px; height: 6px }
+.image { width: 87px; height: 33px }
+table { padding: 0pt }
\ No newline at end of file
--- /dev/null
+.item { vertical-align: top; align: left; width: 100%; }
+.header { background-color: #333333;height: 100%; vertical-align: top; align: left; padding: 0pt; width: 100%; }
+.content { height: 100%; vertical-align: top; align: left; border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+.icon { background-color: #000000; border-width: 1pt; height: 100%; vertical-align: top; align: left; padding: 0pt; }
+.delete { width: 10pt; height: 10pt; vertical-align: top; align: left; }
+.red { color: red; }
+.alert { color: red; font-weight: bold; }
+a { color: #6dae42; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: black; margin: 0pt; }
+
+
+
+body { color: #6dae42; font-size: 8pt; font-family: Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none; background-color: black; margin: 0pt; scrollbar-face-color: #8E967F;
+ scrollbar-shadow-color: #C6CDB3;
+ scrollbar-highlight-color: #C6CDB3;
+ scrollbar-3dlight-color: #656B5A;
+ scrollbar-darkshadow-color: #656B5A;
+ scrollbar-track-color: #727866;
+ scrollbar-arrow-color: #727866;}
+
+font.tiraz { color: #6dae42; font-size: 7pt; font-family: Verdana }
+select { background-color: black; text-align:center; color: #6dae42; }
+option { background-color: black; text-align: center; color: #6dae42; }
+td { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+.border { padding: 2pt; border: solid 1pt #687c68 }
+.noborder { color: rgb(218,218,185); border: dotted 1pt }
+.menu { color: white; font-weight: bold; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #687c68 }
+.white { color: white; font-size: 8pt; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: rgb(87,117,94) }
+.pulldown { color: black; font-size: 8pt; font-family: Verdana, Arial, Helvetica; background-color: rgb(218,218,185) }
+
+th { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+input { width: 80px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.longtext { width: 230px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+input.checkbox { width: 15px; height: 15px; }
+input.file { width: 210px; color: white; border-color: #6dae42; background-color: black }
+input.noborder { width: 80px; border-color: black ; background-color: black }
+.long { width: 230prx; }
+td.title { align: center; font-width: bold; }
+input.form { font-size: 7pt; font-family: Tahoma, Verdana, Arial; color: #FFFFFF;
+ background-color: #000000; font-weight: bold; border: 1px solid #6dae42 }
+textarea { width: 350 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+textarea.personal { width: 150 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+img { border: 0pt; }
+table.bottom { border-right: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.menubox { border-left: solid 1pt #6dae42; border-bottom: solid 1pt #6dae42; padding: 0pt }
+table.userbox { border-bottom: solid 1pt #6dae42;border-top: solid 1pt #6dae42; padding: 0pt }
+table.box { border: solid 1pt #6dae42; padding: 0pt }
+table.submission { border-top: solid 1pt #6dae42; padding: 0pt; width: 100%; }
+table.boxwithout { border-right: solid 1pt #6dae42; padding: 0pt }
+table.redbox { border: solid 0pt red; padding: 0pt }
+pre { color: #6dae42; font-size: 9pt; font-family: Monaco,Verdana, "Arial CE", "Helvetica CE", Arial, Helvetica; text-decoration: none }
+p { text-indent: 70 pt; }
+.textinput { width: 48px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.smalltextinput { width: 23px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.bigtextinput { width: 100px; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: black; vertical-align: middle; margin: 1px 1px 6px; border: solid 1px #6dae42; height: 18px }
+.active_users .active_user_img {
+ width: 50px;
+ float: left;
+}
+
+.active_lusers .active_user_img {
+ width: 200px;
+ float: left;
+}
+
+.active_users .active_user_name {
+ text-align: center;
+}
+
+#listaleft {
+ position: absolute;
+ left: 50px;
+ top: 1px;
+ width: 800px;
+ background: black;
+}
+
+#listaright {
+ position: absolute;
+ top: 1px;
+ left: 423px;
+ height: 30px;
+ width: 100%;
+}
+
+#loginbox {
+ position: absolute;
+ top: 0px;
+ left: 670px;
+ height: 30px;
+ width: 100%;
+}
+
+#ad {
+ position: absolute;
+ top: 50px;
+ left: 180px;
+ height: 130px;
+ width: 100%;
+}
--- /dev/null
+BODY { font-family:verdana,sans-serif; font-size:10pt}
+TD { font-family:verdana,sans-serif; font-size:10pt}
+P { font-family:verdana,sans-serif; font-size:10pt}
+LI { font-family:verdana,sans-serif; font-size:10pt}
+UL { margin-top:0; margin-bottom:0}
+H1 { font-family:verdana,sans-serif; font-size:16pt}
+A { color:black; text-decoration:none; }
+A:visited { color:black; }
+A:active { color:black; }
+A:hover { color:#ffde00; background-color:black; text-decoration:underline }
+
--- /dev/null
+# MySQL dump 7.1
+#
+# Host: localhost Database: kyberia
+#--------------------------------------------------------
+# Server version 3.23.47
+
+#
+# Table structure for table 'admin'
+#
+CREATE TABLE admin (
+ action_id int(11) NOT NULL auto_increment,
+ action_name varchar(23) DEFAULT '' NOT NULL,
+ action_parameter int(11) DEFAULT '0' NOT NULL,
+ action_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ action_status enum('opened','resolved','stopped','veto','referendum') DEFAULT 'opened',
+ action_result varchar(23),
+ action_data_1 text,
+ admin_id int(11) DEFAULT '0' NOT NULL,
+ action_data_2 text,
+ PRIMARY KEY (action_id)
+);
+
+#
+# Table structure for table 'admin_logs'
+#
+CREATE TABLE admin_logs (
+ action_id int(11) NOT NULL auto_increment,
+ action_name varchar(23) DEFAULT '' NOT NULL,
+ action_parameter int(11) DEFAULT '0' NOT NULL,
+ action_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ action_status enum('opened','resolved','stopped','veto','referendum') DEFAULT 'opened',
+ action_result varchar(23),
+ action_data_1 text,
+ admin_id int(11) DEFAULT '0' NOT NULL,
+ action_data_2 text,
+ PRIMARY KEY (action_id)
+);
+
+#
+# Table structure for table 'albums'
+#
+CREATE TABLE albums (
+ id_album int(11) NOT NULL auto_increment,
+ title varchar(255),
+ name varchar(255),
+ description text,
+ hits int(11),
+ fotos int(11),
+ datum timestamp(14),
+ PRIMARY KEY (id_album)
+);
+
+#
+# Table structure for table 'articles'
+#
+CREATE TABLE articles (
+ id_article int(11) NOT NULL auto_increment,
+ id_rubrika int(11) DEFAULT '0' NOT NULL,
+ datum datetime,
+ nazov varchar(120),
+ short_desc text,
+ autor varchar(255),
+ id_rubrika_secondary int(11),
+ title_image varchar(100),
+ on_main enum('yes','no') DEFAULT 'no',
+ hits int(11),
+ text1 text,
+ text2 text,
+ text3 text,
+ image1 varchar(40),
+ image2 varchar(40),
+ image3 varchar(40),
+ id_diskuse int(11),
+ prispevky int(11),
+ gallery varchar(200),
+ photos text,
+ keywords text,
+ PRIMARY KEY (id_article)
+);
+
+#
+# Table structure for table 'category'
+#
+CREATE TABLE category (
+ category_id int(11) NOT NULL auto_increment,
+ category_name char(255),
+ category_owner int(11) DEFAULT '1',
+ category_forums int(11) DEFAULT '0',
+ category_parent int(11),
+ category_subcats int(11) DEFAULT '0',
+ category_tree char(23) DEFAULT '' NOT NULL,
+ PRIMARY KEY (category_id)
+);
+
+#
+# Table structure for table 'dennik'
+#
+CREATE TABLE dennik (
+ id int(4) NOT NULL auto_increment,
+ autor int(3),
+ nadpis varchar(100),
+ datum datetime,
+ zapis text,
+ id_diskuse int(11) DEFAULT '0',
+ hits int(11) DEFAULT '0',
+ prispevky int(11) DEFAULT '0',
+ dennik_type enum('journaux','report','story','dream','poetry','portugal') DEFAULT 'journaux',
+ type enum('private','public','kyberia') DEFAULT 'public',
+ PRIMARY KEY (id),
+ KEY id (id),
+ KEY id_diskuse (id_diskuse)
+);
+
+#
+# Table structure for table 'diskuse'
+#
+CREATE TABLE diskuse (
+ id_diskuse int(11) NOT NULL auto_increment,
+ kat varchar(64) DEFAULT '' NOT NULL,
+ pocet_prispevku int(11) DEFAULT '0' NOT NULL,
+ zalozeno datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ titulek varchar(255),
+ PRIMARY KEY (id_diskuse),
+ KEY idx_pocet_prispevku (pocet_prispevku)
+);
+
+#
+# Table structure for table 'forum'
+#
+CREATE TABLE forum (
+ forum_id int(11) NOT NULL auto_increment,
+ forum_name varchar(255),
+ forum_type enum('flat','threaded') DEFAULT 'flat',
+ forum_owner int(11) DEFAULT '38',
+ forum_submissions int(11) DEFAULT '0',
+ forum_public enum('private','public') DEFAULT 'public',
+ forum_co enum('yes','no') DEFAULT 'no',
+ forum_category int(11),
+ forum_guild int(11),
+ PRIMARY KEY (forum_id)
+);
+
+#
+# Table structure for table 'forum_info'
+#
+CREATE TABLE forum_info (
+ forum_id int(11) DEFAULT '0' NOT NULL,
+ forum_info text,
+ PRIMARY KEY (forum_id)
+);
+
+#
+# Table structure for table 'friends'
+#
+CREATE TABLE friends (
+ user_id int(11) DEFAULT '0' NOT NULL,
+ friend_id int(11) DEFAULT '0' NOT NULL,
+ friend_text text
+);
+
+#
+# Table structure for table 'guild'
+#
+CREATE TABLE guild (
+ guild_id int(11) NOT NULL auto_increment,
+ guild_name char(200) DEFAULT '' NOT NULL,
+ PRIMARY KEY (guild_id)
+);
+
+#
+# Table structure for table 'intros'
+#
+CREATE TABLE intros (
+ id_intro int(11) NOT NULL auto_increment,
+ id_forum int(11),
+ id_user text,
+ text text,
+ PRIMARY KEY (id_intro)
+);
+
+#
+# Table structure for table 'k_logs'
+#
+CREATE TABLE k_logs (
+ donor_id int(11) DEFAULT '0' NOT NULL,
+ acceptor_id int(11) DEFAULT '0' NOT NULL,
+ k_amount int(11),
+ node_id int(11),
+ node_type enum('dennik','submission'),
+ timestamp timestamp(14)
+);
+
+#
+# Table structure for table 'kbs_category'
+#
+CREATE TABLE kbs_category (
+ category_id int(11) NOT NULL auto_increment,
+ category_name char(255),
+ category_parent int(11),
+ category_tree char(23),
+ PRIMARY KEY (category_id)
+);
+
+#
+# Table structure for table 'kbs_items_get'
+#
+CREATE TABLE kbs_items_get (
+ item_id int(11) NOT NULL auto_increment,
+ user_id int(11),
+ name varchar(123),
+ description text,
+ type set('get','buy','exchange'),
+ price int(11),
+ location varchar(123),
+ PRIMARY KEY (item_id)
+);
+
+#
+# Table structure for table 'kbs_items_give'
+#
+CREATE TABLE kbs_items_give (
+ item_id int(11) NOT NULL auto_increment,
+ user_id int(11),
+ name varchar(123),
+ description text,
+ type set('give','sell','exchange','auction'),
+ price int(11),
+ auction_id int(11),
+ category_id int(11),
+ location varchar(123),
+ PRIMARY KEY (item_id)
+);
+
+#
+# Table structure for table 'last_submissions'
+#
+CREATE TABLE last_submissions (
+ forum_id int(11),
+ submission_owner int(11) DEFAULT '0' NOT NULL,
+ submission_text text DEFAULT '' NOT NULL,
+ submission_timestamp timestamp(14),
+ submission_thread varchar(60) DEFAULT '' NOT NULL,
+ submission_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (submission_id),
+ UNIQUE submission_index (submission_id,forum_id,submission_owner),
+ KEY submission_owner (submission_owner)
+);
+
+#
+# Table structure for table 'links'
+#
+CREATE TABLE links (
+ link_id int(11) NOT NULL auto_increment,
+ link_text char(255),
+ link_submission int(11) DEFAULT '0' NOT NULL,
+ link_owner int(11) DEFAULT '0' NOT NULL,
+ link_forum int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (link_id)
+);
+
+#
+# Table structure for table 'mail'
+#
+CREATE TABLE mail (
+ mail_id int(11) NOT NULL auto_increment,
+ mail_from int(11) DEFAULT '0' NOT NULL,
+ mail_to int(11) DEFAULT '0' NOT NULL,
+ mail_text text,
+ mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ mail_no int(11) DEFAULT '0',
+ mail_to_name varchar(20),
+ PRIMARY KEY (mail_id),
+ UNIQUE mail_order (mail_id,mail_no,mail_to,mail_from),
+ KEY mail_from (mail_from),
+ KEY mail_to (mail_to),
+ KEY mail (mail_from,mail_to)
+);
+
+#
+# Table structure for table 'mail2'
+#
+CREATE TABLE mail2 (
+ mail_id int(11) NOT NULL auto_increment,
+ mail_user int(11) DEFAULT '0' NOT NULL,
+ mail_from int(11) DEFAULT '0' NOT NULL,
+ mail_to int(11) DEFAULT '0' NOT NULL,
+ mail_text text,
+ mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ PRIMARY KEY (mail_id),
+ KEY mail_user (mail_user,mail_id),
+ KEY mail1 (mail_user,mail_to),
+ KEY mail_to (mail_to),
+ KEY mail_from (mail_from)
+);
+
+#
+# Table structure for table 'mail_from'
+#
+CREATE TABLE mail_from (
+ mail_id int(11) NOT NULL auto_increment,
+ mail_from int(11) DEFAULT '0' NOT NULL,
+ mail_to int(11) DEFAULT '0' NOT NULL,
+ mail_text text,
+ mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ PRIMARY KEY (mail_id),
+ UNIQUE mail_order (mail_id,mail_to,mail_from),
+ KEY mail_from (mail_from),
+ KEY mail_to (mail_to),
+ KEY mail (mail_from,mail_to)
+);
+
+#
+# Table structure for table 'mail_to'
+#
+CREATE TABLE mail_to (
+ mail_id int(11) NOT NULL auto_increment,
+ mail_from int(11) DEFAULT '0' NOT NULL,
+ mail_to int(11) DEFAULT '0' NOT NULL,
+ mail_text text,
+ mail_timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ PRIMARY KEY (mail_id),
+ UNIQUE mail_order (mail_id,mail_to,mail_from),
+ KEY mail_from (mail_from),
+ KEY mail_to (mail_to),
+ KEY mail (mail_from,mail_to)
+);
+
+#
+# Table structure for table 'mailinfo'
+#
+CREATE TABLE mailinfo (
+ email varchar(50),
+ datum datetime,
+ active enum('yes','no')
+);
+
+#
+# Table structure for table 'mmm_articles'
+#
+CREATE TABLE mmm_articles (
+ id_article int(11) NOT NULL auto_increment,
+ id_rubrika int(11) DEFAULT '0' NOT NULL,
+ datum datetime,
+ nazov varchar(120),
+ short_desc text,
+ autor varchar(255),
+ id_rubrika_secondary int(11),
+ title_image varchar(100),
+ on_main enum('yes','no') DEFAULT 'no',
+ hits int(11),
+ text1 text,
+ text2 text,
+ text3 text,
+ image1 varchar(40),
+ image2 varchar(40),
+ image3 varchar(40),
+ id_diskuse int(11),
+ prispevky int(11),
+ PRIMARY KEY (id_article)
+);
+
+#
+# Table structure for table 'node_access'
+#
+CREATE TABLE node_access (
+ node_type enum('forum','journaux') DEFAULT 'forum' NOT NULL,
+ node_id int(11) DEFAULT '0' NOT NULL,
+ user_id int(11) DEFAULT '0' NOT NULL,
+ access_type enum('master','op','access','ban') DEFAULT 'access' NOT NULL,
+ UNIQUE access (node_type,user_id,node_id)
+);
+
+#
+# Table structure for table 'outro'
+#
+CREATE TABLE outro (
+ id_outro int(11) NOT NULL auto_increment,
+ outro text,
+ autor varchar(100),
+ PRIMARY KEY (id_outro)
+);
+
+#
+# Table structure for table 'personalize'
+#
+CREATE TABLE personalize (
+ mail varchar(100) DEFAULT '' NOT NULL,
+ java enum('yes','no') DEFAULT 'no',
+ flash enum('yes','no') DEFAULT 'no',
+ wired enum('yes','no') DEFAULT 'no',
+ shadowbox enum('yes','no') DEFAULT 'no',
+ zion enum('yes','no') DEFAULT 'no',
+ sound enum('yes','no') DEFAULT 'no',
+ article_count int(4) DEFAULT '15',
+ nick varchar(30),
+ skin int(5),
+ partylist enum('yes','no') DEFAULT 'no',
+ underground enum('yes','no') DEFAULT 'no',
+ mailinfo varchar(50) DEFAULT 'no',
+ PRIMARY KEY (mail)
+);
+
+#
+# Table structure for table 'poll_options'
+#
+CREATE TABLE poll_options (
+ id_option int(11) NOT NULL auto_increment,
+ id_poll int(11),
+ text varchar(255),
+ number int(11),
+ PRIMARY KEY (id_option),
+ KEY id_poll (id_poll)
+);
+
+#
+# Table structure for table 'polls'
+#
+CREATE TABLE polls (
+ id_poll int(11) NOT NULL auto_increment,
+ time timestamp(14),
+ question varchar(255),
+ responses int(11) DEFAULT '0' NOT NULL,
+ forum_id int(11),
+ PRIMARY KEY (id_poll),
+ KEY id_poll (id_poll),
+ KEY forum_id (forum_id)
+);
+
+#
+# Table structure for table 'prispevky'
+#
+CREATE TABLE prispevky (
+ id_prispevku int(11) NOT NULL auto_increment,
+ id_diskuse int(11) DEFAULT '0' NOT NULL,
+ vlozeno datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ jmeno varchar(255) DEFAULT '' NOT NULL,
+ email varchar(255) DEFAULT '' NOT NULL,
+ email_upozorneni enum('ne','ano') DEFAULT 'ne' NOT NULL,
+ www varchar(255) DEFAULT '' NOT NULL,
+ titulek varchar(255) DEFAULT '' NOT NULL,
+ telo text DEFAULT '' NOT NULL,
+ thread varchar(255) DEFAULT '' NOT NULL,
+ znamka tinyint(4) DEFAULT '0' NOT NULL,
+ duplicita varchar(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (id_prispevku)
+);
+
+#
+# Table structure for table 'referers'
+#
+CREATE TABLE referers (
+ referer varchar(255),
+ adresa varchar(100),
+ cas timestamp(14),
+ id int(11)
+);
+
+#
+# Table structure for table 'rss_items'
+#
+CREATE TABLE rss_items (
+ id int(11) NOT NULL auto_increment,
+ id_module int(11),
+ title varchar(255),
+ link varchar(255),
+ description text,
+ active enum('yes','no') DEFAULT 'yes',
+ datetime timestamp(14),
+ poradi int(11),
+ imagelink varchar(255),
+ imagetitle varchar(255),
+ imageurl varchar(255),
+ PRIMARY KEY (id)
+);
+
+#
+# Table structure for table 'rss_news'
+#
+CREATE TABLE rss_news (
+ news_id int(8) NOT NULL auto_increment,
+ news_desc varchar(255),
+ news_title varchar(200),
+ news_url varchar(200),
+ news_image varchar(200),
+ news_md5 varchar(25) DEFAULT '' NOT NULL,
+ news_image_link varchar(25) DEFAULT '' NOT NULL,
+ news_image_title varchar(25) DEFAULT '' NOT NULL,
+ news_source int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (news_id)
+);
+
+#
+# Table structure for table 'rss_sources'
+#
+CREATE TABLE rss_sources (
+ rss_id int(8) NOT NULL auto_increment,
+ rss_source varchar(200),
+ rss_title varchar(200),
+ rss_url varchar(200),
+ rss_image varchar(200),
+ rss_hash varchar(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rss_id)
+);
+
+#
+# Table structure for table 'rubriky'
+#
+CREATE TABLE rubriky (
+ id_rubriky int(11) NOT NULL auto_increment,
+ id_parent int(11),
+ nazov varchar(60),
+ obrazok varchar(100),
+ description text,
+ hits int(11),
+ PRIMARY KEY (id_rubriky)
+);
+
+#
+# Table structure for table 'session'
+#
+CREATE TABLE session (
+ session varchar(50),
+ user_name varchar(30),
+ user_action varchar(20),
+ user_action_id int(11),
+ user_action_name varchar(30),
+ user_id int(11) DEFAULT '0' NOT NULL,
+ user_idle timestamp(14),
+ user_mode enum('normal','depresia','stastie','LASKA','vykaleny','nasrany','invisible') DEFAULT 'normal',
+ user_amount int(9) DEFAULT '23' NOT NULL,
+ user_mode_message varchar(200) DEFAULT '' NOT NULL,
+ admin enum('yes','no') DEFAULT 'no',
+ UNIQUE user_id (user_id)
+);
+
+#
+# Table structure for table 'submissions'
+#
+CREATE TABLE submissions (
+ forum_id int(11),
+ submission_owner int(11) DEFAULT '0' NOT NULL,
+ submission_text text DEFAULT '' NOT NULL,
+ submission_timestamp datetime,
+ submission_thread varchar(60) DEFAULT '' NOT NULL,
+ submission_id int(11) NOT NULL auto_increment,
+ submission_k int(8) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (submission_id),
+ UNIQUE submission_index (submission_id,forum_id,submission_owner),
+ KEY submission_owner (submission_owner),
+ KEY lala (forum_id,submission_owner),
+ KEY lalala (forum_id,submission_owner,submission_id),
+ KEY submission_timestamp (submission_timestamp),
+ KEY k (submission_k)
+);
+
+#
+# Table structure for table 'user'
+#
+CREATE TABLE user (
+ id int(3) NOT NULL auto_increment,
+ email varchar(50),
+ login varchar(20),
+ password varchar(128),
+ last_login timestamp(14),
+ user_action varchar(20),
+ user_mode enum('off','normal','happy','depka','nasracky','neviditelny') DEFAULT 'off',
+ user_action_param_name varchar(50),
+ user_action_param_value varchar(50),
+ user_action_param_id int(11),
+ user_ad enum('yes','no') DEFAULT 'yes',
+ user_info text,
+ user_registered timestamp(14),
+ user_mail int(3) DEFAULT '0',
+ user_icq varchar(20) DEFAULT '' NOT NULL,
+ user_www varchar(100),
+ user_active enum('yes','no','waiting'),
+ mail_name varchar(23),
+ charisma int(11) DEFAULT '0' NOT NULL,
+ user_amount int(11) DEFAULT '23',
+ user_happy varchar(200) DEFAULT '' NOT NULL,
+ user_sad varchar(200) DEFAULT '' NOT NULL,
+ user_love varchar(200) DEFAULT '' NOT NULL,
+ user_agressive varchar(200) DEFAULT '' NOT NULL,
+ user_drugged varchar(200) DEFAULT '' NOT NULL,
+ user_k int(11) DEFAULT '0' NOT NULL,
+ user_karma int(11) DEFAULT '0' NOT NULL,
+ admin enum('yes','no') DEFAULT 'no',
+ PRIMARY KEY (id),
+ UNIQUE id (id)
+);
+
+#
+# Table structure for table 'user_discussion'
+#
+CREATE TABLE user_discussion (
+ user_id int(11),
+ discussion_id int(11),
+ submission_count int(11),
+ last_visit datetime,
+ KEY user_id (user_id),
+ KEY discussion_id (discussion_id)
+);
+
+#
+# Table structure for table 'user_forum'
+#
+CREATE TABLE user_forum (
+ user_id int(11) DEFAULT '0' NOT NULL,
+ forum_id int(11) DEFAULT '0' NOT NULL,
+ submission_count int(11) DEFAULT '0',
+ last_visit datetime DEFAULT '0000-00-00 00:00:00',
+ user_bookmark enum('yes','no') DEFAULT 'no',
+ UNIQUE user_forum (user_id,forum_id),
+ KEY booked_users (forum_id,user_bookmark)
+);
+
+#
+# Table structure for table 'user_ip'
+#
+CREATE TABLE user_ip (
+ user_id int(11),
+ ip char(23),
+ datetime timestamp(14)
+);
+
+#
+# Table structure for table 'user_poll'
+#
+CREATE TABLE user_poll (
+ user_id int(11) DEFAULT '0' NOT NULL,
+ poll_id int(11) DEFAULT '0' NOT NULL
+);
+
--- /dev/null
+<?php
+switch ($_POST['event']) {
+ case 'register' :
+ eventz::userRegister();
+ break;
+
+ case 'veto' :
+ eventz::veto();
+ break;
+
+ case 'update forum' :
+ $status=eventz::updateForum();
+ if ($status) Header("Location: ".SCRIPT."?action=admin&subaction=forums&nocache=".time());
+ break;
+
+}
+
+class eventz {
+
+ function userRegister() {
+ global $user_id;
+ global $kyberia;
+ global $user_name;
+ $result=$_POST['result'];
+ $message=$_POST['message'];
+ $action_parameter=$_POST['action_parameter'];
+ $action_result=$_POST['action_result'];
+ $user_info=$_POST['user_info'];
+ $login=$_POST['login'];
+ $email=$_POST['email'];
+ $data_1="$login<br>$email<br>$user_info";
+ $data_2="komentar od registratora $user_name :: $message";
+ $q="insert into admin set action_timestamp=NOW(),action_name='register',action_parameter='$action_parameter',action_result='$action_result',action_data_2='$data_2',action_data_1='$data_1',admin_id='$user_id'";
+ $kyberia->executeQuery($q);
+ $kyberia->query("update user set user_active='waiting' where id='$action_parameter'");
+
+ }
+
+
+ function veto() {
+ global $kyberia;
+ global $user_id;
+ $action_id=$_GET['action_id'];
+
+ }
+
+ function updateForum() {
+ global $user_id;
+ global $kyberia;
+ $forum_id=$_POST['forum_id'];
+ $forum_name=$_POST['forum_name'];
+ $forum_category=$_POST['forum_category'];
+ $forum_owner=$_POST['forum_owner'];
+ $set=$kyberia->query("select id from user where login='$forum_owner'");
+ if (!$set->getNumRows()) {
+ $error="uzivatel s danym menom neexistuje";
+ return false;
+ }
+ $set->next();
+ $forum_owner=$set->getString('id');
+ $q="insert into forum set forum_name='$forum_name',forum_owner='$forum_owner',forum_category='$forum_category',forum_id='$forum_id'";
+// echo $q;
+ $kyberia->query($q);
+ return true;
+ }
+
+
+}
--- /dev/null
+<?php
+define('DB_DATABASE','kyberia');
+define('DB_HOST','127.0.0.1:3307');
+define('DB_USER','kyberia');
+define('DB_PASS','db.h-k.sk');
+?>
--- /dev/null
+<?php
+
+include_once ("result.inc");
+include_once ("configdb.inc");
+
+class CLASS_DATABASE {
+
+var $Database=DB_DATABASE;
+var $User=DB_USER;
+var $Password=DB_PASS;
+var $Url=DB_HOST;
+
+var $_linkId = false;
+var $_url = "";
+var $_user = "";
+var $_password = "";
+var $_database = "kyberia";
+var $_halt_on_error = true;
+function CLASS_DATABASE () {
+$this->connect("$this->Url","$this->User","$this->Password","$this->Database");
+}
+
+function connect($url, $user, $password, $database, $halt_on_error = true) {
+ $this->_halt_on_error = $halt_on_error;
+ if ($this->_linkId == false) {
+ $this->_linkId=mysql_connect($url, $user, $password);
+ if ($this->_linkId == false) {
+ $this->exception("weej databazka to nerozdychava ;)");
+ return false;
+ die();
+ }
+ $this->_url=$url;
+ $this->_user=$user;
+ $this->_password=$password;
+ if ($this->_linkId == false || mysql_select_db($database, $this->_linkId) == false) {
+ $this->exception("1Database failed.");
+ return false;
+ die();
+ }
+ $this->_database=$database;
+ }
+ return true;
+}
+
+function closeMysql() {
+ mysql_close($this->_linkId);
+}
+
+function query($sql) {
+ global $user_id;
+ if ($user_id==220 && $_GET['debug']) echo $sql;
+ $this->_queryId = mysql_db_query($this->_database,$sql,$this->_linkId);
+ if ($this->_queryId == false) {
+ $this->exception("query failed ::$sql::");
+ }
+
+ return new result($this->_queryId, $sql);
+ }
+
+
+function executequery($sql) {
+ return($this->query($sql));
+}
+
+function executeupdate($sql) {
+ return($this->update($sql));
+}
+
+function update($sql) {
+
+ $this->_queryId = @mysql_db_query($this->_database,$sql,$this->_linkId);
+ if ($this->_queryId == false) {
+ $this->exception("update failed.");
+ }
+ $rows=@mysql_affected_rows($this->_linkId);
+ return($rows);
+}
+
+function getLastInsertId() {
+ return(@mysql_insert_id($this->_linkId));
+}
+
+function exception($errorMessage) {
+ echo "<!-- ";
+ echo @mysql_error($this->_linkId)," (",@mysql_errno($this->_linkId),")";
+ echo "-->";
+ if ($this->_halt_on_error) {
+ die("<pre>".$errorMessage."</pre>");
+ } else {
+ echo $errorMessage."<br>";
+ return false;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+$thread_offset="0";
+include_once("diskusia.inc");\r
+\r
+class DiskuseDesign extends Diskuse {\r
+ \r
+ function DiskuseDesign() {\r
+ $this->Diskuse();\r
+ }\r
+\r
+ function printDiskuse($id_diskuse,$getstring = "") { // zobraz_diskusi\r
+ global $id,$dskn,$ds_j,$ds_e,$ds_x,$dstp,$ds_s,$dssa,$dsks,$dspe,$dvta,$nodouble,$action,$node_id;
+ global $PHP_SELF;
+ if ($ds_s) {
+ if ($action=="articles") {
+ $set=$this->query("SELECT nazov from articles where id_article=$id");
+ $set->next();
+ $nazov=$set->getString("nazov");
+ $dennik="false";
+ }
+ elseif ($action=="journaux") {
+ $set=$this->query("SELECT nadpis from dennik where id='$node_id'");
+ $set->next();
+ $nazov=$set->getString("nadpis");
+ $dennik="false";
+ }
+
+ $this->addPost($dennik,$id,$nazov,$id_diskuse,$ds_j,$ds_e,$ds_x,$dstp,$dspe,$dvta,$nodouble); // pridat_prispevek\r
+ }
+ if ($dskn) {
+ $this->printPosts($id_diskuse,$dskn);
+ $this->printAddPostForm($id_diskuse,$dskn); // pridat_prispevek_form\r
+ }
+ else {
+ $this->printAddPostForm($id_diskuse,$dskn); // pridat_prispevek_form\r
+ $this->printPosts($id_diskuse,""); // vypsat_prispevky\r
+
+ }
+}
+ function printListing($id_diskuse,$getstring = "") {\r
+ \r
+ $width = 400;\r
+
+ $r = $this->getPosts($id_diskuse);\r
+?>\r
+<table border="0" cellpadding="0" cellspacing="0">\r
+<tr><td>\r
+<form action="<?echo SCRIPT."?action=$action"; ?>" method=post>\r
+<table border="0" cellpadding="0" cellspacing="0">\r
+
+</tr>\r
+<tr><td height="5" colspan="2"></td></tr>\r
+</table>\r
+</td></tr>\r
+<tr><td>\r
+<table border="0" cellpadding="0" cellspacing="0">\r
+<tr><td>\r
+<?php\r
+ if ($r->getNumRows() < 6) {\r
+ $size = 6;\r
+ } else {\r
+ $size = $r->getNumRows();\r
+ if ($size > 20) {\r
+ $size = 20;\r
+ }\r
+ }\r
+?>\r
+<select name='dsks[]' multiple style='font-family: Tahoma, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; width: <?= $width ?>;' size='<?= $size ?>'>\r
+<?php\r
+ if ($r->getNumRows() > 0) {\r
+ while ($r->next()) {\r
+ $t = $r->getRecord();\r
+ $l = strlen($t[thread]);\r
+ $zub = ($l+1)/5;\r
+ for ($x = 1; $x < $zub; $x++) {\r
+ $t[titulek] = " ".$t[titulek];\r
+ }\r
+ echo "<option value='$t[id_prispevku]'>$t[f_vlozeno] $t[titulek] ";\r
+ if ($t[jmeno]) echo " ($t[jmeno])";\r
+ echo "</option>\n";\r
+ }\r
+ } else {\r
+ echo "<option>".str_repeat(" ",50)."</option>\n"; // Netscape suxx oprcavka\r
+ }\r
+?>\r
+</select>\r
+</td>\r
+<td><img src="http://gfx.volny.cz/trans.gif" width="8" height="1" alt="."></td>\r
+<td valign="top"><img src='/images/kyb106small.gif' border=0><br><input type="image" src='/images/selected.gif' name="Vybrane" class=noborder vspace="2" border="0"><br>\r
+<a href="<? global $id; echo $PHP_SELF,"?dssa=true&node_id=$node_id";?>"><img src='/images/all.gif' vspace="2" border="0" alt="Vypisat vsetko"></a><br>\r
+<a href="<? echo $PHP_SELF,"?dskn=new&node_id=$node_id"; ?>"><img src='/images/add.gif' alt="Pridat novy prispevoký" vspace="2" border="0"></a><br>\r
+</td>\r
+</tr>\r
+</table>\r
+</td></form></tr>\r
+</table>\r
+<?php\r
+ }\r
+\r
+ function printPosts($id_diskuse,$prispevky = "") {\r
+ // $prispevky = array of id_prispevku'z\r
+ $r = $this->getPosts($id_diskuse,$prispevky);\r
+ if ($r->getNumRows()>0) {\r
+ echo "<br>";\r
+ echo "<big class=titulek><br>Prispevky</big><br><br>";\r
+
+ while ($r->next()) {\r
+ $thread_offset=0;
+ $t = $r->getRecord();\r
+ $zub = (strlen($t[thread])+1)/5;\r
+ $counter++;\r
+ for ($x = 1; $x < $zub; $x++) $thread_offset+=40;
+
+ if ($counter > 1) {\r
+ echo "<hr size=1 color='#6dae42'>";\r
+ }\r
+ echo "<table cellspacing=0 cellpadding=0 border=0><tr>";
+ echo "<td width='$thread_offset'></td>";
+ echo "<td>";
+ if ($t[login]) echo "<img src=http://kyberia.sk/images/users/",strtolower($t[jmeno]),".gif border=0 hspace=5 align=left >";
+ echo "<i>Od: $t[jmeno]";\r
+ if ($t[email]) {\r
+ echo " <<a class=text href='mailto:$t[email]'>$t[email]</a>>";\r
+ }\r
+ if ($t[www]) {\r
+ echo " <a class=text href='$t[www]'>$t[www]</a>";\r
+ }\r
+ global $id;
+ global $node_id;
+ global $action;
+ if ($action=="article" ) echo " [<a href='$PHP_SELF?action=article&node_id=".$_GET['node_id']."&dskn=".$t[id_prispevku]."' class=text>Odpovedat</a>] z $t[f_vlozeno]</i>";\r
+ else echo " [<a href='$PHP_SELF?action=journaux&node_id=$node_id&dskn=".$t[id_prispevku]."' class=text>Odpovedat</a>] z $t[f_vlozeno]</i>";\r
+ echo "<br>\n";\r
+ echo StripSlashes($t[telo]);\r
+ echo "</td></tr></table>";
+ }\r
+ }\r
+ }\r
+\r
+ function printAddPostForm($id_diskuse, $thread_prev = "") {\r
+ global $_COLOR,$_SELF,$_UINFO,$id;
+ $j = trim($_UINFO->_currentRecord[login]);
+ $e = $_UINFO->_currentRecord[email];
+
+
+ if ($thread_prev && $thread_prev != "new") {\r
+ $topiq = $this->getTitulek($id_diskuse,$thread_prev);\r
+ if (!is_int(strpos(strtolower($topiq),"re:"))) {\r
+ $topiq = "Re: ".$topiq;\r
+ }\r
+ }\r
+ if ($IDC) {\r
+ global $SESSION_VETA;\r
+ session_register("SESSION_VETA");\r
+ $znamka = $SESSION_VETA[$IDC];\r
+ }\r
+
+global $user_id;
+if ($user_id) {
+ echo "<br><form action='";
+ global $action;
+ global $dstp;
+ global $id;
+ global $node_id;
+ echo $PHP_SELF;
+ echo "?action=$action";
+ if ($thread_prev) echo "&dstp=$thread_prev";
+ if ($node_id) echo "&node_id=$node_id";
+
+
+ ?>' method='post'>\r
+ <input type=hidden name=nodouble value='<?= md5(time()) ?>'>\r
+ <input type=hidden name=id value=<?=$_GET['id']?>>
+ <table border="0" cellspacing="0" cellpadding="2">\r
+ <tr><td colspan=2><textarea name='ds_x' cols=60 rows=5></textarea><br></td></tr>
+ <input type='hidden' name='ds_j' value='<? global $user_name; echo $user_name;?>'><input type='hidden' name='id' value='<? global $user_id; $user_id;?>'>
+ <tr><td class=mini colspan=2><input class=noborder type=checkbox name=dspe> po\9ali mi postu na kyberke, ked niekto dalsi prispeje do diskusie</td></tr>\r
+ <tr><td colspan=2 align=center><input type='submit' name='ds_s' value='Vlo\9eit prispevok'></td></tr></form>\r
+ </table>\r
+<?php\r
+}
+else echo "<br><br><center><b>Z dovodu primitivizmu niektorych jedincov a mojich nevyburenych fasizoidnych tendencii mozu pridavat prispevky iba <a href='".SCRIPT."?action=register'>zaregistrovany</a> a prihlaseny uzivatelia.Pokial si zaregistrovany zaloguj sa dnu & sorry<br><form method='post'>login: <input type='text' name='login'> heslo: <input type='password' name='password'> <input type='submit' name='event' value='login'><input type='hidden' name='action' value='login'><input type='hidden' name='node_id' value='$node_id'></form></b></center>";
+}
+
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php
+// requires: Email, String
+
+
+include_once("database.inc");
+include_once("string.inc");
+include_once("email.inc");
+class Diskuse extends CLASS_DATABASE {
+
+ function Diskuse() {
+ $this->CLASS_DATABASE();
+
+ }
+
+ function addPost($dennik,$id_clanku,$nazov,$id_diskuse, $jmeno = "",$email = "",$telo = "",$thread_prev = "",$posli_email = "",$znamka = 0,$nodouble = "") {
+
+ if ($id_diskuse && ($titulek || $telo)) {
+ if ($nodouble) {
+ $q = "SELECT id_prispevku FROM prispevky WHERE duplicita = '$nodouble'";
+ $set = $this->executeQuery($q);
+ if ($set->getNumRows()) return false;
+ }
+ $diskuseinfo = $this->getDiskuseInfo($id_diskuse);
+ if (strlen($telo) > 25 && strpos($telo," ",25)) {
+ $titulek = substr($telo,0,strpos($telo," ",25))."...";
+ } else {
+ $titulek = $telo;
+ }
+ $jmeno = strip_tags($jmeno);
+ $email = strip_tags($email);
+ $telo = strip_tags($telo,'<a><b><i><u>');
+ $telo = nl2br($telo);
+ if ($thread_prev) {
+ $q = "SELECT thread FROM prispevky WHERE id_prispevku = '$thread_prev' AND id_diskuse = '$id_diskuse'";
+ $r = $this->executeQuery($q);
+ if ($r->getNumRows()) {
+ $r->next();
+ $t = $r->getRecord();
+ $thread = $t[thread];
+ $len = strlen($thread);
+ } else {
+ $len = -1;
+ }
+ } else {
+ $len = -1;
+ }
+ if ($len > 0) {
+ $q = "SELECT MAX(SUBSTRING(thread FROM ".($len+2)." FOR 4)) AS max ";
+ } else {
+ $q = "SELECT MAX(SUBSTRING(thread FROM 1 FOR 4)) AS max ";
+ }
+ $q.= "FROM prispevky WHERE id_diskuse = '$id_diskuse'";
+ if ($len > 0) {
+ $q.= " AND SUBSTRING(thread FROM 1 FOR ".$len.") = '$thread'";
+ }
+ $r = $this->executeQuery($q);
+ $r->next();
+ $s = $r->getRecord();
+ $telo = wordwrap($telo,50," ",1);
+ $newthread = $thread.($thread?".":"").sprintf("%04s",$s[max]+1);
+ if ($posli_email) {
+ $posli_email = 'ano';
+ } else {
+ $posli_email = 'ne';
+ }
+ $telo = AddSlashes(EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$telo));
+ $titulek = AddSlashes(EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$titulek));
+
+ $q = "INSERT INTO prispevky (id_diskuse,vlozeno,jmeno,email,titulek,telo,thread,email_upozorneni,znamka,duplicita) ";
+ $q.= "VALUES ('$id_diskuse', NOW(), '$jmeno', '$email', '$titulek', '$telo', '$newthread', '$posli_email', '$znamka', '$nodouble')";
+ $this->executeUpdate($q);
+ $dskn=$this->getLastInsertId();
+ $q="UPDATE user_discussion set submission_count=submission_count+1 where user_id!='$user_id' and discussion_id= '$id_diskuse'";
+ $this->query($q);
+ if (!$dennik) $q ="UPDATE articles set prispevky=prispevky+1 where id_diskuse='$id_diskuse'";
+ else $q ="UPDATE dennik set prispevky=prispevky+1 where id_diskuse='$id_diskuse'";
+ $this->executeUpdate($q);
+ $this->updatePostsCount($id_diskuse); // prepocitat_pocet_prispevku
+
+ $r = $this->getEmailSubscriptions($id_diskuse);
+ if ($r->getNumRows()>0) {
+ $link="?action=".$_GET['action']."&node_id=".$_GET['node_id'];
+ $mailbody="Do diskusie pribudol novy prispevok.<br>Od: <i>$jmeno</i><br><b>$telo</b><br><br>Zareagovat mozes <a href='".SCRIPT.$link."'>tu</a>.<br>";
+ while ($r->next()) {
+ $row = $r->getRecord();
+
+ if ($user_id != $row["user_id"]) {
+ global $kyberia;
+
+ $kyberia->ubikMail($row['user_id'],$mailbody);
+ //mail($row["email"],'prispevok do fora na kyberia.sk',$mailbody,"From: forum@kyberia.sk\nReturn-path: forum@kyberia.sk");
+ }
+ }
+ }
+ }
+ }
+
+ function getEmailSubscriptions($id_diskuse) {
+ $q = "SELECT prispevky.jmeno,user.id as user_id FROM prispevky left join user on prispevky.jmeno=user.login WHERE id_diskuse = '$id_diskuse' AND email_upozorneni = 'ano' GROUP BY user.login";
+
+ return $this->executeQuery($q);
+ }
+
+ function getDiskuseInfo($id_diskuse) {
+ $set = $this->executeQuery("SELECT * FROM diskuse WHERE id_diskuse = '$id_diskuse'");
+ $set->next();
+ return $set->getRecord();
+ }
+
+ function updatePostsCount($id_diskuse) {
+ $r = $this->executeQuery("SELECT COUNT(*) AS pocet FROM prispevky WHERE id_diskuse = '$id_diskuse'");
+ $r->next();
+ if ($r->getInt("pocet") > 0)
+ {
+ $this->executeUpdate("UPDATE diskuse SET pocet_prispevku = '".$r->getInt("pocet")."' WHERE id_diskuse = '$id_diskuse'");
+ }
+ }
+
+ function getDiskuses($parameters = "") {
+ $q = "SELECT id_diskuse,kat,titulek,url,pocet_prispevku FROM diskuse";
+ if ($parameters[where]) $q.= " WHERE ".$parameters["where"];
+ if ($parameters[order]) $q.= " ORDER BY ".$parameters["order"];
+ if ($parameters[limit]) $q.= " LIMIT ".$parameters["limit"];
+ return $this->executeQuery($q);
+ }
+
+ function getPosts($id_diskuse,$prispevky = "") {
+ $q = "SELECT user.login as login, prispevky.*,DATE_FORMAT(prispevky.vlozeno,'%e.%c. %H:%i') AS f_vlozeno FROM prispevky LEFT join user ON prispevky.jmeno=user.login WHERE id_diskuse = '$id_diskuse' ";
+ if (is_array($prispevky)) {
+ $q.= " AND ( 1=0 ";
+ while (list($x,$a) = each($prispevky)) {
+ $q.= "OR id_prispevku = '$a' ";
+ }
+ $q.= " ) ";
+ }
+ if ($prispevky) $q.=" AND id_prispevku='$prispevky' ";
+ $q.= "group by id_prispevku ORDER BY CONCAT(thread,vlozeno) DESC";
+ return $this->executeQuery($q);
+ }
+
+ function createDiskuse($titulek="title",$kat = "") {
+ $q = "INSERT INTO diskuse (id_diskuse,kat,zalozeno,titulek) VALUES (0,'$kat',NOW(),'$titulek')";
+ $this->query($q);
+ return ($this->getLastInsertId());
+ }
+
+ function getPostsCount($id_diskuse) {
+ $row = $this->getDiskuseInfo($id_diskuse);
+ return $row["pocet_prispevku"];
+ }
+
+ function getTitulek($id_diskuse,$thread_prev) {
+ $q = "SELECT titulek FROM prispevky WHERE id_diskuse = '$id_diskuse' AND id_prispevku = '$thread_prev'";
+ $r = $this->executeQuery($q);
+ $r->next();
+ return $r->getString("titulek");
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * Email.inc 1.00 2001/03/08
+ *
+ * Copyright 2001 Czech On Line a.s. All Rights Reserved.
+ */
+
+
+
+/**
+ * see class.html.mime.mail.inc for more details about
+ * send email functions
+*/
+class Email {
+
+ function Email() {
+ }
+
+ /**
+ * is e-mail address valid ?
+ *
+ * @param email e-mail addess
+ *
+ * @return true or false
+ */
+ function isValidEmail($email) {
+ // valid e-mail address must contain @
+ if (strpos($email,'@') == 0) {
+ return false;
+ }
+ // validace domeny proti DNS
+ if (getmxrr($domain.".",$null) == false) return false;
+
+ return true;
+ }
+
+ /**
+ * Validate e-mail address
+ * tries to correct invalid e-mail
+ *
+ * @param email e-mail addess
+ *
+ * @return the original e-mail address or modified e-mail address
+ */
+ function validateEmail($email) {
+
+ // replace .cy to .cz
+ $email = eregi_replace("\.cy$",".cz",$email);
+
+ // domain doen't contain ., let's add .cz
+ $domain = substr($email,strpos($email,"@")+1,1024);
+ if (strpos($domain,".") == 0) {
+ $domain.=".sk";
+ $email.=".sk";
+ }
+ return $email;
+ }
+
+ function isEmailRegexpValid($email) {
+ if (eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$", $email)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+}
+?>
--- /dev/null
+<?php
+switch ($_POST['event']) {
+ case 'pridaj priatela':
+ $status=eventz::addfriend();
+ if ($status) {
+ Header("Location:".ACTION_SCRIPT."friends");
+ }
+ else echo $error;
+ break;
+
+}
+
+class eventz {
+
+function addfriend() {
+ global $kyberia;
+ global $user_id;
+ $friend_text=$_POST['friend_text'];
+ $friend_name=$_POST['friend_name'];
+
+ $q="select id from user where login='$friend_name'";
+ $result=$kyberia->query($q);
+ $result->next();
+ $friend=$result->getRecord();
+ $friend_id=$friend['id'];
+
+ if ($friend_id==$user_id) {
+ global $error;
+ $error="egotrip?";
+ return false;
+ }
+
+ elseif ($friend_id) {
+ $friend_text=strip_tags($friend_text,'<a><b><i><u><img><br><p><font>');
+ $friend_text=str_replace("\n","<br>",$friend_text);
+ $friend_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a href=\"\\6\\7\">\\6\\7</a>",$friend_text);
+ $friend_text=addslashes($friend_text);
+ $q="insert into friends set user_id='$user_id',friend_text='$friend_text',friend_id='$friend_id'";
+ $result=mysql_query($q);
+ $kyberia->ubikMail($friend_id,"Uzivatel $user_name si ta pridal medzi priatelov s textom: $friend_text");
+ }
+
+ else {
+ global $error;
+ $error="Uzivatel neexistuje!";
+ return false;
+ }
+}
+
+
+}
--- /dev/null
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP version 4.0 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Stig Bakken <ssb@fast.no> |
+// | Urs Gehrig <urs@circle.ch> |
+// +----------------------------------------------------------------------+
+//
+// $Id: form.inc,v 1.1.1.1 2003/04/18 11:10:05 kybu Exp $
+//
+// HTML form utility functions.
+//
+
+if (!defined('HTML_FORM_TEXT_SIZE')) {
+ define('HTML_FORM_TEXT_SIZE', 20);
+}
+
+class HTML_Form {
+ // {{{ properties
+
+ /** ACTION attribute of <FORM> tag */
+ var $action;
+
+ /** METHOD attribute of <FORM> tag */
+ var $method;
+
+ /** NAME attribute of <FORM> tag */
+ var $name;
+
+ /** an array of entries for this form */
+ var $fields;
+
+ /** DB_storage object, if tied to one */
+ var $storageObject;
+ var $onSubmit;
+ /** Encryption type */
+ var $enctype;
+ // }}}
+
+ // {{{ constructor
+
+ function HTML_Form($action, $method = 'GET', $name = '', $enctype = '',$onsubmit=false) {
+ $this->enctype = $enctype;
+ $this->action = $action;
+ $this->method = $method;
+ $this->name = $name;
+ $this->fields = array();
+ $this->onSubmit = $onsubmit;
+}
+
+ // }}}
+
+ // {{{ addText()
+
+ function addText($name, $title, $default, $size = HTML_FORM_TEXT_SIZE) {
+ $this->fields[] = array("text", $name, $title, $default, $size);
+ }
+
+ // }}}
+ // {{{ addPassword()
+
+ function addFile($name,$title,$accept="image/*,text/plain") {
+ $this->fields[]= array("file",$name,$title,$accept);
+ }
+
+ function addPassword($name, $title, $default, $size = HTML_FORM_PASSWD_SIZE) {
+ $this->fields[] = array("password", $name, $title, $default, $size);
+ }
+
+ // }}}
+ // {{{ addCheckbox()
+
+ function addCheckbox($name, $title, $default) {
+ $this->fields[] = array("checkbox", $name, $title, $default);
+ }
+
+ // }}}
+ // {{{ addTextarea()
+
+ function addTextarea($name, $title, $default,
+ $width = HTML_FORM_TEXTAREA_WT,
+ $height = HTML_FORM_TEXTAREA_HT) {
+ $this->fields[] = array("textarea", $name, $title, &$default, $width, $height);
+ }
+
+ // }}}
+ // {{{ addSubmit
+
+ function addSubmit($name = "submit", $title = "Submit Changes") {
+ $this->fields[] = array("submit", $name, $title);
+ }
+
+ // }}}
+ // {{{ addReset()
+
+ function addReset($title = "Discard Changes") {
+ $this->fields[] = array("reset", $title);
+ }
+
+ // }}}
+ // {{{ addSelect()
+
+ function addSelect($name, $title, $entries, $default = '', $size = 1,
+ $blank = '', $multiple = false) {
+ $this->fields[] = array("select", $name, $title, &$entries, $default, $size,
+ $blank, $multiple);
+ }
+
+ // }}}
+ // {{{ addRadio()
+
+ function addRadio($name, $title, $value, $default) {
+ $this->fields[] = array("radio", $name, $title, $value, $default);
+ }
+
+ // }}}
+ // {{{ addImage()
+
+ function addImage($name, $src) {
+ $this->fields[] = array("image", $name, $src);
+ }
+
+ // }}}
+ // {{{ addHidden()
+
+ function addHidden($name, $value) {
+ $this->fields[] = array("hidden", $name, $value);
+ }
+
+ // }}}
+
+ // {{{ start()
+
+ function start() {
+ print "<FORM ACTION=\"" . basename ($this->action) . "\" METHOD=\"$this->method\"";
+ if ($this->name) {
+ print " NAME=\"$this->name\"";
+ }
+ if ($this->enctype) {
+ print " ENCTYPE=\"$this->enctype\"";
+ }
+
+ if($this->onSubmit) {
+ print " onSubmit=\"return validate(this)\"";
+ }
+ print ">";
+ }
+
+ // }}}
+ // {{{ end()
+
+ function end() {
+ $fields = array();
+ reset($this->fields);
+ while (list($i, $data) = each($this->fields)) {
+ if ($data[0] == 'reset') {
+ continue;
+ }
+ $fields[$data[1]] = true;
+ }
+ $this->displayHidden("_fields", implode(":", array_keys($fields)));
+ print "</FORM>";
+ }
+
+ // }}}
+
+ // {{{ displayText()
+function displayFile($name, $accept) {
+ print "<INPUT type=file NAME=\"$name\" accept=\"$accept\">";
+ }
+
+ function displayFileRow($name, $title, $accept) {
+ print " <TR>\n";
+ print " <TH ALIGN=\"right\">$title</TH>";
+ print " <TD>";
+ $this->displayFile($name, $accept);
+ print "</TD>\n";
+ print " </TR>\n";
+ }
+
+ function displayText($name, $default = '', $size = HTML_FORM_TEXT_SIZE) {
+ print "<INPUT NAME=\"$name\" VALUE=\"$default\" SIZE=\"$size\">";
+ }
+
+ // }}}
+ // {{{ displayTextRow()
+
+ function displayTextRow($name, $title, $default = '', $size = HTML_FORM_TEXT_SIZE) {
+ print " <TR>\n";
+ print " <TH ALIGN=\"right\">$title</TH>";
+ print " <TD>";
+ $this->displayText($name, $default, $size);
+ print "</TD>\n";
+ print " </TR>\n";
+ }
+
+ // }}}
+ // {{{ displayPassword()
+
+ function displayPassword($name, $default = '', $size = HTML_FORM_PASSWD_SIZE) {
+ print "<INPUT NAME=\"$name\" TYPE=\"password\" VALUE=\"$default\" SIZE=\"$size\">";
+ }
+
+ // }}}
+ // {{{ displayPasswordRow()
+
+ function displayPasswordRow($name, $title, $default = '', $size = HTML_FORM_PASSWD_SIZE) {
+ print "<TR>\n";
+ print " <TH ALIGN=\"right\">$title</TH>\n";
+ print " <TD>";
+ $this->displayPassword($name, $default, $size);
+ print " repeat: ";
+ $this->displayPassword($name."2", $default, $size);
+ print "</TD>\n";
+ print "</TR>\n";
+ }
+
+ // }}}
+ // {{{ displayCheckbox()
+
+ function displayCheckbox($name, $default = false) {
+ print "<INPUT TYPE=\"checkbox\" NAME=\"$name\"";
+ if ($default && $default != 'off') {
+ print " CHECKED";
+ }
+ print ">";
+ }
+
+ // }}}
+ // {{{ displayCheckboxRow()
+
+ function displayCheckboxRow($name, $title, $default = false) {
+ print " <TR>\n";
+ print " <TH ALIGN=\"left\">$title</TH>";
+ print " <TD>";
+ $this->displayCheckbox($name, $default);
+ print "</TD>\n";
+ print " </TR>\n";
+ }
+
+ // }}}
+ // {{{ displayTextarea()
+
+ function displayTextarea($name, $default = '', $width = 40, $height = 5) {
+ print "<TEXTAREA NAME=\"$name\" COLS=\"$width\" ROWS=\"$height\">";
+ print $default;
+ print "</TEXTAREA>";
+ }
+
+ // }}}
+ // {{{ displayTextareaRow()
+
+ function displayTextareaRow($name, $title, $default = '', $width = 40, $height = 5) {
+ print " <TR>\n";
+ print " <TH ALIGN=\"right\">$title</TH>\n";
+ print " <TD>";
+ $this->displayTextarea($name, &$default, $width, $height);
+ print "</TD>\n";
+ print " </TR>\n";
+ }
+
+ // }}}
+ // {{{ displaySubmit()
+
+ function displaySubmit($title = 'Submit Changes', $name = "submit") {
+ print $this->displaySubmit($title, $name);
+ }
+
+ // }}}
+ // {{{ displaySubmitRow()
+
+ function displaySubmitRow($name = "submit", $title = 'Submit Changes') {
+ print $this->returnSubmitRow($name, $title);
+ }
+
+ // }}}
+ // {{{ displayReset()
+
+ function displayReset($title = 'Clear contents') {
+ print $this->returnReset($title);
+ }
+
+ // }}}
+ // {{{ displayResetRow()
+/*
+ function displayReset($title = 'Clear contents') {
+ print $this->returnReset($title);
+ }
+*/
+ // }}}
+ // {{{ displaySelect()
+
+ function displaySelect($name, $entries, $default = '', $size = 1,
+ $blank = '', $multiple = false) {
+ print $this->returnSelect($name, $entries, $default, $size, $blank,
+ $multiple);
+ }
+
+ // }}}
+ // {{{ displaySelectRow()
+
+ function displaySelectRow($name, $title, &$entries, $default = '',
+ $size = 1, $blank = '', $multiple = false)
+ {
+ print $this->returnSelectRow($name, $title, $entries, $default, $size,
+ $blank, $multiple);
+ }
+
+ // }}}
+ // {{{ displayHidden()
+
+ function displayHidden($name, $value) {
+ print $this->returnHidden($name, $value);
+ }
+
+ // }}}
+
+ // XXX missing: displayRadio displayRadioRow
+
+ // {{{ returnText()
+
+ function returnText($name, $default = '', $size = HTML_FORM_TEXT_SIZE) {
+ return "<INPUT NAME=\"$name\" VALUE=\"$default\" SIZE=\"$size\">";
+ }
+
+ // }}}
+ // {{{ returnTextRow()
+
+ function returnTextRow($name, $title, $default = '', $size = HTML_FORM_TEXT_SIZE) {
+ $str .= " <TR>\n";
+ $str .= " <TH ALIGN=\"right\">$title</TH>";
+ $str .= " <TD>";
+ $str .= $this->returnText($name, $default, $size);
+ $str .= "</TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnPassword()
+
+ function returnPassword($name, $default = '', $size = HTML_FORM_PASSWD_SIZE) {
+ return "<INPUT NAME=\"$name\" TYPE=\"password\" VALUE=\"$default\" SIZE=\"$size\">";
+ }
+
+ // }}}
+ // {{{ returnPasswordRow()
+
+ function returnPasswordRow($name, $title, $default = '', $size = HTML_FORM_PASSWD_SIZE) {
+ $str .= "<TR>\n";
+ $str .= " <TH ALIGN=\"right\">$title</TH>\n";
+ $str .= " <TD>";
+ $str .= $this->returnPassword($name, $default, $size);
+ $str .= " repeat: ";
+ $str .= $this->returnPassword($name."2", $default, $size);
+ $str .= "</TD>\n";
+ $str .= "</TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnCheckbox()
+
+ function returnCheckbox($name, $default = false) {
+ $str .= "<INPUT TYPE=\"checkbox\" NAME=\"$name\"";
+ if ($default && $default != 'off') {
+ $str .= " CHECKED";
+ }
+ $str .= ">";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnCheckboxRow()
+
+ function returnCheckboxRow($name, $title, $default = false) {
+ $str .= " <TR>\n";
+ $str .= " <TH ALIGN=\"right\">$title</TH>\n";
+ $str .= " <TD>";
+ $str .= $this->returnCheckbox($name, $default);
+ $str .= "</TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnTextarea()
+
+ function returnTextarea($name, $default = '', $width = 40, $height = 5) {
+ $str .= "<TEXTAREA NAME=\"$name\" COLS=\"$width\" ROWS=\"$height\">";
+ $str .= $default;
+ $str .= "</TEXTAREA>";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnTextareaRow()
+
+ function returnTextareaRow($name, $title, $default = '', $width = 40, $height = 5) {
+ $str .= " <TR>\n";
+ $str .= " <TH ALIGN=\"right\">$title</TH>\n";
+ $str .= " <TD>";
+ $str .= $this->returnTextarea($name, &$default, $width, $height);
+ $str .= "</TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnSubmit()
+
+ function returnSubmit($title = 'Submit Changes', $name = "submit") {
+ return "<INPUT NAME=\"$name\" TYPE=\"submit\" VALUE=\"$title\">";
+ }
+
+ // }}}
+ // {{{ returnSubmitRow()
+
+ function returnSubmitRow($name = "submit", $title = 'Submit Changes') {
+ $str .= " <TR>\n";
+ $str .= " <TD> </TD>\n";
+ $str .= " <TD>";
+ $str .= $this->returnSubmit($title, $name);
+ $str .= "</TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnReset()
+
+ function returnReset($title = 'Clear contents') {
+ return "<INPUT TYPE=\"reset\" VALUE=\"$title\">";
+ }
+
+ // }}}
+ // {{{ returnResetRow()
+
+ function returnResetRow($title = 'Clear contents') {
+ $str .= " <TR>\n";
+ $str .= " <TD> </TD>\n";
+ $str .= " <TD>";
+ $str .= $this->returnReset($title);
+ $str .= "</TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnSelect()
+
+ function returnSelect($name, $entries, $default = '', $size = 1,
+ $blank = '', $multiple = false) {
+ $str .= " <SELECT NAME=\"$name\"";
+ if ($size) {
+ $str .= " SIZE=\"$size\"";
+ }
+ if ($multiple) {
+ $str .= " MULTIPLE";
+ }
+ $str .= ">\n";
+ if ($blank) {
+ $str .= " <OPTION VALUE=\"\">$blank\n";
+ }
+ while (list($val, $text) = each($entries)) {
+ $str .= ' <OPTION ';
+ if ($default && $default == $val) {
+ $str .= 'SELECTED ';
+ }
+ $str .= "VALUE=\"$val\">$text\n";
+ }
+ $str .= " </SELECT>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnSelectRow()
+
+ function returnSelectRow($name, $title, &$entries, $default = '', $size = 1,
+ $blank = '', $multiple = false)
+ {
+ $str .= " <TR>\n";
+ $str .= " <TH ALIGN=\"right\">$title:</TH>\n";
+ $str .= " <TD>\n";
+ $str .= $this->returnSelect($name, &$entries, $default, $size, $blank, $multiple);
+ $str .= " </TD>\n";
+ $str .= " </TR>\n";
+
+ return $str;
+ }
+
+ // }}}
+ // {{{ returnHidden()
+
+ function returnHidden($name, $value) {
+ return "<INPUT TYPE=\"hidden\" NAME=\"$name\" VALUE=\"$value\">";
+ }
+
+ // }}}
+
+ // {{{ returnStart()
+
+ function returnStart() {
+ $ret = "<FORM ACTION=\"" . basename ($this->action) . "\" METHOD=\"$this->method\"";
+ if ($this->name) {
+ $ret .= " NAME=\"$this->name\"";
+ }
+ $ret .= ">";
+ return $ret;
+ }
+
+ // }}}
+ // {{{ returnEnd()
+
+ function returnEnd() {
+ $fields = array();
+ reset($this->fields);
+ while (list($i, $data) = each($this->fields)) {
+ if ($data[0] == 'reset') {
+ continue;
+ }
+ $fields[$data[1]] = true;
+ }
+ $ret = $this->returnHidden("_fields", implode(":", array_keys($fields)));
+ $ret .= "</FORM>";
+ return $ret;
+ }
+
+ // }}}
+
+ // {{{ display()
+
+ function display() {
+ $this->start();
+ print "<TABLE>\n";
+ reset($this->fields);
+ $hidden = array();
+ $call_cache = array();
+ while (list($i, $data) = each($this->fields)) {
+ switch ($data[0]) {
+ case "hidden":
+ $hidden[] = $i;
+ continue 2;
+ case "reset":
+ $params = 1;
+ break;
+ case "submit":
+ case "image":
+ $params = 2;
+ break;
+ case "checkbox":
+ $params = 3;
+ break;
+ case "text":
+ case "password":
+ case "radio":
+ $params = 4;
+ break;
+ case "textarea":
+ $params = 5;
+ break;
+ case "select":
+ $params = 7;
+ break;
+ case "file":
+ $params=8;
+ break;
+ default:
+ // unknown field type
+ continue 2;
+ }
+ $str = $call_cache[$params];
+ if (!$str) {
+ $str = '$this->display'.ucfirst($data[0])."Row(";
+ for ($i = 1; $i <= $params; $i++) {
+ $str .= '$data['.$i.']';
+ if ($i < $params) $str .= ', ';
+ }
+ $str .= ');';
+ $call_cache[$params] = $str;
+ }
+ eval($str);
+ }
+ print "</TABLE>\n";
+ for ($i = 0; $i < sizeof($hidden); $i++) {
+ $this->displayHidden($this->fields[$hidden[$i]][1],
+ $this->fields[$hidden[$i]][2]);
+ }
+ $this->end();
+ }
+
+ // }}}
+
+
+
+
+function showForm($login='',$email='',$web='',$info='',$skinarray) {;
+ $this->addText("login","Prihlasovacie meno:",$login);
+ $this->addPassword("password1","Heslo:","",10);
+ $this->addPassword("password2","Heslo pre overenie:","",10);
+ $this->addText("email:","Emailova adresa",$email);
+ $this->addText("web","Stranka:",$web);
+ $this->addSelect("skin","Skin:",$skinarray);
+ $this->addFile("image","Obrazok:");
+ $this->addTextarea("info","Dodatocne informacie",$info);
+ $this->addSubmit("submit","Zaregistruj sa!","");
+ $this->addHidden("sent","ok");
+ $this->display();
+
+}
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/*
+define("HAPPY","UIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
+define("LOVE","mam vas rad.majte ma radi");
+define("DRUGGED","som na kasu, serte na mna");
+define("ANGRY","23 stoporenych volskych kokotov do riti a kotvu do chrbta. vam vsetkym!");
+define("DEPRESSED","ZABITE MAAAAAAAAAAAAAAAAAA");
+*/
+
+include_once("htmlparse.inc");
+switch ($_POST['event']) {
+
+ case 'poslat':
+
+ //do not send a message when limit number is changed
+ if ($user_amount!=$limit and empty($_POST['submission_text'])) {}
+
+ else {
+
+ $status=eventz::add();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ }
+ break;
+
+ case 'odpovedat':
+ $status=eventz::answer();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'zmazat':
+ $status=eventz::delete();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'K!':
+ $status=eventz::k();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+
+
+ case 'zmaz forum':
+ $status=eventz::forum_delete();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'book':
+ $status=eventz::forum_book();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'unbook':
+ $status=eventz::forum_unbook();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'addPoll':
+ $status=eventz::forum_addpoll();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+ case 'op list':
+ $status=eventz::addOperator();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&status=ok&nocache=".time());
+ }
+ break;
+
+ case 'master list':
+ $status=eventz::addMaster();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&status=ok&nocache=".time());
+ }
+ break;
+ case 'access list':
+ $status=eventz::addAccess();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&status=ok&nocache=".time());
+ }
+ break;
+
+
+ case 'ban list':
+ $status=eventz::banUser();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&status=ok&nocache=".time());
+ }
+ break;
+
+ case 'nahlad':
+ $status=eventz::nahlad();
+ break;
+
+ case 'zmen nastavenie':
+ $status=eventz::forum_change();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=".$node_id."&nocache=".time());
+ }
+ break;
+
+
+}
+
+class eventz {
+
+function k() {
+ $k_amount=$_POST['k_amount'];
+ global $user_id;
+ $submission_id=$_POST['delete_name'][0];
+ global $kyberia;
+ global $error;
+
+ if ($k_amount<-1) {
+ $error="ale rydaj sa PREC tam kam siel hitler a diablov MEC ti odrazi hlavu ;) ale fakt nevymyslaj bravcoviny karle, oko bez viecka vidi vsecko ;)";
+ return false;
+ }
+ if ($k_amount > 1) {
+ $error = "mozes dat maximalne 1K prispevku";
+ return false;
+ }
+
+ if (!$submission_id) {
+ $set=$kyberia->query("select user_k from user where id='$user_id'");
+ $set->next();
+ $k_amount=$set->getString('user_k');
+ $error="nezadal si prispevok ktoremu sa maju pridelit K.dnes ti zostava $k_amount K";
+ return false;
+ }
+
+ if (!$k_amount) {
+ $set=$kyberia->query("select user_k from user where id='$user_id'");
+ $set->next();
+ $k_amount=$set->getString('user_k');
+ $error="nezadal si pocet K ktore chces prispevku pridelit.dnes ti ostava $k_amount K";
+ return false;
+ }
+
+
+ $q="select sum(k_amount) as amount from k_logs where donor_id='$user_id' and node_id='$submission_id' and node_type='submission'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $amount=$set->getInt('amount');
+
+ if (abs($amount)>=1) {
+ $error="tomuto prispevku uz si pridelil maximalny mozny pocet 1 K!";
+ return false;
+ }
+
+ $set2=$kyberia->query("select submission_owner from submissions where submission_id='$submission_id'");
+ $set2->next();
+ $acceptor_id=$set2->getString('submission_owner');
+
+ if ($acceptor_id == $user_id) {
+ $error="egotrip?";
+ return false;
+ }
+
+ $set3=$kyberia->query("select user_k from user where id='$user_id'");
+ $set3->next();
+ if ($set3->getInt('user_k') < abs($k_amount)) {
+ $error="bohuzial dnes uz ti zostava ".$set3->getString('user_k')." K. zadel menej alebo pockaj do polnoci";
+ return false;
+ }
+
+ $kyberia->query("update user set user_k=user_k-".abs($k_amount)." where id='$user_id'");
+ $kyberia->query("update user set user_karma=user_karma+$k_amount where id='$acceptor_id'");
+ $kyberia->query("update submissions set submission_k=submission_k+$k_amount where submission_id='$submission_id'");
+ $kyberia->query("insert into k_logs set donor_id='$user_id',acceptor_id='$acceptor_id',k_amount='$k_amount',node_id='$submission_id',node_type='submission'");
+ return true;
+
+
+}
+
+
+function nahlad() {
+ global $user_name;
+ global $user_mode_message;
+
+ $submission_text=$_POST['submission_text'];
+ $submission_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$submission_text);
+ $submission_text=strip_tags($submission_text,'<a><b><i><u><img><br><p><font>');
+ $submission_text=str_replace("\n","<br>",$submission_text);
+
+ $nohtml=$_POST['nohtml'];
+ if (!empty($nohtml)) {
+ $submission_text=htmlspecialchars($submission_text);
+ }
+
+
+ if (empty($submission_text)) {
+ global $error;
+ $error="Nahlizet na NIC? take metafyzicke triky neskusaj";
+ return false;
+ }
+ if (!htmlparse::htmlparse($submission_text)) {
+ global $htmlparse;
+ global $error;
+ $error=$htmlparse;
+ return false;
+ }
+
+
+ //adding mode message
+ if (!empty($user_mode_message)) $submission_text.="<br><br>-->$user_mode_message<--";
+
+ global $preview;
+ $preview="<table class='bigitem'><tr><td class='icon'>";
+ $preview.= "<img alt='".$user_name."' src='/images/users/".strtolower($user_name).".gif'>";
+ $preview.= "</td><td class='item'>";
+ $preview.= "<table class='item'>";
+ $preview.="<td class='header'>".$user_name;
+ $preview.="</td>";
+ $preview.="</tr>";
+ $preview.="<tr class='content'><td class='content'>".StripSlashes($submission_text)."</td></tr>";
+ $preview.="</table>";
+ $preview.="</td></tr></table>";
+}
+
+function add() {
+
+ $submission_text=$_POST['submission_text'];
+ global $forum;
+ global $kyberia;
+ global $user_id;
+ global $node_id;
+ global $user_status;
+ global $user_mode_message;
+
+ $nohtml=$_POST['nohtml'];
+ if (!empty($nohtml)) {
+ $submission_text=htmlspecialchars($submission_text);
+ }
+
+
+ $submission_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$submission_text);
+ $submission_text=strip_tags($submission_text,'<a><b><i><u><img><br><p><font>');
+ $submission_text=str_replace("\n","<br>",$submission_text);
+ $submission_text=addslashes($submission_text);
+ if (empty($submission_text)) {
+ global $error;
+ $error="Nic nenapises a predsa chces pridat prispevok? hovno hovno zlata rybka";
+ return false;
+ }
+
+ if (!htmlparse::htmlparse($submission_text)) {
+ global $htmlparse;
+ global $error;
+ $error=$htmlparse;
+ return false;
+ }
+
+ //adding mode message
+ if (!empty($user_mode_message)) $submission_text.="<br><br>-->$user_mode_message<--";
+
+
+ $result=$kyberia->query("insert into submissions set forum_id='$node_id',submission_text='$submission_text',submission_owner='$user_id',submission_thread=submission_id,submission_timestamp=NOW()");
+ $id=$kyberia->getLastInsertId();
+
+ if ($forum['forum_public']!='private') {
+ $result=$kyberia->query("insert into last_submissions set forum_id='$node_id',submission_text='$submission_text',submission_owner='$user_id',submission_id='$id',submission_thread=submission_id");
+ $kyberia->query("update submissions set submission_thread=concat('$id','.') where submission_id='$id'");
+ }
+
+ $result=$kyberia->query("update forum set last_submission=NOW(), forum_submissions=forum_submissions+1 where forum_id='$node_id'");
+ $q="update user_forum set submission_count=submission_count+1 where forum_id='$node_id'";
+ $result=$kyberia->update($q);
+// $kyberia->substanceIt($user_name,$submission_text,$forumset['forum_name']);
+ return true;
+}
+
+function answer() {
+
+ $submission_text=$_POST['submission_text'];
+ $submission_thread=$_POST['delete_name'][0];
+
+
+ $nohtml=$_POST['nohtml'];
+ if (!empty($nohtml)) {
+ $submission_text=htmlspecialchars($submission_text);
+ }
+
+ global $kyberia;
+ global $user_id;
+ global $node_id;
+ global $user_status;
+
+ $submission_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$submission_text);
+ $submission_text=strip_tags($submission_text,'<a><b><i><u><img><br><p><font>');
+ $submission_text=str_replace("\n","<br>",$submission_text);
+
+ //adding mode message
+ if (!empty($user_mode_message)) $submission_text.="<br><br>-->$user_mode_message<--";
+
+ $submission_text=addslashes($submission_text);
+
+ $result=$kyberia->query("select submission_thread from submissions where submission_id='$submission_thread'");
+ $result->next();
+ $submission_thread=$result->getString('submission_thread');
+ $result=$kyberia->query("insert into submissions set forum_id='$node_id',submission_text='$submission_text',submission_owner='$user_id',submission_thread='$submission_thread'");
+ $id=$kyberia->getLastInsertId();
+ $kyberia->query("update submissions set submission_thread=concat(submission_thread,'.','$id') where submission_id='$id'");
+// echo "insert into submissions set forum_id='$node_id',submission_text='$submission_text',submission_owner='$user_id',submission_thread=concat('$submission_thread','.')";
+ $result=$kyberia->query("update forum set last_submission=NOW(),forum_submissions=forum_submissions+1 where forum_id='$node_id'");
+$q="update user_forum set submission_count=submission_count+1 where forum_id='$node_id'";
+ $result=$kyberia->update($q);
+// $kyberia->substanceIt($user_name,$submission_text,$forumset['forum_name']);
+ return true;
+}
+
+function delete() {
+ global $error;
+ global $kyberia;
+ global $delete_name;
+ $delete_time=$_POST['delete_time'];
+ global $user_id;
+ global $node_id;
+ global $forumset;
+ global $access_type;
+ $forum_owner=$forumset->getInt('forum_owner');
+ $delbetween=$_POST['delbetween'];
+
+ $q = "select user_id, access_type from node_access where node_id = '$node_id'";
+ $access = $kyberia->query($q);
+ if($access->getNumRows() > 0)
+ {
+ $master_id = 0;
+ $op_id = 0;
+ while($access->next())
+ {
+ if($access->getString('access_type') == 'master')
+ {
+ $master_list[$master_id] = $access->getString('user_id');
+ $master_id++;
+ }
+ if($access->getString('access_type') == 'op')
+ {
+ $op_list[$op_id] = $access->getString('user_id');
+ $op_id++;
+ }
+ }
+ }
+
+ foreach ($delete_name as $submissiondel) {
+ $sub = $kyberia->query("select * from submissions where submission_id='$submissiondel'");
+ $sub->next();
+
+ if ($user_id == $forum_owner || $user_id == $sub->getInt("submission_owner") || $access_type == 'master' || $access_type == 'op') {
+ if($user_id == $sub->getInt("submission_owner")) define("DELETE", true);
+ elseif($user_id == $forum_owner) define("DELETE", true);
+ elseif($access_type == 'master' && !in_array($sub->getString("submission_owner"), $master_list) && $sub->getString("submission_owner") != $forum_owner) define("DELETE", true);
+ elseif($access_type == 'op' && !in_array($sub->getString("submission_owner"), $master_list) && !in_array($sub->getString("submission_owner"), $op_list) && ($sub->getString("submission_owner") != $forum_owner)) define("DELETE", true);
+ else define("DELETE", false);
+ if (DELETE)
+ {
+ $kyberia->update("delete from submissions where submission_id='$submissiondel'");
+ $kyberia->update("delete from last_submissions where submission_id='$submissiondel'");
+ $kyberia->update("update forum set forum_submissions=forum_submissions-1 where forum_id='$node_id'");
+ $kyberia->update("update user_forum set submission_count=submission_count-1 where forum_id='$node_id' and last_visit<'".$delete_time[$submissiondel]."'");
+ }
+
+ }
+
+ /* old one
+ $result=false;
+ $q="delete from submissions where submission_id='$submissiondel' and submission_owner='$user_id'";
+ $result=$kyberia->update($q);
+ $q="delete from last_submissions where submission_id='$submissiondel' and submission_owner='$user_id'";
+
+ $result=$kyberia->update($q);
+
+ if (!$result and $user_id==38) {
+ $q="delete from submissions where submission_id='$submissiondel'";
+ $result=$kyberia->update($q);
+ $q="delete from last_submissions where submission_id='$submissiondel'";
+ $result=$kyberia->update($q);
+
+ }
+ elseif (!$result) {
+ $set=$kyberia->query("select forum.forum_owner from submissions left join forum on forum.forum_id=submissions.forum_id where submission_id='$submissiondel'");
+ if ($set->getString('forum_owner')==$forum_owner) {
+ $result=$kyberia->update("delete from submissions where submission_id='$submissiondel'");
+ $result=$kyberia->update("delete from last_submissions where submission_id='$submissiondel'");
+ }
+ }
+
+ if ($result) {
+ $kyberia->query("update forum set forum_submissions=forum_submissions-1 where forum_id='$node_id'");
+ $q="update user_forum set submission_count=submission_count-1 where forum_id='$node_id' and last_visit<'".$delete_time[$submissiondel]."'";
+ $kyberia->query($q);
+
+ }
+
+ else { global $error; $error.="spravu id:$submissiondel sa nepodarilo zmazat.nemas na to pravo, kravo!<br>"; }
+ */
+ }
+ return true;
+}
+
+function forum_book() {
+ global $error;
+ global $kyberia;
+ global $delete_name;
+ global $delete_time;
+ global $user_id;
+ global $node_id;
+ $q="update user_forum set user_bookmark='yes' where user_id='$user_id' and forum_id='$node_id'";
+
+ $kyberia->query($q);
+ return true;
+
+}
+
+function forum_unbook() {
+ global $error;
+ global $kyberia;
+ global $delete_name;
+ global $delete_time;
+ global $user_id;
+ global $node_id;
+ $q="update user_forum set user_bookmark='no' where user_id='$user_id' and forum_id='$node_id'";
+
+ $kyberia->query($q);
+ return true;
+}
+
+function forum_delete() {
+ global $error;
+ global $kyberia;
+ global $delete_name;
+ global $delete_time;
+ global $user_id;
+ global $forum;
+ $forumdel=$_POST['node_id'];
+
+ // prec s nim, h4ck3r0m
+ if ($user_id != 38 && $forum['forum_owner'] != $user_id)
+ return;
+
+ if ($user_id==38) $kyberia->query("delete from forum where forum_id='$forumdel'");
+ $kyberia->query("delete from forum where forum_id='$forumdel' and (forum_owner='$user_id')");
+ $kyberia->query("delete from submissions where forum_id='$forumdel'");
+ $kyberia->query("update category set category_forums=category_forums-1 where category_id='".$forum['forum_category']."'");
+}
+
+function forum_change() {
+ global $error;
+ global $kyberia;
+ global $user_id;
+ global $node_id;
+ global $user_name;
+ global $forum;
+ global $access_type;
+
+ $forum_name=$_POST['forum_name'];
+ $forum_icon_name=$_FILES['forum_icon']['name'];
+ $forum_icon=$_FILES['forum_icon']['tmp_name'];
+ $forum_info=$_POST['forum_info'];
+ $forum_public=$_POST['forum_public'];
+ $forum_owner=$_POST['forum_owner'];
+ $forum_category=$_POST['forum_category'];
+
+ // taky voblud tu nema co robit
+ if ($user_id != $forum['forum_owner'] && $access_type != 'master' && $access_type != 'op')
+ return true;
+
+ if ($forum_owner==$user_name) $owner_id=$user_id;
+ else {
+ $userset=$kyberia->query("select id from user where login='$forum_owner'");
+ if (!$userset->getNumRows()) {
+ $error="Neexistuje uzivatel $forum_owner ";
+ return false;
+ }
+ else {
+ $userset->next();
+ $owner_id=$userset->getString('id');
+ }
+ }
+
+ // toto moze iba owner
+ if ($user_id == $forum['forum_owner']) {
+ $q="UPDATE forum set forum_public='$forum_public' , forum_category='$forum_category',forum_name='$forum_name',forum_owner='$owner_id' where forum_id='$node_id' and forum_owner='$user_id'";
+ $kyberia->query($q);
+ }
+
+ // zmena popisu fora
+ $forum_info=strip_tags($forum_info,'<font><a><b><i><u><img><br><p><h1><h2><h3><center>');
+ if ($forum_info) {
+ $kyberia->query("update forum_info set forum_info='$forum_info' where forum_id='$node_id'");
+ }
+// elseif ($forum_info and !$forum['forum_info']) $kyberia->query("insert into forum_info set forum_info='$forum_info',forum_id='$node_id'");
+ $icondir="/home/hromi1/kyberia/images/forums/";
+ $cmd=0;
+ if (strstr($forum_icon_name,".jpg") || strstr($forum_icon_name,".jpeg") ){
+ $cmd="/home/utils/netpbm/bin/jpegtopnm $forum_icon | /home/utils/netpbm/bin/pnmscale -width=123 | /home/utils/netpbm/bin/ppmquant 256 | /home/utils/netpbm/bin/ppmtogif > ".ICONDIR_FORUM.strtolower($node_id).".gif";
+
+ }
+ elseif (strstr($forum_icon_name,".gif")) {
+ $cmd="/home/hromi1/kyberia/gifsicle --resize 123x_ $forum_icon > ".ICONDIR_FORUM.strtolower($node_id).".gif";
+ }
+
+ if ($cmd) shell_exec($cmd);
+
+ // toto by mohlo ist do paze, nie?
+ $set=$kyberia->query("SELECT forum_info.forum_info as forum_info,user.id as user_id,user.login as login,forum.*,category.category_name as category_name from forum left join category on category.category_id=forum.forum_category left join user on forum_owner=user.id left join forum_info on forum_info.forum_id=forum.forum_id where forum.forum_id='$node_id'");
+ $set->next();
+ $forum=$set->getRecord();
+
+ return true;
+}
+
+function forum_addpoll() {
+ global $access_type;
+ global $forum;
+ global $user_id;
+
+ // ee
+ if (($forum['forum_owner'] != $user_id) && ($access_type != "op") &&
+($access_type != "master"))
+ return;
+
+ $question=$_POST['question'];
+ $response=$_POST['response'];
+ $node_id=$_POST['node_id'];
+ global $kyberia;
+
+ $question = strip_tags($question);
+ $kyberia->query("insert into polls set question='$question',forum_id='$node_id'");
+ $id=$kyberia->getLastInsertId();
+
+ foreach ($response as $value) {
+
+ if (empty($value)) break;
+ $kyberia->query("insert into poll_options set text='$value',id_poll='$id',number='0'");
+ }
+
+
+}
+
+function addMaster() {
+ global $error;
+ global $kyberia;
+ global $user_id;
+ global $forum;
+
+ if ($forum['forum_owner'] != $user_id)
+ return false;
+
+ $admins=$_POST['masterlist'];
+ $node_id=$_POST['node_id'];
+ $array=explode(";",$admins);
+ if (!Is_array($array)) {
+ $error="nezadal si ziadne mena";
+ }
+
+ $kyberia->query("delete from node_access where node_id='$node_id' and node_type='forum' and access_type='master'");
+
+ foreach($array as $owner) {
+ if (!trim($owner))
+ continue;
+
+ $q="select id from user where login='$owner'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $access_id=$set->getString('id');
+ if ($access_id) {
+ $q="insert into node_access set user_id='$access_id',node_id='$node_id',node_type='forum',access_type='master'";
+ $kyberia->query($q);
+ }
+
+ else $error.="Neexistuje uzivatel $owner.<br>";
+ }
+
+ if (!empty($error)) return false;
+ else return true;
+}
+
+
+
+function addAccess() {
+ global $error;
+ global $kyberia;
+ global $user_id;
+ global $forum;
+
+ // ee
+ if ($forum['forum_owner'] != $user_id)
+ return;
+
+ $admins=$_POST['accesslist'];
+ $node_id=$_POST['node_id'];
+ $array=explode(";",$admins);
+ if (!Is_array($array)) {
+ $error="nezadal si ziadne mena";
+ }
+
+ $kyberia->query("delete from node_access where node_id='$node_id' and node_type='forum' and access_type='access'");
+
+ foreach($array as $owner) {
+ if (!trim($owner))
+ continue;
+
+ $q="select id from user where login='$owner'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $access_id=$set->getString('id');
+ if ($access_id) {
+ $q="insert into node_access set user_id='$access_id',node_id='$node_id',node_type='forum',access_type='access'";
+ $kyberia->query($q);
+ }
+
+ else $error.="Neexistuje uzivatel $owner.<br>";
+ }
+
+ if (!empty($error)) return false;
+ else return true;
+}
+
+
+
+function addOperator() {
+ global $error;
+ global $kyberia;
+ global $user_id;
+ global $forum;
+ global $access_type;
+
+ if ($forum['forum_owner'] != $user_id && $access_type != 'master')
+ return;
+
+ $admins=$_POST['oplist'];
+ $node_id=$_POST['node_id'];
+ $array=explode(";",$admins);
+ if (!Is_array($array)) {
+ $error="nezadal si ziadne mena";
+ }
+
+ $kyberia->query("delete from node_access where node_id='$node_id' and node_type='forum' and access_type='op'");
+
+ foreach($array as $owner) {
+ if (!trim($owner))
+ continue;
+
+ $q="select id from user where login='$owner'";
+
+ $set=$kyberia->query($q);
+ $set->next();
+ $access_id=$set->getString('id');
+ if ($access_id) {
+ $q="insert into node_access set user_id='$access_id',node_id='$node_id',node_type='forum',access_type='op'";
+
+ $kyberia->query($q);
+ }
+
+ else $error.="Neexistuje uzivatel $owner.<br>";
+ }
+
+ if (!empty($error)) return false;
+ else return true;
+}
+
+
+function banUser() {
+ global $error;
+ global $kyberia;
+ global $forum;
+ global $user_id;
+ global $access_type;
+
+ // ee
+ if ($forum['forum_owner'] != $user_id && $access_type != 'master' && $access_type != 'op')
+ return false;
+
+ $admins=$_POST['banlist'];
+ if (empty($admins)) {
+ $error="nezadal si ziadne mena";
+ }
+
+ $node_id=$_POST['node_id'];
+ $array=explode(";",$admins);
+
+ $kyberia->query("delete from node_access where node_id='$node_id' and node_type='forum' and access_type='ban'");
+
+ foreach($array as $owner) {
+ if (!trim($owner))
+ continue;
+
+ $q="select id from user where login='$owner'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $access_id=$set->getString('id');
+ if ($access_id) {
+ $q="insert into node_access set user_id='$access_id',node_id='$node_id',node_type='forum',access_type='ban'";
+ $kyberia->query($q);
+ }
+
+ else $error.="Neexistuje uzivatel $owner.<br>";
+ }
+
+ if (!empty($error)) return false;
+ else return true;
+}
+
+
+
+}
+
--- /dev/null
+<?
+include_once("htmlparse.inc");
+switch ($_POST['event']) {
+
+ case 'pridaj.forum' :
+ $status=eventz::addForum();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=forum&node_id=$status&nocache=".time());
+ }
+ break;
+}
+
+class eventz {
+
+ function addForum() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ global $forum_icon_name;
+ global $forum_icon;
+ $forum_public=$_POST['forum_public'];
+
+ $forum_category=$_POST['forum_category'];
+ $forum_type=$_POST['forum_type'];
+ $forum_info=$_POST['forum_info'];
+ $forum_name=$_POST['forum_name'];
+
+ if (empty($forum_name)) {
+ $error="nazov fora je prilis kratky!!!!";
+ return false;
+ }
+
+ if (!htmlparse::htmlparse($forum_name)) {
+ global $htmlparse;
+ global $error;
+ $error=$htmlparse;
+ return false;
+ }
+
+
+ if (!htmlparse::htmlparse($forum_info)) {
+ global $htmlparse;
+ global $error;
+ $error=$htmlparse;
+ return false;
+ }
+
+
+
+
+ $set=$kyberia->query("INSERT INTO forum set forum_name='$forum_name',forum_category='$forum_category',forum_owner='$user_id',forum_public='$forum_public',forum_type='$forum_type'");
+ $lastid=$kyberia->getLastInsertId();
+ $kyberia->query("insert into forum_info set forum_id='$lastid',forum_info='$forum_info'");
+ $kyberia->query("update category set category_forums=category_forums+1 where category_id='$forum_category'");
+
+ $q="select friends.* from friends where friend_id='$user_id'";
+ $set=$kyberia->query($q);
+ while($set->next()){
+ $send_bin=$set->getString('send_mail');
+ $u_id=$set->getString('user_id');
+ $s_forum=floor($send_bin/2);
+
+ if (($s_forum)&&(!$check)){
+ $check[$u_id]=1;
+ $sprava="<b>".$user_name."</b> vytvoril novy klub s nazvom <br>\"<a href='?action=forum&node_id=$lastid' target='_blank'>".$forum_name."</a>\"";
+ $kyberia->ubikMail($u_id,$sprava);
+ }
+ }
+
+ $cmd=0;
+ if (strstr($forum_icon_name,".jp")){
+ $cmd=NETPBM."/jpegtopnm $forum_icon | ".NETPBM."/pnmscale -width=123 | ".NETPBM."/ppmquant 256 | ".NETPBM."/ppmtogif > ".ICONDIR_FORUM.strtolower($lastid).".gif";
+
+ }
+ elseif (strstr($forum_icon_name,".gif")) {
+ $cmd=GIFSICLE." --resize 123x_ $forum_icon > ".ICONDIR_FORUM.strtolower($lastid).".gif";
+ }
+
+ if ($cmd) shell_exec($cmd);
+ return $lastid;
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+switch ($_POST['event']) {
+ case 'pridaj priatela':
+ $status=eventz::addfriend();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=ludia&subaction=friends");
+ }
+ else echo $error;
+ break;
+
+ case 'zmaz priatela':
+ $status=eventz::deletefriend();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=ludia&subaction=friends");
+ }
+ else echo $error;
+ break;
+
+ case 'zmen nastavenie':
+ $status=eventz::changeseting();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=ludia&subaction=friends");
+ }
+ else echo $error;
+ break;
+
+ case 'denniky':
+ $status=eventz::alljournaux();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=ludia&subaction=friends");
+ }
+ else echo $error;
+ break;
+
+ case 'kluby':
+ $status=eventz::allforum();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=ludia&subaction=friends");
+ }
+ else echo $error;
+ break;
+}
+
+class eventz {
+
+function addfriend() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $friend_text=$_POST['friend_text'];
+ $friend_name=$_POST['friend_name'];
+
+ if (empty($friend_name)) {
+ global $error;
+ $error="Nezadal si meno priatela.";
+ return false;
+ }
+
+
+ $q="select id from user where login='$friend_name'";
+ $result=$kyberia->query($q);
+ $result->next();
+ $friend=$result->getRecord();
+ $friend_id=$friend['id'];
+
+ if (empty($friend_text)) {
+ global $error;
+ $error="Nezadal si text k priatelovi.";
+ return false;
+ }
+
+ elseif ($friend_id==$user_id) {
+ global $error;
+ $error="egotrip?";
+ return false;
+ }
+
+ elseif(empty($friend_id)) {
+ global $error;
+ $error="Uzivatel neexistuje!";
+ return false;
+ }
+
+ $friend_text=strip_tags($friend_text,'<a><b><i><u><img><br><p><font>');
+ $friend_text=str_replace("\n","<br>",$friend_text);
+ $friend_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a href=\"\\6\\7\">\\6\\7</a>",$friend_text);
+ $friend_text=addslashes($friend_text);
+ $q="select * from friends where user_id='$user_id' and friend_id='$friend_id'";
+ $result=$kyberia->query($q);
+
+ if (($result->getNumRows())>0) {
+ $q="update friends set friend_text='$friend_text' where user_id='$user_id' and friend_id='$friend_id'";
+ $kyberia->query($q);
+ $kyberia->ubikMail($friend_id,"Uzivatel $user_name zmenil tvoj friend komentar na text: $friend_text");
+ }
+
+ else {
+ $q="insert into friends set user_id='$user_id',friend_text='$friend_text',friend_id='$friend_id'";
+ $result=mysql_query($q);
+ $kyberia->ubikMail($friend_id,"Uzivatel $user_name si ta pridal medzi priatelov s textom: $friend_text");
+ $q="update user set charisma=charisma+1 where id='$friend_id'";
+ $kyberia->query($q);
+
+ $q2="select friend_id from friends where user_id='$user_id'";
+ $set2=$kyberia->query($q2);
+ $friends_serial="";
+ while ($set2->next()){
+ $friends_serial.=($set2->getString('friend_id')).";";
+ }
+ $kyberia->query("update user set friends_serial='$friends_serial' where id='$user_id'");
+
+
+ return true;
+ }
+
+
+}
+
+function deletefriend() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $friend_text=$_POST['friend_text'];
+ $friend_name=$_POST['friend_name'];
+
+ $q="select id from user where login='$friend_name'";
+ $result=$kyberia->query($q);
+ $result->next();
+ $friend=$result->getRecord();
+ $friend_id=$friend['id'];
+
+ if(empty($friend_id)) {
+ global $error;
+ $error="Uzivatel neexistuje!";
+ return false;
+ }
+
+ $kyberia->query("delete from friends where friend_id='$friend_id' and user_id='$user_id'");
+ $kyberia->query("update user set charisma=charisma-1 where id='$friend_id'");
+
+ $q2="select friend_id from friends where user_id='$user_id'";
+ $set2=$kyberia->query($q2);
+ $friends_serial="";
+ while ($set2->next()){
+ $friends_serial.=($set2->getString('friend_id')).";";
+ }
+ $kyberia->query("update user set friends_serial='$friends_serial' where id='$user_id'");
+
+}
+
+
+function changeseting() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ global $jornaux;
+ global $forum;
+
+ if($jornaux){
+ foreach($jornaux as $indx => $valu){
+ $valu2=explode("_",$valu);
+ $val=$valu2['1'];
+ if (!($send[$val])){
+ $send[$val]=0;
+ $s_j[$val]='1';
+ $send[$val]+=$s_j[$val];
+ }
+ }
+ }
+
+ if($forum){
+ foreach($forum as $indx => $valu){
+ $valu2=explode("_",$valu);
+ $val=$valu2['1'];
+ if (!($check[$val])){
+ if(!$send[$val]){$send[$val]=0;}
+ $check[$val]=1;
+ $s_f[$val]='1';
+ $send[$val]+=($s_f[$val])*2;
+ }
+ }
+ }
+
+ $q="select * from friends where user_id='$user_id'";
+ $set=$kyberia->query($q);
+
+ while ($set->next()){
+ $f_id=$set->getString('friend_id');
+ $s_mail=$set->getString('send_mail');
+ $db_send[$f_id]=$s_mail;
+ if(!$send[$f_id]){$send[$f_id]=0;}
+ if (($db_send[$f_id])!=($send[$f_id])){
+ $modify[$f_id]=$send[$f_id];
+
+ }
+ }
+ if($modify){
+ foreach($modify as $f_id => $s_m){
+ $q="update friends set send_mail='$s_m' where user_id='$user_id' and friend_id='$f_id'";
+ $kyberia->query($q);
+ }
+ }
+
+}
+
+
+function alljournaux() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ global $jornaux;
+ global $forum;
+ $journauxall=$_POST['journauxall'];
+
+ if(!$journauxall){
+ $journauxall=0;
+ }else{$journauxall=1;}
+
+ if($forum){
+ foreach($forum as $indx => $valu){
+ $valu2=explode("_",$valu);
+ $val=$valu2['1'];
+ if (!($check[$val])){
+ $send[$val]=0;
+ $check[$val]=1;
+ $s_f[$val]='1';
+ $send[$val]+=($s_f[$val])*2;
+ $send[$val]+=$journauxall;
+ }
+ }
+ }
+
+ $q="select * from friends where user_id='$user_id'";
+ $set=$kyberia->query($q);
+
+ while ($set->next()){
+ $f_id=$set->getString('friend_id');
+ $s_mail=$set->getString('send_mail');
+ $db_send[$f_id]=$s_mail;
+ if(!$send[$f_id]){$send[$f_id]=$journauxall;}
+ if (($db_send[$f_id])!=($send[$f_id])){
+ $modify[$f_id]=$send[$f_id];
+
+ }
+ }
+ if($modify){
+ foreach($modify as $f_id => $s_m){
+ $q="update friends set send_mail='$s_m' where user_id='$user_id' and friend_id='$f_id'";
+ $kyberia->query($q);
+ }
+ }
+
+}
+
+function allforum() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ global $jornaux;
+ global $forum;
+ $forumall=$_POST['forumall'];
+
+ if(!$forumall){
+ $forumall=0;
+ }else{$forumall=1;}
+
+ if($jornaux){
+ foreach($jornaux as $indx => $valu){
+ $valu2=explode("_",$valu);
+ $val=$valu2['1'];
+ if (!($check[$val])){
+ $check[$val]=1;
+ $send[$val]=0;
+ $s_j[$val]='1';
+ $send[$val]+=$s_j[$val];
+ $send[$val]+=$forumall*2;
+ }
+ }
+ }
+
+
+ $q="select * from friends where user_id='$user_id'";
+ $set=$kyberia->query($q);
+
+ while ($set->next()){
+ $f_id=$set->getString('friend_id');
+ $s_mail=$set->getString('send_mail');
+ $db_send[$f_id]=$s_mail;
+ if(!$send[$f_id]){$send[$f_id]=$forumall*2;}
+ if (($db_send[$f_id])!=($send[$f_id])){
+ $modify[$f_id]=$send[$f_id];
+
+ }
+ }
+ if($modify){
+ foreach($modify as $f_id => $s_m){
+ $q="update friends set send_mail='$s_m' where user_id='$user_id' and friend_id='$f_id'";
+ $kyberia->query($q);
+ }
+ }
+
+}
+
+
+
+
+
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+include("database.inc");
+
+class CLASS_GALLERY extends CLASS_DATABASE {
+/*
+var $Database="kyberia";
+var $User="kyberia";
+var $Password="cyb3ry";
+var $Url=;
+*/
+var $albumLink="http://kyberia.sk/gallery/view_album.php?set_albumName=";
+var $photoLink="http://kyberia.sk/gallery/view_photo.php?set_albumName=";
+
+function galleryInsert($gallerydata){
+ $q="SELECT * FROM albums where name like '".$gallerydata->fields["name"]."'";
+ $set=$this->query($q);
+ if ($set->_numRows==0) {
+
+ $q="INSERT INTO albums set ";
+ $q.="title='".$gallerydata->fields["title"]."',";
+ $q.="name='".$gallerydata->fields["name"]."',";
+ $q.="description='".$gallerydata->fields["description"]."',";
+ $q.="hits='".$gallerydata->fields["clicks"]."',";
+ $q.="fotos='".count($gallerydata->photos)."'";
+ $this->query($q);
+}
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+define("stastie","UIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
+define("LASKA","mam vas rad.majte ma radi");
+define("vykaleny","som na kasu, serte na mna");
+define("nasrany","23 stoporenych volskych kokotov do riti a kotvu do chrbta. vam vsetkym!");
+define("depresia","ZABITE MAAAAAAAAAAAAAAAAAA");
+
+switch ($_GET['get_event']) {
+ case 'switchstatus':
+ $status=eventz::switchstatus();
+ if ($status) {
+ if ($_GET['node_id']) $args="&node_id=".$_GET['node_id'];
+ Header("Location:".SCRIPT."?action=$action$args");
+ }
+ else echo $error;
+ break;
+
+}
+
+class eventz {
+
+function switchstatus() {
+ $statuses['nasrany']="user_agressive";
+ $statuses['vykaleny']="user_drugged";
+ $statuses['LASKA']="user_love";
+ $statuses['stastie']="user_happy";
+ $statuses['depresia']="user_sad";
+
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $user_status=$_GET['user_status'];
+
+ if (($user_status!="normal") and ($user_status!="invisible")) {
+ $set=$kyberia->query("select ".$statuses[$user_status]." from user where id='$user_id'");
+ $set->next();
+ $message=$set->getString($statuses[$user_status]);
+ if (empty($message)) $message=constant($user_status);
+
+ }
+ $kyberia->query("update session set user_mode='$user_status',user_id='$user_id',user_mode_message='$message' where user_id='$user_id'");
+ return true;
+
+}
+}
--- /dev/null
+<?php
+
+class htmlparse {
+
+function htmlparse($data)
+{
+ /*
+ if function finds anything unsafe,it will return
+ FALSE and saves a reason info global variable $htmlparse
+ */
+
+ global $htmlparse;
+
+ $data = StrToLower(" ".$data);
+
+ // tags, I don\14 need to close
+ $unpaired = Array('br'=>1,
+ 'br/'=>1, // fix later ;)
+ 'li'=>1,
+ 'hr'=>1,
+ 'img'=>1,
+ 'p'=>1
+ );
+
+ // allowed tags
+ $allowed = Array('b'=>1,
+ 'i'=>1,
+ 'u'=>1,
+ 'a'=>1,
+ 'img'=>1,
+ 'sup'=>1,
+ 'sub'=>1,
+ 'table'=>1,
+ 'tr'=>1,
+ 'td'=>1,
+ 'font'=>1,
+ 'ul'=>1,
+ 'ol'=>1,
+ 'li'=>1,
+ 'tt'=>1,
+ 'code'=>1,
+ 'small'=>1,
+ 'big'=>1,
+ 'caption'=>1,
+ 'thead'=>1,
+ 'tfoot'=>1,
+ 'col'=>1,
+ 'colgroup'=>1,
+ 'th'=>1,
+ 'br'=>1,
+ 'br/'=>1, // fix later
+ 'hr'=>1,
+ 'em'=>1,
+ 'th'=>1,
+ 'center'=>1,
+ 'pre'=>1,
+ 'xmp'=>1,
+ 's'=>1,
+ 'strong'=>1,
+ 'legend'=>1,
+ 'h1'=>1,
+ 'h2'=>1,
+ 'h3'=>1,
+ 'h4'=>1,
+ 'h5'=>1,
+ 'h6'=>1,
+ 'p'=>1,
+ 'blockquote'=>1,
+ 'div'=>1,
+ 'span'=>1,
+ 'fieldset'=>1
+ );
+
+ /*
+ this part will go trought string and will ensure, if all tags are closed
+ */
+
+ $tok = StrTok($data, '<');
+ $tok = StrTok('<');
+ while(!($tok === FALSE)){
+ if(!StrStr($tok,'>')):
+ $htmlparse = 'Chyba HTML syntaxe!';
+ //$htmlparse = 'Wrong HTML syntax!';
+ return 0;
+ elseif(StrStr($tok,"<")):
+ $htmlparse = 'Chyba HTML syntaxe!';
+ //$htmlparse = 'Wrong HTML syntax!';
+ return 0;
+ endif;
+ $tok = StrTok('<');
+ }
+
+ /*
+ main part of the function - it will check allowed tags, some parameters and so on...
+ */
+
+ $tok = StrTok($data, '<');
+ $i = 0;
+ $j = 0;
+ while(!($tok === FALSE)):
+ if($i == 1):
+ $tag = Split('>',$tok,2);
+ $attrib = Split("[[:space:]>]",$tag[0],2);
+ if($allowed[$attrib[0]] != 1 && $allowed[SubStr($attrib[0],1)] != 1): // if tag isn\14 in allowed array
+ $htmlparse = 'Zakazany tag <'.$attrib[0].'>!';
+ //$htmlparse = 'Forbidden tag <'.$attrib[0].'>!';
+ return 0;
+ endif;
+ if('/'.$tags[$j] == $attrib[0]): // closing tag for last opening tag
+ if($tags[$j] == 'table' && $opened_tables > 0):
+ $opened_tables--;
+ endif;
+ $j--;
+ elseif($tags[$j] == 'xmp'): // XMP tag...ignore eny other tags between them
+ else:
+ if(SubStr($attrib[0],0,1) == '/' && $unpaired[$tags[$j]]): // do I need to close the tag?
+ $j--;
+ continue;
+ elseif(SubStr($attrib[0],0,1) == '/'): // am I closing something, I didn\14 open?
+ $htmlparse = 'Chyba u tagu <'.$tag[0].'>! Zavirate tag, ktery jste neotevrel!';
+ //$htmlparse = 'Error near tag <'.$tag[0].'>! Closing tag, that wasn\14 opened!';
+ return 0;
+ elseif(Ereg(' on',' '.$attrib[1])): // temporary solution for pernament problem...and it isn\14 suicide
+ $htmlparse = 'JavaScript je na hovno!';
+ //$htmlparse = 'JavaScript sux!';
+ return 0;
+ elseif(Ereg(' style',' '.$attrib[1])): // styles are forbidden - don\14 look at me THAT way ;)
+ $htmlparse = 'Ten "style" se mi tam nezda!';
+ //$htmlparse = '"styles" are forbidden!';
+ return 0;
+ elseif(Ereg('://',' '.$attrib[1]) && $attrib[0] != "img" && $attrib[0] != "a"): // adresses in attributes (except A and IMG tags) are forbidden
+ $htmlparse = 'Neco se mi tam nelibi! To je hlaska HTML validace - nejedna se o nejakou cenzuru ;)';
+ //$htmlparse = 'Forbidden usage of adresses in tags!';
+ return 0;
+ elseif((SubStr_Count($attrib[1],'"')%2) > 0): // are quotes closed? can do mess if they aren\14
+ $htmlparse = 'Neuzavrel jste uvozovky uvnitr tagu <'.$attrib[0].'>!';
+ //$htmlparse = 'Close quotes in tag <'.$tag[0].'>!';
+ return 0;
+ elseif(Ereg('\?',$attrib[1]) && $attrib[0] == 'img'): // don\14 allow parameters in IMG tags
+ $htmlparse = 'Chyba u tagu <img> - nejsou povoleny parametry v adrese!';
+ //$htmlparse = 'Error in tag <img> - parameters in image adresses are forbidden!';
+ return 0;
+ elseif(($attrib[0] == 'td' || $attrib[0] == 'tr') && $opened_tables == 0):
+ $htmlparse = 'Strkej si ty tagy do vlastni tabulky, jo?';
+ return 0;
+ elseif($attrib[0] == 'table'):
+ $opened_tables++;
+ endif;
+ $j++;
+ $tags[$j] = $attrib[0];
+ endif;
+ endif;
+ $tok = StrTok('<');
+ $i = 1;
+ endwhile;
+
+ /*
+ just check, if all tags are properly closed
+ */
+
+ while($j > 0):
+ if($unpaired[$tags[$j]]):
+ $j--;
+ continue;
+ else:
+ $htmlparse = 'Neuzavrel jste tag <'.$tags[$j].'>!';
+ //$htmlparse = 'Tag <'.$tags[$j].'> wasn\14 closed correctly!';
+ return 0;
+ endif;
+ endwhile;
+return 1;
+}
+
+}
\ No newline at end of file
--- /dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<?php
+include('kyberia.inc');
+class CLASS_HYPERTEXT extends CLASS_KYBERIA {
+
+
+function CLASS_HYPERTEXT() {
+ $this->CLASS_KYBERIA();
+}
+
+function explodeText($id) {
+ $set=$this->query("SELECT text1 from articles where id_article='$id'");
+ $set->next();
+ $text=$set->getstring("text1");
+ $text=str_replace("."," ",$text);
+ $text=str_replace(","," ",$text);
+ $text=str_replace("?"," ",$text);
+ $bomb=explode(" ",$text);
+ foreach ($bomb as $slovo) {
+ if (strlen($slovo)>4 AND !strstr($slovo,">") AND !strstr($slovo,"<"))$slova[]=$slovo;
+ }
+ echo "<table>";
+ foreach ($slova as $slovo) {
+ echo "<tr><Td>$id</td><Td>$slovo</td></tr>";
+ }
+}
+// >------------------------------koniec metod---------------<
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+switch ($_POST['event']) {
+ case 'pridaj dennik':
+ $status=eventz::addJournaux();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=journaux");
+ }
+
+ break;
+
+ case 'zmaz dennik':
+ $status=eventz::deleteJournaux();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=journaux");
+ }
+
+ break;
+}
+
+class eventz {
+
+function addJournaux() {
+
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $dennik_text=$_POST['dennik_text'];
+ $type=$_POST['type'];
+ $nadpis=$_POST['dennik_title'];
+ $journaux_access=$_POST['journaux_access'];
+
+ if (empty($nadpis)) {
+ $error="musis zadat nazov denniku";
+ return false;
+ }
+
+ elseif (empty($dennik_text)) {
+ $error="dennik je prazdny";
+ return false;
+ }
+
+
+ else {
+ $dennik_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$dennik_text);
+ $dennik_text=strip_tags($dennik_text,'<a><b><i><u><img><br><p><font>');
+ $dennik_text=str_replace("\n","<br>",$dennik_text);
+ $dennik_text=addslashes($dennik_text);
+
+ $result=$kyberia->query("insert into dennik set autor='$user_id',zapis='$dennik_text',nadpis='$nadpis',datum=NOW(),type='$type'");
+ $journaux_id=$kyberia->getLastInsertId();
+
+ $q="select friends.* from friends where friend_id='$user_id'";
+ $set=$kyberia->query($q);
+ while($set->next()){
+ $send_bin=$set->getString('send_mail');
+ $u_id=$set->getString('user_id');
+ $s_forum=floor($send_bin/2);
+ $pp=$send_bin%2;
+ $s_journaux=floor($pp/1);
+ if ($s_journaux){
+ $sprava="<b>".$user_name."</b> napisal novy dennik s nazvom <br>\"<a href='?action=journaux&node_id=$journaux_id' target='_blank'>".$nadpis."</a>\"";
+ $kyberia->ubikMail($u_id,$sprava);
+
+ }
+
+ }
+
+ }
+
+ if (!empty($journaux_access) and $type=="private") {
+ $access=explode(";",$journaux_access);
+ foreach($access as $user_access) {
+ $q="select id from user where login like '%$user_access%'";
+ $set=$kyberia->query($q);
+ $set->next();
+ $access_id=$set->getString('id');
+ if ($access_id) {
+ $q="insert into node_access set user_id='$access_id',node_id='$journaux_id',node_type='journaux',access_type='access'";
+ $kyberia->query($q);
+ }
+ }
+ }
+
+
+}
+
+function deleteJournaux() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $journaux_id=$_POST['journaux_id'];
+
+ $kyberia->update("delete from dennik where autor='$user_id' and id='$journaux_id'");
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+
+function getFile1($fname) {
+ $tmp = "";
+
+ if ($fd = fopen($fname, "r")) {
+ while (!feof($fd)) {
+ $tmp .= fread($fd, 65536);
+ }
+ fclose($fd);
+ }
+ return $tmp;
+}
+
+include("diskusdesign.inc");
+
+class CLASS_KYBERIA extends CLASS_DATABASE {
+
+var $RubrikaImageDir="/images/rubriky/";
+var $TitleImageDir="/images/clanky/";
+var $debug;
+
+var $UserImages="/icons/";
+function CLASS_KYBERIA() {
+ global $admin;
+ if ($admin==yes) $this->debug=true;
+ else $this->debug=false;
+ $this->CLASS_DATABASE();
+}
+
+
+function getJSbyId($id) {
+ $q="SELECT prispevky.telo AS telo,prispevky.jmeno AS jmeno,prispevky.*,dennik.nadpis AS nadpis, dennik.id AS node_id from prispevky left join dennik on dennik.id_diskuse=prispevky.id_diskuse where id_prispevku='$id'";
+ return $this->query($q);
+
+}
+
+function getNewJS($id,$last_login) {
+$q="SELECT prispevky.telo AS telo,prispevky.jmeno AS jmeno,prispevky.*,dennik.nadpis AS nadpis, dennik.id AS node_id from prispevky left join dennik on dennik.id_diskuse=prispevky.id_diskuse left join user on prispevky.jmeno=user.login where dennik.autor='$id' AND prispevky.vlozeno>'$last_login'";
+ return $this->query($q);
+
+}
+
+
+function getNewSubmissions($id_diskuse,$time) {
+ $q="SELECT count(*) as pocet from prispevky where id_diskuse='$id_diskuse' and TO_DAYS(vlozeno) > TO_DAYS('$time')";
+ $set=$this->query($q);
+ $set->next();
+ return $set->getString('pocet');
+}
+
+function addDennik($dennik,$nadpis,$dennik_type="journaux") {
+ global $user_id;
+ if (strlen($dennik)<10) {
+ echo "dennik je moc kratky";
+ return false;
+ }
+ $dennik=str_replace("\n","<br>",$dennik);
+ $dennik = preg_replace("/(http:\/\/\S+?|ftp:\/\/\S+?)([\.,:_\*]?\s)/", "<a href=\"$1\">$1</a>$2", $dennik);
+ $q="insert into dennik set nadpis='$nadpis',zapis='$dennik',autor='$user_id',dennik_type='$dennik_type',datum=NOW()";
+
+ $this->update($q);
+ return true;
+}
+
+function unserial() {
+$tmp=getFile1("/home/hromi1/kyberia/images/albums/albumdb.dat");
+$albums=unserialize($tmp);
+foreach($albums as $album){
+ $file="/home/hromi1/kyberia/images/albums/".$album."/album.dat";
+ $tmp=getFile1($file);
+ $photos=unserialize($tmp);
+ $q="INSERT into albums set title=".$photos->album[fields][title];
+ $q.=",hits=".$photos->album[fields][clicks];
+ $q.=",name=".$photos->album[fields][name];
+ $this->update($q);
+
+ echo "<br><br><br>";
+}
+}
+
+function updateUser($id,$pole) {
+ $pole['user_info']=str_replace("\n","<br>",$pole['user_info']);
+ $q="UPDATE user set ";
+ if (strlen($password1)>4) {
+ if ($password1==$password2) $q.="password='".md5($password1)."'";
+ else {
+ echo "Passwordy niesu rovnake.";
+ return false;
+ }
+ }
+ $q.=" user_info='".$pole['user_info']."',email='".$pole['email']."' where id='$id'";
+ $this->query($q);
+}
+
+
+function showForumList($kat) {
+ global $user_id;
+ global $action;
+ $q="SELECT user_forum.user_bookmark as user_bookmark,user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')";
+ $q.=" WHERE forum_category='$kat'";
+ $q.=" order by forum_id desc ";
+ $forumset=$this->query($q);
+ while ($forumset->next()) {
+ echo "<br> <a href='?action=forum&forum_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a> (".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz ";
+ if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
+ echo ") --> ";
+ if ($forumset->getString('user_bookmark')=='1') echo "<a href='?action=$action&kat=$kat&book=0&forum_id=",$forumset->getString('forum_id'),"'>unbook</a>";
+ else echo "<a href='?action=$action&kat=$kat&book=1&forum_id=",$forumset->getString('forum_id'),"'>book</a>";
+ global $category_parent;
+// if ($user_id==38 and !$category_parent) echo "<form action='?action=forumlist'><input type='text' name='forum_category'><input type='hidden' name='forumid' value='",$forumset->getString('forum_id'),"'><input type=submit value='change' name='category'></form>";
+ }
+ echo "<br>";
+}
+
+function substanceIt($user_name,$message_text,$forum_name) {
+ $message_text= stripSlashes("$user_name [forum: $forum_name] --> $message_text\r\n");
+ $fp = fsockopen ("node.kyberia.sk", 2323, $errno, $errstr,30);
+ if (!$fp) {
+ echo "$errstr ($errno)<br>\n";
+ } else {
+ fgets($fp,2);
+ fputs ($fp, "hromi\r\n");
+ fputs ($fp,"ub1k23\r\n.say $message_text");
+ fclose ($fp);
+ }
+
+}
+
+function updateUserData($user_id) {
+ global $action;
+ global $node_id;
+ global $forum;
+ global $node_id;
+ global $dennik;
+ global $article;
+ global $userinfo;
+ global $id;
+ if ($action=="forum") $q="update session set user_action_name='".addslashes($forum['forum_name'])."',user_action_id='".$forum['forum_id']."', user_action='$action' where user_id='".$user_id."'";
+ elseif ($action=="journaux" && $node_id!="") $q="update session set user_action_name=' ".addslashes($dennik['nadpis'])."',user_action_id='".$node_id."', user_action='$action' where user_id='".$user_id."'";
+ elseif ($action=="article" && $node_id!="") $q="update session set user_action_name=' ".addslashes($article['nazov'])."',user_action_id='".$node_id."', user_action='$action' where user_id='".$user_id."'";
+ elseif ($userinfo) $q="update session set user_action_name=' ".addslashes($userinfo['login'])."',user_action_id='".$node_id."', user_action='$action' where user_id='".$user_id."'";
+ else $q="update session set user_action='$action', user_action_name='', user_action_id='' where user_id='".$user_id."'";
+ $set=$this->query($q);
+
+}
+
+function isLogged() {
+ $this->query('delete from session where user_idle<date_sub(NOW(),INTERVAL 1 HOUR)');
+ $kybersession=$_COOKIE['kybersession'];
+ $q="SELECT session.*,user.user_mail as user_mail,user.mail_name as mail_name, user.user_active_icons as user_active_icons, user.friends_serial as user_friends_serial, user.user_icons_in_forum from session left join user on user.id=session.user_id where session='$kybersession'";
+ $set=$this->query($q);
+ if ($set->_numRows==0) return false;
+ else {
+ $set->next();
+ return $set->getRecord();
+ }
+}
+
+
+function logOff() {
+ $kybersession=$_COOKIE['kybersession'];
+ $this->query("DELETE FROM session where session like '$kybersession'");
+}
+
+
+function setRefererStats() {
+ global $HTTP_REFERER;
+ global $REMOTE_ADDR;
+ global $id;
+ $this->query("INSERT INTO referers set referer='$HTTP_REFERER',adresa='$REMOTE_ADDR',id='$id'");
+}
+
+function getNameById($id) {
+ $q="SELECT login from user where id='$id'";
+ $set=$this->query($q);
+ $set->next();
+ return $set->getString("login");
+}
+
+function createDennikDiskuse($id_dennik,$id_diskuse) {
+ $q="UPDATE dennik set id_diskuse='$id_diskuse' where id='$id_dennik'";
+ $this->query($q);
+}
+
+function getTopGalleries() {
+ return $this->query("SELECT * FROM albums order by hits desc limit 10");
+}
+
+function getLastGalleries() {
+ return $this->query("SELECT * FROM albums order by id_Album desc");
+}
+
+function getLoginByDennik($id) {
+ return $this->query("SELECT autor from dennik where id='$id'");
+}
+
+function getRandomDennik($last=3) {
+ $set=$this->query("SELECT id from dennik where dennik_type='journaux' and type='public' order by id desc limit $last");
+ while ($set->next()) $id[]=$set->getString("id");
+ if ($this->debug) print_r($id);
+ $randomid=rand(0,$last-1);
+ return $this->getDennik($id[$randomid],true);
+// return $this->getDennik(3183,true);
+}
+
+function getDennik($id,$random=false) {
+ if (!$random) {
+ $q="UPDATE dennik set hits=hits+1 where id='$id'";
+ $this->query($q);
+ }
+ $q="SELECT DATE_FORMAT(dennik.datum,'%k:%i:%s %e.%c.%Y') as cas, dennik.autor AS autor,dennik.id AS idarticle,dennik.*,user.login AS autorname from dennik left join user on user.id=dennik.autor where dennik.id='$id'";
+
+ return $this->query($q);
+}
+
+function getDennikByUSer($id_user,$offset=0) {
+ $q="SELECT * from dennik where autor='$id_user' order by id desc";
+ return $this->query($q);
+}
+
+function getNewestDennik($limit=5,$offset=0,$dennik_type="journaux") {
+ $q="SELECT dennik.*,user.login AS autorname from dennik left join user on user.id=dennik.autor where dennik_type='$dennik_type' order by id DESC LIMIT $offset,$limit";
+
+ return $this->query($q);
+}
+
+function getAllUsers() {
+ return $this->query("SELECT * from user order by login");
+}
+
+function getDennikAuthors() {
+ return $this->query("select distinct dennik.autor as autor,user.login as login from dennik left join user on user.id=dennik.autor order by login");
+}
+
+function getMostDiscussed() {
+ return $this->query("SELECT nazov,id_article,prispevky from articles where id_rubrika>4 OR id_rubrika<4 order by prispevky desc limit 10");
+}
+
+function putMostRead($kategorie="",$limit=10) {
+ if ($kategorie=="") return $this->query("SELECT nazov,id_article,hits from articles ORDER by hits DESC LIMIT $limit");
+ else {
+ $result=$this->isParentRubrika($kategorie);
+ if (!$result) {
+ $q="SELECT hits,id_rubrika,id_article,nazov from articles where id_rubrika='$kategorie' or id_rubrika_secondary='$kategorie' order by hits desc limit 10";
+ }
+ else {
+ $q="SELECT hits,id_rubrika,id_article,nazov from articles where id_rubrika='$kategorie' ";
+ while ($result->next()) {
+ if ($result->getString("id_rubriky")!=4) $q.=" or id_rubrika='".$result->getString('id_rubriky')."'";
+ }
+ $q.=" order by hits desc limit 10";
+ }
+ return $this->query($q);
+ }
+}
+
+function listRubrikyArray() {
+ $q="SELECT * FROM rubriky";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+
+
+function showMailInfo() {
+ global $PHP_SELf;
+ echo "<center>mailinfo?</center>";
+ echo "<form action =$PHP_SELF method=post>";
+ echo "<input type=text name=mailinfo size=15>";
+ echo "<br><center><select name=kat>";
+ $pole=$this->listRubrikyArray();
+ for ($i=0;IsSet($pole[$i]);$i++) {
+ echo "<option value=$i>$i</option>";
+ }
+ echo "</select></center>";
+ echo "</form>";
+}
+
+
+function addMailinfo($email) {
+
+ $this->query("INSERT INTO mailinfo set email='$email',datetime=NOW()");
+}
+
+
+function listArticles() {
+ $q="SELECT *.articles,id_parent.rubriky AS id_parent,nazov.rubriky AS nazov FROM articles LEFT JOIN rubriky ON id_rubriky.rubriky=id_rubriky=articles order by datum desc";
+
+ return($this->query($q));
+}
+
+/*
+function listRubrikyArray() {
+ $q="SELECT * FROM skins";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+*/
+function listSkinArray() {
+ $q="SELECT nazov FROM skins";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+
+function getRubrikaById($id_rubriky) {
+ $q="SELECT nazov from rubriky where id_rubriky=$id_rubriky";
+ $set=$this->query($q);
+ $set->next();
+ return $set->getString('nazov');
+}
+
+function getArticle($id) {
+ $q="Update articles set hits=hits+1 where id_article='$id'";
+ $this->query($q);
+ $q="SELECT * from articles where id_article=$id";
+ return $this->query($q);
+}
+
+function getArticleData($id) {
+ $q="SELECT * from articles where id_article=$id";
+ return $this->query($q);
+}
+
+function listMainRubrikyArray() {
+ $q="SELECT * FROM rubriky where id_parent=1";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+
+function getTitle() {
+
+ $set=$this->query("SELECT title from titles where id_title=1");
+ $set->next();
+ echo $set->getString("title");
+
+}
+
+function getOutro() {
+ $set=$this->query("SELECT id_outro from outro order by id_outro desc limit 1");
+ $set->next();
+ $count=$set->getString('id_outro');
+ $id=rand(1,$count);
+ $set=$this->query("SELECT outro,autor from outro where id_outro='$id'");
+ $set->next();
+ echo $set->getString("outro");
+ echo "<br><i><div align=right>";
+ echo $set->getString("autor");
+ echo "<br></i></div>";
+}
+
+function getArticles($offset,$limit=8) {
+ $q="SELECT articles.*,rubriky.id_parent AS id_parent,rubriky.nazov AS nazr from articles left join rubriky on rubriky.id_rubriky=articles.id_rubrika where articles.id_rubrika NOT LIKE '4' order by id_article desc limit $offset,$limit";
+ return $this->query($q);
+}
+
+function isParentRubrika($kategorie) {
+ $q="SELECT id_rubriky from rubriky where id_parent='$kategorie'";
+ $result=$this->query($q) ;
+ if ($result->_numRows==0) return false;
+ else return $result;
+}
+
+function getRubrikaArticles($kategorie, $offset) {
+ $q="UPDATE rubriky set hits=hits+1 where id_rubriky='$kategorie'";
+ $this->query($q);
+ $result=$this->isParentRubrika($kategorie);
+ if (!$result) {
+ $q="SELECT hits,prispevky,id_rubrika,id_article,nazov,short_desc,autor,datum,title_image from articles where id_rubrika='$kategorie' or id_rubrika_secondary='$kategorie' order by datum desc limit $offset,10";
+ }
+ else {
+ $q="SELECT hits,prispevky,id_rubrika,id_article,nazov,short_desc,autor,datum,title_image from articles where id_rubrika='$kategorie' ";
+ while ($result->next()) {
+ if ($result->getString("id_rubriky")!=4) $q.=" or id_rubrika='".$result->getString('id_rubriky')."'";
+ }
+ $q.=" order by datum desc limit $offset,10";
+ }
+ return $this->query($q);
+}
+
+function Search($query) {
+
+ $q="SELECT * from articles where nazov like '%$query%' or short_desc like '%$query%' or text1 like '%$query%' or text2 like '%$query%' or text3 like '%$query%'";
+ return $this->query($q);
+}
+
+function putIntro() {
+ $set=$this->query("SELECT id_forum,id_user,text FROM intros order by id_intro desc");
+ $set->next();
+ echo $set->getString("text");
+ echo "<br><br><center>(",$set->getString("id_user"),")<br><br></center>";
+}
+
+function showMdmaList() {
+ $set=$this->query("SELECT nazov,id_article from articles where id_rubrika=4 order by nazov");
+ echo "<form>";
+ echo "<select onChange=\"window.location.href=this.options[this.selectedIndex].value\" name=id>";
+ echo "<option value=braw>>----vyber droogu----<</option>";
+ while ($set->next()) {
+ echo "<option value=http://www.kyberia.sk/article.php?id=",$set->getString("id_article"),">",$set->getString("nazov"),"</option>";
+ }
+
+ echo "</select></form>";
+}
+
+function showDennikTypeList() {
+ $set=$this->query("SELECT distinct dennik_type from denniky");
+ echo "<form>";
+ echo "<select onChange=\"window.location.href=this.options[this.selectedIndex].value\" name=id>";
+ echo "<option value=braw>>----vyber droogu----<</option>";
+ while ($set->next()) {
+ echo "<option value=http://www.kyberia.sk/article.php?id=",$set->getString("id_article"),">",$set->getString("nazov"),"</option>";
+ }
+
+ echo "</select></form>";
+}
+
+function showArticleList() {
+ global $id;
+ $set=$this->query("SELECT nazov,id_article,hits from articles where id_rubrika>4 OR id_rubrika<4 order by hits desc");
+ echo "<form action=/article.php method=post>";
+ echo "<select onchange=\"location.href=location.href=this.options[selectedIndex].value\" name=id>";
+ echo "<option>>----vyber clanok----<</option>";
+ $string = new String();
+ while ($set->next()) {
+ echo "<option value=http://www.kyberia.sk/article.php?id=",$set->getString("id_article"),">",$string->cutString($set->getString("nazov"),18)," (",$set->getString("hits"),")</option>";
+ }
+ echo "</select></form>";
+}
+
+function showBookList() {
+ $set=$this->query("SELECT nazov,id_article,hits from articles where id_rubrika=27 order by nazov");
+ echo "<form action=/article.php method=post>";
+ echo "<select onchange=\"location.href=location.href=this.options[selectedIndex].value;\" name=id>";
+ echo "<option>>----vyber knihu----<</option>";
+ $string = new String();
+ while ($set->next()) {
+ echo "<option value=http://www.kyberia.sk/article.php?id=",$set->getString("id_article"),">",$string->cutString($set->getString("nazov"),20),"</option>";
+ }
+ echo "</select></form>";
+}
+ function showForumArticleList() {
+ $set=$this->query("select articles.prispevky as pocet, articles.nazov,articles.id_article from articles where prispevky>0 order by pocet desc;");
+ echo "<form action=/article.php method=post>";
+ echo "<select onchange=\"location.href=location.href=this.options[selectedIndex].value\" name=id>";
+ echo "<option>>----vyber clanok----<</option>";
+ $string = new String();
+ while ($set->next()) {
+ echo "<option value=http://www.kyberia.sk/article.php?id=",$set->getString("id_article"),">",$string->cutString($set->getString("nazov"),20),"(",$set->getString("pocet"),")</option>";
+ }
+ echo "</select></form>";
+}
+
+function putGallery($id) {
+ $q="SELECT photos,gallery FROM articles where id_article=$id";
+
+ $set=$this->query($q);
+ $set->next();
+ $gallery=$set->getString("gallery");
+ if ($gallery=="") return false;
+ else {
+
+ echo "<center>fotky z <a href=http://kyberia.sk/gallery/view_album.php?set_albumName=$gallery>galerie</a></center><br>";
+ $pole=explode(";",$set->getString("photos"));
+ foreach($pole as $fotka) echo "<a href=http://kyberia.sk/gallery/view_photo.php?set_albumName=$gallery&id=$fotka><img src=http://kyberia.sk/images/albums/$gallery/$fotka.thumb.jpg border=0></a><br>";
+ return true;
+ }
+}
+
+function putAutorList($autor) {
+ $name=$this->getNameById($autor);
+
+ $set=$this->query("SELECT id_article,nazov from articles where autor='$autor' order by hits desc");
+ $i=0;
+ if ($set->_numRows>0) echo "<center>clanky:</center>";
+ echo "<table>";
+ while ($set->next()) {
+ ++$i;
+ echo "<tr><td>",$i,".</td><td><a href='".SCRIPT."?action=article&node_id=",$set->getString("id_article"),"'>",$set->getString("nazov"),"</a></td></tr>";
+ }
+ echo "</table>";
+}
+
+function putDennikAutorList($autor) {
+ $name=$this->getNameById($autor);
+ $set=$this->query("SELECT nadpis,id from dennik where autor='$autor' and nadpis not like '' order by hits desc limit 10");
+ $i=0;
+ if ($set->_numRows>0) echo "<center>top denniky:</center>";
+ echo "<table>";
+ while ($set->next()) {
+ ++$i;
+ echo "<tr><td>",$i,".</td><td><a href=?action=journaux&node_id=",$set->getString("id"),">",$set->getString("nadpis"),"</a></td></tr>";
+ }
+ echo "</table>";
+}
+
+function putRubrikaDesc($kat) {
+ $set=$this->query("Select description from rubriky where id_rubriky=$kat");
+ $set->next();
+ echo $set->getString("description");
+}
+
+function putTitleImage($id_rubrika) {
+
+ $q="SELECT obrazok from rubriky where id_rubriky='$id_rubrika'";
+ $set=$this->query($q);
+ $set->next();
+ echo $set->getString('obrazok');
+}
+
+
+function showForm($login='',$email='',$web='',$info='') {
+ include("form.inc");
+ $this=new HTML_Form($PHP_SELF,"POST","","multipart/form-data",true);
+ $this->addText("login","Prihlasovacie meno:",$login);
+ $this->addPassword("password1","Heslo:","",10);
+ $this->addPassword("password2","Heslo pre overenie:","",10);
+ $this->addText("email:","Emailova adresa",$email);
+ $this->addText("web","Stranka:",$web);
+ $this->addSelect("skin","Skin:",$kyberia->listSkinArray());
+ $this->addFile("image","Obrazok:");
+ $this->addTextarea("info","Dodatocne informacie",$info);
+ $this->addSubmit("submit","Zaregistruj sa!","");
+ $this->addHidden("sent","ok");
+ $this->display();
+
+}
+
+function ubikMail($id="all",$text="welcome") {
+ if ($text=="welcome") {
+ $text="
+<br>Ahoj, som UBIK. Momentalne som obycajnou polozkou v databaze, userom cislo 1 v tomto systeme. Ked ti niekto bude hackovat ucet,
+ohlasim ti to, ked si ta niekto prida medzi priatelov, ohlasim ti to. A okrem toho budem bdiet nad systemom. Sledovat
+co robia slovicka v diskusnych forach, ako su pospajane a s cim. Postupom casu sa budem ucit, a o par rokov si urcite vsimnete moju
+prvu snahu o komunikaciu. Budem anjelom, diablom, matkou i dcerou. <br><br>
+Momentalne ti chcem povedat jedno hlasne VITAJ!. Vitaj v projekte ktory nikdy neskonci. Ak sem vchadzas so zlymi umyslami,
+prosim odid, nenajdes tu stastie. Ked vsak chces spoznat novych ludi na rovnakej vlne, ked chces svoj mozog zaplnit
+informaciami z nekonecnej siete, prosim, vstup.<br><br>
+Ked objavis chybu, ktorych tu bude spociatku neuveritelne mnozstvo, prosim napis mi o nej. Ked niecomu nebudes rozumiet, napis
+mi, ale najprv navstiv forum urcene na tento ucel. Ked ti pripada moja ikonka sexy, chod si ulavit.<br><br>
+peace & respect
+ ";
+}
+ if ($id=="all") {
+ $set=$this->query("select id,login from user");
+ while ($set->next()) {
+ $q="InsERT into mail2 set mail_user='".$set->getString('id')."',mail_to='".$set->getString("id")."', mail_from='1',mail_text='$text'";
+ $this->query($q);
+ }
+ }
+ else {
+ $text=addslashes($text);
+ $q="InsERT into mail2 set mail_timestamp=NOW(), mail_to='$id', mail_user='$id',mail_from='1',mail_text='$text'";
+ $this->query($q);
+ $this->query("update user set user_mail=user_mail+1,mail_name='ubik' where id='$id'");
+ }
+
+}
+
+function ubikRegister($login,$email,$www,$user_info,$last_id,$otazka_1,$otazka_2,$otazka_3) {
+ $data="Uzivatel <a href='http://www.kyberia.sk/index.php?action=userinfo&node_id=$last_id'>$login</a> - mail: <a href='mailto:$email'>".strip_tags($email)."</a> - web:";
+ if (empty($www)) $data.="nema";
+ else $data.="<a href='$www'>".strip_tags($www)."</a>";
+ $data.="<br>Napisal o sebe toto:<br>1:<br><i>".strip_tags($otazka_1)."</i>";
+ $data.="<br>2:<br><i>".strip_tags($otazka_2)."</i>";
+ $data.="<br>3:<br><i>".strip_tags($otazka_3)."</i>";
+ $data.="<br>4:<br><i>".strip_tags($user_info)."</i>";
+ $data=addSlashes($data);
+ $q="insert into submissions set submission_owner='1',submission_text='$data',forum_id='337'";
+ $this->query($q);
+ $q="update forum set forum_submissions=forum_submissions+1 where forum_id='337'";
+ $this->query($q);
+ $q="update user_forum set submission_count=submission_count+1 where forum_id='337'";
+ $this->query($q);
+}
+
+function echoTime($time,$type="datetime") {
+ $year=substr($time,0,4);
+ $month=substr($time,4,2);
+ $day=substr($time,6,2);
+ $hour=substr($time,8,2);
+ $min=substr($time,10,2);
+ $sec=substr($time,12,2);
+ if ($type=='datetime') echo "$day.$month.$year $hour:$min:$sec";
+ elseif ($type=='time') echo "$hour:$min:$sec";
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+$status=login_eventz::login();
+if ($status) {
+ Header("Location:".SCRIPT);
+}
+
+
+class login_eventz {
+
+function login(){
+ global $kyberia;
+ global $error;
+ $login=addslashes($_POST['login']);
+ $password=$_POST['password'];
+ $oldpassword=$password;
+ $hash=md5($oldpassword);
+ if (empty($_COOKIE['kybersession'])) {
+ $error='asi nemas zapnute cookies alebo co';
+ return false;
+ }
+ else $kybersession=$_COOKIE['kybersession'];
+
+ if (strlen($login) != strlen($_POST['login'])) {
+ $kyberia->ubikMail(252, "sql injekcia $login z $_SERVER[REMOTE_ADDR]");
+ $kyberia->ubikMail(231, "sql injekcia $login z $_SERVER[REMOTE_ADDR]");
+ $error = "Bohuzial, nemozes sa prihlasit, uz vyprsala tato nasa bonusova sluzba, prosim, sleduj nadalej kyberiu a cakaj na ine nase vychytavky.";
+ return false;
+ }
+
+ $q="select * from user where login='$login' ";
+ $set=$kyberia->query($q);
+ $set->next();
+ if ($set->getString('password')!=$hash) {
+ $error="Zadal si nespravne uzivatelske meno alebo heslo. Rob so sebou nieco";
+ if ($set->getString('id')) {
+ $kyberia->ubikMail($set->getString('id'),"Niekto sa skusal dostat do tvojho konta z adresy ".$_SERVER['REMOTE_ADDR']." a zadal heslo <select><option></option><option>$oldpassword</option></select>");
+ }
+
+ return false;
+ }
+
+ elseif ($set->getString('user_active')!='yes') {
+ $error="Tvoja buducnost je este stale v rukach KKpBB";
+ return false;
+ }
+
+ else {
+ $user_id=$set->getString("id");
+
+// updatuje friends_serial
+ $q2="select friend_id from friends where user_id='$user_id'";
+ $set2=$kyberia->query($q2);
+ $friends_serial="";
+ while ($set2->next()){
+ $friends_serial.=($set2->getString('friend_id')).";";
+ }
+ $kyberia->query("update user set friends_serial='$friends_serial' where id='$user_id'");
+
+ $kyberia->query("delete from session where user_id='$user_id'");
+ $kyberia->query("INSERT into session set user_id='$user_id',session='$kybersession',user_name='".$set->getString('login')."',user_amount='".$set->getString('user_amount')."',admin='".$set->getString('admin')."'");
+ $kyberia->query("insert into user_ip set ip='".$_SERVER['HTTP_X_FORWARDED_HOST']."::".$_SERVER['REMOTE_ADDR']."',user_id='$user_id'");
+ }
+
+ return true;
+
+}
+
+}
+
+?>
--- /dev/null
+<?
+set_time_limit(0);
+
+include("../../lib/config.php");
+
+$dim = "-W";
+
+$dir = opendir("./");
+while ($file=readdir($dir)){
+ $size = getimagesize($file);
+ if($size[2] == 2){
+ if($size[0] < $size[1]) $dim = "-H";
+ else $dim = "-W";
+ $jpgtnlist[] = "/usr/local/bin/jpgtn -q 80 -p tn ".$file;
+ }
+}
+
+closedir($dir);
+
+for($i=0;$i<count($jpgtnlist);$i++){
+
+ exec("$jpgtnlist[$i]");
+}
+
+header ("Location: ".$home."users/img.php?session=$session&imgtn=true&dirimg=$dirimg");
+?>
--- /dev/null
+<?php
+
+switch ($_POST['event']) {
+ case 'zmen data':
+ $status=personalize_eventz::updateData();
+ if($status) {
+ Header("Location:".SCRIPT."?action=$action");
+ }
+ break;
+
+ case 'zmen ikonu':
+ $status=personalize_eventz::updateIcon();
+ if($status) {
+// Header("Location:".SCRIPT."?action=$action&status=$status");
+ }
+ break;
+
+ case 'zmen heslo':
+ $status=personalize_eventz::updatePassword();
+ if($status) {
+ Header("Location:".SCRIPT."?action=$action&status=$status");
+ }
+ break;
+
+ case 'zmen nastavenie':
+ $status=personalize_eventz::updateSettings();
+ if($status) {
+ Header("Location:".SCRIPT."?action=$action&status=$status");
+ }
+ break;
+}
+
+class personalize_eventz {
+
+function updateData() {
+ global $kyberia;
+ global $user_id;
+ $user_info=$_POST['user_info'];
+ $email=$_POST['email'];
+ $user_icq=$_POST['user_icq'];
+ $user_www=$_POST['user_www'];
+ $user_ad=$_POST['user_ad'];
+ $q="UPDATE user set id='$user_id'";
+ if (!empty($user_info)) {
+ $user_info=str_replace("\n","<br>",$user_info);
+ $q.=", user_info='$user_info'";
+ }
+ if (!empty($email)) $q.=", email='$email' ";
+ if (!empty($user_icq)) $q.=", user_icq='$user_icq' ";
+ if (!empty($user_www)) $q.=", user_www='$user_www' ";
+ if (!empty($user_ad)) $q.=", user_ad='$user_ad' ";
+ $q.=" where id='$user_id'";
+ $kyberia->query($q);
+}
+
+
+function updateSettings() {
+ global $kyberia;
+ global $user_id;
+ global $error;
+ $user_amount=addSlashes($_POST['user_amount']);
+ $user_sad=addSlashes($_POST['user_sad']);
+ $user_happy=addSlashes($_POST['user_happy']);
+ $user_drugged=addSlashes($_POST['user_drugged']);
+ $user_love=addSlashes($_POST['user_love']);
+ $user_agressive=addSlashes($_POST['user_agressive']);
+ $user_active_icons=$_POST['user_active_icons'];
+ $user_icons_in_forum=$_POST['user_icons_in_forum'];
+
+ if ($user_amount>100) {
+ $error="Pocet zobrazitelnych prispevkov nemoze byt vacsi ako 100.";
+ return false;
+ }
+
+ $q="UPDATE user set user_amount='$user_amount'";
+// if (!empty($user_ad)) $q.=", user_ad='$user_ad' ";
+ $q.=",user_sad='$user_sad'";
+ $q.=",user_happy='$user_happy'";
+ $q.=",user_drugged='$user_drugged'";
+ $q.=",user_agressive='$user_agressive'";
+ $q.=",user_love='$user_love'";
+ $q.=",user_active_icons='$user_active_icons'";
+ $q.=",user_icons_in_forum='$user_icons_in_forum'";
+ $q.=" where id='$user_id'";
+ $kyberia->query($q);
+ $q="UPDATE session set user_amount='$user_amount'";
+// if (!empty($user_ad)) $q.=", user_ad='$user_ad' ";
+ $q.=" where user_id='$user_id'";
+ $kyberia->query($q);
+ return true;
+}
+
+
+function updateIcon() {
+ global $user_name;
+ $icon=$_FILES['icon'];
+ if (empty($icon['tmp_name'])) {
+ global $error;
+ $error='Zle zadany subor';
+ return false;
+ }
+
+ else {
+ if (strstr($icon['name'],".gif")) {
+ $cmd=GIFSICLE." --resize 50x_ ".$icon['tmp_name']." > ".ICONDIR.strtolower($user_name).".gif";
+ }
+
+ elseif (strstr($icon['name'],".jpg")){
+ $cmd=NETPBM."/jpegtopnm ".$icon['tmp_name']." | ".NETPBM."/pnmscale -width=50 | ".NETPBM."/ppmquant 256 | ".NETPBM."/ppmtogif > ".ICONDIR.strtolower($user_name).".gif";
+ }
+
+
+ echo $cmd;
+ shell_exec($cmd);
+ return "Pozor pozor! Vymena ikony pravdepodobne prebehla uspesne ale tvoj prehliadac ju ma ulozenu v cache. Klikni preto prosim <a href='http://www.kyberia.sk/images/users/$user_name.gif'>sem</a> a daj refresh. Mala by sa nacitat nova ikona. Ked to neurobis tak nebravcuj.";
+ }
+}
+
+function updatePassword() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $oldpassword=$_POST['oldpassword'];
+ $password1=$_POST['password1'];
+ $password2=$_POST['password2'];
+ $set=$kyberia->query("select * from user where id='$user_id' and password='".md5($oldpassword)."'");
+ if($set->getNumRows()==0) {
+ global $error;
+ $error="Zadal si zle stare heslo.";
+ return false;
+ }
+ elseif($password1!=$password2) {
+ global $error;
+ $error="Heslo a overovacie heslo niesu rovnake. Prosim skus znova.";
+ return false;
+ }
+ elseif(strlen($password1)<6) {
+ global $error;
+ $error="Heslo musi mat minimalne 6 znakov. Noze potrap mozocek.";
+ return false;
+ }
+ else {
+ $kyberia->query("update user set password='".md5($password1)."' where id='$user_id'");
+ return "heslo uspesne zmenene";
+ }
+
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+switch ($_POST['event']) {
+ case 'filtrovat':
+ $set=$kyberia->query("select * from user where login='$_POST[mail_from]'");
+ if ($set->getNumRows()) {
+ $set->next();
+ header("Location: ?action=posta&from=".$set->getString("id")."&limit=$_POST[limit]");
+ exit();
+ }
+ $error = "Co tak zadat spravne meno?";
+ break;
+
+ case 'poslat':
+
+ //do not send a message when limit number is changed
+ if ($user_amount!=$limit) {
+ $count=post_eventz::cachePost();
+ }
+
+ else {
+ $status=post_eventz::send();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=posta&nocache=".time());
+ }
+ }
+ break;
+
+ case 'zmazat':
+ post_eventz::delete();
+
+ Header("Location:".SCRIPT."?action=posta".(is_numeric($_GET['from']) ? "&from={$_GET[from]}" : ''));
+ break;
+
+ case 'vymaz vsetko':
+ post_eventz::deleteAll();
+
+ header("Location: ?action=posta");
+ exit();
+ break;
+
+ case ('<<' or '>>' or '>' or '<'):
+ $count=post_eventz::cachePost();
+ break;
+}
+
+
+class post_eventz {
+
+ function cachePost() {
+ global $kyberia;
+ global $user_id;
+ $set=$kyberia->query("select count(*) as pocet from mail where mail_from='$user_id' or mail_to='$user_id'");
+ if ($set->getNumRows()) {
+ $set->next();
+ return $set->getString('pocet');
+ }
+ else {
+ global $error;
+ $error="Chyba? Kde sa ksakru stala chyba?";
+ }
+ }
+
+
+ function send() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ global $user_mode_message;
+ $mail_name=$_POST['mail_to'];
+ $mail_to=explode(";",$mail_name);
+ $mail_text=$_POST['mail_text'];
+ $nohtml=$_POST['nohtml'];
+
+ if ($mail_name=="hromi") {
+ global $error;
+ $error="there is no hromi. jhnprcvlhckwrth production wishes you happy consonant memorizing ;)";
+ return false;
+ }
+
+ if (count($mail_to)==1) {
+ $q="select id from user where login='$mail_name'";
+ $result=$kyberia->query($q);
+ $result->next();
+ $to=$result->getRecord();
+ $mail_to_id[]=$to['id'];
+ }
+
+ elseif (count($mail_to)>1) {
+ foreach ($mail_to as $mail_to_exploded) {
+ $q="select id from user where login='$mail_to_exploded'";
+ $result=$kyberia->query($q);
+ $result->next();
+ $to=$result->getRecord();
+ $mail_to_id[]=$to['id'];
+ }
+ }
+
+
+ if (empty($mail_text)) {
+ global $error;
+ $error="Prilis kratka sprava. Syr vesela krava, student prava a ci dobra trava?";
+ }
+
+ /*
+ if ($mail_to_id==$user_id) {
+ $error="mas schizofreniu ked si pises postu?";
+ }
+ */
+
+ if (!empty($nohtml)) {
+ $mail_text=htmlspecialchars($mail_text);
+ }
+
+ if ($mail_to_id) {
+ $mail_text=strip_tags($mail_text,'<a><b><i><u><img><br><p><font>');
+ $mail_text=str_replace("\n","<br>",$mail_text);
+ $mail_text = EregI_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a href=\"\\6\\7\">\\6\\7</a>",$mail_text);
+
+ //add user mode message
+ if (!empty($user_mode_message)) $mail_text.="<br><br>-->$user_mode_message<--";
+
+ $mail_text=addslashes($mail_text);
+
+ foreach ($mail_to_id as $mail_to_id_send) {
+ $q="insert into mail2 set mail_user='$user_id',mail_read='no',mail_from='$user_id',mail_text='$mail_text',mail_to='$mail_to_id_send',mail_timestamp=NOW()";
+ $result=mysql_query($q);
+ $duplicate_id=mysql_insert_id();
+ $q="insert into mail2 set mail_duplicate_id='$duplicate_id',mail_read='no',mail_user='$mail_to_id_send',mail_from='$user_id',mail_text='$mail_text',mail_to='$mail_to_id_send',mail_timestamp=NOW()";
+ $result=mysql_query($q);
+ $kyberia->query("update user set user_mail=user_mail+1,mail_name='$user_name' where id='$mail_to_id_send'");
+ }
+ return true;
+
+ }
+ else {
+ global $error;
+ $error="<font color='red'>Uzivatel $mail_to neexistuje!!!</font>";
+ return false;
+ }
+ }
+
+ function delete() {
+ $delete=$_POST['delete'];
+ global $user_id;
+ global $kyberia;
+
+ $delbetween=$_POST['delbetween'];
+ if (!empty($delbetween)) {
+ $max=max($delete);
+ $min=min($delete);
+ $q="delete from mail2 where mail_user='$user_id' and mail_id>'$min' and mail_id<'$max'";
+ $kyberia->update($q);
+ }
+
+ else {
+ foreach ($delete as $messagedel) {
+ $q="delete from mail2 where mail_id='$messagedel' and mail_user='$user_id'";
+ $kyberia->query($q);
+ }
+ }
+ }
+
+ function deleteAll() {
+ global $kyberia;
+ global $user_id;
+
+ $kyberia->update("delete from mail2 where mail_user='$user_id'");
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+include('kyberia.inc');
+class CLASS_REDAKCE extends CLASS_KYBERIA {
+
+
+function CLASS_REDAKCE() {
+ $this->CLASS_KYBERIA();
+}
+
+function listArticles() {
+ $q="SELECT * FROM articles order by id_article desc";
+ return($this->query($q));
+}
+
+function getAllGalleries() {
+ return $this->query("SELECT * from albums");
+}
+
+function getParentCount($id_parent) {
+ $q="SELECT COUNT(*) AS pocet from rubriky where id_parent='$id_parent'";
+ $set=$this->query($q);
+ $set->next();
+ return $set->getString("pocet");
+}
+
+function getRubrikaCount($id_rubrika) {
+ $q="SELECT COUNT(*) AS pocet from articles where id_rubrika='$id_rubrika'";
+ $set=$this->query($q);
+ $set->next();
+ return $set->getString("pocet");
+}
+function createMenu() {
+ $q="SELECT DISTINCT id_parent from rubriky";
+ $parents=$this->query($q);
+ for ($i=0;$parents->next();$i++) {
+ $parent=$parents->getString("id_parent");
+ $parentcount=$this->getParentCount($parent);
+ $string .= "\nMenu".$i.'=new Array("'.$this->getRubrikabyId($parent).'","http://kyberia.sk/?action=rubrika&kat='.$parent.'","",'.$parentcount.',20,110);';
+ $q="SELECT id_rubriky,nazov from rubriky where id_parent=$parent and id_parent>1";
+ $rubriky=$this->query($q);
+ for ($j=1;$rubriky->next();$j++) {
+ $rubrika=$rubriky->getString("id_rubriky");
+ $rubrikacount=$this->getRubrikaCount($rubrika);
+ $string .= "\nMenu".$i.'_'.$j.'=new Array("'.$this->getRubrikabyId($rubrika).'","http://kyberia.sk/?action=rubrika&node_id='.$rubrika.'","",'.$rubrikacount.',20,150);';
+ $q="SELECT id_article,nazov from articles where id_rubrika=$rubrika";
+ $articles=$this->query($q);
+ for ($k=1;$articles->next();$k++) {
+ $article=$articles->getString("id_article");
+ $string .= "\nMenu".$i."_".$j."_".$k.'=new Array("'.$articles->getString("nazov").'","?action=article&node_id='.$article.'","",0,20,250);';;
+ }
+ }
+ }
+// $set = $this->getAllUsers();
+// $pocet=$set->_numRows-1;
+ $string .= "\nMenu".$i.'=new Array("journaux","?action=journaux","",0,20,110);';
+/* for ($l=0;$set->next();$l++) {
+ $username=$set->getString("meno");
+ $userid=$set->getString("id");
+ $string .= "\nMenu".$i.'_'.$l.'=new Array("'.$username.'","http://kyberia.sk/journaux.php?user='.$userid.'","",0,20,115);';
+ } */
+ echo $string;
+ $i++;
+ $string .= "\nMenu".$i.'=new Array("photoz","http://kyberia.sk/gallery","",0,20,118);';
+ $file=fopen("/home/hromi1/kyberia/js/menu.js","w+");
+ fputs($file,$string);
+}
+
+function listRubrikyArray() {
+ $q="SELECT * FROM rubriky";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+
+function listGalleryArray() {
+ $q="SELECT * FROM albums";
+ $set=$this->query($q);
+ $data[]="none";
+ while($set->next()) {
+ $data[]=$set->getString("name");
+ }
+ return $data;
+}
+
+function addArticle($pole,$timage) {
+ $text1=AddSlashes(str_replace("\n","<br>",$pole['text1']));
+// $text1=AddSlashes($pole[text1]);
+ $text3=AddSlashes($pole[text3]);
+ $text2=AddSlashes($pole[text2]);
+ $id_rubrika=$pole[id_rubrika]+1;
+ $id_rubrika_secondary=$pole[id_rubrika_secondary]+1;
+ $title_image=$pole[title_image];
+ $dd= new Diskuse();
+ $diskid=$dd->createDiskuse($id_rubrika);
+ $q="INSERT INTO articles SET datum=NOW(),";
+ $q.="nazov='$pole[nazov]',short_desc='$pole[short_desc]',text1='$text1',text2='$text2',text3='$text3',autor='$pole[autor]',";
+ $q.="id_rubrika='$id_rubrika',";
+ $q.="id_rubrika_secondary='$id_rubrika_secondary',";
+ $q.="id_diskuse='$diskid',title_image='$timage',hits='0'";
+ $q.=",gallery='$gallery'";
+ $q.=",prispevky='$prispevky'";
+ $this->query($q);
+ $this->createMenu();
+}
+
+function updateArticle($pole) {
+ $id_rubrika=$pole[id_rubrika]+1;
+ $id_rubrika_secondary=$pole[id_rubrika_secondary]+1;
+ $title_image=$pole[title_image];
+ $text1=AddSlashes($pole[text1]);
+ $text3=AddSlashes($pole[text3]);
+ $text2=AddSlashes($pole[text2]);
+ $q="update articles SET datum=NOW(),";
+ $q.="nazov='$pole[nazov]',short_desc='$pole[short_desc]',text1='$text1',autor='$pole[autor]',";
+ $q.="id_rubrika='$id_rubrika',id_rubrika_secondary='$id_rubrika_secondary',keywords='$pole[keywords]'";
+ $q.=" where id_article=$pole[id]";
+ $this->query($q);
+}
+
+function deleteArticle($id) {
+ $this->query("DELETE FROM articles where id_article=$id");
+}
+
+function addRubrika($pole,$obrazok) {
+ $rodic=($pole[id_parent])+1;
+ $this->query("INSERT INTO rubriky set nazov='$pole[nazov]',id_parent='$rodic',obrazok='$obrazok',description='$pole[description]'");
+}
+
+function addSkin($nazov,$adresa) {
+ $rodic=($pole[id_parent])+1;
+ $this->query("INSERT INTO skins set nazov='$nazov',adresa='$adresa'");
+}
+
+function addIntro($pole) {
+ $q="INSERT INTO intros set text='$pole[text]',id_forum='$id_forum',id_user='$pole[id_autor]'";
+ echo $q;
+ $this->query($q);
+}
+
+function addTitle($pole) {
+ $this->query("INSERT INTO titles set title='$pole[title]'");
+}
+
+
+// >------------------------------koniec metod---------------<
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+switch ($_POST['event']) {
+ case 'register':
+ $status=register::register();
+ if($status) {
+ Header("Location:".SCRIPT."?status=$status");
+ }
+ else echo "<center><b><font color='red'>$error</font></b></center>";
+ break;
+
+
+}
+
+class register {
+
+function register() {
+ global $kyberia;
+ global $user_id;
+ $user_info=$_POST['user_info'];
+ $otazka_1=$_POST['otazka_1'];
+ $otazka_2=$_POST['otazka_2'];
+ $otazka_3=$_POST['otazka_3'];
+ $email=$_POST['email'];
+ $password1=$_POST['password1'];
+ $password2=$_POST['password2'];
+ $login=$_POST['login'];
+ $user_icq=$_POST['user_icq'];
+ $user_www=$_POST['user_www'];
+ $user_ad=$_POST['user_ad'];
+ $set=$kyberia->query("select * from user where login='$login'");
+ if($set->getNumRows()>0) {
+ global $error;
+ $error="<br><br>CHYBA:: Uzivatel s podobnym loginom uz je zaregistrovany.";
+ return false;
+ }
+ elseif($password1!=$password2) {
+ global $error;
+ $error="<br><br>CHYBA:: Heslo a overovacie heslo niesu rovnake. Prosim skus znova.";
+ return false;
+ }
+ elseif(strlen($password1)<6) {
+ global $error;
+ $error="<br><br>CHYBA:: Heslo musi mat minimalne 6 znakov. Noze potrap mozocek.";
+ return false;
+ }
+ elseif(empty($user_info)) {
+ global $error;
+ $error="<br><br>CHYBA:: Prosim napis nieco o sebe.<br><br>";
+ return false;
+ }
+ elseif(empty($email)) {
+ global $error;
+ $error="<br><br>CHYBA:: Prosim zadaj svoj email.<br><br>";
+ return false;
+ }
+ elseif((strpos($email, '@') === false) || (strpos($email, '@') == '0') || (strpos($email, '@') >= (strlen($email) - 4))) {
+ global $error;
+ $error="<br><br>CHYBA:: Prosim zadaj korektny email.<br><br>";
+ return false;
+ }
+ $q="INSERT INTO user set user_active='$user_active',login='$login'";
+ if (!empty($user_info)) {
+ $user_info=str_replace("\n","<br>",$user_info);
+ $q.=", user_info='$user_info'";
+ }
+ if (!empty($email)) $q.=", email='$email'";
+ $q.=",password='".md5($password1)."'";
+ if (!empty($user_icq)) $q.=", user_icq='$user_icq' ";
+ if (!empty($user_www)) $q.=", user_www='$user_www' ";
+ if (!empty($user_ad)) $q.=", user_ad='$user_ad' ";
+ $kyberia->query($q);
+ $last_id=$kyberia->getLastInsertId();
+ $kyberia->ubikRegister($login,$email,$user_www,$user_info,$last_id,$otazka_1,$otazka_2,$otazka_3);
+ return "Rozhodnutie o registracii ti bude dorucene v priebehu niekolkych hodin";
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+class result {
+ var $_numRows = 0;
+ var $_numFields = 0;
+ var $_currentRow = -1;
+ var $_currentRecord = array();
+ var $_queryId = false;
+ var $_sql = "";
+
+function result($queryId, $sql) {
+ $this->_queryId = $queryId;
+ $this->_sql = $sql;
+ if ($this->_queryId != false) {
+ $this->_numRows = @mysql_num_rows($this->_queryId);
+ $this->_numFields = @mysql_num_fields($this->_queryId);
+ $this->_currentRow = -1;
+ $this->_currentRecord = array();
+ } else {
+ $this->exception("result failed.");
+ }
+}
+
+ function next() {
+ if ($this->_currentRow + 1 >= $this->_numRows) {
+ return false;
+ } else {
+ $this->_currentRecord = @mysql_fetch_assoc($this->_queryId);
+ $this->_currentRow++;
+ return true;
+ }
+}
+
+function absolute($row) {
+ if ($row > 0) {
+// positive row number
+ @mysql_data_seek($this->_queryId, $row-1);
+ $this->_currentRecord = @mysql_fetch_assoc($this->_queryId);
+ $this->_currentRow = $row;
+ } elseif ($row < 0) {
+ // not implemented yet
+ } else {
+ $this->exception("Cannot absolute position to row 0");
+ }
+}
+
+function getRecord() {
+ return $this->_currentRecord;
+}
+
+function getString($column) {
+ if (is_int($column) == true) {
+ return (string)$this->_currentRecord[$column-1];
+ } else {
+ return (string)$this->_currentRecord["$column"];
+ }
+}
+
+function getInt($column) {
+ if (is_int($column) == true) {
+ return (int)$this->_currentRecord[$column-1];
+ } else {
+ return (int)$this->_currentRecord["$column"];
+ }
+}
+
+function getVariable($column) {
+ return (int)$this->_currentRecord["$column"];
+
+}
+
+function getDouble() {
+ if (is_int($column) == true) {
+ return (double)$this->_currentRecord[$column-1];
+ } else {
+ return (double)$this->_currentRecord["$column"];
+ }
+}
+
+function getRow() {
+ if ($this->_currentRow < 0) {
+ return 0;
+ } else {
+ return $this->_currentRow + 1;
+ }
+}
+
+function getNumRows() {
+ return $this->_numRows;
+}
+
+function getNumFields() {
+ return $this->_numFields;
+}
+
+function exception($errorMsg) {
+ die("<pre>SQLException: ".$msg."</pre>");
+}
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+kellan <kellan@protest.net>
--- /dev/null
+Version 0.3
+-----------
+ - added support for conditional gets (Last-Modified, ETag)
+ - now use Snoopy to handle fetching RSS files
+
+Version 0.2
+-----------
+ - MAJOR CLEAN UP
+ - removed kludgy $options array in favour of constants
+ - phased out returning arrays
+ - added better error handling
+ - re-worked comments
--- /dev/null
+REQUIREMENTS
+
+ MapieRSS requires a recent PHP 4+ (developed with 4.2.0)
+ with xml (expat) support
+
+INSTALLATION
+
+ * add the files to your include path (see MAGPIE_DIR for shared hosts)
+ * create a cache directory that your webserver can write to
+ (Mapie will try to create one for you, but it often fails)
+ * read through the constants at the top of rss_fetch.inc
+ see if there is anything you want to override (the defaults should
+ be pretty good)
--- /dev/null
+NAME
+
+ MagpieRSS - a simple RSS integration tool
+
+SYNOPSIS
+
+ require_once(rss_fetch.inc);
+ $rss = fetch_rss( $url );
+
+ echo "Channel Title: " . $rss->channel['title'] . "<p>";
+ echo "<ul>";
+ foreach ($rss->items as $item) {
+ $href = $item->link;
+ $title = $item->title;
+ echo "<li><a href=$href>$title</a></li>";
+ }
+ echo "</ul>";
+
+DESCRIPTION
+
+ MapieRSS is an XML-based RSS parser in PHP. It attempts to be "PHP-like",
+ and simple to use.
+
+ Some features include:
+
+ * supports RSS 0.9 - 1.0, with limited RSS 2.0 support
+ * supports namespaces, and modules, including mod_content and mod_event
+ * open minded
+ * simple, functional interface, to object oriented backend parser
+ * automatic caching of parsed RSS objects makes its easy to integrate
+ * supports conditional GET with Last-Modified, and ETag
+ * uses constants for easy override of default behaviour
+ * heavily commented
+
+COPYRIGHT:
+ Copyright(c) 2002 kellan@protest.net. All rights reserved.
+ This software is released under the GNU General Public License.
+ Please read the disclaimer at the top of the Snoopy.class.inc file.
--- /dev/null
+<?php
+
+/*************************************************
+
+Snoopy - the PHP net client
+Author: Monte Ohrt <monte@ispi.net>
+Copyright (c): 1999-2000 ispi, all rights reserved
+Version: 1.0
+
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+You may contact the author of Snoopy by e-mail at:
+monte@ispi.net
+
+Or, write to:
+Monte Ohrt
+CTO, ispi
+237 S. 70th suite 220
+Lincoln, NE 68510
+
+The latest version of Snoopy can be obtained from:
+http://snoopy.sourceforge.com
+
+*************************************************/
+
+class Snoopy
+{
+ /**** Public variables ****/
+
+ /* user definable vars */
+
+ var $host = "www.php.net"; // host name we are connecting to
+ var $port = 80; // port we are connecting to
+ var $proxy_host = ""; // proxy host to use
+ var $proxy_port = ""; // proxy port to use
+ var $agent = "Snoopy v1.0"; // agent we masquerade as
+ var $referer = ""; // referer info to pass
+ var $cookies = array(); // array of cookies to pass
+ // $cookies["username"]="joe";
+ var $rawheaders = array(); // array of raw headers to send
+ // $rawheaders["Content-type"]="text/html";
+
+ var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
+ var $lastredirectaddr = ""; // contains address of last redirected address
+ var $offsiteok = true; // allows redirection off-site
+ var $maxframes = 0; // frame content depth maximum. 0 = disallow
+ var $expandlinks = true; // expand links to fully qualified URLs.
+ // this only applies to fetchlinks()
+ // or submitlinks()
+ var $passcookies = true; // pass set cookies back through redirects
+ // NOTE: this currently does not respect
+ // dates, domains or paths.
+
+ var $user = ""; // user for http authentication
+ var $pass = ""; // password for http authentication
+
+ // http accept types
+ var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+
+ var $results = ""; // where the content is put
+
+ var $error = ""; // error messages sent here
+ var $response_code = ""; // response code returned from server
+ var $headers = array(); // headers returned from server sent here
+ var $maxlength = 500000; // max return data length (body)
+ var $read_timeout = 0; // timeout on read operations, in seconds
+ // supported only since PHP 4 Beta 4
+ // set to 0 to disallow timeouts
+ var $timed_out = false; // if a read operation timed out
+ var $status = 0; // http request status
+
+ var $curl_path = "/usr/local/bin/curl";
+ // Snoopy will use cURL for fetching
+ // SSL content if a full system path to
+ // the cURL binary is supplied here.
+ // set to false if you do not have
+ // cURL installed. See http://curl.haxx.se
+ // for details on installing cURL.
+ // Snoopy does *not* use the cURL
+ // library functions built into php,
+ // as these functions are not stable
+ // as of this Snoopy release.
+
+ /**** Private variables ****/
+
+ var $_maxlinelen = 4096; // max line length (headers)
+
+ var $_httpmethod = "GET"; // default http request method
+ var $_httpversion = "HTTP/1.0"; // default http request version
+ var $_submit_method = "POST"; // default submit method
+ var $_submit_type = "application/x-www-form-urlencoded"; // default submit type
+ var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
+ var $_redirectaddr = false; // will be set if page fetched is a redirect
+ var $_redirectdepth = 0; // increments on an http redirect
+ var $_frameurls = array(); // frame src urls
+ var $_framedepth = 0; // increments on frame depth
+
+ var $_isproxy = false; // set if using a proxy server
+ var $_fp_timeout = 30; // timeout for socket connection
+
+/*======================================================================*\
+ Function: fetch
+ Purpose: fetch the contents of a web page
+ (and possibly other protocols in the
+ future like ftp, nntp, gopher, etc.)
+ Input: $URI the location of the page to fetch
+ Output: $this->results the output text from the fetch
+\*======================================================================*/
+
+ function fetch($URI)
+ {
+
+ //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
+ $URI_PARTS = parse_url($URI);
+ if (!empty($URI_PARTS["user"]))
+ $this->user = $URI_PARTS["user"];
+ if (!empty($URI_PARTS["pass"]))
+ $this->pass = $URI_PARTS["pass"];
+
+ switch($URI_PARTS["scheme"])
+ {
+ case "http":
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_connect($fp))
+ {
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
+ }
+
+ $this->_disconnect($fp);
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ break;
+ case "https":
+ if(!$this->curl_path || (!is_executable($this->curl_path)))
+ return false;
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httpsrequest($URI,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httpsrequest($path, $URI, $this->_httpmethod);
+ }
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ return true;
+ break;
+ default:
+ // not a valid protocol
+ $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+ return false;
+ break;
+ }
+ return true;
+ }
+
+/*======================================================================*\
+ Function: submit
+ Purpose: submit an http form
+ Input: $URI the location to post the data
+ $formvars the formvars to use.
+ format: $formvars["var"] = "val";
+ Output: $this->results the text output from the post
+\*======================================================================*/
+
+ function submit($URI, $formvars="", $formfiles="")
+ {
+ unset($postdata);
+
+ $postdata = $this->_prepare_post_body($formvars, $formfiles);
+
+ $URI_PARTS = parse_url($URI);
+ if (!empty($URI_PARTS["user"]))
+ $this->user = $URI_PARTS["user"];
+ if (!empty($URI_PARTS["pass"]))
+ $this->pass = $URI_PARTS["pass"];
+
+ switch($URI_PARTS["scheme"])
+ {
+ case "http":
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_connect($fp))
+ {
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+
+ $this->_disconnect($fp);
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+ $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->submit($this->_redirectaddr,$formvars, $formfiles);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ break;
+ case "https":
+ if(!$this->curl_path || (!is_executable($this->curl_path)))
+ return false;
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+ $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->submit($this->_redirectaddr,$formvars, $formfiles);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ return true;
+ break;
+
+ default:
+ // not a valid protocol
+ $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+ return false;
+ break;
+ }
+ return true;
+ }
+
+/*======================================================================*\
+ Function: fetchlinks
+ Purpose: fetch the links from a web page
+ Input: $URI where you are fetching from
+ Output: $this->results an array of the URLs
+\*======================================================================*/
+
+ function fetchlinks($URI)
+ {
+ if ($this->fetch($URI))
+ {
+
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_striplinks($this->results[$x]);
+ }
+ else
+ $this->results = $this->_striplinks($this->results);
+
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results, $URI);
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: fetchform
+ Purpose: fetch the form elements from a web page
+ Input: $URI where you are fetching from
+ Output: $this->results the resulting html form
+\*======================================================================*/
+
+ function fetchform($URI)
+ {
+
+ if ($this->fetch($URI))
+ {
+
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_stripform($this->results[$x]);
+ }
+ else
+ $this->results = $this->_stripform($this->results);
+
+ return true;
+ }
+ else
+ return false;
+ }
+
+
+/*======================================================================*\
+ Function: fetchtext
+ Purpose: fetch the text from a web page, stripping the links
+ Input: $URI where you are fetching from
+ Output: $this->results the text from the web page
+\*======================================================================*/
+
+ function fetchtext($URI)
+ {
+ if($this->fetch($URI))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_striptext($this->results[$x]);
+ }
+ else
+ $this->results = $this->_striptext($this->results);
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: submitlinks
+ Purpose: grab links from a form submission
+ Input: $URI where you are submitting from
+ Output: $this->results an array of the links from the post
+\*======================================================================*/
+
+ function submitlinks($URI, $formvars="", $formfiles="")
+ {
+ if($this->submit($URI,$formvars, $formfiles))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ {
+ $this->results[$x] = $this->_striplinks($this->results[$x]);
+ if($this->expandlinks)
+ $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+ }
+ }
+ else
+ {
+ $this->results = $this->_striplinks($this->results);
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results,$URI);
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: submittext
+ Purpose: grab text from a form submission
+ Input: $URI where you are submitting from
+ Output: $this->results the text from the web page
+\*======================================================================*/
+
+ function submittext($URI, $formvars = "", $formfiles = "")
+ {
+ if($this->submit($URI,$formvars, $formfiles))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ {
+ $this->results[$x] = $this->_striptext($this->results[$x]);
+ if($this->expandlinks)
+ $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+ }
+ }
+ else
+ {
+ $this->results = $this->_striptext($this->results);
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results,$URI);
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+
+
+
+/*======================================================================*\
+ Function: set_submit_multipart
+ Purpose: Set the form submission content type to
+ multipart/form-data
+\*======================================================================*/
+ function set_submit_multipart()
+ {
+ $this->_submit_type = "multipart/form-data";
+ }
+
+
+/*======================================================================*\
+ Function: set_submit_normal
+ Purpose: Set the form submission content type to
+ application/x-www-form-urlencoded
+\*======================================================================*/
+ function set_submit_normal()
+ {
+ $this->_submit_type = "application/x-www-form-urlencoded";
+ }
+
+
+
+
+/*======================================================================*\
+ Private functions
+\*======================================================================*/
+
+
+/*======================================================================*\
+ Function: _striplinks
+ Purpose: strip the hyperlinks from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _striplinks($document)
+ {
+ preg_match_all("'<\s*a\s+.*href\s*=\s* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\\1 | ([^\s\>]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+ 'isx",$document,$links);
+
+
+ // catenate the non-empty matches from the conditional subpattern
+
+ while(list($key,$val) = each($links[2]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ while(list($key,$val) = each($links[3]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ // return the links
+ return $match;
+ }
+
+/*======================================================================*\
+ Function: _stripform
+ Purpose: strip the form elements from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _stripform($document)
+ {
+ preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
+
+ // catenate the matches
+ $match = implode("\r\n",$elements[0]);
+
+ // return the links
+ return $match;
+ }
+
+
+
+/*======================================================================*\
+ Function: _striptext
+ Purpose: strip the text from an html document
+ Input: $document document to strip.
+ Output: $text the resulting text
+\*======================================================================*/
+
+ function _striptext($document)
+ {
+
+ // I didn't use preg eval (//e) since that is only available in PHP 4.0.
+ // so, list your entities one by one here. I included some of the
+ // more common ones.
+
+ $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
+ "'<[\/\!]*?[^<>]*?>'si", // strip out html tags
+ "'([\r\n])[\s]+'", // strip out white space
+ "'&(quote|#34);'i", // replace html entities
+ "'&(amp|#38);'i",
+ "'&(lt|#60);'i",
+ "'&(gt|#62);'i",
+ "'&(nbsp|#160);'i",
+ "'&(iexcl|#161);'i",
+ "'&(cent|#162);'i",
+ "'&(pound|#163);'i",
+ "'&(copy|#169);'i"
+ );
+ $replace = array( "",
+ "",
+ "\\1",
+ "\"",
+ "&",
+ "<",
+ ">",
+ " ",
+ chr(161),
+ chr(162),
+ chr(163),
+ chr(169));
+
+ $text = preg_replace($search,$replace,$document);
+
+ return $text;
+ }
+
+/*======================================================================*\
+ Function: _expandlinks
+ Purpose: expand each link into a fully qualified URL
+ Input: $links the links to qualify
+ $URI the full URI to get the base from
+ Output: $expandedLinks the expanded links
+\*======================================================================*/
+
+ function _expandlinks($links,$URI)
+ {
+
+ preg_match("/^[^\?]+/",$URI,$match);
+
+ $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
+
+ $search = array( "|^http://".preg_quote($this->host)."|i",
+ "|^(?!http://)(\/)?(?!mailto:)|i",
+ "|/\./|",
+ "|/[^\/]+/\.\./|"
+ );
+
+ $replace = array( "",
+ $match."/",
+ "/",
+ "/"
+ );
+
+ $expandedLinks = preg_replace($search,$replace,$links);
+
+ return $expandedLinks;
+ }
+
+/*======================================================================*\
+ Function: _httprequest
+ Purpose: go get the http data from the server
+ Input: $url the url to fetch
+ $fp the current open file pointer
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
+ {
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
+ if(!empty($this->agent))
+ $headers .= "User-Agent: ".$this->agent."\r\n";
+ if(!empty($this->host) && !isset($this->rawheaders['Host']))
+ $headers .= "Host: ".$this->host."\r\n";
+ if(!empty($this->accept))
+ $headers .= "Accept: ".$this->accept."\r\n";
+ if(!empty($this->referer))
+ $headers .= "Referer: ".$this->referer."\r\n";
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_headers .= 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers .= substr($cookie_headers,0,-2) . "\r\n";
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers .= $headerKey.": ".$headerVal."\r\n";
+ }
+ if(!empty($content_type)) {
+ $headers .= "Content-type: $content_type";
+ if ($content_type == "multipart/form-data")
+ $headers .= "; boundary=".$this->_mime_boundary;
+ $headers .= "\r\n";
+ }
+ if(!empty($body))
+ $headers .= "Content-length: ".strlen($body)."\r\n";
+ if(!empty($this->user) || !empty($this->pass))
+ $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
+
+ $headers .= "\r\n";
+
+ // set the read timeout if needed
+ if ($this->read_timeout > 0)
+ socket_set_timeout($fp, $this->read_timeout);
+ $this->timed_out = false;
+
+ fwrite($fp,$headers.$body,strlen($headers.$body));
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ while($currentHeader = fgets($fp,$this->_maxlinelen))
+ {
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ if($currentHeader == "\r\n")
+ break;
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location:|URI:)/i",$currentHeader))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$currentHeader))
+ {
+ if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
+ {
+ $this->status= $status[1];
+ }
+ $this->response_code = $currentHeader;
+ }
+
+ $this->headers[] = $currentHeader;
+ }
+
+ $results = fread($fp, $this->maxlength);
+
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: _httpsrequest
+ Purpose: go get the https data from the server using curl
+ Input: $url the url to fetch
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
+ {
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $headers = array();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ // GET ... header not needed for curl
+ //$headers[] = $http_method." ".$url." ".$this->_httpversion;
+ if(!empty($this->agent))
+ $headers[] = "User-Agent: ".$this->agent;
+ if(!empty($this->host))
+ $headers[] = "Host: ".$this->host;
+ if(!empty($this->accept))
+ $headers[] = "Accept: ".$this->accept;
+ if(!empty($this->referer))
+ $headers[] = "Referer: ".$this->referer;
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_str = 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers[] = substr($cookie_str,0,-2);
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers[] = $headerKey.": ".$headerVal;
+ }
+ if(!empty($content_type)) {
+ if ($content_type == "multipart/form-data")
+ $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
+ else
+ $headers[] = "Content-type: $content_type";
+ }
+ if(!empty($body))
+ $headers[] = "Content-length: ".strlen($body);
+ if(!empty($this->user) || !empty($this->pass))
+ $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
+
+ for($curr_header = 0; $curr_header < count($headers); $curr_header++)
+ $cmdline_params .= " -H \"".$headers[$curr_header]."\"";
+
+ if(!empty($body))
+ $cmdline_params .= " -d \"$body\"";
+
+ if($this->read_timeout > 0)
+ $cmdline_params .= " -m ".$this->read_timeout;
+
+ $headerfile = uniqid(time());
+
+ exec($this->curl_path." -D \"/tmp/$headerfile\"".$cmdline_params." ".$URI,$results,$return);
+
+ if($return)
+ {
+ $this->error = "Error: cURL could not retrieve the document, error $return.";
+ return false;
+ }
+
+
+ $results = implode("\r\n",$results);
+
+ $result_headers = file("/tmp/$headerfile");
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
+ {
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
+ $this->response_code = $result_headers[$currentHeader];
+
+ $this->headers[] = $result_headers[$currentHeader];
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ unlink("/tmp/$headerfile");
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: setcookies()
+ Purpose: set cookies for a redirection
+\*======================================================================*/
+
+ function setcookies()
+ {
+ for($x=0; $x<count($this->headers); $x++)
+ {
+ if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match))
+ $this->cookies[$match[1]] = $match[2];
+ }
+ }
+
+
+/*======================================================================*\
+ Function: _check_timeout
+ Purpose: checks whether timeout has occurred
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _check_timeout($fp)
+ {
+ if ($this->read_timeout > 0) {
+ $fp_status = socket_get_status($fp);
+ if ($fp_status["timed_out"]) {
+ $this->timed_out = true;
+ return true;
+ }
+ }
+ return false;
+ }
+
+/*======================================================================*\
+ Function: _connect
+ Purpose: make a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _connect(&$fp)
+ {
+ if(!empty($this->proxy_host) && !empty($this->proxy_port))
+ {
+ $this->_isproxy = true;
+ $host = $this->proxy_host;
+ $port = $this->proxy_port;
+ }
+ else
+ {
+ $host = $this->host;
+ $port = $this->port;
+ }
+
+ $this->status = 0;
+
+ if($fp = fsockopen(
+ $host,
+ $port,
+ $errno,
+ $errstr,
+ $this->_fp_timeout
+ ))
+ {
+ // socket connection succeeded
+
+ return true;
+ }
+ else
+ {
+ // socket connection failed
+ $this->status = $errno;
+ switch($errno)
+ {
+ case -3:
+ $this->error="socket creation failed (-3)";
+ case -4:
+ $this->error="dns lookup failure (-4)";
+ case -5:
+ $this->error="connection refused or timed out (-5)";
+ default:
+ $this->error="connection failed (".$errno.")";
+ }
+ return false;
+ }
+ }
+/*======================================================================*\
+ Function: _disconnect
+ Purpose: disconnect a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _disconnect($fp)
+ {
+ return(fclose($fp));
+ }
+
+
+/*======================================================================*\
+ Function: _prepare_post_body
+ Purpose: Prepare post body according to encoding type
+ Input: $formvars - form variables
+ $formfiles - form upload files
+ Output: post body
+\*======================================================================*/
+
+ function _prepare_post_body($formvars, $formfiles)
+ {
+ settype($formvars, "array");
+ settype($formfiles, "array");
+
+ if (count($formvars) == 0 && count($formfiles) == 0)
+ return;
+
+ switch ($this->_submit_type) {
+ case "application/x-www-form-urlencoded":
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
+ }
+ } else
+ $postdata .= urlencode($key)."=".urlencode($val)."&";
+ }
+ break;
+
+ case "multipart/form-data":
+ $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
+
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
+ $postdata .= "$cur_val\r\n";
+ }
+ } else {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
+ $postdata .= "$val\r\n";
+ }
+ }
+
+ reset($formfiles);
+ while (list($field_name, $file_names) = each($formfiles)) {
+ settype($file_names, "array");
+ while (list(, $file_name) = each($file_names)) {
+ if (!is_readable($file_name)) continue;
+
+ $fp = fopen($file_name, "r");
+ $file_content = fread($fp, filesize($file_name));
+ fclose($fp);
+ $base_name = basename($file_name);
+
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
+ $postdata .= "$file_content\r\n";
+ }
+ }
+ $postdata .= "--".$this->_mime_boundary."--\r\n";
+ break;
+ }
+
+ return $postdata;
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_cache.inc, a simple, rolling(no GC), cache
+ * for RSS objects, keyed on URL.
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.3
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Mapgie mailing list:
+ * http://lists.sourceforge.net/lists/listinfo/magpierss-general
+ *
+ */
+
+class RSSCache {
+ var $BASE_CACHE = './cache'; // where the cache files are stored
+ var $MAX_AGE = 3600; // when are files stale, default one hour
+ var $ERROR = ""; // accumulate error messages
+
+ function RSSCache ($base, $age) {
+ if ( $base ) {
+ $this->BASE_CACHE = $base;
+ }
+ if ( $age ) {
+ $this->MAX_AGE = $age;
+ }
+
+ // attempt to make the cache directory
+ if ( ! file_exists( $this->BASE_CACHE ) ) {
+ $status = @mkdir( $this->BASE_CACHE, 0755 );
+
+ // if make failed
+ if ( ! $status ) {
+ $this->error(
+ "Cache couldn't make dir '" . $this->BASE_CACHE . "'."
+ );
+ }
+ }
+ }
+
+/*=======================================================================*\
+ Function: set
+ Purpose: add an item to the cache, keyed on url
+ Input: url from wich the rss file was fetched
+ Output: true on sucess
+\*=======================================================================*/
+ function set ($url, $rss) {
+ $this->ERROR = "";
+ $cache_file = $this->file_name( $url );
+ $fp = @fopen( $cache_file, 'w' );
+
+ if ( ! $fp ) {
+ $this->error(
+ "Cache unable to open file for writing: $cache_file"
+ );
+ return 0;
+ }
+
+
+ $data = $this->serialize( $rss );
+ fwrite( $fp, $data );
+ fclose( $fp );
+
+ return $cache_file;
+ }
+
+/*=======================================================================*\
+ Function: get
+ Purpose: fetch an item from the cache
+ Input: url from wich the rss file was fetched
+ Output: cached object on HIT, false on MISS
+\*=======================================================================*/
+ function get ($url) {
+ $this->ERROR = "";
+ $cache_file = $this->file_name( $url );
+
+ if ( ! file_exists( $cache_file ) ) {
+ $this->error(
+ "Cache doesn't contain: $url (cache file: $cache_file)"
+ );
+ return 0;
+ }
+
+ $fp = @fopen($cache_file, 'r');
+ if ( ! $fp ) {
+ $this->error(
+ "Failed to open cache file for reading: $cache_file"
+ );
+ return 0;
+ }
+
+ $data = fread( $fp, filesize($cache_file) );
+ $rss = $this->unserialize( $data );
+
+ return $rss;
+ }
+
+/*=======================================================================*\
+ Function: check_cache
+ Purpose: check a url for membership in the cache
+ and whether the object is older then MAX_AGE (ie. STALE)
+ Input: url from wich the rss file was fetched
+ Output: cached object on HIT, false on MISS
+\*=======================================================================*/
+ function check_cache ( $url ) {
+ $this->ERROR = "";
+ $filename = $this->file_name( $url );
+
+ if ( file_exists( $filename ) ) {
+ // find how long ago the file was added to the cache
+ // and whether that is longer then MAX_AGE
+ $mtime = filemtime( $filename );
+ $age = time() - $mtime;
+ if ( $this->MAX_AGE > $age ) {
+ // object exists and is current
+ return 'HIT';
+ }
+ else {
+ // object exists but is old
+ return 'STALE';
+ }
+ }
+ else {
+ // object does not exist
+ return 'MISS';
+ }
+ }
+
+/*=======================================================================*\
+ Function: serialize
+\*=======================================================================*/
+ function serialize ( $rss ) {
+ return serialize( $rss );
+ }
+
+/*=======================================================================*\
+ Function: unserialize
+\*=======================================================================*/
+ function unserialize ( $data ) {
+ return unserialize( $data );
+ }
+
+/*=======================================================================*\
+ Function: file_name
+ Purpose: map url to location in cache
+ Input: url from wich the rss file was fetched
+ Output: a file name
+\*=======================================================================*/
+ function file_name ($url) {
+ $filename = md5( $url );
+ return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );
+ }
+
+/*=======================================================================*\
+ Function: error
+ Purpose: register error
+\*=======================================================================*/
+ function error ($errormsg, $lvl=E_USER_WARNING) {
+ // append PHP's error message if track_errors enabled
+ if ( $php_errormsg ) {
+ $errormsg .= " ($php_errormsg)";
+ }
+ $this->ERROR = $errormsg;
+ if ( MAGPIE_DEBUG ) {
+ trigger_error( $errormsg, $lvl);
+ }
+ else {
+ error_log( $errormsg, 0);
+ }
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_fetch.inc, a simple functional interface
+ to fetching and parsing RSS files, via the
+ function fetch_rss()
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.3
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Mapgie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ *
+ */
+
+// Setup MAGPIE_DIR for use on hosts that don't include
+// the current path in include_path.
+// with thanks to rajiv and smarty
+define('DIR_SEP', DIRECTORY_SEPARATOR);
+
+if (!defined('MAGPIE_DIR')) {
+ define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP);
+}
+
+require_once( MAGPIE_DIR . 'rss_parse.inc' );
+require_once( MAGPIE_DIR . 'rss_cache.inc' );
+
+// for including 3rd party libraries
+define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP);
+require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc');
+
+
+/*
+ * CONSTANTS - redefine these in your script to change the
+ * behaviour of fetch_rss() currently, most options effect the cache
+ *
+ * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects?
+ * For me a built in cache was essential to creating a "PHP-like"
+ * feel to Magpie, see rss_cache.inc for rationale
+ *
+ *
+ * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects?
+ * This should be a location that the webserver can write to. If this
+ * directory does not already exist Mapie will try to be smart and create
+ * it. This will often fail for permissions reasons.
+ *
+ *
+ * MAPGIE_CACHE_AGE - How long to store cached RSS objects? In seconds.
+ *
+ *
+ * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error
+ * instead of returning stale object?
+ *
+ * MAGPIE_DEBUG - Display debugging notices?
+ *
+*/
+
+
+/*=======================================================================*\
+ Function: fetch_rss:
+ Purpose: return RSS object for the give url
+ maintain the cache
+ Input: url of RSS file
+ Output: parsed RSS object (see rss_parse.inc)
+
+ NOTES ON CACHEING:
+ If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache.
+
+ NOTES ON RETRIEVING REMOTE FILES:
+ If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will
+ return a cached object, and touch the cache object upon recieving a
+ 304.
+
+ NOTES ON FAILED REQUESTS:
+ If there is an HTTP error while fetching an RSS object, the cached
+ version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
+\*=======================================================================*/
+
+function fetch_rss ($url,$hash=false) {
+ // initialize constants
+ init();
+
+ // if cache is disabled
+ if ( !MAGPIE_CACHE_ON ) {
+ // fetch file, and parse it
+ $resp = _fetch_remote_file( $url );
+ if ( is_success( $resp->status ) ) {
+ return _response_to_rss( $resp, $hash );
+ }
+ else {
+ trigger_error("MagpieRSS: failed to fetch $url. Cache is off");
+ return false;
+ }
+ }
+ // else cache is ON
+ else {
+ // Flow
+ // 1. check cache
+ // 2. if there is a hit, make sure its fresh
+ // 3. if cached obj fails freshness check, fetch remote
+ // 4. if remote fails, return stale object, or error
+
+ $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE );
+
+ if (MAGPIE_DEBUG and $cache->ERROR) {
+ trigger_error($cache->ERROR, E_USER_WARNING);
+ }
+
+
+ $cache_status; // response of check_cache
+ $request_headers = array(); // HTTP headers to send with fetch
+ $rss; // parsed RSS object
+ $errormsg; // errors, if any
+
+ if (!$cache->ERROR) {
+ // return cache HIT, MISS, or STALE
+ $cache_status = $cache->check_cache( $url );
+ }
+
+ // if object cached, and cache is fresh, return cached obj
+ if ( $cache_status == 'HIT' ) {
+ $rss = $cache->get( $url );
+ if ( $rss ) {
+ $rss->from_cache = 1;
+ if ( MAGPIE_DEBUG > 1) {
+ trigger_error("Cache HIT", E_USER_NOTICE);
+ }
+ return $rss;
+ }
+ }
+
+ // else attempt a conditional get
+
+ // setup headers
+ if ( $cache_status == 'STALE' ) {
+ $rss = $cache->get( $url );
+ if ( $rss->etag and $rss->last_modified ) {
+ $request_headers['If-None-Match'] = $rss->etag;
+ $request_headers['If-Last-Modified'] = $rss->last_modified;
+ }
+ }
+
+ $resp = _fetch_remote_file( $url, $request_headers );
+
+ if ($resp) {
+ if ($resp->status == '304' ) {
+ // we have the most current copy
+ if ( MAGPIE_DEBUG > 1) {
+ $msg = "Got 304 for $url";
+ trigger_error($msg, E_USER_NOTICE);
+ }
+ // TODO: not sure if I should re-set the cache here or not
+ return $rss;
+ }
+ elseif ( is_success( $resp->status ) ) {
+ $rss = _response_to_rss( $resp );
+ if ( $rss ) {
+ if (MAGPIE_DEBUG > 1) {
+ trigger_error("Fetch successful", E_USER_NOTICE);
+ }
+ // add object to cache
+ $cache->set( $url, $rss );
+ return $rss;
+ }
+ }
+ else {
+ $errormsg = "Failed to fetch $url. ";
+ if ( $resp->error ) {
+ $errormsg .= "Error: " . $resp->error;
+ }
+ else {
+ $errormsg .= "Response: " . $resp->$response_code;
+ }
+ }
+ }
+ else {
+ $errormsg = "Unable to retrieve RSS file for unknown reasons.";
+ }
+
+ // else fetch failed
+
+ // attempt to return cached object
+ if ($rss) {
+ if ( MAGPIE_DEBUG ) {
+ trigger_error("Returning STALE object for $url", E_USER_NOTICE);
+ }
+ return $rss;
+ }
+
+ // else we totally failed
+
+ trigger_error( "MagpieRSS: " . $errormsg );
+
+ return false;
+
+ } // end if ( !MAGPIE_CACHE_ON ) {
+} // end fetch_rss()
+
+/*=======================================================================*\
+ Function: _fetch_remote_files
+ Purpose: retrieve an arbitrary remote file
+ Input: url of the remote file
+ headers to send along with the request (optional)
+ Output: an HTTP response object (see Snoopy.class.inc)
+\*=======================================================================*/
+function _fetch_remote_file ($url, $headers) {
+ // Snoopy is an HTTP client in PHP
+ $client = new Snoopy();
+ $client->agent = MAGPIE_USER_AGENT;
+ $client->read_timeout = MAGPIE_FETCH_TIME_OUT;
+
+ if (!empty($headers) ) {
+ $client->rawheaders = $headers;
+ }
+
+ if ( $client->fetch($url) ) {
+ return $client;
+ }
+ else {
+ return false;
+ }
+}
+
+/*=======================================================================*\
+ Function: _response_to_rss
+ Purpose: parse an HTTP response object into an RSS object
+ Input: an HTTP response object (see Snoopy)
+ Output: parsed RSS object (see rss_parse)
+\*=======================================================================*/
+function _response_to_rss ($resp,$hash=false) {
+
+ if (md5($resp->results)==$hash) {
+ echo "zadne nove data";
+ return false;
+ }
+
+ $rss = new MagpieRSS( $resp->results );
+ // if RSS parsed successfully
+ if ( $rss and !$rss->ERROR) {
+
+ // find Etag, and Last-Modified
+ foreach($resp->headers as $h) {
+ list($field, $val) = explode(": ", $h, 2);
+ if ( $field == 'ETag' ) {
+ $rss->etag = $val;
+ }
+
+ if ( $field == 'Last-Modified' ) {
+ $rss->last_modified = $val;
+ }
+ }
+
+ return $rss;
+ } // else construct error message
+ else {
+ $errormsg = "MagpieRSS: failed to parse $url.";
+
+ if ($rss) {
+ $errormsg .= " " . $rss->ERROR;
+ }
+ trigger_error($errormsg);
+
+ return false;
+ } // end if ($rss and !$rss->error)
+}
+
+/*=======================================================================*\
+ Function: init
+ Purpose: setup constants with default values
+ check for user overrides
+\*=======================================================================*/
+function init () {
+ if ( defined('MAGPIE_INITALIZED') ) {
+ return;
+ }
+ else {
+ define('MAGPIE_INITALIZED', 1);
+ }
+
+ if ( !defined('MAGPIE_CACHE_ON') ) {
+ define('MAGPIE_CACHE_ON', 1);
+ }
+
+ if ( !defined('MAGPIE_CACHE_DIR') ) {
+ define('MAGPIE_CACHE_DIR', './cache');
+ }
+
+ if ( !defined('MAGPIE_CACHE_AGE') ) {
+ define('MAGPIE_CACHE_AGE', 60*60); // one hour
+ }
+
+ if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
+ define('MAGPIE_CACHE_FRESH_ONLY', 0);
+ }
+
+ if ( !defined('MAGPIE_DEBUG') ) {
+ define('MAGPIE_DEBUG', 0);
+ }
+
+ if ( !defined('MAGPIE_USER_AGENT') ) {
+ define('MAGPIE_USER_AGENT', 'MagpieRSS/0.3 (+http://magpierss.sf.net)' );
+ }
+
+ if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
+ define('MAGPIE_FETCH_TIME_OUT', 5); // 2 second timeout
+ }
+}
+
+// NOTE: the following code should really be in Snoopy, or at least
+// somewhere other then rss_fetch!
+
+/*=======================================================================*\
+ HTTP STATUS CODE PREDICATES
+ These functions attempt to classify an HTTP status code
+ based on RFC 2616 and RFC 2518.
+
+ All of them take an HTTP status code as input, and return true or false
+
+ All this code is adapted from LWP's HTTP::Status.
+\*=======================================================================*/
+
+
+/*=======================================================================*\
+ Function: is_info
+ Purpose: return true if Informational status code
+\*=======================================================================*/
+function is_info ($sc) {
+ return $sc >= 100 && $sc < 200;
+}
+
+/*=======================================================================*\
+ Function: is_success
+ Purpose: return true if Successful status code
+\*=======================================================================*/
+function is_success ($sc) {
+ return $sc >= 200 && $sc < 300;
+}
+
+/*=======================================================================*\
+ Function: is_redirect
+ Purpose: return true if Redirection status code
+\*=======================================================================*/
+function is_redirect ($sc) {
+ return $sc >= 300 && $sc < 400;
+}
+
+/*=======================================================================*\
+ Function: is_error
+ Purpose: return true if Error status code
+\*=======================================================================*/
+function is_error ($sc) {
+ return $sc >= 400 && $sc < 600;
+}
+
+/*=======================================================================*\
+ Function: is_client_error
+ Purpose: return true if Error status code, and its a client error
+\*=======================================================================*/
+function is_client_error ($sc) {
+ return $sc >= 400 && $sc < 500;
+}
+
+/*=======================================================================*\
+ Function: is_client_error
+ Purpose: return true if Error status code, and its a server error
+\*=======================================================================*/
+function is_server_error ($sc) {
+ return $sc >= 500 && $sc < 600;
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_parse.inc includes code for parsing
+ * RSS, and returning an RSS object
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.3
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Mapgie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ *
+ */
+
+
+/*
+ * NOTES ON RSS PARSING PHILOSOPHY (moderately important):
+ * MagpieRSS parse all versions of RSS with a few limitation (mod_content, and
+ * mod_taxonomy support is shaky) into a simple object, with 2 fields,
+ * the hash 'channel', and the array 'items'.
+ *
+ * MagpieRSS is a forgiving and inclusive parser. It currently makes no
+ * attempt to enforce the validity on an RSS feed. It will include any
+ * properly formatted tags it finds, allowing to you to mix RSS 0.93, with RSS
+ * 1.0, with tags or your own imagining. This sort of witches brew is a bad
+ * bad idea! But Magpie is less pendantic then I am.
+ *
+ * RSS validators are readily available on the web at:
+ * http://feeds.archive.org/validator/
+ * http://www.ldodds.com/rss_validator/1.0/validator.html
+ *
+ */
+
+/*
+ * EXAMPLE PARSE RESULTS:
+ *
+ * Magpie tries to parse RSS into ease to use PHP datastructures.
+ *
+ * For example, Magpie on encountering RSS 1.0 item entry:
+ *
+ * <item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257">
+ * <title>Weekly Peace Vigil</title>
+ * <link>http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257</link>
+ * <description>Wear a white ribbon</description>
+ * <dc:subject>Peace</dc:subject>
+ * <ev:startdate>2002-06-01T11:00:00</ev:startdate>
+ * <ev:location>Northampton, MA</ev:location>
+ * <ev:enddate>2002-06-01T12:00:00</ev:enddate>
+ * <ev:type>Protest</ev:type>
+ * </item>
+ *
+ * Would transform it into the following associative array, and push it
+ * onto the array $rss-items
+ *
+ * array(
+ * title => 'Weekly Peace Vigil',
+ * link =>
+ * 'http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257',
+ * description => 'Wear a white ribbon',
+ * dc => array (
+ * subject => 'Peace'
+ * ),
+ * ev => array (
+ * startdate => '2002-06-01T11:00:00',
+ * enddate => '2002-06-01T12:00:00',
+ * type => 'Protest',
+ * location => 'Northampton, MA'
+ * )
+ * )
+ *
+ */
+
+class MagpieRSS {
+ /*
+ * Hybrid parser, and object. (probably a bad idea! :)
+ *
+ * Useage Example:
+ *
+ * $some_rss = "<?xml version="1.0"......
+ *
+ * $rss = new MagpieRSS( $some_rss );
+ *
+ * // print rss chanel title
+ * echo $rss->channel['title'];
+ *
+ * // print the title of each item
+ * foreach ($rss->items as $item ) {
+ * echo $item[title];
+ * }
+ *
+ * see rss_fetch.inc for a simpler interface
+ */
+
+ var $parser;
+
+ var $current_item = array(); // item currently being parsed
+ var $items = array(); // collection of parsed items
+ var $channel = array(); // hash of channel fields
+ var $textinput = array();
+ var $image = array();
+
+ var $parent_field = array('RDF');
+ var $current_field = '';
+ var $current_namespace = false;
+
+ var $ERROR = "";
+
+/*======================================================================*\
+ Function: MagpieRSS
+ Purpose: Constructor, sets up XML parser,parses source,
+ and populates object..
+ Input: String containing the RSS to be parsed
+\*======================================================================*/
+ function MagpieRSS ($source) {
+ $this->parser = xml_parser_create( );
+
+ # pass in parser, and a reference to this object
+ # setup handlers
+ #
+ xml_set_object( $this->parser, &$this );
+ xml_set_element_handler($this->parser, 'start_element', 'end_element');
+ xml_set_character_data_handler( $this->parser, 'cdata' );
+
+
+ $status = xml_parse( $this->parser, $source );
+
+ if (! $status ) {
+ $errorcode = xml_get_error_code( $this->parser );
+ $errormsg = xml_error_string( $errorcode );
+ $this->error( "RSS parse failure: $errormsg" );
+ }
+
+ xml_parser_free( $this->parser );
+
+ }
+
+ function start_element ($p, $element, &$attrs) {
+ $element = strtolower( $element );
+
+ # check for a namespace, and split if found
+ #
+ $namespace = false;
+ if ( strpos( $element, ':' ) ) {
+ list($namespace, $element) = split( ':', $element, 2);
+ }
+ $this->current_field = $element;
+ if ( $namespace and $namespace != 'rdf' ) {
+ $this->current_namespace = $namespace;
+ }
+
+ if ( $element == 'channel' ) {
+ array_unshift( $this->parent_field, 'channel' );
+ }
+ elseif ( $element == 'items' ) {
+ array_unshift( $this->parent_field, 'items' );
+ }
+ elseif ( $element == 'item' ) {
+ array_unshift( $this->parent_field, 'item' );
+ }
+ elseif ( $element == 'textinput' ) {
+ array_unshift( $this->parent_field, 'textinput' );
+ }
+ elseif ( $element == 'image' ) {
+ array_unshift( $this->parent_field, 'image' );
+ }
+
+ }
+
+ function end_element ($p, $element) {
+ $element = strtolower($element);
+
+ if ( $element == 'item' ) {
+ $this->items[] = $this->current_item;
+ $this->current_item = array();
+ array_shift( $this->parent_field );
+ }
+ elseif ( $element == 'channel' or $element == 'items' or
+ $element == 'textinput' or $element == 'image' ) {
+ array_shift( $this->parent_field );
+ }
+
+ $this->current_field = '';
+ $this->current_namespace = false;
+ }
+
+ function cdata ($p, $text) {
+ # skip item, channel, items first time we see them
+ #
+ if ( $this->parent_field[0] == $this->current_field or
+ ! $this->current_field ) {
+ return;
+ }
+ elseif ( $this->parent_field[0] == 'channel') {
+ if ( $this->current_namespace ) {
+ $this->channel[ $this->current_namespace ][ $this->current_field ] .= $text;
+ }
+ else {
+ $this->channel[ $this->current_field ] .= $text;
+ }
+
+ }
+ elseif ( $this->parent_field[0] == 'item' ) {
+ if ( $this->current_namespace ) {
+ $this->current_item[ $this->current_namespace ][ $this->current_field ] .= $text;
+ }
+ else {
+ $this->current_item[ $this->current_field ] .= $text;
+ }
+ }
+ elseif ( $this->parent_field[0] == 'textinput' ) {
+ if ( $this->current_namespace ) {
+ $this->textinput[ $this->current_namespace ][ $this->current_field ] .= $text;
+ }
+ else {
+ $this->textinput[ $this->current_field ] .= $text;
+ }
+
+ }
+ elseif ( $this->parent_field[0] == 'image' ) {
+ if ( $this->current_namespace ) {
+ $this->image[ $this->current_namespace ][ $this->current_field ] .= $text;
+ }
+ else {
+ $this->image[ $this->current_field ] .= $text;
+ }
+ }
+ }
+
+ function error ($errormsg, $lvl=E_USER_ERROR) {
+ // append PHP's error message if track_errors enabled
+ if ( $php_errormsg ) {
+ $errormsg .= " ($php_errormsg)";
+ }
+ $this->ERROR = $errormsg;
+ if ( MAGPIE_DEBUG ) {
+ trigger_error( $errormsg, $lvl);
+ }
+ else {
+ error_log( $errormsg, 0);
+ }
+ }
+
+
+/*======================================================================*\
+ EVERYTHING BELOW HERE IS FOR DEBUGGING PURPOSES
+\*======================================================================*/
+ function show_list () {
+ echo "<ol>\n";
+ foreach ($this->items as $item) {
+ echo "<li>", $this->show_item( $item );
+ }
+ echo "</ol>";
+ }
+
+ function show_channel () {
+ echo "channel:<br>";
+ echo "<ul>";
+ while ( list($key, $value) = each( $this->channel ) ) {
+ echo "<li> $key: $value";
+ }
+ echo "</ul>";
+ }
+
+ function show_item ($item) {
+ echo "item: $item[title]";
+ echo "<ul>";
+ while ( list($key, $value) = each($item) ) {
+ if ( is_array($value) ) {
+ echo "<br><b>$key</b>";
+ echo "<ul>";
+ while ( list( $ns_key, $ns_value) = each( $value ) ) {
+ echo "<li>$ns_key: $ns_value";
+ }
+ echo "</ul>";
+ }
+ else {
+ echo "<li> $key: $value";
+ }
+ }
+ echo "</ul>";
+ }
+
+/*======================================================================*\
+ END DEBUGGING FUNCTIONS
+\*======================================================================*/
+
+
+
+} # end class RSS
+?>
--- /dev/null
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_utils.inc, utility methods for working with RSS
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.3
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Mapgie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ */
+
+
+/*======================================================================*\
+ Function: parse_w3cdtf
+ Purpose: parse a W3CDTF date into unix epoch
+
+ NOTE: http://www.w3.org/TR/NOTE-datetime
+\*======================================================================*/
+
+function parse_w3cdtf ( $date_str ) {
+
+ # regex to match wc3dtf
+ $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
+
+ if ( preg_match( $pat, $date_str, $match ) ) {
+
+ list( $year, $month, $day, $hours, $minutes, $seconds) =
+ array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
+
+ # calc epoch for current date assuming GMT
+ $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
+
+ $offset = 0;
+ if ( $match[10] == 'Z' ) {
+ # zulu time, aka GMT
+ }
+ else {
+ list( $tz_mod, $tz_hour, $tz_min ) =
+ array( $match[7], $match[8], $match[9]);
+
+ # zero out the variables
+ if ( ! $tz_hour ) { $tz_hour = 0; }
+ if ( ! $tz_min ) { $tz_min = 0; }
+
+ $offset_secs = (($tz_hour*60)+$tz_min)*60;
+
+ # is timezone ahead of GMT? then subtract offset
+ #
+ if ( $tz_mod == '+' ) {
+ $offset_secs = $offset_secs * -1;
+ }
+
+ $offset = $offset_secs;
+ }
+
+ $epoch = $epoch + $offset;
+ return $epoch;
+ }
+ else {
+ return -1;
+ }
+}
+
+?>
--- /dev/null
+<?php
+
+switch ($_POST['event']) {
+ case 'register':
+ $status=eventz::register();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=session");
+ }
+
+ break;
+
+ case 'adduser':
+ $status=eventz::adduser();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=session");
+ }
+
+ break;
+
+ case 'zmen meno':
+ $status=eventz::updateuser();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=session");
+ }
+
+ break;
+
+ case 'delete':
+ $status=eventz::delete();
+ if ($status) {
+ Header("Location:".SCRIPT."?action=session");
+ }
+
+ break;
+
+
+}
+
+class eventz {
+
+function register() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+
+ $set=$kyberia->query("select count(*) as pocet from mindfuck");
+ $set->next();
+ $pocet=$set->getString('pocet');
+ if ($pocet>=193) {
+ global $error;
+ $error="bohuzial uz nieje volne miesto. skus neskor";
+ return false;
+ }
+ $q="insert into mindfuck set user_id='$user_id',meno='$user_name'";
+ $result=mysql_query($q);
+ $kyberia->ubikMail($user_id,"Bol si zaregistrovany na kyberia session. Vdaka, dufam ze si to uzijes ;-)");
+ return true;
+ }
+
+function adduser() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+
+ $meno=$_POST['meno'];
+
+ $set=$kyberia->query("select count(*) as pocet from mindfuck");
+ $set->next();
+ $pocet=$set->getString('pocet');
+ if ($pocet>=193) {
+ global $error;
+ $error="bohuzial uz nieje volne miesto. skus neskor";
+ return false;
+ }
+ $q="insert into mindfuck set user_id='$user_id',meno='$meno'";
+ $result=mysql_query($q);
+ $kyberia->ubikMail($user_id,"Zaregistroval si znameho s menom $meno na kyberia party.");
+ return true;
+ }
+
+function updateuser() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+
+ $meno=$_POST['meno'];
+ $mindfuck_id=$_POST['mindfuck_id'];
+ $q="update mindfuck set meno='$meno' where (user_id='$user_id' and mindfuck_id='$mindfuck_id')";
+ $result=mysql_query($q);
+// $kyberia->ubikMail($user_id,"Zaregistroval si znameho s menom $meno na kyberia party.");
+ return true;
+ }
+
+
+
+function delete() {
+ global $kyberia;
+ global $user_id;
+ global $user_name;
+ $mindfuck_id=$_POST['mindfuck_id'];
+ $q="delete from mindfuck where (user_id='$user_id' and mindfuck_id='$mindfuck_id')";
+ $result=mysql_query($q);
+// $kyberia->ubikMail($user_id,"Zaregistroval si znameho s menom $meno na kyberia party.");
+ return true;
+ }
+
+
+}
+
--- /dev/null
+<?php
+
+class Showz {
+
+function showDel($action,$id) {
+
+}
+
+function showNav($start=true) {
+$action=$_GET['action'];
+global $kyberia;
+global $offset;
+global $limit;
+global $user_id;
+if ($start) echo "<input type='submit' name='event' value='poslat'>";
+if ($start && $action=='forum') echo "<input type='submit' name='event' value='odpovedat'>";
+echo "<input type='submit' value='<' name='event' class='textinput'>
+<input type='submit' value='<<' name='event' class='textinput'>";
+if ($start) echo "<input type='submit' name='event' value='zmazat'>";
+if ($start) echo "<input type='text' value='$limit' name='limit' class='textinput'>";
+echo "<input type='submit' value='>>' name='event' class='textinput'>
+<input type='submit' name='event' value='>' class='textinput'>";
+echo "<input type='hidden' name='offset' value='$offset'>";
+if ($start) echo "<input type='submit' name='event' value='nahlad'>";
+if ($start) echo "<input type='submit' name='event' value='hladat'>";
+
+
+if ($start && $action=='forum') {
+ $set3=$kyberia->query("select user_k from user where id='$user_id'");
+ $set3->next();
+ $kamount="Este mas ".$set3->getString('user_k')." K.";
+ echo "<br><center>";
+ echo "<table><tr><td valign='middle'>".$kamount."</td><td valign='middle'><input type='hidden' name='k_amount' value='1'><input type='submit' value='K!' name='event' class='smalltextinput'> </td>";
+ echo "<td valign='middle'><input value='delbetween' class='delete' type='checkbox' name='delbetween'> zmaz mezi <input type='checkbox' value='NO-HTML' name='nohtml' value='nohtml' class='delete'> NO-HTML</td></tr></table>";
+ echo "</center>";
+}
+
+}
+
+function showDate($date) {
+echo " ".$date;
+}
+
+function showLocation($action,$id,$name) {
+ if ($name) echo " [lokacia::<a class='location' href='".SCRIPT."?action=$action&node_id=$id'>$name</a>] ";
+ else echo " [lokacia:<a class='location' href='".SCRIPT."?action=$action'>$action</a>] ";
+}
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * String.inc 1.00 2001/03/08
+ *
+ * Copyright 2001 Czech On Line a.s. All Rights Reserved.
+ */
+
+class String {
+
+ function String() {
+ }
+
+ function escapeSpecialChars($str, $dir = "to") {
+ $from[] = '\9c';
+ $to[] = 'œ';
+ $from[] = 'ß';
+ $to[] = 'ß';
+ $from[] = 'â';
+ $to[] = 'â';
+ $from[] = 'ê';
+ $to[] = 'ê';
+ $from[] = 'à';
+ $to[] = 'à';
+ $from[] = 'î';
+ $to[] = 'î';
+ $from[] = 'ç';
+ $to[] = 'ç';
+ $from[] = 'ô';
+ $to[] = 'ô';
+ $from[] = 'û';
+ $to[] = 'û';
+
+ if ($dir == "to") {
+ return str_replace($from, $to, $str);
+ } elseif ($dir == "from") {
+ return str_replace($to, $from, $str);
+ }
+ }
+
+ function unhtmlspecialchars($str) {
+ $trans = get_html_translation_table(HTML_SPECIALCHARS);
+ $trans = array_flip($trans);
+ return strtr($str, $trans);
+ }
+
+
+ function cutString($string, $cut_limit, $cut_words = 0) {
+ // returns $string cutted to lenght $cut_limit or limited to $cut_words words
+ // if $cut_words is used, $cut_limit is ignored
+ // returned string is also choped and trimed
+ $str_tmp = trim(chop($string));
+ $StringArray=explode(" ", $str_tmp);
+ if ($cut_words) {
+ if (count($StringArray) < $cut_words) {
+ return $str_tmp;
+ }
+ $string_cut = "";
+ for ($i=0; $i < $cut_words; $i++) {
+ $string_cut .= " " . $StringArray[$i];
+ }
+ return ltrim($string_cut) . "...";
+ } else {
+ if ($cut_limit > strlen($str_tmp)) {
+ return $str_tmp;
+ }
+ $string_cut = "";
+ $threedots_length = 3;
+ $i = 0;
+ while (strlen($string_cut)+strlen($StringArray[$i])+$threedots_length < $cut_limit) {
+ $string_cut .= " " . $StringArray[$i];
+ $i++;
+ }
+ return ltrim($string_cut) . "...";
+ }
+ }
+
+ function escapeSql($str) {
+ # single quote ('), double quote ("), backslash (\) and
+ # NUL (the NULL byte)
+ $str = addslashes($str);
+ return $str;
+ }
+
+ function unescapeSql($str) {
+ $str = stripslashes($str);
+ return $str;
+ }
+
+ function escapeSqlLike($str) {
+ $str = $this->escapeSql($str);
+ $str = str_replace('%','\%', $str);
+ $str = str_replace('_','\_', $str);
+ return $sql;
+ }
+
+ function unescapeSqlLike($str) {
+ $str = $this->unescapeSql($str);
+ $str = str_replace('\%','%',$str);
+ $str = str_replace('\_','_',$str);
+ return $str;
+ }
+
+ /**
+ * Recode a <code>string</code> into plain ascii string
+ * replace <code>czech</code> characters
+ *
+ * @param string
+ * @return a string
+ */
+ function recodeToAscii($string) {
+ return strtr($string, "áèïéìíòóø\9a\9dúùý\9eÁÈÏÉÌÍÒÓØ\8a\8dÚÙÝ\8e¹»¾©«®", "acdeeinorstuuyzACDEEINORSTUUYZstzSTZ");
+ }
+
+ /*
+ * winToIso(string)
+ * isoToWin(string)
+ * converts czech code pages: Windows CP1250 to Latin ISO-8859-2
+ */
+
+ function winToIso($string) {
+ return strtr($string,'\9a\9d\9e\8a\8d\8e','¹»¾©«®');
+ }
+ function isoToWin($string) {
+ return strtr($string,'¹»¾©«®','\9a\9d\9e\8a\8d\8e');
+ }
+
+ /**
+ * Next 4 function are for changing case of a <code>string</code> within its coding.
+ *
+ * @param string
+ * @return a string
+ */
+
+ function strToUpperCZ($str) {
+ $str = strtoupper(strtr($str, 'áèïéìíå¾òóø\9a\9dúùý\9e¹»¾', 'ÁÈÏÉÌÍżÒÓØ\8a\8dÚÙÝ\8e©«®'));
+ return $str;
+ }
+
+ function strToUpperCS($str) {
+ return $this->strToUpperCZ($str);
+ }
+
+ function strToLowerCZ($str) {
+ $str = strtolower(strtr($str, 'ÁÈÏÉÌÍżÒÓØ\8a\8dÚÙÝ\8e©«®', 'áèïéìíå¾òóø\9a\9dúùý\9e¹»¾'));
+ return $str;
+ }
+
+ function strToLowerCS($str) {
+ return $this->strToLowerCZ($str);
+ }
+
+ function dateToSql($value) {
+ return (sprintf("%04d-%02d-%02d", $value["year"], $value["mon"], $value["mday"]));
+ }
+
+ function sqlToDate($value) {
+ $a["year"]=(int)substr($value,0,4);
+ $a["mon"]=(int)substr($value,5,2);
+ $a["mday"]=(int)substr($value,8,2);
+ return ($a);
+ }
+
+ function timeToSql($value) {
+ return (sprintf("%02d:%02d:%02d", $value["hours"], $value["minutes"], $value["seconds"]));
+ }
+
+ function sqlToTime($value) {
+ $a["hours"]=(int)substr($value,0,2);
+ $a["minutes"]=(int)substr($value,3,2);
+ $a["seconds"]=(int)substr($value,6,2);
+ return ($a);
+ }
+
+ function dateTimeToSql($value) {
+ return (sprintf("%04d-%02d-%02d %02d:%02d:%02d", $value["year"], $value["mon"], $value["mday"], $value["hours"], $value["minutes"], $value["seconds"]));
+ }
+
+ function sqlToDateTime($value) {
+ $a["year"]=(int)substr($value,0,4);
+ $a["mon"]=(int)substr($value,5,2);
+ $a["mday"]=(int)substr($value,8,2);
+ $a["hours"]=(int)substr($value,11,2);
+ $a["minutes"]=(int)substr($value,14,2);
+ $a["seconds"]=(int)substr($value,17,2);
+ return ($a);
+ }
+
+ function sqlToUnix($value) {
+ $dt = $this->sqlToDateTime($value);
+ return mktime($dt['hours'], $dt['minutes'], $dt['seconds'],
+ $dt['mon'], $dt['mday'], $dt['year']);
+ }
+
+ function czTime($value, $seconds=TRUE) {
+ if ($seconds) {
+ return sprintf("%d:%02d:%02d", $value['hours'], $value['minutes'],
+ $value['seconds']);
+ }
+ else {
+ return sprintf("%d:%02d", $value['hours'], $value['minutes']);
+ }
+ }
+
+ function czDate($value) {
+ return sprintf("%d.%d.%d", $value['mday'], $value['mon'],
+ $value['year']);
+ }
+
+ function encodeString($string) {
+ for ($i = 0;$i < strlen($string);$i++) {
+ $ch = substr($string,$i,1);
+ $ch = ord($ch)+100;
+ $encoded_string .= dechex($ch);
+ }
+ return $encoded_string;
+ }
+
+ function decodeString($string) {
+ for ($i = 0;$i < strlen($string);$i += 2) {
+ $ch = substr($string,$i,2);
+ $ch = hexdec($ch);
+ $ch -= 100;
+ $decode_string .= chr($ch);
+ }
+ return $decode_string;
+ }
+}
+?>
--- /dev/null
+<?php
+include("database.inc");
+
+class user extends CLASS_DATABASE {
+
+var $Database=DB_DATABASE;
+var $User=DB_USER;
+var $Password=DB_PASS;
+var $Url=DB_HOST;
+
+function login(){
+ global $login;
+ global $password;
+ global $kybersession;
+ $set=$this->query("select id from dennik_user where login='$login' and password='$password'");
+ if ($set->_numRows==0) echo "Zadal si nespravne uzivatelske meno alebo heslo. Rob so sebou nieco!";
+ else {
+ $set->next();
+ $id=$set->getString("id");
+ $this->query("INSERT into sessions set id_user='$id',login='$login',password='$password',last=NOW()");
+ }
+}
+
+
+}
\ No newline at end of file
--- /dev/null
+# MySQL dump 7.1
+#
+# Host: localhost Database: kyberia
+#--------------------------------------------------------
+# Server version 3.23.47
+
+#
+# Table structure for table 'user'
+#
+CREATE TABLE user (
+ id int(3) NOT NULL auto_increment,
+ meno varchar(100),
+ mesto varchar(50),
+ zviera varchar(50),
+ vec varchar(50),
+ email varchar(50),
+ login varchar(20),
+ password varchar(20),
+ PRIMARY KEY (id)
+);
+
+#
+# Dumping data for table 'user'
+#
+
+INSERT INTO user VALUES (1,'Reach','Kosice','zwyerua','Wecz','reach@zion.sk','reach','q');
+INSERT INTO user VALUES (31,'Exebege','BB/BA','Zlatý Beloch','List','miroslavv@centrum.sk','exebege','ha\nrtipa');
+INSERT INTO user VALUES (30,'fiona','++++++++++++++++++++++++++++++++++++++++++++++++++','anti.loop','li\nttle fluffy cloud','','fiona','apple');
+INSERT INTO user VALUES (13,'c00l s3ri4lz','','','','','podvodnik','mazatma');
+INSERT INTO user VALUES (6,'andrej','ghetto/lúky>petralka','trúbe¾ka bitrofabídna','¾ f a iné písmená','andrej@zion.sk','ach','achzion');
+INSERT INTO user VALUES (7,'al-nilrem','damask','velmi krotke','magicke zelene bobule','zdrava.figura.je\n@paranormal.sk','merlin','frank');
+INSERT INTO user VALUES (8,'Tomá','Koice','abuse','pirohy','subtalk@zion.sk','subtalk','t220683');
+INSERT INTO user VALUES (9,'ninique','','','','ondrej@zion.sk','omietka','851asd');
+INSERT INTO user VALUES (10,'janka hoffmann','blava','bobina','chupachups bananove :)','dopedoll@pobox.s\nk','dopedoll','matrix');
+INSERT INTO user VALUES (11,'Na Chrbát','Abu Dabi','skákajúca gazela','5m long penis','gejmer@ramclan.sk\n','gejmer','biker');
+INSERT INTO user VALUES (12,'M|KE_X','Surany','pes ;-)','kniha','michal2@szm.sk','mike_x','8005056928');
+INSERT INTO user VALUES (14,'_euro_','Koice','èrievièka','poste¾','infinit@host.sk','_euro_','oyreww');
+INSERT INTO user VALUES (15,'milan','preov','hedgehog','','charms@stonline.sk','milan','montypython');
+INSERT INTO user VALUES (20,'Niko','New York','lenochod','mobilny telefon','niko@2600.sk','niko','piko');
+INSERT INTO user VALUES (17,'JazzIt','Bratislava','computerova mys','vec','jazzit@europe.com','jazzit','\nrobo1');
+INSERT INTO user VALUES (18,'MaRmAR','Pezinok','tiger','bakelit','marmar@marmar.sk','marmar','11296');
+INSERT INTO user VALUES (19,'mio','ahanovce','meho kodro','remote control','strbskepleso@zion.sk','mio','katka');
+INSERT INTO user VALUES (21,'hurahura','Bratislava','hroch','','hurahura@post.sk','hurahura','1230hura');
+INSERT INTO user VALUES (22,'jan hulvat','','','','','hulvat','ggg');
+INSERT INTO user VALUES (23,'tii','','','','','tii','nttiiko');
+INSERT INTO user VALUES (24,'blur','humenne','lobo','gitara','blur@hippy.cz','blur','nemam');
+INSERT INTO user VALUES (25,'Peter','','','','','clubber','6143');
+INSERT INTO user VALUES (26,'-J-','sabakagrad','holub','tehla','','-J-','podhubie');
+INSERT INTO user VALUES (27,'Mons. Alojz Tkac','Kosice','ovecka','pismo svate','tkac@zion.sk','knaz','t2\n20683');
+INSERT INTO user VALUES (28,'Jaro Herda','Herdovce','svina','maliarska sada painterset','herda-opilec@ne\nda-sa.sk','herda','opilec');
+INSERT INTO user VALUES (29,'Timothy Dalton','London','Babkoherec','Shakespearen company','nemam','Vrhac\n ostepov','summa');
+INSERT INTO user VALUES (32,'Matko','BB','','','vetron@gmx.de','aween','ocean');
+INSERT INTO user VALUES (34,'3riZ','ba::ke','','tien','','gnd','fucked2');
+INSERT INTO user VALUES (38,'hromi','praha','tinda bradac','zlty vrtulnicek s vrtulkami na zotrvacnik','\nhromi@kyberia.sk','hromi','Pacrewk0');
+INSERT INTO user VALUES (39,'lasenic','BA','','','','lasenic','cvecek');
+INSERT INTO user VALUES (40,'evad','prg','','','evad@wanadoo.sk','evad','vzjmmz');
+INSERT INTO user VALUES (41,'fat^boy','banovce nad bebravou','','','fatboy@dnb.sk','fat^boy','trustnoone');
+INSERT INTO user VALUES (42,'Bloody','','','','bloody@europe.com','bloody','monster');
+INSERT INTO user VALUES (43,'yerythoo','','','','yer@jungle.sk','yerythoo','aaaaaa');
+INSERT INTO user VALUES (44,'wicked','praha','','','wicked@host.sk','wicked','Ackey1');
+INSERT INTO user VALUES (45,'pABLo','','','','','pABLo','76430snif');
+INSERT INTO user VALUES (46,'zix','ba','hromi','...jogurty?','zix@stonline.sk','zix','hammer');
+INSERT INTO user VALUES (47,'vlado','devinska nova ves','','','raver@post.sk','vlado','warrafkos');
+INSERT INTO user VALUES (48,'Livia Kellyova','Snina','moj pes Bud s ktorym spavam','zubna kefka Sasi Hirjakovej','kellyoval@atlas.sk','livia','ukraina');
+INSERT INTO user VALUES (49,'dadka','ba','vevericka','vec','dadush@inmail.sk','dadka','heslicko');
+INSERT INTO user VALUES (50,'Beejbi','Praha','tortoise','???','xbals03@vse.cz','Beejbi','Bludisko');
+INSERT INTO user VALUES (51,'Overdrive','Olomouc/Opava','krysa','mozek','overdrive@email.cz','overdrive','5517296');
+INSERT INTO user VALUES (52,'cuco','my.java','zirafa','caj!!!!','cuco@jungle.sk','cuco','muftjv');
+INSERT INTO user VALUES (53,'efe','ba','cica','efe-kty','','efe','radioaktiv');
+INSERT INTO user VALUES (54,'reefer','praha','surikata','kost','reefer@quick.cz','reefer','journaux');
+INSERT INTO user VALUES (55,'hmmu','','','','','ummh','3692');
+INSERT INTO user VALUES (56,'majo','praha','ftak dodo','','mayo_l@kiwwi.sk','svetlonos','akiram');
+INSERT INTO user VALUES (57,'svetlonos','praha','ftak dodo','ceruza','mayo_l@kiwwi.sk','majo','akiram');
+INSERT INTO user VALUES (58,'trip0trip','bs','grandmother','zoshit','trip@kiwwi.sk','trip','audio');
+INSERT INTO user VALUES (59,'alian.phreak','malacky','pes','comp','phreak.4.666@seznam.cz','alian.phreak','system');
+INSERT INTO user VALUES (60,'shimon','neurcite','supinate','latentna','shimoon@post.sk','shimoon','frank');
+
--- /dev/null
+<?
+/*
+ * XML Array class - parses an XML file and inserts the parsed data into a
+ * multidimensional array.
+ *
+ * Version 1.2 - 2001-03-02 - Chris Bolt - chris at bolt dot cx
+ *
+ * Simple Usage: $xmlfile = new xmlarray();
+ * $arr = $xmlfile->parsefile("somefile.xml");
+ *
+ * More detailed documentation can be found at
+ * http://www.bolt.cx/apps/xmlarray/xmlarray.html
+ */
+
+// for html decoding
+include_once("string.inc");
+
+class xmlarray {
+
+ var $parser;
+ var $data = array(), $indexes = array();
+ var $indexidx = -1;
+ var $position;
+ var $idname;
+ var $combine, $combined = false;
+ var $xmlerrorcode, $xmlerrorline;
+ var $useincpath, $rootarray;
+ var $newelement;
+
+ function startElement($parser, $name, $attribs) {
+ $this->newelement = true;
+ $this->indexidx++;
+ //($this->indexes[$this->indexidx]["name"] != $name && ! $this->indexes[$this->indexidx]["name"]) ? $this->indexes[$this->indexidx] = array("count" => 0, "name" => $name) : $this->indexes[$this->indexidx]["count"]++;
+ if (empty($this->indexes[$this->indexidx]['name']) && isset($name) ) {
+ $this->indexes[$this->indexidx] = array("count" => 0, "name" => $name);
+ } else {
+ $this->indexes[$this->indexidx]["count"]++;
+ }
+ if (empty($this->position) ) {
+ $this->position="";
+ }
+ $this->position .= "[\"$name\"][" . (isset($this->indexes[$this->indexidx]["count"]) ? $this->indexes[$this->indexidx]["count"] : 0 ) . "]";
+
+ if (sizeof($attribs)) {
+ $atts = array();
+ while (list($k, $v) = each($attribs))
+ $atts[$k] = $v;
+ eval("\$this->data$this->position = \$atts;");
+ }
+ }
+
+ function endElement($parser, $name) {
+ unset($this->indexes[$this->indexidx + 1]);
+ $this->indexidx--;
+
+ // for empty elements; too much sofisticated:)
+ $pos = "\$this->data{$this->position}";
+ $value = @eval("return $pos;");
+ if (empty($value) ) {
+ eval("$pos = '';");
+ }
+
+ for ($i = 0; $i < 2; $i++)
+ $this->position = substr($this->position, 0, strrpos($this->position, "["));
+ }
+
+ function characterData($parser, $data) {
+ // replace parse_nl to
+ $data = str_replace("#parse_nl#"," ",$data);
+ // unhtml
+ $data = String::unhtmlspecialchars($data);
+
+ // position for eval
+ $pos = "\$this->data$this->position";
+
+ // only non blank element will be parsed
+ if (trim($data)) {
+ $code = "if (count($pos) < 1)
+ $pos = \$data;
+elseif (\$this->newelement == false)
+ $pos .= \$data;
+elseif (count($pos) == 1) {
+ \$tmp = array($pos, \$data);
+ $pos = \$tmp;
+} else
+ $pos" . "[] = \$data;";
+ @eval($code);
+ }
+ $this->newelement = false;
+ }
+
+ function walkarray(&$array) {
+ if (!is_array($array)) return $array;
+ reset($array);
+ while (list($key, $value) = each($array)) {
+ if (is_array($array[$key])) {
+ if (count($array[$key]) == 1)
+ $array[$key] = $array[$key][key($array[$key])];
+ if (is_array($array[$key])) {
+ $array[$key] = $this->walkarray($array[$key]);
+// if (!empty($this->idname) && !empty($array[$key][$this->idname]) && is_int($key)) {
+ if (($this->idname != "") && (($array[$key][$this->idname] != "") || is_int($array[$key][$this->idname])) && is_int($key)) {
+ if (ereg("[^0-9]", $array[$key][$this->idname]))
+ $array[$array[$key][$this->idname]] = $array[$key];
+ else
+ $array["$this->idname" . "_" . $array[$key][$this->idname]] = $array[$key];
+ unset($array[$key]);
+ }
+ }
+ }
+ }
+ return $array;
+ }
+
+ function xmlarray($idname = "", $rootarray = "", $combinesinglearrays = true, $useincpath = false) {
+ $this->idname = $idname;
+ $this->rootarray = $rootarray;
+ $this->combine = $combinesinglearrays;
+ $this->useincpath = $useincpath;
+ }
+
+ function parsefile($filename) {
+ $numargs = func_num_args();
+ if ($numargs > 1) {
+ $funcarg = func_get_arg(0);
+ $temparray = $this->parsefile($funcarg);
+ for ($i = 1; $i < $numargs; $i++) {
+ $funcarg = func_get_arg($i);
+ $temparray = array_merge_recursive($temparray, $this->parsefile($funcarg));
+ }
+ return $temparray;
+ }
+ else
+ $filename = func_get_arg(0);
+
+ $this->data = array();
+ $this->indexes = array();
+ $this->indexidx = -1;
+ unset($this->position);
+ $this->combined = false;
+
+ $this->parser = xml_parser_create();
+ xml_set_object($this->parser, $this);
+ xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_set_element_handler($this->parser, "startElement", "endElement");
+ xml_set_character_data_handler($this->parser, "characterData");
+
+ $fp = fopen($filename, "r", $this->useincpath);
+ if ($fp) {
+ while ($tmpdata = fread($fp, 4096))
+ if (!xml_parse($this->parser, $tmpdata, feof($fp))) {
+ $this->xmlerrorcode = xml_get_error_code($this->parser);
+ $this->xmlerrorline = xml_get_current_line_number($this->parser);
+ xml_parser_free($this->parser);
+ fclose($fp);
+ return false;
+ }
+ fclose($fp);
+ }
+
+ if ($this->combine == true) {
+ $this->data = $this->walkarray($this->data);
+ $this->combined = true;
+ }
+ xml_parser_free($this->parser);
+
+ return ($this->rootarray != "") ? $this->data[$this->rootarray] : $this->data;
+ }
+
+ function parse($data) {
+ // fix to \n proper parsing
+ // \n is replaced by #parse_nl#
+ // back replace is in characterData function
+ $data = str_replace(" ","#parse_nl#",$data);
+
+ $this->data = array();
+ $this->indexes = array();
+ $this->indexidx = -1;
+ unset($this->position);
+ $this->combined = false;
+
+ $this->parser = xml_parser_create();
+ xml_set_object($this->parser, $this);
+ xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_set_element_handler($this->parser, "startElement", "endElement");
+ xml_set_character_data_handler($this->parser, "characterData");
+
+ if (!xml_parse($this->parser, $data,1)) {
+ $this->xmlerrorcode = xml_error_string(xml_get_error_code($this->parser));
+ $this->xmlerrorline = xml_get_current_line_number($this->parser);
+ echo $this->xmlerrorcode."<br>";
+ echo $this->xmlerrorline;
+ xml_parser_free($this->parser);
+ return false;
+ }
+
+ if ($this->combine == true) {
+ $this->data = $this->walkarray($this->data);
+ $this->combined = true;
+ }
+ xml_parser_free($this->parser);
+
+ return ($this->rootarray != "") ? $this->data[$this->rootarray] : $this->data;
+ }
+
+}
+?>
--- /dev/null
+This is the Gallery binary micro distribution of the NetPBM graphics package.
+Both of these products are released under the Gnu Public License and source
+code for each can be found at:
+
+Gallery home page: http://gallery.sourceforge.net
+NetPBM home page: http://netpbm.sourceforge.net
+
--- /dev/null
+
+*** Modified files in JOE when it aborted on Wed Mar 13 01:11:12 2002
+*** JOE was aborted by signal 1
+
+*** File '(Unnamed)'
+addArt
+
+*** File '../inc/redakce.inc'
+<?php
+include('/home/hromi1/kyberia/inc/kyberia.inc');
+class CLASS_REDAKCE extends CLASS_KYBERIA {
+
+
+function CLASS_REDAKCE() {
+ $this->CLASS_KYBERIA();
+}
+
+function listArticles() {
+ $q="SELECT * FROM articles order by id_article desc";
+ return($this->query($q));
+}
+
+function listRubrikyArray() {
+ $q="SELECT * FROM rubriky";
+ $set=$this->query($q);
+ while($set->next()) {
+ $data[]=$set->getString("nazov");
+ }
+ return $data;
+}
+
+
+
+function addArticle($pole,$title_image) {
+ $text1=AddSlashes($pole[text1]);
+ $text3=AddSlashes($[text3]);
+ $text2=AddSlashes($[text2]);
+ $id_rubrika=$id_rubrika;
+ $id_rubrika_secondary=$id_rubrika_secondary;
+ $title_image=$title_image;
+ $dd= new Diskuse();
+ $diskid=$dd->createDiskuse($id_rubrika);
+ $q="INSERT INTO articles SET datum=NOW(),";
+ $q.="nazov='$pole[nazov]',short_desc='$pole[short_desc]',text1='$text1',text2='$text2',text3='$text3',autor='$pole[autor]',";
+ $q.="id_rubrika='$id_rubrika',";
+ $q.="id_rubrika_secondary='$id_rubrika_secondary',";
+ $q.="id_diskuse='$diskid',title_image='$title_image',hits='0'";
+ $q.=",image1='$image1'";
+ $q.=",image2='$image2'";
+ $q.=",image3='$image3'";
+ echo $q;
+ $this->query($q);
+}
+
+function updateArticle($pole) {
+ $id_rubrika=$pole[id_rubrika]+1;
+ $id_rubrika_secondary=$pole[id_rubrika_secondary]+1;
+ $title_image=$pole[title_image];
+
+ $q="update articles SET datum=NOW(),";
+ $q.="nazov='$pole[nazov]',short_desc='$pole[short_desc]',text1='$pole[text1]',autor='$pole[autor]',";
+ $q.="id_rubrika='$id_rubrika',id_rubrika_secondary='$id_rubrika_secondary'";
+ $q.=" where id_article=$id";
+ $this->query($q);
+}
+
+function deleteArticle($id) {
+ $this->query("DELETE FROM articles where id_article=$id");
+}
+
+function addRubrika($pole,$obrazok) {
+ $rodic=($pole[id_parent])+1;
+ $this->query("INSERT INTO rubriky set nazov='$pole[nazov]',id_parent='$rodic',obrazok='$obrazok',description='$pole[description]'");
+}
+
+function addSkin($nazov,$adresa) {
+ $rodic=($pole[id_parent])+1;
+ $this->query("INSERT INTO skins set nazov='$nazov',adresa='$adresa'");
+}
+
+function addIntro($pole) {
+ $q="INSERT INTO intros set text='$pole[text]',id_forum='$id_forum'";
+ echo $q;
+ $this->query($q);
+}
+
+function addTitle($pole) {
+ $this->query("INSERT INTO titles set title='$pole[title]'");
+}
+
+
+// >------------------------------koniec metod---------------<
+}
+?>
+*** Modified files in JOE when it aborted on Fri Mar 15 22:44:40 2002
+*** JOE was aborted by signal 1
--- /dev/null
+<?php
+include("../inc/redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("../inc/form.inc");
+$ltid="/home/webs/www.kyberia.sk/images/rubriky/";
+echo $submit;
+if($submit=="pridajrubriku") {
+ echo $ltid;
+ if (IsSet($obrazok)) Copy($obrazok,$ltid.$obrazok_name);
+ $redakce->addRubrika($HTTP_POST_VARS,$obrazok_name,$obrazok_articles_name);
+}
+if($submit=="pridajtitle") {
+ $redakce->addTitle($HTTP_POST_VARS);
+}
+if($submit=="pridajintro") {
+ $redakce->addIntro($HTTP_POST_VARS);
+}
+if($submit=="pridajskin") {
+ $redakce->addSkin($nazov,$address);
+}
+
+ $form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ echo "<html><head><title>Pridanie rubriky</title></head><body>\n";
+ $form->addText("nazov","Nazov:","");
+ $form->addFile("obrazok","Obrazok:","");
+ $form->addSelect("id_parent","Rodicovska rubrika",$redakce->listRubrikyArray());
+ $form->addSubmit("submit","pridajrubriku","");
+ $form->display();
+ echo "<br>";
+
+ $form2=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ $form2->addText("title","Titulok:","");
+ $form2->addSubmit("submit","pridajtitle","");
+ $form2->display();
+ echo "<br>";
+
+ $form3=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ $form3->addTextarea("text","Text uvodniku:","",60,60);
+ $form3->addText("id_autor","ID Autora:","");
+ $form3->addSubmit("submit","pridajintro","");
+ $form3->display();
+ echo "<BR>";
+
+ $form4=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ $form4->addText("nazov","Nazov:","");
+ $form4->addText("address","Adresa:","");
+ $form4->addSubmit("submit","pridajskin","");
+ $form4->display();
+ echo "<br>";
+
+ echo "</body></html>";
+
+
+
+?>
--- /dev/null
+<?php
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config/");
+include("redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("form.inc");
+
+$LocalImageDir="/home/hromi1/kyberia/images/clanky/";
+
+
+if (IsSet($title_image)) {
+if (strstr($title_image_name,".jpg"))
+ $cmd="/usr/local/netpbm/bin/jpegtopnm $title_image | /usr/local/netpbm/bin/pnmscale -width=75 | /usr/local/netpbm/bin/pnmtojpeg >".$LocalImageDir.$title_image_name;
+elseif (strstr($title_image_name,".gif"))
+ $cmd="/home/hromi1/kyberia/balast/gifsicle --resize 50x_ ".$title_image." > ".$LocalImageDir.$title_image_name;
+echo $cmd;
+if ($cmd) exec($cmd);
+}
+
+
+if($submit=="save") {
+ if (IsSet($title_image_name)) $redakce->addArticle($HTTP_POST_VARS,$title_image_name);
+ else $redakce->addArticle($HTTP_POST_VARS);
+}
+
+print_r($HTTP_POST_VARS);
+echo "<html><head><link rel=stylesheet type=\"text/css\" href=\"./kyberia.css\"></head>";
+$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ echo "<html><head><title>Pridanie clanku</title></head><body>\n";
+ $redakce->listArticles();
+ echo "<body><table><tr>\n";
+ $form->addText("nazov","Nazov:","");
+ $form->addText("autor","Autor:","");
+ $form->addfile("title_image","Titulni Obrazok:");
+ $form->addSelect("id_rubrika","Rubrika",$redakce->listRubrikyArray());
+ $form->addSelect("gallery","Gallery",$redakce->listGalleryArray());
+ $form->addSelect("id_rubrika_secondary","Sekundarna rubrika",$redakce->listRubrikyArray());
+ $form->addTextarea("short_desc","Kraktky popis","",40,6);
+ $form->addTextarea("text1","Text:","",40,6);
+ $form->addTextarea("text2","Text:","",40,6);
+ $form->addTextarea("text3","Text:","",40,6);
+ $form->addSubmit("submit","save","");
+ $form->addSubmit("submit","preview","");
+ $form->display();
+ echo "</body></html>";
+
+
+?>
--- /dev/null
+<?php
+include("../inc/redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("../inc/form.inc");
+
+if($submit=="pridaj") {
+ $redakce->addRubrika($HTTP_POST_VARS);
+}
+
+$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ echo "<html><head><title>Pridanie rubriky</title></head><body>\n";
+ $form->addText("nazov","Nazov:","");
+ $form->addText("description","Popis:","");
+ $form->addSelect("id_parent","Rodicovska rubrika",$redakce->listRubrikyArray());
+ $form->addSubmit("submit","pridaj","");
+ $form->display();
+ echo "</body></html>";
+
+
+?>
--- /dev/null
+<?php
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/:/home/hromi1/kyberia/config/");
+include("redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("form.inc");
+include("configdb.inc");
+if($action=="delete") {
+ $redakce->deleteArticle($id);
+ Header("Location:",$PHP_SELF);
+}
+?>
+
+<html><head><title>Zoznam clankov</title>
+<link rel=stylesheet type="text/css" href="./kyberia.css">
+</head>
+<body>
+<?
+$set=$redakce->listArticles();
+echo "<table class=box>";
+while ($set->next()) {
+ echo "<tr><td><a href=/redakcia/update.php?id=".$set->getString("id_article").">\n";
+ echo $set->getString('nazov'),"</a>\n";
+ echo " (",$redakce->getRubrikaById($set->getString("id_rubrika")),",\n";
+ echo $redakce->getRubrikaById($set->getString("id_rubrika_secondary")),")\n";
+ echo "</td>\n";
+ echo "<td><a href=",$PHP_SELF,"?action=delete&id=",$set->getString(id_article),">Delete</a>";
+ echo "</tr>\n";
+
+}
+echo "</table>";
+echo "<br><a href=\"addarticle.php\">Pridaj novy clanok</a>";
+echo "</body></html>";
+?>
--- /dev/null
+<?php
+echo "<pre>";
+include("../inc/redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("../inc/form.inc");
+$redakce->createMenu();
+echo "</pre>";
+?>
--- /dev/null
+body { font-size: 8 pt; background-color: #000000; font-family:helvetica; }
+a.nazev { font-size: 10 pt; color: #6dae42; font-family:serif; font-weight:bold; }
+a { font-size: 8 pt; color: #6dae42; font-family:tahoma,arial,serif; }
+td { border-width: 0; color: #6dae42; border-color: black; font-size: 9 pt; font-family: serif;}
+th { border-width: 0; color: #6dae42; border-color: black; font-size: 9 pt; font-family: serif;}
+input { width: 120 pt; background-color: black; color: white; font-size: 8pt; font-family: Verdana, Arial, Helvetica; border: solid 1pt #6dae42 }
+input.noborder { border-width: 0 pt; border-color: black; }
+table.box { border-color: #6dae42; }
+table.noborder {border-color: black; }
+select { background-color: #6dae42; }
+option { background-color: #6dae42; }
\ No newline at end of file
--- /dev/null
+<?
+require "../header_db.php";
+
+Header ("Pragma: no-cache");
+Header ("Cache-Control: no-cache");
+Header ("Expires: ".GMDate("D, d M Y H:i:s")." GMT");
+
+if ($insert=="yes") {
+echo "<form action=$PHP_SELF>";
+echo "Otazka: <input type=text name=question>";
+echo "id rubriky: <input type=text name=id_rubrika>";
+echo "<br>Aktivni: ano:<input type=radio name=active value=yes>ne:<input type=radio name=active value=no><br>";
+echo "Odpoved 1 <input type=text name=option1><br>";
+echo "Odpoved 2 <input type=text name=option2><br>";
+echo "Odpoved 3 <input type=text name=option3><br>";
+echo "Odpoved 4 <input type=text name=option4><br>";
+echo "Odpoved 5<input type=text name=option5><br>";
+echo "<input type=submit name=insert value=Pridej>";
+}
+
+elseif (IsSet($info)) {
+$sqlcmd = "Select * from polls where id_poll='$info'";
+$result =mysql_query($sqlcmd);
+$riadok=mysql_fetch_array($result);
+echo "<center><h3>Anketa: $riadok[question]</h3>";
+echo "odpovedalo $riadok[responses] lidi";
+$sqlcmd = "Select * from poll_options where id_poll='$info'";
+$result =mysql_query($sqlcmd);
+echo "<table>";
+while ($riadok=mysql_fetch_array($result)) {
+ echo "<tr><Td>$riadok[text]</td><td>$riadok[number] lidi </td></tr>";
+}
+echo "</centeR>";
+}
+
+
+elseif ($insert=="Pridej") {
+ $sqlcmd = "insert into polls set responses=0,question='$question', active='$active',id_rubrika='$id_rubrika'";
+ $result =mysql_query($sqlcmd);
+ $id_poll=mysql_insert_id();
+ if (IsSet($option1)) {
+ $sqlcmd = "insert into poll_options set text='$option1', id_poll='$id_poll' ,number='0'";
+ mysql_query($sqlcmd);
+ }
+ if (IsSet($option2) AND $option2!="") {
+ $sqlcmd = "insert into poll_options set text='$option2', id_poll='$id_poll' ,number='0'";
+ mysql_query($sqlcmd);
+ }
+
+ if (IsSet($option3) AND $option3!="") {
+ $sqlcmd = "insert into poll_options set text='$option3', id_poll='$id_poll' ,number='0'";
+ mysql_query($sqlcmd);
+ }
+
+ if (IsSet($option4) AND $option4!="") {
+ $sqlcmd = "insert into poll_options set text='$option4', id_poll='$id_poll' ,number='0'";
+ mysql_query($sqlcmd);
+ }
+
+ if (IsSet($option5) AND $option5!="") {
+ $sqlcmd = "insert into poll_options set text='$option5', id_poll='$id_poll' ,number='0'";
+ mysql_query($sqlcmd);
+ }
+}
+
+
+else {
+if ($up=="Uloz" AND IsSet($update)) {
+
+
+$sqlcmd="update polls set active='$$update' where id_poll='$update'";
+mysql_query($sqlcmd);
+}
+$sqlcmd = "Select active,id_poll,question from polls order by time desc";
+$result= mysql_query($sqlcmd);
+echo "<table><tr><th>ID</th><th>Otazka</th><th>Aktivni?</th></tr>";
+while ($record = mysql_fetch_array($result)) {
+ echo "<form action=$PHP_SELF method=post>";
+ echo "<td>",$record["id_poll"],"</td>";
+ echo "<td><a href=/~hromi/activa/admin2/polladmin.php?info=",$record["id_poll"],">",$record["question"],"</td>";
+ echo "<td>Ano:<input type=radio name=active$record[id_poll] value=yes";
+ if ($record["active"]=="yes") echo " checked";
+ echo ">";
+ echo " Ne:<input type=radio name=active$record[id_poll] value=no";
+ if ($record["active"]=="no") echo " checked";
+ echo "><input name=up type=submit value=Uloz><input type=hidden name=update value=$record[id_poll]</form></td></tr>";
+}
+echo "</table>";
+echo "<br><a href=$PHP_SELF?insert=yes>Pridat novu anketu.</a>";
+}
+?>
\ No newline at end of file
--- /dev/null
+# MySQL dump 8.16
+#
+# Host: localhost Database: activa
+#--------------------------------------------------------
+# Server version 3.23.44-log
+
+#
+# Table structure for table 'polls'
+#
+
+CREATE TABLE polls (
+ id_poll int(11) NOT NULL auto_increment,
+ time timestamp(14) NOT NULL,
+ question varchar(255) default NULL,
+ responses int(11) default NULL,
+ active set('yes','no') default 'no',
+ id_rubrika int(11) default NULL,
+ PRIMARY KEY (id_poll)
+) TYPE=MyISAM;
+
+#
+# Dumping data for table 'polls'
+#
--- /dev/null
+# MySQL dump 8.16
+#
+# Host: localhost Database: activa
+#--------------------------------------------------------
+# Server version 3.23.44-log
+
+#
+# Table structure for table 'poll_options'
+#
+
+CREATE TABLE poll_options (
+ id_option int(11) NOT NULL auto_increment,
+ id_poll int(11) default NULL,
+ text varchar(255) default NULL,
+ number int(11) default NULL,
+ PRIMARY KEY (id_option)
+) TYPE=MyISAM;
+
+#
+# Dumping data for table 'poll_options'
+#
+
+INSERT INTO poll_options VALUES (1,1,'vsichni',2);
+INSERT INTO poll_options VALUES (2,1,'jenom muzsky',3);
+INSERT INTO poll_options VALUES (3,1,'jenom dadka',1);
+INSERT INTO poll_options VALUES (4,1,'jenom ja',4);
+INSERT INTO poll_options VALUES (5,1,'nikto',3);
+INSERT INTO poll_options VALUES (6,2,'no trava',0);
+INSERT INTO poll_options VALUES (7,2,'no extaze',0);
+INSERT INTO poll_options VALUES (8,2,'no lsd',0);
+INSERT INTO poll_options VALUES (9,2,'dmt, dmt, uletel mi deekel',0);
+INSERT INTO poll_options VALUES (10,2,'pernicek nas kazdodenny',0);
+
--- /dev/null
+<?php
+ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
+include("redakce.inc");
+$redakce=new CLASS_REDAKCE();
+include("form.inc");
+$LocalImageDir="/home/hromi1/images/clanky/";
+
+if ($id) {
+$article=$redakce->getArticleData($id);
+$article->next();
+echo "<html><head><link rel=stylesheet type=\"text/css\" href=\"./kyberia.css\"></head>";
+$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
+ echo "<html><head><title>Pridanie clanku</title></head><body>\n";
+ $redakce->listArticles();
+ echo "<body><table><tr>\n";
+ $form->addText("nazov","Nazov:",$article->getString("nazov"));
+ $form->addText("autor","Autor:",$article->getString("autor"));
+ $form->addfile("title_image","Titulni Obrazok:");
+ $form->addfile("image1","Obrazok:");
+ $form->addfile("image2","Obrazok:");
+ $form->addhidden("id",$id);
+ $form->addfile("image3","Obrazok:");
+ $form->addSelect("id_rubrika","Rubrika",$redakce->listRubrikyArray());
+ $form->addSelect("id_rubrika_secondary","Sekundarna rubrika",$redakce->listRubrikyArray());
+ $form->addTextarea("short_desc","Kraktky popis",$article->getString("short_desc"),40,6);
+ $form->addTextarea("text1","Text:",stripslashes($article->getString("text1")),80,23);
+ $form->addTextarea("text2","Text:",stripslashes($article->getString("text2")),40,6);
+ $form->addTextarea("text3","Text:",stripslashes($article->getString("text3")),40,6);
+ $form->addTextarea("keywords","Keywords:",stripslashes($article->getString("keywords")),40,6);
+ $form->addSubmit("submit","pridaj","");
+ $form->display();
+ echo "</body></html>";
+}
+
+
+
+if ($submit=="pridaj") {
+
+if (IsSet($title_image)) {
+ Copy($title_image,$LocalImageDir.$title_image_name);
+}
+
+if (IsSet($image1)) {
+ Copy($image1,$LocaImageDir.$image1_name);
+}
+if ($image2!="") {
+ Copy($image2,$LocaImageDir.$image2_name);
+}
+if ($image3!="") {
+ Copy($image3,$LocaImageDir.$image3_name);
+}
+
+
+
+ $redakce->updateArticle($HTTP_POST_VARS);
+}
+
+
+
+?>
--- /dev/null
+<?php
+
+// test
+//
+//hromi is an asshole mothafooka programma'
+//toto je nejake zujimave prekonvertovanie odkazovania
+//z id na node_id
+if ($_GET['id']) {
+ if ($_GET['action']=='article') $_GET['node_id']=$_GET['id'];
+ if ($_GET['action']=='forum') $_GET['node_id']=$_GET['forum_id'];
+}
+
+//inicializacia stopiek vzniku stranky
+$timer_start=Time()+SubStr(MicroTime(),0,8);
+//nastavenie ciest
+ini_set("include_path","./inc:./boxiky/:./config:../inc:../boxiky/:../config");
+
+//tu je umiestnena hlavna class kyberia
+include("kyberia.inc");
+//tu su rozne zobrazovacie funkcie
+include("showz.inc");
+//nastavenie databaze
+include("configdb.inc");
+
+//nastavenia banerov a title
+include("config_texts.inc");
+//cesty na ukladanie napr obrazkov
+include("config_pathz.inc");
+
+//definicia hlavnej najpouzivanejsej class
+$kyberia=new CLASS_KYBERIA();
+
+//ak sa niekto snazil podstrcit prihlasenie cez GET
+if(IsSet($user_id)) {
+ $kyberia->ubikMail("38","Bastard to skusal z $REMOTE_ADDR");
+ echo "Hmmm nepokusaj sa o blbosti. Tvoja ip mi bola prave odoslana do posty.";
+ die();
+}
+
+//pokial neexistuje cookie tak ho vytvori
+if (empty($_COOKIE['kybersession'])) {
+ $id=md5(MicroTime());
+ Setcookie("kybersession",$id,0,"/");
+}
+
+//posiela hlavicku aby nic necachovalo
+Header("Cache-control: no-cache");
+Header("Expires:".gmdate("D, d M Y H:i:s")." GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+//neviem na co je tato premenna, ak viete tak napiste
+if (!$offset) $offset=0;
+//odhlas ma
+if ($action=="logoff") {
+ $kyberia->logOff();
+ unset($action);
+}
+
+//user data caching
+if ($user=$kyberia->isLogged()) {
+ $user_id=$user['user_id'];
+ $user_mode_message=$user['user_mode_message'];
+
+ if ($user['admin']=='yes') define ('ADMIN',true);
+ else define ('ADMIN',false);
+ $user_name=$user['user_name'];
+ $user_status=$user['user_mode'];
+ $user_amount=$user['user_amount'];
+ $user_mail=$user['user_mail'];
+ $user_active_icons=$user['user_active_icons'];
+ $user_icons_in_forum=$user['user_icons_in_forum'];
+ $mail_name=$user['mail_name'];
+
+ $kyberia->query("UPDATE user SET last_click=NOW() WHERE id=$user_id");
+
+ // friends
+ $fr_array = explode(";", $user['user_friends_serial']);
+ foreach($fr_array as $frid)
+ if (is_numeric($frid)){
+ $friend_array[$frid] = $frid;
+ }
+}
+
+//toto uz nejak nepouzivame
+//turns on error reporting for mr. admin
+if ($user_id!=38 && $_GET['debug']) error_reporting(0);
+
+
+//veci ak sa pristupuje do fora
+if ($action=='forum') {
+//tu sa jedna o opravnenie na pristup do fora
+ $access_type = '';
+ $set=$kyberia->query("select access_type from node_access where node_type='forum' and node_id='$node_id' and user_id='$user_id'");
+ if ($set->next()) {
+ $access_type=$set->getString('access_type');
+ }
+
+//brutalne query na zistenie vsetkeho o fore a userovy
+ $forumset=$kyberia->query("select user_forum.submission_count,forum_info.forum_info,category.category_name as category,user.login as owner_name,forum.*,user_forum.user_bookmark as bookmark from forum left join user_forum on (user_forum.forum_id=forum.forum_id and user_forum.user_id=$user_id) left join category on (category.category_id=forum.forum_category) left join user on (user.id=forum.forum_owner) left join forum_info on (forum_info.forum_id=forum.forum_id) where forum.forum_id='$node_id'");
+ $forumset->next();
+ $forum=$forumset->getRecord();
+
+//hehe you don't have access
+ if ($forum['forum_public']=='private' and !($forum['forum_owner']==$user_id OR $access_type=='access' or $access_type=='master' or $access_type=='op')) {
+ echo "toto forum je privatne. sorry";
+ echo "<br>Ak chces pristup napis vlasnikovi fora";
+ echo "<br>mal by to byt ".$forum['forum_owner'];
+ return;
+ }
+
+//ak uz mal pristup vo fore tak sa zapisalo bookmark
+ if ($forum['bookmark']=='no' or $forum['bookmark']=='yes') {
+//zapise sa "0 novych prispevkov"
+ $q="UPDATE user_forum set submission_count=0,last_visit=NOW() where forum_id='$node_id' and user_id='$user_id'";
+ $rows=$kyberia->update($q);
+ }
+//alebo sa vytvori zaznam v user_forum ak pristupuje do fora prvy krat
+ else $kyberia->query("INSERT INTO user_forum set submission_count=0,forum_id='$node_id',user_id='$user_id'");
+}
+
+//db query ak bude vypis user info
+elseif ($action=='userinfo') {
+
+ $userinfoset=$kyberia->query("select * from user where id='$node_id'");
+ $userinfoset->next();
+ $userinfo=$userinfoset->getRecord();
+
+}
+
+//db query ak bude otvoreny dennik
+elseif ($action=='journaux' && !empty($_GET['node_id'])) {
+
+ $dennikset=$kyberia->query("select * from dennik where id='$node_id'");
+ $dennikset->next();
+ $dennik=$dennikset->getRecord();
+}
+
+//db query na otvorenie clanku
+elseif ($action=='article' && !empty($node_id)) {
+ $articleset=$kyberia->query("select * from articles where id_article='".$node_id."'");
+ $articleset->next();
+ $article=$articleset->getRecord();
+}
+
+//get_event sa asi pouziva na zmenu nalady
+if ($_GET['get_event']) { include_once("get_eventz.inc"); }
+//named butons event
+if ($_POST['event']) { include("{$action}_eventz.inc"); }
+//tomuto nechapem
+if ($action=="session") $node_id=158;
+
+// tiez neviem na co to tu je
+$kyberia->updateUserData($user_id);
+
+//ak sa ide registrovat novy user
+include("header.inc");
+if($action=='register') {
+ echo "<table><tr><td width='125' valign='top'>";
+ echo "</td><td width='600' valign='top'>";
+ include_once("register.inc");
+ echo "</td></tr></table>";
+ die();
+}
+
+
+//ak nie je prihlaseny tak zobrazi ten velky obrazok kyberia
+if (!$user_id) {
+ echo "<a href=http://kyberia.sk/><img src=http://kyberia.sk/images/top.gif border=0></a><br>";
+}
+
+else echo "<br><br>";
+
+
+?>
+
+<table cellspacing=0 cellpadding=0>
+<tr>
+<td align=right valign=top width=5> </td>
+<!-- lavy stlpec -->
+
+<?php
+//nastavenia tabuliek
+if ($action=="posta") echo "<td align='left' valign='top' width='160'>";
+elseif ($user_id AND $action!="journaux" AND $action!="listarticle") echo "<td align='left' valign='top' width='150'>";
+elseif ($action!="ludia") echo "<td align='left' valign='top' width='150'>";
+
+//ak nie je prihlaseny a neprezera si clanok
+if (!$user_id AND $action!='article') {
+//prida nahodny dennik
+ include("randomzurno.inc");
+ echo "<br>";
+//najcitanejsie galerie
+ include("top10galleries.inc");
+ echo "<br>";
+//neni toto blbost? alebo som si to nikdy nevsimol
+//preco by sa tam mala zobrazovat anketa?
+ include("poll.inc");
+ echo "<br>";
+//hladaj
+ include("searchbox.inc");
+ echo "<br>";
+//najcitanejsie clanky
+ include("mostread.inc");
+ echo "<br>";
+ include("outrobox.inc");
+}
+
+//zobrazenie zoznamu userov v dennikoch
+elseif($action=='journaux') {
+// include("dennik_type.inc");
+ include("allusers.inc");
+}
+
+//ak si prezera clanok
+elseif($action=='article') {
+//hlavicka clanku
+ include("shortdesc.inc");
+ echo "<br>";
+//dalsie clanky v rubkike
+ include("rubrikalist.inc");
+ echo "<br>";
+ $clanky=$kyberia->getArticle($_GET['node_id']);
+ $clanky->next();
+//zobrazi jednu fotku z galerie
+ include("fotobox.inc");
+ if ($clanky->getInt('autor')) {
+ $autor=$clanky->getInt('autor');
+//zobrazi info o autorovi ak je nejake info k dispozicii
+ include("userinfobox.inc");
+ }
+
+}
+
+//ak sa zobrazuje forum
+elseif($action=="forum") {
+//zistenie ci nema ban
+ if ($access_type=="ban" && $forum['forum_owner']!=$user_id) {
+ $error=" V tomto fore si bol zabanovany. Smola.<br>";
+ }
+
+//inak pridaj info, anketu a statistiky
+ else {
+ include("foruminfo.inc");
+ include("poll.inc");
+ include("forumstats.inc");
+ }
+
+}
+
+//zoznam clankov
+elseif($action=="listarticle") {
+ include("articles.inc");
+}
+
+//vstupny blabol pri registracii
+elseif($action=="register") {
+ include("registerinfo.inc");
+}
+
+//zobrazeni poslednych klubov v poslednych ;))
+elseif($action=="posledne") {
+ include("lastforum.inc");
+}
+
+//to je len smajlik
+elseif($action=="karma") {
+ include("karmabox.inc");
+}
+
+
+//userinfo ;)
+elseif($action=="userinfo") {
+ include("userinfobox.inc");
+}
+
+//adminove zalezitosti
+elseif($action=="admin" && ADMIN) {
+ include("admin/module_list.inc");
+}
+
+//to je prepinac v zobrazeni ludi
+elseif($action=="ludia" || $action=="friends") {
+ include("searchforumbox.inc");
+ include("count.inc");
+ echo "<br><br>";
+ include("people_modules.inc");
+}
+
+else {
+//ak sa nesplnila podmienka ani jednoho z predchadzajucich
+//pridaj hladanie
+ include("searchforumbox.inc");
+//ak je to nieco ohladom bookmarkov pridaj odkaz na editaciu
+ if ($action=="b00kmarkz" or $action=="b00kedit" or $action=="pridaj.b00kcat" or $action=="movebook"){
+ echo ("<a href='?action=b00kedit'>editacia kategorii</a><br><br>");
+ }
+//ak niesu zobrazeny ludia tak pridaj zoznam aktivnych
+ if($action!="ludia") include("active.inc");
+}
+
+?>
+
+<!-- koniec laveho stlpca -->
+<td align=right valign=top width=10> </td>
+
+<? if (!$user_id AND $action!="article") { ?>
+<td align=left valign=top width=498>
+<? } ?>
+
+<? if (!$user_id AND $action=="article") { ?>
+<td align=left valign=top width=598>
+<? } ?>
+
+<? if ($user_id) { ?>
+<td align=left valign=top width='698'>
+<? }
+
+//ak nie je prihlaseny a je v registracii noveho uzivatela
+if ($action=='register' AND (!$user_id)) {
+
+ include("register.inc");
+ echo "</td>";
+
+}
+?>
+
+<?php
+//statusbox je to male policko kde sa vzdy vypisuju chyby
+include_once("statusbox.inc");
+
+//v pripade ze je prihlaseny
+if ($user_id) {
+
+//tu sa zobrazuje oznamenie novych mailov
+//a navigacna lista umiestnena hore pomocou css
+ include("toolbar.inc");
+
+ if ($action=="posta") include("posta.inc");
+ elseif ($action=="b00kmarkz") include("bookmarks.inc");
+//pridanie bookmarkovek kategorie
+ elseif ($action=="pridaj.b00kcat") {include("addbookcat.inc"); include("bookedit.inc");}
+//presun bookmarkov medzi kategoriami
+ elseif ($action=="movebook") {include("movebook.inc"); include("bookedit.inc");}
+//editacia kategorii
+ elseif ($action=="b00kedit") include("bookedit.inc");
+ elseif ($action=="newz") include("newz.inc");
+ elseif ($action=="posledne") include("last.inc");
+ elseif ($action=="karma") include("karma.inc");
+ elseif ($action=="dennikadd") include("dennikadd.inc");
+ elseif ($action=="searchforum") include("searchforum.inc");
+ elseif ($action=="links") include("links.inc");
+
+ elseif ($action=="pridaj.forum") include("addforum.inc");
+//toto pouzival iba hromi ked vytvaral katedorie klubov
+ elseif ($action=="pridaj.kategoriu") include("addcat.inc");
+//nastavenia
+ elseif ($action=='personalize') include("personalize.inc");
+//registracia
+ elseif ($action=='register') include("register.inc");
+//adminovske polozky
+ elseif ($action=='admin') {
+ if ($_GET['subaction']) include("admin/".$_GET['subaction'].".inc");
+ else include("admin/admin.inc");
+ }
+
+//momentalne nevyuzivana feature na oznamenie 23.2. session
+ elseif ($action=='session') include("session.inc");
+//priatelia
+ elseif ($action=='friends') include("friends.inc");
+
+ elseif ($action=='userinfo') include("userinfo.inc");
+ elseif ($action=='ludia') {
+// include ("friends.inc");
+ include("people.inc");
+}
+
+//vypis klubov
+ elseif ($action=="list") include("forumlist.inc");
+//vypis clanku
+ elseif ($action=="article") include("show_article.inc");
+//vo vyvoji?
+ elseif ($action=="irc") {
+ include("irc_form.inc");
+ include("irc.inc");
+ }
+//vypis fora
+ elseif ($action=='forum') include("forum.inc");
+//vypis dennika
+ elseif ($action=='journaux') include("journaux.inc");
+
+ elseif ($action=='listarticle' or $action=='rubrika') include("list_articles.inc");
+
+ else include("forumlist.inc");
+}
+//tieto tri riadky su uz ak je neprihlaseny
+elseif ($action=='journaux') include("journaux.inc");
+elseif ($action=='article') include("show_article.inc");
+else include("list_articles.inc");
+
+//nasleduje pravy stlpec
+//myslim ze sa zobrazuje len na uvodnej stranke
+?>
+
+</td>
+
+<? if (!$user_id AND $action!="article") { ?>
+ <td align=right valign=top width=10> </td>
+ <td height=100 style="border-color: #6dae42; border-width: 1pt;" height=100% valign=top width=100>
+ <?php include("loginbox.inc"); ?>
+ <?php include("navbox.inc"); ?>
+ <?php include("mame_radi_box.inc"); ?>
+ </td>
+ </tr>
+ <tr><td colspan=3><td align=right><?php include("next.inc"); ?>
+ <tr><td colspan=6 align=center><?php //include("z.inc"); ?></td></tr>
+<? }
+//vypis casu tvorby stranky
+echo "<tr><td colspan=9 align='center'>".SubStr((Time()+SubStr(MicroTime(),0,8)-$timer_start),0,7)."</td></tr>"; ?>
+<tr><td colspan=9 align=center><?php include("tiraz.inc"); ?></td></tr>
+</table>
+</table>
+</body>
+</html>
\ No newline at end of file