!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/python-nevow/examples/formbuilder/   drwxr-xr-x
Free 129.74 GB of 142.11 GB (91.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     formbuilder.py (2.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
## formbuilder

from zope.interface import implements

from nevow import rend
from nevow import loaders
from nevow import tags as T
from nevow import util

from formless import annotate
from formless import webform
from formless import configurable

from twisted.python import reflect


class BuilderCore(configurable.Configurable):
    def __init__(self):
        configurable.Configurable.__init__(self, None)
        self.formElements = []

    def getBindingNames(self, ctx):
        return ['form']

    def bind_form(self, ctx):
        return annotate.MethodBinding(
            'action',
            annotate.Method(arguments=self.formElements))

    def action(self, **kw):
        print "ACTION!", kw

    def addElement(self, name, type):
        self.formElements.append(
            annotate.Argument(name, type()))


allTypes = [annotate.String, annotate.Text, annotate.Integer, annotate.Real, annotate.Password]
typeChoice = annotate.Choice(choices=allTypes, valueToKey=reflect.qual, keyToValue=reflect.namedAny, stringify=lambda x: x.__name__)


class IFormBuilder(annotate.TypedInterface):
    def addElement(name=annotate.String(required=True), type=typeChoice):
        """Add Element
        
        Add an element to this form.
        """
        pass
    addElement = annotate.autocallable(addElement)

    def clearForm():
        """Clear Form
        
        Clear this form.
        """
    clearForm = annotate.autocallable(clearForm)
        

class FormBuilder(rend.Page):
    implements(IFormBuilder)
    addSlash = True

    def __init__(self):
        rend.Page.__init__(self)
        self.clearForm()

    def configurable_formBuilder(self, ctx):
        return configurable.TypedInterfaceConfigurable(self)

    def configurable_dynamicForm(self, ctx):
        return self.builderCore

    def addElement(self, name, type):
        self.builderCore.addElement(name, type)

    def clearForm(self):
        self.builderCore = BuilderCore()

    docFactory = loaders.stan(T.html[
    T.head[
        T.title["Form builder!"]],
        T.style(type="text/css")[
            open(util.resource_filename('formless', 'freeform-default.css')).read()],
    T.body[
        T.h1["Welcome to form builder"],
        webform.renderForms('formBuilder'),
        T.h2["Here is your form:"],
        webform.renderForms('dynamicForm')]])


## Startup glue
from nevow import appserver
from twisted.application import service
from twisted.application import internet

application = service.Application('formbuilder')
internet.TCPServer(8080, appserver.NevowSite(FormBuilder())).setServiceParent(application)


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0203 ]--