Kyberia v2.0
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_atom.php
1 <?php
2
3 function smarty_function_get_atom($params,&$smarty) {
4
5 global $db,$node;
6 $node_id=$node['node_id'];
7 if ( preg_match("/(\d+)-(.+)/",$_GET['magic_word'],$mu)) {
8 $magic_uid=$mu['1'];
9 $magic_word=addslashes($mu['2']);
10 $q1="select last_visit from node_access where user_id='$magic_uid' and node_id='$node_id'";
11 $set=$db->query($q1);
12 $set->next();
13 $lv=$set->getString('last_visit');
14
15 $q="select nodes.node_id,node_name,node_content from nodes left join node_content on nodes.node_id=node_content.node_id where nodes.node_parent='$node_id' and node_created>'$lv' order by node_id desc";
16 $set=$db->query($q);
17 }
18 while ($set->next()) {
19 $get_atom[]=$set->getRecord();
20 }
21
22 $smarty->assign('get_atom',$get_atom);
23 }
24 ?>
This page took 0.247724 seconds and 4 git commands to generate.