如何集成Thread和<il>

时间:2015-05-29 07:18:44

标签: php html css

想知道如何将线程组合到各个部分。当我在主页和所选分区上发布一个新主题时,如何添加到Section [ID],例如

www.site.com/ [节[ID] / [交[ID]

Add_post.php

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Add New Post</title>
    <style type="text/css">body{background-color: grey}
        .border{
            border: 5px solid blue;

            border-width:30px ;
        }</style>
</head>

<?php
require_once("../clude/conn.php");   //Calls in the previous file we created

// form not yet submitted
// display initial form
if (!$submit)
{

    ?>
    <center>

        <div class="border" style=" direction:rtl;margin-right:10px;">
            <h1 style="color: red;">Add New Post</h1>
            <br>
            <form action="<? echo $PHP_SELF; ?>" method="POST">
                <input type="hidden" name="id"  value="id">
                <h4 style="color: aqua">Title</h4>
                <input style="border-radius: 5px;color: red;" size="50" maxlength="60" type="text" name="title"><br />

                <h4 style="color: aqua">Content</h4>
                <textarea style="width: 60%; height: 400px"  name="content" cols="38" rows="10"></textarea> <br />
                <h4 style="color: aqua">Author</h4>
                <input style="border-radius: 5px;color: red;" size="50" maxlength="250" type="text" name="author"> <br />
                <br />  <input style="border: 2px dashed deepskyblue" type="Submit" name="submit" value="Add">
            </form>
        </div>
    </center>

<?

} else {

//set up error array 
    $err = array();
    $count = 0;

    //validate the user text input fields
    if (!$title) { $err[$count] = "Invalid entry: title"; $count++; }

    if (!$content) { $err[$count] = "Invalid entry: content"; $count++; }

    if (!$author) { $err[$count] = "Invalid entry: author"; $count++; }

    // if no error found...
    if (sizeof($err) == 0) {

        // generate and execute query to insert the post
        $query = "INSERT INTO exploit(id,title, content, author, date) VALUES(0,'$title', '$content', '$author', NOW())";
        $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());

        // print result
        echo "<center><h1 style='color: aqua'>Post Added</h1><br /><h1 style='color: red'><a href='index.php'>Go To Home</a></h1></center>.";
    } else {
        // errors found
        // print as list
        echo "<center><h1 style='font-size:100px;color: aqua; text-shadow: 4px 1px 15px red;'>Error in Form</h1></center>";
        echo "<ul>";
        for ($x=0; $x<sizeof($errorList); $x++) {
            echo "<li>$errorList[$x]";
        }
        echo "</ul></font>";
    }
}
?> 

的index.php

<html>
<head>
    <meta charset="UTF-8">
    <title>Exploit | Database</title>
    <meta name='keywords' content='exploit,local,remote,arab,lfi,sql injection,buffer overflow,dos,ddos, priv8 exploit, 0day exploit, 2.6.18 kernel exploit 0day, localroot, priv8 exploit, how to deface, hack, how to hack, exploits, 0day exploits , x00x_team , '>
    <meta name='description' content='Exploit Database Vulnerability reports, 0days, remote exploits, local exploits, security articles, tutorials and more.'>
    <link rel="stylesheet" type="text/css" href="themes/default/style/style9.css" media="all">
    <link rel='stylesheet' href='themes/system.css'>
    <script src="jquery.min.js"> </script>
    <style type="text/css">
        body{     background:url(img/bg.png) !important; }
#code {
padding:5px;
border:1px  dashed;
background-color:#353535;

direction: ltr;
text-align:  left;
height:250px;
overflow-y:scroll;
} 
textarea{
background-color:#353535;
color: red;
border-shadow: 4px 1px 18px white;
height:100%;
width:100%;
}
    </style>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="typed.js" type="text/javascript"></script>
    <script>
        $(function(){

            $("#typed").typed({
                strings: ["welcome in <strong>Database</strong> Exploit.", "we <em>have</em> Big Database Exploit.", "And How Close It", "Enjoy in Site!"],
                typeSpeed: 30,
                backDelay: 500,
                loop: false,
                contentType: 'html', // or text
                // defaults to false for infinite loop
                loopCount: false,
                callback: function(){ foo(); },
                resetCallback: function() { newTyped(); }
            });

            $(".reset").click(function(){
                $("#typed").typed('reset');
            });

        });

        function newTyped(){ /* A new typed object */ }

        function foo(){ console.log("Callback"); }

    </script>
    <link href="main.css" rel="stylesheet"/>
    <style>
        /* code for animated blinking cursor */
        .typed-cursor{
            opacity: 1;
            font-weight: 100;
            -webkit-animation: blink 0.7s infinite;
            -moz-animation: blink 0.7s infinite;
            -ms-animation: blink 0.7s infinite;
            -o-animation: blink 0.7s infinite;
            animation: blink 0.7s infinite;
        }
        @-keyframes blink{
        0% { opacity:1; }
        50% { opacity:0; }
        100% { opacity:1; }
        }
        @-webkit-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-moz-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-ms-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-o-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
    </style>
    <link rel="icon" href="Radiation.ico" type="image/ico" sizes="16x16">
