[Tutor] returning to my memberlister script

Kirk Bailey idiot1@netzero.net
Sat, 31 Aug 2002 23:34:19 -0400


TLmembershipform.py listing- it generates the form for you, inserting the site relevant information.
Offered just in case anyone wants to see what the receiving script is being babbled at by.
The big idea here is the newbie user does not have to go in and edit the page for site relevant information, the script  includes it automatically. Goal is to make it as easy as possible for marginal users- and them folk in a hurry to get something turned on simple and easy.

ns# list TLmembershipform.py
Listing of file TLmembershipform.py in directory:/www/www.tinylist.org/cgi-bin



#!/usr/local/bin/python
#
# This is TLmemberviewer V:1.4.0 COPYRIGHT 2002 by Kirk D Bailey
#
# It is part of the TinyList MLM suite, released under the GNU GPL.
# which suite is also COPYRIGHT 2002 by Kirk D Bailey.
# Please referr to enclosed GNU license in a seperate file.
#
# Being modular makes for MORE CHOICES AVAILABLE TO YOU!
################################################################################
#           Python can be studied and acquired at http://www.python.org/ !!!
#########1#########2#########3#########4#########5#########6#########7#########8
# that line is 80 char across, try to stay within it if you can.
#
# ADMIN AND LEGAL STUFF:
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#20
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
# You should have received a copy of the GNU General Public License
#30 along with this program; if not, write to:
#
#    Free Software Foundation, Inc.
#    59 Temple Place - Suite 330
#    Boston, MA  02111-1307 USA.
#
# and request one; be cool and include a business sized SASE.
#
# Also, the GNU GPL may be viewed online at
# http://www.gnu.org/licenses/gpl.html
#40############################################################################
#
# "The tyrant's foe, the people's friend, a free press." -Dr Benjamin Franklin.
#
# Think about that last line- this software is your Ezine engine.
###############################################################################
#
#  OWNERSHIP AND PERMISSION ISSUES
#  make sure this script runs as a TRUSTED USER-
#  and NOT as root!!! You set that up in the Sendmail Config file (sendmail.cf).
#50  Make sure that a NON-priviliged user OWNS
#  this script, and that it runs as that identity!
#  Generally, this is accomplished by making sure it is owned by that user.
#  Permission on all scripts must be 755, files as 666, and listdir as 744.
#  The image files must NOT be placed in the cgi-bin, but in the web directory!
###############################################################################
#
#  SPAM
#  Spam SUCKS. It also ROBS everyone it touches, each system it passes through.
#  Fight spam. DO NOT host open lists all the world may post to.
#60  TinyList CANNOT do so as written, PLEASE do not defeat this.
#
#end of preamble ##############################################################
#
#
import os, string       # MUST be invoked!
#
#
#           CONFIGURATION SECTION
#           =====================
#70  we don' need no stinkin configuration, this is a pretty stupid file.
#
#
#
#
#
#
#
#
f1=open("tinylist.cf",'r')      # we hope this simple version will work.
#80
# Tell me little file, who am I?
localhost=string.strip(f1.readline())
f1.close()
#
#
#
#
print "Content-type: text/html \n\n"                                                    # to prim
e the server
print "<html><head><TITLE>TinyList ListOwner's Membership display form</TITLE></head>"
print '<BODY text="000000" bgcolor="FFFFFF"><blockquote><P>'                    #90
print '<P><br><font color="FF0000"><font  size="5"><font face="Century Gothic Light">&nbsp;&nbsp;
TinyList</font></font></font><center><h1>List Membership display request Form</h1><P>'
print '<TABLE BGCOLOR="FFFF00" CELLSPACING="0" CELLPADDING="0" BORDER="10">'
print '<TR><TD><TABLE BGCOLOR="FFFF00" CELLPADDING="0" CELLSPACING="10" BORDER="0">'
print '<FORM METHOD="Get" ACTION="http://www.' + localhost + '/cgi-bin/TLmemberlister.py">'
print '<TR><TD ALIGN="RIGHT">Owner:</TD>'
print '<TD><INPUT TYPE="Text" NAME="Owner" VALUE="?" SIZE="20" MAXLENGTH="33"></TD></TR>'
print '<TR><TD ALIGN="RIGHT">Owner\'s Password</TD>'
print '<TD><INPUT TYPE="Text" NAME="password" VALUE="?" SIZE="16" MAXLENGTH="16"></TD></TR>'
print '<TR><TD ALIGN="RIGHT">ListName:</TD>'
print '<TD><INPUT TYPE="Text" NAME="listname" VALUE="?" SIZE="16" MAXLENGTH="16"></TD></TR>'    #
100
print '<TR ALIGN="CENTER"><TD><INPUT TYPE="Submit" NAME="Submit" VALUE="SUBMIT"></TD>'
print '<TD><INPUT TYPE="Reset" NAME="Reset" VALUE="CLEAR"></TD></TR></form></TABLE>'
print '</TR></TD></TABLE></CENTER><p>'
print 'To inspect your list\'s membership roster, just fill in your pure email address<br>'
print '("<b>me@here.org</b>" for instance, not <b>"me@here.org <"BoB Dobbs"></b>")<br>'
print "this list's PASSWORD, ('<b>foo</b>')<br>"
print "and the LISTNAME you want to inspect ('<b>mylist</b>')<p>"
print "<b> -->DO NOT<-- </b> INCLUDE THE DOMAIN OF THIS SITE in that list name "
print "('mylist@<b>here.org</b>')!"
print '<p><br><small><A href=\"http://www.tinylist.org/\">Powered by TinyList!</a></small><P><br>
'       # 110promoteme!
print "</body></html>"
# end of script.

