Hey guys been working on this one all day and cant get it to work, its for wapdesire v2, everytime i view a profile it shows the profile theme that i chose and not the theme that the user has...
heres what i have.. cant fix it
PROTHEME.PHP
SET.PHP
GENPROC.PHP
IN PROFILE.PHP I ADDED THIS
and in database users i added
I dont know whats gone wrong here..
I think the database is wrong and the part on profiles, i actually helped mzdisires out on here and she has this BUT wouldnt share it, people were right, shes a scrounger so never again will i help her.
Many thanks in advance for any help gave
heres what i have.. cant fix it
PROTHEME.PHP
PHP Code:
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
////////////////////////////////Profile Theme
if($action=="sitethms")
{
addonline(getuid_sid($sid),"Rate","");
$nick=getnick_sid($sid);
echo head_tag($nick."@Rate",1,getnick_sid($sid));
$title="<b>Rate</b>";
//boxstart("Theme");
$main.="<p align=\"center\">";
$main.="</p>";
//$tmsg = getpmcount(getuid_sid($sid));
//$umsg = getunreadpm(getuid_sid($sid));
$main.="<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a><br/>";
$uid =getuid_sid($sid);
//$new_gm = getnewgml($uid);
$main.="<p align=\"center\">";
$main.="<form action=\"genproc.php?action=updtthme&sid=$sid\" method=\"post\">";
include("set.php");
$main.="<input type=\"Submit\" name=\"submit\" Value=\"Save\"></form>";
$main.="</p>";
$main.="</p>";
$main.="<p align=\"center\">";
$main.="<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
$main.="Home</a>";
$main.="</p>";
$main.="<p align=".align()."><a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
echo foot_tag();
exit;
}
PHP Code:
<?php
$main.="<select name=\"thms\">";
$main.="<option value=\"style\">Default</option>";
$main.="<option value=\"barbie\">Barbie</option>";
$main.="<option value=\"blue\">Blue</option>";
$main.="<option value=\"hell\">Hell</option>";
$main.="<option value=\"lime\">Lima</option>";
$main.="<option value=\"love\">Love</option>";
$main.="<option value=\"matrix\">Matrix</option>";
$main.="<option value=\"stalker\">Stalker</option>";
$main.="<option value=\"strike\">Strike</option>";
$main.="<option value=\"wanted\">NFS Most Wanted</option>";
$main.="<option value=\"white\">White</option>";
$main.="</select>";
?>
PHP Code:
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
//////////////Update/////////////////
if($action=="updtthme")
{
addonline(getuid_sid($sid),"Comments","");
$nick=getnick_sid($sid);
echo head_tag($nick."@Comments",1,getnick_sid($sid));
$title.="<b>Comments</b>";
$theme = $_POST["thms"];
$size = $_POST["size"];
$uid = getuid_sid($sid);
$exist = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE id='".$uid."'"));
if ($exist[0]>0)
{
$res = mysql_query("UPDATE users SET theme='".$theme.".css' WHERE id='".$uid."'");
}else{
$res = mysql_query("UPDATE users SET theme='".$theme.".css' WHERE id='".$uid."'");
}
$main.="<p align=\"center\">";
echo mysql_error();
if($res)
{
$main.="<img src=\"images/ok.gif\" alt=\"o\"/>Updated<br/><br/><br/>";
}else{
$main.="<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/><br/>";
}
$main.="<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
$main.="</p>";
$main.="</body>";
$main.="</html>";
$main.="<p align=".align()."><a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main);
echo foot_tag();
exit;
}
PHP Code:
$theme1 = mysql_fetch_array(mysql_query("SELECT theme FROM users WHERE id='".$who."'"));
$main.="<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme1[0]\" />";
$main.="<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
$main.="<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
$main.="<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
PHP Code:
theme varcher100 as defined matrix
I dont know whats gone wrong here..
I think the database is wrong and the part on profiles, i actually helped mzdisires out on here and she has this BUT wouldnt share it, people were right, shes a scrounger so never again will i help her.
Many thanks in advance for any help gave
Comment