PDA

View Full Version : Problem whit functions.php edition


Jocla
03-02-2013, 10:29 PM
I'm new and install v1.3.1 and edit only one file (functions.php) (translate sidebar links to spanish), but now online.php, myadopt.php and profile.php are differents, font size is now more larger. (sorry my english is bad :littlecfrown:)

I Don't install the latest version of script because it's not compatible with my php version.

My functions.php

<?php

// File ID: functions.php
// Purpose: Provides basic sitewide functions

if(defined("SUBDIR")) include("../inc/config.php");
else include("inc/config.php");

//Now connecting to the adoptables database
try{
$adopts = new Database(DBNAME, DBHOST, DBUSER, DBPASS, PREFIX);
}
catch(PDOException $pe){
die("Could not connect to database, the following error has occurred: <br><b>{$pe->getmessage()}</b>");
}

//Define the $adopts as super globals, this has to be done since one cannot define an object as constant.
$GLOBALS['adopts'] = $adopts;

startup();
session_start();

//define default attributes for html tables and other stuff...
$attr = getattributes();

// clean all our data
$_POST = array_map('secure',$_POST);
$_GET = array_map('secure',$_GET);

$session = session_id();
$time = time();
$time_check = $time - 300; // Time check, delete after 300 seconds (5 minutes)

if($isloggedin != "yes") $loggedinname = "Visitor";

$row = $adopts->select("online", array(), "username = '{$loggedinname}'")->fetchObject();

if(!is_object($row)) $adopts->insert("online", array("username" => $loggedinname, "session" => $session, "time" => $time));
else $adopts->update("online", array("time" => $time, "session" => $session, "username" => $loggedinname), "username = '{$loggedinname}'");

// if over 5 minute, delete session
$adopts->delete("online", "time < {$time_check}");

// Begin functions definition:

function __autoload($name) {
// The autoload function, a bit messy if you ask me
$classpath = strtolower("classes/class_{$name}");
if(defined("SUBDIR")) include_once ("../{$classpath}.php");
else include_once ("{$classpath}.php");
}

function is_assoc($arr) {
// From php.net, will help a lot in future
return (is_array($arr) && count(array_filter(array_keys($arr),'is_string')) == count($arr));
}

function checkrb($field, $value){
$button = ($field == $value)?" checked":"";
return $button;
}
function startup() {
// get all of our default settings, like title and stuff
$stmt = $GLOBALS['adopts']->select("settings", array());
while($row = $stmt->fetchObject()){
$GLOBALS['settings'][$row->name] = $row->value;
}
// set up our log in stuff so we always have it
logincheck();
}

function secure($data) {
//This function performs security checks on all incoming form data
if(is_array($data) and SUBDIR != "AdminCP") die("Hacking Attempt!");
$data = htmlentities($data);
$data = strip_tags($data, '');
return $data;
}

function getsitecontent($page) {
$row = $GLOBALS['adopts']->select("content", array(), "page = '{$page}'")->fetchObject();
$title = stripslashes($row->title);
$content = stripslashes($row->content);
$value[content] = $content;
$value[title] = $title;
return $value;
}

function replace($old, $new, $template) {
//This function replaces template values
$template = str_replace($old, $new, $template);
return $template;
}

function codegen($length, $symbols = 0){
$set = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J","k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T","u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
$str = '';

if($symbols == 1){
$symbols = array("~","`","!","@","$","#","%","^","+","-","*","/","_","(","[","{",")","]","}");
$set = array_merge($set, $symbols);
}

for($i = 1; $i <= $length; ++$i)
{
$ch = mt_rand(0, count($set)-1);
$str .= $set[$ch];
}

return $str;
}

function passencr($username, $password, $salt){
$pepper = grabanysetting("peppercode");
$password = md5($password);
$newpassword = sha1($username.$password);
$finalpassword = hash('sha512', $pepper.$newpassword.$salt);
return $finalpassword;
}