</head>
<body><style>
    #wg-rosebar {
        width:100%;
        position:fixed;
        top:0;
        left:0;
    }

    #wg-rosebarbtm {
        border-bottom:3px solid #000;
        background-color:#7f103c;
        overflow:none;
        width:100%;
        height:40px;
        position:fixed;
        top:0;
        left:0;
    }

    #wg-rosebarbtmdata {
        color:#fff;
        padding:5px;
    }

    #wg-rosebarbtmhide {
        position:absolute;
        top:4px;
        right:12px;
        width:20px;
        height:20px;
        cursor:pointer;
    }

    #wg-rosebarbtmshow {
        position:absolute;
        top:0;
        right:5px;
        width:30px;
        height:25px;
        cursor:pointer;
        background-color:#F60;
        padding-top:5px;
        border-bottom:3px solid #000;
        border-left:3px solid #000;
        border-right:3px solid #000;
        border-bottom-right-radius:5px;
        border-bottom-left-radius:5px;
    }

    .wg-rosebarbtmdownarrow {
        width:0;
        height:0;
        border-left:10px solid transparent;
        border-right:10px solid transparent;
        border-top:10px solid #CC5200;
    }

    .wg-rosebarbtmblock {
        width:8px;
        height:10px;
        background-color:#CC5200;
    }

    .wg-rosebarbtmuparrow {
        width:0;
        height:0;
        border-left:10px solid transparent;
        border-right:10px solid transparent;
        border-bottom:10px solid #CC5200;
    }
</style>
<div id="wg-rosebar" >
    <div id="wg-rosebarbtm" >
        <style>

            .wg-ribmenu span {
                background:#7f103c;
                display:inline-block;
                color:#FFFFFF;


                line-height:40px;
                padding:0 1em;
                margin-top:0.0em;
                position:relative;
                -webkit-transition: background-color 0.2s, margin-top 0.2s;
                -moz-transition: background-color 0.2s, margin-top 0.2s;
                -ms-transition: background-color 0.2s, margin-top 0.2s;
                -o-transition: background-color 0.2s, margin-top 0.2s;
                transition: background-color 0.2s, margin-top 0.2s;
            }
            .wg-ribmenu a:hover span {
                background:#FFD204;
                margin-top:0;

            }
            .wg-ribmenu span:before {
                content: "";
                position:absolute;
                top:40px;
                right:0;
                border-left:0.5em solid #9B8651;
                border-bottom:0.5em solid #7f103c;
            }

            .wg-ribmenu span:after {
                content: "";
                position:absolute;
                top:40px;
                left:0;
                border-right:0.5em solid #9B8651;
                border-bottom:0.5em solid #7f103c;
            }
            .wg-ribmenu a:link, .wg-ribmenu a:visited {
                color:#000;
                text-decoration:none;
                float:right;
                height:40px;
                overflow:hidden;
            }

        </style>

        <div class='wg-ribmenu'>
            <a href='/index.html'><span><img class="fa-fa-home"/></span></a>
            <a href='admin/index.php'><span>Add Post</span></a>
        </div>

    </div></div>
<div class="wrap">
    <h1 class="h1" style="color: #ff0000">Welcome in Database</h1>

    <div class="type-wrap">
        <span id="typed" style="white-space:pre;"></span>
    </div>
<div class='body'><h1 class='title'><a class='teko' href='index.php' title='Exploit Big Database'>Posts</a></h1><table border='1' align='center' width='98%'>
    <tr class='trhead'>
        <td width='10%'>Date</td>
        <td class='left'>Title</td>
        <td width='12%'>Author</td>

    </tr>
        <?php

        include_once 'clude/conn.php';
        $sql = "SELECT * FROM exploit";

        $q = mysql_query($sql);

        $num_row = mysql_num_rows($q);
        while($articles = mysql_fetch_array($q)) {

            ?>


            <tr class="exploit">
                <td><?php echo $articles['date'];?></td>
                <td><a href="exploit.php?id=<?php echo $articles['id']; ?>"><?php echo $articles['title']; ?></a></td>
                <td><?php echo $articles['author'];?></td>
            </tr>


        <?php
        }

        mysql_close();
        ?>
    </table> </div>  </div>
</body>
</html>

2 个答案:

答案 0 :(得分:0)

我相信您正在寻找的是 Mod Rewrite ,这涉及到编辑.htaccess文件。

请参阅https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

另外http://www.workingwith.me.uk/articles/scripting/mod_rewrite

答案 1 :(得分:0)

解决是:

COUNT_1BITS:
; Calculate number of 1 bits in A
; Return number in A

XCH A,R0
PUSH ACC   ; Save old R0 value to stack
XRL ACC,A  ; Clear A
XCH A,R0   ; Fetch value and clear counter

RRC A      ; Move bit0 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 0
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit1 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 1
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit2 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 2
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit3 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 3
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit4 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 4
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit5 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 5
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit6 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 6
XCH A,R0   ; Save counter, fetch A

RRC A      ; Move bit7 to C
XCH A,R0   ; Save A, fetch counter
ADDC A,#0  ; Count Bit 7
XCH A,R0   ; Save counter, fetch A

POP ACC    ; Fetch old R0 value
XCH A,R0   ; Exchange A and R0

; Now the number of 1 bits is in A 
; and R0 has its previous value again

RET

show_cat.php / example

   
    <?php
    include_once 'clude/conn.php';
    $sql = "SELECT * FROM posts";
    $q = mysql_query($sql);

    $num_row = mysql_num_rows($q);
    while($articles = mysql_fetch_array($q)) {
        ?>
        <div class="row"><div class="col-md-12"><div class="boxed">
                    <a href="show_posts.php?post=<?php echo $articles['id']; ?> "> <h1><?php echo $articles['title']; ?></h1></a>
                    <p><?php echo $articles['description']; ?></p>
                    <hr>
                    <?php
                    include_once 'clude/conn.php';
                    $sql = "SELECT * FROM store";
                    $w = mysql_query($sql);

                    $num_row = mysql_num_rows($w);
                    while($imagee = mysql_fetch_array($w)) {
                        ?>

                       <img src="<?php echo $imagee['image']; ?>">

                    <?php
                    }
                    ?>
                    <hr>


                </div></div></div>


    <?php
    }


    mysql_close();
    ?>