Jump to content

leeming

Members
  • Posts

    93
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

leeming's Achievements

Member

Member (2/5)

0

Reputation

  1. I have been struggling with this problem since i first started creating this layout (ages ago, but for development reasons, i stuck static width/heights in, just to work on my screen). I have searched google numerous times, but with no avail, as sites go on about something which is irrelevant to what im wanting (so maybe vague/bad use of keywords in search). any way i did a quick search on here, and any help given, does not seem to fix up my layout. My first basic problem is having a side navigation bar to fill the height of the screen, plus the header which is a static height. All this without creating scroll bars for the browser My second problem, which may be more or less the same as the above (miss-understanding of css), having a 100% height which includes padding. Link: http://dlym.net/testing/css_help.php Source (html) <html> <body> <div id="container"> <div id="top">header</div> <div id="sidebar">laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br>laaa<br></div> <div id="content"> <div id="childcontainer"> <div id="paddedbox"> <div id="test1">title</div> <div id="test2"> <div id="myElement"><a onclick="">main content</a></div> </div> </div> </div> </div> </div> </div> </body></html> CSS html, body { margin:0px; padding:0px; width:100%; height:100%; } #container { width: 100%; height:auto !important; /* real browsers */ height:100%; /* IE6: treaded as min-height*/ max-height:100%; /* real browsers */ background-color:grey; position: relative; } #top { width: 100%; height: 100px; background-color:pink; } #main { width:100%; height:100%; } #sidebar { background-color:red; width: 150px; height: 100%; float: left; } #content { background-color:blue; overflow:hidden; padding:10px; height:auto !important; /* real browsers */ height:100%; /* IE6: treaded as min-height*/ max-height:100%; /* real browsers */ } #childcontainer { background-color:white; padding:10px; } #paddedbox { background-color:green; margin-bottom:0px; margin-top:0px; overflow:hidden; } #test1 { width:100%; height:20px; background-color:yellow; } #test2 { width:100%; height:100%; background-color:lime; } The above is a simplified version of my site's layout, but they are the core div containers which i am trying to get positioned correctly. I seriously will thank any one who gives any help which leads me to fix this problem, as i am not too skilled with css, and this has been troubling me for some time. Thank you
  2. One thing holding me back from doing the addon domain way, is that users will not be able to use the cPanel. Not too bad as most of it is just shortcuts and easy steps for users (.htaccess shorcuts etc). But the other things such as creating mail accounts i have found in custom php classes. But... This is the thing which holds me back the most. I can not find any classes or a way of controlling the cron tabs. Does any one know if this is possible from outside of cPanel? I know how i could use a work around for regular tasks, such as per minute|hour|day|week|month, but nothing which allows custom cron tabs such as: 1pm, on 20th of month. davidz's idea sounded really good untill i saw the security flaw. I am unsure if any file or ftp functions can be worked in such a way to 'extract' these files and execute but not store.
  3. download the sample ipn php script, and just add some code where it tells you to. such as, db connection, then add a record into your database with a random username and password, then send them an email with this data. should be simple enough. Oh and make sure you enable ipn on paypal's side, and direct it to the url of this script
  4. I think require/include could call an external script's code, since it will be compiled before sent to me? (because of the http request, instead of a full server path).** Any way my host has also disabled that also. But maybe i could fiddle around with ini_set() later. Edit: ** Ah yes, i reread the example, so i could add some random extension instead of php, and it would be included like any other text. I see where you are coming from with the security problem. Maybe if i set up a gateway type file to include which you need a password to get via, //to call include("http://site.com/dir/gateway.php?user=leeming&&password=123456"); //in gateway.php on other account if($_GET['password'] == $correct) { include("path/to/file.weird"); } else { //log some kinda of security alert? } edit 2: ah yes, but this still shows the source, defeats the purpose of not distributing it.
  5. I thought i would get this problem sooner or later, which is my host blocking access to other accounts. Such as, "/home/{user1}/www/file.php" trying include "/home/{user2}/www/file2.php". Both accounts are owned by me, and under a reseller so i thought that "owner" setting for CHMOD was for this. My question is, since i can not do this no more, is how can i still access this file from another user's area? would ftp do this, or would that just return the source in a string? My other idea was to run all the other accounts as addon domains. But this removes the option of having a cPanel for the users. The file which is included is a set of classes/functions, and is used by a few users (not just my accounts, but still under my reseller), so i am not really able to distribute this file for all the accounts to host them selves. Any ideas how i could do it, or extend on what ive suggested? Any help is welcomed Thank you
  6. Basically i am wanting to have an extra area of a class (kinda like a module) kind of like class user { } class admin extends user { } but if i use the user class, and later in my code i find out the user is an admin, i create a new object admin... but there is my problem. This will be a new object, and thus all the methods in the user class will need to be set up again. Is there a way to add on this extended class to the current object (the same object) The original solution i thought of was this: class user { .. user functions etc function isStaff() { //set true or false } if($this->isStaff()) { //extra staff functions } } but obviously this did not work, and the only other way around this would be to add to each staff function if(!$this->isStaff()) return FALSE; which honestly would look very messy, and due to this been quite a large class would get VERY messy and confusing very fast.
  7. Nope i am now forced to do this function for one of my custom tags //References $tag = '/\[ref\](.*)\[\/ref\]/'; $html = '<sup><a href="#ref${1}">[${1}]</a></sup>'; $text = preg_replace($tag, $html, $text); It is an page to add articles, and [ref] just anchors to the bottom where the references are all listed (by number) i get the same annoying output as before... text [ref]1[/ref] middle [ref]2[/ref] end which outputs text <sup><a href="#ref1[/ref] middle [ref]2">[1[/ref] middle [ref]2]</a></sup> end is there no way to get preg_replace (or similar function) to go thru left to right instead of skipping to the last tag?
  8. exactly what im trying to explain... oh well, i will just use a simple string replace, and still wonder why i get that error
  9. The class looks impressive but, i would like to add that this code i have custom tags, due it been made for some one (its part of my coursework, even though i use php quite a bit any way). And also i'd have to document all this external code. (like previously said, im wanting to understand why it is doing this... i can still use str_replace)
  10. I thank you for the help, but... does not fix any thing... my code still takes the 1st and last (ignoring middle tags) and applying formatting to the whole lot. But i may add, this seems to be only in sections (maybe lines?) I am not fimilar with the syntax, which is why i was enclosing the [ b ] tags (i got hold of the bbs for [ url ] and changed it to do the rest of the tags for myself)
  11. Im trying to create a copy of BBS codes. i know i can do replace on these type of tags, but i have come across an error, and would like to understand it. //BOLD text $tag = '/(\[b\])(.*)(\[\/b\])/'; $html = '<b>${2}</b>'; $text = preg_replace($tag, $html, $text); The problem i have with the above is... [b]bold[/b] normal [b]bold[/b] Shows as: Just without the obvious spaces Basicly, it is catching the 1st bold tag, and matching it with the last one it can find (thus the middle is missed out)
  12. no, would will have do what sspoke said... when saving the password, in the insert query just put md5($password) instead of $password.. this will save a thing called a hash, this means you can only go 1 way to encrypt it (you cant decrypt it)... why do this? well.. when people log in, instead of searching for the loging details using the where clause "WHERE user='$user' AND password = '$password'" you put "WHERE user='$user' AND password = '".md5($password)."' " All this basicly means is (using "adam" as the password) its not checking the database for the password typed in by the user (as the hash will be some thing with what seems to be random letters and numbers) but its checking the hash to the user's input for password, and the real hash for the password saved (the hashes will be the same)
  13. [quote author=jesirose link=topic=119596.msg491963#msg491963 date=1167198309] Have you tried other hotmail accounts? [/quote] You caught me as i was adding an edit.. yes i have tried more hotmail accounts... its the reason it popped up in the 1st place, because my members where complaining to me they wasn't getting an email
  14. [quote author=Daniel0 link=topic=119596.msg490083#msg490083 date=1166777676] Check your junk folder. [/quote] I must of forgotten to add.... not in spam either... its just not getting thru to hotmail..... since i posted this.. i have been testing alot of headers to see if hotmail would like any of them.... nope.. still wont get thru.... im now using this code to test.... [code] <?php if($_POST['submit']) {     $recipient = $_POST['email'];     $subject = "Complete your Bavad.Com Registration";     $headers = "From: leeming <leeming@bavad.com>\r\n";     $headers .= "Reply-To: leeming <leeming@bavad.com>\r\n";     $headers .= "Return-Path: leeming <leeming@bavad.com>\r\n";     $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";     $headers .= "MIME-Version: 1.0\r\n";     $headers .=  "Content-type: text/plain; charset=ISO-8859-1;\r\n";     $headers .=  "Message-ID: <". time() .rand(1,1000). "@".$_SERVER['SERVER_NAME'].">". "\r\n" ;     $headers .=  "Date: ".date("r")."\r\n".     $headers .=  "Subject: ".$subject."\r\n";             $message = "Welcome to bavad.com! lets talk\n about loads of stuff\n password and stuff here";     if(mail($recipient, $subject, $message, $headers))     {         echo "Mail (apparently) sent";     } } echo("<form name='email' method='post'>"); echo("Recipieint: <input type='text' name='email' size='30'> <input type='submit' name='submit'>"); ?> [/code] ~edit~ after more and more research on this topic, i am coming to the conclusion it is hotmail blocking the server or what ever, instead of the headers.. (kinda as bad as AOL) if there any way i can find out if my server is blacklisted *like said originally, i checked, but it said i hadn't* extra info for ya: My server is Linux Apache version:  1.3.37 (Unix) And its data center is in Texas i think... could any of them factors affect it in any way? i will continue researching this...
  15. its ok, i had 4 classes all in one file, so obviously the mod class exists (user class, where all extensions of) put them all in their own class files (maybe a bit annoying looking at inheritance stuff, but it works)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.