File: folder-empty.php3

package info (click to toggle)
basilix 1.0.3b-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 828 kB
  • ctags: 206
  • sloc: php: 2,681; sql: 45; makefile: 40; sh: 7
file content (37 lines) | stat: -rw-r--r-- 970 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
+-------------------------------------------------------------------+
| BasiliX - Copyright (C) 2000 Murat Arslan <arslanm@cyberdude.com> |
+-------------------------------------------------------------------+
*/

// Empty the desired folder
// ------------------------------------------------------------------
if($mbox == "") $mbox = "Inbox";

$mbox = imap_utf7_encode(decode_strip($mbox));

// get the values of the user
require("$BSX_LIBDIR/getvals.inc");

// connect to the imap server
require("$BSX_LIBDIR/imap2.inc");

// --
require("$BSX_LIBDIR/mbox.inc");

// -- templates
include("$BSX_HTXDIR/header.htx");
include("$BSX_HTXDIR/menu.htx");

// empty the folder
if($is_js || $confirmed) {
   if(empty_folder($mbox)) $info_msg = $lng->p(178);
   else $err_msg = $lng->p(179);
   include("$BSX_HTXDIR/folders-empty.htx");
}
if(!$is_js && !$confirmed) {
   include("$BSX_HTXDIR/folders-empty-askconfirmation.htx");
}
include("$BSX_HTXDIR/footer.htx");
?>