// NOTE - make sure this is only run once in a whole page load - not multiple times!
function logincheck() {
//Set up our login info...
$uid = "";
$password = "";

//Check for cookie
if (isset($_COOKIE['mysuid']) and isset($_COOKIE['myssession'])) {
$uid = $_COOKIE['mysuid'];
$session = $_COOKIE['myssession'];
$uid = secure($uid);
$password = secure($session);

//Run login operation
$GLOBALS['usersettings'] = $GLOBALS['adopts']->join("groups", "groups.gid = users.usergroup")
->join("users_options", "users_options.uid = users.uid")
->select("users", array(), constant("PREFIX")."users.uid = '{$uid}'")
->fetch(PDO::FETCH_ASSOC);
$luid=$GLOBALS['usersettings']['uid'];
$lsess=$GLOBALS['usersettings']['session'];
$usergroup=$GLOBALS['usersettings']['usergroup'];

if($uid == $luid and $session == $lsess) $isloggedin = "yes";
else{
if (isset($_COOKIE['mysuid'])) {
$past = time() - 10;
setcookie("mysuid", $uid, $past);
}
if (isset($_COOKIE['myssession'])) {
$past = time() - 10;
setcookie("myssession", $session, $past);
}
$isloggedin = "no";
}

}
else $isloggedin = "no";

// return our user data

$row = $GLOBALS['adopts']->select("users", array(), "uid = '{$uid}'")->fetchObject();
$username=$row->username;
$GLOBALS['isloggedin'] = $isloggedin;
$GLOBALS['username'] = $username;
$GLOBALS['loggedinname'] = $username;
$GLOBALS['money'] = $GLOBALS['usersettings']['money'];
$GLOBALS['group'] = $usergroup;
}

function ipgen($ip){
$ip_long = ip2long($ip);

if(!$ip_long){
$ip_long = sprintf("%u", ip2long($ip));
if(!$ip_long){
return 0;
}
}

if($ip_long >= 2147483648) $ip_long -= 4294967296;
return $ip_long;
}

function timeconverter($unit){
switch($unit){
case "secs":
$converter = 1;
break;
case "minutes":
$converter = 60;
break;
case "hours":
$converter = 3600;
break;
case "weeks":
$converter = 604800;
break;
case "months":
$converter = 2592000;
break;
case "years":
$converter = 31536000;
break;
default:
$converter = 86400;
}
return $converter;
}

function grabanysetting($where) {
$value = stripslashes($GLOBALS['settings'][$where]);
return $value;
}

function getlinks(){

//This function gets the links for the top bar from the database
// We will be getting our links from the database...
$links = "<div class='ddmenu'>\n
<ul>";

$stmt = $GLOBALS['adopts']->select("links", array(), "linkparent < 1 ORDER BY id ASC");

while ($category = $stmt->fetchObject()) {
$links .= "\n<li><a class='hide' href='{$category->linkurl}'>{$category->linktext}</a>
\n<ul>";
$stmt2 = $GLOBALS['adopts']->select("links", array(), "linkparent='{$category->id}' ORDER BY id ASC");
while($item = $stmt2->fetchObject()){
$links .= "<li><a href='{$item->linkurl}' title='{$item->linktext}'>{$item->linktext}</a></li>";
}
$links .= "</ul>
\n</li>";
}

$links .= "\n</ul>";
return $links;
}

function getsidebar() {
//This function determines what shows in the side bar of the template
$isloggedin = $GLOBALS['isloggedin'];
$loggedinname = $GLOBALS['loggedinname'];
if($isloggedin == "yes") {
$msgctr = "<a href='messages.php'>Messages</a>";
$data = $GLOBALS['adopts']->select("messages", array(), "touser='{$loggedinname}' and status='unread'")->fetchAll();

if(count($data) > 0) {
$msgctr = "<a href='messages.php'>Messages <b>(".count($data).")</b></a>";
}
$sidebar = "&nbsp;&nbsp;&nbsp;&nbsp;Tienes {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.<br />

<br /><strong>&nbsp;&nbsp;&nbsp;Secciones:</strong><br />
<ul><li><a href='adopt.php'>Adoptar</a></li>
<li><a href='pound.php'>Adoptables</a></li>
<li><a href='myadopts.php'>Administrar pets</a></li>
<li><a href='account.php'>Config. Cuenta</a></li>
<li>{$msgctr}
<li><a href='changestyle.php'>Change Theme</a></li>
<li><a href='donate.php'>Hacer donacion</a></li>
<li><a href='logout.php'>Cerrar sesion</a></li>";

$row = $GLOBALS['adopts']->select("users", array(), "username='{$loggedinname}' and usergroup='1'")->fetchObject();
if(is_object($row)) $sidebar .= "<li><a href='admincp/index.php'>Administrar</a></li><br />";

$row1 = $GLOBALS['adopts']->select("online", array(), "username != 'Visitor'")->fetchAll();
$total1 = count($row1);
$row2 = $GLOBALS['adopts']->select("online", array(), "username = 'Visitor'")->fetchAll();
$total2 = count($row2);
$sidebar .= "<a href='online.php'>Hay {$total1} usuario(s) y {$total2} visita(s) online.</a></ul>";
}
else {
$sidebar = "<b><u>Iniciar sesion:</u></b><br />
<form name='form1' method='post' action='login.php'>
<p>Usuario:
<input name='username' type='text' id='username'>
</p>
<p>Password:
<p> <input name='password' type='password' id='password'>
</p>
<p>
<input type='submit' name='Submit' value='Log In'>
</p>
</form>Aun no te registras?<br /><a href='register.php'>Crea tu cuenta</a><br /><a href='forgotpass.php'>Has olvidado el password?</a>";
$row1 = $GLOBALS['adopts']->select("online", array(), "username != 'Visitor'")->fetchAll();
$total1 = count($row1);
$row2 = $GLOBALS['adopts']->select("online", array(), "username = 'Visitor'")->fetchAll();
$total2 = count($row2);
$sidebar .= "<br />Hay {$total1} usuario(s) y {$total2} visita(s) online.";

}
return $sidebar;
}

