#1  
Old 11th April 2007, 14:44
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Lightbulb Anti Spam Forms

Hi,
Im trying to make a form which submits isp_kunde/edit.php to update the spam filter however for some reason my form doent work

Heres the normal form:
Code:
<form action="edit.php" onsubmit="return checkform(this)" method="post" name="myform" target="">
  <table width="100%" border="0" cellspacing="0" cellpadding="10">
              <tr>
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                    <tr> 
                      
            <td></td>
                    </tr>
                    
                    <tr> 
                      
            <td><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td rowspan="3" height="16" width="6" bgcolor="#CCCCCC"><img src="../../design/default/tab/tab_active_l.gif" width="6" height="16"></td>
               <td height="1" bgcolor="#E4E4E4"><img src="../../design/default/tab/x.gif" width="1" height="1"></td>
               <td rowspan="3" width="6" bgcolor="#CCCCCC"><img src="../../design/default/tab/tab_active_r.gif" width="6" height="16"></td>
                  <td rowspan="3" height="16" width="6" bgcolor="#CCCCCC"><img src="../../design/default/tab/tab_active_l.gif" width="6" height="16"></td>
               <td height="1" bgcolor="#E4E4E4"><img src="../../design/default/tab/x.gif" width="1" height="1"></td>
               <td rowspan="3" width="6" bgcolor="#CCCCCC"><img src="../../design/default/tab/tab_active_r.gif" width="6" height="16"></td>
                  <td rowspan="3" height="16" width="6" bgcolor="#EEEEEE"><img src="../../design/default/tab/tab_active_l.gif" width="6" height="16"></td>
               <td height="1" bgcolor="#E4E4E4"><img src="../../design/default/tab/x.gif" width="1" height="1"></td>
               <td rowspan="3" width="6" bgcolor="#EEEEEE"><img src="../../design/default/tab/tab_active_r.gif" width="6" height="16"></td>
                  
                  <td><img src="../../design/default/tab/x.gif" width="1" height="1"></td>
                </tr>
                <tr>
                  <td height="14" bgcolor="#CCCCCC">
                    <div align="center"><a href="javascript:changeDeck(0)" class="link8"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">User & Email</font></a></div>
                  </td><td height="14" bgcolor="#CCCCCC">
                    <div align="center"><a href="javascript:changeDeck(1)" class="link8"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Advanced Settings</font></a></div>
                  </td><td height="14" bgcolor="#EEEEEE">
                    <div align="center"><a href="javascript:changeDeck(2)" class="link8"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Spamfilter & Antivirus</font></a></div>
                  </td>
                  <td height="14"><img src="../../design/default/tab/x.gif" width="1" height="1"></td>
                </tr>
              </table></td>
                    </tr>
                    <tr> 
                      <td bgcolor="#E0E0E0"> 
                        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#E0E0E0">
                          <tr> 
                            <td bgcolor="#EEEEEE"> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="2">
                                <tr> 
                                  <td width="23%">&nbsp;</td>
                                  <td width="77%">&nbsp;</td>
                                </tr>
                                <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Spamfilter:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="checkbox" name="form[user_spamfilter]" value="1" ></td><td class="normal" valign="top"> <a href="#" onClick="javascript:window.open('https://server1.*********:81/multidoc/help/index.php?doctype_id=1014&deck_id=2&element_id=0','hlp','width=300,height=300');"><img src="../../design/default/icons/help14.gif" border="0" height="16" width="14" /></a></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Antivirus:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="checkbox" name="form[antivirus]" value="1" ></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Spam Strategy:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><select name="form[spam_strategy]"  ><option value="accept" SELECTED>accept</option><option value="discard">discard</option></select></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Spam Hits:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="text" name="form[spam_hits]" size="10" maxlength="255" value="5.0" class="text"></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <td colspan="2" class=""><hr noshade size="1"></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Rewrite Subject:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="checkbox" name="form[spam_rewrite_subject]" value="1" ></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Subject:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="text" name="form[spam_subject_tag]" size="30" maxlength="255" value="***SPAM***" class="text"></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <td colspan="2" class=""><hr noshade size="1"></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Use Uribl:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><input type="checkbox" name="form[use_uribl]" value="1" ></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Spam Whitelist:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><textarea name="form[spam_whitelist]" cols="30" rows="10"></textarea></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <td colspan="2" align="center"><table width="95%"><tr><td class="t2" align="left">spam_whitelist_txt</td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
         <td width="31%" class="normal" valign="middle"><nobr><b>&nbsp; Spam Blacklist:</b></nobr></td>
         <td width="69%" class="normal" valign="top"><table><tr><td class="normal" valign="top"><textarea name="form[spam_blacklist]" cols="30" rows="10"></textarea></td><td class="normal" valign="top"></td></tr></table></td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <td colspan="2" align="center"><table width="95%"><tr><td class="t2" align="left">spam_blacklist_txt</td></tr></table></td>
        </tr>
        
                                <tr> 
                                  <td width="23%">&nbsp;</td>
                                  <td width="77%">&nbsp;</td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td height="46">
                        <div align="center">
                <input type="submit" name="speichern" value=" Save " class="button">
                &nbsp;&nbsp; <input type="submit" name="abbrechen" value=" Cancel " class="button" onClick="window.location.href = '../frame_start.php?';return false;">
                &nbsp;&nbsp;&nbsp;<input type="submit" name="abbrechen" value=" Delete " class="button" onClick="window.location.href = 'delete.php?tree_id=27&';return false;" target="_top">
              </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
  <input type="hidden" name="s" value="********">
  <input type="hidden" name="gid_old" value="1">
  <input type="hidden" name="doctype_id" value="1014">
  <input type="hidden" name="next_type" value="">
  <input type="hidden" name="tree_id" value="27">
  <input type="hidden" name="doc_id" value="8">
  <input type="hidden" name="deck_id" value="2">
  <input type="hidden" name="next_deck_id" value="2">
  <input type="hidden" name="next_doctype_id" value="1013">
  <input type="hidden" name="next_tree_id" value="25">
  <input type="hidden" name="caller_tree_id" value="25">
  <input type="hidden" name="fertig" value="1">
