- if ($params['search_type']=='content') $sql_type.=" and node_content like '%".addslashes($params['search'])."%' ";
- else {
- $id=nodes::getNodeByLogin($params['search']);
- $sql_type=" and nodes.node_creator='$id'";
- }
- $q.=$sql_type;
- }
- if ($children_type=='4') $q.=" order by nodes.node_created desc 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);
- }
+ 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);
+ }