| 1 | <?php |
| 2 | //requiring main config file with path/database etc. constants |
| 3 | require('../config/config.inc'); |
| 4 | |
| 5 | //connecting to database and creating universal $db object |
| 6 | require(SYSTEM_ROOT.'/inc/log.inc'); |
| 7 | require(SYSTEM_ROOT.'/inc/database.inc'); |
| 8 | require(SYSTEM_ROOT.'/inc/nodes.inc'); |
| 9 | $db=new CLASS_DATABASE(); |
| 10 | $db_old=new CLASS_DATABASE("kyberia","kyberia","cyb3ry","127.0.0.1"); |
| 11 | |
| 12 | $forumset=$db_old->query("select forum_id from forum where forum_public='private'"); |
| 13 | while ($forumset->next()) { |
| 14 | $old_id=$forumset->getString('forum_id'); |
| 15 | $db->query("update nodes set node_system_access='private' where old_id='$old_id' and node_type='3'"); |
| 16 | } |
| 17 | $forumset2=$db_old->query("select forum_id from forum where forum_public='moderated'"); |
| 18 | while ($forumset2->next()) { |
| 19 | $old_id=$forumset2->getString('forum_id'); |
| 20 | $db->query("update nodes set node_system_access='moderated' where old_id='$old_id' and node_type='3'"); |
| 21 | } |
| 22 | |
| 23 | ?> |