Ignore:
Timestamp:
04/15/11 17:53:45 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Add commented attempt to autolocate the script's full base path

for use lib; commented bits fail due to taint mode. *sigh*

Add ACL checks for domain edit, create, and delete. Generalize

error message handling so that we don't get "Error deleting
domain: You don't have permission to add a domain"-ish messages.

Trim some code after a changepage() call (since it issues a 302

redirect and exits...)

Add ACL checks for record edit, create, and delete. Apply similar

error-message handling fixups as done with domain processing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/reclist.tmpl

    r76 r95  
    55<td align="center" valign="top">
    66
    7  <TMPL_IF del_failed>
    8   <div class='errmsg'>Error deleting record: <TMPL_VAR NAME=errmsg></div>
     7 <TMPL_IF errmsg>
     8  <div class='errmsg'><TMPL_VAR NAME=errmsg></div>
    99 </TMPL_IF>
    1010
     
    4141<tr class="darkrowheader">
    4242        <td colspan="4">Records</td>
    43         <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=new">Add record</a></td>
     43<TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=new">Add record</a></td></TMPL_IF>
    4444        <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=log&amp;id=<TMPL_VAR NAME=id><TMPL_IF logdom>&amp;ltype=dom</TMPL_IF>">View log</a></td>
    4545</tr>
     
    5656 NAME=defrec>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR
    5757 NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP>
    58         <td>Delete</td>
     58<TMPL_IF record_delete> <td>Delete</td></TMPL_IF>
    5959</tr>
    6060<TMPL_LOOP NAME=reclist>
    6161<tr class="row<TMPL_VAR NAME=row>">
    62         <td><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a></td>
     62        <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_ELSE><TMPL_VAR NAME=host></TMPL_IF></td>
    6363        <td><TMPL_VAR NAME=type></td>
    6464        <td><TMPL_VAR NAME=val></td>
     
    6767        <td><TMPL_VAR NAME=port></td>
    6868        <td><TMPL_VAR NAME=ttl></td>
    69         <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;id=<TMPL_VAR NAME=record_id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
     69<TMPL_IF record_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;id=<TMPL_VAR NAME=record_id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
    7070</tr>
    7171</TMPL_LOOP>
Note: See TracChangeset for help on using the changeset viewer.