Changeset 197
- Timestamp:
- 09/15/07 01:53:48 (16 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
includes/sites/forward_view.php (modified) (4 diffs)
-
templates/forward_view.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/sites/forward_view.php
r142 r197 26 26 $access_domain ) 27 27 { 28 // modify the smtp postfix classes: 29 if (isset($_POST['forwarding_options']) && check_domain_feature($_GET['did'], 'p_check_grey') && $config['recipient_classes_grey']) { 30 if (isset($_POST['check_grey']) && $_POST['check_grey'] == "enable") { 31 $sql=sprintf("UPDATE forwardings SET p_check_grey=1 WHERE id='%d'", 32 $db->escapeSimple($_GET['id'])); 33 } 34 else { 35 $sql=sprintf("UPDATE forwardings SET p_check_grey=0 WHERE id='%d'", 36 $db->escapeSimple($_GET['id'])); 37 } 38 $db->query($sql); 39 } 40 if (isset($_POST['forwarding_options']) && check_domain_feature($_GET['did'], 'p_check_polw') && $config['recipient_classes_polw']) { 41 if (isset($_POST['check_polw']) && $_POST['check_polw'] == "enable") { 42 $sql=sprintf("UPDATE forwardings SET p_check_polw=1 WHERE id='%d'", 43 $db->escapeSimple($_GET['id'])); 44 } 45 else { 46 $sql=sprintf("UPDATE forwardings SET p_check_polw=0 WHERE id='%d'", 47 $db->escapeSimple($_GET['id'])); 48 } 49 $db->query($sql); 50 } 28 51 //del adresses: 29 52 if (isset($_POST['del_addr']) && isset($_POST['etos'])) … … 81 104 $data=$result->fetchrow(DB_FETCHMODE_ASSOC); 82 105 $smarty->assign('forward', $data['efrom']); 106 $smarty->assign('if_check_polw_value', $data['p_check_polw']); 107 $smarty->assign('if_check_grey_value', $data['p_check_grey']); 83 108 $forwards=array(); 84 109 if ( check_multi_forward($data['eto'])=='y') //multipli … … 101 126 sort($forwards); 102 127 103 $sql=sprintf("SELECT dnsname,id FROM domains WHERE id='%s'",128 $sql=sprintf("SELECT dnsname,id,p_check_polw,p_check_grey FROM domains WHERE id='%s'", 104 129 $db->escapeSimple($_GET['did'])); 105 130 $result=&$db->query($sql); … … 107 132 $dnsname=$data['dnsname']; 108 133 $domain_id=$data['id']; 134 $smarty->assign('if_check_polw', $data['p_check_polw']); 135 $smarty->assign('if_check_grey', $data['p_check_grey']); 109 136 110 137 -
trunk/templates/forward_view.tpl
r186 r197 41 41 </td> 42 42 </tr> 43 {if $if_check_polw == 1 && $config.recipient_classes_polw == 1 or $if_check_grey == 1 && $config.recipient_classes_grey == 1} 44 45 {if $if_check_polw == 1 && $config.recipient_classes_polw == 1} 46 <form action="?module=forward_view&id={$id}&did={$did}" method="post"> 47 <tr> 48 <td colspan="2" class="domain_view"><h3>{t 1=$forward}options of %1{/t}</h3></td> 49 </tr> 50 <tr> 51 <td>{t}policyd-weight available{/t}:</td> 52 <td><select name="check_polw" > 53 <option value="enable">{t}yes{/t}</option> 54 {if $if_check_polw_value == 0 } 55 <option value="disable" selected="selected" >{t}no{/t}</option> 56 {else} 57 <option value="disable" >{t}no{/t}</option> 58 {/if} 59 </select></td> 60 </tr> 61 {/if} 62 {if $if_check_grey == 1 && $config.recipient_classes_grey } 63 <tr> 64 <td>{t}greylisting available{/t}:</td> 65 <td ><select name="check_grey"> 66 <option value="enable">{t}yes{/t}</option> 67 {if $if_check_grey_value == 0 } 68 <option value="disable" selected="selected" >{t}no{/t}</option> 69 {else} 70 <option value="disable" >{t}no{/t}</option> 71 {/if} 72 </select></td> 73 </tr> 74 {/if} 75 <tr> 76 <td></td> 77 <td><input type="submit" name="forwarding_options" value="{t}save{/t}"/></td> 78 </tr> 79 </form> 80 81 {/if} 82 83 84 85 43 86 </table> 44 87
