clockwerk-www – Diff between revs 68 and 69
?pathlinks?
Rev 68 | Rev 69 | |||
---|---|---|---|---|
Line 54... | Line 54... | |||
54 | foreach($rep->params->param->value->struct->member as $member) { |
54 | foreach($rep->params->param->value->struct->member as $member) { |
|
55 | switch($member->name) { |
55 | switch($member->name) { |
|
56 | case "success": |
56 | case "success": |
|
57 | switch((bool)$member->value->boolean) { |
57 | switch((bool)$member->value->boolean) { |
|
58 | case TRUE: |
58 | case TRUE: |
|
59 | try { |
59 | /* try { |
|
60 | $mysql = new PDO('mysql:host='.$MYSQL_HOSTNAME.';dbname='.$MYSQL_DATABASE.';', $MYSQL_USERNAME, $MYSQL_PASSWORD); |
60 | $mysql = new PDO('mysql:host='.$MYSQL_HOSTNAME.';dbname='.$MYSQL_DATABASE.';', $MYSQL_USERNAME, $MYSQL_PASSWORD); |
|
61 | $mysql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
61 | $mysql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
|
62 | $query = $mysql->prepare("SELECT Name FROM land WHERE OwnerUUID=(SELECT PrincipalID FROM UserAccounts WHERE FirstName=:first AND LastName=:last)"); |
62 | $query = $mysql->prepare("SELECT Name FROM land WHERE OwnerUUID=(SELECT PrincipalID FROM UserAccounts WHERE FirstName=:first AND LastName=:last)"); |
|
63 | $query->bindParam(':first', $first); |
63 | $query->bindParam(':first', $first); |
|
64 | $query->bindParam(':last', $last); |
64 | $query->bindParam(':last', $last); |
|
Line 67... | Line 67... | |||
67 | catch(PDOException $e) { |
67 | catch(PDOException $e) { |
|
68 | print '<p>Sorry, the authenticated agent is not the owner of the region to download.</p>'; |
68 | print '<p>Sorry, the authenticated agent is not the owner of the region to download.</p>'; |
|
69 | goto last; |
69 | goto last; |
|
70 | } |
70 | } |
|
71 | while ($result = $query->fetchObject()) { |
71 | while ($result = $query->fetchObject()) { |
|
72 | if ($result->RegionName == $region) { |
72 | if ($result->RegionName == $region) { */ |
|
73 | if (file_exists($file)) { |
73 | if (file_exists($file)) { |
|
74 | $req->admin_console_command('change region '.$region); |
74 | $req->admin_console_command('change region '.$region); |
|
75 | chmod($file, 0644); |
75 | chmod($file, 0644); |
|
76 | $req->admin_console_command('load oar '.$file); |
76 | $req->admin_console_command('load oar '.$file); |
|
77 | chmod($file, 0600); |
77 | chmod($file, 0600); |
|
78 | echo '<p>OAR uploaded successfully.</p>'; |
78 | echo '<p>OAR uploaded successfully.</p>'; |
|
79 | goto last; |
79 | goto last; |
|
80 | } |
80 | } |
|
81 | } |
81 | /* } |
|
82 | } |
82 | } */ |
|
83 | goto last; |
83 | goto last; |
|
84 | default: |
84 | default: |
|
85 | echo '<p>Sorry, wrong password.</p>'; |
85 | echo '<p>Sorry, wrong password.</p>'; |
|
86 | goto last; |
86 | goto last; |
|
87 | } |
87 | } |