Jeste jednou trasovani
[mirrors/Kyberia-bloodline.git] / scripts / hysteria.php
CommitLineData
b42b2bf9
H
1<?php
2require('../config/config.inc');
3
4//connecting to database and creating universal $db object
5require(SYSTEM_ROOT.'/inc/log.inc');
6require(SYSTEM_ROOT.'/inc/database.inc');
7require(SYSTEM_ROOT.'/inc/nodes.inc');
8$db=new CLASS_DATABASE();
9
10 $fd=fopen("hysteria.logins",'r');
11 while(!feof($fd)) {
12 $data=fread($fd, 4096);
13}
14$array=explode("\n",$data);
15
16foreach ($array as $login) {
17 $result=$db->query("select user_id from users where login='$login'");
18 if (!$result->getNumRows()) {
19 $db->query("insert into nodes set node_name='$login',node_type='7',node_parent='102',node_thread_vector=';1;102'");
20 $id=$db->getLastInsertId();
21 $db->query("insert into node_content set node_id='$id',node_content='hysteria user $login'");
22 $db->query("insert into users set login='$login',user_id='$id'");
23 }
24 else {
25 echo "duplicitny $login \n<br>";
26 }
27}
28
29?>
This page took 0.304416 seconds and 4 git commands to generate.