ns#

The above script generates this page:

<html><head><TITLE>TinyList ListOwner's Membership display form</TITLE></head>
<BODY text="000000" bgcolor="FFFFFF"><blockquote><P>
<P><br><font color="FF0000"><font  size="5"><font face="Century Gothic Light">&nbsp;&nbsp;TinyList</font></font></font><center><h1>List Membership display request Form</h1><P>
<TABLE BGCOLOR="FFFF00" CELLSPACING="0" CELLPADDING="0" BORDER="10">
<TR><TD><TABLE BGCOLOR="FFFF00" CELLPADDING="0" CELLSPACING="10" BORDER="0">
<FORM METHOD="Get" ACTION="http://www.tinylist.org/cgi-bin/TLmemberlister.py">
<TR><TD ALIGN="RIGHT">Owner:</TD>
<TD><INPUT TYPE="Text" NAME="Owner" VALUE="?" SIZE="20" MAXLENGTH="33"></TD></TR>
<TR><TD ALIGN="RIGHT">Owner's Password</TD>
<TD><INPUT TYPE="Text" NAME="password" VALUE="?" SIZE="16" MAXLENGTH="16"></TD></TR>
<TR><TD ALIGN="RIGHT">ListName:</TD>
<TD><INPUT TYPE="Text" NAME="listname" VALUE="?" SIZE="16" MAXLENGTH="16"></TD></TR>
<TR ALIGN="CENTER"><TD><INPUT TYPE="Submit" NAME="Submit" VALUE="SUBMIT"></TD>
<TD><INPUT TYPE="Reset" NAME="Reset" VALUE="CLEAR"></TD></TR></form></TABLE>
</TR></TD></TABLE></CENTER><p>
To inspect your list's membership roster, just fill in your pure email address<br>
("<b>me@here.org</b>" for instance, not <b>"me@here.org <"BoB Dobbs"></b>")<br>
this list's PASSWORD, ('<b>foo</b>')<br>
and the LISTNAME you want to inspect ('<b>mylist</b>')<p>
<b> -->DO NOT<-- </b> INCLUDE THE DOMAIN OF THIS SITE in that list name 
('mylist@<b>here.org</b>')!
<p><br><small><A href="http://www.tinylist.org/">Powered by TinyList!</a></small><P><br>
</body></html>



-- 

end

Respectfully,
             Kirk D Bailey


+---------------------"Thou Art Free." -Eris-----------------------+
| http://www.howlermonkey.net  mailto:highprimate@howlermonkey.net |
| KILL spam dead!      http://www.scambusters.org/stopspam/#Pledge |
| http://www.tinylist.org  +--------+   mailto:grumpy@tinylist.org |
+------------------Thinking| NORMAL |Thinking----------------------+
                           +--------+
-------------------------------------------
Introducing NetZero Long Distance
Unlimited Long Distance only $29.95/ month!
Sign Up Today! www.netzerolongdistance.com