-5

HTML5 ページの記事セクションにコンテンツ コンテナーがあります。ページの 1 つは PHP で、CSS が壊れています。ここでこれを行うためのより良い方法は何か、リダイレクトを正しく機能させるのにも問題があります。ページはこちらです。

 <!DOCTYPE HTML>
  <html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>ACTS</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link type="text/css" rel="apple-touch-icon-precomposed" href="../images/template/icon.png?v=1" />
    <link type="text/css" rel="apple-touch-startup-image" href="../images/template/startup_landscape.jpg?v=1" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
    <link type="text/css" rel="apple-touch-startup-image" href="../images/template/startup_portrait.jpg?v=1" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
    <link type="text/css" rel="stylesheet" href="includes/acts.css?v=1" />
    <script type="text/javascript" src="../includes/jquery-1.7.1.min.js">  </script>
    <script type="text/javascript" src="../includes/Iscroll4/iscroll.js"></script>
    <script type="text/javascript" src="../includes/acts.js?v=1"></script>
   </head>
    <body>
    <div class="page">
    <footer></footer>
    <article>
        <div class"content_container">
            <div class="content_loading_container"></div>
    </article>
    <header></header>
    <img class="banner_logo" src="images/template/logo.png?v=1" />
    <img class="banner_acts" src="images/template/ACTS_banner.png?v=1" />
    <img class="fire_clay" src="images/template/home_fire_clay.png?v=1" width="201" height="121" />
    <img class="fire_blue" src="images/template/fire_blue.png?v=1" width="169" height="131" />
    <img class="fire_black" src="images/template/fire_black.png?v=1" width="157" height="129" />
    <img class="fire_orange" src="images/template/fire_orange.png?v=1" width="420" height="440" />
    <nav>
        <a data-file="home.php?v=1">Home</a>
        <a data-file="Tracker.php?v=1">tracker</a>
        <a data-file="reports.php?v=1">Gallery</a>
        <a data-file="contact_us.html?v=1">Contact Us</a>
    </nav>
    </div>
   </body>
   </html>

PHP ページ:

<?php require_once("includes/tlsession.php"); ?>
<?php require_once("includes/actsconnection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php

    include_once("includes/form_functions.php");

    if (isset($_POST['submit'])) { 
        $errors = array();

        $required_fields = array('username', 'password');
        $errors = array_merge($errors, check_required_fields($required_fields, $_POST));

        $fields_with_lengths = array('username' => 30, 'password' => 30);
        $errors = array_merge($errors, check_max_field_lengths($fields_with_lengths, $_POST));

        $username = trim(mysql_prep($_POST['username']));
        $password = trim(mysql_prep($_POST['password']));
        $hashed_password = sha1($password);


        if ( empty($errors) ) {
                        $query = "SELECT id, username ";
            $query .= "FROM users ";
            $query .= "WHERE username = '{$username}' ";
            $query .= "AND hashed_password = '{$hashed_password}' ";
            $query .= "LIMIT 1";
            $result_set = mysql_query($query);
            confirm_query($result_set);
            if (mysql_num_rows($result_set) == 1) {
                $found_user = mysql_fetch_array($result_set);
                $_SESSION['user_id'] = $found_user['id'];
                $_SESSION['username'] = $found_user['username'];

                redirect_to("actstracker.php");
            } else {
                $message = "Username/password combination incorrect.<br />
                    SELF DESTRUCT INITIATED.";
            }
        } else {
            if (count($errors) == 1) {
                $message = "There was 1 error in the form.";
            } else {
                $message = "There were " . count($errors) . " errors in the form.";
            }
        }

    } else { // Form has not been submitted.
        if (isset($_GET['logout']) && $_GET['logout'] == 1) {
            $message = "You are now logged out.";
        } 
        $username = "";
        $password = "";
    }
?>
<body>
<h2>Login</h2>
<?php if (!empty($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
<?php if (!empty($errors)) { display_errors($errors); } ?>
<div class="page">
<footer></footer>
<article>
    <form action="team-lead-login.php" method="post">
            <table>
            <tr>

            <td>Team Lead:</td>
            <td><input type="text" name="username" maxlength="30" value="<?php echo htmlentities($username); ?>" /></td>
            </tr>

            <tr>
            <td>Password:</td>
            <td><input type="password" name="password" maxlength="30" value="<?php echo htmlentities($password); ?>" /></td>
            </tr>
            <tr>
            <td colspan="2"><input type="submit" name="submit" value="Login" /></td>
            </tr>
            </table>
        </form>

            <a href="tllogout.php">Logout </a>
</article>
<header></header>
<nav></nav>
</div>  
</body> 
4

1 に答える 1

0

これには終了 div タグがありません。そして、最初の div には等号がありません。

<article>
    <div class"content_container">
        <div class="content_loading_container"></div>
</article>

これでなければならない...

<article>
    <div class="content_container">
        <div class="content_loading_container"></div>
    </div>
</article>

それが、私が見ることができる唯一の構文エラーです。

今、あなたはこれらのphpページを追加すると言い、あなたがそうすると、サイトはがらくたになります。それはどうやってがらくたになるのですか?

于 2013-05-10T13:02:46.607 に答える