Esempio n. 1
0
function output($title, $content, $disposition = 'browser')
{
    $_SERVER['PLANOWNER_DISPLAY_NAME'] = str_replace("'", "", $_SERVER['PLANOWNER_DISPLAY_NAME']);
    $_SERVER['STOPWATCH']['content_end'] = array_sum(explode(' ', microtime()));
    $_SERVER['STOPWATCH']['output_begin'] = array_sum(explode(' ', microtime()));
    // if there is no cookie, user is 'guest'
    if (!$_SERVER['USER']) {
        $_SERVER['USER'] = '******';
    }
    if ($_SERVER['OUTPUT_MODE'] == 'HTML') {
        Header("Content-type: text/html; charset=UTF-8");
        $page = output_html($title, $content);
    }
    if ($_SERVER['OUTPUT_MODE'] == 'IPHONE') {
        Header("Content-type: text/html; charset=UTF-8");
        $page = output_iphone($title, $content);
    }
    if ($_SERVER['OUTPUT_MODE'] == 'RSS' || strstr($_SERVER['OUTPUT_MODE'], 'ATOM')) {
        Header("Content-type: text/xml; charset=UTF-8");
        $page = output_feed($title, $content);
    }
    if ($_SERVER['OUTPUT_MODE'] == 'AJAX') {
        Header("Content-type: text/html; charset=UTF-8");
        $page = output_ajax($title, $content);
    }
    if ($disposition == 'return') {
        return $page;
    }
    if (strstr($disposition, $_SERVER['DOCUMENT_ROOT'])) {
        file_write_contents($disposition, $page);
        return $page;
    }
    echo $page;
    exit;
}
    ?>
', 'portal.php?mod=attachment&id=<?php 
    echo $attach['attachid'];
    ?>
&op=delete');">删除</span>

<?php 
}
?>
<script type="text/javascript">
parent.$('attach_ids').value += ',' + '<?php 
echo $attach['attachid'];
?>
';
<?php 
if ($coverstr) {
    ?>
if(parent.$('conver').value == '') {
parent.$('conver').value = '<?php 
    echo $coverstr;
    ?>
';
}
<?php 
}
?>
</script><?php 
echo output_ajax();
?>
]]></root><?php 
exit;
Esempio n. 3
0
<div class="tm_c">
<h3 class="flb">
<em id="return_<?php echo $_GET['handlekey'];?>"><?php echo $navtitle;?></em>
<span>
<a href="javascript:;" class="flbc" onclick="hideWindow('<?php echo $_GET['handlekey'];?>')" title="关闭">关闭</a>
</span>
</h3>
<form id="setnav" method="post" autocomplete="off" action="forum.php?mod=ajax&amp;action=setnav&amp;type=portal&amp;do=<?php echo $do;?>">
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
<input type="hidden" name="type" value="<?php echo $type;?>" />
<input type="hidden" name="funcsubmit" value="1" />
<input type="hidden" name="handlekey" value="<?php echo $_GET['handlekey'];?>" />
<div class="c">
<?php if($do == 'open') { ?>
<ul>
<?php if($type != 'wall') { ?>
<li><label><input type="checkbox" name="location[header]" class="pc" value="1" />主导航</label></li>
<?php } ?>
<li><label><input type="checkbox" name="location[quick]" class="pc" value="1" />快捷导航</label></li>
</ul>
<?php } else { ?>
<?php echo $closeprompt;?>
<?php } ?>
</div>
<p class="o pns">
<input type="submit" name="funcsubmit_btn" class="btn" value="确定">
</p>
</form>
</div>
<?php } echo output_ajax(); ?>]]></root><?php exit;?>