Added inc/getTemplate.inc - i will use this for loading templates directly from DB
authorHarvie <tomas@mudrunka.cz>
Mon, 29 Nov 2010 00:20:48 +0000 (01:20 +0100)
committerHarvie <tomas@mudrunka.cz>
Mon, 29 Nov 2010 00:20:48 +0000 (01:20 +0100)
wwwroot/inc/getTemplate.inc [new file with mode: 0644]

diff --git a/wwwroot/inc/getTemplate.inc b/wwwroot/inc/getTemplate.inc
new file mode 100644 (file)
index 0000000..00269c9
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+function getTemplate($add_template_id) {
+
+        global $db,$error,$node, $error_messages;
+
+        if (!is_numeric($add_template_id)) {
+            $error = $error_messages['NOT_NUMERIC'];
+            return false;
+        }
+
+                               /*
+        //logging of every template for security reasons
+        $params['node_creator'] = UBIK_ID;
+        $params['node_parent'] = 2029360;
+        $params['node_name'] = "addTemplate execute: node $add_template_id";
+        $params['node_content'] = mysql_real_escape_string("addTemplate execute: node <a href='$add_template_id'>$add_template_id</a> by user ".$_SESSION['user_name']);
+        nodes::addNode($params);
+                               */
+
+        if(!($set=$db->query("select node_content from nodes where node_id='$add_template_id'"))) return false;
+        $set->next();
+        return stripslashes($set->getString('node_content'));
+}
This page took 0.096576 seconds and 4 git commands to generate.