</form>

Last edited by alexillsley; 28th August 2007 at 17:36.
Reply With Quote
Sponsored Links
  #2  
Old 11th April 2007, 14:45
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Exclamation

And heres my form

Code:
<form action="edit.php?s=************" method="POST">

<tr><td><b>Anti virus: </b></td>
<td><input type="checkbox" name="form[antivirus]" ></td></tr>


<tr><td><b>Spam Filter: </b></td>
<td><input type="checkbox" name="form[user_spamfilter]" ></td></tr>

<tr><td><b>Spam Strategy: </b></td>
<td><select name="form[spam_strategy]"  ><option value="accept" selected>accept</option>
<option value="discard" >discard</option></select></td></tr>

<tr><td><b>Spam Hits: </b></td>
<td><input type="text" name="form[spam_hits]" size="10" maxlength="255" value="5.0" class="text"></td></tr>

<tr><td><br></br></td></tr>

<tr><td><b>Rewrite Subject: </b></td>
<td><input type="checkbox" name="form[spam_rewrite_subject]"  >

</td>

<tr><td><b>Subject: </b></td>
<td><input type="text" name="form[spam_subject_tag]" size="30" maxlength="255" value="***SPAM***" class="text"></td></tr>

<tr><td><br></br></td></tr>

<tr><td><b>Use URIBL: </b></td>
<td><input type="checkbox" name="form[use_uribl]"  ></td></tr>


<tr><td><b>Spam White List: </b></td>
<td><textarea name="form[spam_whitelist]" cols="30" rows="10"></textarea></td></tr>


<tr><td><b>Spam Blacklist: </b></td>
<td><textarea name="form[spam_blacklist]" cols="30" rows="10"></textarea></td></tr>

<input type="hidden" name="tree_id" value="27">
<input type="hidden" name="doc_id" value="8" >
<input type="hidden" name="next_tree_id" value="25">
<input type="hidden" name="caller_tree_id" value="25">

<input type="hidden" name="gid_old" value="1">
<input type="hidden" name="doctype_id" value="1014">
<input type="hidden" name="next_type" value="">
<input type="hidden" name="deck_id" value="2">
<input type="hidden" name="next_deck_id" value="2">
<input type="hidden" name="next_doctype_id" value="1013">
<input type="hidden" name="fertig" value="1">

<tr><td></td><td><input type="submit" value="Apply Settings"></td></tr>

</table>
</form>
Can you see whats wrong with myne?

All the check boxes dont save

Thanks,
Alex

Last edited by alexillsley; 11th April 2007 at 14:47.
Reply With Quote
  #3  
Old 12th April 2007, 17:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

You must change the form using the form editor under Management.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 13th April 2007, 23:13
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default

I would like to make the form myself
Reply With Quote
  #5  
Old 13th April 2007, 23:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

You can not use the ISPConfig scripts when you do not build the form with the form designer, you will have to write all scripts incl. mysql database handling manually.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 14th April 2007, 02:59
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Exclamation

The form submits to the normal form that handles spam. I have included the nesserary files in that form . And for some reason it doesnt save the checkboxes only the text fields
Reply With Quote
  #7  
Old 14th April 2007, 15:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

I don't know how checkboxes are handled by ISPConfig now, but the problem is that a checkbox is submitted only if it is checked. For example, if a chackbox is checked, it would submit "1". Now you'd expect that it submits "0" if it isn't checked, but that's not the case; nothing gets submitted, as if the checkbox didn't exist.

A workaround would be to use a drop-down menu with the values "No" and "Yes" instead of checkboxes.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 15th April 2007, 21:40
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
 
Smile

Thanks but i got it working with check boxes
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
In ISPconfig whitelist but still seen as spam edge Installation/Configuration 12 5th September 2007 01:30
How to kill spam when spamassassin marks it spam kpimichael Suggest HOWTO 15 6th August 2007 17:44
Forwarded spam mail not discared by antispam filter NETabuse General 7 26th February 2007 21:02
Anti Spam and anti-virus on by default dutchie Tips/Tricks/Mods 1 8th January 2007 23:48
complete spam protection with postfix - howto alexnz Server Operation 1 22nd June 2006 15:06


All times are GMT +2. The time now is 22:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.