** ** Website: http://www.nubuilder.com ** Wiki: http://wiki.nubuilder.com ** Forums: http://forums.nubuilder.com */ session_start(); $dir = $_GET['dir']; $form_ses = $_GET['form_ses']; $ses = $_GET['ses']; $prefix = $_GET['p']; $o = $_GET['o']; $r = $_GET['r']; $n = $_GET['n']; include "../{$dir}/database.php"; include 'common.php'; $object = objectFields($r); $lookupForm = formFields($object->sob_lookup_zzsysform_id); $TT = TT(); $browseTable = $TT; $updateField = array(); //----------create an array of hash variables that can be used in any "hashString" $sesVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $ses); //--session values (access level and user etc. ) $sesVariables['#TT#'] = $TT; $sesVariables['#browseTable#'] = $TT; $sesVariables['#formSessionID#'] = $form_ses; $sesVariables['#rowPrefix#'] = $prefix; $sysVariables = sysVariablesToHashArray($form_ses); //--values in sysVariables from the calling lookup page $arrayOfHashVariables = joinHashArrays($sysVariables, $sesVariables); //--join the arrays together
$ses = $_GET['ses']; //-- zzsys_session_id in zzsys_session $f = $_GET['f']; //-- zzsys_form_id in zzsys_form $rID = $_GET['r']; //-- lookup's selected record id $fr = $_GET['fr']; //-- form's record id $ob = $_GET['ob']; //-- zzsys_object_id in zzsys_object of selected lookup $value = $_GET['value']; //-- selected value to go back into lookup field include "../{$dir}/database.php"; include 'common.php'; $TT = TT(); $object = objectFields($ob); $browse = formFields($object->sob_lookup_zzsysform_id); $SQL = new sqlString(replaceVariablesInString($TT, $browse->sfo_sql, '')); if ($SQL->where == '') { $SQL->setWhere(" WHERE {$object->sob_lookup_id_field} = '{$rID}'"); } else { $SQL->setWhere(" {$SQL->where} AND ({$object->sob_lookup_id_field} = '{$rID}')"); } $SQL->removeAllFields(); $SQL->addField($object->sob_lookup_id_field); $fieldNames[] = $object->sob_all_name; $SQL->addField($object->sob_lookup_code_field); $fieldNames[] = 'code' . $object->sob_all_name; $SQL->addField($object->sob_lookup_description_field); $fieldNames[] = 'description' . $object->sob_all_name; $t = nuRunQuery("SELECT * FROM zzsys_lookup WHERE slo_zzsys_object_id = '{$object->zzsys_object_id}'");