Jump to content

nine7ySix

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Posts posted by nine7ySix

  1. nyxIn 1.00

    This is the first major release of nyxIn.

     

    nyxIn a gallery manager designed to integrate into your existing environment instead of being a site on its own.

     

    Requirements

    - PHP w/ SESSIONS started

    - An active MySQL connection

     

    Features:

    - Extremely easy set up

    - Blends right into your website (uses your existing CSS)

    - Auto thumbnail creation

    - Custom number of columns

    - Ability to change thumbnails

    - Simple menus

    - Easy gallery management

    - Password lock galleries

    - Batch moving of images

     

    Download here.

  2. There doesn't seem to be anything that looks wrong, but make sure you mysql_real_escape_string $name.

     

    Also $var doesn't seem have much use.

     

    Also might want to have $_SESSION["name"] equal something, if not, I would suggest just making a variable, instead of a $_SESSION, and you should try to use single quotes for these, instead of $_SESSION["name"], use $_SESSION['name'], it's best to try and be consistent.

     

    Also, you may get headers already sent errors because of your

     

    ?>

     

    <?php

     

    appearing everywhere.

     

    It would also be a good idea to check how many MySQL connections you're making.

  3. I uploaded it to a server, extracted it and I get the below error when I try to view any file.

     

    Internal Server Error

     

    The server encountered an internal error or misconfiguration and was unable to complete your request.

     

    Please contact the server administrator, webmaster@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

     

    More information about this error may be available in the server error log.

     

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

     

    PHP Version 5.3.8.

     

    I'm not sure what went wrong, but make sure you have an active MySQL connection, sessions enabled and don't open the files directly, open it through <?php require("nyxIn/index.php");?>.

    - gallery.php

    -nyxIn (folder)

    -- index.php

    -- other files

     

    On gallery.php, or whatever file you want the gallery to be shown in, place <?php require("nyxIn/index.php");?> within those <div> tags

     

    Hope this works

  4. I've written an ASCII Art Generator/Converter with PHP.

    The code can be found here http://fuzzicode.com/scripts/asciiartgenerator.

     

    I was wondering if anyone could suggest a way to improve the accuracy of the images produced.

    I was hoping to see if anyone knew if they could make a list of 51 characters (or any relatively large number that 255 is divisible by) that go from:

    Take up most space -> Take up least space

     

    An example of a character that would take up a lot of space would be @ or #, a character that would take up very little space would be . or even a space.

     

    Here is the .txt file for verification

     

    http://fuzzicode.com/phpfreaks.txt

     

    Thanks a lot!

     

    Any other feedback or suggestions are appreciated!

  5. How would i change it ? so it will work?

     

    Escape the single quotes

    <?php
    
    $the_blab_form = ' 
    
      <textarea id="add-status"class="status" onkeyup="limitText(this,350,\'.character-count\');detect_url(this.value);" onclick="limitText(this,350,\'.character-count\');detect_url(this.value);"></textarea><div><input class="button post" type="button" value="Post" id="'.$session.'" onClick="add_post(this.id)"/><div class="character-count">350</div>
              ';
    

     

  6. In PHP, the explode function is able to break a string into multiple array, it looks for a delimiter, in your case, the comma, and creates an array for each string inside the comma (<-- Badly worded :S)

     

    http://php.net/manual/en/function.explode.php

     

    So essentially,

     

    <?php
    $numbers = "1|20|30,20|10|5";
    $numArray = explode("," $numbers);
    
    //$numArray[0] = "1|20|30";
    //$numArray[1] = "20|10|5";
    
    //To further break the array, you would do
    
    foreach($numArray as $numList) {
    $nums = explode("|", $numList);
    foreach($nums as $num) {
    //Validate each $num
    }
    }
    

  7. I created a new Gallery Manager, which I have named nyxIn.

    It is designed to integrate into your existing environment instead of being a site on its own, like how many other Gallery Managers are.

     

    It's still in Beta stage, but the main features work and install is really easy.

     

    The download is available here and there is a README that contains information about INSTALL and UNINSTALL etc. located in the .zip

     

    http://fuzzicode.com/scripts/nyxIn

     

    Here is the .txt file for verification

     

    http://fuzzicode.com/phpfreaks.txt

     

    I am unable to provide good screenshots at the moment because it depends on your current CSS, you'll see when you try it.

     

    Thank a lot!

     

    All feedback is appreciated!

  8. Why are you saving the in quantity as the name of an input?

    Why can't you save the quantity as a separate input, in that case, you don't have to worry about $_POST['item_name_'.$x] not working.

    It would be a lot easier to understand the situation if you posted all of your code here.

  9. I'm not exactly sure, but you might want to store

    $x

    in a hidden input and get the value of

    $x

    in checkout.php.

     

    Because right now,

    $_POST = ['item_name_' . $x . ''];

    which I presume is on checkout.php, is meaningless without the

    $x

    value.

  10. My understanding is that you want to run a Query without anyone being at the site and at certain intervals.

     

    You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically.

     

    I don't know your exact code but if your server is managed with cPanel, I think cron is possible.

     

    how hard is it do with debian linux 64bit?

     

    what i run

     

     

     

    also

     

    pikachu,  the script alrdy does that.. but sum1's needs to view the lottery page for it run lol !

     

    I'm not very familiar with Linux, but this article looks helpful.

     

    http://www.debian-administration.org/articles/56

     

    Just know that .php files can be run with cron as well.

  11. Honestly, the website isn't that bad, if you're new at this.

    One thing you might think of changing the the layout of the main content.

     

    If you're familiar with the <table> tag, you should try and layout your content with them.

    Especially for the Menu pages and the Home page, to make everything look more coherent.

     

    Also, you should add the :hover thing, it'll make the navigation system a lot nicer.

    i'm a fan of lists.

     

    I just think that, for an easy website like this, content will be easier managed with tables.

  12. Honestly, the website isn't that bad, if you're new at this.

    One thing you might think of changing the the layout of the main content.

     

    If you're familiar with the <table> tag, you should try and layout your content with them.

    Especially for the Menu pages and the Home page, to make everything look more coherent.

     

    Also, you should add the :hover thing, it'll make the navigation system a lot nicer.

  13. Or more accurately, if you need to use quotes within the same type of quotes in a string, they must be escaped with a backslash.

     

    $string = "This is a double quoted \"string\" with double quotes in it.";
    $string1 = 'This is a single quoted\'string\' with single quotes in it'';
    

     

    You can use the opposite type of quote within a string without escaping them. If you want to use variables in a quoted string, you need to use double quotes to enclose the string.

     

    That being said, you have two single quotes at the end of $string1, either accidental or you forgot to escape :P

  14. My understanding is that you want to run a Query without anyone being at the site and at certain intervals.

     

    You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically.

     

    I don't know your exact code but if your server is managed with cPanel, I think cron is possible.

  15. Look on line 19

    echo ("Click here to go back: <a href="localhost/Sum.htm">Want to choose more numbers?</a>);
    

     

    You need a closing quotation.

     

    Also, you can't have double quotes within double quotes, that is a big no no.

     

    It should be

    echo ("Click here to go back: <a href='localhost/Sum.htm'>Want to choose more numbers?</a>");
    

    or

    echo ('Click here to go back: <a href="localhost/Sum.htm">Want to choose more numbers?</a>');
    

     

    Try using a PHP editor so you can see your mistakes easier. I hear NotePad++ is good for Windows and Textmate is good for Mac.

  16. Whenever I apply the changes I suggested, the code works for me.

     

    This is what I have

    <?php
    header("Cache-Control:no-cache");
    function setnum()
    {
    global $num;
    $num=rand(1,20);
    }
    ?>
    <html><head><title>Guessing Game</title></head>
    <body>
    <?php
    $num= check_input($_POST['num']);
    $guess = check_input($_POST['guess']);
    $self=check_input($_SERVER['PHP_SELF']);
    
    if ($num==null)
    {
    $msg="I have thought of a number between 1 and 20";
    $msg .="<h3>guess what it is... </h3>";
    setnum();
    }
    else
    {
    if (is_numeric($guess) && $guess==$num)
    {
    $msg = "CORRECT-THE NUMBER WAS $num";
    $msg .= "<h3><a href=\"$self\">";
    $msg .= "CLICK HERE TO TRY AGAIN</a></h3>";
    setnum();
    }
    else if (is_numeric($guess) && $guess>$num && $guess>0 && $guess<21)
    {$msg="You guessed $guess<h3>My number is lower</h3>";}
    else if (is_numeric($guess) && $guess<$num && $guess>0 && $guess<21)
    {$msg="You guessed $guess<h3>My number is higher</h3>";}
    
    else if ((is_numeric($guess) && $guess<1) or (is_numeric($guess) && $guess>20))
    {
    $msg="You have entered a number outside of the range of the game<h3>Please enter a number between 1 and 20</h3>";
    }
    else if (empty($_POST['guess']))
    {
    $msg="You did not enter anything into the text box that was provided<h3>Please enter a number between 1 and 20</h3>";
    }
    else
    {
    $msg="You did not enter a number into the text box that was provided<h3>Please enter a number between 1 and 20</h3>";
    }
    }
    echo ($msg);
    ?>
    
    <form action = "<?php $self ?>" method="post">
    <input type = "hidden" name = "num" value = "<?php echo $num; ?>">
    Guess: <input type="text" name = "guess">
    <input type = "submit" value = "Submit">
    </form>
    </body>
    </html>
    
    <?php
    function check_input($data)
    {
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
    }
    ?>
    

     

    Can you test to see if it works?

  17. I'm not exactly sure if you printed that array, but you would usually do this.

    <?php
    
    $array[0]['name'] = "John";
    $array[0]['age'] = 22;
    $array[0]['sex'] ="male";
    
    $array[1]['name'] = "Alice";
    $array[1]['age'] = 20;
    $array[1]['sex'] ="female";
    
    
    echo $array[0]['age']; //Will print out 22
    echo $array[1]['name']; //Will print out Alice
    echo $array[1]['sex']; //Will print out female
    
    

     

  18. First off, check your quotes.

     

    You are missing double quotes on lines 28, 38, 42 and 46.

    You are also missing a closing bracket on line 36.

    On line 55, you also misspelling submit, causing it to be a textbox instead of a submit button.

     

    I'll update this once I find other errors.

     

    And finally, on line 24, you wrote

    if (is_numeric($guess) && $guess=$num)

     

    Watch your usage of

    =

    and

    ==

     

    Simply change line 24 to

    if (is_numeric($guess) && $guess==$num)

×
×
  • 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.