...back to my bit of 'strange php'...
There is a checkbox column generated at the end of a row by this code. I have tried in vain to place it at the front (left) of the row. I succeeded in getting it to the correct place but all the data vanished!
Any help?
======================================================
function showList() {
$list_id = (int) $_REQUEST['curr_list_id'];
$chk = new cquery();
$chk->set_query_sql("SELECT display FROM mailmachine_customfields_lists WHERE list_id = $list_id");
$chk->run_query();
if ($chk->num_of_rows() != 1) {
cbaseform::showList(true);
} else {
$foo = $chk->get_next_hash();
$e = '<tr class="rows" onmouseover="this.className=\'hilite\'" onmouseout="this.className=\'\'">';
foreach (unserialize($foo['display']) as $k => $v) {
$e .= '<td valign="top" align="right" nowrap width="20%"><a href="{FILE}?sub_id={SUB_ID}&todo=edit">{'.strtoupper($k).'}</a></td>';
}
$e .= '<td valign="top" align="right" width="50px"><input TYPE="checkbox" NAME="select[]" Value="{SUB_ID}" {SELECT}></td></tr>';
parent::showList(true, $e, count(unserialize($foo['display'])) + 1);
}
}
======================================================