function check_firmware_version()
{
    global $g;
    $post = "platform=" . rawurlencode($g['fullplatform']) . "&version=" . rawurlencode(get_product_version());
    $rfd = @fsockopen("www." . get_product_url(), 80, $errno, $errstr, 3);
    if ($rfd) {
        $hdr = "POST /checkversion.php HTTP/1.0\r\n";
        $hdr .= "Content-Type: application/x-www-form-urlencoded\r\n";
        $hdr .= "User-Agent: " . get_product_name() . "-webGUI/1.0\r\n";
        $hdr .= "Host: " . get_product_url() . "\r\n";
        $hdr .= "Content-Length: " . strlen($post) . "\r\n\r\n";
        fwrite($rfd, $hdr);
        fwrite($rfd, $post);
        $inhdr = true;
        $resp = "";
        while (!feof($rfd)) {
            $line = fgets($rfd);
            if ($inhdr) {
                if (trim($line) === "") {
                    $inhdr = false;
                }
            } else {
                $resp .= $line;
            }
        }
        fclose($rfd);
        return $resp;
    }
    return null;
}
示例#2
0
function show_footer()
{
    echo "</div>";
    echo "<div id=\"pagefooter\">\n";
    echo "<span><p><a title=\"www." . get_product_url() . "\" href=\"http://" . get_product_url() . "\" target=\"_blank\"></a> " . str_replace("Copyright (C)", "&copy;", get_product_copyright()) . "</a></p></span>\n";
    echo "</div>\n";
    echo "</body>\n";
    echo "</html>";
}
示例#3
0
function show_header($title)
{
    // header for html-page
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    header("Content-Type: text/html; charset=" . $GLOBALS["charset"]);
    /* NAS4FREE & QUIXPLORER CODE*/
    // Html & Page Headers
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"" . system_get_language_code() . "\" lang=\"" . system_get_language_code() . "\" dir=\"" . $GLOBALS["text_dir"] . "\">\n";
    echo "<head>\n";
    echo "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"" . $GLOBALS["charset"] . "\">\n";
    echo "<title>Nas4free.local - File Manager</title>\n";
    if (isset($pgrefresh) && $pgrefresh) {
        echo "<meta http-equiv='refresh' content=\"" . $pgrefresh . "\"/>\n";
    }
    echo "<link href=\"./_style/style.css\" rel=\"stylesheet\"\ttype=\"text/css\">\n";
    echo "<link href=\"../gui.css\" rel=\"stylesheet\" type=\"text/css\">\n";
    echo "<link href=\"../navbar.css\" rel=\"stylesheet\" type=\"text/css\">\n";
    echo "<link href=\"../tabs.css\" rel=\"stylesheet\" type=\"text/css\">\n";
    echo "<script type=\"text/javascript\" src=\"../js/jquery.min.js\"></script>\n";
    echo "<script type=\"text/javascript\" src=\"../js/gui.js\"></script>\n";
    if (isset($pglocalheader) && !empty($pglocalheader)) {
        if (is_array($pglocalheader)) {
            foreach ($pglocalheader as $pglocalheaderv) {
                echo $pglocalheaderv;
                echo "\n";
            }
        } else {
            echo $pglocalheader;
            echo "\n";
        }
    }
    echo "</head>\n";
    // NAS4Free Header
    echo "<body>\n";
    echo "<div id=\"header\">\n";
    echo "<div id=\"headerlogo\">\n";
    echo "<a title=\"www." . get_product_url() . "\" href=\"http://" . get_product_url() . "\" target='_blank'><img src='../header_logo.png' alt='logo' /></a>\n";
    echo "</div>\n";
    echo "<div id=\"headerrlogo\">\n";
    echo "<div class=\"hostname\">\n";
    echo "<span>" . system_get_hostname() . "&nbsp;</span>\n";
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    echo "<div id=\"headernavbar\">\n";
    echo "<ul id=\"navbarmenu\">\n";
    echo display_menu("system");
    echo display_menu("network");
    echo display_menu("disks");
    echo display_menu("services");
    //-- Begin extension section --//
    if (Session::isAdmin() && isset($g) && isset($g['www_path']) && is_dir("{$g['www_path']}/ext")) {
        echo "<li>\n";
        echo "<a href=\"index.php\" onmouseover=\"mopen('extensions')\" onmouseout=\"mclosetime()\">" . gettext("Extensions") . "</a>\n";
        echo "<div id=\"extensions\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">\n";
        $dh = @opendir("{$g['www_path']}/ext");
        if ($dh) {
            while (($extd = readdir($dh)) !== false) {
                if ($extd === "." || $extd === "..") {
                    continue;
                }
                @(include "{$g['www_path']}/ext/" . $extd . "../menu.inc");
            }
            closedir($dh);
        }
        echo "</div>\n";
        echo "</li>\n";
    }
    //-- End extension section --//
    echo display_menu("access");
    echo display_menu("status");
    echo display_menu("diagnostics");
    echo display_menu("advanced");
    echo display_menu("help");
    echo "</ul>\n";
    echo "<div style=\"clear:both\"></div>\n";
    echo "</div>\n";
    echo "<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />\n";
    // QuiXplorer Header
    $pgtitle = array(gettext("Advanced"), gettext("File Manager"));
    if (!isset($pgtitle_omit) || !$pgtitle_omit) {
        echo "<div style=\"margin-left: 50px;\"><p class=\"pgtitle\">" . htmlspecialchars(gentitle($pgtitle)) . "</p></div>\n";
    }
    echo "<center>\n";
    echo "<table border=\"0\" width=\"93%\" cellspacing=\"0\" cellpadding=\"5\">\n";
    echo "<tbody>\n";
    echo "<tr>\n";
    echo "<td class=\"title\" aligh=\"left\">\n";
    if ($GLOBALS["require_login"] && isset($GLOBALS['__SESSION']["s_user"])) {
        echo "[" . $GLOBALS['__SESSION']["s_user"] . "] ";
    }
    echo $title;
    echo "</td>\n";
    echo "<td class=\"title_version\" align=\"right\">\n";
    echo "Powered by QuiXplorer";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</tbody>\n";
    echo "</table>\n";
    echo "</center>";
    echo "<div class=\"main_tbl\">";
}
示例#4
0
" /></td>
																</tr>
															</tbody>
														</table>
													</div>
												</duv>
											</td>
										</tr>
									</tbody>
								</table>
							</form>
						</td>
					</tr>
				</tbody>
			</table>
        </div>
        <div id="pagefooter">
			<span><p><a title="www.<?php 