function dologin($username, $password, $session) {
$row = $GLOBALS['adopts']->select("users", array(), "username = '{$username}'")->fetchObject();
$uid=$row->uid;
$luser=$row->username;
$lpass=$row->password;

if($username == $luser and $password == $lpass) {
$status = "success";
//If the cookie already exists for some reason, delete it
if (isset($_COOKIE['mysuid']) and isset($_COOKIE['myssession'])) {
$past = time() - 10;
setcookie("mysuid", $uid, $past);
setcookie("myssession", $session, $past);
}
// Set the cookie
$Month = 2592000 + time();
setcookie("mysuid", $uid, $Month);
setcookie("myssession", $session, $Month);
$GLOBALS['adopts']->update("users", array("session" => $session), "username = '{$username}'");

//Now log our user into the forum account if forum integration is enabled...
include("../inc/config_forums.php");
if($mybbenabled == 1){
include_once("functions_forums.php");
$forums = new Database($mybbdbname, $mybbhost, $mybbuser, $mybbpass, $mybbprefix) or die("Cannot connect to forum database, please contact an admin immediately.");
$mybbuser = $forums->select("users", array("uid", "loginkey"), "username = '{$username}'")->fetchObject();
$cookiesettings = array();
$cookiesettings['cookiedomain'] = $forums->select("settings", array("value"), "name = 'cookiedomain'")->fetchColumn();
$cookiesettings['cookiepath'] = $forums->select("settings", array("value"), "name = 'cookiepath'")->fetchColumn();
$cookiesettings['cookieprefix'] = $forums->select("settings", array("value"), "name = 'cookieprefix'")->fetchColumn();
mybbsetcookie("mybbuser", $mybbuser->uid."_".$mybbuser->loginkey, NULL, true, $cookiesettings);

$mybbsid = mybb_random_str(32);
mybbsetcookie("sid", $mybbsid, -1, true);
}
}

else{
$status = "error";
}

return $status;
}

function getadmlinks() {
//This function shows special links to the site admin

$links = "<li><a href='index.php'>Home</a></li>
<li><a href='adopt.php'>Administrar adoptables</a></li>
<li><a href='content.php'>Editar contenido</a></li>
<li><a href='users.php'>Usuarios</a></li>
<li><a href='items.php'>Items</a></li>
<li><a href='settings.php'>Ajustes generales</a></li>
<li><a href='ads.php'>Avisos</a></li>";

return $links;
}

function getadmimages() {
$formcontent = "";
$stmt = $GLOBALS['adopts']->select("filesmap", array());
while($row = $stmt->fetchObject()) {
$wwwpath = $row->wwwpath;
$friendlyname= $row->friendlyname;
$formcontent .= "<option value='{$wwwpath}'>{$friendlyname}</option>";
}
return $formcontent;
}

