Index
<?php
require_once('./includes/config.php');
require_once('./includes/skins.php');
require_once('./includes/functions.php');
mysql_connect($conf['host'], $conf['user'], $conf['pass']);
mysql_query('SET NAMES utf8');
mysql_select_db($conf['name']);
if(isset($_GET['a']) && isset($action[$_GET['a']])) {
$page_name = $action[$_GET['a']];
} else {
$page_name = 'welcome';
}
require_once("./sources/{$page_name}.php");
$TMPL['content'] = PageMain();
if(isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$query = sprintf('SELECT * from users where username = "%s" and password ="%s"',
mysql_real_escape_string($_COOKIE['username']),
mysql_real_escape_string($_COOKIE['password']));
if(mysql_fetch_row(mysql_query($query))) {
$TMPL['userStatus'] = 'Conta';
$TMPL['welcomeStatus'] = 'Olá <strong>'.$_COOKIE['username'].'</strong>';
} else {
$TMPL['userStatus'] = 'Log In / Registar';
$TMPL['welcomeStatus'] = 'Olá <strong>Visitante</strong>.';
}
} else {
$TMPL['userStatus'] = 'Log In Registar';
$TMPL['welcomeStatus'] = 'Olá <strong>Visitante</strong>.';
}
$resultSettings = mysql_fetch_row(mysql_query(getSettings($querySettings)));
$TMPL['footer'] = $resultSettings[0];
$skin = new skin('wrapper');
echo $skin->make();
mysql_close();
?>
Zona do CSS onde vai buscar as fonts
@font-face {
font-family: "Segoe WPC";
src: url("http://cdn-resources.windowsphone.com/Resources/Fonts/SegoeWPCRegular/Latin1_1252/87c56796-f4c3-4861-9f31-035d303c63ce-1.ttf") format("truetype");
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "Segoe WPC Light";
src: url("http://cdn-resources.windowsphone.com/Resources/Fonts/SegoeWPCLight/Latin1_1252/bd84c8dc-054a-427a-9fde-3ebb63965f38-1.ttf") format("truetype");
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "Segoe WPC Black";
src: url("http://cdn-resources.windowsphone.com/Resources/Fonts/SegoeWPCBlack/Latin1_1252/f513a30a-82ae-4466-acac-96337207a433-1.ttf") format("truetype");
font-style: normal;
font-weight: bold;
}