Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    511
    Tokens
    932
    Habbo
    BelieveMeSafety

    Latest Awards:

    Default confused with this php script

    Okay i am very puzzled here ... when i go on my page http://www.habbopfm.co.uk/#/content/scam and click view scam profile ...

    it keeps bringing up jaylifa's scam profile instead of seperate one's for .dependant and jaylifa, asif it's a static id ... yet my code below should work.

    PHP Code:
    <?php
      error_reporting
    (0);
      require_once( 
    $_SERVER['DOCUMENT_ROOT'] . "/staff/_inc/glob.php" );
      
    $q  =  $db->query"SELECT * FROM `scam_list` ORDER BY `id` DESC" );
    ?>

    <p>These are the people who have have scammed in the casino royale on habbo.com</p>
    <center>
      <?php
      
      
    while( $items $db->assoc$q ) )
      {
        
    $url "_frontend/{$items['id']}-";
        
    $url "staff/_frontend/view.php?id={$items['id']}";
          echo 
    "<div style=\"margin-left: 5%; float:left; width:25%; text-align:center;\"><center>";
              echo 
    "<img class=\"tooltip\" title=\"I am{$items['name']}, i scammed {$items['quantity']}<br>off the user {$items['victim']}. This got me removed by {$items['removedby']} at the casino royale.\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?user={$items['name']}&action=std&direction=3&head_direction=3&gesture=sad&size=m&actio
    \" />"
    ;
         
            echo 
    "<br />";
            echo 
    "<span class=\"habboname\">{$items['name']}</span>";
          echo 
    "<br/><a id=\"scamprofile\" class=\"fancybox.ajax\" href=\"#\">View full Scam Profile</a>";
            
          echo 
    "</center></div>";
           
        }
    ?>
      
    <script type="text/javascript">
          jQuery(document).ready(function() {
            jQuery("#scamprofile").fancybox({
              maxWidth  : 400,
              maxHeight  : 400,
              fitToView  : false,
              width    : '60%',
              height    : '60%',
              autoSize  : true,
              closeClick  : false,
              href    : '<?php echo $url ?>',
              scrolling  : 'no'
            });
          });
          </script>
      
    </center>
    <div style="clear:both;"></div>
    Does anyone have any ideas why this is just making it pull up http://www.habbopfm.co.uk/staff/_frontend/view.php?id=3 and not seperate ones for each profile?

  2. #2
    Join Date
    Oct 2011
    Location
    Melbourne
    Posts
    637
    Tokens
    1,376

    Default

    Because it is echoing a static code. Go to http://www.habbopfm.co.uk/content/scam.php#scamprofile and view the source, it says href : 'staff/_frontend/view.php?id=3 . You need to make it so that isn't static. I am a simple man, so I would have something like you do with your Rare Values script where when you click on the picture it loads the next page.

    edit:

    something like this - this is untested and all I've done is add a hyperlink to the image of the Habbo. Also maybe it's worth finishing the picture URL off, not just end it with "&actio".


    PHP Code:
    echo "<div style=\"margin-left: 5%; float:left; width:25%; text-align:center;\"><center>";

    echo 
    "<a href=\"$url\"><img class=\"tooltip\" title=\"I am{$items['name']}, i scammed {$items['quantity']}<br>off the user {$items['victim']}. This got me removed by {$items['removedby']} at the casino royale.\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?user={$items['name']}&action=std&direction=3&head_direction=3&gesture=sad&size=m&actio\" /></a>"
    Okay, it doesn't display the formatting for me. Sorry.
    Last edited by Blinger; 15-02-2014 at 04:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •