Engine
Engine

Reputation: 5420

Beginner issues with HTML and Lua

I've got a Lua program that works on a Linux device. I access it use a HTML page. My problem is that there not one line of comment on this program so I'm trying to figure out how it works.

    <td><span class="menu"><a href="channel/<%= num %>">edit</a><%
            if channel.enabled then
            %><a href="channel/<%= num %>?disable=true">disable</a>

Without going deeper in code my problem is ?disable=true. Who should understand it? The code between <%%> is Lua code and I'm fine with it.

Upvotes: 1

Views: 85

Answers (1)

A.G.
A.G.

Reputation: 1319

The HTML code you show only display a link which contains either edit or disable.

The link opens an html/php page which is channel/<%=num%> when the label is edit and channel/<%=num%>?disable=true when the label is disable.

I guess <%=num%> is replaced by a number which could be anything, an output/input number or whatever a linux device can use or drive.

You didn't make yourself very clear.

Upvotes: 2

Related Questions