echoT($entrySummary . '<br>'); $clsUpDown = new up_down_top_bottom(); $clsUpDown->lMax = $lNumDDLEntries; echoT(strLinkAdd_UFDDLEntry($lTableID, $lFieldID, 'Add new list entry', true, '') . ' ' . strLinkAdd_UFDDLEntry($lTableID, $lFieldID, 'Add new list entry', false, '') . '<br><br>'); if ($lNumDDLEntries <= 0) { echoT('<i>There are currently no entries in drop-down list <b>' . htmlspecialchars($strTableLabel . ': ' . $strUserFieldName) . '</b></i>.<br>' . strLinkSpecial_CloneDDLList($lTableID, $lFieldID, 'Clone existing Drop-Down List', true) . ' ' . strLinkSpecial_CloneDDLList($lTableID, $lFieldID, 'Clone existing Drop-Down List', false) . '<br>'); } else { $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); $strLinkBase = '<a href="' . base_url() . "index.php/admin/uf_ddl/moveEntries/{$lTableID}/{$lFieldID}/"; $strLinkSort = anchor("admin/uf_ddl/sortEntries/{$lTableID}/{$lFieldID}", '(sort)'); openDDL_EntryTable($clsEntries, $clsRpt, $strTableLabel, $strUserFieldName, $strLinkSort); $idx = 0; foreach ($clsEntries as $clsEntry) { writeEntryRow($clsRpt, $clsUpDown, $clsEntry, $lTableID, $lFieldID, $idx, $strLinkBase); ++$idx; } echoT($clsRpt->closeReport()); } function writeEntryRow($clsRpt, $clsUpDown, $clsEntry, $lTableID, $lFieldID, $idx, $strLinkBase) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lEntryID = $clsEntry->lKeyID; $clsUpDown->strLinkBase = $strLinkBase . $lEntryID . '/'; $clsUpDown->upDownLinks($idx); echoT($clsRpt->openRow() . $clsRpt->writeCell(strLinkEdit_UFDDLEntry($lTableID, $lFieldID, $lEntryID, 'Edit entry', true) . ' ' . str_pad($lEntryID, 5, '0', STR_PAD_LEFT), 30, 'text-align: center;') . $clsRpt->writeCell(strLinkRem_UFDDLEntry($lTableID, $lFieldID, $lEntryID, 'Remove entry', true, true), 0, 'text-align: center;') . $clsRpt->writeCell(htmlspecialchars($clsEntry->strEntry), 225, '') . $clsRpt->writeCell($clsUpDown->strUp . $clsUpDown->strDown . ' ' . $clsUpDown->strTop . $clsUpDown->strBottom, '', '') . $clsRpt->closeRow()); } function openDDL_EntryTable($clsEntries, $clsRpt, $strUserTableName, $strUserFieldName, $strLinkSort)
<?php $clsUpDown = new up_down_top_bottom(); $clsUpDown->lMax = $lNumTags; echoT(strLinkAdd_ID_DDLEntry($enumContext, 'Add new list entry', true, '') . ' ' . strLinkAdd_ID_DDLEntry($enumContext, 'Add new list entry', false, '') . '<br><br>'); if ($lNumTags <= 0) { echoT('<i>There are currently no tags for <b>' . $strContext . '</b></i>.'); } else { $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); $strLinkBase = '<a href="' . base_url() . "index.php/admin/admin_imgdoc_tags/moveEntries/{$enumContext}/"; openDDL_EntryTable($tags, $clsRpt, $strContext); $idx = 0; foreach ($tags as $tag) { writeEntryRow($clsRpt, $clsUpDown, $tag, $enumContext, $idx, $strLinkBase); ++$idx; } echoT($clsRpt->closeReport()); } function writeEntryRow($clsRpt, $clsUpDown, $tag, $enumContext, $idx, $strLinkBase) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- /* ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$tag <pre>'); echo(htmlspecialchars( print_r($tag, true))); echo('</pre></font><br>'); die; // ------------------------------------- */ $lEntryID = $tag->lTagID;