Jump to content

d_barszczak

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by d_barszczak

  1. A common way to do this would to have a time limit on the id in the database as Neil pointed out but if you use php to send the file I think you can then remove the key from the database once the file has been send. // Use the database to get the file name and file location for the submited key. header('Content-Disposition: attachment; filename="download.jpg"'); readfile('images/100.jpg'); // Remove the key from the database. This would download the file images/100.jpg which has been stored on the webserver to avoid duplicate names and sent to the user in a more user friendly way. You could also timelimit a cookie so the user can download it again if it fails. Usually you get about 24 hours.
  2. I think if you miss out the first / that should work also: images/ not /images/
  3. ./ in html is not required because it does not have access to the linux root whereas php does.
  4. Your web root is entirely different from your root directory. Think of / in linux as your C:\ and ./ as your current working directory. Your web root is usually something like /home/username/public_html/ By using ./images/image.jpg you are looking for /home/username/public_html/images/image.jpg and by using /images/image.jpg you are using /images/image.jpg you are looking for just that. Hope this helps you understand a little better. Do a little research on linux filesystems.
  5. Excellent thanks. I wasn't far off but that really helped.
  6. Hi all I have a column `idnumber` that contains data such as SCH-DEP-001 and i want to run a distinct query on this column for everything before the last dash. SCH-DEP- SCH-DEP2- Not all the middle values are 3 digits. Is this possible?
  7. Hi all Im am using sqllite for a project and i am about to start using triggers. Is there a way to view the names of triggers i have set. i.e. show triggers.
  8. Thanks for your help I have done it. Users can now sign up to my forum through my registration page.
  9. Hi all, I am currently designing a system in which I would like users that register on my site to automatically have a user account created on my SMF forum. For some reason when i create a username and password from a SQL query I still get an access denied message. Think they may be more to this somehow. I like SMF and don't really want to change it but this is becoming a problem. Hope someone can help.
  10. I have built a "Engine" that is all oop and has a built in permissions management systems. I saves me a lot of coding but is currently only used for websites and applications built by my business. I can also merge permissions between sites and develop modules rather that recode a miilion authentcation systems for every customer that requires a login system. Well worth developing one if your program lots of sites.
  11. The way i have done this in the past would be to have a users table, a groups table and a members table. Users: Uid | Username | Password 1 System ChangeMe Groups: Gid | Groupname 1 Administrators 12 Premium Membership Members: Mid | Uid | Gid 1 1 1 Then you do the same thing for your videos Video_Members: id | vid | gid 1 | 25 | 1 2 | 25 | 12 In the above example administrators and premium members would have access to video 25. This might seem complicated at first but once you develop some oop functions to manage the memberships then it becomes a lot less complicated in the long run. Plus you could then use the same membership system should you add other features to the site.
  12. d_barszczak

    Crontabs

    Which users cron is your plesk control panel showing because it could be the root crontab thats running the jobs. Which flavour of linux are you using?
  13. Just wondered if Open Office could be considered a replacement for MS Office.
  14. Hmm good point... I need to allow for sub domains so i could do something like "http://*.integrateditsystems.co.uk" or require a hitcounter for each sub domain. Will have to have a think about this then.
  15. Hi all, Once again i have been tripped up by regex so hope you can help. I have a hitcounter script that submits an id and the url of the page the script was run. I need to be able to detect a domain within the url i.e. // Check to see if site is registered. $domain = "integrateditsystems.co.uk"; $url = "http://www.integrateditsystems.co.uk/support"; if ($domain exists within $url) return true else false; // Help Me!!
  16. Thanks!! That looks really complicated. Just wish i could get my head round it:)
  17. Hi all, I am useless when it comes to regex so all help is much appreciated. I have php template system which i use and i am about to add a new utitity to it that easily allow you to add resources to a page. I need to be able to pick tags out of a page of html. e.g. <p>[resource type=image' id='1' height='100' width='100]</p> I would like the script to detect the [resource ] tags and any data within such as id='1' place in an array. Is this even possible?
  18. I have a column called `shortname` and i need to add a prefix to every entry of 'ths_'. Is there a way i can do this with one query without having to use php. Thanks.
  19. The following line of code works fine when in the same html document but won't work from a seperate .js file. document.getElementById('menubar').innerHTML = "<p>Test Message</p>"; Any Ideas?
  20. Thanks!! I thnk the first reply is a php script not a JavaScript The second reply got it though, thanks again!!!
  21. Hi All. I need to convert a variable : myVar = "Test". Into an array : myArray[0] = T, myArray[1] = e, myArray[2] = s. and so on. Does anyone have any ideas?
  22. The height between the 2 horizontal rules and the menu text change. It's IE7 & FF 2 i am testing it with.
  23. The following page is displayed as it should in FF but not in ie. Can anyone Help? http://www.integrateditsystems.co.uk/dev/peakaccounting/ The class menu contains the following: .menu { font-family: Arial; font-weight: bold; color: #72BD1E; font-size:14px; margin-top:2px; margin-bottom:2px; }
  24. Hi all, I have been asked to install an auction script for the work place. Does anyone know any good OS Auction script?
×
×
  • 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.