function showCustomForms($lClientID, &$cForms) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes = new stdClass(); $attributes->divID = 'clientCForms'; $attributes->divImageID = 'clientCFormsDivImg'; $attributes->bStartOpen = true; $attributes->lUnderscoreWidth = 350; openBlock('Custom Client Forms', '', $attributes); $strOut = ''; foreach ($cForms as $cform) { $lCFID = $cform->lKeyID; $strLabel = $cform->bAnyTablesMulti ? 'Add new' : 'Updated'; $strOut .= strLinkAdd_CustomFormDataEntry($lCFID, $lClientID, $strLabel . ' form', true) . ' ' . strLinkAdd_CustomFormDataEntry($lCFID, $lClientID, $strLabel . ' form', false) . ' ' . '<b>' . htmlspecialchars($cform->strFormName) . '</b><br>'; if ($cform->lNumLogEntries > 0) { $strOut .= strCFormLog($cform); } else { $strOut .= '<i><span style="color: #999;">No forms have been submitted.</i></span><br>'; } } echoT($strOut); $attributes->bCloseDiv = true; closeBlock($attributes); }
function strBlockLinksToCForms($enumType, $lParentID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $this->loadCustomFormsViaType($enumType); if ($this->lNumCustomForms == 0) { return ''; } $strOut = ''; foreach ($this->customForms as $cForm) { $lCFID = $cForm->lKeyID; $strOut .= strLinkAdd_CustomFormDataEntry($lCFID, $lParentID, 'Open form', true) . ' ' . strLinkAdd_CustomFormDataEntry($lCFID, $lParentID, 'Open form', false) . ' ' . '<b>' . htmlspecialchars($cForm->strFormName) . '</b><br>'; } return $strOut; }