X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=inline;f=wwwroot%2Fnodes.php;h=85fef19f6f4598e64f354434e537beee0dfbd893;hb=b6e351974839ae98f13663c02917350d2f408d66;hp=88f1b3cc2b3b969b6f88746898f0e668ed093cd0;hpb=51ff32267c4949bad6a8dddc502cbc01ed56edc8;p=mirrors%2FKyberia-bloodline.git
diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php
index 88f1b3c..85fef19 100644
--- a/wwwroot/nodes.php
+++ b/wwwroot/nodes.php
@@ -2,29 +2,12 @@
// output buffering forcing (mx)
if (!empty($_POST['FORCE_OB']) && $_POST['FORCE_OB'] == 'true') ob_start();
-//header("Location: http://kyberia.sk");
-// just a little joke:-))) darkaural
-//header("Location: http://kenny.in-the-hell.org/albums/album22/HPIM1443.sized.jpg");
-//header("Location: http://zoznamka.azet.sk/inzeraty.phtml?&kat=8");
//header("Location: http://web.archive.org/web/20020925021139/http://kyberia.sk");
-//echo "este posledna pauza :)";
-//exit;
-//die("tak este nie ;o)
uplatky posielajte postovou poukazkou ;-p
prajem pekny den
stab
");
//echo "je to uz uplne v pici. vsetky data su stratene, prajem pekny den :)";
//exit;
-error_reporting(0);
-// echo "
prvy april presiel ale ja nechcem byt koderom azetu takze ring volny";
-//echo "ehm, roztiekla sa databaza, zachovajte paniku, snad sme o hodinku spat ;)
br";
-//echo "establishing artificial environment
healing database inconsistency.comeback today";
-//echo '
je mi luto, ale nachvilku to musim sundat ;). s pozdravom brrrrr ';
-//echo '
je mi luto, ale nachvilku to musim sundat ;). s pozdravom br ';
-//session_start();
-//if ($_GET['node_id'] != 2334 && $_SESSION['user_id'] != '2334' && $_SESSION['user_id'] != 2095638 && $_SESSION['user_id'] != 2088 && $_GET['node_id'] != 1478235) {
-//echo "
";
-//echo "snazime sa nieco spravit s rychlostou, stay tuned.
";
-//echo "PS: my sme to odpojili z vonka";
+error_reporting(1);
//exit;
-//}
+
//starting timer for benchmarking purposes
$timer_start=Time()+SubStr(MicroTime(),0,8);
@@ -45,19 +28,20 @@ if ($_SESSION['debugging']) {
//requiring main config file with path/database etc. constants
require('config/config.inc');
-require('inc/senate.inc');
+require(INCLUDE_DIR.'senate.inc');
preg_match("/id\/(.*)\//",$_SERVER['HTTP_REFERER'],$ref_match);
$referer_id=$ref_match[1];
//connecting to database and creating universal $db object
-require(SYSTEM_ROOT.'inc/log.inc');
-require(SYSTEM_ROOT.'inc/ubik.inc');
-require(SYSTEM_ROOT.'inc/nodes.inc');
-require(SYSTEM_ROOT.'inc/error_messages.inc');
-require(SYSTEM_ROOT.'inc/database.inc');
+require(INCLUDE_DIR.'log.inc');
+require(INCLUDE_DIR.'ubik.inc');
+require(INCLUDE_DIR.'nodes.inc');
+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'];
@@ -66,34 +50,18 @@ else $template_id=false;
//initializing node methods
if (!empty($_GET['node_name'])) {
- //omfg what's this! jail , jail, penalty of death!
- // reopened by [CENSORED], keep this in secret, then you can benefit from it..
- if(strpos($_GET['node_name'],'0')===0) {
- $numbah=$_GET['node_name'];
- $db->query("set character_set_connection=latin2");
- $set=$db->query("select * from tz.gts where full_number='$numbah'");
- $set->next();
- echo $set->getString('full_name')."
";
- echo $set->getString('full_street')."
";
- echo $set->getString('city')."
";
- echo $set->getString('psc')."
";
- echo $set->getString('company')."
";
-
- die();
- }
-
- else $node = nodes::redirByName($_GET['node_name']);
- // END OF JAIL ;)
$node = nodes::redirByName($_GET['node_name']);
}
elseif (!empty($_GET['node_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->php_handling = SMARTY_PHP_REMOVE; //XXX
$smarty->template_dir = TEMPLATE_DIR.TEMPLATE_SET;
//echo TEMPLATE_DIR.TEMPLATE_SET;
//echo $smarty->template_dir;
@@ -153,7 +121,7 @@ function _checkPermissions()
{
global $permissions, $node;
- require(SYSTEM_ROOT.'inc/permissions.inc');
+ require(INCLUDE_DIR.'permissions.inc');
$permissions=permissions::checkPermissions($node);
$permissions['h']=permissions::isHierarch($node);
}
@@ -194,7 +162,7 @@ if ($template_id=='rss')
$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,
@@ -214,7 +182,7 @@ if ($template_id=='rss')
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);
}
@@ -226,7 +194,7 @@ if ($template_id=='rss')
$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);
@@ -238,7 +206,7 @@ if ($template_id=='rss')
{
$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);
}
}
@@ -251,7 +219,7 @@ if ($template_id=='rss')
$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')
@@ -272,7 +240,7 @@ if ($template_id=='rss')
{
$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);
}
@@ -291,11 +259,11 @@ if (($permissions['r']) || ($event != 'register')) {
//performing node_events (based on update/insert/delete db queries)
if ($event) {
- require(SYSTEM_ROOT.'inc/eventz.inc');
+ require(INCLUDE_DIR.'eventz.inc');
}
elseif ($transaction) {
- require(SYSTEM_ROOT.'inc/transaction.inc');
+ require(INCLUDE_DIR.'transaction.inc');
}
//end of performing node events
@@ -314,7 +282,7 @@ if ($_SESSION['user_id']) {
//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;
@@ -361,7 +329,7 @@ elseif (!$permissions['r'] && $_GET['magic_word']) {
else {
- log::log('enter',$node['node_id'],'failed');
+ $log->log('enter',$node['node_id'],'failed');
}
@@ -422,11 +390,6 @@ if ($node['node_system_access']=='crypto') {
$smarty->assign('crypto_pass',$_SESSION['crypto'][$node['node_id']]);
}
-//hlaska
-//$error .= "ocakavajte planovany vypadok okolo 6 hodiny
-//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']);