Changeset 224

Show
Ignore:
Timestamp:
11/30/07 00:39:35 (13 months ago)
Author:
jonas
Message:
 
Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r220 r224  
    11CpVES 0.11 YYYY-MM-DD - Jonas Genannt - <jonas.genannt@brachium-system.net> 
     2        o Added: internal domainforwarding feature 
    23        o Removed: fetchmail check from create_mailbox_size.pl (wrong) 
    34        o Fixed: recipient classes VIEW 
  • trunk/includes/func.inc.php

    r221 r224  
    256256                        $do="p_spam_fwd"; 
    257257                        break; 
     258                case 'autores': 
     259                        $do="p_autores"; 
     260                        break; 
    258261                default: 
    259262                        return false; 
  • trunk/includes/sites/domain_forward.php

    r223 r224  
    1919if (isset($_SESSION['superadmin']) && 
    2020        isset($_GET['did']) && 
    21         $_SESSION['superadmin']=='1'|| 
    22         $_SESSION['admin']=='1' && 
    23         isset($_GET['did']) && 
    24         $access_domain ) 
     21        $_SESSION['superadmin']=='1') 
    2522{ 
    2623        if (isset($_POST['domains_forward_save'])&& isset($_POST['to_domain']) && is_numeric($_POST['to_domain'])) { 
  • trunk/includes/sites/domain_view.php

    r222 r224  
    155155// del domain_forward from domains_forward 
    156156if (isset($_GET['sub'])&& $_GET['sub']=="do_fwd" && isset($_GET['act']) && $_GET['act']=="del" && 
    157         isset($_GET['do_fwd_id']) && is_numeric($_GET['do_fwd_id'])) { 
     157        isset($_GET['do_fwd_id']) && is_numeric($_GET['do_fwd_id']) && $_SESSION['superadmin']== '1') { 
    158158        $sql=sprintf("DELETE FROM domains_forward WHERE id='%s' AND fr_domain='%s'", 
    159159                $db->escapeSimple($_GET['do_fwd_id']), 
  • trunk/sql_upgrades

    r220 r224  
    185185INDEX ( `fr_domain` ) 
    186186) ENGINE = MYISAM ; 
     187ALTER TABLE `domains` ADD `p_autores` TINYINT( 1 ) NOT NULL DEFAULT '1'; 
    187188 
  • trunk/templates/domain_view.tpl

    r222 r224  
    147147{if $domain_fwd==0} 
    148148<td colspan="4"> 
    149 {t 1=$dnsname}no internal domainforward for %1 configured.{/t}<br/><a href="?module=domain_forward&#038;did={$did}">{t}click here to configure an domainfoward.{/t}</a> 
     149{t 1=$dnsname}no internal domainforward for %1 configured.{/t} 
     150{if $if_superadmin == 1}<br/><a href="?module=domain_forward&#038;did={$did}">{t}click here to configure an domainfoward.{/t}</a>{/if} 
    150151</td> 
    151152</tr> 
     
    158159<tr> 
    159160        <td style="padding-right:15px;">@{$dnsname}</td> 
    160         <td><a href="?module=domain_view&#038;did={$domain_fwd.id}">@{$domain_fwd.dnsname}</a></td> 
    161         <td style="text-align:right;vertical-align:middle;"><a href="?module=domain_view&#038;did={$did}&#038;sub=do_fwd&#038;act=del&#038;do_fwd_id={$domain_fwd.do_id}"><img src="img/icons/delete.png" style="border:0px;" alt="" /></a></td> 
     161        <td> 
     162{if $if_superadmin == 1} 
     163<a href="?module=domain_view&#038;did={$domain_fwd.id}">@{$domain_fwd.dnsname}</a> 
     164{else} 
     165@{$domain_fwd.dnsname} 
     166{/if} 
     167</td> 
     168        <td style="text-align:right;vertical-align:middle;"> 
     169{if $if_superadmin == 1} 
     170<a href="?module=domain_view&#038;did={$did}&#038;sub=do_fwd&#038;act=del&#038;do_fwd_id={$domain_fwd.do_id}"><img src="img/icons/delete.png" style="border:0px;" alt="" /></a> 
     171{/if} 
     172</td> 
    162173</tr> 
    163174{/if} 
     
    169180{foreach from=$table_domain_points item=row} 
    170181<tr> 
    171         <td><a href="?module=domain_view&#038;did={$row.fr_domain}">@{$row.fr_domain_name}</a></td> 
     182        <td> 
     183{if $if_superadmin == 1}<a href="?module=domain_view&#038;did={$row.fr_domain}">@{$row.fr_domain_name}</a> 
     184{else} 
     185@{$row.fr_domain_name} 
     186{/if}</td> 
    172187</tr> 
    173188{/foreach} 
     189 
     190{if $if_superadmin == 1 } 
     191{* superadmin can copy all addresses to the forwarding domains... *} 
     192<tr> 
     193        <td colspan="4" style="text-align:right;"><a href="?module=domain_fwd_copy&#038;did={$did}">{t}copy addresses to forwarding domains{/t}</a></td> 
     194</tr> 
     195{/if} 
     196 
     197 
    174198{/if} 
    175199 
     
    268292 <a href="?module=domain_view&#038;did={$did}&#038;fstate=0&#038;f=webinterface"> 
    269293 <img src="img/icons/button_ok.png" style="border:0px;" title="{t}deactivate CpVES webinterface.{/t}" alt="" /></a> 
     294 {/if}</td> 
     295</tr> 
     296<tr> 
     297 <td>{t}vacation{/t}:</td> 
     298 <td></td> 
     299 <td style="text-align:right;"> 
     300 {if $domain.p_autores == 0  } 
     301 <a href="?module=domain_view&#038;did={$did}&#038;fstate=1&#038;f=autores"> 
     302 <img src="img/icons/button_cancel.png" style="border:0px;" title="{t}activate CpVES vacation.{/t}" alt="" /></a> 
     303 {else} 
     304 <a href="?module=domain_view&#038;did={$did}&#038;fstate=0&#038;f=autores"> 
     305 <img src="img/icons/button_ok.png" style="border:0px;" title="{t}deactivate CpVES vacation.{/t}" alt="" /></a> 
    270306 {/if}</td> 
    271307</tr> 
  • trunk/templates/index_admin.tpl

    r220 r224  
    88        {/if} 
    99</tr> 
    10 {section name=row loop=$table_data} 
     10{foreach item=row from=$table_data} 
    1111<tr bgcolor="{cycle values="$color1,$color2"}"> 
    12         <td style="padding-left:3px;"> 
     12        <td style="padding-left:3px;padding-right:10px;"> 
    1313        <div style="float:left;"> 
    14                 <a href="?module=domain_view&#038;did={$row.id}">{$row.dnsname}</a></div> 
     14        <a href="?module=domain_view&#038;did={$row.id}">{$row.dnsname}</a></div> 
    1515                {if $row.vacation == 1} 
    1616                <div style="float:right;padding:0px;"> 
     
    2121                {/if} 
    2222        </td> 
    23         <td style="text-align:right;">{$table_data[row].count_email}</td> 
    24         <td style="text-align:right;">{$table_data[row].count_forward}</td> 
     23        <td style="text-align:right;">{$row.count_email}</td> 
     24        <td style="text-align:right;">{$row.count_forward}</td> 
    2525        {if $config.display_mb_size == 1 } 
    2626        <td>{$row.mb_size.size} {if $row.mb_size.unit == 'gb'}GB{else}MB{/if}</td> 
    2727        {/if} 
    2828</tr> 
    29 {/section} 
     29{/foreach} 
    3030</table> 
  • trunk/web/index.php

    r221 r224  
    6464                $site="domain_forward"; 
    6565                break; 
     66        case 'domain_fwd_copy': 
     67                $site="domain_fwd_copy"; 
     68                break; 
    6669        case 'list_add': 
    6770                $site="list_add";