function get_cc($detail)
 {
     if ($detail->get('use_cc') == '1') {
         return xoonips_get_cc_license($detail->get('cc_commercial_use'), $detail->get('cc_modification'), 2.5, 'GENERIC');
     } else {
         return false;
     }
 }
function xnpGetRightsConfirmBlock($item_id, $maxlen = 65535)
{
    $textutil =& xoonips_getutility('text');
    $formdata =& xoonips_getutility('formdata');
    $rightsUseCC = $formdata->getValue('post', 'rightsUseCC', 'i', false, 0);
    $rightsCCCommercialUse = $formdata->getValue('post', 'rightsCCCommercialUse', 'i', false, 0);
    $rightsCCModification = $formdata->getValue('post', 'rightsCCModification', 'i', false, 0);
    if ($rightsUseCC == 1) {
        global $xnp_cc_licenses;
        $htmlText = xoonips_get_cc_license($rightsCCCommercialUse, $rightsCCModification, 2.5, 'GENERIC');
        $within = $htmlText;
        $without = "";
    } else {
        $text = $formdata->getValue('post', 'rightsEncText', 's', false, '');
        list($within, $without) = xnpTrimString($text, $maxlen, _CHARSET);
        $htmlText = nl2br(xnpWithinWithoutHtml($within, $without));
    }
    $html = $htmlText . "\n      <input type='hidden' name='rightsEncText' value='" . $textutil->html_special_chars($within . $without) . "' />\n      <input type='hidden' name='rightsUseCC'           value='" . (int) $rightsUseCC . "' />\n      <input type='hidden' name='rightsCCCommercialUse' value='" . (int) $rightsCCCommercialUse . "' />\n      <input type='hidden' name='rightsCCModification' value='" . (int) $rightsCCModification . "' />\n      ";
    return array('name' => _MD_XOONIPS_ITEM_TEXTFILE_LABEL, 'value' => $html, 'within' => $within, 'without' => $without);
}