source: github/program/steps/settings/delete_identity.inc @ 4e17e6c

HEADcourier-fixdev-browser-capabilitiespdorelease-0.6release-0.7release-0.8
Last change on this file since 4e17e6c was 4e17e6c, checked in by thomascube <thomas@…>, 8 years ago

Initial revision

  • Property mode set to 100644
File size: 1.7 KB
Line 
1<?php
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                      |
9 | All rights reserved.                                                  |
10 |                                                                       |
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
24if ($_GET['_iid'])
25  {
26  $DB->query(sprintf("UPDATE %s
27                      SET    del='1'
28                      WHERE  user_id=%d
29                      AND    identity_id IN (%s)",
30                     get_table_name('identities'),
31                     $_SESSION['user_id'],
32                     $_GET['_iid']));
33
34  $count = $DB->affected_rows();
35  if ($count)
36    {
37    $commands = show_message('deletedsuccessfully', 'confirmation');
38    }
39
40  // send response
41  if ($REMOTE_REQUEST)
42    rcube_remote_response($commands);
43  }
44
45
46if ($REMOTE_REQUEST)
47  exit;
48
49
50// go to identities page
51$_action = 'identities';
52
53// overwrite action variable 
54$OUTPUT->add_script(sprintf("\n%s.set_env('action', '%s');", $JS_OBJECT_NAME, $_action));
55?>
Note: See TracBrowser for help on using the repository browser.