I need help in adding themes (CSS) in the lavalair xhtml version. What i did was....
Added this code in index.php....
Added this in genproc.php...
And finally added this on top of index.php......
But its not working, its showing the default theme....... Can anyone tell me whats wrong where????/
Thanx.
Added this code in index.php....
Code:
else if($action=="css")
{
addonline(getuid_sid($sid),"Updating StyleSheet!","");
echo "<div align='center'>
";
echo "[b][u]StyleSheet[/u][/b]
";
echo "<form action=\"genproc.php?action=css\" method=\"get\">";
echo "View: <select name=\"thms\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "</select>";
echo "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
echo "<input type=\"submit\" value=\"GO\"/>";
echo "</form>";
}
Code:
else if($action=="css")
{
addonline(getuid_sid($sid),"Selecting StyleSheet","");
$thms = $_GET["thms"];
echo "<div align=\"center\">";
$uid = getuid_sid($sid);
$res = mysql_query("UPDATE fun_users SET css='".$thms."' WHERE id='".$uid."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Style Selected successfully!
";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Error Selecting Style!
";
}
if ($thms=='1')
{ echo "[b]Sheet 1 selected[/b]";
}
else if ($thms=='2')
{ echo "[b]Sheet 2 selected[/b]";
}
else if ($thms=='3')
{ echo "[b]Sheet 3 selected[/b]";
}
else {
echo "[b]ERROR!!![/b]";
}
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</div>";
}
And finally added this on top of index.php......
Code:
echo "<head>";
echo "<title>$stitle</title>";
$style=mysql_query("SELECT css FROM fun_users WHERE id='".$uid."'");
if ($style[0]=='1')
{
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
}
else if ($style[0]=='2')
{
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style2.css\" />";
}
else if ($style[0]=='3')
{
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style3.css\" />";
}
else
{
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
}
echo "</head>";
Thanx.
Comment