Reputation: 65 Whiz
- Active Members
- Active Posts:
- 239 (0.18 per day)
- 22-November 10
- Profile Views:
- Last Active:
- Sep 01 2013 11:16 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 26 Aug 2013Hopefully this PSD to HTML tutorial will be helpful. I used it many years ago and found it useful at the time so maybe you will too
Your main focus point is most likely the CSS and layout design.
Posted 18 Aug 2013This isn't my usual late night dozing off post so hopefully this will be more hopeful then the previous posts. In my opinion, you are writing your logic backwards. Your flow of logic should be something along the lines of:
1. Check if the user is a regular user
2. If the user is a regular user, redirect them to the logout page or some other non admin page
3. Otherwise, we know the user is an admin so continue on with admin functionality
QuoteWhen i go to url.com/Admin/AddAdmin It will only bring up the Admin/Index instead of going through to the AddAdmin. I know its cause of the $this->Index(); what would be the best way to stop that from happening?
This is most likely because of exit(0); after you call $this->Index() and AddAdmin(); never runs.
However, if you restructure your logic to follow a similar logical flow mentioned above, your application should route the user to the proper function(s) in your Admin controller. This will also remove the need of redirects and internal routing in your constructor, and in my opinion, a cleaner logical flow. Just remember, any logic you place within your Admin constructor will execute on every request that is routed to the Admin controller.
Posted 16 Aug 2013Ok, can you elaborate you little more as to how it didn't quite work??
Posted 16 Aug 2013You could do this:
Although, I'm sure there is a better way to route your application to acheive the same effect.
Posted 16 Aug 2013
QuoteI know that when someone goes to url.com/Admin it will check to see if they are logged in, if not it redirects them to the logout page. If they are logged in and role == 1 then it will redirect to the Admin Class. But it errors out. So I'm curious if its possible to redirect to a function inside the class.
Well based on your statement above and your code logic, if a user is logged in and role = 1 (assuming this means they are in fact an admin), then the user will be redirected to /admin. This will cause the __construct function on the Admin controller to execute, which will then follow then same logical path causing the user to redirect to /admin. And so on, and so on...
- Member Title:
- D.I.C Head
- Age Unknown
- Birthday Unknown
- Years Programming:
- Programming Languages:
Familiar: C#, VB, XML
- Website URL: