Jump to content

helpmeplease2

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

Posts posted by helpmeplease2

  1. I need an AJAX commenting and reply system. It needs to work around my current setup which grabs a logged in member's id from a cookie and gets their username from the database, it also must secure it to make sure users can't just change the id in the cookie. Users need to have the ability to reply to comments directly rather than posting a new comment or post a new comment - like how youtube's work. Ajax pagination is also required.

     

    It needs to email the video creator informing them of a new comment. A reply should also trigger a second email to the original commenter and anyone who has replied to that comment.

     

    Email me at derek_dude12@yahoo.com with how much it will cost in total. I pay once I see results.

  2. http://www.gameanyone.com/video/453.68734.html

     

    At the bottom of each video it has a scroller to switch between videos. I have it limited to only show 12 results now as any more and it would take a while to load. I would like it to only load the first 4 and then when a user clicks the arrows it will load another 4 using ajax. I want it so it can go throughout all the videos, not just limited to 12.

     

    Because the scroller is already made, this is probably just some simple ajax that is needed to be implemented.

     

    Email me at derek_dude12@yahoo.com if you are interested. Let me know your asking price.

  3. When I use:

     

    <div style="font-size:9px;">words</div>

     

    the words are not showing up as 9px, they are showing up as 11px because of what I have set for link sizes in my stylesheet....

     

    a:link, a:visited, a:active

    {

    font-family: Arial,Verdana,Sans-serif,serif;

    font-size: 11px;

    font-weight: bold;

    text-decoration: none;

    color: #bdbdbd;

    }

     

    How can I make it do what I tell it to?

  4. I am trying to make it so it selects all videos that are not on a playlist. Videos are entered on a playlist in playlistvideos as either a single videoid or a range.

     

    So how can I say WHERE videos.ID != playlistvideos.videoid AND videos.ID NOT BETWEEN playlistvideos.range AND playlistvideos.range2

     

    SELECT playlistvideos.videoid
         , playlistvideos.range
         , playlistvideos.range2
     , videos.ID
     , videos.VTitle
     , videos.IFilename
     , videos.videoid
     , videos.GTitle
    FROM playlistvideos
    INNER
      JOIN videos
        ON videos.ID = playlistvideos.videoid
       OR videos.ID BETWEEN playlistvideos.range AND playlistvideos.range2
    WHERE videos.GTitle = '$game' AND videos.VTitle NOT LIKE '%</a>%' ORDER BY videos.ID DESC LIMIT $offset, $rowsPerPage

  5. I want an AJAX commenting system similar to YouTube's. I already have some of it made, but not the ajax part.

     

    It must have these features:

    Only show comment box to users who are logged in.

    Ability to reply to comments like how YouTube's work.

    Email sent to video maker when a new comment is made.

    Email sent to commenter when a reply is made to that comment.

    AJAX comment insertion.

    AJAX pagination.

     

    $50 through PayPal.

     

    Add me on MSN or email me: derek_dude12@yahoo.com

  6. So I am using this to get the number of views in a week... but do I set 'date' as a normal 'date' type in phpmyadmin? And I don't see how it would know when the views were viewed unless it logged each view in it's own row.

     

    <?php
    $period = 604800;
    $query = "SELECT * FROM `games` WHERE `date` < '".(($now = time()) - $period)."'"; 
    $result = mysql_query($query);
    
    while($row = mysql_fetch_array($result)){ 
    
    $views=$row['views'];
    
    }
    ?>

  7. How can I do this?

     

    I want to keep track of the most viewed games on my website (www.gameanyone.com)

     

    I can guess that you add some $b=$a+1; and then insert the $b.. but that would only count views. How can I count the number of views in the last week or better the last 7 days?

  8. I made it so I can show replies correctly. Now how do I make it to INSERT replies? I want to make it so it shows a new textarea box when a user clicks reply. I have done this, but I am having problems inserting the comment id that it is a reply to.

     

    http://www.gameanyone.com/?p=video&game=Crysis&id=9541

     

    There is alot of code, too much to post here.

     

    And if you click reply you can see that the new textarea box would only appear below the first comment, not under the comment that the reply is for.

     

    *cry* If I emailed one of you all the code would you make it work? *cry*

  9. I already have an ajax commenting system, but I want to add the feature to allow users to reply to comments. Is there someone who knows how to do this?

     

    I am a beginner at PHP so I'm pretty sure I can't do this myself.

     

    If you can add the ability to reply to comments like on YouTube then you can have a link on my website for free. (site: www.gameanyone.com)

     

    Email me if you want to help you: derek_dude12@yahoo.com

  10. I am using this code which I found on about.com and I have changed it to my needs but it is not working. No results appear when a search is made. I do have a database with many rows of data.

     

    Now can someone head in me the right direction to making this work?

     

    <?php
    
    echo "<h3>Search</h3>
    
    <form name='search' method='post' action='$PHP_SELF'>
    
    Search for: <input type='text' name='find' /> in
    
    <Select NAME='field'>
    
    <Option VALUE='VTitle'>Videos</option>
    
    <Option VALUE='GTitle'>Games</option>
    
    </Select>
    
    <input type='hidden' name='searching' value='yes' />
    
    <input type='submit' name='search' value='Search' />
    
    </form>";
    
    
    if ($searching =="yes")
    
    {
    
    echo "<h1>Search Results</h1><p>";
    
    
    
    if ($find == "")
    
    {
    
    echo "<p>You forgot to enter a search term.";
    
    exit;
    
    }
    
    
    
    $find = strtoupper($find);
    
    $find = strip_tags($find);
    
    $find = trim ($find);
    
              echo "<table cellspacing='0' cellpadding='0' class='bordercolor' border='0'  style='margin-top: 1px; vertical-align: top;' align='center'>";
    
    
    
    $row = mysql_query("SELECT GTitle,VTitle,IFilename FROM videos WHERE upper($field) NOT LIKE '</a>' AND upper($field) LIKE '%$find%'");
    
    
    
    while($result = mysql_fetch_array( $row ))
    
    {
    
        $game=$row['GTitle'];
    
    $video=$row['VTitle'];
    
    $image1=$row['IFilename'];
    
    if ($image1==""){
    
    $image="images/favicon.gif";
    
    }else{
    
    $image=$row['IFilename'];
    
    }
    
    
    
         		echo "<tr>
    
    <td class='windowbg2' width='150' align='center'><div class='windowbg2' style='width:150; align:center;'><img src='$image' border='0' height='75'></div></td>
    
    			<td class='windowbg2' width='485' valign='center'>
    
    <a href='http://www.gameanyone.com?p=game&game=$game'>$game</a>:<br> 
    
    <a href='http://www.gameanyone.com?p=video&game=$game&video=$video'>$video</a></td></tr>";
    
    
    
    
    
    }
    
         echo "</table>";
    
    $anymatches=mysql_num_rows($data);
    
    if ($anymatches == 0)
    
    {
    
    echo "Sorry, but we can not find an entry to match your query<br><br>";
    
    }
    
    
    echo "<b>Searched For:</b> " .$find;
    
    }
    
    ?>

     

    Edit: To see the page go here: http://www.gameanyone.com/?p=thesearch

  11. I am trying to make thumbnails from each .flv file using ffmpeg. I want a script to make the thumbnails. I am new to php and I am having trouble. I am using this currently, but its not making any thumbnails. ffmpeg does work by itself, so there is something wrong with my noobish PHP. I would also like to somehow remove the .flv extension and make it .jpg. Some help please?
    
    <?php
    $path = "videos";
    $dir_handle = @opendir($path) or die("Unable to open $path");
    
    while ($file = readdir($dir_handle))
    {
       if($file!="." && $file!="..")
       exec("START c:/ffmpeg/ffmpeg -vcodec jpeg -i $file -ss  00:00:30 -vframes 1 images2/$file.jpg");
    }
    closedir($dir_handle);
    ?>

  12. ok.... well i just got this next script from a free script website and its not working either:

     

    login.php

    <?php
    require('includes/config.php');
    require('includes/dbconnect.php');
    
    if(isset($_COOKIE['apexclan.com']))
    
    {
    $username = $_COOKIE['apexclan.com'];
    $pass = $_COOKIE['apexclan.com'];
    $check = mysql_query("SELECT * FROM members WHERE username = '$username'")or die(mysql_error());
    while($info = mysql_fetch_array( $check ))
    {
    if ($pass != $info['password'])
    {
    }
    else
    {
    header("Location: members.php");
    
    }
    }
    }
    
    
    if (isset($_POST['submit'])) {
    
    if(!$_POST['username'] | !$_POST['pass']) {
    die('You did not fill in a required field.');
    }
    
    if (!get_magic_quotes_gpc()) {
    $_POST['email'] = addslashes($_POST['email']);
    }
    $check = mysql_query("SELECT * FROM members WHERE username = '".$_POST['username']."'")or die(mysql_error());
    
    $check2 = mysql_num_rows($check);
    if ($check2 == 0) {
    die('That user does not exist in our database.');
    }
    while($info = mysql_fetch_array( $check ))
    {
    $_POST['pass'] = stripslashes($_POST['pass']);
    $info['password'] = stripslashes($info['password']);
    $_POST['pass'] = md5($_POST['pass']);
    
    if ($_POST['pass'] != $info['password']) {
    die('Incorrect password, please try again.');
    }
    
    else
    {
    
    $_POST['username'] = stripslashes($_POST['username']);
    $hour = time() + 3600;
    setcookie(ID_my_site, $_POST['username'], $hour);
    setcookie(Key_my_site, $_POST['pass'], $hour);
    
    header("Location: members.php");
    }
    }
    }
    else
    {
    
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    <table border="0">
    <tr><td colspan=2><h1>Login</h1></td></tr>
    <tr><td>Username:</td><td>
    <input type="text" name="username" maxlength="40">
    </td></tr>
    <tr><td>Password:</td><td>
    <input type="password" name="pass" maxlength="50">
    </td></tr>
    <tr><td colspan="2" align="right">
    <input type="submit" name="submit" value="Login">
    </td></tr>
    </table>
    </form>
    <?php
    }
    
    ?>

     

    members.php

    <?php
    require('includes/config.php');
    require('includes/dbconnect.php');
    
    if(isset($_COOKIE['apexclan.com']))
    {
    $username = $_COOKIE['apexclan.com'];
    $pass = $_COOKIE['apexclan.com'];
    $check = mysql_query("SELECT * FROM members WHERE username = '$username'")or die(mysql_error());
    while($info = mysql_fetch_array( $check ))
    {
    
    if ($pass != $info['password'])
    { header("Location: login.php");
    }
    
    else
    {
    echo "<a href='logout.php'>Logout</a>";
    }
    }
    }
    else
    {
    header("Location: login.php");
    }
    ?>

     

    When I click to login it just shows me the login box still where it should show me a logout link.

  13. index.php

    <?php
    session_start();
    header("Cache-Control: private");
    require('includes/config.php');
    require('includes/dbconnect.php');
    
    require('includes/logincheck.php');
    
    if(isset($_SESSION['Username']) && isset($_SESSION['Password'])){
    include('includes/rightusercp.php');
    }else{
    include('includes/rightmain.php');
    }
    
    $p="includes/" . $_GET['p'] . ".php";
    if($_GET['p']==''){
    $p="includes/main.php";
    }
    $c="includes/" . $_GET['c'] . ".php";
    if($_GET['c']==''){
    $c="includes/home.php";
    }
    if(isset($_SESSION['Username']) && isset($_SESSION['Password'])){
    include($c);
    }else{
    include($p);
    }
    ?>

     

    logincheck.php

    <?php
    if($_GET['logout']=='y'){
    session_unset();
    require('config.php');
    require('includes/dbconnect.php');
    }
    
    if(empty($_SESSION['Username'])){
    if(($_POST['Username']!='') && ($_POST['Password']!='')){
    $tmpusr=$_POST['Username'];
    $results=mysql_query("select Username,Password from members where Username='$tmpusr'");
    $row=mysql_fetch_assoc($results);
    if (mysql_num_rows($results)==0) {
    echo "Invalid Username!";
    }elseif($row['Password']!=$_POST['Password']){
    echo "Invalid Password!";
    }else{
    $Username=$_POST['Username'];
    $Password=$_POST['Password'];
    session_register("Username");
    session_register("Password");
    $Username=$_SESSION['Username'];
    $Password=$_SESSION['Password'];
    
    }
    
    }
    }
    ?>

     

    main.php

    <table border="0" cellpadding="10" cellspacing="0" align="center"><tr><td align="center">
    <div style="width:243px; height:120px;">
    <div class="smplan2" align="left">
    Members, please sign-in below:
    <form action="index.php" method="post" style="padding:0px; margin:0px"><table border="0"><tr><td width="60"><div class="smplan2" align="left">
    <b>Username:</b></div></td><td><input class="searchf" type="text" name="Username" size="20"></td></tr><tr><td><div class="smplan2" align="left">
    <b>Password:</b></div></td><td><input class="searchf" type="password" name="Password" size="20"></td></tr></table>
    <button type="submit" class="buttons">Login</button>
    </div>
    </div>

     

    When I login the page doesn't change. The database is working fine theres just something here thats wrong. Please help.

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