Magellan Linux

Contents of /alx-src/branches/alx-web-070/loc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13246 - (show annotations) (download)
Wed Jul 10 08:54:18 2019 UTC (4 years, 9 months ago) by niro
File size: 1787 byte(s)
-fixed more php warnings
1 <?
2
3 include('include/basesql.php');
4
5 if(isset($_GET['location'])) $data = sqlfirst('SELECT rsync,repository,updateserver,username FROM client_locations WHERE location=\''.redir(stripslashes($_GET['location'])).'\'');
6 else $data=NULL;
7
8 if($data==null) exit;
9
10 if(isset($_POST['do_upload']))
11 {
12 $data = array( 'updateserver'=>$_POST['s_updateserver'],
13 'username'=>$_POST['s_username'],
14 'password'=>$_POST['s_password'],
15 'rsync'=>$_POST['s_rsync'],
16 'repository'=>$_POST['s_repository']);
17 if($data['password']=='KEEPPASS') unset($data['password']);
18 mysqli_query($DBCONN,'UPDATE client_locations SET '.updatestr($data).' WHERE location=\''.redir(stripslashes($_GET['location'])).'\'');
19 }
20
21 ?>
22
23 <head>
24 <title>ALX Config</title>
25 <style>
26 body,table { font-family:Tahoma; font-size:8pt }
27 a { color:#000000; text-decoration:none; }
28 input { font-size:8pt; font-family:Tahoma }
29 </style>
30 </head>
31 <body>
32 <form action="" method="post">
33 <input type="hidden" name="do_upload" value="1" />
34 <table>
35 <tr> <td colspan="2" style="font-size:10pt"><b>[location_<? echo stripslashes($_GET['location']); ?>]</b> </td></tr>
36 <tr> <td>rsync =</td> <td><input name="s_rsync" value="<? echo $data['rsync']; ?>" /></td> </tr>
37 <tr> <td>repository =</td> <td><input name="s_repository" value="<? echo $data['repository']; ?>" /></td> </tr>
38 <tr> <td width="100">updateserver =</td> <td><input name="s_updateserver" value="<? echo $data['updateserver']; ?>" /></td> </tr>
39 <tr> <td>username =</td> <td><input name="s_username" value="<? echo $data['username']; ?>" /></td> </tr>
40 <tr> <td>password =</td> <td><input name="s_password" value="KEEPPASS" type="password" /></td> </tr>
41 <tr> <td colspan="2" align="right"><input type="submit" value="SAVE"></td></tr>
42 </table>
43 </form>
44 </body>