예제 #1
0
if (isset($_GET['url'])) {
    //  $url= htmlentities(strip_tags($_GET['url']));
    if ($page == 'delete') {
        $confirm = confirmDelete($db, $url);
    }
    // Set the legend of the form
    $legend = "Edit This Post";
} else {
    // Check if we're creating a new user
    if ($page == 'createadmin') {
        $isAdmin = TRUE;
        $create = createUserForm($isAdmin);
    } else {
        if ($page == 'createuser') {
            $isAdmin = FALSE;
            $create = createUserForm($isAdmin);
        }
    }
    // Set the legend of the form
    $legend = "New Entry Submission";
    // Set variables to NULL if not editing
    $p['postID'] = NULL;
    $p['title'] = NULL;
    $p['content'] = NULL;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

   <head>
예제 #2
0
            exit;
        }
    }
    if (isset($_GET['url'])) {
        $url = htmlentities(strip_tags($_GET['url']));
        $legend = "Edit this Entry";
        if ($page == 'delete') {
            $confirm = confirmDelete($db, $url);
        }
        $e = retrieveEntries($db, $page, $url);
        $id = $e['id'];
        $entry = $e['entry'];
        $title = $e['title'];
    } else {
        if ($page == 'createUser') {
            $create = createUserForm();
        }
        $legend = "New Entry Submission";
        $id = NULL;
        $entry = NULL;
        $title = NULL;
    }
    ?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type"
	content="text/html;charset=utf-8" />
	<link rel="stylesheet" href="/css/default.css" type="text/css"/>
예제 #3
0
        } else {
            createUserForm();
            if ($result === 'NotUnique') {
                ?>
										<script type="text/javascript">	
											document.getElementById('nickNameStatus').innerHTML = "The nick name <?php 
                echo $playerNickName;
                ?>
 is taken";
										</script>
									<?php 
            }
        }
    }
} else {
    createUserForm();
}
function createUserForm()
{
    echo '
						<form method="post"  action="" >
										
						<h4>
							Skapa ny spelare alla fält kan vara toma utom Nickname som måste vara unik
							orkar inte implementera Ajax lösning. Så du måste skicka in formuläret för att se om det är unikt
							
						</h4>	
						<p></p>
						<div id="createUser">
							<label>Nickname:</label> <input type="text" name="nickname" />
						</div>