Beispiel #1
0
						if(isIE) 
							uploader = window.parent.document.getElementById("uploader");
						else 
							uploader = window.parent.document.getElementById("uploader2");
					} catch(e) {		
						uploader = null;	
					}
					
					if (uploader!=null) {
						uploader.SetVariable('/:openBroswer','true');
					}
				}
<?php 
if (count($_FILES) == 1) {
    $file = array_pop($_FILES);
    if (getAttachmentByLabel($blogid, $suri['id'], Path::getBaseName($file['name']))) {
        print 'alert("' . _t('동일한 이름을 가진 파일이 이미 첨부되었습니다.') . '");';
        ?>

				for( i=0; i<oSelect.options.length; i++) {
					if(oSelect.options[i].value == "<?php 
        echo escapeJSInCData($_POST['fileName']);
        ?>
") {
						oSelect.remove(i);
					}
				}
<?php 
    } else {
        if (($attachment = addAttachment($blogid, $suri['id'], $file)) === false) {
            print 'alert("' . _t('첨부하지 못했습니다.') . '");';
Beispiel #2
0
<?php

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('GET' => array('name' => array('string')));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.attachment");
$file = array_pop($_FILES);
$attachment = getAttachmentByLabel($blogid, $suri['id'], $_GET['name']);
$result = escapeJSInCData(getPrettyAttachmentLabel($attachment)) . '!^|' . escapeJSInCData(getAttachmentValue($attachment));
echo 'result=' . base64_encode(trim($result));