Jump to content
MakeWebGames

Recommended Posts

Posted

Hello, where there player advertisements are. I want a scroll bar to be there instead of the page just expanding.

 

<?php
require('globals.php');
echo "<h3><u>Newspaper</u></h3>";
if(!isset($_GET['action']))
   $_GET['action'] = '';
switch($_GET['action']) {
   case 'add':
       addPage($db, $ir);
       break;
   case 'delete':
       deletePage($db, $ir);
       break;
   default:
       index($db, $ir, $sa);
       break;
}
function index($db, $ir, $sa) {
   $q = $db->query("SELECT `content` FROM `papercontent` LIMIT 1");
   $content= $db->fetch_single($q, 0, 0);
?><hr width='95%'>
<table width = '95%' cellspacing = '1' class='table'>
<tr>
<td><a href='job.php'>Your Job</a></td>
<td><a href='gym.php'>Local Gym</a></td>
<td><a href='halloffame.php'>Hall Of Fame</a></td>
<td><a href='clancentral.php'>Clans</a></td>
<td><a href='brothel.php'>Brothel</a></td>
</tr>
<tr>
<td><a href='userlist.php'>Local Residents</a></td>
<td><a href='stats.php'>City Stats</a></td>
<td><a href='usersonline.php'>Users Online</a></td>
<td><a href='clanwars.php'>Current Wars</a></td>
<td><a href='estate.php'>Estate</a></td>
</tr></table><hr width='95%'>
<table width = '95%' cellspacing = '1' class='scroll'>
<tr>
<th colspan = '5'>Player Advertisements | <a href='newspaper.php?action=add'><b>Buy An Advertisement (¥10,000)</b></a><?php
echo in_array($ir['user_level'], [2, 3]) ? " | <a href=newspaper.php?action=all><b>[DELETE ALL]</b></a>" : '';
?></th></tr>
<tr>
<td colspan = '5'>
<?php
$anpdata = $db->query("SELECT * FROM `news_paper` ORDER BY `npTIME` DESC");
if(!$db->num_rows($anpdata))
   echo "<hr/>Only ¥10,000!</b> - Create an advertisement for ¥10,000.";
else
   while($npdata = $db->fetch_row($anpdata)) {
       $time = date('F j',$npdata['npTIME']);
       echo "<hr/><p align = 'left'><b>Ad By: <a href='viewuser.php?u={$npdata['npADDER']}'><font color = 'white'>" . $sa->username($npdata['npADDER']) . "</font> [{$npdata['npADDER']}]</a> | Added On: {$time}</b>";
       echo in_array($ir['user_level'], [2, 3]) ? " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}><b>[DELETE]</b></a>" : '';
       echo "<br/><b><u>{$npdata['npTITLE']}</u></b></p>
                      <p align = 'left'>{$npdata['npBODY']}</p>";
   }
   ?><hr/></table><hr width = '95%'><table width = '95%' cellspacing = '1' class = 'table'><tr>
   <th>Game News</th></tr><tr><td><div style='text-align: left; padding-left: 5px;'><?php echo $content;?></div></td></tr></table><hr width='95%'><a href = 'index.php'>>Go Home</a><hr width='95%'><?php
}

 

I tried classing the table in css to add the scroll bar. However, it is not working.

I also used div and p to class out the css however, it is still not working.

.scrollit { overflow:scroll; height:100px; }

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...