if (affected_rows() >= 0) { //关闭数据库 close(); //清除session //session_destroy(); //跳转到首页 location('恭喜您修改成功!', 'manage_set.php'); } else { //关闭数据库 close(); //session_destroy(); //跳转到首页 location('修改失败!', 'manage_set.php'); } } else { aLert('登录异常'); } } //读取系统表 if (!!($rows = fetch_array("SELECT bbs_webname,bbs_article_num,bbs_blog_num,bbs_photo_num,bbs_hot_num,bbs_newuser_num,bbs_skin,bbs_string,bbs_post_time,bbs_repost_time,bbs_code,bbs_register,bbs_last_modify_date,bbs_modify_user FROM bbs_system WHERE bbs_id=1 LIMIT 1"))) { $html = array(); $html['webname'] = $rows['bbs_webname']; $html['article_num'] = $rows['bbs_article_num']; $html['blog_num'] = $rows['bbs_blog_num']; $html['photo_num'] = $rows['bbs_photo_num']; $html['hot_num'] = $rows['bbs_hot_num']; $html['newuser_num'] = $rows['bbs_newuser_num']; $html['skin'] = $rows['bbs_skin']; $html['string'] = $rows['bbs_string']; $html['post_time'] = $rows['bbs_post_time']; $html['repost_time'] = $rows['bbs_repost_time'];
/** * [limit_time 设置间隔时间] * @param [type] $str [要间隔时间的内容] * @param [type] $now_time [现在时间] * @param [type] $pre_time [之前时间] * @param [type] $second [间隔秒数] * @return [type] [description] */ function limit_time($str, $now_time, $pre_time, $second) { if ($now_time - $pre_time < $second) { aLert($str . '间隔时间不能小于' . $second); } }