Ejemplo n.º 1
0
<?php

$ygid = $this->request->parameters['yg_id'];
$entrymask = explode('-', $ygid);
$entrymask = $entrymask[0];
$entrymaskMgr = new Entrymasks();
$entrymaskInfo = $entrymaskMgr->get($entrymask);
$objectparents = $entrymaskMgr->getParents($entrymask);
$objectparents[count($objectparents) - 1][0]['NAME'] = $itext['TXT_ENTRYMASKS'] != '' ? $itext['TXT_ENTRYMASKS'] : '$TXT_ENTRYMASKS';
$entrymasks = $entrymaskMgr->getEntrymaskFormfields($entrymask);
foreach ($entrymasks as $entrymask_idx => $entrymask) {
    if (($entrymask['FORMFIELD'] == 11 || $entrymask['FORMFIELD'] == 12) && $entrymasks[$entrymask_idx]['PRESET']) {
        $entrymasks[$entrymask_idx]['PRESET'] = TStoLocalTS($entrymasks[$entrymask_idx]['PRESET']);
    }
    if ($entrymask['FORMFIELD'] == 9) {
        $entrymasks[$entrymask_idx]['LVALUES'] = $entrymaskMgr->getListValuesByLinkID($entrymask['ID']);
    }
}
$smarty->assign("entrymaskInfo", $entrymaskInfo);
$smarty->assign("objectparents", $objectparents);
$smarty->assign("objecttype", "entrymask");
$smarty->assign("entrymasks", $entrymasks);
$smarty->assign('win_no', $this->request->parameters['win_no']);
$smarty->assign("uinfo", $uinfo);
$smarty->assign("controls", $controls);
$smarty->display('file:' . $this->page_template);
Ejemplo n.º 2
0
 }
 $newLinkIds = array();
 if ($copymode) {
     // Get all Contentblock<->entrymask links for contentblock
     $tmpCoInfo = sCblockMgr()->getCblockLinkByLinkId($contentblockID);
     $contentblockLinkID = $contentblockID;
     $cb = sCblockMgr()->getCblock($tmpCoInfo[0]['CBLOCKID']);
     $contentBlockLinks = $cb->getEntrymasks();
     foreach ($contentBlockLinks as $contentBlockLink) {
         $contentBlockLinkId = $contentBlockLink['LINKID'];
         // Add new contentblock to folder
         $newContentblock = $myObject->addCblockEmbedded($contentarea);
         $newcb = sCblockMgr()->getCblock($newContentblock);
         $sourcecb = sCblockMgr()->getCblock($contentBlockLinkId);
         $sourceContentBlockInfo = sCblockMgr()->getCblockLinkByEntrymaskLinkId($contentBlockLinkId);
         $control_props = $entrymaskMgr->get($sourceContentBlockInfo['ENTRYMASK']);
         $newcb->properties->setValue("NAME", $control_props['NAME']);
         $newControl = $newcb->addEntrymask($sourceContentBlockInfo['ENTRYMASK']);
         if ($newContentblock > 0) {
             // Get the LinkId of the newly created contentblock
             $newLinkId = $myObject->getEmbeddedCblockLinkId($newContentblock);
             array_push($newLinkIds, array('LINKID' => $newLinkId, 'CBID' => $newContentblock));
             $oldFormfieldContent = $sourcecb->getFormfieldsInternal($contentBlockLinkId);
             $newFormfieldContent = $newcb->getFormfieldsInternal($newControl);
             for ($c = 0; $c < count($newFormfieldContent); $c++) {
                 $newcb->setFormfield($newFormfieldContent[$c]['LINKID'], $oldFormfieldContent[$c]['VALUE01'], $oldFormfieldContent[$c]['VALUE02'], $oldFormfieldContent[$c]['VALUE03'], $oldFormfieldContent[$c]['VALUE04'], $oldFormfieldContent[$c]['VALUE05'], $oldFormfieldContent[$c]['VALUE06'], $oldFormfieldContent[$c]['VALUE07'], $oldFormfieldContent[$c]['VALUE08']);
             }
             $cblockInfo = $newcb->get();
             // Add to history
             $myObject->history->add($historyType, $contentarea, $cblockInfo['NAME'], "TXT_" . $historyStr . "_H_COADD", $newContentblock);
         }
Ejemplo n.º 3
0
        $pageInfo['RSTAGE'] = false;
    }
}
$selectiondialog = $this->request->parameters['selectiondialog'];
if ($selectiondialog != null || $selectiondialog == "1") {
    $smarty->assign("displaymode", 'dialog');
}
if ($this->request->parameters['displaymode'] != '') {
    $smarty->assign("displaymode", $this->request->parameters['displaymode']);
}
$smarty->assign('extensiondir', $this->extensiondir);
if ($siteID == 'dummy' && $pageID == 'dummy') {
    // Entrymask Preview Mode
    $entrymaskMgr = new Entrymasks();
    $co_id = $this->request->parameters['co'];
    $co_info = $entrymaskMgr->get($co_id);
    if (!$co_info['FOLDER']) {
        $cos = array();
        $cos[0]['CONTENTAREA'] = 'dummy';
        $cos[0]['OBJECTID'] = 'dummy' . $co_id;
        $cos[0]['EMBEDDED'] = 1;
        $cos[0]['ENTRYMASKS'][0]['FORMFIELDS'] = $entrymaskMgr->getEntrymaskFormfields($co_id);
        $cos[0]['ENTRYMASKS'][0]['ENTRYMASKNAME'] = $co_info['NAME'];
        foreach ($cos[0]['ENTRYMASKS'][0]['FORMFIELDS'] as $formfield_idx => $formfield) {
            if ($formfield['FORMFIELD'] == 9) {
                $cos[0]['ENTRYMASKS'][0]['FORMFIELDS'][$formfield_idx]['LVALUES'] = $entrymaskMgr->getListValuesByLinkID($formfield['ID']);
            }
        }
    }
    $output = $cos;
    $smarty->assign('dummymode', true);
Ejemplo n.º 4
0
     if ($history[$i]['TEXT'] == 'TXT_TAG_H_ASSIGN' || $history[$i]['TEXT'] == 'TXT_TAG_H_REMOVE') {
         $history[$i]['NEWVALUE'] = "<a onclick=\"\$K.yg_openObjectDetails('" . $history[$i]['TARGETID'] . "', 'tag', '" . $history[$i]['NEWVALUE'] . "', 'tag', '');\">" . $history[$i]['NEWVALUE'] . "</a>";
     }
 }
 if ($history[$i]['TAB'] == 'P_CONTENT') {
     if ($history[$i]['TEXT'] == 'TXT_PAGE_H_COREMOVE' || $history[$i]['TEXT'] == 'TXT_PAGE_H_EMREMOVE' || $history[$i]['TEXT'] == 'TXT_PAGE_H_COADD' || $history[$i]['TEXT'] == 'TXT_PAGE_H_EMADD' || $history[$i]['TEXT'] == 'TXT_PAGE_H_EMCOPY' || $history[$i]['TEXT'] == 'TXT_PAGE_H_COORDER') {
         $history[$i]['CONTENTAREA'] = $history[$i]['OLDVALUE'];
         $history[$i]['TYPE'] = 'COACTION';
     }
     // For Formfieldinfo
     if ($history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_1' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_2' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_3' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_4_ON' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_4_OFF' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_5' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_6' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_7' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_8' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_9' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_10' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_11' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_12' || $history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_15') {
         $lnkInfo = sCblockMgr()->getEntrymaskLinkByEntrymaskLinkId($history[$i]['TARGETID']);
         $coFormfield = $entrymaskMgr->getFormfield($lnkInfo[0]['ENTRYMASKFORMFIELD']);
         $formfield_name = $coFormfield['NAME'];
         $coLinkInfo = sCblockMgr()->getCblockLinkByLinkId($lnkInfo[0]['LNK']);
         $controlInfo = $entrymaskMgr->get($coLinkInfo[0]['ENTRYMASK']);
         $control_name = $controlInfo['NAME'];
         // Special Case for Files
         if ($history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_6') {
             if ($history[$i]['NEWVALUE']) {
                 $file = sFileMgr()->getFile($history[$i]['NEWVALUE']);
                 if ($file) {
                     $objectInfo = $file->get();
                     $history[$i]['NEWVALUE'] = '<span onmouseover="$K.yg_hoverFileHint(\'' . $history[$i]['NEWVALUE'] . '\', event);"><span style="display:inline-block;" class="filetype ' . $objectInfo['COLOR'] . '">' . $objectInfo['CODE'] . '</span> ' . "<a onclick=\"\$K.yg_openObjectDetails('" . $history[$i]['NEWVALUE'] . "', 'file', '" . $objectInfo['NAME'] . "', {color:'" . $objectInfo['COLOR'] . "',typecode:'" . $objectInfo['CODE'] . "'});\">" . $objectInfo['NAME'] . "</a></span>";
                 }
             }
         }
         // Special Case for Links
         if ($history[$i]['TEXT'] == 'TXT_COMMON_H_COEDIT_FRMFLD_5') {
             $special_url = resolveSpecialURL($history[$i]['NEWVALUE']);
             if ($special_url !== false) {
Ejemplo n.º 5
0
     }
     // Set the new property
     if ($templateMgr->setName($data[0], $value) === false) {
         $koala->alert($itext['TXT_ERROR_ACCESS_DENIED']);
     } else {
         $value = str_replace("\n", '\\n', $value);
         $jsQueue->add($data[0], HISTORYTYPE_TEMPLATE, 'OBJECT_CHANGE', sGuiUS(), 'template', NULL, NULL, $this->reponsedata[$property]->yg_id, 'name', $value);
         $koala->queueScript("Koala.yg_fadeFields(\$('" . $winID . "'), '.changed');");
         // Special case for name
         $jsQueue->add($data[0], HISTORYTYPE_TEMPLATE, 'REFRESH_WINDOW', sGuiUS(), 'name');
     }
     break;
 case 'entrymask':
     $entrymaskMgr = new Entrymasks();
     // Get the entrymask
     $entrymask = $entrymaskMgr->get($data[0]);
     $oldname = $entrymask['NAME'];
     $value = str_replace("\r", '', str_replace("\n", '\\n', $this->reponsedata[$property]->value));
     if ($oldname == $value) {
         // No update needed, henceforth break
         break;
     }
     // Check for empty name
     if (trim($value) == '') {
         //$jsQueue->add ($data[0], HISTORYTYPE_ENTRYMASK, 'OBJECT_CHANGE', sGuiUS(), 'entrymask', NULL, NULL, $this->reponsedata[$property]->yg_id, 'name', $oldvalue);
         //$jsQueue->add ($data[0], HISTORYTYPE_FILE, 'REFRESH_WINDOW', sGuiUS(), 'name');
         $koala->alert($itext['TXT_CANT_CHANGE_ENTRYMASKTITLE_TO_EMPTY_VALUE']);
         break;
     }
     // Special handling for files
     if ($propertyInfo[0]['TYPE'] == 'FILE') {
Ejemplo n.º 6
0
         $jsQueue->add($objectID, HISTORYTYPE_ENTRYMASK, 'UNHIGHLIGHT_ENTRYMASK', sGuiUS(), 'name');
     }
     break;
 case 'entrymaskSelectNode':
     $node = $this->params['node'];
     $wid = $this->params['wid'];
     $root_node = $entrymaskMgr->getTree(NULL, 0);
     // Entrymasks
     // 1 = rsub
     // 2 = rread
     // 3 = rdelete
     // 4 = parent -> rsub & rwrite
     // 5 = parent -> rsub & rwrite
     // 6 = rdelete
     $buttons = array();
     $entrymaskInfo = $entrymaskMgr->get($node);
     $koala->callJSFunction('Koala.yg_selectEntrymask', $node, $wid);
     $rread = $rwrite = $rdelete = $prsub = $prwrite = true;
     $rsub = $entrymaskInfo['FOLDER'] == 1;
     // Check permissions for button "add"
     if ($rsub) {
         $buttons[0] = true;
     } else {
         $buttons[0] = false;
     }
     // Check permissions for button "copy"
     if ($rread) {
         $buttons[1] = true;
     } else {
         $buttons[1] = false;
     }