Exemplo n.º 1
0
function dhcps_setcfg($prefix, $svc)
{
    /* set dhcpX of inf */
    $inf = cut($svc, 1, ".");
    $svc = tolower(cut($svc, 0, "."));
    $base = XNODE_getpathbytarget("", "inf", "uid", $inf, 0);
    $dhcps_uid = query($prefix . "/inf/" . $svc);
    set($base . "/" . $svc, $dhcps_uid);
    /* copy the dhcp profile. */
    $uid = INF_getinfinfo($inf, $svc);
    $spath = XNODE_getpathbytarget($prefix . "/" . $svc, "entry", "uid", $dhcps_uid, 0);
    $dhcps = XNODE_getpathbytarget("/" . $svc, "entry", "uid", $uid, 0);
    if ($dhcps != "") {
        if ($svc == "dhcps4") {
            copy_dhcps4($spath, $dhcps);
        } else {
            if ($svc == "dhcps6") {
                $_GLOBALS["SETCFG_DHCPS6_SRC_PATH"] = $spath;
                $_GLOBALS["SETCFG_DHCPS6_DST_PATH"] = $dhcps;
                $b = "/htdocs/phplib/setcfg/libs";
                dophp("load", $b . "/dhcps6.php");
            }
        }
    } else {
        TRACE_error("SETCFG/DHCPS: no dhcps entry for [" . $uid . "] found!");
    }
}
Exemplo n.º 2
0
function fatlady_dhcps($prefix, $svc)
{
    $service = cut($svc, 0, ".");
    $version = scut($service, 0, "DHCPS");
    XNODE_set_var("FATLADY_DHCPS_PATH", $prefix);
    XNODE_set_var("SERVICE_NAME", $svc);
    $b = "/htdocs/phplib/fatlady/DHCPS";
    if ($version == 4) {
        dophp("load", $b . "/dhcps4.php");
    } else {
        if ($version == 6) {
            dophp("load", $b . "/dhcps6.php");
        } else {
            $_GLOBALS["FATLADY_result"] = "FAILED";
            $_GLOBALS["FATLADY_node"] = "";
            $_GLOBALS["FATLADY_message"] = "Unsupported DHCP service : " . $svc;
            /* internal error, no i18n(). */
        }
    }
    XNODE_del_var("FATLADY_DHCPS_PATH");
    XNODE_del_var("SERVICE_NAME");
    if ($_GLOBALS["FATLADY_result"] == "OK") {
        set($prefix . "/valid", 1);
    }
}
Exemplo n.º 3
0
function SOAP_act_resp_200($svr_name, $svc_type, $act_name, $soap_body)
{
    echo "HTTP/1.1 200 OK\r\n";
    echo "CONTENT-TYPE: text/xml; charset=\"utf-8\"\r\n";
    echo "CONTENT-LENGTH:\r\n";
    echo "EXT:\r\n\r\n";
    echo "<?xml version=\"1.0\"?>\n";
    echo "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n";
    echo "\t<s:Body>\n";
    echo "\t\t<u:" . $act_name . "Response xmlns:u=\"" . $svc_type . "\">";
    if ($soap_body != "") {
        echo "\n";
        dophp("load", "/htdocs/upnpinc/" . $soap_body);
    }
    echo "</u:" . $act_name . "Response>\n";
    echo "\t</s:Body>\n";
    echo "</s:Envelope>\n";
}
Exemplo n.º 4
0
        <span class="delimiter">:</span>
        <span class="value" id="st_aftrserver"></span>
    </div>
    <div class="textinput" >
        <span class="name"><?php 
echo i18n("DS-Lite DHCPv6 option");
?>
</span>
        <span class="delimiter">:</span>
        <span class="value" id="st_dslite_dhcp6opt"></span>
    </div>    
    <div class="gap"></div>
</div>
<?php 
if (isfile("/htdocs/webinc/body/st_device_3G.php") == 1) {
    dophp("load", "/htdocs/webinc/body/st_device_3G.php");
}
?>
<div class="blackbox" id="lan_ethernet_block" style="display:none">
	<h2><?php 
echo i18n("LAN");
?>
</h2>
	<div class="textinput">
		<span class="name"><?php 
echo i18n("MAC Address");
?>
</span>
		<span class="delimiter">:</span>
		<span class="value"><?php 
echo query("/runtime/devdata/lanmac");
Exemplo n.º 5
0
<?php 
echo "<?";
?>
xml version="1.0" encoding="utf-8"<?php 
echo "?>";
?>

