//echo "je to uz uplne v pici. vsetky data su stratene, prajem pekny den :)";
//exit;
error_reporting(1);
+$_SESSION['debugging']=1;
//exit;
//starting timer for benchmarking purposes
require(INCLUDE_DIR.'error_messages.inc');
require(INCLUDE_DIR.'database.inc');
-$db=new CLASS_DATABASE();
+$db = new CLASS_DATABASE();
+$log = new log; //XXX
if (!empty($_GET['template_id'])) {
$template_id=$_GET['template_id'];
$node = nodes::getNodeById($_GET['node_id'],$_SESSION['user_id']);
}
+//XXX Paths are wrong (!)
//loading smarty template engine and setting main parameters
require(SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
-$smarty->template_dir = TEMPLATE_DIR.TEMPLATE_SET;
+//$smarty->php_handling = SMARTY_PHP_REMOVE; //XXX
+$smarty->template_dir = TEMPLATE_DIR;
//echo TEMPLATE_DIR.TEMPLATE_SET;
//echo $smarty->template_dir;
-$smarty->compile_dir = SYSTEM_ROOT."data/templates_c/".TEMPLATE_SET;
-$smarty->config_dir = SMARTY_DIR.'configs/';
+$smarty->compile_dir = SYSTEM_DATA."templates_c/";
+$smarty->config_dir = SMARTY_DIR.'configs/'; #XXX neexistuje
$smarty->cache_dir = SMARTY_DIR.'cache/';
$smarty->plugins_dir = SMARTY_PLUGIN_DIR ;
if ($_SESSION['debugging']) $smarty->debugging=true;
$rss =& new UniversalFeedCreator();
$rss->title = "Kyberia mail";
$rss->description = "";
- $rss->link = "https://kyberia.sk/id/24";
+ $rss->link = "https://". SYSTEM_URL . "/id/24";
$query = "select date_format(mail.mail_timestamp,\"%e.%c. %k:%i:%s\") as cas,
userfrom.user_action as locationfrom_action,
continue;
$item =& new FeedItem();
$item->title = $m['mail_from_name'];
- $item->link = "https://kyberia.sk/id/24";
+ $item->link = "https://".SYSTEM_URL."/id/24";
$item->description = $m['mail_text'];
$rss->addItem($item);
}
$rss =& new UniversalFeedCreator();
$rss->title = "Kyberia bookmarks";
- $rss->link = "http://kyberia.sk/id/19";
+ $rss->link = "http://".SYSTEM_URL."/id/19";
require_once(SMARTY_PLUGIN_DIR.'/function.get_bookmarks.php');
smarty_function_get_bookmarks(array(), $smarty);
{
$item =& new FeedItem();
$item->title = $_b['node_name'];
- $item->link = "http://kyberia.sk/id/".$_b['node_id']."/rss";
+ $item->link = "http://".SYSTEM_URL."/id/".$_b['node_id']."/rss";
$rss->addItem($item);
}
}
$rss =& new UniversalFeedCreator();
$rss->title = $node['node_name'];
$rss->description = "";
- $rss->link = "http://kyberia.sk/id/".$node['node_id'];
+ $rss->link = "http://".SYSTEM_URL."/id/".$node['node_id'];
// K list
if ($_GET['node_id']=='15')
{
$item =& new FeedItem();
$item->title = $_item['node_name'];
- $item->link = "http://kyberia.sk/id/".$_item['node_id'];
+ $item->link = "http://".SYSTEM_URL."/id/".$_item['node_id'];
$item->description = $_item['node_content'];
$rss->addItem($item);
}
//if node is css
if ($node['template_id']!='2019721'){
- log::log('enter',$node['node_id'],'ok',$node['node_user_subchild_count']);
+ $log->log('enter',$node['node_id'],'ok',$node['node_user_subchild_count']);
if (!empty($_SESSION['user_id']) && is_numeric($node['node_id'])) {
$q="update node_access set visits=visits+1,node_user_subchild_count='0',last_visit=NOW() where node_id='".$node['node_id']."' and user_id='".$_SESSION['user_id']."'";
// echo $q;
else {
- log::log('enter',$node['node_id'],'failed');
+ $log->log('enter',$node['node_id'],'failed');
}
$smarty->assign('crypto_pass',$_SESSION['crypto'][$node['node_id']]);
}
-//hlaska
-//$error .= "ocakavajte planovany vypadok okolo 6 hodiny <br>
-//s pozdravom br .)";
-//$error .= "dnes od 22:00 zurka v subclube! ucast povinna!";
-
$smarty->assign('error',$error);
$smarty->assign('permissions',$permissions);
$smarty->assign('current_vector',$node['node_vector']);