php require_once fakeman php fake new fakeman require_once kernel syst

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once './fakeman.php';
$fake = new fakeman();
require_once '../kernel/system.php';
$pwd = md5('123');
for($i = 1; $i < 45; $i++){
$pc = rand(22, 40);
for($j = 0; $j < $pc; $j++){
$name = $fake->get_name();
$sname = $fake->gen_surname();
$adr = $fake->get_town() . ', ' . $fake->get_street() . ', ' . $fake->get_dom();
$DB->setTable('pupils')->insert(array(
'class_ID' => $i,
'dateRegister' => date('Y-m-d', mktime(0,0,0, rand(1,11), rand(1,28), 2009 - ceil($i / 4) )),
'name' => $name,
'surname' => $sname,
'patronymic' => $name,
'adresReg' => $adr,
'adresLive' => $adr,
'phoneHome' => $fake->gen_num()
))->setTable('users')->insert(array(
'pupil_ID' => mysql_insert_id(),
'password' => $pwd,
'userGroup_ID' => 4,
'login' => $lname . ' ' . substr($name, 0, 1) . substr($name, 1, 1)
));
}
}
?>