Exemplo n.º 1
0
<?php

if (!defined('SABLOG_ROOT') || !isset($php_self) || !preg_match("/[\\/\\\\]cp\\.php\$/", $php_self)) {
    exit('Access Denied');
}
permission(array(1, 2));
if ($_POST['action'] == 'autosave') {
    if ($_POST['title'] || $_POST['description'] || $_POST['content']) {
        autosave_recache($_POST['title'], $_POST['description'], $_POST['content']);
    }
}
if ($_GET['action'] == 'switchtodraft') {
    if (@(include_once SABLOG_ROOT . 'data/cache/cache_autosave.php')) {
        $autosavedb = sax_stripslashes($autosavedb);
        $title = $autosavedb[$sax_uid]['title'];
        $description = $autosavedb[$sax_uid]['description'];
        $content = $autosavedb[$sax_uid]['content'];
        $content = str_replace(array("\r", "\n"), '', $content);
        $description = str_replace(array("\r", "\n"), '', $description);
        ?>
var timestamp = '<?php 
        echo sadate('m月d日,H:i:s');
        ?>
';
$('#title').val('<?php 
        echo $title;
        ?>
');
oEditor.html('<?php 
        echo $content;
        ?>
Exemplo n.º 2
0
                    					} else {
                    						//fa
                    					}*/
                }
            }
        }
        $DB->unbuffered_query("UPDATE {$db_prefix}statistics SET article_count=article_count+1");
        hottags_recache();
        archives_recache();
        categories_recache();
        statistics_recache();
        newarticles_recache();
        stick_recache();
        // 清除临时数据
        if (@(include_once SABLOG_ROOT . 'data/cache/cache_autosave.php')) {
            autosave_recache();
        }
        if ($visible) {
            $location = getlink('article', 'mod', array('message' => 10, 'articleid' => $articleid));
        } else {
            $location = getlink('article', 'list', array('message' => 9));
        }
    }
    header("Location: {$location}");
    exit;
}
//修改日志
if ($action == 'modarticle') {
    if ($sax_group != 1 && $sax_uid != $article['uid']) {
        $location = getlink('article', 'mod', array('message' => 11, 'articleid' => $articleid));
    }