Subversion-Projekte lars-tiefland.content-management

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        require_once "connect2.php";
        session_start();
        if (!$language) {$language="DE";}

        if ($template_ID)
        {
                $query="
                        delete 
                                templates_to_".$Typ.".*
                        FROM
                                templates_to_".$Typ.",
                                templates
                        WHERE
                                templates_to_".$Typ.".templates_ID = templates.ID
                        and
                                templates.shops_ID = $shops_ID
                        and
                                templates_to_".$Typ.".".$Typ."_ID = $ID
                        ";
                $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);

                if ($template_ID > 0)
                {
                        $query="insert into templates_to_".$Typ." values ($template_ID, $ID)";
                        $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
                }
        }
?>
<html>
<head>
<title>Template Control</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="Webagentur Niewerth - www.weban.de">
<meta name="revisit-after" content="30 days">
<meta name="language" content="deutsch, de">
<meta name="distribution" content="global">
<meta name="robots" content="all">
<link rel=stylesheet type="text/css" href="redaktion.css">
<style type="text/css">
body 
{
        font-family: Arial, Helvetica, sans-serif; font-size: 10pt;
<? if ($webs[font_color_seite])         { ?>color:                              #<? echo $webs[font_color_rechts] ?>;<? } ?>
<? if ($webs[bgcolor_seite])            { ?>background-color:   #<? echo $webs[bgcolor_rechts] ?>;<? } ?>
}

.links
{
font-size: 10pt;
<? if ($webs[font_color_links])         { ?>color:                              #<? echo $webs[font_color_links] ?>;<? } ?>
<? if ($webs[bgcolor_links])            { ?>background-color:   #<? echo $webs[bgcolor_links] ?>;<? } ?>
}

.rechts
{
font-size: 10pt;
<? if ($webs[font_color_rechts])        { ?>color:                              #<? echo $webs[font_color_rechts] ?>;<? } ?>
<? if ($webs[bgcolor_rechts])           { ?>background-color:   #<? echo $webs[bgcolor_rechts] ?>;<? } ?>
}

A:link {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:visited {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:active {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
A:hover {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #<? echo $webs[font_color_rechts] ?>}
<MM:EndLock></style>
</head>

<body leftmargin="0" topmargin="0">
<form action="<?=$self;?>">
<?
        $query="
                SELECT
                        templates_to_".$Typ.".templates_ID as a
                FROM
                        templates_to_".$Typ.",
                        templates
                WHERE
                        templates_to_".$Typ.".templates_ID = templates.ID
                and
                        templates.shops_ID = $shops_ID
                and
                        templates_to_".$Typ.".".$Typ."_ID = $ID
                ";
        $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
        $selected=mysql_fetch_array($result);
        $selected=$selected[a];
                
        $query="SELECT * FROM templates WHERE shops_ID = $shops_ID and Typ='".$Typ."'";
        $result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>".$query);
        while($zeile=mysql_fetch_array($result))
        {
?>
<input type=radio name=template_ID value=<?=$zeile[ID];?><? if ($zeile[ID] == $selected) { ?> checked<? } ?> onClick="this.blur();this.focus();" onChange="this.form.submit()"><? echo $zeile[Name] ?><br>
<?
        }
?>
<input type=radio name=template_ID value=-1 onClick="this.blur();this.focus();" onChange="this.form.submit()">löschen
<input type=hidden name=Typ value="<?=$Typ;?>">
<input type=hidden name=shops_ID value="<?=$shops_ID;?>">
<input type=hidden name=ID value="<?=$ID;?>">
</form>
</body>
</html>