Blame view

generic_data/migration/migrationTest.php 1.1 KB
981cd087   Elena.Budnik   ws transfer modifs
1
2
3
4
5
6
<?php
		define("AMDA_IHM", "../../"); 
		define("DATAPATH", AMDA_IHM."generic_data/");
		define("USERPATH", "/home/budnik/data/");
		
		require_once AMDA_IHM."php/classes/UserWsTransfer.php";
77237fff   Elena.Budnik   if ws param was a...
7
		$user = 'genot';
981cd087   Elena.Budnik   ws transfer modifs
8
9
10
11
12
13
14
15
16
17
18
19
		
		if (!is_dir(USERPATH)) mkdir(USERPATH);
		if (!is_dir(USERPATH.$user)) mkdir(USERPATH.$user); 
		if (!is_dir(USERPATH.$user."/WS")) mkdir(USERPATH.$user."/WS"); 
		if (!is_dir(USERPATH.$user."/TT")) mkdir(USERPATH.$user."/TT");
		if (!is_dir(USERPATH.$user."/DATA")) mkdir(USERPATH.$user."/DATA");
		if (!is_dir(USERPATH.$user."/REQ")) mkdir(USERPATH.$user."/REQ");
		
		$convert = new UserWsTransfer($user); 
		 
		$res = $convert->checkWS();
		if (!$res['success']) exit($res['error']);
77237fff   Elena.Budnik   if ws param was a...
20

981cd087   Elena.Budnik   ws transfer modifs
21
22
23
24
		$res = $convert->transferMyData(); 
		$msg = $res['msg'];
	 
		$res = $convert->transferDerived();
77237fff   Elena.Budnik   if ws param was a...
25
26
27
28
		$msg .= $res['msg'];

		$res = $convert->transferTimeTables();
		$msg .= $res['msg'];
981cd087   Elena.Budnik   ws transfer modifs
29

981cd087   Elena.Budnik   ws transfer modifs
30
31
32
33
34
35
		$res = $convert->transferConditions();
		$msg .= $res['msg'];

// 		$res = $convert->transferRequests();
// 		$msg .= $res['msg'];
 
77237fff   Elena.Budnik   if ws param was a...
36
37
		$res = $convert->transferFilters();
		$msg .= $res['msg'];
981cd087   Elena.Budnik   ws transfer modifs
38
39
40
41


		echo $msg.PHP_EOL;     
?>