#!/usr/local/bin/php "" and $field['type'] <> "submit") { $fieldname = $field['name']; $unset_fields = ""; $fieldname = ereg_replace(" ", "", $fieldname); $fieldname = strtolower($fieldname); // update field with posted values. if($field['unsetfield'] <> "") $unset_fields = "yes"; if($field['arraynum'] <> "") $arraynum = $field['arraynum']; if($field['bindstofield']) update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum); } } // run custom php code embedded in xml config. if($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") { eval($pkg['step'][$stepid]['stepsubmitphpaction']); } write_config(); $stepid++; if($stepid > $totalsteps) $stepid = $totalsteps; } $title = $pkg['step'][$stepid]['title']; $description = $pkg['step'][$stepid]['description']; function update_config_field($field, $updatetext, $unset, $arraynum) { global $config; $field_split = split("->",$field); foreach ($field_split as $f) $field_conv .= "['" . $f . "']"; if($field_conv == "") return; if($unset <> "") { $text = "unset(\$config" . $field_conv . ");"; eval($text); $text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";"; eval($text); } else { if($arraynum <> "") { $text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";"; } else { $text = "\$config" . $field_conv . " = \"" . $updatetext . "\";"; } eval($text); } } if($pkg['step'][$stepid]['stepbeforeformdisplay'] <> "") { // handle before form display event. // good for modifying posted values, etc. eval($pkg['step'][$stepid]['stepbeforeformdisplay']); } ?>