pkirsch Posted March 10, 2007 Share Posted March 10, 2007 Hello! I am trying to (on my site) make a part in which (after the user logs in) they can (under their settings page) choose from a dropdown a list of CSS templates I've made (so whenever they login it changes to their chosen template) and i would even like to have the option to upload their own CSS file and apply it! This is really being stupid and annoying! So i would like to know what "You" think is the best Method for achieving this?? Thanks so Much and Have a Great Day! pkirsch Quote Link to comment Share on other sites More sharing options...
pkirsch Posted March 10, 2007 Author Share Posted March 10, 2007 *Bump* Quote Link to comment Share on other sites More sharing options...
fert Posted March 10, 2007 Share Posted March 10, 2007 just use sessions to store a path to the style sheet Quote Link to comment Share on other sites More sharing options...
pkirsch Posted March 10, 2007 Author Share Posted March 10, 2007 Thank You Very Much "Fert"! Is It safe to allow the users to upload their own CSS file (I will rename it, and put it into their directory?) Quote Link to comment Share on other sites More sharing options...
legohead6 Posted March 10, 2007 Share Posted March 10, 2007 use a switch and echo the script to include different style sheets.... users could also incript other code in those pages which could be deadly Quote Link to comment Share on other sites More sharing options...
pkirsch Posted March 11, 2007 Author Share Posted March 11, 2007 Like?... What could I do to prevent this? Here's what I came up with! 1. Rename the file. 2. Change the CHMOD to something more appropriate! 3. Clean the file of <Script> tags! What more could i do? Quote Link to comment Share on other sites More sharing options...
sanjayshiwakoti Posted March 11, 2007 Share Posted March 11, 2007 <?php header("Content-type: text/css"); $white = '#fff'; $dkgray = '#333'; $dkgreen = '#008400'; ?> body { background:<?=$white?>; color:<?=$dkgray?>; } h1, h2, h3, h4 { color:<?=$dkgreen?>; } blockquote { color:<?=$dkgreen?>; } you can controll all the stuffs by get variable Quote Link to comment Share on other sites More sharing options...
pkirsch Posted March 11, 2007 Author Share Posted March 11, 2007 Thank You VERY Much! Have A Great Day! pkirsch Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.