update cats

This commit is contained in:
ceb 2003-04-20 14:15:01 +00:00
parent cf343ac9d6
commit bf02473ccd
3 changed files with 8 additions and 17 deletions

View File

@ -513,14 +513,6 @@
'selected' => $sel_cat
);
}
for ($i=0;$i<count($cat_list);$i++)
{
if ($cat_list[$i]['selected'] != 'selected')
{
unset($cat_list[$i]['selected']);
}
}
return $cat_list;
}

View File

@ -5,16 +5,15 @@
</xsl:template>
<xsl:template match="delete">
<xsl:call-template name="app_header"/>
<table cellpadding="2" cellspacing="2" align="center">
<tr>
<td align="center" colspan="2"><xsl:value-of select="lang_confirm_msg"/></td>
</tr>
<tr>
<td>
<xsl:variable name="delete_action"><xsl:value-of select="delete_action"/></xsl:variable>
<xsl:variable name="delete_url"><xsl:value-of select="delete_url"/></xsl:variable>
<xsl:variable name="lang_yes"><xsl:value-of select="lang_yes"/></xsl:variable>
<form method="POST" action="{$delete_action}">
<form method="POST" action="{$delete_url}">
<input type="submit" class="forms" name="confirm" value="{$lang_yes}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
@ -25,8 +24,8 @@
</form>
</td>
<td align="right">
<xsl:variable name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
<a href="{$done_action}" onMouseout="window.status='';return true;">
<xsl:variable name="done_url"><xsl:value-of select="done_url"/></xsl:variable>
<a href="{$done_url}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_no_statustext"/>

View File

@ -10,13 +10,13 @@
</xsl:template>
<xsl:template match="cat_list">
<xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
<xsl:variable name="cat_id"><xsl:value-of select="cat_id"/></xsl:variable>
<xsl:choose>
<xsl:when test="selected">
<option value="{$id}" selected="selected"><xsl:value-of disable-output-escaping="yes" select="name"/></option>
<xsl:when test="selected != ''">
<option value="{$cat_id}" selected="selected"><xsl:value-of disable-output-escaping="yes" select="name"/></option>
</xsl:when>
<xsl:otherwise>
<option value="{$id}"><xsl:value-of disable-output-escaping="yes" select="name"/></option>
<option value="{$cat_id}"><xsl:value-of disable-output-escaping="yes" select="name"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:template>