Borykam się z jednym problemem około 1 miesiąca. Oczywiście jestem początkująca.
Chodzi dokładnie o to że do LMS stworzyła sobie dodatkowe opcje chodzi o przekierowanie portów.
Napiszę że dodawanie, wyświetlanie jako lista wszystkich portów i jak wchodzę do edycji danego portu to dane są pobierane z bazy usuwanie też działa, jak coś zmienię i dam zapisz, żaden błąd nie wyskakuje i nie zapisuje zmienionego pola w bazie.
Podam trzy pliki które są do edycji może ktoś wpadnie na jakiś pomysł
portedit.html
Kod
{include file="header.html"}
<!-- //$Id: portedit.html //-->
<H1>{$layout.pagetitle}</H1>
<P>
<FORM METHOD="POST" NAME="tedit" ACTION="?m=portedit&id={$port.id}">
<INPUT type="submit" class="hiddenbtn">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR CLASS="DARK">
<TD WIDTH="1%" CLASS="fleftu">
<IMG SRC="img/money.gif" alt="">
</TD>
<TD WIDTH="1%" CLASS="fbt" NOWRAP>
<B>{t}Name:{/t}</B>
</TD>
<TD WIDTH="98%" CLASS="frightu">
<INPUT TYPE="TEXT" VALUE="{$port.name}" NAME="port[name]" size="45" {tip trigger="name" bold=1}>
<B> ({$port.id|string_format:"%04d"})</B>
</TD>
</TR>
<TR class="LIGHT">
<TD WIDTH="100%" COLSPAN="3" CLASS="flr">
<TABLE WIDTH="100%" CELLPADDING="0">
<TR CLASS="LIGHT">
<TD WIDTH="50%" style="vertical-align:top;">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR class="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/info1.gif" alt=""> </TD>
<TD WIDTH="1%"><B>{t}Description:{/t}</B></TD>
<TD WIDTH="98%">
<INPUT ROWS="5" COLS="50" TYPE="TEXT" VALUE="{if $port.description}{$port.description}{/if}" SIZE="8" NAME="port[description]" {tip text=" (optional)" trigger="description"}>
</TD>
</TR>
</TABLE>
</TD>
<TD WIDTH="50%" VALIGN="top">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/uprate.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}Upload rate:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.protocol}{$port.protocol}{/if}" SIZE="8" NAME="port[protocol]" {tip text=" (optional)" trigger="protocol"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%"> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}extport:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.extport}{$port.extport}{/if}" SIZE="8" NAME="port[extport]" {tip text=" (optional)" trigger="extport"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/downrate.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}localIP:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.localIP}{$port.localIP}{/if}" SIZE="8" NAME="port[localIP]" {tip text=" (optional)" trigger="localIP"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%"> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}port:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.port}{$port.port}{/if}" SIZE="8" NAME="port[port]" {tip text=" (optional)" trigger="port"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/options.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}zewIP:{/t}</B></TD>
<TD WIDTH="98%">
<INPUT TYPE="TEXT" VALUE="{if $port.zewIP}{$port.zewIP}{/if}" SIZE="8" NAME="port[zewIP]" {tip text="(optional)" trigger="zewIP"}> </TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="100%" COLSPAN="3" CLASS="FBOTTOMU" ALIGN="RIGHT">
<A HREF="java script:document.tedit.submit();" ACCESSKEY="S">{t}Submit{/t} <IMG SRC="img/save.gif" ALT=""></A>{if $port.count eq 0} <A HREF="?m=portdel&id={$port.id}">{t}Delete{/t} <IMG SRC="img/delete.gif" ALT=""></A>{/if}
<A HREF="?m=portinfo&id={$port.id}">{t}Cancel{/t} <IMG SRC="img/cancel.gif" ALT=""></A>
</TD>
</TR>
</TABLE>
</FORM>
</P>
<script type="text/javascript">
<!--
document.forms['tedit'].elements['port[name]'].focus();
//-->
</SCRIPT>
{include file="footer.html"}
<!-- //$Id: portedit.html //-->
<H1>{$layout.pagetitle}</H1>
<P>
<FORM METHOD="POST" NAME="tedit" ACTION="?m=portedit&id={$port.id}">
<INPUT type="submit" class="hiddenbtn">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR CLASS="DARK">
<TD WIDTH="1%" CLASS="fleftu">
<IMG SRC="img/money.gif" alt="">
</TD>
<TD WIDTH="1%" CLASS="fbt" NOWRAP>
<B>{t}Name:{/t}</B>
</TD>
<TD WIDTH="98%" CLASS="frightu">
<INPUT TYPE="TEXT" VALUE="{$port.name}" NAME="port[name]" size="45" {tip trigger="name" bold=1}>
<B> ({$port.id|string_format:"%04d"})</B>
</TD>
</TR>
<TR class="LIGHT">
<TD WIDTH="100%" COLSPAN="3" CLASS="flr">
<TABLE WIDTH="100%" CELLPADDING="0">
<TR CLASS="LIGHT">
<TD WIDTH="50%" style="vertical-align:top;">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR class="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/info1.gif" alt=""> </TD>
<TD WIDTH="1%"><B>{t}Description:{/t}</B></TD>
<TD WIDTH="98%">
<INPUT ROWS="5" COLS="50" TYPE="TEXT" VALUE="{if $port.description}{$port.description}{/if}" SIZE="8" NAME="port[description]" {tip text=" (optional)" trigger="description"}>
</TD>
</TR>
</TABLE>
</TD>
<TD WIDTH="50%" VALIGN="top">
<TABLE WIDTH="100%" CELLPADDING="3">
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/uprate.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}Upload rate:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.protocol}{$port.protocol}{/if}" SIZE="8" NAME="port[protocol]" {tip text=" (optional)" trigger="protocol"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%"> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}extport:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.extport}{$port.extport}{/if}" SIZE="8" NAME="port[extport]" {tip text=" (optional)" trigger="extport"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/downrate.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}localIP:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.localIP}{$port.localIP}{/if}" SIZE="8" NAME="port[localIP]" {tip text=" (optional)" trigger="localIP"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%"> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}port:{/t}</B></TD>
<TD WIDTH="98%" NOWRAP>
<INPUT TYPE="TEXT" VALUE="{if $port.port}{$port.port}{/if}" SIZE="8" NAME="port[port]" {tip text=" (optional)" trigger="port"}> kbit/s </TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%">
<IMG SRC="img/options.gif" alt=""> </TD>
<TD WIDTH="1%" NOWRAP><B>{t}zewIP:{/t}</B></TD>
<TD WIDTH="98%">
<INPUT TYPE="TEXT" VALUE="{if $port.zewIP}{$port.zewIP}{/if}" SIZE="8" NAME="port[zewIP]" {tip text="(optional)" trigger="zewIP"}> </TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="100%" COLSPAN="3" CLASS="FBOTTOMU" ALIGN="RIGHT">
<A HREF="java script:document.tedit.submit();" ACCESSKEY="S">{t}Submit{/t} <IMG SRC="img/save.gif" ALT=""></A>{if $port.count eq 0} <A HREF="?m=portdel&id={$port.id}">{t}Delete{/t} <IMG SRC="img/delete.gif" ALT=""></A>{/if}
<A HREF="?m=portinfo&id={$port.id}">{t}Cancel{/t} <IMG SRC="img/cancel.gif" ALT=""></A>
</TD>
</TR>
</TABLE>
</FORM>
</P>
<script type="text/javascript">
<!--
document.forms['tedit'].elements['port[name]'].focus();
//-->
</SCRIPT>
{include file="footer.html"}
portedit.php
[code]<?php
if(!$LMS->PortExists($_GET['id']))
{
$SESSION->redirect('?m=portlist');
}
if(isset($_POST['port']))
{
$port = $_POST['port'];
if($port['name'] == '') $port['name'] = 0;
if($port['description'] == '') $port['description'] = 0;
if($port['protocol'] == '') $port['protocol'] = 0;
if($port['extport'] == '') $port['extport'] = 0;
if($port['localIP'] == '') $port['localIP'] = 0;
if($port['port'] == '') $port['port'] %