mastercjb Posted June 2, 2009 Share Posted June 2, 2009 I have a script im trying to modify. this script shows users there stats, I have made a table at the top that should only be seen by people with 0 rmdays, meaning they are not a member. I need a code that when a user hits 0 rmdays this message will then show to them, but will not show to people with rmdays. Here is the full page script: <? include 'header.php'; ?> <table class="content"> <tr> <td class="contenthead">Become A Respected Mobster</td> </tr> <tr> <td class="contentcontent"> <table width='100%'> <tr> <td width='50%'><center>You're not a Respected Mobster yet! Why not?<br><br> You're missing out!<br><br> <a href="rmstore.php">Upgrade Now!<br> Starting From $3.00!</a></td><br></center> <td width='50%'>.: Bank Interest is DOUBLED!<br> .: Respected MR Member Status!<br> .: Cash Bonus on Purchase!<br> .: Points Bonus on Purchase<br> .: Access to RM Only Features!</td> </tr> </table> </td> </tr> <tr> <td class="contenthead">General Information</td> </tr> <tr> <td class="contentcontent"> <table width='100%'> <tr> <td width='15%'>Name:</td> <td width='35%'><a href='profiles.php?id=<? echo $user_class->id; ?>'><? echo $user_class->formattedname; ?></a></td> <td width='15%'>HP:</td> <td width='35%'><?php echo $user_class->formattedhp; ?></td> </tr> <tr> <td width='15%'>Level:</td> <td width='35%'><? echo $user_class->level; ?></td> <td width='15%'>Energy:</td> <td width='35%'><?php echo $user_class->formattedenergy; ?></td> </tr> <tr> <td width='15%'>Money:</td> <td width='35%'>$<? echo $user_class->money; /*money_format('%(#10n', $user_class->money);*/ ?></td> <td width='15%'>Awake:</td> <td width='35%'><?php echo $user_class->formattedawake; ?></td> </tr> <tr> <td width='15%'>Bank:</td> <td width='35%'>$<? echo $user_class->bank; /*money_format('%(#10n', $user_class->bank);*/ ?></td> <td width='15%'>Nerve:</td> <td width='35%'><?php echo $user_class->formattednerve; ?></td> </tr> <tr> <td width='15%'>EXP:</td> <td width='35%'><?php echo $user_class->formattedexp; ?></td> <td width='15%'>Work EXP:</td> <td width='35%'><? echo $user_class->workexp; ?></td> </tr> <tr> <td width='15%'>Prostitutes:</td> <td width='35%'><?php echo $user_class->hookers; ?></td> <td width='15%'>Marijuana:</td> <td width='35%'><?php echo $user_class->marijuana; ?></td> </tr> </table> </td> </tr> <tr> <td class="contenthead">Attributes</td> </tr> <tr> <td class="contentcontent"> <table width='100%'> <tr> <td width='15%'>Strength:</td> <td width='35%'><? echo $user_class->strength; ?></td> <td width='15%'>Defense:</td> <td width='35%'><? echo $user_class->defense; ?></td> </tr> <tr> <td width='15%'>Speed:</td> <td width='35%'><? echo $user_class->speed; ?></td> <td width='15%'>Total:</td> <td width='35%'><? echo $user_class->totalattrib; ?></td> </tr> </table> </td> </tr> <tr><td class="contenthead">Battle Stats</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <td width='15%'>Won:</td> <td width='35%'><? echo $user_class->battlewon ?></td> <td width='15%'>Lost:</td> <td width='35%'><? echo $user_class->battlelost; ?></td> </tr> <tr> <td width='15%'>Total:</td> <td width='35%'><? echo $user_class->battletotal; ?></td> <td width='15%'>Money Gain:</td> <td width='35%'>$<? echo $user_class->battlemoney; ?></td> </tr> </table> </td> </tr> <tr> <td class="contenthead">Crime Stats</td> </tr> <tr> <td class="contentcontent"> <table width='100%'> <tr> <td width='15%'>Succeeded:</td> <td width='35%'><? echo $user_class->crimesucceeded; ?></td> <td width='15%'>Failed:</td> <td width='35%'><? echo $user_class->crimefailed; ?></td> </tr> <tr> <td width='15%'>Total:</td> <td width='35%'><? echo $user_class->crimetotal; ?></td> <td width='15%'>Money Gain:</td> <td width='35%'>$<? echo $user_class->crimemoney; ?></td> </tr> </table></td> </tr> <? include 'footer.php'; ?> Here is the table in there that I need to be only veiwable by people with 0 rmdays left: <table class="content"> <tr> <td class="contenthead">Become A Respected Mobster</td> </tr> <tr> <td class="contentcontent"> <table width='100%'> <tr> <td width='50%'><center>You're not a Respected Mobster yet! Why not?<br><br> You're missing out!<br><br> <a href="rmstore.php">Upgrade Now!<br> Starting From $3.00!</a></td><br></center> <td width='50%'>.: Bank Interest is DOUBLED!<br> .: Respected MR Member Status!<br> .: Cash Bonus on Purchase!<br> .: Points Bonus on Purchase<br> .: Access to RM Only Features!</td> </tr> </table> </td> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/160600-show-script-to-only-people-with-0-rmdays/ Share on other sites More sharing options...
rhodrykorb Posted June 2, 2009 Share Posted June 2, 2009 log their ips in some way (maybe a DB), kind of like rapidshare does for free users Quote Link to comment https://forums.phpfreaks.com/topic/160600-show-script-to-only-people-with-0-rmdays/#findComment-847621 Share on other sites More sharing options...
mastercjb Posted June 2, 2009 Author Share Posted June 2, 2009 how would that help hide the script? Quote Link to comment https://forums.phpfreaks.com/topic/160600-show-script-to-only-people-with-0-rmdays/#findComment-847910 Share on other sites More sharing options...
Ken2k7 Posted June 2, 2009 Share Posted June 2, 2009 I assumed the site has a registration system? If so, query the database and check if the user's rmdays is 0 or not. If so, show it. If not, don't. PHP will handle the rest after you're done with the query. Quote Link to comment https://forums.phpfreaks.com/topic/160600-show-script-to-only-people-with-0-rmdays/#findComment-847928 Share on other sites More sharing options...
mastercjb Posted June 2, 2009 Author Share Posted June 2, 2009 Ok I get that, and thought of that. But how would I do it. I'm just learning php so I dont know what the code would look like... Quote Link to comment https://forums.phpfreaks.com/topic/160600-show-script-to-only-people-with-0-rmdays/#findComment-848073 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.