Develop and Download Open Source Software

Browse Subversion Repository

Contents of /webmail.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35 - (show annotations) (download) (as text)
Wed May 21 08:48:43 2008 UTC (16 years ago) by ktym9814
File MIME type: application/x-httpd-php
File size: 2027 byte(s)
session切れ警告の対応をしてみたつもり
1 <?php
2 require("functions/header.php");
3 require_once("config.inc");
4 require_once("functions/pagelink.class.php");
5 require_once("functions/imap.class.php");
6 session_start();
7 session_cache_limiter('private_no_expire');
8 $session_id=session_id();
9 $session_name=session_name();
10
11
12 /*****************************
13 Initial Settings
14 ******************************/
15
16 if (isset($_REQUEST["username"])){ // priority(request > session)
17 $UserName = $_REQUEST["username"];
18 $PassWord = $_REQUEST["password"];
19 }else{
20 $UserName = $_SESSION["username"];
21 $PassWord = $_SESSION["password"];
22 }
23 $_SESSION["username"]=$UserName;
24 $_SESSION["password"]=$PassWord;
25
26 if(isset($_REQUEST["mailbox"])){
27 $_SESSION["mailbox"]=$_REQUEST["mailbox"];
28 $mailbox = $_REQUEST["mailbox"];
29 }elseif(isset($_SESSION["mailbox"])){
30 $mailbox=$_SESSION["mailbox"];
31 }else{
32 $mailbox="INBOX";
33 }
34
35 #view page set to session
36 if(isset($_REQUEST['page'])){
37 $page=$_REQUEST['page'];
38 } else {
39 $page=1;
40 }
41 $_SESSION['page']=$page;
42
43 /*****************************
44 imap connect and get imap resource
45 ******************************/
46
47 $imap = new IMAP($UserName,$PassWord);
48 $imap->connect($mailbox);
49 $MC=$imap->check();
50 $msg_num=$MC->Nmsgs;
51
52 $pagelink_class = new PageLink($page,$msg_num);
53 $first_uid=$pagelink_class->getShowStartId();
54 $end_uid=$pagelink_class->getShowEndId();
55
56 $result = $imap->fetch_overview($first_uid,$end_uid);
57 $folders= $imap->imaplist("*");
58 $imap->close();
59
60
61 ?>
62
63 <?php print_header(); ?>
64 <BODY>
65 <h3><?php echo get_word('msg_list'); ?></h3>
66 <?php echo print_folder($folders,$mailbox,$session_name,$session_id); ?>
67 <br>
68 <?php echo $pagelink_class->showPageLink(); ?>
69 <br>
70 <h4><?php echo "$first_uid"; ?><?php echo get_word('count'); ?> - <?php echo "$end_uid"; ?>
71 <?php echo get_word('count'); ?>(<?php echo get_word('total'); ?> <?php echo "$msg_num";?> <?php echo get_word('count'); ?>)</h4>
72 <hr>
73 <?php echo print_subjects($result,$session_name,$session_id); ?>
74 <a href='index.php'><?php echo get_word('logout_button'); ?><a>
75 </body>
76 </html>

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26