I am new to phprunner and would like to be able to use a check boxes to make multiple selections with the results from a query.
I made this all work but I edited the [table]list.php file after getting the [table]*.php files started with phprunner.
However, if phprunner is used it will over write the files I edited so I am trying to either put these changes into phprunner
or have the ability to overide the phprunner created files the way the htm file can do so by placing it in the visual directory.
The file called pmid_comparison_list.htm creates a list of check boxes with the data from a query:
<!-- Create checkboxes on the wbselement fields -->
<td valign=middle class=borderbody>
<input type=checkbox name="selection[]" value="{$row.1keyblock}" id="check{$row.1recno}">
</td>
<td valign=middle class=borderbody {$row.1wbselement_style}>
{$row.1wbselement_value}
</td>
....
<!-- Create the Move Selected button in the second panel with search buttons -->
<span class=buttonborder><input disptype="control1" class=button type=button value="Move Data From Temp Tables" onclick="var c=0; if(frmAdmin.elements['selection[]'].length==undefined && frmAdmin.elements['selection[]'].checked) c=1; else for (i=0;i<frmAdmin.elements['selection[]'].length;++i) if (frmAdmin.elements['selection[]'][i].checked) c=1; if(c==0) return true; frmAdmin.submit(); frmAdmin.action='pmid_comparison_list.php'; frmAdmin.target='_self';"></span>
When the query is made, it creates code with "value=''" and I receive an array with empty values. I made this work outside of phprunner
by editing the file called pmid_comparison_list.php. I have two types of queries on the screen and set the id depending on if a pull down selection was made:
if ($_POST['tfaid'] > 0)
{
//echo "loading keys with subtfaid ". $data["subtfaid"]. "
";
$row[$col."id1"]=htmlspecialchars($data["subtfaid"]);
$keyblock.= rawurlencode($data["subtfaid"]);
$row[$col."keyblock"]=htmlspecialchars($keyblock);
$row[$col."recno"] = $page->recno;
// edit page link
} else {
$row[$col."id1"]=htmlspecialchars($data["wbselement"]);
$keyblock.= rawurlencode($data["wbselement"]);
$row[$col."keyblock"]=htmlspecialchars($keyblock);
$row[$col."recno"] = $page->recno;
}
My question is how can I do the same thing via phprunner OR is there a way to use my existing files that work and de-select the
table "pmid_comparison" in phprunner. If I deselect the table in phprunner, then the code will bomb on lines with:
$tablename = $this->table->GetName();
Therefore, if I deselect the table in phprunner, I would need a way to add the table entry in my code so that it will work.
I know that I can hardcode some of the code to have ($tablename = "pmid_comparison") but there were so many other places where
it is needed.
Have others been successfull with this approach of editing the [table]_list.php file manually and make it overide the one
phprunner builds the way the [table]_list.htm file can overide phprunner by placing it in the visual directory?
Thank you,
Mark Lichtenstein
mlichtenstein2@earthlink.net