#!/usr/local/bin/perl

use CGI;
use lib ".";
use scripts_base;

# ----------------------------------------------------------------------
# DOCUMENTAION ON THE SYNTAX
# ----------------------------------------------------------------------
# ======================================================================
# ----------------------------------------------------------------------
# Copy this file to create a new script. Remember to change the script 
# name.
#
# the script file name, i.e. this file name. Remember to set it right. I
# don't know if perl has any commmand by which you can tell the script
# file name automatically. Now setting this manually.
# $scriptname = "scripttest.pl";

# the data file name
# $file = "scripttest.txt";

# the title of the page
# $title = "ScriptTest";

# field declaration. The syntax:
# fields=[fieldTitle-type.attr.moreattr],[more fields...]
# Details:
# type : Type of the input field. It can be :
#        text     : Accepts any kind of one liner text input. 
#        textarea : Accepts a two dimentional text area input.
#        file     : Accepts file name to be used to upload an image file.
#                   The uploaded file will be loaded in the directory 
#                   specified by $g_upload_path variable, which is upload by 
#                   default. That is by default the files will be uploaded 
#                   into ~username/cgi-bin/upload dir. So, you must have a 
#                   upload dir under cgi-bin. If you want to upload files in a
#                   different dir, you need to specify it in $g_upload_path.
#                   To specify a image file some where in the web, use
#                   the full url to the image file, including http://.
#        form     : Adds a form with inputs and push button to submit them. 
#                   It has a special format to define
#                   the functionality of this button. 
#                   Here are the currently defined ones :
#                   email : <Button Name>-form[from/to].a
# attr : 'a' means after, i.e. it won't be displayed in the table and only
#        in the detail screen.
#        'b' means before, i.e. it will only be displayed in the table and 
#        not in the detail screen.
#        'ab' it won't be displayed either in the table or the detail screen.
#            The info is just added to the database.
#        'i' or 'ai' makes the text as input filed in the detail window.
#        All the following attributes apply only for text type fields.
#        'e' means email, i.e. it will be treated as an email address.
#        'h' means hypertext. The field which is labeled 'h' will be treated
#            as the Title of the link and the immidiately next field will be
#            used for the URL. For example, Title-text.h:url-text.a . The field
#            containing the url should have attr='a' to make it hidden in the
#            table.
# moreattr : This will allow specifying more attributes. There is a special 
#            behavor for 'a' attribute. If the 1st attr is 'a' then the 2nd or
#            moreattr will be treated as actual attribute for that text.
# $fields = "Name-text,Phone-text,Email-text.e,Details-textarea.a";

# background color
# $bgcolor = "white";

# foreground color
# $fgcolor = "black";

# sort mode. Sorting types are : 
#        'unsort'  - no sorting is done. 
#        'ascend'  - alphabitically sorted in assending order. 
#        'descend' - alphabitically sorted in descending order. 
#        'reverse' - shown in last entered first come order.
#        'random'  - shown in random order evey time.
# $sort = 'ascend';

# supervisor mode. If 1, the script will always login as supervisor and show 
# all edit, delete buttons. If 0 or left blank it will only show add button.
# If 'anybody', cannot get in.
# $supervisor=1;

# noentry mode. If 0, normal users can get into the edit page, otherwise only
# supervisor can.
# $noentry=0;

# password page. If 1, the script will ask for password right at the begining, 
# even before showing the table. If 0, or left blank it will
# show the table with out the password.
# $pass_page=0;

# border option. If 1, there will be border for tables. If 0, there
# will be no border in the tables.
# $border=0;

# Search option.  If 1, will add a search form. If 0, no search will
# be added.
# $search=1;

# Table background color.
# $tbcolor="white";

# linkstyle : If 1, use css link style, else not.
# $linkstyle=1;

# linkcolor : Link color.
# $linkcolor="0080FF";

# alinkcolor : Active link color.
# $alinkcolor="red";

# Image upload path.
# $g_upload_path="upload";
# ----------------------------------------------------------------------
# END DOCUMENTATION
# ----------------------------------------------------------------------




# ======================================================================
# ----------------------------------------------------------------------
########################################################################
# Customize only this section
########################################################################
$scriptname = "bilalmas_interfaith.pl";
$file = "bilalmas_interfaith.txt";
$title = "Interfaith";
$fields = "Venue-text,Date-text,MainFocus-text,Coordinator-text,Email-text.e,Phone-text,Details-textarea.a,Document-file.a.h,Image-file.a";

$bgcolor = "white";
$fgcolor = "black";
$sort = 'reverse';
$supervisor=0;
$noentry=0;
$pass_page=0;
$border=1;
$search=0;
$tbcolor="white";
$linkstyle=1;
$linkcolor="0080FF";
$alinkcolor="red";
$g_upload_path="../upload";
$g_upload_full_path="http://www.bilalmasjid.com/upload";
$user_pass=1;
$background="http://www.bilalmasjid.com/_themes/sumipntg/sumtextb.jpg";
$signup=0;
$header="<br><a href='http://www.bilalmasjid.com/cgi/bilalmas_interfaith_phonebook.pl'><img src='http://www.bilalmasjid.com/phonebook_icon.gif' alt='Phonebook' border=0><b> Phonebook</b></a>";
########################################################################
# ----------------------------------------------------------------------
# END CUSTOMIZE SECTION
# ====================================================================== 






scripts_base->intialize($ENV{'QUERY_STRING'},$scriptname,$file,$title,$fields,$bgcolor,$fgcolor,$sort,$supervisor,$noentry,$pass_page,$border,$search,$tbcolor,$linkstyle,$linkcolor,$alinkcolor,$g_upload_path,$user_pass,$supervisor_email,$update_header,$update_footer,$detail_header,$detail_footer,$add_header,$add_footer,$pass_header,$pass_footer,$header,$footer,$html_head_str,$remote_track,$background,$experiment,$g_upload_full_path,$signup);


