Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Re:PHP Page Component - code exiting prematurely (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:PHP Page Component - code exiting prematurely
#1081
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:PHP Page Component - code exiting prematurely 2 Years, 2 Months ago Karma: 10  
No problem. Please feel free to post.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1082
BigDawg (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:PHP Page Component - code exiting prematurely 2 Years, 2 Months ago Karma: 0  
Hello again.

I've been looking through the datagrid class as you suggested but to no avail. I am at a complete loss as to where I should include the additional parameters.

I hope this is not too big an imposition, but could you please have a look at the code and see if you can help me out? Remember, the problem is not the actual display of the datagrid, it's that when I input the search criteria and hit the search button, the module drops out and returns to the home page.

I've included the entire datagrid system (see attached file) and you already have the find_a_doctor.php file. Documentation for the installation etc. is found at
http://www.apphp.com/php-datagrid/index.php?page=installation

Thanks in advance.
File Attachment:
File Name: datagrid_class_4_2_8___part_1.zip
File Size: 902705
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/11/13 17:05 By BigDawg. Reason: Adding file
  The administrator has disabled public write access.
#1083
BigDawg (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:PHP Page Component - code exiting prematurely 2 Years, 2 Months ago Karma: 0  
Here's part 2 of the ZIPped file. You'll need to extract both parts into the same folder.

Thanks again for your help and your patience.
File Attachment:
File Name: datagrid_class_4_2_8___part_2.zip
File Size: 433567
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/11/13 17:10 By BigDawg.
  The administrator has disabled public write access.
#1084
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:PHP Page Component - code exiting prematurely 2 Years, 2 Months ago Karma: 10  
I believe adding the URL parameters to the function: DataGrid :: SetHttpGetVars() will do the job.
Before the call to to $dgrid->Bind(); add:

$dgrid->SetHttpGetVars(array('option', 'Itemid'));
Off Topic: I must add however that there is an XSS injection vulnerability in the DataGrid code that handles this. You have to take that up with the developers. On line 3602:
echo "<input type='hidden' name='".$key."' id='".$key."' value='".((isset($_REQUEST[$key]))?$_REQUEST[$key]:"")."'>";
Should be changed to:
echo "<input type='hidden' name='".$key."' id='".$key."' value='".((isset($_REQUEST[$key]))?htmlentities($_REQUEST[$key], ENT_QUOTES, 'UTF-8'):"")."'>";
line 3636:
$a_url .= $key."=".((isset($_REQUEST[$key]))?$_REQUEST[$key]:"");
should be changed to:
$a_url .= $key."=".((isset($_REQUEST[$key]))?htmlentities($_REQUEST[$key], ENT_QUOTES, 'UTF-8'):"");
or similar code to convert HTML to corresponding HTML entities.
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/11/14 15:12 By admin.
  The administrator has disabled public write access.
#1085
BigDawg (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:PHP Page Component - code exiting prematurely 2 Years, 2 Months ago Karma: 0  
Thank you SOOOO much for your help with solving this problem . Your suggestion was spot on but the placement was a little off. After doing a bit more research based on what you proposed, I found out that the solution was actually already in the datagrid code - have a look around the area of line 223.

##  *** set variables that used to get access to the page (like: my_page.php?act=34&id=56 etc.) 
/// $http_get_vars = array("act", "id");
/// $dgrid->SetHttpGetVars($http_get_vars);
I uncommented the two lines of code and changed them to
##  *** set variables that used to get access to the page (like: my_page.php?act=34&id=56 etc.) 

$http_get_vars = array("option", "Itemid");

$dgrid->SetHttpGetVars($http_get_vars);
and voila... it works fine now. Again, thanks for your patience and your time. You are great. I'm sure I'll need to tap into your expertise again sometime in the (very) near future so look out for me
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.