示例#1
0
文件: mod_edit.php 项目: poef/ariadne
 function showDiv($var, $name, $title = '', $extra = '')
 {
     $context = pobject::getContext();
     $me = $context["arCurrentObject"];
     if (edit::getEditMode() && $me->CheckSilent('edit')) {
         $id = edit::registerDataField();
         $prefix = edit::getEditPrefix();
         $vedorVars = edit::getVedorVars($me, $name);
         echo "<div class='editable' id='" . $prefix . $id . "' {$vedorVars} title='{$title}' {$extra}>";
         echo edit::fixEditSource(page::parse($var));
         echo "</div>";
     } else {
         if (!edit::isEmpty($var)) {
             echo page::stripARNameSpace(edit::fixSource(page::parse($var)));
         }
     }
     return $id;
 }