示例#1
0
<?php

require_once '../../../util/StackConst.php';
require_once '../dao/CaseDao.php';
session_start();
//如果没有登录,那么跳转到登录页面
if (!isset($_SESSION['userLoginMessage'])) {
    StackConst::jump_page("caseuserlogin.php");
}
//实例化
$caseDao = new CaseDao();
//获得语言分类
$languageSorts = $caseDao->getLanguageSort();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>caseissue</title>
<link type="text/css" rel="stylesheet" href="../../zcss/caseissue.css" />
<script language="javascript" type="text/javascript" src="../../zjs/jquery-1.8.3.js"></script>
<script language="javascript" type="text/javascript" src="../../zjs/jquery.corner.js"></script>
<script language="javascript" type="text/javascript">
$(function(){
	//圆角
	$("#userHeadImg,.userName,.issueTitle,#resource_case_title,.issueSort,#resource_case_language,#resource_case_content,#issueCaseSub").corner();
	
	$("#issueCaseSub").click(function(e){
		var Pbcss =  (e.pageY-100) + "px 0px 0px "+ (e.pageX-200)+"px";
	
		//验证内容提示
示例#2
0
<?php 
require_once '../../case/dao/CaseDao.php';
session_start();
$page = @$_GET['page'];
//获取当前页数
$language = @$_GET['resource_case_language'];
//获取分类语言
$word = @$_POST['word'] == "" ? @$_GET['word'] : @$_POST['word'];
//获取word查询关键字
$statue = @$_GET['resource_case_statue'];
//获取状态
$fk_user_id = @$_GET['fk_user_id'];
//发帖人id
//获取案例列表
$caseDao = new CaseDao();
$arrCases = $caseDao->getCaseList($page, $language, $word, $statue, $fk_user_id);
//获得案例的分类个数
$eachCaseCount = $caseDao->getEachCaseCount();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>itstack|案例仓库-www.itstack.org</title>
<link type="text/css" rel="stylesheet" href="../../zcss/case.css" />
<script language="javascript" type="text/javascript" src="../../zjs/jquery-1.8.3.js"></script>
<script language="javascript" type="text/javascript" src="../../zjs/jquery.corner.js"></script>
<link rel="stylesheet" title="Default" href="../../zjs/highlight/default.css">
<script src="../../zjs/highlight/highlight.pack.js"></script>
<script>
	  hljs.tabReplace = '    ';
示例#3
0
             }
         } else {
             if ("discuss" == $type) {
                 require_once '../dao/CaseDao.php';
                 require_once '../../../util/StackConst.php';
                 //提交评论
                 //再次验证登录
                 if (isset($_SESSION['userLoginMessage'])) {
                     //获得从哪来的页面
                     $upPageUrl = @$_SERVER["HTTP_REFERER"];
                     //获得时间
                     $dateTime = date('Y-m-d H:i:s');
                     //提交评论
                     $discussDetail = array("fk_resource_case_id" => @$_POST['fk_resource_case_id'], "fk_user_id" => $_SESSION['userLoginMessage']['user_id'], "resource_case_discuss_data" => $dateTime, "resource_case_discuss_content" => @$_POST['resource_case_discuss_content']);
                     //实例化dao
                     $caseDao = new CaseDao();
                     if ($caseDao->addDiscuss($discussDetail)) {
                         //跳转回页面
                         StackConst::jump_page($upPageUrl);
                     } else {
                         echo "添加评论失败!";
                         exit;
                     }
                 } else {
                     //跳转到登录页面
                     StackConst::jump_page("../view/caseuserlogin.php");
                 }
             }
         }
     }
 }
示例#4
0
<?php

header('Content-type: text/html; charset=utf-8');
require_once '../../case/dao/CaseDao.php';
session_start();
$resource_case_id = @$_GET['resource_case_id'];
$resource_case_title = @$_GET['resource_case_title'];
/*
 * 逻辑判断如果恶意进入此页面会跳转到caselist.php页面
 */
//获取案例列表
$caseDao = new CaseDao();
$arrCaseDetail = $caseDao->getCaseDetailById($resource_case_id);
//获取评论信息列表
$caseDiscussList = $caseDao->getCaseDiscussListById($resource_case_id);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo $resource_case_title;
?>
</title>
<link type="text/css" rel="stylesheet" href="../../zcss/casedetail.css">
<link rel="stylesheet" title="Default" href="../../zjs/highlight/default.css">
<script src="../../zjs/highlight/highlight.pack.js"></script>
<script>
	  hljs.tabReplace = '    ';
	  hljs.initHighlightingOnLoad();