Who can help me i want to add a code where members can choose a background theme for theire profile
Profile background
Collapse
X
-
No thats easy lol i know that code i want a code like
Code:boxstart ("Theme"); echo "<small>Theme:</small> <select name=\"theme\" value=\"$theme[0]\">"; if (strstr($_SERVER['HTTP_USER_AGENT'], "MOT-")) { echo "<optgroup>"; } if($theme[0]=="1"){ echo "<option value=\"1\" selected=\"1\">$stitle</option>"; }else{ echo "<option value=\"1\">$stitle</option>"; } if($theme[0]=="2"){ echo "<option value=\"2\" selected=\"2\">Blue</option>"; }else{ echo "<option value=\"2\">Blue</option>"; } if($theme[0]=="3"){ echo "<option value=\"3\" selected=\"3\">Black to White</option>"; }else{ echo "<option value=\"3\">Black to White</option>"; } if($theme[0]=="4"){ echo "<option value=\"4\" selected=\"4\">Red</option>"; }else{ echo "<option value=\"4\">Red</option>"; } if($theme[0]=="5"){ echo "<option value=\"5\" selected=\"5\">Green</option>"; }else{ echo "<option value=\"5\">Green</option>"; } if($theme[0]=="6"){ echo "<option value=\"6\" selected=\"6\">Goth</option>"; }else{ echo "<option value=\"6\">Goth</option>"; } if($theme[0]=="7"){ echo "<option value=\"7\" selected=\"7\">Opera WML</option>"; }else{ echo "<option value=\"7\">Opera WML</option>"; } if($theme[0]=="8"){ echo "<option value=\"8\" selected=\"8\">Error</option>"; }else{ echo "<option value=\"8\">Error</option>"; } if($theme[0]=="9"){ echo "<option value=\"9\" selected=\"9\">Grey Orange</option>"; }else{ echo "<option value=\"9\">Grey Orange</option>"; } if($theme[0]=="10"){ echo "<option value=\"10\" selected=\"10\">Pinky</option>"; }else{ echo "<option value=\"10\">Pinky</option>"; } if($theme[0]=="11"){ echo "<option value=\"11\" selected=\"11\">Matrix</option>"; }else{ echo "<option value=\"11\">Matrix</option>"; } if($theme[0]=="12"){ echo "<option value=\"12\" selected=\"12\">windows</option>"; }else{ echo "<option value=\"12\">windows</option>"; } if($theme[0]=="13"){ echo "<option value=\"13\" selected=\"13\">Night Pink</option>"; }else{ echo "<option value=\"13\">Night Pink</option>"; } if (strstr($_SERVER['HTTP_USER_AGENT'], "MOT-")) { echo "</optgroup>"; } echo "</select><br/><br/>"; boxend();
Comment
-
Code://////////////////////////////////////////////////////////genproc.php else if($action=="updtthme") { addonline(getuid_sid($sid),"Actualizando Perfil",""); $theme = $_POST["thms"]; $size = $_POST["size"]; $uid = getuid_sid($sid); $exist = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_users WHERE id='".$uid."'")); if ($exist[0]>0) { $res = mysql_query("UPDATE fun_users SET theme='".$theme.".css' WHERE id='".$uid."'"); }else{ $res = mysql_query("UPDATE fun_users SET theme='".$theme.".css' WHERE id='".$uid."'"); } echo "<p align=\"center\">"; echo mysql_error(); if($res) { echo "<img src=\"images/ok.gif\" alt=\"o\"/>Tema Actualizado<br/><br/><br/>"; }else{ echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/><br/>"; } echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Página Inicial</a>"; echo "</p>"; echo "</body>"; echo "</html>"; exit(); } //////////////////////////////////////////////////////////index.php else if($action=="sitethms") { addonline(getuid_sid($sid),"Tema do Perfil",""); echo "<p align=\"center\">"; echo "</p>"; echo "<p>"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); echo "<a href=\"inbox.php?action=main&sid=$sid\">»Torpedo's($umsg/$tmsg)</a><br/>"; $uid =getuid_sid($sid); //$new_gm = getnewgml($uid); echo "<p align=\"center\">"; echo "<form action=\"genproc.php?action=updtthme&sid=$sid\" method=\"post\">"; include("set.php"); echo "<input type=\"Submit\" name=\"submit\" Value=\"Save\"></form>"; echo "</p>"; echo "</p>"; echo "<p align=\"center\">"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Pagina inicial</a>"; echo "</p>"; } //////////////////////////////////////////////////////////usage echo "<a href=\"index.php?action=sitethms&sid=$sid\">»Site Themes</a><br/>"; //////////////////////////////////////////////////////////in profile $theme1 = mysql_fetch_array(mysql_query("SELECT theme FROM fun_users WHERE id='".$who."'")); echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme1[0]\" />"; echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n"; echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n"; echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n"; /////////////////////////////////////////////////////////set.php <?php echo "<select name=\"thms\">"; echo "<option value=\"style\">Default</option>"; echo "<option value=\"barbie\">Barbie</option>"; echo "<option value=\"blue\">Blue</option>"; echo "<option value=\"hell\">Hell</option>"; echo "<option value=\"lime\">Lima</option>"; echo "<option value=\"love\">Love</option>"; echo "<option value=\"matrix\">Matrix</option>"; echo "<option value=\"stalker\">Stalker</option>"; echo "<option value=\"strike\">Strike</option>"; echo "<option value=\"wanted\">NFS Most Wanted</option>"; echo "<option value=\"white\">White</option>"; echo "</select>"; ?>
Attached Files
Comment
-
Genproc.php
Code:else if($action=="updtthme") { addonline(getuid_sid($sid),"Update Profile theme",""); $theme = $_POST["thms"]; $size = $_POST["size"]; $uid = getuid_sid($sid); $exist = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE id='".$uid."'")); if ($exist[0]>0) { $res = mysql_query("UPDATE ibwf_users SET theme='".$theme.".css' WHERE id='".$uid."'"); }else{ $res = mysql_query("UPDATE ibwf_users SET theme='".$theme.".css' WHERE id='".$uid."'"); } echo "<p align=\"center\">"; echo mysql_error(); if($res) { echo "<img src=\"images/ok.gif\" alt=\"o\"/>Updated<br/><br/><br/>"; }else{ echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/><br/>"; } echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; echo "</html>"; exit(); }
Code:////////////////////////////////Profile Theme else if($action=="sitethms") { addonline(getuid_sid($sid),"Profile Theme",""); boxstart("Theme"); echo "<p align=\"center\">"; echo "</p>"; echo "<p>"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); echo "<a href=\"inbox.php?action=main&sid=$sid\">»Pm's($umsg/$tmsg)</a><br/>"; $uid =getuid_sid($sid); //$new_gm = getnewgml($uid); echo "<p align=\"center\">"; echo "<form action=\"genproc.php?action=updtthme&sid=$sid\" method=\"post\">"; include("set.php"); echo "<input type=\"Submit\" name=\"submit\" Value=\"Save\"></form>"; echo "</p>"; echo "</p>"; echo "<p align=\"center\">"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; }
Comment
Comment