// MESSY - I believe this still runs if there are no ads. There should be an option to turn it off.
function getads($page) {
// Function to display site advertisements

if($page == "any") $page = "";
$row = $GLOBALS['adopts']->select("ads", array(), "page = '{$page}' and status = 'active' ORDER BY RAND() LIMIT 1")->fetchObject();
if(is_object($row)) {
$value= $row->text;
$value = stripslashes($value);
$aid= $row->id;
$actualimpressions= $row->actualimpressions;
$impressions= $row->impressions;

if($impressions == "") $impressions = 0;
$actualimpressions = $actualimpressions + 1;

//Update the impressions count
$GLOBALS['adopts']->update("ads", array("actualimpressions" => $actualimpressions), "id='{$aid}'");
//Check that ad is not over max impressions...
if ($actualimpressions >= $impressions and $impressions != 0) $GLOBALS['adopts']->update("ads", array("status" => "inactive"), "id='{$aid}'");
}
else $value = "";
return $value;
}

function getlinkname($lid){
$row = $GLOBALS['adopts']->select("links", array(), "id='{$lid}'")->fetchObject();
$linkname= $row->linktext;
return $linkname;
}

// NEW - a function to get a page from the database
function getpage($name) {
$row = $GLOBALS['adopts']->select("content", array(), "page='{$name}' LIMIT 1")->fetchObject();
$GLOBALS['article_content'] = $row->content;
$GLOBALS['article_title'] = $row->title;
$GLOBALS['date'] = $row->date;
return;
}

function getattributes(){
// This function defines default attributes for html table, form and other stuff...
$attr = new stdclass;

// Get default attributes for html tables...
$attr->table = new stdclass;
$attr->table->align = "center";
$attr->table->style = "";
$attr->table->background = array();
$attr->table->border = 1;
$attr->table->cellpadding = "";
$attr->table->cellspacing = "";
$attr->table->frame = "";
$attr->table->rules = "";
$attr->table->summary = "";
$attr->table->width = "";

// Get default attributes for html forms...
$attr->form = new stdclass;
$attr->form->action = "index.php";
$attr->form->accept = "";
$attr->form->enctype = "";
$attr->form->method = "post";
$attr->form->name = "form";
$attr->form->target = "";

// All done, at least for this time being...
return $attr;
}

function getpoundsettings(){
// This function defines default attributes for html table, form and other stuff...
$settings = new stdclass;
$stmt = $GLOBALS['adopts']->select("pound_settings", array());
while($row = $stmt->fetchObject()){
$property = $row->varname;
foreach($row as $key => $val){
$settings->$property->$key = $val;
}
}
return $settings;
}

// NEW - a function to show the page
function showpage($title, $content, $date) {
$theme = $GLOBALS['usersettings']['theme'];
if ($theme == '') $theme = grabanysetting("theme");
$acpthemeurl = "../templates/acp/template.html";
$themeurl = "templates/{$theme}/template.html";
$patterns = array("/:ARTICLETITLE:/","/:ARTICLECONTENT:/", "/:ARTICLEDATE:/", "/:BROWSERTITLE:/", "/:SITENAME:/", "/:SLOGAN:/", "/:LINKSBAR:/", "/:SIDEFEED:/", "/:ADS:/");
// if we have said we are in an admin area, don't show ads and show admin links
if (defined("SUBDIR") and SUBDIR == "AdminCP") {
$replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getadmlinks(), getsidebar(), "");
$template = file_get_contents($acpthemeurl);
}
else {
$replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getlinks(), getsidebar(), getads("any"));
$template = file_get_contents($themeurl);
}
// now that we have our stuff, let's start making it all into a webpage

$template = preg_replace($patterns, $replacements, $template);
return $template;
}

function getpostbar ($name) {
$row = $GLOBALS['adopts']->join("users_profile", "users_profile.uid = users.uid")
->select("users", array(), constant("PREFIX")."users.username = '{$name}'")->fetchObject();

$postbar = "<table><tr>
<td>
<img src='{$row->avatar}'>
</td>
<td>
<b>Member Since: </b><br>{$row->membersince}<br>
<b>Bio:</b><br>{$row->bio}<br>
</td>
<td>
<b>Nickname:</b> {$row->nickname}<br>
<b>Gender:</b> {$row->gender}<br>
<b>Cash:</b> <a href='forum.php?do=donate&from={$row->uid}&am={$row->money}'>{$row->money}</a><br>
</td></table>";
return $postbar;
}

?>

Hall of Famer
03-02-2013, 10:49 PM
Are you sure the only thing you have changed was the letters displayed on the page? Or did you make any other modifications, such as editing the main css file? Why are you using this many &nbsp;? I dont recall the original script has it, and there's a chance this is messing up with the css.

