X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=wwwroot%2Fnodes.php;h=75b613b6737d0adec9b34d6b023442bbc9e4a40a;hb=3c094f62a071292bcedd274d8ca9a402c68da814;hp=a8e01e007dca42845de6312e082a453e927370d0;hpb=41b53a981f7bab0ca17e16fddb72d868311f9ba9;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index a8e01e0..75b613b 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -71,6 +71,8 @@ switch(true) { break; } + + if (!empty($_GET['template_id'])) { $template_id=$_GET['template_id']; } else { @@ -154,6 +156,14 @@ if (!empty($_SESSION['debugging']) && $_SESSION['debugging']) { // DO NOT MESS WITH THIS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //creating neural network +if (preg_match('/id\/(\d+)/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) { + $referer_id=$match[1]; +} elseif (preg_match('/k\/([a-z0-9]{1,7})/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) { + $referer_id=base_convert($match[1], 36, 10); +} elseif (preg_match('/name\/(.*?)\/?$/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) { + $referer_id = nodes::getNodeIdByName($match[1]); +} + $db->update("update nodes set node_views=node_views+1 where node_id='".$node['node_id']."'"); if (isset($referer_id) && is_numeric($referer_id)) { $q="update neurons set synapse=synapse+1 where dst='".$node['node_id']."' and src='$referer_id'";