Watch 1 Star 5 Fork 61

冒泡鱼 / MarkNotePHP

forked from WuSiYu / MarkNote 
加入码云
与超过 300 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
PHP轻量级MarkDown云记事本系统,使用GPL v2协议开源. 展开 收起

克隆/下载
edit.php 1.03 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
<?php
require_once('common.php');
require_once WEBROOT.'/include/user.php';
require_once WEBROOT.'/include/note.php';
if(!hasLogin()){
echo 'Please login';
exit();
}
//api
if( hasLogin() && isset($_POST['action']) && $_POST['action'] == 'getNotelist' ){
$theNotebooks = getUserNotebooks($USERNAME);
//var_dump($theNotebooks);
include(template('tag-notebooks'));
exit();
}
$settings=getUsersetting($USERNAME);
$js='';
if($settings->math) $js='<script src="https://cdn.bootcss.com/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>';
$js.=<<<heredoc
<script type="text/javascript" charset="utf-8">
var NOTEID=$settings->noteid,MATHSTATUS=$settings->math,WAITINTERVAL=$settings->interval,CODESTATUS=$settings->code;
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\\\(","\\\\)"] ],
displayMath: [ ['$$','$$'], ["\\\\[","\\\\]"] ]
}
});
</script>
heredoc;
$css=$settings->black?'github-markdown':'black-markdown';
include(template('edit'));

评论 ( 0 )

你可以在登录后,发表评论

搜索帮助