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.

Did you know?Explore Trending and Topic pages for more stories like this.
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 Like 40 Dislike
Previous forums Next forums
Other forums

Schedule editor
Hi,

I have a question related to Schedule editor.
If we schedule a BLS for every 30

How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

setcookie and isset($_COOKIE(name)) seem very finnicky.
I'm currently playing around with a user system with login and registration. I'm trying to use cooki

Clean URLs
Hi I was wandering if anyone has ever implemented URLs on their PHP run website using URLS like wiki

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Transport data between itab and textfield on ALV event
Hallo,

I have a ALV Grid ( cl_gui_alv_grid ) and I also have hotspot click event with a h

Need help adding a timestamp to my filename/variable
Hello,

I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash