2 //requiring main config file with path/database etc. constants
3 require('../config/config.inc');
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");
12 $q="select node_id,node_content from node_content order by node_id";
15 while ($set->next()) {
16 $node_content=$set->getString('node_content');
17 $new_content=preg_replace_callback("/(http:\/\/www.kyberia.sk\/([a-zA-Z]*).php)?\?(action=([a-zA-Z]*))?\&(node_id=([0-9]*))?(\&alone=([0-9]*))?/i","changeRegExp",$node_content);
18 if ($new_content!=$node_content) {
19 $node_id=$set->getString('node_id');
20 $new_content=AddSlashes($new_content);
21 $db->query("update node_content set node_content='$new_content' where node_id='$node_id'");
22 echo $node_id." updated<br>";
26 function changeRegExp($match) {
30 $q="select node_id from nodes where node_type='4' and old_id='".$match[8]."'";
33 $id=$s->getString('node_id');
37 if ($match[4]=='forum') {
38 $q="select node_id from nodes where node_type='3' and old_id='".$match[6]."'";
41 $id=$s->getString('node_id');
This page took 0.306964 seconds and 4 git commands to generate.