plasmagames
-
Posts
63 -
Joined
-
Last visited
Never
Posts posted by plasmagames
-
-
ok index.php has a lot of includes so i will post those to.
index.php
<?php /* iSuS - iScripting.net User System v1.0 made by Panzer http://www.iScripting.net Copyright must stay intact */ // Get the configuration file $filename = 'defs.php'; $setup = 'install/index.php'; if (!file_exists($filename)) { die("Please install Isus beafore usage! <a href=\"install/\">Click here</A>"); } if (file_exists($setup)) { die("Please remove the install folder beafore usage. It can be harmful to your site if it exists and someone uses it!"); } include ('config.php'); //Set the navigation up, secure it's input. $nav = $_GET['action']; secure($nav); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org"> <title><?php echo SITE_NAME; ?></title> <link rel="stylesheet" type="text/css" href="theme/<?php echo $theme;?>/visus.css"> <style type="text/css"> div.c1 {text-align: center} </style> </head> <body bgcolor="#FFFFFF"> <p> <div class="c1"> <div class="logo"> <img src="theme/<?php echo $theme;?>/i/logo.png"> </div> <div class="pages"> <?php include ("pages.php"); ?> </div> <div class="Container"> <div class="content" style="width:580"> <?php //Use a switch statement to go through the URLS. switch ($nav) { case "login": include ('login.php'); break; case "logout": include ('logout.php'); break; case "editprofile": include ('editprofile.php'); break; case "memberlist": include ('memberlist.php'); break; case "register": include ('register.php'); break; case "viewterms"; include ('terms.php'); break; case "forgot"; include ('reset_pw.php'); break; case "profile"; include ('profile.php'); break; case "admin"; include ('admin/index.php'); break; case "theme"; include ('admin/theme.php'); break; case "news"; include ('admin/news.php'); break; case "general"; include ('admin/general.php'); break; case "download"; include ('download.php'); break; case "game"; include ('game.php'); break; case "tutorial"; include ('tutorial.php'); break; case "contact"; include ('contact.php'); break; default: include ('default.php'); break; } ?> </div> <div class="sidebar" align="right"> <?php include ('sidebar.php'); ?> </div> </div> <div align="center" class="footer"> <?php include ('footer.php'); ?> </div> </div> </p> </body> </html>
pages.php
<?php echo ' <img src="'.$theme.'/i/start.png" alt="start" /> <a href="index.php"><img src="'.$theme.'/i/home.png" alt="home" border="0" /></a> <img src="'.$theme.'/i/spacer.png" alt="spacer" /> <a href="index.php?action=download"><img src="'.$theme.'/i/download.png" alt="downloads" border="0" /></a> <img src="'.$theme.'/i/spacer.png" alt="spacer" /> <a href="index.php?action=game"><img src="'.$theme.'/i/game.png" alt="game" border="0" /></a> <img src="'.$theme.'/i/spacer.png" alt="spacer" /> <a href="index.php?action=tutorial"><img src="'.$theme.'/i/tutorial.png" alt="tutorials" border="0" /></a> <img src="'.$theme.'/i/spacer.png" alt="spacer" /> <a href="http://forum.plasmasteelgames.net"><img src="'.$theme.'/i/forum.png" alt="forum" border="0" /></a> <img src="'.$theme.'/i/spacer.png" alt="spacer" /> <a href="index.php?action=contact"><img src="'.$theme.'/i/contact.png" alt="contact" border="0" /></a> <img src="'.$theme.'/i/end.png" alt="send" />'; ?>
sidebar.php
<?php // Isus 1.1b Copyright must stay in tack // coded by klatz //http://iscripting.net if ($uId) { if ($uCan) echo "Hey! <STRONG>$uName</STRONG>"; // helo member! echo '<p>'; echo '<strong>User Menu</strong>'; echo '<br>'; echo '<br>'; echo "<a href=\"index.php?action=editprofile\">Edit Profile</a> <br>"; echo "<a href=\"index.php?action=memberlist\">View Members</a> <br>"; echo "<a href=\"index.php?action=logout\">Logout</a> <br>"; echo '</p>'; echo "<BR>"; if ($admin = 'admin') echo '<strong>Admin</strong>'; echo '<br />'; echo '<br />'; echo '<a href="index.php?action=theme">Change Theme</a> <br>'; echo '<a href="index.php?action=news">Edit News</a> <br>'; echo '<a href="index.php?action=general">General Settings</a> <br>'; } else { // if this isn't a member then echo "<br>"; include ('login.php'); echo "Welcome, <STRONG>$uName</STRONG>!"; echo '<p>'; echo "<br>"; echo "<a href=\"index.php?action=login\">Login</a>"; echo "<br>"; echo "<a href=\"index.php?action=register\">Sign up</a>"; echo '</p>'; } echo "<BR>"; //break echo "<BR>"; // break echo '<img src="theme/'.$theme.'/i/blah.png" alt=\"Bubble\"><STRONG>Partners</STRONG>'; // to enable please remvoe the comments // include('partners.php'); ?>
and then there an include in sidebar.php
partners.php
<br /> <br /> <a href="http://iscripting.net">iScripting</a><br /> <a href="http://iscripting.net/beta/">iScripting Beta</a><br /> <a href="http://recondev.net">Recon Development</a><br /> <a href="http://gamerdistrict.net">Gamer District</a><br /> <a href="http://iptbb.org">IPTBB</a><br /> <a href="http://http://www.mozilla.com/en-US/firefox/"><img src="theme/<?php echo $theme;?>/i/firefox3.png" border="0" alt="FireFox 3"/></a><br />
-
fine then here ll the pages that have something to do with the theme system
admin/theme.php
<?php /* iSuS User System Theme Mod Developed by: plasmagames(http://plasmasteelgames.net) member of iScripting(http://iscripting.net/smf) DO NOT REMOVE THIS */ //If the form hasn't been submitted, show it! if (!$_POST['submit']) { echo "<div class=\"reg\"><div class=\"point\"><img src=\"i/to.png\" alt=\"arrow\"><STRONG>Themes<STRONG></div><form action='index.php?action=theme' method='POST'> <p><strong>Theme:</strong><input class=\"field\" type='text' style width='300' height='500' name='theme' /></p> <input class='submit' type='submit' name='submit' value='Change Themes' /> </form></div> "; } else { //Or else it has.. Secure all the inputs $theme = secure($_POST['theme']); //find the old theme: $select = mysql_query("SELECT * FROM theme WHERE id=1"); //u need a WHERE clause or it won't work and it has to be valid. $row = mysql_fetch_array($select) or die(mysql_error()); //call it $oldtheme $oldtheme = $row['theme']; $theme_dir = '/home/a5880517/public_html/isus/theme'; if(file_exists($theme_dir . "/$oldtheme")) { //Insert the user information into the database $update = "UPDATE theme SET theme = '$theme' WHERE id = 1"; //u need a WHERE clause or it won't work and it has to be valid. $rename = rename("$theme_dir/$oldtheme", "$theme_dir/$theme"); //If the update and rename went ok... if (mysql_query($update) && $rename==true) { //Tell them the good news echo "The theme directory was changed to <br /> <strong>$theme</strong><br />"; } else { echo "Error, the theme directory wasn't changed."; } } else { echo "The '$oldtheme' does not exist in $theme_dir"; } } ?>
-
-
ok then how i tried it in the link the .css file and i get this error
Parse error: syntax error, unexpected '.' in /home/a5880517/public_html/isus/index.php on line 35Line 35
<link rel="stylesheet" type="text/css" href="theme/<?php echo .$theme.;?>/visus.css">
-
ok it's changing the theme now
but there this error with pages.php
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in pages.php on line 3heres the code
pages.php
<?php echo ' <img src="'$theme'/i/start.png" alt="start" /> <a href="index.php"><img src="'$theme'/i/home.png" alt="home" border="0" /></a> <img src="'$theme'/i/spacer.png" alt="spacer" /> <a href="index.php?action=download"><img src="'$theme'/i/download.png" alt="downloads" border="0" /></a> <img src="'$theme'/i/spacer.png" alt="spacer" /> <a href="index.php?action=game"><img src="'$theme'/i/game.png" alt="game" border="0" /></a> <img src="'$theme'/i/spacer.png" alt="spacer" /> <a href="index.php?action=tutorial"><img src="'$theme'/i/tutorial.png" alt="tutorials" border="0" /></a> <img src="'$theme'/i/spacer.png" alt="spacer" /> <a href="http://forum.plasmasteelgames.net"><img src="'$theme'/i/forum.png" alt="forum" border="0" /></a> <img src="'$theme'/i/spacer.png" alt="spacer" /> <a href="index.php?action=contact"><img src="'$theme'/i/contact.png" alt="contact" border="0" /></a> <img src="'$theme'/i/end.png" alt="send" />'; ?>
-
what else can i try
-
tried it and it still doesn't work
-
it's already CHMOD 755
I'll try 777
-
ok i just tired to change the theme again and it didn't work i get this error
Warning: rename(/home/a5880517/public_html/isus/theme/psg,/home/a5880517/public_html/isus/theme/default) [function.rename]: Permission denied in /home/a5880517/public_html/isus/admin/theme.php on line 36
so i copied the code that was provided before and it still doesn't work
heres line 36
$update = "UPDATE theme SET theme = '$theme' WHERE id = 1"; //u need a WHERE clause or it won't work and it has to be valid.
-
ok it chnaging the theme but the images aren't coming up heres one of the pages that has images in it i think i'm doing it right
<?php echo ' <img src="$theme_dir/$theme/i/start.png" alt="start" /><a href="index.php"><img src="theme/ $theme_dir/$theme/i/home.png" alt="home" border="0" /></a><img src="theme/ $theme_dir/$theme/i/spacer.png" alt="spacer" /><a href="index.php?action=download"><img src="theme/ $theme_dir/$theme/i/download.png" alt="downloads" border="0" /></a><img src="theme/ $theme_dir/$theme/i/spacer.png" alt="spacer" /><a href="index.php?action=game"><img src="theme/ $theme_dir/$theme/i/game.png" alt="game" border="0" /></a><img src="theme/ $theme_dir/$theme/i/spacer.png" alt="spacer" /><a href="index.php?action=tutorial"><img src="theme/ $theme_dir/$theme/i/tutorial.png" alt="tutorials" border="0" /></a><img src="theme/ $theme_dir/$theme/i/spacer.png" alt="spacer" /><a href="http://forum.plasmasteelgames.net"><img src="theme/ $theme_dir/$theme/i/forum.png" alt="forum" border="0" /></a><img src="theme/ $theme_dir/$theme/i/spacer.png" alt="spacer" /><a href="index.php?action=contact"><img src="theme/ $theme_dir/$theme/i/contact.png" alt="contact" border="0" /></a><img src="t$theme_dir/$theme/i/end.png" alt="send" />'; ?>
-
k now i get this error
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/theme/psg) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a5880517/public_html/isus/admin/theme.php on line 32ok i have the theme.php file in a folder called admin
and all my file have to be in a folder that came on the server called public_html
-
ok i am makign this php theme system for a user system that my friends made and guess what it's not working.
heres the error i get
PHP Error MessageWarning: rename(../theme/psg,../theme/psg) [function.rename]: No such file or directory in /home/a5880517/public_html/isus/theme.php on line 29
Free Web Hosting
Error, the theme directory wasn't changed.
and heres my code
<?php /* iSuS User System Theme Mod Developed by: plasmagames(http://plasmasteelgames.net) member of iScripting(http://iscripting.net/smf) DO NOT REMOVE THIS */ //If the form hasn't been submitted, show it! if (!$_POST['submit']) { echo "<div class=\"reg\"><div class=\"point\"><img src=\"i/to.png\" alt=\"arrow\"><STRONG>Themes<STRONG></div><form action='index.php?action=theme' method='POST'> <p><strong>Theme:</strong><input class=\"field\" type='text' style width='300' height='500' name='theme' /></p> <input class='submit' type='submit' name='submit' value='Change Themes' /> </form></div> "; } else { //Or else it has.. Secure all the inputs $theme = secure($_POST['theme']); //find the old theme: $select = mysql_query("SELECT * FROM theme WHERE id=1"); //u need a WHERE clause or it won't work and it has to be valid. $row = mysql_fetch_array($select) or die(mysql_error()); //call it $oldtheme $oldtheme = $row['theme']; //Insert the user information into the database $update = "UPDATE theme SET theme = '$theme' WHERE id = 1"; //u need a WHERE clause or it won't work and it has to be valid. $rename = rename("../theme/$oldtheme", "../theme/$theme"); //If the update and rename went ok... if (mysql_query($update) && $rename==true) { //Tell them the good news echo "The theme directory was changed to <br /> <strong>$theme</strong><br />"; } else { echo "Error, the theme directory wasn't changed."; }} ?>
now can someone tell me whats going on and how to fix it
PHP Theme System
in PHP Coding Help
Posted
that work! but there's one problem the navbar(pages.php) isn't loading