<!--
Copyright by Thomas Bley 2002-2003
thomas.bley@simple-groupware.de

http://www.simple-groupware.de
-->
<html>
<head>
	<title>Webmail by Thomas Bley - Simple Groupware Solutions - more.groupware</title>
    <meta http-equiv="content-type" content="text/html; charset={$charset}">
	<link rel="SHORTCUT ICON" href="{$imgpathmaster}/favicon.ico">
	<link rel="icon" href="{$imgpathmaster}/favicon.ico" type="image/ico">
<style type="text/css">
{literal}
<!--
body { scrollbar-face-color: #E4E4E4; scrollbar-shadow-color: #000000;scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #999999;scrollbar-darkshadow-color: #999999; scrollbar-track-color: #F3F3F3;scrollbar-arrow-color: #000000;
    BORDER-LEFT:#434343 1px solid;
}
td {  font-family: Arial, Helvetica,sans-serif; font-size: 10pt; font-variant: normal; text-transform: none; color: #000000}
a:hover {  color: #CC0000; text-decoration: underline}

a.important {  color: #CC0000; }
a.work {  color: #EE7700; }
a.personal {  color: #009900; }
a.todo {  color: #3333FF; }
a.later {  color: #888888; }

.styletextbox {  font-family: Arial, Helvetica, sans-serif; font-size: 9pt; width: 200px; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.submit {
    background:#D1D1D1;
    color:#333333;
    font-size:8pt;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-weight:bold;
}
.readr{
background-color: #D1D1D1;
color: #4E4E4E;
border-width: 0;
font-family: Arial, Helvetica,sans-serif;
font-size: 10pt;
font-variant: normal; 
font-weight: bold;
}
-->
{/literal}
</style>

<script type="text/javascript" language="JavaScript" src="templates/default/js/maillist.js"></script>

<script language="JavaScript">
{literal}

function deletesubmit() {
  if (document.testform && marked_count > 0) {
{/literal}
{$confirmdelete}
{literal}
      document.testform.action="maillist_modify.php?todo=delete";
      document.testform.submit();
{/literal}
{$confirmdelete2}
{literal}
	} else {
{/literal}
	  window.status='{$hashmap.maillist_nomailwasmarked}';
{literal}
	}
  }

{/literal}

var mbox_id = {$mbox_id};
var account = {$account};
var nomail_in_view = '{$hashmap.top_nomailinview|addslash}';
var session='{$SESSION}';
var highlighted = new Array({$highlighted});
var messagecount = {$messagecount};
var messagecount2 = {$messagecount_unread};

if ('{$reload}' != '' && '{$reload}' != 'fulltree') modify_treeframe(account,{if $reload neq ''}{$reload}{else}0{/if},{$second_messagecount},{$second_messagecount_unread});
if ('{$searchin}' == '') modify_treeframe(account,mbox_id,{$messagecount},{$messagecount_unread});
if ('{$reload}' == 'fulltree') reload_treeframe();
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" link="#1F4687" vlink="#1F4687" alink="#1F4687" onload="highlight_firstframe({$firstdataset});" bgcolor="#F3F3F3">
<noscript>Please enable javascript on your browser.</noscript>

<center>
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="98%"><tr><td>
<script>
document.write('<img src="templates/default/media/spacer.gif" width="1" height="'+return_height()+'">');
</script>
</td><td valign="top">

<img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="testform" action="maillist.php" method="post">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">			
<input type="Hidden" name="mbox_id" value="{$mbox_id}">
<input type="Hidden" name="account" value="{$account}">
<input type="Hidden" name="msg_begin" value="{$msg_begin}">
<input type="Hidden" name="searchfor2" value="">
<input name="folderto" value="" type="hidden">
<tr bgcolor="#D1D1D1"><td nowrap width="35%" nowrap>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td nowrap>&nbsp;<font color="#4E4E4E"><b> {$username} -&nbsp;</b></font></td>
        <td nowrap width="100%"><p class="readr" id="fielddesc{$mbox_id}">{$mboxname}&nbsp;</p></td>
    </tr>
    </table>
</td>
<td valign="middle" nowrap>

{if $account==0}
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="font-size: 10px; color: #333333" nowrap>{$hashmap.maillist_search_for}&nbsp;</td>
<td><input value="{$searchfor}" name="searchfor" type="Text" style="font-size: 10px; width: 100px"></td>
<td style="font-size: 10px; color: #333333">&nbsp;in&nbsp;</td>
<td>
<select name="searchin" style="font-size: 11px;">
    <option value="this" {if $searchin eq "this"}selected{/if}>{$hashmap.maillist_search_this_folder}
    <option value="local" {if $searchin eq "local"}selected{/if}>{$hashmap.maillist_search_local_folder}
    <option value="public" {if $searchin eq "public"}selected{/if}>{$hashmap.maillist_search_public_folder}
</select>
</td>
<td><input onclick="searchsubmit();" type="Button" value="{$hashmap.top_ok}" class="submit" style="font-size: 11px;"></td>
<td>
{if $searchfor neq ""}
<input onclick="testform.searchfor2.value='reset'; searchsubmit();" type="Button" value="{$hashmap.top_cancel}" class="submit" style="font-size: 11px;">
{/if}
</td>
</tr>
</table>
{/if}

</td>
<td width="5%"></td>
<td valign="middle" align="center" nowrap>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>{$prev_page2|smarty:nodefaults}</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{$next_page2|smarty:nodefaults}</td></tr></table>
</td><td align="right" width="10%" nowrap>{$countwebmails} / {$messagecount}&nbsp;</td></tr></table>
<img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>

<table width="100%">
<tr>
  <td width="3%" bgcolor="#D1D1D1" colspan="4" nowrap>
  <table cellspacing="0" cellspacing="0" border="0" width="100%"><tr>
    <td style="font-size: 11px" nowrap>
    &nbsp;<a href="#" onClick="ToggleAll();"><font color="#4E4E4E" id="allbox2"><b>All</b></font></a>
    <input type="hidden" name="allbox" value="checkbox" onClick="ToggleAll();">
    </td>
    <td style="font-size: 11px" nowrap align="right">
        <a href="maillist.php?newsort={$nextsort.messageid}&account={$account}&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$hashmap.maillist_id}</b></font></a>&nbsp;
        {if $ascdesc_pic eq "message_id"}
        <img src="templates/default/media/arrow_{$ascdesc_type}.gif" alt="" width="8" height="7" border="0">
        {/if}
  </td> 
    </tr></table>
  </td> 
  {if $is_draft eq "true"}
  <td width="2%" bgcolor="#D1D1D1" nowrap style="font-size: 11px"></td>
  {/if}
  <td bgcolor="#D1D1D1" style="font-size: 11px">
  	&nbsp;<a href="maillist.php?newsort={$nextsort.subject}&account={$account}&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$hashmap.maillist_subject}</b></font></a>
	{if $ascdesc_pic eq "header_subject"}
    &nbsp;<img src="templates/default/media/arrow_{$ascdesc_type}.gif" alt="" width="8" height="7" border="0">
    {/if}
  </td> 

  <td bgcolor="#D1D1D1">
  <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td style="font-size: 11px">
	&nbsp;<a href="maillist.php?newsort={$nextsort.from}&account={$account}&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$from_to}</b></font></a>
	{if $ascdesc_pic eq "header_from"}
	&nbsp;<img src="templates/default/media/arrow_{$ascdesc_type}.gif" alt="" width="8" height="7" border="0">
	{/if}
  </td>
  <td align="right" style="font-size: 11px">
	{if $account==0}
	{if $sortbyaccount neq ""}
	&nbsp;<a href="maillist.php?newsort2=ac2&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$hashmap.maillist_no_account}</b></font></a>&nbsp;
	{else}
	&nbsp;<a href="maillist.php?newsort2=ac&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$hashmap.maillist_account}</b></font></a>&nbsp;
	{/if}
	{/if}
  </td></tr></table>
  </td> 
  <td bgcolor="#D1D1D1" style="font-size: 11px">
  	&nbsp;<a href="maillist.php?newsort={$nextsort.date}&account={$account}&mbox_id={$mbox_id}&msg_begin={$msg_begin}&{$SESSION}"><font color="#4E4E4E"><b>{$hashmap.maillist_date}</b></font></a>
	{if $ascdesc_pic eq "header_date"}
	&nbsp;<img src="templates/default/media/arrow_{$ascdesc_type}.gif" alt="" width="8" height="7" border="0">
	{/if}
  </td>
  {if $show_size eq 1}
  <td width="8%" bgcolor="#D1D1D1" style="font-size: 11px">
  	&nbsp;<font color="#4E4E4E"><b>{$hashmap.maillist_size}</b></font>
  </td>
  {/if}
</tr>
{if $messagecount neq 0}

{section name=themail loop=$webmails}

{if $webmails[themail][10] neq ""} 

<tr><td colspan="9">
	<img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>
	{$webmails[themail][10]|smarty:nodefaults}:
</td></tr>
{/if}
<tr id="test{$webmails[themail][0]}" bgcolor="#E4E4E4" onclick="re_checkbox({$webmails[themail][0]}); toggle_checkbox({$webmails[themail][0]})" style="{if $webmails[themail][5] eq 1}font-weight : bold;{/if}">
  <td nowrap bgcolor="#E4E4E4" width="7" align="center"><input type="Checkbox" name="chk[]" id="test_chk{$webmails[themail][0]}" value="{$webmails[themail][0]}" onclick="re_checkbox({$webmails[themail][0]});"></td>
  <td nowrap bgcolor="#E4E4E4" width="4" align="center">{if $webmails[themail][7] eq "1"}<img src="templates/default/media/flagged.gif" title="{$hashmap.maillist_flagged_gif}" border="0" width="4" height="11">{else}&nbsp;{/if}</td>
  <td width="16" align="center" colspan="2" nowrap bgcolor="#E4E4E4"><img src="templates/default/media/mail_{$webmails[themail][8]}_{$webmails[themail][9]}_{$webmails[themail][6]}.gif" title="{$webmails[themail][13]}" border="0"></td>
{if $is_draft eq "true"}
  <td bgcolor="#E4E4E4" width="18"><a href="sendmail_mapper.php?account={$account}&mbox_id={$mbox_id}&editmail={$webmails[themail][0]}&{$SESSION}" target="rightframe"><img src="templates/default/media/compose.gif" alt="" width="18" height="18" border="0"></a></td>
{/if}
  <td width="50%" nowrap bgcolor="#E4E4E4"><a title="{$webmails[themail][15]} / {$webmails[themail][16]}" id="link1{$webmails[themail][0]}" class="{$webmails[themail][14]}" onclick="re_checkbox({$webmails[themail][0]}); clickonmail({$webmails[themail][0]},{$webmails[themail][11]});" href="readmessage.php?mbox_id={$mbox_id}&account={$account}&msg_no={$webmails[themail][0]}&{$SESSION}" target="mailview">{$webmails[themail][2]}</a>&nbsp;&nbsp;</td>
  <td width="30%" nowrap bgcolor="#E4E4E4"><a id="link2{$webmails[themail][0]}" class="{$webmails[themail][14]}" onclick="re_checkbox({$webmails[themail][0]}); clickonmail({$webmails[themail][0]},{$webmails[themail][11]});" href="readmessage.php?mbox_id={$mbox_id}&account={$account}&msg_no={$webmails[themail][0]}&{$SESSION}" target="mailview">{$webmails[themail][1]}</a>&nbsp;&nbsp;</td>
  <td width="20%" nowrap bgcolor="#E4E4E4" style="font-weight : normal;" class="">{$webmails[themail][3]}</td>
{if $show_size eq 1}
  <td width="8%" nowrap bgcolor="#E4E4E4" align="right" style="font-weight : normal;">{$webmails[themail][4]}</td>
{/if}
</tr>
{/section}

{else}
<tr>
  <td></td>  <td></td>  <td></td>  <td></td>
{if $is_draft eq "true"}
  <td></td>
{/if}
  <td></td>  <td></td>  <td></td>
{if $show_size eq 1}
  <td></td>
{/if}
</tr>

<tr>
{if $is_draft eq "true"}
  <td colspan="9" align="center">
{else}
  <td colspan="8" align="center">
{/if}
  <img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>
  <b><font color="#304167">{$hashmap.maillist_no_messages}</font></b><br>
  <img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>	  
</td></tr>
{/if}

<tr>
{if $is_draft eq "true"}
  <td colspan="10" align="center">
{else}
  <td colspan="9" align="center">
{/if}
{section name=page loop=$pages}
{$pages[page]|smarty:nodefaults}
{/section}
</td>
</tr>

</table>
</td></tr>
</form>
<div style="visibility: hidden">
<form name="sendmail" action="sendmail_mapper.php" method="post" target="rightframe">
	<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">			
	<input type="Hidden" value="" name="account">
	<input type="Hidden" value="" name="readmessage">
	<input type="Hidden" value="" name="forward">
	<input type="Hidden" value="" name="forwardme">
	<input type="Hidden" value="" name="replyto">
	<input type="Hidden" value="" name="replyto_all">
	<input type="Hidden" value="{$mbox_id}" name="mbox_id">
</form>
</div>
</table>
</center>

</body>
</html>
