Home

   Home

   Download


Help

   FAQ

   Installation

   Message Board

   Importing Data File
   Into GoldMine
   Into Act


Other

   Testimonies

   Custom Programming

   PHP Version


Other Favorites

   Hire a clean comedian

   Bible Search Engine

   Bible in a Year

   Parallel Bible

   The Richer Life










 





[ Message Board Home ]    [ Post Reply ]    [ Log In ]    [ Sign Up ]



  Subject: sucess.html usefull for calling cleanup script?
  Posted: 11/17/2003 at 1:11:22 pm
  By: crevice

Hello All,

I've got two issues/scenarios for Bizmail to execute.
I'd appreciate -ANY- help and suggestions in getting them done.

---Part One
Want to use the sucess.html file to do the following:

<!--#include virtual="/cgi-bin/cgiwrap/yada/yada/work.pl" -->

If I'm right, this -should- exec the file "work.pl".

My question is this;

Is "success.html" sent before or after the email responses have been sent?
I would -like- work.pl to contain the following maintenence commands:

#!/usr/bin/perl
rm /cgi-bin/cgiwrap/yada/yada/bizmail.dat
cp /cgi-bin/cgiwrap/yada/yada/bizmail.hdr /cgi-bin/cgiwrap/yada/yada/bizmail.dat
chmod 777 /cgi-bin/cgiwrap/yada/yada/bizmail.dat

The "bizmail.hdr" file is a file with the csv headers for my form data.
Bizmail should write a single csv line of output directly underneath them.

---Part Two
I am currently encountering an issue in the csv file produced by this script.
My data is being returned with code in place of the actual punctuation (note: no commas allowed though ;)

How can I make the script/html return the text input without the ":" being replaced with "%3A" or "%26" UTF codes?



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/17/2003 at 3:41:56 pm
  By: Seth Knorr

1. you are sent to the success page configured on your form through the field:
<input type="hidden" name="success_page" value="http://yourdomain.com/...">
Last after all other information is processed through Biz Mail Form, and data is already written to the data file.

2. The easiest way to write to bizmail.hdr is to set it as your data file. Biz Mail Form will automaticaly add the data after the last entry that was made. Just set:
$datafile{"1"} = "bizmail.hdr";
Then use on your html form:
<input type="hidden" name="datafile" value="1">

HOWEVER IF YOU ARE REALY NOT WANTING THE DATA TO BE ADDED TO THE VERY END OF THE FILE, RATHER JUST AFTER THE LAST RESULT, BUT THERE IS MORE DATA AFTER THAT, EX. A FOOTER, THIS WILL NOT WORK.

3. If 2 does not work you could edit bizmail.cgi in which the output file functions start on line 336. However I do not offer support for editing.

4. Your last problem with "%3A" and "%26" I believe has to do with the fact that bizmail.cgi converts " to " and ' to '. This is to preventing formating problems. To get rid of these you could comment out lines 201 & 202.

If this is not it you can look at lines 203 to line 206 which also reformats special un-wanted charachters.

Let me know if you have any questions.

Seth



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/17/2003 at 3:52:21 pm
  By: Seth Knorr

I updated the bizmail.cgi file and re worked some code so you don't have that special characters problem any more. You can re-download the update at:

http://www.bizmailform.com/update/bmf9_3.zip

This will just contain the bizmail.cgi You can reupload this after configuring and you should be all set.

Seth



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/18/2003 at 7:17:09 am
  By: crevice

Ok, another issue. How can I get the mailed attachment to come to -my- email as opposed to the submitter's?

And in relation to the earlier post, please correct me if I am wrong:

Running a SSI (Server Side Include) to execute the maintenance script "work.pl" from "success.html" -will- work effectively (assuming SSI is implemented on the apache box of course). This script will delete the old bizmail.dat file and replace it with a new file just having the headers and chmod it as needed.



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/18/2003 at 7:57:39 am
  By: Seth Knorr

Yes, you could do this but depending on what the scri9pt work.pl does, you will need to run it in either bizmail.cgi or success.cgi. You can not run it in success.html, as this is a non executable file, it would just show up on your page as text.

2. There is realy no way for you to receive the attachment instead of the poster unles you edit bizmail.cgi. 3. What would be the purpose of receiving the attachment per post? is it because you want the data file emailed to you? if so I kinda see what your trying to do, but it is quicker just to open the bizmail.dat file in excell, and open it in a coma delimted format. This will save you loads of time, from having to put each lead together, after every post.

Let me know if you have anything else,

Seth



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/18/2003 at 2:02:43 pm
  By: crevice

Problem is I've got over 459 fields of
data which -must- be in columnar form to work and excel is restricted to 256 columns. The data will be processed on my workstation and must be in this format.



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/18/2003 at 2:53:57 pm
  By: crevice

