Commit | Line | Data |
---|---|---|
b42b2bf9 H |
1 | #!/usr/local/bin/php |
2 | <?php | |
3 | require('../config/config.inc'); | |
4 | //connecting to database and creating universal $db object | |
5 | require(SYSTEM_ROOT.'/inc/log.inc'); | |
6 | require(SYSTEM_ROOT.'/inc/database.inc'); | |
7 | require(SYSTEM_ROOT.'/inc/nodes.inc'); | |
8 | $db=new CLASS_DATABASE(); | |
9 | ||
10 | $set=$db->query("select nodes.*,node_content.*,nodes.node_id as node_id from nodes left join node_content on nodes.node_id=node_content.node_id where node_type='14'"); | |
11 | ||
12 | while ($set->next()) { | |
13 | $node_content=$set->getString('node_content'); | |
14 | $template_id=$set->getString('node_id'); | |
15 | $fp = fopen (OWN_TEMPLATE_DIR.$template_id.".tpl", "w+"); | |
16 | fwrite($fp,$node_content); | |
17 | fclose($fp); | |
18 | chown(OWN_TEMPLATE_DIR.$template_id.".tpl","www"); | |
19 | } | |
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 | ?> |