Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by AyKay47

  1. This is pseudo code based off of what you stated, it will needed tweaked most likely.

     

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^/?(index)(?:/(.*))?$ index.php?action=$1&sub=$2

     

    Now this will serve the file like so:

     

    index.php?action=index&sub=a1/a2/a3/a4/a5

     

    so you will have to do some tweaking on your end to handle the changed delimiter.

  2. you can filter an array using the oddly named function array_filter().

     

    heh...

    Psycho, my thoughts are that the OP stated he is grabbing files from a directory and looping through them to display them each in a new tbl row.

    I'm thinking he can use glob to grab all of the .jar files from the directory and foreach through them that way, something like this:

     

     

    Unless one of the files happens to be named .JAR, .Jar, etc. Then, using "*.jar" in the glob() function will not work. glob() doesn't accept true regex expressions, but you can build a case-insensitive expression using the function I posted above.

     

    ah, just noticed the edit to your thread, yes that should work, any clue what the non-deprecated function is now, if one exists?.

    But again, until the OP responds, we can really only guess at the actual logic and if this will work in this case.

  3. you can filter an array using the oddly named function array_filter().

     

    heh...

    Psycho, my thoughts are that the OP stated he is grabbing files from a directory and looping through them to display them each in a new tbl row.

    I'm thinking he can use glob to grab all of the .jar files from the directory and foreach through them that way, something like this:

     

    ?>
    <table>
    <?php
    foreach(glob("/path/to/dir/*.jar") as $filename)
    {
        echo "<tr><td>".$filename."</td>";
        echo "<td><a href='index.php?dp=".$filename."'>Disable Plugin</a></td></tr>";
    }
    ?>
    </table>

     

    then again, I can only guess on the actual logic at this point.

  4. Gah, everytime I post a thread I figure the solution out immediately after.

    div#nav li.contact {
    # background-color:#DB4848;
    text-decoration: none;
    color: white;	
    font-weight: bold;
    font-size: 22px;
    position:absolute;
    bottom:0px;
    left:0px;
    width:130px;
    }
    

    I suppose this is solved now.

     

    Do you want the <li> to stay in the bottom left of the screen even when the page is scrolled, or just until the page is scrolled?

  5. Thank you AyKay47.

     

    To be honest, I have no idea how to use that.

    How would I know what it's grabbing?

    Can you echo out what it grabbed?

     

    I know I sound like a moron, but I haven't the first clue with jQuery

     

    the code I provided will alert the grabbed text for each span.

  6. in jQuery it would be $(".labelelementvalue").innerHTML(); Look up the jQuery docs if you need help getting started using jQuery.

     

    1. there are multiple elements that need to be grabbed, your method will only grab the last element.

     

    $(".labelelementvalue").each(function(i,e) {

        alert(i + ': ' $(this).text()); // or $(this).html()

    });

     

    is what you want (above is pseudo code)

     

    2. .innerHTML() is not a jquery function, use either .text() of .html();

  7. rewrite rules are not meant to actually change the url for you, they give a means of accessing the same page by using a "prettier" URL.

    It's up to you to reconstruct your website to use those pretty urls.

  8. Scootstah beat me to it here, but he's correct on one account.

    Since $super is passed from the query string, it is type string.

    So either cast it to an int or use intval() to sanitize the data.

    and be consistent with field qualifiers.

     

    $super = intval($_GET['video_id']);
            $filmai = $TSUE['TSUE_Database']->query("SELECT rasta_cinema.video_id, rasta_cinema.name, rasta_cinema.description, rasta_cinema.video_name, rasta_cinema.thumb_image FROM rasta_cinema WHERE rasta_cinema.video_id = $super LIMIT 1");

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