<?php 
include "/htdocs/phplib/trace.php";
echo "<" . $SIGNATURE . ">\n<runtime>\n<session>\n<" . $SESSION . ">\n";
TRACE_debug("GETCFG: serivce = " . $GETCFG_SVC);
if ($GETCFG_SVC != "") {
    $file = "/htdocs/webinc/getcfg/" . $GETCFG_SVC . ".xml.php";
    /* GETCFG_SVC will be passed to the child process. */
    if (isfile($file) == "1") {
        dophp("load", $file);
    }
}
echo "</" . $SESSION . ">\n</session>\n</runtime>\n</" . $SIGNATURE . ">\n";
Exemplo n.º 6
0
<?php

dophp("load", "/htdocs/web/bsc_internet.php");
Exemplo n.º 7
0
	</div>
	<div class="bannercontainer">
		<span class="bannerhead"><a href="<?php 
echo query("/runtime/device/producturl");
?>
"><img src="/pic/head_01.gif" width="162" height="92"></a></span>
		<span class="bannertail"><img src="/pic/head_03.gif"></span>
	</div>

	<div id="content" class="simplecontainer">
	<div class="simplebody">

	<!-- Start of Page Depedent Part. -->
	<?php 
if (isfile("/htdocs/webinc/body/" . $_GLOBALS["TEMP_MYNAME"] . ".php") == 1) {
    dophp("load", "/htdocs/webinc/body/" . $_GLOBALS["TEMP_MYNAME"] . ".php");
}
?>
	<!-- End of Page Dependent Part. -->

	</div>
	</div>
	<div class="footercontainer">
		<span class="footermark"><img src="/pic/tail.gif"></span>
	</div>
</div>
<div class="copyright">Copyright &copy; 2012 D-Link Corporation. All rights reserved.</div>
</body>
</html>

Exemplo n.º 8
0
function ifchildsetup($name)
{
    /* Get the runtime interface */
    $infp = XNODE_getpathbytarget("", "inf", "uid", $name, 0);
    startcmd('# ifchildsetup: infp=' . $infp);
    if ($infp == "") {
        SHELL_info($_GLOBALS["START"], "ifchildsetup: (" . $name . ") no interface.");
        SHELL_info($_GLOBALS["STOP"], "ifchildsetup: (" . $name . ") no interface.");
        error("9");
        return;
    }
    /* Is this interface active ? */
    $disable = query($infp . "/disable");
    $active = query($infp . "/active");
    $phyinf = query($infp . "/phyinf");
    if ($disable == 1 || $active != 1) {
        SHELL_info($_GLOBALS["START"], "ifchildsetup: (" . $name . ") not active.");
        SHELL_info($_GLOBALS["STOP"], "ifchildsetup: (" . $name . ") not active.");
        error("8");
        return;
    }
    /* Get the physical interface */
    if ($phyinf == "") {
        SHELL_info($_GLOBALS["START"], "ifchildsetup: (" . $name . ") no phyinf.");
        SHELL_info($_GLOBALS["STOP"], "ifchildsetup: (" . $name . ") no phyinf.");
        error("9");
        return;
    }
    $_GLOBALS["CHILD_INFNAME"] = $name;
    dophp("load", "/etc/services/INET/inet_child.php");
}
Exemplo n.º 9
0
			<td width="29px">&nbsp;</td>
			<td width="136px"><b><?php 
echo i18n("DHCP Client List");
?>
</b></td>
			
			<?php 
if ($FEATURE_NOSCH != "1") {
    echo '<td width="188px"><b>' . i18n("Schedule") . '</b></td>\\n';
}
?>
		</tr>
<?php 
$INDEX = 1;
while ($INDEX <= $MAC_FILTER_MAX_COUNT) {
    dophp("load", "/htdocs/webinc/body/adv_mac_filter_list.php");
    $INDEX++;
}
?>
		</table>
	</div>
	<div class="gap"></div>
</div>
<p><input type="button" value="<?php 
echo i18n("Save Settings");
?>
" onclick="BODY.OnSubmit();" />
<input type="button" value="<?php 
echo i18n("Don't Save Settings");
?>
" onclick="BODY.OnReload();" /></p>
Exemplo n.º 10
0
HTTP/1.1 200 OK

