Jump to content

rootKID

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by rootKID

  1. Hey, sorry for late reply! Been busy at schools and stuff. Mostly schools (GOD i hate math! )... But thanks! Will take a look later when i get home -rootKID
  2. Should you just not add more to the array instead of making static data? That is how i read this... if you make static data, it WILL reset, as far as i am aware. But not totally sure tho :/
  3. Okay, i might have asked about this in the past, but could not find my post (lol), so asking again. Hope this is ok x). I have a function at my home-desktop called (GetDate()). It is supposed to get the date of a news group in the database. This means if a ADMIN account on my website writes a new (Latest News) article, the function are meant for getting a normal time() function in the database, and from that telling me when the admin wrote this Latest News article. Now, if i wish to use something similar to a month ahead, like on a hosting bill (éxample). If a user has bought a website hosting-plan at my server, and i store the current time() in the database (when it was bought). How would an example be to output +1 month ahead? So the user knows when the next bill comes? What i am aiming for here are something similar to this: You paid the bill on 28-10-2013, the next bill will be set to be paid at 28-11-2013 Hope you get the point of what i am trying to do here. Sorry for my bad english right now, in a hurry and writing from my school.. so does not really has time to perfect into details as i usually does x)... But any questions, do not hesitate to ask away . NOTE: i will update the post later and add in my function so you can see what i am talking about . Hope you guys have some ideas etc ... -rootKID
  4. sorry for late reply. Thanks for the info tho!
  5. Hey W3S. I was recently on a website whatching their source-code (for fun well noted). And i noticed this peace of code on one of their ahref links: onfocus='blur()' any idea what part that plays? Coz i do not Oo...
  6. I found out when i got home today, lol.. feeling like a rookie. Hate when i forget some damn small thing in the coding like this one But thanks anyways! Got it working now!
  7. I keep get this error: Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in C:xampphtdocsother_projectslh_v1index.php on line 8 and this is my HOLE code in the 2 files: Index.php: <?phprequire_once("include/core.php");get_template();$HTMLOUT = "";//Starting Variable...$folder_url = "home";$HTMLOUT .= "<br />";include("pages/".$LH['template']."/".$folder_url."/page_controller.php")foreach($files as $file_id => $file){ include_once("pages/".$LH['template']."/home/{$file}.php"); $HTMLOUT .= "<br />";}print stdhead('Home') . $HTMLOUT . stdfoot();?> page_controller.php: <?php$files = array('news' => 'news','last_forums_posts' => 'last_forums_posts','last_forums_replies' => 'last_forums_replies');?> and they are 110% exact as shown above here... i just dont get it...
  8. Sorry for late reply, and it has php start and end tags in it.. that is kind of the purpose here hehe ... But i still dont understand why it makes such a scene about the damn coding.. should be working just fine as i can see it... i simply dont understand -.-'
  9. Ingolme: I tried to implent you method last night to my foreach element on index.php file. And i got an error again, this is my example: Index.php: require_once("include/core.php");get_template();$HTMLOUT = "";//Starting Variable...$folder_url = "home";$HTMLOUT .= "<br />";include("pages/".$LH['template']."/".$folder_url."/page_controller.php");foreach($files as $file_id => $file){ include_once("pages/".$LH['template']."/".$folder_url."/{$file}.php"); $HTMLOUT .= "<br />";}print stdhead('Home') . $HTMLOUT . stdfoot(); page_controller.php: $files = array('news' => 'news','last_forums_posts' => 'last_forums_posts','last_forums_replies' => 'last_forums_replies'); Any ideas/clues of how to fix Oo.. I mean, it should be working correctly in my own eyes. I included the file with the variable ($files) containing the array information, and used that variable on index.php file. Should that not do the trick? Oo EDIT: Currently in school right now, so cannot tell you the error. But will check when i get home later, to see if i can find the error again -rootKID
  10. Ohh.. did not see that one coming :/. Thanks! Will test your method tomorrow Ingolme, currently i have some visitors at my home. Will reply tomorrow if it worked!
  11. Hey again. I once again stuck with a problem, or more likely a question of a sort. I am trying to build my own sort of API/Coding system, if you could call it that. In other words, a more easier way of creating controlled websites by me (guess that is the closes thing i could come to an explanation). Right now i am working on a template system that would allow me to controle what files (codes) to be loaded on each page the current user now are on. This means if the user uses a template called dark_v1, it will then go into the folder (pages) and from there go into the folder called dark_v1. Now, in there i will have seperated folder, like home,webshop, etc. On each folder i will have a file called (page_controller.php). Very simple, it will hold the array i will need to use later on. Here is example: array('news' => 'news','last_forums_posts' => 'last_forums_posts','last_forums_replies' => 'last_forums_replies'); This peace of code, will allow me to easily write in the array what files to take from the current location. This will come in handy in my own experience, even tho it is still not working, but the purpose is clear in my own eyes. Now, on index.php file (also known as home-page), i would like to make an foreach statement, and will then load the current files that are IN that current loaded array from the (home) directory/folder. Here is my current example and that i am working on: require_once("include/core.php");get_template();$HTMLOUT = "";//Starting Variable...//$files = array('news' => 'news', 'last_forums_replies' => 'last_forums_replies', 'last_forums_posts' => 'last_forums_posts');$folder_url = "home";$HTMLOUT .= "<br />";$files = array(include("pages/".$LH['template']."/".$folder_url."/page_controller.php"));foreach($files as $file_id => $file){ include_once("pages/".$LH['template']."/".$folder_url."/{$file}.php"); $HTMLOUT .= "<br />";} //$HTMLOUT .= "123";print stdhead('Home') . $HTMLOUT . stdfoot(); As you see, i used the array on the index.php file itself a while ago. And guess what, it worked. But now when i try to do it this way, it will not work. And i simply and easy needs a new set of eyes on my little project here. Hoping your dudes and girlz out there can spot something i cannot, and hope you understand the project i am doing right now. If not, do not hesitate to comment. I will try to explain more in details if possible so you can understand it. Thanks... ALOT! if you could spot something i could not! -rootKID
  12. hey, sorry for late reply. I have been off for some time due to homework and stuff. Anyways, before i give you anything. I would like to ask of something. I was taking a look at Explore (Latest) and Mozilla (Latest). They look ok, the menu does not hide behind the boxes. This means it is ONLY chrome doing this. So is it possible it actually in real works, and i only need to add a few lines of CSS to be XHTML for Chrome? It looks ok in the 2 others i checked. Ideas? Or still need to see the HTML/CSS?
  13. Sorry for late reply. I am in school now, but will reply later with all HTML/JS/Details you need. -rootKID
  14. Okay, i have uploaded an attachement to the post here, and as you see. I have some trouble with the menu. I am trying to make a menu just like this website: http://www.templateaccess.com/demos/responsive/html/devclub/index.html And no, it is not stealing. Only educational purpose use! Anyhow and regardless! As you see, the menu drop-down's are going behind the boxes i have right now. And not sure why. I have also attached the 3 .css files, coz the code is a little long, it should be very easy to find out how to work with it inside the .css files. I did try to use z-index with 100000 on .menu ul li ul li inside the panel css file, but since it did not work, i'm on a little thing i would call broke of ideas -.-'. Hope you guys can help me figure out what is wrong here, could be awsome! -Thanks NOTE: If you need more information, please do not hesitate to give a comment etc . And ohh, almost forgot to tell. The Menu is based on .JS file. Meaning i am using .JS to input the different menu-tabs etc to the panel. Hope you can make some sence of this whitch i cannot, just yet. -rootKID
  15. rootKID

    Need Help Here..

    @JSG is it not possible to do with a normal (time()) function? Just that i have a function from an old project of mine that can predect the month by time function, all i'm saying is if it's not possible to do same here? Example would be the SQL i just shared above. I'm currently using that SQL for my News table where added is a simple date_time() (or normal time()) function (if i remember correctly), and using time to simply check the month, not that hard once getting the hang of it... So when i see your post, i'm getting a little bit confuced. But again, not sure if my method is 100% sure and effective, but i dont complain.. worked so far.
  16. rootKID

    Need Help Here..

    hmm, sounds interesting.. could you give an example? So i might understand it better..
  17. rootKID

    Need Help Here..

    ok, note that this was just a quick one, might wonna change stuff here and there and try to play around with it, but i think it's something close by to this one. That is what i imagine when i read your post, not sure if its the same.. but still
  18. hmm, never thougt of that x)..
  19. not sure if this is related or against the rules etc, but i do have a question that is close or similar to this problem, and not sure yet, so posting the question here.. i have for not so long ago seen a automated tool on a movie site via IMDB website getting information with a request function of some sort, that part is not my problem right now. Now lets say i wish to make a blog about movies, and wish to use the picture ON that IMDB page for that specific movie, would it be possible instead of using links to show over to that site, by the automated request save this picture to the own server, rename it to (some ID to the database post etc to know what is what), now save it to a folder on my server, and use that picture instead of linking directly to that picture and still get the rest of stuff i am requesting from their site. The request part is easy i think, but it's the image i was wondering about if it was possible, i do think it is tho, just how to implent it... ideas?
  20. hmm, i suppose that is depending on the user jsg, i would probably not be confuced x)..
  21. i would go with require_once().. i always use that php function to get my db-connection file...
  22. rootKID

    Need Help Here..

    DUMP: Did it help? Or what?...
  23. rootKID

    Need Help Here..

    not sure if i'm getting this right, but in your SQL, you would be checking first of all if it's older than 30 days, so something like this: // 30 days; 24 hours; 60 mins; 60secs (shows WHERE less than 30 days)$res = mysql_query("SELECT * FROM TABLE WHERE YOUR_TIME + ( 30 *24 *60 *60 ) > ".time()." ORDER BY YOUR_TIME DESC LIMIT 2"); Note that this is just a method i use myself, but something similar to this one, i use this peace of code for showing all the latest news items for my news website that are less than 30 days, and if bigger, dont... the ORDER BY and after there you can change after wish, but something similar to this code i think after what i read and understand of your wishes... Hope it helps a little .. EDIT Lulzim also have something close to my method, sort of x)...
×
×
  • Create New...