<html>

<head>
<title>Gossamer Links - Payments - Payment Logs</title>
<base target="_self">
</head>

<%if log_id and delete_log%>
  <%Links::Payment::delete_log($log_id)%>
<%endif%>
<%Links::Payment::view_log($log)%>

<body bgcolor="#FFFFFF">
<table border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <table bgColor="#ffffff" border="0" cellPadding="3" cellSpacing="3" width="500" valign="top">
        <tr>
          <td align="left" bgColor="navy"><b><font color="#ffffff" size="2" face="Tahoma,Arial,Helvetica">Payment Logs</font></b></td>
        </tr>
        <tr>
          <td>
            <p align="center"><b><font color="#000000" size="2" face="Tahoma,Arial,Helvetica">Payment Logs</font></b></p>
            <p><font size="2" face="Tahoma,Arial,Helvetica">
              This page displays a log of payment transactions that have occured.<br><br>
              Currently showing logs for
              <%if    log eq 0%><b>general payment information</b>.
              <%elsif log eq 1%><b>accepted payments</b>.
              <%elsif log eq 2%><b>declined payments</b>.
              <%elsif log eq 3%><b>payment errors</b>.
              <%elsif log eq 4%><b>manual payments</b>.
              <%endif%>

            </font></p>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%set font_tag = '<font face="Tahoma,Arial,Helvetica" size="2">'%>
<br>
<table border="0" cellpadding="2" width="100%">
  <tr>
    <td width="100%">
      <%font_tag%>
      <%Links::paging($num_logs, $mh, $page, 5, 'want ...')%>
      <%if page <= 1%>
      <b><small>&lt;&lt; &lt;</small></b>
      <%else%>
      <b>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=1"><small>&lt;&lt;</small></a>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page - 1%>"><small>&lt;</small></a>
      </b>
      <%endif%>
      <%loop paging%>
        <%if is_current_page%><b><%page_num%></b>
        <%else%><a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page_num%>"><%page_num%></a>
        <%endif%>
      <%endloop%>
      <%if dotdotdot%>
        ... <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%top_page%>"><%top_page%></a>
      <%endif%>
      <%if page >= $top_page%>
      <b><small>&gt; &gt;&gt;</small></b>
      <%else%>
      <b>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page + 1%>"><small>&gt;</small></a>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%top_page%>"><small>&gt;&gt;</small></a>
      </b>
      <%endif%>

<%set border_color = "grey"%>
      <table border="0" cellpadding="2" cellspacing="0" style="border: 2px solid <%border_color%>">
        <tr>
          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Link</font></th>
<%if log eq ''%>          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Log Type</font></th><%endif%>
          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Date</font></th>
          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Payment ID</font></th>
          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Viewed</font></th>
          <th align="left" style="border-right: 1px solid <%border_color%>; border-bottom: 2px solid <%border_color%>"><font face="Tahoma,Arial,Helvetica" size="2">Delete</font></th>
          <th align="left" style="border-bottom: 2px solid <%border_color%>" width="200"><font face="Tahoma,Arial,Helvetica" size="2">Message</font></th>
        </tr>
      <%loop logs%>
        <tr>
          <td align="left" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"><a href="<%escape_html URL%>"><%escape_html Title%></a> <small>(<a href="admin.cgi?do=search_results;db=Links;ID=<%ID%>;ID-opt=%3D">details</a>, <a href="admin.cgi?do=modify_search_results;db=Links;ID=<%ID%>;ID-opt=%3D">modify</a>)</small></font></td>
          <%if log eq ''%>          <td align="left" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"<%ifnot paylogs_viewed%> color="blue"<%endifnot%>><%if log eq 0%>Info<%elsif log eq 1%>Accepted<%elsif log eq 2%>Declined<%elsif log eq 3%><font color="red">Error</font><%endif%></font></td><%endif%>
          <td align="left" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"<%ifnot paylogs_viewed%> color="blue"<%endifnot%>><%GT::Date::date_get($paylogs_time, '%ddd% %mmm% %d% %h%:%MM% %tt% %yyyy%')%></font></td>
          <td align="center" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"><a href="admin.cgi?do=page;page=payment_details.html;payment_id=<%payments_id%>"><%payments_id%></a></font></td>
          <td align="center" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"><%if paylogs_viewed%>Yes<%else%><font color="blue">No</font><%endif%></font></td>
          <td align="center" style="border-right: 1px solid <%border_color%><%unless last%>; border-bottom: 1px solid <%border_color%><%endunless%>"><font face="Tahoma,Arial,Helvetica" size="2"><a href="admin.cgi?do=page;page=payment_log.html;log=<%log%>;delete_log=1;log_id=<%paylogs_id%>">x</a></font></td>
          <td align="left"<%unless last%> style="border-bottom: 1px solid <%border_color%>"<%endunless%>><font face="Tahoma,Arial,Helvetica" size="2"<%ifnot paylogs_viewed%> color="blue"<%endifnot%>><%paylogs_text%></font></td>
        </tr>
<%endloop%>
      </table>

      <%if page <= 1%>
      <b><small>&lt;&lt; &lt;</small></b>
      <%else%>
      <b>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=1"><small>&lt;&lt;</small></a>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page - 1%>"><small>&lt;</small></a>
      </b>
      <%endif%>
      <%loop paging%>
        <%if is_current_page%><b><%page_num%></b>
        <%else%><a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page_num%>"><%page_num%></a>
        <%endif%>
      <%endloop%>
      <%if dotdotdot%>
        ... <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%top_page%>"><%top_page%></a>
      <%endif%>
      <%if page >= $top_page%>
      <b><small>&gt; &gt;&gt;</small></b>
      <%else%>
      <b>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%page + 1%>"><small>&gt;</small></a>
        <a href="admin.cgi?do=page;page=payment_log.html;log=<%log_type%>;mh=<%mh%>;pg=<%top_page%>"><small>&gt;&gt;</small></a>
      </b>
      <%endif%>
      </font>
    </td>
  </tr>
</table>

</body>

</html>
