示例#1
0
function dotown()
{
    // Spit out the main town page.
    global $userrow, $controlrow, $numqueries;
    $townquery = doquery("SELECT * FROM {{table}} WHERE latitude='" . $userrow["latitude"] . "' AND longitude='" . $userrow["longitude"] . "' LIMIT 1", "towns");
    if (mysql_num_rows($townquery) == 0) {
        display("Há um erro com sua conta, ou com os dados da cidade. Por favor tente novamente.", "Error");
    }
    $townrow = mysql_fetch_array($townquery);
    // News box. Grab latest news entry and display it. Something a little more graceful coming soon maybe.
    if ($controlrow["shownews"] == 1) {
        $newsquery = doquery("SELECT * FROM {{table}} ORDER BY id DESC LIMIT 1", "news");
        $newsrow = mysql_fetch_array($newsquery);
        $townrow["news"] = "<table width=\"95%\"><tr><td align=\"center\"><center><img src=\"images/ultimas.gif\"></center></td></tr><tr><td>\n";
        $townrow["news"] .= "<span class=\"light\">[" . prettydate($newsrow["postdate"]) . "]</span><br />" . nl2br($newsrow["content"]);
        $townrow["news"] .= "</td></tr></table>\n";
    } else {
        $townrow["news"] = "";
    }
    // Who's Online. Currently just members. Guests maybe later.
    if ($controlrow["showonline"] == 1) {
        $onlinequery = doquery("SELECT * FROM {{table}} WHERE UNIX_TIMESTAMP(onlinetime) >= '" . (time() - 600) . "' ORDER BY charname", "users");
        $townrow["whosonline"] = "<table width=\"95%\"><tr><td align=\"center\"><center><img src=\"images/online.gif\"></center></td></tr><tr><td>\n";
        $townrow["whosonline"] .= "Há <b>" . mysql_num_rows($onlinequery) . "</b> usuários online nos últimos 10 minutos: ";
        while ($onlinerow = mysql_fetch_array($onlinequery)) {
            $querycor = doquery("SELECT * FROM {{table}} WHERE charname='" . $onlinerow["charname"] . "' LIMIT 1", "users");
            $usercor = mysql_fetch_array($querycor);
            if ($usercor["authlevel"] == 1) {
                $link = " id=\"adm\" ";
            } elseif ($usercor["acesso"] == 2) {
                $link = " id=\"tutor\" ";
            } elseif ($usercor["acesso"] == 3) {
                $link = " id=\"gm\" ";
            }
            $townrow["whosonline"] .= "<a href=\"javascript: opcaochar('" . $onlinerow["charname"] . "')\" " . $link . ">" . $onlinerow["charname"] . "</a>" . ", ";
        }
        $townrow["whosonline"] = rtrim($townrow["whosonline"], ", ");
        $townrow["whosonline"] .= "</td></tr></table>\n";
    } else {
        $townrow["whosonline"] = "";
    }
    if ($controlrow["showbabble"] == 1) {
        $townrow["babblebox"] = "<table width=\"100%\"><tr><td align=\"center\"><center><img src=\"images/texto.gif\"></center></td></tr></table></center>";
        $townrow["babblebox"] .= babbleboxpage('460', '10');
    } else {
        $townrow["babblebox"] = "";
    }
    //mostrar valores de texto na página.
    global $indexconteudo, $htmlnapag;
    //mostrar valores na index.
    $townrow["indexconteudo"] = $indexconteudo;
    $townrow["htmlnapag"] = $htmlnapag;
    //outros / senjutsu, jutsu de busca, etc...
    include 'cidadesconteudo.php';
    $townrow['fimconteudo'] = conteudo($townrow);
    $page = gettemplate("towns");
    $page = parsetemplate($page, $townrow);
    return $page;
}
示例#2
0
								border=0>
								<TBODY>
								</TBODY>
							</TABLE>
							<P></P>
							<P></P>
							<p>
								<img
									src="http://www1.locaweb.com.br/scripts/count.exe?df=cideestagio.dat">
							</p>
						</TD>
						<TD style="PADDING-RIGHT: 3px; PADDING-TOP: 0px" vAlign=top>
							<DIV align=center>
								<img src="../../Gifs/cide9.gif" width="550" height="30">
								<DIV align=center> 
									<? conteudo();?> <!-- Mostra o conteudo do site -->
								</DIV>

							</DIV>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
		</div></TD>
	<TD background="../../../geral/html/images/index_09.gif">&nbsp;</TD>
</TR>
<Script Language="JavaScript">
<!--
function dialog()
{
caixa = "window.showModelessDialog('sge-web/candidato/rodapeendereco.htm', '','Resizable:no; DialogHeight:450px; DialogWidth:750px; Edge:raised; Help:no; Scroll:no; Status:no; Center:yes;');";