function blogsave($recv2) { $checknumber = array('id' => null); if ($recv2['blogtitle'] == null || $recv2['blogcontents'] == null) { $checknumber = array('id' => '41'); return $checknumber; } $con = mysql_connect(SAE_MYSQL_HOST_M . ':' . SAE_MYSQL_PORT, SAE_MYSQL_USER, SAE_MYSQL_PASS); if (!$con) { die('Could not connect:' . mysql_error()); } mysql_query("set names utf8"); mysql_select_db(SAE_MYSQL_DB, $con); $usr = $_SESSION['username']; $search = new scnublog(); $usrname = $search->searchusername(); $time = date('Y/m/d h:i:s', time()); $sql = "insert into blog(email,username,blogtitle,blogcontents,time) values('{$usr}','{$usrname}','{$recv2['blogtitle']}','{$recv2['blogcontents']}','{$time}')"; if (!mysql_query($sql, $con)) { mysql_close($con); die('Error:' . mysql_error); } mysql_close($con); $checknumber = array('id' => '42'); return $checknumber; }
function blogshow($sendrecv, $sendrecv2) { $scnublog = new scnublog(); $finally2 = $scnublog->blogshow($sendrecv, $sendrecv2); $blogresult = new blog(); $blogresult->showout($finally2); }
echo "location.replace(\"http://2.osscnu.sinaapp.com/index.php\");\r\n"; echo "</script>"; exit; } echo "<div id='bodybg3'><img src='../picture/9.jpg' class='stretch3'/></div>"; echo "<div style='left:540px;position:fixed;top:90px;'><h3>博   客   区</h3></div>"; echo "<div style='left:540px;position:fixed;top:580px;'><input type=button onclick=window.location.href='./blogwrite.php' value='进入我的博客'></div>"; echo "<div style='left:440px;position:fixed;top:0px;'><h1>欢迎来到华师开源代码部落</h1></div>"; echo "<div style='left:940px;position:fixed;top:10px;'>我的账号: {$_SESSION['username']}</a></div>"; echo "<div style='left:1180px;position:fixed;top:10px;'><a href='./update.php'><font color='0000FF'>修 改 资 料</font></a></div>"; echo "<div style='left:1280px;position:fixed;top:10px;'><a href='../index.php'><font color='0000FF'>退 出</font></a></div>"; echo "<div style='left:100px;position:fixed;top:60px;'><h3>开  源  代  码  区</h3></div>"; echo "<div style='left:50px;position:fixed;top:130px;'>今日更新:</div>"; echo "<div style='left:80px;position:fixed;top:560px;'><input type=button onclick=window.location.href='./publish.php' value='发布我的开源代码' style='width:130;height:30px'></div>"; require_once '../model/scnublog.php'; $showblog = new scnublog(); $blogres = $showblog->showblog(); echo "<div style='left:500px;position:fixed;top:150px;'><a href='javascript:void(0)' onclick='submit(1)'><font color='0000FF'>{$blogres['0']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:190px;'><a href='javascript:void(0)' onclick='submit(2)'><font color='0000FF'>{$blogres['1']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:230px;'><a href='javascript:void(0)' onclick='submit(3)'><font color='0000FF'>{$blogres['2']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:270px;'><a href='javascript:void(0)' onclick='submit(4)'><font color='0000FF'>{$blogres['3']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:310px;'><a href='javascript:void(0)' onclick='submit(5)'><font color='0000FF'>{$blogres['4']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:350px;'><a href='javascript:void(0)' onclick='submit(6)'><font color='0000FF'>{$blogres['5']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:390px;'><a href='javascript:void(0)' onclick='submit(7)'><font color='0000FF'>{$blogres['6']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:430px;'><a href='javascript:void(0)' onclick='submit(8)'><font color='0000FF'>{$blogres['7']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:470px;'><a href='javascript:void(0)' onclick='submit(9)'><font color='0000FF'>{$blogres['8']}</font></a></div></br>"; echo "<div style='left:500px;position:fixed;top:510px;'><a href='javascript:void(0)' onclick='submit(10)'><font color='0000FF'>{$blogres['9']}</font></a></div></br>"; echo "<div><form id='form1' action='../controller/blog.php' method='post'></div>"; echo "<input type=hidden name=showblog value='showblog'>\n\t <input type=hidden name=blogtitle id=blogtitle value='{$blogres['0']}'></form>"; echo "<div><form id='form2' action='../controller/blog.php' method='post'></div>"; echo "<input type=hidden name=showblog value='showblog'>\n\t <input type=hidden name=blogtitle id=blogtitle value='{$blogres['1']}'></form>";
echo "<div id='bodybg7'><img src='../picture/9.jpg' class='stretch7'/></div>"; echo "<div style='left:500px;position:fixed;top:30px;'><h2>编  写  我  的  博  客</h2></div>"; echo "<div style='left:940px;position:fixed;top:10px;'>我的账号: {$_SESSION['username']}</a></div>"; echo "<div><form action='../controller/blog.php' method=post></div>"; echo "<div style='left:480px;position:fixed;top:130px;'><h4>标题:  <input type=text name=blogtitle></h4></div>"; echo "<input type=hidden name=blogwrite value='blogwrite'>"; echo "<div style='left:480px;position:fixed;top:180px;'><h4>内容: </h4></div>"; echo "<div style='left:480px;position:fixed;top:230px;'><textarea type=text name=blogcontents style='resize:none;width:300px;height:350px;'></textarea></div>"; echo "<div style='left:500px;position:fixed;top:600px;'><input type=submit value='发 表' style='width:80px;height:30px;'></div>"; echo "<div style='left:630px;position:fixed;top:600px;'><input type=reset value='重 置' style='width:80px;height:30px;'></form></div>"; echo "<div style='left:1180px;position:fixed;top:10px;'><a href='./update.php'><font color='0000FF'>修 改 资 料</font></a></div>"; echo "<div style='left:1280px;position:fixed;top:10px;'><a href='./index.php'><font color='0000FF'>返 回</font></a></div>"; echo "<div style='left:100px;position:fixed;top:70px;'><h3>我  的  博  客</h3></div>"; //echo "<div style='left:120px;position:fixed;top:100px;'><a href='./showmyblog.php'>我的博客</a></div>"; require_once '../model/scnublog.php'; $kk = new scnublog(); $rr = $kk->showmyblog(); echo "<div style='left:70px;position:fixed;top:140px;'><a href='javascript:void(0)' onclick='submit(1)'><font color='0000FF'>{$rr['0']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:170px;'><a href='javascript:void(0)' onclick='submit(2)'><font color='0000FF'>{$rr['1']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:200px;'><a href='javascript:void(0)' onclick='submit(3)'><font color='0000FF'>{$rr['2']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:230px;'><a href='javascript:void(0)' onclick='submit(4)'><font color='0000FF'>{$rr['3']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:260px;'><a href='javascript:void(0)' onclick='submit(5)'><font color='0000FF'>{$rr['4']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:290px;'><a href='javascript:void(0)' onclick='submit(6)'><font color='0000FF'>{$rr['5']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:320px;'><a href='javascript:void(0)' onclick='submit(7)'><font color='0000FF'>{$rr['6']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:350px;'><a href='javascript:void(0)' onclick='submit(8)'><font color='0000FF'>{$rr['7']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:380px;'><a href='javascript:void(0)' onclick='submit(9)'><font color='0000FF'>{$rr['8']}</font></a></div></br>"; echo "<div style='left:70px;position:fixed;top:410px;'><a href='javascript:void(0)' onclick='submit(10)'><font color='0000FF'>{$rr['9']}</font></a></div></br>"; echo "<div><form id='form1' action='../controller/blog.php' method='post'></div>"; echo "<input type=hidden name=showmyblog value='showmyblog'>\n\t <input type=hidden name=blogtitle id=blogtitle value='{$rr['0']}'></form>"; echo "<div><form id='form2' action='../controller/blog.php' method='post'></div>"; echo "<input type=hidden name=showmyblog value='showmyblog'>\n\t <input type=hidden name=blogtitle id=blogtitle value='{$rr['1']}'></form>";