le pagine sono generate da un sistema di template fatto in php... ma il file xsl fiene scritto fisicamente sul disco del server... così la pagina che vede il browser è identica ad una statica...

non ci sono ne comandi js ne qualasiasi altro tipo...
non ci sono css... ne tabelle...

solo form input e dei
per separare le righe create dall'xml..


tutto qui...

e puntualmente dopo che invio qualche form (non sempre, ma molte volte) le pagine iniziano a fare capricci...



questo è l'XML
Codice PHP:
<?xml version="1.0" encoding="UTF-8"?>
<?xml
-stylesheet type="text/xsl" href="getxsl.php?s=4xfqrsjznuf5usc008kc808kw_admin_usergroups_manage"?>

<global s="4xfqrsjznuf5usc008kc808kw" bname="OverKontrol" user="Zan">
<usergroups>
<usergroup id="1" title="Non Registrati" pid="0" type="1" num="2" order="1"/>
<usergroup id="2" title="Amministratori" pid="0" type="1" num="0" order="2"/>
<usergroup id="3" title="Members" pid="0" type="1" num="0" order="3"/>
<usergroup id="4" title="Capo 1" pid="0" type="2" num="1" order="1"/>
<usergroup id="5" title="Suddito Capo 1" pid="4" type="2" num="0" order="1"/>
<usergroup id="6" title="Suddito 2 Capo 1" pid="4" type="2" num="0" order="2"/>
<usergroup id="11" title="PROVA FINALE" pid="5" type="2" num="0" order="1"/>
<usergroup id="10" title="asdasdasd" pid="4" type="2" num="0" order="88"/>
<usergroup id="9" title="asdasda" pid="4" type="2" num="0" order="77"/>
<usergroup id="12" title="prova finale 2" pid="0" type="2" num="0" order="11"/>
<usergroup id="13" title="prova suddito finale" pid="12" type="2" num="0" order="111"/>
<usergroup id="14" title="prova noeredity finale" pid="0" type="1" num="0" order="12"/></usergroups>
</global>


mentre questo è l'xsl



Codice PHP:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

<xsl:output method="html" encoding="UTF-8" indent="yes" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" doctype-public="-//W3C//DTD XHTML 1.1//EN"
omit-xml-declaration="no"/>

<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title><xsl:value-of select="/global/@bname"/></title>
</head>
<body>
<div>[url="{/global/@s},index.html"]Admin Home[/url]


[b]Options[/b]

[url="modify,2,{/global/@s},options.html"]Board Status[/url]

[url="modify,3,{/global/@s},options.html"]Basic Options[/url]

[url="modify,4,{/global/@s},options.html"]Sessions[/url]

[url="modify,5,{/global/@s},options.html"]Headers[/url]


[url="modify,23,{/global/@s},options.html"]Url Rewriting[/url]


[url="modify,24,{/global/@s},options.html"]International Sys[/url]


[url="modify,35,{/global/@s},options.html"]Time Settings[/url]


[url="modify,37,{/global/@s},options.html"]Registration[/url]





[b]Users and Groups[/b]

[url="users.php?action=add&amp;id=0&amp;s={/global/@s}"]Add User[/url]

[url="usergroups.php?action=add&amp;id=0&amp;s={/global/@s}"]Add User Group[/url]

[url="usergroups.php?action=manage&amp;id=0&amp;s={/global/@s}"]Manage User Groups[/url]

[url="profilefields.php?action=select&amp;id=0&amp;s={/global/@s}"]Add User Profile Field[/url]

[url="profilefields.php?action=manage&amp;id=0&amp;s={/global/@s}"]Manage User Profile Fields[/url]





[b]Sections[/b]

[url="sections.php?action=add&amp;id=0&amp;s={/global/@s}"]Add Section[/url]

[url="sections.php?action=list&amp;id=0&amp;s={/global/@s}"]Modify Sections[/url]



[b]International Sys[/b]

[url="add,0,{/global/@s},internationalsys.html"]Add Country[/url]

[url="list,0,{/global/@s},internationalsys.html"]List Countries[/url]

[url="import,0,{/global/@s},internationalsys.html"]Import Ip's Database[/url]




[b]Output[/b]

[url="add,0,,{/global/@s},style.html"]Add Style[/url]

[url="addnew,0,,{/global/@s},template.html"]Add Template[/url]