<?php 
/*necessary and basic definition */
$TEMP_MYNAME = "adv_afp";
$TEMP_MYGROUP = "advanced";
$TEMP_STYLE = "complex";
include "/htdocs/webinc/templates.php";
dophp("load", "/htdocs/web/portal/comm/drag.php");
dophp("load", "/htdocs/web/portal/comm/event.php");
dophp("load", "/htdocs/web/portal/comm/fade.php");
dophp("load", "/htdocs/web/portal/comm/overlay.php");
dophp("load", "/htdocs/web/portal/comm/scoot.php");
Exemplo n.º 11
0
	</div>
	<div class="info" <?php 
if ($FEATURE_DUAL_BAND != "1") {
    echo 'style="display:none;"';
}
?>
>
		<span class="name">WLAN Domain(5GHz) :</span>
		<span class="value" style="text-transform:uppercase;"><?php 
echo query("/runtime/devdata/countrycode");
?>
</span>
	</div>
<?php 
if (isfile("/htdocs/webinc/body/version_3G.php") == 1) {
    dophp("load", "/htdocs/webinc/body/version_3G.php");
}
?>
	<div class="info">
		<span class="name">Firmware Query :</span>
		<span class="value" id="fwq"></span>
	</div>
	<div class="info">
		<span class="name">Kernel :</span>
		<span class="value"><?php 
echo cut(fread("", "/proc/version"), "0", "(");
?>
</span>
	</div>
	<div class="info">
		<span class="name">Apps :</span>
Exemplo n.º 12
0
<?php

if (query("/device/wiz_freset") != "1") {
    dophp("load", "/htdocs/web/wiz_freset.php");
} else {
    dophp("load", "/htdocs/web/home.php");
}
Exemplo n.º 13
0
echo i18n("Turn IPv6 Filtering ON and ALLOW rules listed");
?>
</option>
			<option value="ACCEPT"><?php 
echo i18n("Turn IPv6 Filtering ON and DENY rules listed");
?>
</option>
		</select>
	</p>

	<div class="centerline" align="center">
		<table id="" class="general">
<?php 
$INDEX = 1;
while ($INDEX <= $FW_MAX_COUNT) {
    dophp("load", "/htdocs/webinc/body/adv_firewallv6_list.php");
    $INDEX++;
}
?>
		</table>
	</div>
	<div class="gap"></div>
</div>
<p><input type="button" value="<?php 
echo i18n("Save Settings");
?>
" onclick="BODY.OnSubmit();" />
<input type="button" value="<?php 
echo i18n("Don't Save Settings");
?>
" onclick="BODY.OnReload();" /></p>
Exemplo n.º 14
0
			<th width="100px">&nbsp;</th>
			<th width="155px">&nbsp;</th>
			<th width="65px"><?php 
echo i18n("Port");
?>
</th>
			<th width="76px"><?php 
echo i18n("Traffic Type");
?>
</th>
			<th width="85px"></th>
		</tr>
<?php 
$INDEX = 1;
while ($INDEX <= $VSVR_MAX_COUNT) {
    dophp("load", "/htdocs/webinc/body/adv_vsvr_list.php");
    $INDEX++;
}
?>
		</table>
	</div>
	<div class="gap"></div>
