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='';
$js.=<<
var NOTEID=$settings->noteid,MATHSTATUS=$settings->math,WAITINTERVAL=$settings->interval,CODESTATUS=$settings->code;
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\\\(","\\\\)"] ],
displayMath: [ ['$$','$$'], ["\\\\[","\\\\]"] ]
}
});
heredoc;
$css=$settings->black?'github-markdown':'black-markdown';
include(template('edit'));
一键复制
编辑
Web IDE
原始数据
按行查看
历史