Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4682672
delete.inc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
delete.inc
View Options
<
?
php
/*
+-----------------------------------------------------------------------+
| program/steps/addressbook/delete.inc |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005-2007, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Delete the submitted contacts (CIDs) from the users address book |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
$Id$
*/
if
((
$
cid
=
get_input_value
(
'
_cid
'
,
RCUBE_INPUT_POST
))
&&
(
preg_match
(
'
/
^
[
0
-
9
]
+
(,[
0
-
9
]
+
)
*
$
/
'
,
$
cid
)
||
preg_match
(
'
/
^
[
a
-
zA
-
Z0
-
9
=
]
+
(,[
a
-
zA
-
Z0
-
9
=
]
+
)
*
$
/
'
,
$
cid
))
)
{
$
deleted
=
$
CONTACTS
-
>
delete
(
$
cid
);
if
(
!$
deleted
)
{
// send error message
exit
;
}
// count contacts for this user
$
result
=
$
CONTACTS
-
>
count
();
// update message count display
$
OUTPUT
-
>
set_env
(
'
pagecount
'
,
ceil
(
$
result
-
>
count
/
$
CONTACTS
-
>
page_size
));
$
OUTPUT
-
>
command
(
'
set_rowcount
'
,
rcmail_get_rowcount_text
(
$
result
-
>
count
));
// add new rows from next page (if any)
$
pages
=
ceil
((
$
result
-
>
count
+
$
deleted
)
/
$
CONTACTS
-
>
page_size
);
if
(
$
_GET
[
'
_from
'
]
!
=
'
show
'
&&
$
pages
>
1
&&
$
CONTACTS
-
>
list_page
<
$
pages
)
rcmail_js_contacts_list
(
$
CONTACTS
-
>
list_records
(
null
,
-
$
deleted
));
// send response
$
OUTPUT
-
>
send
();
}
exit
;
?
>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, May 1, 2:07 PM (1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
635640
Default Alt Text
delete.inc (1 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment