newdb('kstudy'); if(!Is_Numeric($rpID)){ err_back('잘못된 요청입니다.');} $csDbReport->ExecuteSQL("SELECT * FROM KS_ARTICLE WHERE ATCL_KEYN=" . $rpID . ""); if (!$csDbReport->getNumRows()) {err_move('삭제된 자료입니다.','/');exit;} $rowRpt = $csDbReport->getRow(); $rpType=4; $code1 = substr($rowRpt['ATCL_CODE'],0,2); $code2 = substr($rowRpt['ATCL_CODE'],2,2); /* // 자료평가박스 $csDbReport->ExecuteSQL("SELECT * FROM psRptEst WHERE rpID=" . $rpID . " AND rpType=4 ORDER BY reDate DESC"); if ($csDbReport->getNumRows()) { $rowCmt = $csDbReport->getRows(); } $MD = 'ADD'; if ($_SESSION['MEM_ID']) { // 평가글을 남길수 있는 권한 $reComt = $csDbReport->getTotalCnt("psBuyDownload"," mbID='".$_SESSION['MEM_ID']."' AND rpID=" . $rpID . " AND rpType=4"); //자료 평가 여부 판단 $csDbReport->ExecuteSQL("SELECT * FROM psRptEst WHERE mbID='".$_SESSION['MEM_ID']."' AND rpID=" . $rpID . " AND rpType=4"); if ($csDbReport->getNumRows()) { $estrow = $csDbReport->getRows(); $reID = $estrow[0][reID]; $reLevel = $estrow[0][reLevel]; $reComment = $estrow[0][reComment]; $MD = 'MOD'; } } */ // 레포트에 대한 상세 정보 $rpAttachIcon = $gFileExt[8]; $rpRegDate = timestamp_to_mysqldatetime($rowRpt['RegDate']); $rpPriceType = $gPriceType[1]; $metaurl = "http://www.happyhaksul.com".$_SERVER['REQUEST_URI']; /* For Search Engine */ /* $arrDes = array(); $description = eregi_replace("\&\#8228;|,|\.|[0-9]|◎|\)|\(|\-|'| |·|…|\"", "", $rowRpt["ATCL_TLKO"]); $arrTmp = explode("\n", $description); while($myWord = array_shift($arrTmp)){ $myWord = trim($myWord); if($myWord) $arrDes[] = $myWord; } $description = implode(", ", $arrDes); */ //$pageTitle = trim($rowRpt['ATCL_TITL']) . " 상세보기"; $pageTitle = trim($rowRpt['ATCL_TITL']); $description = trim($rowRpt['ATCL_KAST']) ? addslashes(trim($rowRpt['ATCL_KAST'])) : addslashes(trim($rowRpt['ATCL_EAST'])); $description = cutString($description,400); if($description) $description .=","; $description = preg_replace("/\&\#8228;|,|\.|\"|'|\[|\]|\(|\)|★|\-|'/", "", $description); $keyword = trim($rowRpt["ATCL_KEYW"]); $arrWord = explode(",", $keyword); if(count($arrWord) < 2){ $arrTit = explode(" ", str_replace(']',' ]',$rowRpt["ATCL_TITL"])); $arrTit[] = $rowRpt["ATCL_TITL"]; $arrWord = array_merge($arrTit, $arrWord); $arrTmp = explode("\n", $rowRpt["rpTContent"]); for($i = 0; $i < count($arrTmp); $i++){ $arrTmp[$i] = preg_replace("/및$|을$|는$|를$|에$|와$|의$/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/[a-zA-Z0-9]{1,3}\./", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/ⅰ|ⅱ|ⅲ|ⅳ|ⅴ|ⅵ|ⅶ|ⅷ|ⅸ|ⅹ/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/①|②|③|④|⑤|⑥|⑦|⑧|⑨|⑩/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/⑴|⑵|⑶|⑷|⑸|⑹|⑺|⑻|⑼|⑽/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/○|●|□|■/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/,|\.|\-|\+|\&|\#|\?|\*|\@|\!|[0-9]|…/", "", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/\[|\]|\(|\)|<|>|~|`|'|\"|:|;|《|》/", " ", $arrTmp[$i]); $arrTmp[$i] = preg_replace("/\040{2,}/", " ", $arrTmp[$i]); $arrTmp[$i] = str_replace("제 장|참고문헌", "", $arrTmp[$i]); $arrTmp[$i] = str_replace("제 절", "", $arrTmp[$i]); $arrTmp[$i] = trim($arrTmp[$i]); } $arrWord = array_merge($arrWord, $arrTmp); } $arrStr = array(); $cnt = count($arrWord); for($i = 0; $i < $cnt; $i++){ $myWord = trim($arrWord[$i]); $myWord = preg_replace("/\&\#8228;|,|\.|\[|\]|\(|\)|★|'/", "", $myWord); if($myWord) $arrStr[] = $myWord; } $arrStr = array_unique($arrStr); //대학레포토, 논문, 전문자료, 강의자료, 파워포인트템플릿, 표지_속지_서식 $recoKw = preg_replace("/\&\#8228;|,|\.|\[|\]|\(|\)|★|'/", "", trim($arrStr[0])); // 이 간행물의 인기 논문 //$csDbReport->ExecuteSQL("SELECT ATCL_TITL,ATCL_KEYN,RegDate FROM KS_ARTICLE WHERE ATCL_PUBL=".$rowRpt['ATCL_PUBL']." AND mbID='".$rowRpt['mbID']."' ORDER BY DnCnt DESC LIMIT 5"); $csDbReport->ExecuteSQL("SELECT ATCL_TITL as rpTitle,ATCL_KEYN as rpID FROM KS_ARTICLE WHERE ATCL_PUBL='".$rowRpt['ATCL_PUBL']."' ORDER BY DnDate DESC LIMIT 5"); if ($csDbReport->getNumRows()) { $rowPopul = $csDbReport->getRows(); } // 이 간행물의 신규 논문 //$csDbReport->ExecuteSQL("SELECT ATCL_TITL,ATCL_KEYN,RegDate FROM KS_ARTICLE WHERE ATCL_PUBL=".$rowRpt['ATCL_PUBL']." AND mbID='".$rowRpt['mbID']."' ORDER BY RegDate DESC LIMIT 5"); $csDbReport->ExecuteSQL("SELECT ATCL_TITL as rpTitle,ATCL_KEYN as rpID FROM KS_ARTICLE WHERE ATCL_PUBL='".$rowRpt['ATCL_PUBL']."' ORDER BY RegDate DESC LIMIT 5"); if ($csDbReport->getNumRows()) { $rowNewDt = $csDbReport->getRows(); } $csDbReport->ExecuteSQL(" update KS_ARTICLE set VwCnt=VwCnt+1 WHERE SEQ=".$rowRpt['SEQ']); $csDbReport->newdb('haksul'); if ($_SESSION['TdViewCnt']) { // 오늘 본 자료 $csDbReport->ExecuteSQL("SELECT * FROM psToday WHERE SessNum='".$_SESSION['TdViewCnt']."' AND rpID<>'' AND SUBSTRING(wrDate,1,10)=CURDATE() ORDER BY auID desc LIMIT 5"); $rowToday = $csDbReport->getRows(); // 장바구니 $query = "select count(*) as CartCnt from haksul.psCart where SessNum='".$_SESSION['TdViewCnt']."'"; $csDbReport->ExecuteSQL($query); $row = $csDbReport->getRow(); $cntCart = $row['CartCnt']; // 현재 자료 오늘 본 자료로 입력 if (!$csDbReport->getTotalCnt('psToday'," SessNum='".$_SESSION['TdViewCnt']."' AND rpID=" . $rpID . " AND rpType='4' ")) { $arForm = array( 'SessNum ' => $_SESSION['TdViewCnt'], 'mbID ' => $_SESSION['MEM_ID'], 'rpID ' => $rpID, 'rpType ' => 4, 'mbIDSup ' => $rowRpt['mbID'], 'rpTitle ' => addslashes($rowRpt['ATCL_TITL']), 'rpPrice ' => $rowRpt['ATCL_PRIC'], 'CODE ' => $rowRpt['ATCL_CODE'], 'AUTH ' => addslashes(trim($rowRpt['ATCL_AUTH'])), 'INST ' => $rowRpt['ATCL_INST'], 'PBLN ' => addslashes(trim($rowRpt['ATCL_PBLN'])), 'PUBL ' => $rowRpt['ATCL_PUBL'], 'ISTN ' => addslashes(trim($rowRpt['ATCL_ISTN'])), 'ASUT ' => trim($rowRpt['ATCL_KAST']) ? addslashes(trim($rowRpt['ATCL_KAST'])) : addslashes(trim($rowRpt['ATCL_EAST'])), 'KEYW ' => addslashes(trim($rowRpt['ATCL_KEYW'])), 'DSCP ' => addslashes(trim($rowRpt['ATCL_DESC'])), 'wrDate ' => date("Y-m-d H:i:s"), 'wrRefer ' => $fromrefer, 'wrIp ' => $GlobalremoteIP, 'wrMethod' => $mcheck, 'wrSelf ' => $_SERVER['REQUEST_URI'], ); $csDbReport->setInsert("psToday",$arForm); } } $HotCnt = 0; // 작은 이미지 $arPrevImgS = array(); foreach (range(0,2) as $ii) { $fileImg = $mDir.'/'.$rpID.'_'.sprintf("%04d",$ii).'.gif'; if (file_exists('/newData3/ksthumb2/'.$fileImg)){ if (!$arImgS) $arImgS = getimagesize('/newData3/ksthumb2/'.$fileImg); $arPrevImgS[] = $fileImg; } } // 큰이미지 /* if ($rowRpt['mbID'] != 'dbpia' || $rowRpt['ATCL_TPAG'] > 3) { $arPrevImg = array(); foreach (range(0,2) as $ii) { $fileImg = $mDir.'/'.$rpID.'-'.sprintf("%02d",$ii).'.gif'; if (file_exists('/newData3/kstimg/'.$fileImg)){ if (!$arImg) $arImg = getimagesize('/newData3/kstimg/'.$fileImg); $arPrevImg[] = $fileImg; } } if ($rowRpt['mbID'] == 'dbpia') unset($arPrevImg[1]); } */ //print_r($arImg); //검색 시작 $sDir = getMdir2($rpID); $filename = "/newData3/hsearch/kview/".$sDir."/".$rpID.".txt"; $makeurle = 0; if ( !file_exists ( $filename )) { $makeurle = 1; } if($makeurle==1){ require("/home/report/happyhaksul/search/lib/DOCRUZER.php"); $qt = preg_replace($BadStringS,'',$rowRpt['ATCL_TITL']); //초기화 $n_total_all = 0; $pageNum = 1; $saddr = "222.122.61.171"; $port = 7677; // 검색 시나리오 지정 // 검색 client object 생성 $crz = new DOCRUZER; $hc = $crz->CreateHandle(); $hc->SetOption(OPTION_SOCKET_ASYNC_REQUEST, 1); // 시작 위치 $scn = array("T"=>"view","K"=>"kview"); $method = array("T"=>"SOMEWORD","K"=>"SOMEWORDTHRUINDEX"); $log ='happyhaksul@'.$_SERVER['PHP_SELF'].'|article|'.$userinfo; $order = " ORDER BY \$MATCHFIELD(RPTITLE) DESC, \$RELEVANCE DESC"; $ii = 0; $resultA = array(); foreach((array) @$scn as $index => $value){ $query = " TEXT_REPORT_CONTENT ='" . escapeQuery($qt) . "' ".$method[$index]; if($index<>"K"){ $query .= " AND SCN_HAKSUL = 'R' "; $pageSize =10; }else{ $query .= " AND NOT RPID = $rpID "; $pageSize =5; } $ret = $crz->SubmitQuery($hc, $saddr, $port, "", $log, $scn[$index], $query, $order, $qt, $pageNum, $pageSize, 1, 4); if( $ret < 0 ) { //echo "SubmitQuery: " . $crz->GetErrorMessage($hc); //echo "
query was " . $query; } else { // 결과로 가져온 레코드 갯수 $searchCnt = $crz->GetResult_RowSize($hc); $arrData= array(); $seCnt[$index]=$searchCnt; for( $i=0; $i<$searchCnt; $i++ ){ $crz->GetResult_Row( $hc, $arrData, $i ); $resultA[$ii] = $arrData; $ii++; } } } $encodedString = json_encode($resultA); if(!is_dir("/newData3/hsearch/kview/".$sDir."/")){ mkdir("/newData3/hsearch/kview/".$sDir."/",0775); chmod("/newData3/hsearch/kview/".$sDir."/",0775); } $crz->DestroyHandle($hc); exec("rm -f ".$filename); file_put_contents($filename,$encodedString); } if($makeurle==0){ $fileContents = file_get_contents($filename); $xmlstr = json_decode($fileContents, true); $seCnt['T']=0; $seCnt['K']=0; foreach((array) @$xmlstr as $index => $value){ if(isset($value[3]) && $value[3]<>''){ $seCnt['T']++; }else{ $seCnt['K']++; } } }else{ if(!empty($resultA)){ $xmlstr=$resultA; }else{ $xmlstr = null; } if($_SESSION['MEM_ID']=='bjwillbe'){ //print_r($xmlstr); } } $c='part'; $g_css[]='/ncss/Hview_sen.css?v=1'; $g_css[]='/css/ad.css'; $gb_js[]="/css/ajax.js"; $gb_js[]="/css/common.js"; $gb_js[]="/css/ksinfo.js"; include(_HTML."/inc.nheader.php"); ?>
분야
>
저자
발행기관
간행물정보
년,
파일형식
[무료 PDF 뷰어 다운로드]
  • ※ 본 자료는 참고용 논문으로 수정 및 텍스트 복사가 되지 않습니다.
  • 구매가격
    0원
    적립금
    0원 (구매자료 0% 적립)