</div>
<p><input type="button" value="<?php 
echo i18n("Save Settings");
?>
" onclick="BODY.OnSubmit();" />
<input type="button" value="<?php 
echo i18n("Don't Save Settings");
?>
" onclick="BODY.OnReload();" /></p>
Exemplo n.º 15
0
include "/htdocs/upnpinc/gvar.php";
include "/htdocs/upnpinc/soap.php";
fwrite("w", $SHELL_FILE, "#!/bin/sh\n");
$dev_nodebase = UPNP_getdevpathbytype($INF_UID, $G_IGD);
if ($dev_nodebase == "") {
    SHELL_debug($SHELL_FILE, "Can not to get the runtime node path of IGD!");
    exit;
}
$act_name = query($ACTION_NODEBASE . "/action_name");
$svc_type = query($dev_nodebase . "/devdesc/device/deviceList/device:1/deviceList/device:1/serviceList/service:2/serviceType");
$WID = 1;
/* WAN port ID */
$errorCode = 401;
$SOAP_BODY = "";
if ($act_name == "AddPortMapping" || $act_name == "DeletePortMapping" || $act_name == "GetConnectionTypeInfo" || $act_name == "GetExternalIPAddress" || $act_name == "GetGenericPortMappingEntry" || $act_name == "GetNATRSIPStatus" || $act_name == "GetSpecificPortMappingEntry" || $act_name == "GetStatusInfo" || $act_name == "RequestConnection" || $act_name == "ForceTermination" || $act_name == "SetConnectionType") {
    dophp("load", "/htdocs/upnpinc/ACTION.DO." . $act_name . ".php");
}
/* 200 OK */
if ($errorCode == 200) {
    SOAP_act_resp_200(query($rtpath_base . "/server"), $svc_type, $act_name, $SOAP_BODY);
    exit;
}
/* ERROR */
if ($errorCode == 401) {
    SOAP_act_resp_500("401", "Invalid Action");
} else {
    if ($errorCode == 402) {
        SOAP_act_resp_500("402", "Invalid Args");
    } else {
        if ($errorCode == 501) {
            SOAP_act_resp_500("501", "Action Failed");
Exemplo n.º 16
0
<?php

include "/htdocs/phplib/trace.php";
include "/htdocs/phplib/xnode.php";
fwrite("w", "/var/tmp/config_cli", "");
if (isfile("/etc/scripts/php_cmd/OTHER.php") == 1) {
    dophp("load", "/etc/scripts/php_cmd/OTHER.php");
}
if (isfile("/etc/scripts/php_cmd/SETCMD.php") == 1) {
    dophp("load", "/etc/scripts/php_cmd/SETCMD.php");
}
if (isfile("/etc/scripts/php_cmd/GETCMD.php") == 1) {
    dophp("load", "/etc/scripts/php_cmd/GETCMD.php");
}
Exemplo n.º 17
0
<?php 
if ($ICON_HOME == 1) {
    echo '\\t\\t\\t<li><a id="icon_home" href="home.php" class="icon_home"><span>' . I18N("h", "Home") . '</span></a></li>' . '\\n';
}
if ($ICON_ADV == 1) {
    echo '\\t\\t\\t<li><a id="icon_adv" href="advanced.php" class="icon_advanced"><span>' . I18N("h", "Advanced Mode") . '</span></a></li>' . '\\n';
}
if ($ICON_NETMAP == 1) {
    echo '\\t\\t\\t<li><a id="icon_netmap" href="netmap.php" class="icon_netmork_map"><span>' . I18N("h", "Network Map") . '</span></a></li>' . '\\n';
}
?>
		</ul>
	</div>
<?php 
echo '<div id="all_content" style="display:none;">\\n';
dophp("load", "/htdocs/webinc/body/" . $TEMP_MYNAME . ".php");
echo '</div>\\n';
?>
	<div id="login" class="maincolumn" style="display:none;">
		<form>
			<div class="rc_gradient_hd">
				<h2><?php 
echo I18N("h", "Welcome to the miiiCasa \$1 Router", query("/runtime/device/modelname"));
?>
</h2>
			</div>
			<div class="rc_gradient_ft h_initial">
				<h6><?php 
echo I18N("h", "Please enter the router login password.");
?>
</h6>
Exemplo n.º 18
0
			<th width="136px">&nbsp;</th>
			<th width="162px">&nbsp;</th>
			<th width="105px"><?php 
echo i18n("Ports to Open");
?>
</th>
			<?php 
if ($FEATURE_NOSCH != "1") {
    echo '<th width="83px">&nbsp;</th>\\n';
}
?>
		</tr>
<?php 
$INDEX = 1;
while ($INDEX <= $PFWD_MAX_COUNT) {
    dophp("load", "/htdocs/webinc/body/adv_pfwd_list.php");
    $INDEX++;
}
?>
		</table>
	</div>
	<div class="gap"></div>
</div>
<p><input type="button" value="<?php 
echo i18n("Save Settings");
?>
" onClick="BODY.OnSubmit();" />
	<input type="button" value="<?php 
echo i18n("Don't Save Settings");
?>
" onClick="BODY.OnReload();" /></p>
Exemplo n.º 19
0
				<td class=c_tb>&nbsp;</td>
				<td class=c_tb>&nbsp;</td>
				<td width="50px" class=c_tb><strong><?php 
echo i18n("Metric");
?>
</strong></td>
				<td width="160px" class=c_tb><strong><?php 
echo i18n("Interface");
?>
</strong></td>
			</tr>

<?php 
$ROUTING_INDEX = 1;
while ($ROUTING_INDEX <= $ROUTING_MAX_COUNT) {
    dophp("load", "/htdocs/webinc/body/adv_routing_list.php");
    $ROUTING_INDEX++;
}
?>
			</table>
		</div>
	<div class="gap"></div>
	</div>
<p><input type="button" value="<?php 
echo i18n("Save Settings");
?>
" onclick="BODY.OnSubmit();" />
<input type="button" value="<?php 
echo i18n("Don't Save Settings");
?>
" onclick="BODY.OnReload();" /></p>