Commit | Line | Data |
---|---|---|
b42b2bf9 H |
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 | $q="select * from nodes where node_type='3'"; | |
13 | $userset=$db->query($q); | |
14 | while ($userset->next()) { | |
15 | $users[$userset->getString('old_id')]=$userset->getString('node_id'); | |
16 | ||
17 | } | |
18 | ||
19 | foreach ($users as $key => $value) { | |
20 | $dst="/storage/system/www-kyberia/images/nodes/".substr($value,0,1)."/".substr($value,1,1)."/$value.gif"; | |
21 | copy("/storage/system/www-kyberia/images/forums/$key.gif",$dst); | |
22 | } | |
23 | ?> |