~eventum-developers/eventum/trunk

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{include file="header.tpl.html"}

{if $result_msg != ''}
<br />
<center>
  <span class="default">
{if $result_msg == -1}
  <b>{t}An error occurred while trying to run your query{/t}</b>
{elseif $result_msg == 1}
  <b>{t}Thank you, the emails were {if $smarty.post.cat == 'remove'}removed{else}restored{/if} successfully{/t}</b>
{/if}
  </span>
</center>
<script type="text/javascript">
<!--
opener.location.href = opener.location;
setTimeout('window.close()', 2000);
//-->
</script>
{else}
<br />
<table width="100%" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td>
      <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2">
        <tr>
          <td class="default">
            <b>{t}Removed Emails{/t}</b>
          </td>
        </tr>
        <tr>
          <td>
            {literal}
            <script type="text/javascript">
            <!--
            function validateForm(f)
            {
                if (!hasOneChecked(f, 'item[]')) {
                    alert('{/literal}{t escape=js}Please choose which emails need to be restored.{/t}{literal}');
                    return false;
                }
                f.submit();
            }
            function removeEmails(f)
            {
                if (!hasOneChecked(f, 'item[]')) {
                    alert('{/literal}{t escape=js}Please choose which emails need to be permanently removed.{/t}{literal}');
                    return false;
                }
                if (!confirm('{/literal}{t escape=js}WARNING: This action will permanently remove the selected emails from your email account.{/t}{literal}')) {
                    return false;
                } else {
                    f.cat.value = 'remove';
                    f.submit();
                }
            }
            //-->
            </script>
            {/literal}
            <form method="post" action="{$smarty.server.PHP_SELF}">
            <input type="hidden" name="cat" value="restore">
            <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2">
              <tr>
                <td width="1%" bgcolor="{$cell_color}">
                  <input type="button" value="{t}All{/t}" class="shortcut" onClick="javascript:toggleSelectAll(this.form, 'item[]');">
                </td>
                <td bgcolor="{$cell_color}" class="default_white">{t}Date{/t}</td>
                <td bgcolor="{$cell_color}" width="20%" class="default_white">{t}From{/t}</td>
                <td bgcolor="{$cell_color}" width="50%" class="default_white">{t}Subject{/t}</td>
              </tr>
              {section name="i" loop=$list}
              {cycle values=$cycle assign="row_color"}
              <tr>
                <td width="1%" align="center" bgcolor="{$row_color}">
                  <input type="checkbox" name="item[]" value="{$list[i].sup_id}">
                </td>
                <td align="center" bgcolor="{$row_color}" class="default" nowrap>
                  {$list[i].sup_date}
                </td>
                <td bgcolor="{$row_color}" width="20%" class="default">
                  {$list[i].sup_from|escape:"html"}
                </td>
                <td bgcolor="{$row_color}" width="50%" class="default">
                  {$list[i].sup_subject|escape:"html"}
                </td>
              </tr>
              {sectionelse}
              <tr>
                <td colspan="4" bgcolor="{$light_color}" class="default" align="center">
                  <i>{t}No emails could be found.{/t}</i>
                </td>
              </tr>
              {/section}
              <tr>
                <td bgcolor="{$cell_color}" width="1%" align="center">
                  <input type="button" value="{t}All{/t}" class="shortcut" onClick="javascript:toggleSelectAll(this.form, 'item[]');">
                </td>
                <td colspan="3" bgcolor="{$cell_color}">
                  <input type="button" class="button" value="{t}Restore Emails{/t}" onClick="javascript:validateForm(this.form);">
                  <input type="button" class="button" value="{t}Close{/t}" onClick="javascript:window.close();">
                </td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="{$dark_color}" align="left">
                  <input type="button" class="button" value="{t}Permanently Remove{/t}" onClick="javascript:removeEmails(this.form);">
                </td>
              </tr>
            </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br />
{include file="app_info.tpl.html"}
{/if}

{include file="footer.tpl.html"}