get_user_submissions_children first draft
authorniekt0 <niekt0@kyberia.cz>
Tue, 5 Apr 2011 23:01:36 +0000 (01:01 +0200)
committerniekt0 <niekt0@kyberia.cz>
Tue, 5 Apr 2011 23:01:36 +0000 (01:01 +0200)
wwwroot/inc/smarty/node_methodz/function.get_user_submissions_children.php [new file with mode: 0644]

diff --git a/wwwroot/inc/smarty/node_methodz/function.get_user_submissions_children.php b/wwwroot/inc/smarty/node_methodz/function.get_user_submissions_children.php
new file mode 100644 (file)
index 0000000..8e32075
--- /dev/null
@@ -0,0 +1,32 @@
+<?php\r
+\r
+// Get all the direct replies for user submisions\r
+\r
+function smarty_function_get_user_submissions_children($params, &$smarty) {\r
+\r
+       if (!isset($_SESSION['user_id')\r
+               $user_id = $_SESSION['user_id'];\r
+       else\r
+               return -1;\r
+\r
+       if (!isset($params['listing_amount']))\r
+               $listing_amount = DEFAULT_LISTING_AMMOUNT;\r
+       else\r
+               $listing_amount = $params['listing_amount'];\r
+\r
+       if (empty($params['offset']))\r
+               $offset = 0;\r
+       else\r
+               $offset = $params['offset'];\r
+        \r
+       if (!isset($params['order_by']))\r
+               $order_by = $params['order_by'];\r
+       else\r
+               $order_by = 'node_id';\r
+\r
+       $replies=nodes::GetUserSubmissionsChildren($user_id,$listing_ammount,$offset,$order_by);\r
+\r
+       $smarty->assign('get_user_submissions_children', $replies);\r
+}\r
+\r
+?>\r
This page took 0.142631 seconds and 4 git commands to generate.