Okay, the format I have for "work.pl" is as follows:
-----code-----
#!/usr/bin/perl
open (MAIL, "| /usr/sbin/sendmail -t >& /dev/null");
print MAIL qq~To: "crevice" <'crevice\@mindless.net'> From: "form-data" <'crevice\@mindless.net>Subject: New form-data output~;
print MAIL qq~MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="form-data"\n\n~;
print MAIL qq~
--form-data
Content-Type: text/plain; charset=us-ascii\n\n~;
print MAIL qq~new form data~;
print MAIL qq~
--form-data
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="/cgi-bin/cgiwrap/yada/yada/bizmail.dat"\n\n~;
print MAIL qq~
--form-data--
~;
print MAIL qq~\n.~;
close(MAIL);



unlink (/cgi-bin/cgiwrap/yada/yada/bizmail.dat);

use File::Copy;
copy("/cgi-bin/cgiwrap/yada/yada/email.csv,"/cgi-bin/cgiwrap/yada/yada/bizmail.dat");

chmod(0777,"/cgi-bin/cgiwrap/yada/yada/bizmail.dat");
-----end code----

HOPEFULLY, this should:

1) invoke sendmail to send me the bizmail.dat

2) delete the old bizmail.dat
3) copy the file email.csv (which is the headers file) and rename it to bizmail.dat

and finally:

4) chmod bizmail.dat to 777

Now the question is:
What permissions set will success.html have to have to properly execute the SSI line:

<!--#include virtual="/cgi-bin/cgiwrap/yada/yada/work.pl" -->

?

Any suggestions?

Oh, and BTW, THANKS!



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/18/2003 at 7:28:16 pm
  By: Seth Knorr

1. quick question. Are you running the success.html alone, or through the success.cgi file.

2. If you want to run SSI it would have to be success.shtml, unless your server is configured that way.

3. either way success.html or .shtml can run as 644, and should work.

4. However what you are trying to accomplish above is extra steps. Just open up bizmail.cgi and under/ use:
$datafile{"1"} = "email.csv";

and chmod email.csv to 777

Then just make sure you have hidden form field:
<input type="hidden" name="datafile" value="1">

That should fix your problem, All data will be written to the end of the file, while keeping the header in tact.

And you just cut out the other steps.

Seth



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/19/2003 at 7:29:59 am
  By: crevice

Ok, The problem is I want the email attachment to contain a line of headers such as:

title1,time1,act1,time2,act2,etc.

To do this I propose that:

These "headers" will reside in the "template" filename "email.csv".

email.csv is then copied to the filename "bizmail.dat"

The user runs the form and the data is entered and input to bizmail.

Bizmail will then append to the "bizmail.dat" file all this info to produce a file that looks like this:

title1,time1,act1,time2,act2,etc.
osbourne play,8:00pm,opening,9:00,intermission,etc.

What I need to have happen at this point is for bizmail to:

1) send -me- a copy of the completed "bizmail.dat" file.

2) delete the OLD bizmail.dat file

3) once again copy the "email.csv" file to the filename "bizmail.dat" to await the next user's input.

...and that's pretty much it.

The kicker is that the attachment should only contain ONE user's input on a single line under the headers already there.

I need the file to be generated each time a user submits data and a fresh file each time.

Thanks for your responses!



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/19/2003 at 7:35:24 am
  By: crevice

Regarding the "success.shtml" idea:

Should success.cgi be modified as follows to produce this?

$success_file{"1"} = "success.shtml";

...and are there any other variables that need editing as well?



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/19/2003 at 8:58:44 am
  By: crevice

:Yes, you could do this but
:depending on what the scri9pt work.pl
:does, you will need to run it in
:either bizmail.cgi or success.cgi.

Okay, so using idea behind the code above (msg #7) how might I insert it into success.cgi? I would assume success.cgi needs to be used as this -must- execute AFTER the bizmail.dat has been generated AND emailed!

---Thanks!



  Subject: Re: sucess.html usefull for calling cleanup script?
  Posted: 11/19/2003 at 1:53:57 pm
  By: Seth Knorr

Ok Here is your solution.

Download this update file:

http://www.bizmailform.com/update/bmf_sendfile.zip

You need to be running version 1.9 for it to work.

But upload the: sendmail.cgi to your cgi-bin overwritting the existing one. You should not have to configure this file at all, except for chmoding to 755.

Next, Upload: databiz.csv to your CGI-BIN and chmod to 777. You should be all set, this will send you your results to your email, with the databiz.csv file attached.

Let me know if you have any further questions.

Seth



Reply To This Topic

Subject
Message  
Username
Password
Due to unrelated post's, you must have an
account to post a message. To Sign Up click here.




Copyright 2000-2010 Seth M. Knorr,
BizMailForm.com Forms Processor, All Rights Reserved