View Single Post
  #13  
Old 10-24-2011, 02:20 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,724
Tequila is on a distinguished road
Default

Since I've finally gotten time, here's mine as well. :3

Colors are just random, fix as needed. :3
Also comes with a read me of sorts:
Quote:
You'll need to edit a portion of your inc/functions.php file to get the sidebar to display properly. :3

Copy & Paste this part into your functions file:
PHP Code:
// Edit of functions by tequila

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'>Archive</a>";

        
$query "SELECT * FROM ".$GLOBALS['prefix']."messages WHERE touser='".$loggedinname."' and status='unread'";

        
$result runquery($query);

        
$num mysql_num_rows($result);

        if(
$num 0) {

        
$msgctr "<a href='messages.php'>Scrolls <b>(".$num.")</b></a>";

        }

// Feel free to keep this url for coins if you use them
// otherwise reset to whatever you would like.
// For now the money links to the account page.

        
$sidebar "
        <a href='profile.php?user='
{$row['username']}'>{$row['username']}</a>
<a href="
account.php">{$GLOBALS['money']}<img src='http://i42.tinypic.com/1zwp1mf.jpg' border='0'></a>
        <a href='myadopts.php'>My Adopts</a>
        <a href='inventory.php'>Inventory</a>
        "
.$msgctr."
        <a href='logout.php'>Log Out</a>"
;



           
$query "SELECT * FROM ".$GLOBALS['prefix']."users WHERE username='".$loggedinname."' and usergroup='1'";

           
$result runquery($query);

           
$usercancp mysql_num_rows($result);



        if(
$usercancp  != 0) {

            
$sidebar .= "<li><a href='admin.php'>Admin Center</a></li><br />";

        }



        
$query1 runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        
$total1 mysql_num_rows($query1);

        
$query2 runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        
$total2 mysql_num_rows($query2);

            

        
$sidebar .= "</ul>";

    }

    else {

        
$sidebar "<b><u>Member Login:</u></b><br />

        <form name='form1' method='post' action='login.php'>

          <p>Username: 

            <input name='username' type='text' id='username'>

        </p>

          <p>Password: 

            <input name='password' type='password' id='password'>

        </p>

          <p>

            <input type='submit' name='Submit' value='Log In'>

          </p>

        </form>Don't have an account?<br /><a href='register.php'>Register Free</a><br /><a href='forgotpass.php'>Forgot Password?</a>"
;

        
$query1 runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        
$total1 mysql_num_rows($query1);

        
$query2 runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        
$total2 mysql_num_rows($query2);

        
$sidebar .= "";



    }

    return 
$sidebar;


// End of sidebar portion. 
Quote:
Don't forget to edit the line in the header to tell where the css file is located. :3

Enjoy after changing colors to suit. :3

tequila ;3
Nicely done chibi. :3 Did you have problems with the drop down html?
Attached Files
File Type: zip iris-spider.zip (2.9 KB, 3 views)
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote