function edit_actions($act, $log) { global $mos; global $nav_modules; if (!isset($_REQUEST['mod'])) { return; } if (!isset($_REQUEST['edit_text'])) { return; } if ($act == "editsave") { $s = $_REQUEST['edit_text']; if (get_magic_quotes_gpc()) { $s = stripslashes($s); } $s = str_replace("\r", '', $s); $mod = $_REQUEST['mod']; $m = array(); $m = parse_ini_file($mos . '/etc/pm/installed', true); $opts = $m[$mod]; if (loadModuleOptions($mod, $opts)) { $conf = "{$mos}/" . $opts['config_edit']; file_put_contents($conf, $s); if (($st = $opts['_status']) != 'disable') { if (isset($opts['config_after'])) { exec("{$mos}/etc/init/" . $opts['init'] . ' ' . $opts['config_after']); } if ($st != 'stop') { doAction($mod, 'restart', $log); } } } } }
function klUploadFile($filename, $errorNum, $tmpfile, $filesize, $filetype, $type, $isIcon = 0) { $kl_album_config = unserialize(Option::get('kl_album_config')); $extension = strtolower(substr(strrchr($filename, "."), 1)); $uppath = KL_UPLOADFILE_PATH . date("Ym") . "/"; $fname = md5($filename) . date("YmdHis") . rand() . '.' . $extension; $attachpath = $uppath . $fname; if (!is_dir(KL_UPLOADFILE_PATH)) { umask(0); $ret = @mkdir(KL_UPLOADFILE_PATH, 0777); if ($ret === false) { return '创建文件上传目录失败'; } } if (!is_dir($uppath)) { umask(0); $ret = @mkdir($uppath, 0777); if ($ret === false) { return "上传失败。文件上传目录(content/plugins/kl_album/upload)不可写"; } } doAction('kl_album_upload', $tmpfile); //缩略 $imtype = array('jpg', 'png', 'jpeg', 'gif'); $thum = $uppath . "thum-" . $fname; $attach = in_array($extension, $imtype) && function_exists("ImageCreate") && klResizeImage($tmpfile, $filetype, $thum, $isIcon, KL_IMG_ATT_MAX_W, KL_IMG_ATT_MAX_H) ? $thum : $attachpath; $kl_album_compression_length = isset($kl_album_config['compression_length']) ? intval($kl_album_config['compression_length']) : 1024; $kl_album_compression_width = isset($kl_album_config['compression_width']) ? intval($kl_album_config['compression_width']) : 768; if ($kl_album_compression_length == 0 || $kl_album_compression_width == 0) { if (@is_uploaded_file($tmpfile)) { if (@(!move_uploaded_file($tmpfile, $attachpath))) { @unlink($tmpfile); return "上传失败。文件上传目录(content/plugins/kl_album/upload)不可写"; } else { echo 'kl_album_successed'; } chmod($attachpath, 0777); } } else { if (in_array($extension, $imtype) && function_exists("ImageCreate") && klResizeImage($tmpfile, $filetype, $attachpath, $isIcon, $kl_album_compression_length, $kl_album_compression_width)) { echo 'kl_album_successed'; } else { if (@is_uploaded_file($tmpfile)) { if (@(!move_uploaded_file($tmpfile, $attachpath))) { @unlink($tmpfile); return "上传失败。文件上传目录(content/plugins/kl_album/upload)不可写"; } else { echo 'kl_album_successed'; } chmod($attachpath, 0777); } } } $attach = substr($attach, 6, strlen($attach)); return $attach; }
function update_all_actions($act, $log) { if ($act == 'prepare') { core_actions('getrep', $log); } elseif ($act == 'update') { $updates = getUpdates(); foreach ($updates as $mod => $item) { doAction($mod, 'update', $log); } } }
function addComment($params) { $name = isset($_POST['comname']) ? addslashes(trim($_POST['comname'])) : ''; $content = isset($_POST['comment']) ? addslashes(trim($_POST['comment'])) : ''; $mail = isset($_POST['commail']) ? addslashes(trim($_POST['commail'])) : ''; $url = isset($_POST['comurl']) ? addslashes(trim($_POST['comurl'])) : ''; $imgcode = isset($_POST['imgcode']) ? addslashes(trim(strtoupper($_POST['imgcode']))) : ''; $blogId = isset($_POST['gid']) ? intval($_POST['gid']) : -1; $pid = isset($_POST['pid']) ? intval($_POST['pid']) : 0; if (ISLOGIN === true) { $CACHE = Cache::getInstance(); $user_cache = $CACHE->readCache('user'); $name = addslashes($user_cache[UID]['name_orig']); $mail = addslashes($user_cache[UID]['mail']); $url = addslashes(BLOG_URL); } if ($url && strncasecmp($url, 'http', 4)) { $url = 'http://' . $url; } doAction('comment_post'); $Comment_Model = new Comment_Model(); $Comment_Model->setCommentCookie($name, $mail, $url); if ($Comment_Model->isLogCanComment($blogId) === false) { emMsg('评论失败:该文章已关闭评论'); } elseif ($Comment_Model->isCommentExist($blogId, $name, $content) === true) { emMsg('评论失败:已存在相同内容评论'); } elseif (ROLE == ROLE_VISITOR && $Comment_Model->isCommentTooFast() === true) { emMsg('评论失败:您提交评论的速度太快了,请稍后再发表评论'); } elseif (empty($name)) { emMsg('评论失败:请填写姓名'); } elseif (strlen($name) > 20) { emMsg('评论失败:姓名不符合规范'); } elseif ($mail != '' && !checkMail($mail)) { emMsg('评论失败:邮件地址不符合规范'); } elseif (ISLOGIN == false && $Comment_Model->isNameAndMailValid($name, $mail) === false) { emMsg('评论失败:禁止使用管理员昵称或邮箱评论'); } elseif (!empty($url) && preg_match("/^(http|https)\\:\\/\\/[^<>'\"]*\$/", $url) == false) { emMsg('评论失败:主页地址不符合规范', 'javascript:history.back(-1);'); } elseif (empty($content)) { emMsg('评论失败:请填写评论内容'); } elseif (strlen($content) > 8000) { emMsg('评论失败:内容不符合规范'); } elseif (ROLE == ROLE_VISITOR && Option::get('comment_needchinese') == 'y' && !preg_match('/[\\x{4e00}-\\x{9fa5}]/iu', $content)) { emMsg('评论失败:评论内容需包含中文'); } elseif (ISLOGIN == false && Option::get('comment_code') == 'y' && session_start() && (empty($imgcode) || $imgcode !== $_SESSION['code'])) { emMsg('评论失败:验证码错误'); } else { $_SESSION['code'] = null; $Comment_Model->addComment($name, $content, $mail, $url, $imgcode, $blogId, $pid); } }
private static function display($code, $message, $file, $line, $trace) { $msg = SYSTEM_FN . ' V' . SYSTEM_VER . ' 在工作时发生致命的异常 @ ' . date('Y-m-d H:m:s') . '<br/><b>消息:</b>#' . $code . ' - ' . $message . '<br/><br/>'; $msg .= '<table style="width:100%"><thead><th>文件</th><th>行</th><th>代码</th></thead><tbody>'; $msg .= '<tr><td>' . $file . '</td><td>' . $line . '' . '</td><td>[抛出异常]</td></tr>'; foreach ($trace as $v) { $tracefile = isset($v['file']) ? $v['file'] : ''; $traceline = isset($v['line']) ? $v['line'] : ''; $msg .= '<tr><td>' . $tracefile . '</td><td>' . $traceline . '</td><td>' . $v['function'] . '</td></tr>'; } $msg .= '</tbody></table>'; if (function_exists('doAction')) { doAction('error_2', $code, $message, $file, $line, $trace); } msg($msg); }
/** * 加载底部 * @param bool|string $copy 如果为string,则必须输入插件标识符,并显示插件版权,bool(true)则显示云签到版权 */ function loadfoot($copy = false) { global $i; if (defined('SYSTEM_NO_UI')) { return; } $icp = option::get('icp'); if (!empty($icp)) { echo ' | <a href="http://www.miitbeian.gov.cn/" target="_blank">' . $icp . '</a>'; } echo '<br/>' . option::get('footer'); doAction('footer'); if (is_string($copy)) { if (isset($i['plugins']['desc'][$copy])) { $plug = $i['plugins']['desc'][$copy]; echo '<br/><br/>'; if (!empty($plug['plugin']['url'])) { echo '<a href="' . htmlspecialchars($plug['plugin']['url']) . '" target="_blank">'; } echo $plug['plugin']['name']; if (!empty($plug['plugin']['url'])) { echo '</a>'; } if (!empty($plug['plugin']['version'])) { echo ' V' . $plug['plugin']['version']; } echo ' // 作者:'; if (!empty($plug['author']['url'])) { echo '<a href="' . htmlspecialchars($plug['author']['url']) . '" target="_blank">'; } echo $plug['author']['author']; if (!empty($plug['author']['url'])) { echo '</a>'; } } } if ($copy) { echo '<br/><br/>' . SYSTEM_FN . ' V' . SYSTEM_VER . ' // 作者: <a href="http://zhizhe8.net" target="_blank">Kenvix</a> & <a href="http://www.longtings.com/" target="_blank">mokeyjay</a> & <a href="http://fyy.l19l.com/" target="_blank">FYY</a> '; } echo '</div></div></div></div></body></html>'; }
function doAction($action, $url = "") { $forwardpage = ""; $forward = true; $loggedin = isUserLoggedIn(); if (!$loggedin && strcmp($action, "install") != 0 && strcmp($action, "redirect") != 0) { $action = ""; } if (strcmp($action, "install") == 0) { $forwardpage = "views/install.php"; } else { if (strcmp($action, "redirect") == 0) { $forwardpage = "views/redirect.php"; } else { if (strcmp($action, "") == 0) { if ($loggedin) { doAction("home"); $forward = false; } else { include 'login.php'; } } else { if (strcmp($action, "home") == 0) { include 'home.php'; } else { if (strcmp($action, "logout") == 0) { include 'logout.php'; } else { if (strcmp($action, "createGrid") == 0) { include 'createGrid.php'; } } } } } } if ($forward == true) { include $forwardpage; } }
if (defined('ROLE')) { ReDirect('index.php'); } define('ROLE', 'visitor'); $i['user']['role'] = 'visitor'; template('login'); doAction('login_page_4'); die; } elseif (SYSTEM_PAGE == 'reg') { if (defined('ROLE')) { ReDirect('index.php'); } define('ROLE', 'visitor'); $i['user']['role'] = 'visitor'; template('reg'); doAction('reg_page_4'); die; } elseif (isset($_GET['pub_plugin'])) { define('ROLE', 'visitor'); define('SYSTEM_READY_LOAD_PUBPLUGIN', true); } elseif (SYSTEM_PAGE == 'admin:logout') { doAction('logout'); setcookie("uid", '', time() - 3600); setcookie("toolpw", '', time() - 3600); setcookie("pwd", '', time() - 3600); ReDirect('index.php?mod=login'); } elseif (!defined('UID') && !defined('SYSTEM_DO_NOT_LOGIN')) { define('ROLE', 'visitor'); $i['user']['role'] = 'visitor'; ReDirect('index.php?mod=login'); }
》上的评论" href="<?php echo Url::log($logid); ?> "><?php echo $comnum; ?> </a> </div> </header><!-- .entry-header --> <div class="entry-content"><?php echo $log_content; ?> </div> </article> <?php doAction('log_related', $logData); ?> <nav id="nav-single"> <?php neighbor_log($neighborLog); ?> </nav> <?php blog_comments($comments); ?> <?php blog_comments_post($logid, $ckname, $ckmail, $ckurl, $verifyCode, $allow_remark); ?> </div><!-- #content --> <?php
<input name="token" id="token" value="<?php echo LoginAuth::genToken(); ?> " type="hidden" /> <div class="msg">你还可以输入140字</div> <div class="box_1"><textarea class="box" name="t"></textarea></div> <div class="tbutton"><input type="submit" value="发布" onclick="return checkt();"/> </div> <img class="twImg" id="face" style="margin-right: 10px;cursor: pointer;" src="./views/images/face.png"> <div class="twImg" id="img_select"><input width="120" type="file" height="30" name="Filedata" id="custom_file_upload" style="display: none;"></div> <div id="img_name" class="twImg" style="display:none;"> <a id="img_name_a" class="imgicon" href="javascript:;" onmouseover="$('#img_pop').show();" onmouseout="$('#img_pop').hide();">{图片名称}</a> <a href="javascript:;" onclick="unSelectFile()"> [取消]</a> <div id="img_pop"></div> </div> <?php doAction('twitter_form'); ?> </form> </div> <div class="clear"></div> <ul> <?php foreach ($tws as $val) { $author = $user_cache[$val['author']]['name']; $avatar = empty($user_cache[$val['author']]['avatar']) ? './views/images/avatar.jpg' : '../' . $user_cache[$val['author']]['avatar']; $tid = (int) $val['id']; $replynum = $Reply_Model->getReplyNum($tid); $hidenum = $replynum - $val['replynum']; $img = empty($val['img']) ? "" : '<a title="查看图片" href="' . BLOG_URL . str_replace('thum-', '', $val['img']) . '" target="_blank"><img style="border: 1px solid #EFEFEF;" src="' . BLOG_URL . $val['img'] . '"/></a>'; ?> <li class="li">
} } } } //运行统计结束 $time_end = getmicrotime(); $runTime = $time_end - $time_start; $TS_CF['runTime'] = number_format($runTime, 6); //定义全局变量 global $TS_CF, $TS_SITE, $TS_APP, $TS_USER, $TS_URL, $TS_MC, $db, $tsMySqlCache; //装载APP应用 if (is_file('app/' . $TS_URL['app'] . '/class.' . $TS_URL['app'] . '.php')) { include_once 'app/' . $TS_URL['app'] . '/class.' . $TS_URL['app'] . '.php'; $new[$TS_URL['app']] = new $TS_URL['app']($db); //在执行action之前加载 doAction('beforeAction'); //全站通用数据加载 include 'thinksaas/common.php'; if (is_file('app/' . $TS_URL['app'] . '/action.' . $TS_URL['app'] . '.php')) { //面向对象的写法 include_once 'app/' . $TS_URL['app'] . '/action.' . $TS_URL['app'] . '.php'; $appAction = $TS_URL['app'] . 'Action'; $newAction = new $appAction($db); $newAction->{$TS_URL}['ac'](); } else { //面向目录和文件的逻辑加载写法 include 'app.php'; } } else { ts404(); }
$sort = isset($_POST['sort']) ? intval($_POST['sort']) : ''; $author = isset($_POST['author']) ? intval($_POST['author']) : ''; $gid = isset($_GET['gid']) ? intval($_GET['gid']) : ''; LoginAuth::checkToken(); if ($operate == '') { emDirect("./admin_log.php?pid={$pid}&error_b=1"); } if (empty($logs) && empty($gid)) { emDirect("./admin_log.php?pid={$pid}&error_a=1"); } switch ($operate) { case 'del': foreach ($logs as $val) { doAction('before_del_log', $val); $Log_Model->deleteLog($val); doAction('del_log', $val); } $CACHE->updateCache(); if ($pid == 'draft') { emDirect("./admin_log.php?pid=draft&active_del=1"); } else { emDirect("./admin_log.php?active_del=1"); } break; case 'top': foreach ($logs as $val) { $Log_Model->updateLog(array('top' => 'y'), $val); } emDirect("./admin_log.php?active_up=1"); break; case 'sortop':
echo '<?xml version="1.0" encoding="utf-8"?> <rss version="2.0"> <channel> <title><![CDATA[' . Option::get('blogname') . ']]></title> <description><![CDATA[' . Option::get('bloginfo') . ']]></description> <link>' . $URL . '</link> <language>zh-cn</language> <generator>www.emlog.net</generator>'; if (!empty($blog)) { $user_cache = $CACHE->readCache('user'); foreach ($blog as $value) { $link = Url::log($value['id']); $abstract = str_replace('[break]', '', $value['content']); $pubdate = gmdate('r', $value['date']); $author = $user_cache[$value['author']]['name']; doAction('rss_display'); echo <<<END <item> \t<title>{$value['title']}</title> \t<link>{$link}</link> \t<description><![CDATA[{$abstract}]]></description> \t<pubDate>{$pubdate}</pubDate> \t<author>{$author}</author> \t<guid>{$link}</guid> </item> END; } } echo <<<END
<th width="300"><b>评论者</b></th> <th width="250"><b>所属文章</b></th> </tr> </thead> <tbody> <?php if ($comment) { foreach ($comment as $key => $value) { $ishide = $value['hide'] == 'y' ? '<font color="red">[待审]</font>' : ''; $mail = !empty($value['mail']) ? "({$value['mail']})" : ''; $ip = !empty($value['ip']) ? "<br />来自:{$value['ip']}" : ''; $poster = !empty($value['url']) ? '<a href="' . $value['url'] . '" target="_blank">' . $value['poster'] . '</a>' : $value['poster']; $value['content'] = str_replace('<br>', ' ', $value['content']); $sub_content = subString($value['content'], 0, 50); $value['title'] = subString($value['title'], 0, 42); doAction('adm_comment_display'); ?> <tr> <td width="19"><input type="checkbox" value="<?php echo $value['cid']; ?> " name="com[]" class="ids" /></td> <td width="350"><a href="comment.php?action=reply_comment&cid=<?php echo $value['cid']; ?> " title="<?php echo $value['content']; ?> "><?php echo $sub_content; ?>
include template('header'); ?> <div class="container"> <div class="my"> <div class="col-md-3"> <div class="my_left"> <?php include pubTemplate("my"); ?> </div> </div> <div class="col-md-9"> <div class="my_right"> <div class="rc"> <?php doAction('my_right_top'); ?> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="">我的圖</a></li> </ul> <?php foreach ((array) $arrAlbum as $key => $item) { ?> <div class="box albumlst"> <a target="_blank" href="<?php echo tsurl('photo', 'album', array('id' => $item['albumid'])); ?> " class="album_photo"><img src="<?php if ($item['albumface'] == '') { echo SITE_URL; ?>
function dl_invite_yz() { global $m; if (option::get('enable_reg') != '1') { msg('注册失败:该站点已关闭注册'); } $name = isset($_POST['user']) ? addslashes(strip_tags($_POST['user'])) : ''; $mail = isset($_POST['mail']) ? addslashes(strip_tags($_POST['mail'])) : ''; $pw = isset($_POST['pw']) ? addslashes(strip_tags($_POST['pw'])) : ''; $yr = isset($_POST['invite']) ? addslashes(strip_tags($_POST['invite'])) : ''; if (empty($name) || empty($mail) || empty($pw)) { msg('注册失败:请正确填写账户、密码或邮箱'); } $x = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE name='{$name}'"); $z = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users` WHERE email='{$name}'"); $y = $m->once_fetch_array("SELECT COUNT(*) AS total FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users`"); if ($x['total'] > 0) { msg('注册失败:用户名已经存在'); } if ($z['total'] > 0) { msg('注册失败:邮箱已经存在'); } if (!checkMail($mail)) { msg('注册失败:邮箱格式不正确'); } if (empty($yr)) { msg('注册失败:请输入邀请码'); } $invite = $m->fetch_array($m->query('select * from `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` where `code` = "' . $yr . '"')); if (!empty($invite['code'])) { $dlyr = $invite['code']; $m->query('DELETE FROM `' . DB_NAME . '`.`' . DB_PREFIX . 'dl_invite` where `code` = "' . $dlyr . '"'); } else { msg('注册失败:邀请码错误或已被使用'); } if ($y['total'] <= 0) { $role = 'admin'; } else { $role = 'user'; } doAction('admin_reg_2'); $m->query('INSERT INTO `' . DB_NAME . '`.`' . DB_PREFIX . 'users` (`id`, `name`, `pw`, `email`, `role`, `t`) VALUES (NULL, \'' . $name . '\', \'' . EncodePwd($pw) . '\', \'' . $mail . '\', \'' . $role . '\', \'' . getfreetable() . '\');'); setcookie("wmzz_tc_user", $name); setcookie("wmzz_tc_pw", EncodePwd($pw)); doAction('admin_reg_3'); ReDirect('index.php'); echo '}'; die; }
<?php /** * 数据备份 * @copyright (c) Emlog All Rights Reserved */ require_once 'globals.php'; if ($action == '') { $retval = glob('../content/backup/*.sql'); $bakfiles = $retval ? $retval : array(); $tables = array('attachment', 'blog', 'comment', 'options', 'navi', 'sort', 'link', 'tag', 'user'); doAction('data_prebakup'); include View::getView('header'); require_once View::getView('data'); include View::getView('footer'); View::output(); } if ($action == 'bakstart') { LoginAuth::checkToken(); $table_box = isset($_POST['table_box']) ? array_map('addslashes', $_POST['table_box']) : array(); $bakplace = isset($_POST['bakplace']) ? $_POST['bakplace'] : 'local'; $zipbak = isset($_POST['zipbak']) ? $_POST['zipbak'] : 'n'; $bakfname = 'emlog_' . date('Ymd') . '_' . substr(md5(AUTH_KEY . uniqid()), 0, 18); $filename = ''; $sqldump = ''; foreach ($table_box as $table) { $sqldump .= dataBak($table); } if (trim($sqldump)) { $dumpfile = '#version:emlog ' . Option::EMLOG_VERSION . "\n"; $dumpfile .= '#date:' . date('Y-m-d H:i') . "\n";
type: "GET", data : {}, dataType: 'html', timeout: 90000, success: function(data){ $("#upd_prog").css({'width':'70%'}); $("#comsys3").html(data); $("#upd_info").html('完毕'); $("#upd_prog").css({'width':'100%'}); $("#comsys2").delay(1000).slideUp(500); }, error: function(error){ console.log(error); $("#upd_info").html('检查更新失败!'); $("#upd_prog").css({'width':'0%'}); $("#comsys").html('<div class="alert alert-danger">检查更新失败:无法连接到更新服务器<br/>错误已经记录到控制台,打开控制台查看详细<br/>你可以尝试手动更新</div><br/>'); } }); } </script> <?php doAction('admin_update_2'); ?> <br/><br/><?php echo SYSTEM_FN; ?> V<?php echo SYSTEM_VER; ?> // 作者: <a href="http://zhizhe8.net" target="_blank">Kenvix</a> & <a href="http://www.longtings.com/" target="_blank">mokeyjay</a> & <a href="http://fyy.l19l.com/" target="_blank">FYY</a>
<?php /* * @侧边栏 * @authors Jea杨 (JJonline@JJonline.Cn) * @date 2015-8-20 * @version 1.0 */ if (!defined('EMLOG_ROOT')) { exit('<a href="http://blog.jjonline.cn/theme/Vip_J3.html">J3</a> Requrire Emlog!'); } ?> <aside class="sidebar"> <?php $widgets = !empty($options_cache['widgets1']) ? unserialize($options_cache['widgets1']) : array(); doAction('diff_side'); foreach ($widgets as $val) { $widget_title = @unserialize($options_cache['widget_title']); $custom_widget = @unserialize($options_cache['custom_widget']); if (strpos($val, 'custom_wg_') === 0) { $callback = 'widget_custom_text'; if (function_exists($callback)) { call_user_func($callback, htmlspecialchars($custom_widget[$val]['title']), $custom_widget[$val]['content']); } } else { $callback = 'widget_' . $val; if (function_exists($callback)) { preg_match("/^.*\\s\\((.*)\\)/", $widget_title[$val], $matchs); $wgTitle = isset($matchs[1]) ? $matchs[1] : $widget_title[$val]; call_user_func($callback, htmlspecialchars($wgTitle)); }
function core_actions($act, $log) { global $mos; if ($act == 'getrep') { doCommand("{$mos}/bin/pm updatelist", $log); } if ($act == 'update_all') { doCommand("{$mos}/bin/pm updatelist", $log); $updates = getUpdates(); foreach ($updates as $mod => $item) { doAction($mod, 'update', $log); } } else { if (isset($_REQUEST['mod'])) { doAction($_REQUEST['mod'], $act, $log); } } }
function addComment($name, $content, $mail, $url, $imgcode, $blogId, $pid) { $ipaddr = getIp(); $utctimestamp = time(); if ($pid != 0) { $comment = $this->getOneComment($pid); $content = '@' . addslashes($comment['poster']) . ':' . $content; } $ischkcomment = Option::get('ischkcomment'); $hide = ROLE == ROLE_VISITOR ? $ischkcomment : 'n'; $sql = 'INSERT INTO ' . DB_PREFIX . "comment (date,poster,gid,comment,mail,url,hide,ip,pid)\n VALUES ('{$utctimestamp}','{$name}','{$blogId}','{$content}','{$mail}','{$url}','{$hide}','{$ipaddr}','{$pid}')"; $ret = $this->db->query($sql); $cid = $this->db->insert_id(); $CACHE = Cache::getInstance(); if ($hide == 'n') { $this->db->query('UPDATE ' . DB_PREFIX . "blog SET comnum = comnum + 1 WHERE gid='{$blogId}'"); $CACHE->updateCache(array('sta', 'comment')); doAction('comment_saved', $cid); emDirect(Url::log($blogId) . '#' . $cid); } else { $CACHE->updateCache('sta'); doAction('comment_saved', $cid); emMsg('评论发表成功,请等待管理员审核', Url::log($blogId)); } }
?> "></script> <script src="<?php echo BLOG_URL; ?> admin/editor/plugins/code/prettify.js" type="text/javascript"></script> <script src="<?php echo BLOG_URL; ?> include/lib/js/common_tpl.js" type="text/javascript"></script> <script src="<?php echo BLOG_URL; ?> admin/views/js/bootstrap.min.js" type="text/javascript"></script> <?php doAction('index_head'); ?> </head> <body> <!--导航--> <?php blog_navi(); ?> <header class="sb-page-header"> <div class="container"> <h1><?php echo $blogname; ?> </h1> <p><?php
<div><input type="text" name="user" id="user" /></div> <span>电子邮箱(选填)</span> <div><input type="text" name="email" id="email" /></div> <span>密码</span> <div><input type="password" name="pw" id="pw" /></div> <span>重复密码</span> <div><input type="password" name="repw" id="repw" /></div> <span>验证码</span> <div><input name="chcode" id="chcode" style="width: 80px;" type="text" /><img src="../include/lib/checkcode.php" align="absmiddle"></div> </div> <div class="login-button"> <div class="button"><input type="submit" value="注册" class="submit"></div> </div> <div style=" clear:both;"></div> <div class="login-ext"><?php doAction('login_ext'); ?> </div> <div class="login-bottom"></div> <div class="back"><a href="../">«返回首页</a></div> </div> <?php if (isset($_GET['error_login'])) { ?> <div class="login-error">用户名不能为空</div><?php } if (isset($_GET['error_exist'])) { ?> <div class="login-error">该用户名已存在</div><?php } if (isset($_GET['error_pwd_len'])) {
if (array_key_exists('s', $options)) { $start = intval($options['s']); } else { $start = 0; } $end = $db->selectField('page', 'MAX(page_id)', false, 'SMW_refreshData'); if (array_key_exists('e', $options)) { $end = min(intval($options['e']), $end); } $num_lines = 0; for ($id = $start; $id <= $end; $id++) { $title = Title::newFromID($id); if (is_null($title) || $title->getNamespace() != SMW_NS_CONCEPT) { continue; } $num_lines += doAction($title, $num_lines); } } outputMessage("\n\nDone.\n"); function doAction($title, $numlines = false) { global $action, $store, $select_hard, $select_old, $select_update, $smwgQMaxSize, $smwgQMaxDepth, $smwgQFeatures; $errors = array(); $status = false; if ($select_hard || $select_old || $select_update || $action == 'status') { $status = $store->getConceptCacheStatus($title); } $skip = false; if ($status !== false && $status['status'] == 'no') { $skip = 'page not cachable (no concept description, maybe a redirect)'; } elseif ($select_update && $status['status'] != 'full') {
?> <br/> <li><a href="https://github.com/MoeNetwork/tbsign_plugins/blob/master/README.md" target="_blank"><span class="glyphicon glyphicon-shopping-cart"></span> 插件中心</a></li> <li><a href="http://s.stus8.com/index.php?mod=list" target="_blank"><span class="glyphicon glyphicon-cloud"></span> 产品中心</a></li> <?php doAction('navi_9'); } ?> </li> <?php } else { ?> <li class="<?php checkIfActive('login'); ?> " ><a href="index.php?mod=login"><span class="glyphicon glyphicon-play"></span> 登录</a></li> <li class="<?php checkIfActive('reg'); ?> " ><a href="index.php?mod=reg"><span class="glyphicon glyphicon-user"></span> 注册</a></li> <?php doAction('navi_11'); ?> <?php } ?> </ul> </div> </div> <div class="col-md-9" role="main">
function reg_supervise_login() { ?> <style type="text/css">.box{width:300px;margin:10px auto;}.input-group .form-control {position: static;}</style> <b>您需要输入用户和密码才能登陆 <?php echo SYSTEM_NAME; ?> ,请输入您的用户信息</b><br/><br/> <?php if (isset($_GET['error_msg'])) { ?> <div class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> 错误:<?php echo strip_tags($_GET['error_msg']); ?> </div><?php } ?> <form name="f" method="post" action="index.php?mod=admin:login"> <div class="input-group"> <span class="input-group-addon">用户</span> <input type="text" class="form-control" name="user" placeholder="可为用户名或者邮箱地址,不同于百度通行证,仅用于登陆本站" required> </div><br/> <div class="input-group"> <span class="input-group-addon">密码</span> <input type="password" class="form-control" name="pw" id="pw" required> </div> <div class="box"> <?php require_once "reg_supervise_jy.php"; $geetest = new Geetest(); $geetest->set_captchaid(option::xget("reg_supervise", "geetest_id")); if ($geetest->register()) { echo $geetest->get_widget(option::xget("reg_supervise", "ys"), 'zc_button'); } else { ?> </div> <script type="text/javascript"> $(function(){ $("#reg_supervise_gg").click(function(){ $(this).attr("src",'plugins/reg_supervise/reg_supervise_gg.php?' + Math.random()); }); }); </script> <div class="input-group"> <span class="input-group-addon">验证码</span> <input type="text" class="form-control" name="bf" placeholder="请输入图中的大写字母" required> <span class="input-group-btn"><img src="plugins/reg_supervise/reg_supervise_gg.php" id="reg_supervise_gg" title="看不清,点击换一张"></span> </div><div class="box"> <?php } ?> </div> <div class="login-button"> <button type="submit" class="btn btn-primary" style="width:100%;float:left;">登陆</button> <input type="checkbox" name="ispersis" id="ispersis" value="1" /> <label for="ispersis">记住我</label><br/><br/> </div> <?php echo '<br/>' . option::get('footer'); doAction('footer'); ?> <div style=" clear:both;"></div> <div class="login-ext"></div> <div class="login-bottom"></div> </div> <?php die; }
echo Option::EMLOG_VERSION; ?> "></script> <div class=containertitle><b>写文章</b><span id="msg_2"></span></div> <div id="msg"></div> <form action="save_log.php?action=add" method="post" enctype="multipart/form-data" id="addlog" name="addlog"> <div id="post"> <div> <label for="title" id="title_label">输入文章标题</label> <input type="text" maxlength="200" name="title" id="title"/> </div> <div id="post_bar"> <div> <span onclick="displayToggle('FrameUpload', 0);autosave(1);" class="show_advset">上传插入</span> <?php doAction('adm_writelog_head'); ?> <span id="asmsg"></span> <input type="hidden" name="as_logid" id="as_logid" value="-1"> </div> <div id="FrameUpload" style="display: none;"> <iframe width="860" height="330" frameborder="0" src="attachment.php?action=selectFile"></iframe> </div> </div> <div> <textarea id="content" name="content" style="width:845px; height:460px;"></textarea> </div> <div style="margin:10px 0px 5px 0px;"> <label for="tag" id="tag_label">文章标签,逗号或空格分隔,过多的标签会影响系统运行效率</label> <input name="tag" id="tag" maxlength="200"/> <span style="color:#2A9DDB;cursor:pointer;margin-right: 40px;"><a href="javascript:displayToggle('tagbox', 0);">已有标签+</a></span>
function eraseRecords() { global $TABLE_PREFIX, $tableName, $schema, $escapedTableName, $isMyAccountMenu; if ($isMyAccountMenu) { die("Access not permitted for My Account menu!"); } // security checking security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); // error checking $errors = ''; if (@$schema['_disableErase']) { $errors .= t("Erasing records has been disabled for this section!"); } else { if (!@$_REQUEST['selectedRecords']) { $errors .= t("No record numbers were selected!"); } } if ($errors) { alert($errors); return; } // get record nums to erase $recordNumsAsCSV = '0'; foreach ($_REQUEST['selectedRecords'] as $num) { if ($tableName == 'accounts' && $num == $GLOBALS['CURRENT_USER']['num']) { continue; } // don't allow users to erase themselves! $recordNumsAsCSV .= ',' . intval($num); } // doAction('record_preerase', $tableName, $recordNumsAsCSV); // erase records uploads eraseRecordsUploads($recordNumsAsCSV); // erase records $query = "DELETE FROM `{$escapedTableName}` WHERE num IN ({$recordNumsAsCSV})"; mysql_query($query) or die("MySQL Error: " . htmlencode(mysql_error()) . "\n"); $recordsErased = mysql_affected_rows(); // if ($recordsErased == 0) { alert(t("Couldn't erase record (record no longer exists)!")); } else { if ($recordsErased == 1) { notice(t("Record erased!")); } else { if ($recordsErased >= 2) { alert(t("Records erased!")); } } } doAction('record_posterase', $tableName, $recordNumsAsCSV); }
<?php error_reporting(-1); //header('Content-type: application/xml'); header('Access-Control-Allow-Origin: *'); //print_r($_POST); echo doAction($_POST['action']); //set path to current file path $path = dirname(__FILE__); chdir($path); function doAction($action) { $id = $_POST['id']; $mapFile = "map/" . $id . ".map"; $offlineFile = "map/offline/" . $id . ".js"; switch ($action) { case "save": if (!is_dir("map")) { mkdir("map"); mkdir("map/offline"); } file_put_contents($mapFile, $_POST['data']); file_put_contents($offlineFile, "Map.level[" . $id . "] = " . $_POST['data']); return $_POST['data']; break; case "load": if (!empty($_POST['offlineMode'])) { return file_get_contents($offlineFile); } if (file_exists($mapFile)) { return file_get_contents($mapFile);
<br /><?php } elseif ($strUser['userid'] == $TS_USER['userid']) { ?> 签名:亲~还没有签名,赶快去写一个吧<br /><?php } if ($arrTag) { ?> <ul><li class="tags"> <?php foreach ((array) $arrTag as $key => $item) { ?> <a><?php echo $item['tagname']; ?> </a> <?php } ?> </li></ul> <?php } ?> </div> </div> </div> <div class="clear"></div> </div> <!--广告位--> <?php doAction('gobad', '300');