Exemplo n.º 1
0
<?php

SubmitEntry();
get_header('single');
?>

	<section class="single">
			<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
				
				<?php 
        $image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
        if ($image) {
            echo '<div class="single-image" style="background: url(' . $image . ') no-repeat scroll center / cover; ">';
        } else {
            echo '<div class="single-image default-image">';
        }
        echo '</div>';
        ?>

				<div class="outer single-outer">

					<div class="inner">

						<header>
							<a href="<?php 
        echo site_url();
        ?>
Exemplo n.º 2
0
$action = "";
if (isset($_POST["action"])) {
    $action = $_POST["action"];
    switch ($action) {
        case "login":
            $username = isset($_POST["un"]) ? $_POST["un"] : "";
            $password = isset($_POST["pw"]) ? $_POST["pw"] : "";
            $username = strtolower(trim($username));
            $password = trim($password);
            LogInOrRegister($username, $password);
            break;
        case "submit":
            $gameName = isset($_POST["gamename"]) ? $_POST["gamename"] : "";
            $gameURL = isset($_POST["gameurl"]) ? $_POST["gameurl"] : "";
            $screenshotURL = isset($_POST["screenshoturl"]) ? $_POST["screenshoturl"] : "";
            SubmitEntry($gameName, $gameURL, $screenshotURL);
            break;
        case "newjam":
            $theme = isset($_POST["theme"]) ? $_POST["theme"] : "";
            $date = isset($_POST["date"]) ? $_POST["date"] : "";
            $time = isset($_POST["time"]) ? $_POST["time"] : "";
            CreateJam($theme, $date, $time);
            break;
    }
}
//Page actions!
switch ($page) {
    case "login":
        if (IsLoggedIn()) {
            $page = "main";
        }
Exemplo n.º 3
0
     $username = strtolower(trim($username));
     $password = trim($password);
     LogInOrRegister($username, $password);
     break;
 case "submit":
     $gameName = isset($_POST["gamename"]) ? $_POST["gamename"] : "";
     $gameURL = isset($_POST["gameurl"]) ? $_POST["gameurl"] : "";
     $gameURLWeb = isset($_POST["gameurlweb"]) ? $_POST["gameurlweb"] : "";
     $gameURLWin = isset($_POST["gameurlwin"]) ? $_POST["gameurlwin"] : "";
     $gameURLMac = isset($_POST["gameurlmac"]) ? $_POST["gameurlmac"] : "";
     $gameURLLinux = isset($_POST["gameurllinux"]) ? $_POST["gameurllinux"] : "";
     $gameURLiOS = isset($_POST["gameurlios"]) ? $_POST["gameurlios"] : "";
     $gameURLAndroid = isset($_POST["gameurlandroid"]) ? $_POST["gameurlandroid"] : "";
     $screenshotURL = isset($_POST["screenshoturl"]) ? $_POST["screenshoturl"] : "";
     $description = isset($_POST["description"]) ? $_POST["description"] : "";
     SubmitEntry($gameName, $gameURL, $gameURLWeb, $gameURLWin, $gameURLMac, $gameURLLinux, $gameURLiOS, $gameURLAndroid, $screenshotURL, $description);
     break;
 case "newjam":
     $theme = isset($_POST["theme"]) ? $_POST["theme"] : "";
     $date = isset($_POST["date"]) ? $_POST["date"] : "";
     $time = isset($_POST["time"]) ? $_POST["time"] : "";
     CreateJam($theme, $date, $time, $description);
     break;
 case "saveconfig":
     if (IsAdmin()) {
         foreach ($_POST as $key => $value) {
             SaveConfig($key, $value);
         }
         LoadConfig();
         //reload config
     }