欢迎访问 舍力博客(www.shuyong.net)
先来看第一:“admin_log.php”
将:
<a href="write_log.php?action=edit&gid=<?php echo $value['gid']; ?>"><?php echo $value['title']; ?></a>改:
<a href="<?php if (ROLE == 'admin'):?>write_log.php?action=edit&gid=<?php echo $value['gid']; ?> <?php endif;?> <?php if (ROLE != 'admin'):?> # <?php endif;?> " <?php if (ROLE != 'admin'):?> title="提交过的文章不能编辑" <?php endif;?>> <?php echo $value['title']; ?> </a>将:
| <?php if($pid == 'draft'): ?> <a href="javascript:logact('pub');">发布</a> <?php else: ?> <a href="javascript:logact('hide');">转入草稿箱</a> | <?php if (ROLE == 'admin'):?> <a href="javascript:logact('top');">置顶</a> | <a href="javascript:logact('notop');">取消置顶</a> | <?php endif;?>改:
<?php if (ROLE == 'admin'):?> | <?php if($pid == 'draft'): ?> <a href="javascript:logact('pub');">发布</a> <?php else: ?> <a href="javascript:logact('hide');">转入草稿箱</a> | <?php endif;?> <?php if (ROLE == 'admin'):?> <a href="javascript:logact('top');">置顶</a> | <a href="javascript:logact('notop');">取消置顶</a> | <?php endif;?>
第二步:“add_log.php”
将:
<input type="checkbox" value="y" name="top" id="top" /> <label for="top">文章置顶</label>改:
<?php if (ROLE == 'admin'):?> <input type="checkbox" value="y" name="top" id="top" /> <label for="top">文章置顶</label> <?php endif;?>
将:
<input type="hidden" name="ishide" id="ishide" value=""> <input type="submit" value="发布文章" onclick="return checkform();" class="button" /> <input type="hidden" name="author" id="author" value=<?php echo UID; ?> /> <input type="button" name="savedf" id="savedf" value="保存草稿" onclick="autosave(2);" class="button" />
改:
<input type="hidden" name="ishide" id="ishide" value=""> <?php if (ROLE == 'admin'):?> <input type="submit" value="发布文章" onclick="return checkform();" class="button" /> <?php endif;?> <input type="hidden" name="author" id="author" value=<?php echo UID; ?> /> <input type="button" name="savedf" id="savedf" value="保存待审" onclick="autosave(2);" class="button" /><br /> <?php if (ROLE != 'admin'):?> <span style="color:#FF0000">请仔细检查文章内容,提交后不能再次编辑。</span> <?php endif;?>
留言/评论:◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。