Хранилища Subversion ant

Редакция

Редакция 2 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 2 Редакция 31
1
<?
1
<?
2
2
-
 
3
/**
-
 
4
 * Project:     Ant: sources.list generator
-
 
5
 * File:        sign-check.php
-
 
6
 *
-
 
7
 * This library is free software; you can redistribute it and/or
-
 
8
 * modify it under the terms of the GNU Lesser General Public
-
 
9
 * License as published by the Free Software Foundation; either
-
 
10
 * version 2.1 of the License, or (at your option) any later version.
-
 
11
 *
-
 
12
 * This library is distributed in the hope that it will be useful,
-
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
-
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-
 
15
 * Lesser General Public License for more details.
-
 
16
 *
-
 
17
 * You should have received a copy of the GNU Lesser General Public
-
 
18
 * License along with this library; if not, write to the Free Software
-
 
19
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
 
20
 *
-
 
21
 */
-
 
22
-
 
23
3
include "lib/init.php";
24
include "lib/init.php";
4
25
5
$auth = mysql_real_escape_string($_POST["signName"]);
26
$auth = mysql_real_escape_string($_POST["signName"]);
6
$pass = mysql_real_escape_string($_POST["signPass"]);
27
$pass = mysql_real_escape_string($_POST["signPass"]);
7
28
8
$securepass = md5($pass."ANT");
29
$securepass = md5($pass."ANT");
9
30
10
$query = "SELECT * FROM owner WHERE login='$auth' AND passwd='".$securepass."'";
31
$query = "SELECT * FROM owner WHERE login='$auth' AND passwd='".$securepass."'";
11
32
12
$res =& $db->query($query);
33
$res =& $db->query($query);
13
34
14
if ($res->numRows()!=0) {
35
if ($res->numRows()!=0) {
15
    setcookie($CookieLogin, $auth);
36
    setcookie($CookieLogin, $auth);
16
    setcookie($CookiePasswd, $securepass);
37
    setcookie($CookiePasswd, $securepass);
17
    header("Location: ./admin.php\n\n");
38
    header("Location: ./admin.php\n\n");
18
    $res->free();
39
    $res->free();
19
    exit;
40
    exit;
20
} else {
41
} else {
21
    header("Location: ./oops.php\n\n");
42
    header("Location: ./oops.php\n\n");
22
}
43
}
23
44
24
$db->disconnect();
45
$db->disconnect();
25
46
26
?>
47
?>
27
 
48