Working with popups and such in a class
Posted on
16th Feb 2014 07:03 pm by
admin
I've recently started building my applications completely enclosed in classes. I like the fact that I can base everything off one root and work with that, but I'm having a problem with popups (Facebox) and getting the application working with the popup.
Currently what I have is a class for users, within that users class all my user SESSIONS get handled, login/logout actions, and my login, register, and forgot password templates are included through a get() function within the class.
I also have the main class. Here's a quick example
class main()
{
public function __construct()
{
require_once(MAIN_PATH.'plugins/users/users.php');
$this->USERS = new USERS;
}
}
When i include the login page I'm calling it like this
$this->USERS->get('tmpl','login');
Which works, everything works good, but the problem is when I popup the register and forgot in the facebox. I have a helper.php that I popup with a $_GET global tmpl that will equal either register or forgot, and through that I want to be able to do $this->USERS->get('tmpl',$_GET['tmpl']).
I don't know if I'm explaining this right but if anyone had some hints or a tutorial on how I deal with popups and still having everything within my class. My ultimate goal is to make it as if that popup was basically the same as being apart of the page, where I can access everything since as I would normally be able too.
Thanks
No comments posted yet
Your Answer:
Login to answer
90
40
Other forums
Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student
Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t
Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of
Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)
$_POST
Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, Fo
include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou
show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i
Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named
Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything
Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin