X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=inc%2Fsmarty%2Fnode_methodz%2Ffunction.get_children.php;h=75726787151f69654c96f906967b9421f16e7a69;hb=b42b2bf946332ad8544d53f610be9cb05e80bf56;hp=14f3573d1f3d00b9c611b7a5f7f6e14538c0768a;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/smarty/node_methodz/function.get_children.php b/inc/smarty/node_methodz/function.get_children.php index 14f3573..7572678 100644 --- a/inc/smarty/node_methodz/function.get_children.php +++ b/inc/smarty/node_methodz/function.get_children.php @@ -1,44 +1,44 @@ query($q); - - while ($set->next()) { - $get_children_array[]=$set->getRecord(); - } - - $smarty->assign('get_children',$get_children_array); - } + if ($params['search_type']=='content') $sql_type.=" and node_content like '%".addslashes($params['sea +rch'])."%' "; + else { + $id=nodes::getNodeByLogin($params['search']); + $sql_type=" and nodes.node_creator='$id'"; + } + $q.=$sql_type; + } + if ($children_type=='4' || $params['orderby_type']=='time') $q.=" order by nodes.node_created $orderby limit $offset,$listing_amount"; + else $q.=" order by nodes.template_id,nodes.node_name LIMIT $offset,$listing_amount"; + $set=$db->query($q); + + while ($set->next()) { + $get_children_array[]=$set->getRecord(); + } + + $smarty->assign('get_children',$get_children_array); + } ?>