I have a $_REQUEST
but i dont know how to add multiple SELECT query with different function.
There it is :
if($_REQUEST['use_percents']!='true')
{
$extra['SELECT'] = ",'' AS GRADE_PERCENT,'' AS REPORT_CARD_GRADE";
$extra['functions'] = array('GRADE_PERCENT'=>'_makeGrade','REPORT_CARD_GRADE'=>'_makeGrade');
}
Here is the first function :
function _makeGrade($value,$column)
{ global $THIS_RET,$current_RET,$import_RET,$grades_RET,$grades_select,$student_count,$tabindex;
if($column=='REPORT_CARD_GRADE')
{
if(!isset($_REQUEST['_marking']))
{
$student_count++;
$tabindex = $student_count;
if($import_RET[$THIS_RET['STUDENT_ID']])
{
$select = $import_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID'];
$extra_select = array($select=>$grades_select[$import_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID']]);
$div = false;
}
else
{
$select = $current_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID'];
$extra_select = array();
$div = true;
}
$return = SelectInput($select,'values['.$THIS_RET['STUDENT_ID'].'][grade]','',$extra_select+$grades_select,false,'tabindex='.$tabindex,$div);
}
else
{
if($import_RET[$THIS_RET['STUDENT_ID']])
$select = $import_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID'];
else
$select = $current_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID'];
$return = '<b>'.$grades_RET[$select][1]['TITLE'].'</b>';
}
}
elseif($column=='GRADE_PERCENT')
{
if($import_RET[$THIS_RET['STUDENT_ID']])
$select = $import_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'];
else
$select = $current_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'];
$return = $select==''?'':($select+0).'%';
}
return $return;
}
i have other function, but confused to adding onto the $_REQUEST
... anyone can help me with this?...
For further files, you can view from google code : Here Thanks :)