--- alx-src/branches/alx-web-060/loc.php 2011/06/07 13:04:34 2187 +++ alx-src/branches/alx-web-060/loc.php 2011/06/07 13:05:19 2188 @@ -1,19 +1,22 @@ $_POST['s_updateserver'], - 'username'=>$_POST['s_username'], - 'password'=>$_POST['s_password'], - 'rsync'=>$_POST['s_rsync'], - 'repository'=>$_POST['s_repository']); - if($data['password']=='KEEPPASS') unset($data['password']); - mysql_query('UPDATE client_locations SET '.updatestr($data).' WHERE location=\''.redir(stripslashes($_GET['location'])).'\''); - } + +include('include/basesql.php'); +$data = sqlfirst('SELECT rsync,repository,updateserver,username FROM client_locations WHERE location=\''.redir(stripslashes($_GET['location'])).'\''); +if($data==null) exit; + +if($_POST['do_upload']) +{ + $data = array( 'updateserver'=>$_POST['s_updateserver'], + 'username'=>$_POST['s_username'], + 'password'=>$_POST['s_password'], + 'rsync'=>$_POST['s_rsync'], + 'repository'=>$_POST['s_repository']); + if($data['password']=='KEEPPASS') unset($data['password']); + mysql_query('UPDATE client_locations SET '.updatestr($data).' WHERE location=\''.redir(stripslashes($_GET['location'])).'\''); +} + ?> + ALX Config