Exemplo n.º 1
0
    ?>
;
	</script>
	<?php 
} elseif ($action == 'load_lhe') {
    $LHE = new CLightHTMLEditor();
    $LHE->Show(array('id' => 'LHEBxStickers', 'width' => '230', 'height' => '100', 'inputId' => 'stickers_ed', 'content' => 'Text', 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'ForeColor', 'InsertOrderedList', 'InsertUnorderedList', 'CreateLink'), 'jsObjName' => 'oLHESticker', 'bInitByJS' => true, 'BBCode' => true, 'bSaveOnBlur' => false, 'documentCSS' => "\nbody{padding:0 5px 0 20px !important; font-family:Verdana !important; font-size:12px !important;}\n.bxst-title{font-family:Verdana!important; font-size:11px !important; margin:0 0 0 -7px !important;line-height:18px!important; color: #727272!important;}\nbody.bxst-yellow{background: #FFFCB3!important;}\nbody.bxst-green{background: #DBFCCD!important;}\nbody.bxst-blue{background: #DCE7F7!important;}\nbody.bxst-red{background: #FCDFDF!important;}\nbody.bxst-purple{background: #F6DAF8!important;}\nbody.bxst-gray{background: #F5F5F5!important;}\nbody.bxst-yellow .bxst-title{color: #7F7E59!important;}\nbody.bxst-green .bxst-title{color: #6D7E66!important;}\nbody.bxst-blue .bxst-title{color: #6E737B!important;}\nbody.bxst-red .bxst-title{color: #7E6F6F!important;}\nbody.bxst-purple .bxst-title{color: #7B6D7C!important;}\nbody.bxst-gray .bxst-title{color: #7A7A7A!important;}"));
} elseif ($action == 'get_cur_date') {
    echo FormatDate("j F G:i", time() + CTimeZone::GetOffset());
} elseif ($action == 'save_sticker') {
    if (isset($_POST['marker']['adjust'])) {
        $markerAdjust = serialize($_POST['marker']['adjust']);
    } else {
        $markerAdjust = "";
    }
    $ID = CSticker::Edit(array('arFields' => array('ID' => intVal($_POST['id']), 'PAGE_URL' => $_POST['page_url'], 'PAGE_TITLE' => $_POST['page_title'], 'SITE_ID' => $_REQUEST['site_id'], 'PERSONAL' => $_POST['personal'] == 'Y' ? 'Y' : 'N', 'CONTENT' => $_POST['content'], 'POS_TOP' => intVal($_POST['top']), 'POS_LEFT' => intVal($_POST['left']), 'WIDTH' => intVal($_POST['width']), 'HEIGHT' => intVal($_POST['height']), 'COLOR' => intVal($_POST['color']), 'COLLAPSED' => $_POST['collapsed'] == 'Y' ? 'Y' : 'N', 'COMPLETED' => $_POST['completed'] == 'Y' ? 'Y' : 'N', 'CLOSED' => $_POST['closed'] == 'Y' ? 'Y' : 'N', 'DELETED' => $_POST['deleted'] == 'Y' ? 'Y' : 'N', 'MARKER_TOP' => isset($_POST['marker']['top']) ? intVal($_POST['marker']['top']) : 0, 'MARKER_LEFT' => isset($_POST['marker']['left']) ? intVal($_POST['marker']['left']) : 0, 'MARKER_WIDTH' => isset($_POST['marker']['width']) ? intVal($_POST['marker']['width']) : 0, 'MARKER_HEIGHT' => isset($_POST['marker']['height']) ? intVal($_POST['marker']['height']) : 0, 'MARKER_ADJUST' => $markerAdjust)));
    CUserOptions::SetOption('fileman', "stickers_last_color", intVal($_POST['color']));
    if ($ID > 0) {
        ?>
<script>
window.__bxst_result['<?php 
        echo intVal($_POST['reqid']);
        ?>
'] = <?php 
        echo CUtil::PhpToJSObject(CSticker::GetById($ID));
        ?>
;
</script>
<?php 
    } else {
    }