[url="manage,0,,{/global/@s},style.html"]Manage Styles[/url]




[b]Nav Details[/b]

[url="addgroup,0,{/global/@s},navdetails.html"]Add Group[/url]

[url="listgroups,0,{/global/@s},navdetails.html"]Edit Groups[/url]

[url="adddet,0,{/global/@s},navdetails.html"]Add Detail[/url]

[url="listdet,0,{/global/@s},navdetails.html"]Edit Details[/url]

[url="logs.php?action=navdetails&amp;s={/global/@s}"]View Logs[/url]


</div>


<xsl:apply-templates select="global/usergroups"/>



</body>
</html>
</xsl:template>


<xsl:template match="usergroups">
    <div>
        [b]USERGROUP LIST[/b]



        <table cellpadding="0" cellspacing="0" border="0">

        <tr><td colspan="6">[b]Normal Groups[/b]</td></tr>

            <xsl:call-template name="buildnormalgroups"/>

        </table>

        

        
        <table cellpadding="0" cellspacing="0" border="0">

        <tr><td colspan="6">[b]Eredity Groups[/b]</td></tr>

            <xsl:call-template name="buildereditygroups"/>

        </table>
    </div>
</xsl:template>



<xsl:template name="buildnormalgroups">
    

    <xsl:for-each select="/global/usergroups/usergroup[@type = 1]">

        <xsl:sort select="@order" order="ascending"/>

        <tr>
            <td width="200"><xsl:value-of select="@title"/></td>
            <td width="100">[url="usergroups.php?action=edit&amp;id={@id}&amp;s={/global/@s}"]Edit[/url]</td>

            <td width="100">
                <xsl:if test="@id != 1 and @id != 2 and @id != 3">
                    [url="usergroups.php?action=delete&amp;id={@id}&amp;s={/global/@s}"]Delete[/url]
                </xsl:if>
            </td>

            <td width="100">
                <xsl:if test="@id != 1">
                    [url="users.php?action=add&amp;id={@id}&amp;s={/global/@s}"]Add User[/url]
                </xsl:if>
            </td>
            
            <td width="50"><xsl:if test="@id != 1"><xsl:value-of select="@num"/></xsl:if></td>
            
            <td width="100">
                <xsl:if test="@id != 1">
                    [url="users.php?action=list&amp;id={@id}&amp;s={/global/@s}"]List Users[/url]
                </xsl:if>
            </td>
        </tr>        

    </xsl:for-each>

</xsl:template>

<xsl:template name="buildereditygroups">

    <xsl:param name="pid">0</xsl:param>
    <xsl:param name="prefix">--</xsl:param>

    <xsl:for-each select="/global/usergroups/usergroup[@pid = $pid][@type = 2]">

        <xsl:sort select="@order" order="ascending"/>

        <tr>
            <td width="200"><xsl:value-of select="$prefix"/><xsl:text> </xsl:text><xsl:value-of select="@title"/></td>
            <td width="100">[url="usergroups.php?action=edit&amp;id={@id}&amp;s={/global/@s}"]Edit[/url]</td>

            <td width="100">
                <xsl:if test="@id != 1 and @id != 2 and @id != 3">
                    [url="usergroups.php?action=delete&amp;id={@id}&amp;s={/global/@s}"]Delete[/url]
                </xsl:if>
            </td>

            <td width="100">
                <xsl:if test="@id != 1">
                    [url="users.php?action=add&amp;id={@id}&amp;s={/global/@s}"]Add User[/url]
                </xsl:if>
            </td>
            
            <td width="50"><xsl:if test="@id != 1"><xsl:value-of select="@num"/></xsl:if></td>
            
            <td width="100">
                <xsl:if test="@id != 1">
                    [url="users.php?action=list&amp;id={@id}&amp;s={/global/@s}"]List Users[/url]
                </xsl:if>
            </td>
        </tr>

        <xsl:if test="/global/usergroups/usergroup[@pid = current()/@id][@type = 2]">

            <xsl:call-template name="buildereditygroups">
                   <xsl:with-param name="pid" select="@id"/>
                <xsl:with-param name="prefix" select="concat($prefix,'--')"/>
            </xsl:call-template>

          </xsl:if>

    </xsl:for-each>

</xsl:template>

</xsl:stylesheet>