Project / Support Center
Welcome, Guest. Please login or register. July 23, 2019, 11:01: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  FCK/CKEditor  |  Topic: Making an Admin section also dynamic when working with multiple accounts 0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Making an Admin section also dynamic when working with multiple accounts  (Read 9939 times)
admin
Guest
« on: October 30, 2012, 07:46: PM »

Previously we had shown how to make a upload directory for ckfinder dynamic based on a session variable.

http://webglobalnet.net/support/index.php/topic,2497.0.html

This works great the problem becomes how to make this in an admin area correctly go to the right directory when working with multiple accounts and records.

This issue is as far as we can make it work dynamically it must be based on a session variable mainly because we haven't figured out how to pass a URL variable to the config.php file in ckfinder

So what we did when viewing a particular record we created the following when editing the record was on the edit.php page (or what ever you call the edit page):

<?php
$customerid=$row_rsads_sba['account_id'];
$_SESSION['cust_id'] = $customerid;
?>

This creates the correct variable that is needed to go to the right client file upload directory.

In the config.php file in ckfinder we then changed the base url as follows:

$baseUrl = '/admin/ckfinder/userfiles/'.$_SESSION['cust_id'].'/';

and the

$baseDir = '/home/domain/public_html/admin/ckfinder/userfiles/'.$_SESSION['cust_id'].'/';

Change red to your server directory name

and it worked so instead of actually having to login to a clients account we can now work on a clients record in the admin area created.

The .$_SESSION['cust_id'] variable is overwritten for each separate client record you may be looking at each time
« Last Edit: October 30, 2012, 08:10: PM by Web Global Net » Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  FCK/CKEditor  |  Topic: Making an Admin section also dynamic when working with multiple accounts « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!