Anyway there are css files specifically designed for online and profile pages, you can play with them to change their font size.

Jocla
03-02-2013, 11:01 PM
Just change these phrases and used this code (&nbsp;) to make a space for two sentences ("you have $..." and "your links...". The strange thing is that i went back up the original file (functions.php) and the error is not going. Yesterday

I'm back to do it all again, and i see that the problem is from the beginning.

online.php
profile.php
myadopt.php

Do they work with special styles css?

http://www.ciudadsatan.com/adoptables <--- my adoptable

Hall of Famer
03-02-2013, 11:23 PM
Yeah it seems to me that you changed the main css, thats why the font size is different for pages using their own css. Be careful with this though, Mys v1.3.1 has some css issues that were fixed in the latest release.

Jocla
03-02-2013, 11:29 PM
as i mentioned, i'm back up files and i've not edited anything, but those three files show a different font size.

I need to know what are the online.php, myadpot.php and profile.php's css style

directory and name css files

thx.

Hall of Famer
03-02-2013, 11:49 PM
Oh yeah, now that I recall that three files do show different css font size. This was a minor glitch in Mys v1.3.1, we fixed in in Mys v1.3.2.

Jocla
03-02-2013, 11:52 PM
So I ask, what are the respective css files for online.php, profile.php, and myadopt.php? =/

Hall of Famer
03-03-2013, 12:22 AM
Well there are only four additional css files in the folder /css, you may want to look at the file online.css, pagination.css and tabs.php. Also if I recall, the glitch is with the main css, not these additional css files.

Jocla
03-03-2013, 12:28 PM
I checked those files, but can not find a specification for font size.

Can you tell me which part is or where insert the css code, please :el:

Pagination.css

<style type="text/css">

/* Setting Up Basic Styles */

html {
background:#222;
font-family:Verdana, Arial, Tahoma, sans-serif;
color:#333;
font-size:12px;
}

#wrapper {
width:950px;
margin:0 auto;
}

table {
width:100%;
background:#fff;
}

/* Here's for the top most links */

th {
padding:10px;
}

/* Next is our background for the title box, just save your image to the media folder, and put it's name and type in the box. */

#image {
border-left:10px solid #fff;
border-right:10px solid #fff;
border-bottom:5px solid #fff;
background:url("citylights.jpg") left no-repeat #91C7F5;
height:150px;
}

#image span {
position:relative;
font-size:25px;
padding:10px;
font-family:Georgia, Times New Roman, serif;
}

/* Change the color of the link for your site title here */

#image a{
color:#aaa;
text-decoration:none;
font-style:italic;
font-weight:bold;
text-shadow: 0px 1px 1px #eee;
}
#image a:hover {
color:#91C7F5;
text-shadow: 0px 1px 1px #fff;
}

/* Standard table cell definitions */

td {
background:#fff;
}

/* Let's fix up your menu */

#menu {
width:25%;
background:#fff;
vertical-align:top;
}

#menu p{
margin:auto 10px;
padding:2px;
}

#menu h1 {
font-size: 11pt;
border-bottom: 3px solid #DDD;
margin:2px auto 3px 10px;
color: #000;
text-transform:lowercase;
}

#menu a {
margin:auto 10px;
display: block;
border-bottom: 1px solid #CCC;
padding: 2px;
padding-left: 10px;
text-transform: uppercase;
font-size: 7.5pt;
letter-spacing: 1px;
}

#menu a:hover {
background-color: #91C7F5;
border-bottom-color: #000;
color: #fff;
}

#content {
vertical-align:top;
}

#footer {
font-size:10px;
text-align:center;
}

#content p {
padding:3px;
margin:auto 10px;
}


#content h1 {
font-size: 16pt;
text-transform:lowercase;
border-bottom: 1px solid #DDD;
margin:10px;
color: #000;
}

a{
text-decoration:none;
color:#91C7F5;
}
a:hover {
color:#333;
}


div.pagination {
padding: 3px;
margin: 3px;
}

div.pagination a {
margin: 2px;
border: 1px solid #000000;

color: #000000; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination a:hover, div.pagination a:active {
margin: 2px;
border: 1px solid #800000;

background-color: #800000;
color: #FFFFFF; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px; text-decoration:none
}
div.pagination span.current {
margin: 2px;
border: 1px solid #000000;
background-color: #000000;
color: #FFFFFF; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination span.disabled {
margin: 2px;
border: 1px solid #999999;

color: #999999; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}

a:hover.list { font-size: 10px;
text-decoration: underline; text-transform: capitalize;
color: #006699; line-height: 200%; }
a.list { text-transform: capitalize; font-size: 10px;
color: #FF0000; text-decoration: underline;
line-height: 200%; }

</style>tabs.php

<?php

if($filename == "profile"){

?>

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script>
<script src="js/tabs.js"></script>
<script>
$(function() {

$("#profile").organicTabs();

});
</script>

<?
}

?>


<?php

if($filename == "profile"){

?>

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script>
<script src="js/tabs.js"></script>
<script>
$(function() {

$("#profile").organicTabs();

});
</script>

<?
}

?>

<style type="text/css">

/* Setting Up Basic Styles */

html {
background:#222;
font-family:Verdana, Arial, Tahoma, sans-serif;
color:#333;
font-size:12px;
}

#wrapper {
width:950px;
margin:0 auto;
}

table {
width:100%;
background:#fff;
}

/* Here's for the top most links */

th {
padding:10px;
}

/* Next is our background for the title box, just save your image to the media folder, and put it's name and type in the box. */

#image {
border-left:10px solid #fff;
border-right:10px solid #fff;
border-bottom:5px solid #fff;
background:url("citylights.jpg") left no-repeat #91C7F5;
height:150px;
}

#image span {
position:relative;
font-size:25px;
padding:10px;
font-family:Georgia, Times New Roman, serif;
}

/* Change the color of the link for your site title here */

#image a{
color:#aaa;
text-decoration:none;
font-style:italic;
font-weight:bold;
text-shadow: 0px 1px 1px #eee;
}
#image a:hover {
color:#91C7F5;
text-shadow: 0px 1px 1px #fff;
}

/* Standard table cell definitions */

td {
background:#fff;
}

/* Let's fix up your menu */

#menu {
width:25%;
background:#fff;
vertical-align:top;
}

#menu p{
margin:auto 10px;
padding:2px;
}

#menu h1 {
font-size: 11pt;
border-bottom: 3px solid #DDD;
margin:2px auto 3px 10px;
color: #000;
text-transform:lowercase;
}

#menu a {
margin:auto 10px;
display: block;
border-bottom: 1px solid #CCC;
padding: 2px;
padding-left: 10px;
text-transform: uppercase;
font-size: 7.5pt;
letter-spacing: 1px;
}

#menu a:hover {
background-color: #91C7F5;
border-bottom-color: #000;
color: #fff;
}

#content {
vertical-align:top;
}

#footer {
font-size:10px;
text-align:center;
}

#content p {
padding:3px;
margin:auto 10px;
}


#content h1 {
font-size: 16pt;
text-transform:lowercase;
border-bottom: 1px solid #DDD;
margin:10px;
color: #000;
}

a{
text-decoration:none;
color:#91C7F5;
}
a:hover {
color:#333;
}


div.pagination {
padding: 3px;
margin: 3px;
}

div.pagination a {
margin: 2px;
border: 1px solid #000000;

color: #000000; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination a:hover, div.pagination a:active {
margin: 2px;
border: 1px solid #800000;

background-color: #800000;
color: #FFFFFF; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px; text-decoration:none
}
div.pagination span.current {
margin: 2px;
border: 1px solid #000000;
background-color: #000000;
color: #FFFFFF; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}
div.pagination span.disabled {
margin: 2px;
border: 1px solid #999999;

color: #999999; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px
}

a:hover.list { font-size: 10px;
text-decoration: underline; text-transform: capitalize;
color: #006699; line-height: 200%; }
a.list { text-transform: capitalize; font-size: 10px;
color: #FF0000; text-decoration: underline;
line-height: 200%; }

</style>

<style type="text/css">

a.onlinelist:hover
{
background:#09f;
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
.onlinelistt
{
color: red;
width: 20%;
display: inline-block;
margin-bottom: 5px;
text-align: center;
}
.onlinelistn
{
color: purple;
display: inline-block;
width: 20%;
text-align: center;

}
.onlinelistj
{
color: green;
display: inline-block;
width: 20%;
text-align: center;
}
.onlinelistp
{
color: blue;
display: inline-block;
width: 20%;
text-align: center;

}
.onlinelistg
{
color: orange;
display: inline-block;
width: 20%;
text-align: center;

}

</style>

Please, I just need you to help me fix this :displeased: