!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/children/   drwxr-xr-x
Free 129.75 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:     childrenhtml.py (2.63 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
Simple example of how child resources are located.
"""

from twisted.application import internet
from twisted.application import service

from twisted.python import util

from nevow import appserver
from nevow import loaders
from nevow import rend
from nevow import url


class ChildPage(rend.Page):

    docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_ChildPage.html"))

    def __init__(self, name):
        rend.Page.__init__(self)
        self.name = name

    def child_childOfChild(self, context):
        print "istanzaaa"
        return ChildOfChildPage(self.name)

    def render_name(self, context, data):
        return context.tag[self.name]
    
    def render_link(self, context, data):
        context.fillSlots('childLink', url.here.child('childOfChild'))
        return context.tag


class ChildOfChildPage(rend.Page):

    docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_ChildOfChildPage.html"))

    def __init__(self, parentName):
        rend.Page.__init__(self)
        self.parentName = parentName

    def render_parentName(self, context, data):
        return context.tag[self.parentName]


class RootPage(rend.Page):

    addSlash = True

    docFactory = loaders.xmlfile(util.sibpath(__file__, "childrenhtml_RootPage.html"))

    # A resource that is always called 'foo' and only needs to be created once
    child_foo = ChildPage('foo')

    def child_bar(self, context):
        """A resource that is always called 'bar' but is created per-request
        """
        return ChildPage('bar')

    def childFactory(self, ctx, name):
        """Create and return a child resource where the name is dynamic
        """
        if name in ['1', '2', '3']:
            return ChildPage(name)

    def locateChild(self, ctx, segments):
        """Create and return a dynamically named child resource if child_ or
        childFactory didn't help. However, this time we get the chance to
        consume multiple path segments (inluding the childOfChild link).
        
        Note: locateChild is actually the main resource location API (see
        inevow.IReource) and it is actually rend.Page's implementation of the
        method that provides the child_ and childFactory functionality.
        """

        # Let parent class have a go first
        child, remainingSegments = rend.Page.locateChild(self, ctx, segments)
        if child:
            return child, remainingSegments

        # Consume all remaining path segments for the name
        return ChildPage('/'.join(segments)), []


application = service.Application('children')
internet.TCPServer(8080, appserver.NevowSite(RootPage())).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.0179 ]--