/*
 * Author       : videochannel
 * Generated on : 23-Nov-2009 00:45:39
 * Version      : 3.0
 */
application "Footy Soccer classifieds"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Toronto"
    section Home
    {
        form  Sell_your_Footy
        {
            displayname  =  "Sell your Footy"
            captcha = true
            success message  =  "Data Added Successfully!"
            
            Date_Time_1
            (
                displayname  =  "Date - Time 1"
                type  =  datetime
            )

            Product_Name
            (
                displayname  =  "Product Name"
                type  =  text
            )

            Footy_Type
            (
                displayname  =  "Footy Type"
                type  =  picklist
                values  =  {"None",   "Art",   "Autographed",   "Balls",   "equipement",   "Jersey New",   "Jersey Used",   "Other Clothes",   "Other Soccer",   "Tickets"}
            )

            Link_to_Product
            (
                displayname  =  "Link to Product"
                type  =  url
                enable   linkname
            )

            City
            (
                type  =  text
            )

            Email_1
            (
                displayname  =  "Email 1"
                type  =  email
            )

            Price
            (
                type  =  USD
                width  =  20
            )

            Product_Pic
            (
                displayname  =  "Product Pic"
                type = upload file
            )

            Product_Details
            (
                displayname  =  "Product Details"
                type  =  textarea
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "supergenius@programmer.net" 
                                From     :  zoho.adminuserid 
                                Subject  :  "product post" 
                                Message  :  input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        summary  Sell_your_Footy_View
        {
            displayname = "Sell your Footy View"
            show  all  rows  from  Sell_your_Footy 
            (
                Product_Name as "Product Name"
                Footy_Type as "Footy Type"
                Price
                Product_Pic as "Product Pic"
                Product_Details as "Product Details"
                Link_to_Product as "Link to Product"
                Date_Time_1 as "Date - Time 1"
                Email_1 as "Email 1"
                City
            )
            filters 
            (
                Footy_Type
                "city"  :  (City is not null)
            )
            options
            (
                display rows = 20
                display records per row = 1
            )
        }

        summary  Footy_Classifieds
        {
            displayname = "Footy Classifieds"
            show  all  rows  from  Sell_your_Footy 
            (
                Product_Name as "Product Name"
                Footy_Type as "Footy Type"
                Price
                Product_Pic as "Product Pic"
                Product_Details as "Product Details"
                Link_to_Product as "Link to Product"
                Date_Time_1 as "Date - Time 1"
                Email_1 as "Email 1"
                City
            )
            filters 
            (
                Footy_Type
            )
            sort by
            (
                Footy_Type   ascending
                City   ascending
            )
            options
            (
                display rows = 100
                display records per row = 1
            )
        }

        grid  Copy_ofSell_your_Footy_View
        {
            displayname = "Copy ofSell your Footy View"
            show  all  rows  from  Sell_your_Footy 
            (
                Product_Name as "Product Name"
                Footy_Type as "Footy Type"
                Price
                Product_Pic as "Product Pic"
                Product_Details as "Product Details"
                Link_to_Product as "Link to Product"
                Date_Time_1 as "Date - Time 1"
                Email_1 as "Email 1"
                City
            )
            filters 
            (
                Footy_Type
            )
            options
            (
                display rows = 20
            )
        }

    }

}