echo get_product_url();
?>
" href="http://<?php 
echo get_product_url();
?>
" target="_blank"></a> <?php 
echo str_replace("Copyright (C)", "&copy;", get_product_copyright());
?>
</a></p></span>
		</div>
    </body>
</html>
示例#5
0
function product_grid($products, $translate = false)
{
    ob_start();
    $prefix = $translate ? 'en_' : '';
    foreach ($products as $p) {
        ?>
		    <tr>
		        <td align="center" valign="top">
		            <?php 
        $cells = array();
        $video = '';
        foreach ($p as $key => $value) {
            preg_match('/[0-9]*/', $value, $match);
            if (preg_match('/v$/', $value)) {
                $video = '#video';
            }
            $cells[] = array('image' => "{$prefix}product_" . $value, 'link' => get_product_url($match[0], 'image') . $video);
        }
        $center_table = array('class' => 'center_table', 'td' => $cells);
        echo table($center_table);
        ?>
		        </td>
		    </tr>
<?php 
    }
    return ob_get_clean();
}
示例#6
0
						<div class="col-md-10">
							<div class="box-body box-solid">
								<div class="box-header with-border">
									<i class="fa fa-file-text-o"></i>
									<h3 class="box-title"> 詳情 </h3>
								</div>
								<div class="box-body">
									<dl class="dl-horizontal">
										<dt>編號:</dt>
											<dd><?php 
echo '#' . $data['id'];
?>
</dd>
										<dt>詢價產品:</dt>
											<dd><?php 
echo get_product_url($data['product_id']);
?>
</dd>
										<dt>姓名:</dt>
											<dd><?php 
echo $data['last_name'] . ' - ' . $data['first_name'];
?>
</dd>
										<dt>公司:</dt>
											<dd><?php 
echo $data['company'];
?>
</dd>
										<dt>Email:</dt>
											<dd><?php 
echo $data['email'];
示例#7
0
														<th>姓名</th>
														<th>Email</th>
														<th>國家</th>
														<th>公司名稱</th>
														<th>網站連結</th>
														<th>狀態</th>
														<th>read</th>
													</tr>
												</thead>
												<tbody>
													<?php 
foreach ($a_inquiry_archive as $k0 => $v0) {
    echo '<tr>
																<td>' . $v0['id'] . '</td>
																<td><a href="' . URL_ADMIN2_ROOT . P_CLASS . '/content.php?inquiry_id=' . $v0['id'] . '">編輯</a></td>
																<td>' . get_product_url($v0['product_id']) . '</td>
																<td>' . $v0['last_name'] . ' - ' . $v0['first_name'] . '</td>
																<td>' . $v0['email'] . '</td>
																<td>' . $v0['country'] . '</td>
																<td>' . $v0['company'] . '</td>
																<td>' . $v0['weblink'] . '</td>
																<td>' . $v0['status'] . '</td>
																<td>' . $v0['read'] . '</td>
															</tr>';
}
?>
												</tbody>
											</table>
										</div>								
									</div>
								</div>