commit | author | age
|
4e17e6
|
1 |
<?php |
T |
2 |
|
|
3 |
/* |
|
4 |
+-----------------------------------------------------------------------+ |
|
5 |
| program/steps/settings/delete_identity.inc | |
|
6 |
| | |
|
7 |
| This file is part of the RoundCube Webmail client | |
|
8 |
| Copyright (C) 2005, RoundCube Dev. - Switzerland | |
30233b
|
9 |
| Licensed under the GNU GPL | |
4e17e6
|
10 |
| | |
T |
11 |
| PURPOSE: | |
|
12 |
| Delete the submitted identities (IIDs) from the database | |
|
13 |
| | |
|
14 |
+-----------------------------------------------------------------------+ |
|
15 |
| Author: Thomas Bruederli <roundcube@gmail.com> | |
|
16 |
+-----------------------------------------------------------------------+ |
|
17 |
|
|
18 |
$Id$ |
|
19 |
|
|
20 |
*/ |
|
21 |
|
|
22 |
$REMOTE_REQUEST = $_GET['_remote'] ? TRUE : FALSE; |
|
23 |
|
|
24 |
if ($_GET['_iid']) |
|
25 |
{ |
d7cb77
|
26 |
$DB->query("UPDATE ".get_table_name('identities')." |
1cded8
|
27 |
SET del=1 |
d7cb77
|
28 |
WHERE user_id=? |
S |
29 |
AND identity_id IN (".$_GET['_iid'].")", |
|
30 |
$_SESSION['user_id']); |
4e17e6
|
31 |
|
T |
32 |
$count = $DB->affected_rows(); |
|
33 |
if ($count) |
|
34 |
{ |
|
35 |
$commands = show_message('deletedsuccessfully', 'confirmation'); |
|
36 |
} |
|
37 |
|
|
38 |
// send response |
|
39 |
if ($REMOTE_REQUEST) |
|
40 |
rcube_remote_response($commands); |
|
41 |
} |
|
42 |
|
|
43 |
|
|
44 |
if ($REMOTE_REQUEST) |
|
45 |
exit; |
|
46 |
|
|
47 |
|
|
48 |
// go to identities page |
|
49 |
$_action = 'identities'; |
|
50 |
|
|
51 |
// overwrite action variable |
|
52 |
$OUTPUT->add_script(sprintf("\n%s.set_env('action', '%s');", $JS_OBJECT_NAME, $_action)); |
|
53 |
?> |