이럴땐 어떻게 해야하나요? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

이럴땐 어떻게 해야하나요? 정보

질문 이럴땐 어떻게 해야하나요?

본문

안녕하세요
그누포에버 설치드렉토리(gnuboard4)

일단소스 먼저 올립니다...
요것을 포에버와 연동시킬려고 하는데....

--------------------------------데이타 베이스에 설치경로를 빼고.....소스올립니다..

<?
//if(!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 상대 경로

$host = "localhost";
$user = "username";
$password = "password";
//$g4_path/
$g4_path = ".";
$g4_path = ".";
include_once("./common.php");
include_once("./lib/outlogin.lib.php");

/*
$g4[title] = "";
include_once("$g4[path]/head.php");*/
$connect= mysql_connect($host,$user,$password);


if(!$exec) {
$this_page = "http://take2asia.com/gnuboard4/clip.php";//clip.php가 설치된 경로..
if($HTTP_REFERER=='$this_page') $HTTP_REFERER="";
$result2=mysql_query("select * from clip WHERE member_no = '$member[no]'", $connect) or die(mysql_error());
$temp2=mysql_fetch_array(mysql_query("select count(*) from clip WHERE member_no = '$member[no]'", $connect));
$total_clip=$temp2["count(*)"];



?>
<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title> 테스트입니다^^</title>
<style type="text/css">
<!--
td {color:#000000; font-size:9pt; font-family:굴림;}
a:link    {text-decoration:none;}
a:visited {text-decoration:none;}
a:hover  {text-decoration:underline;}
//-->
</style>
</head>

<body>

<table width=100% border=0 cellpadding=0 cellspacing=0>
        <tr>
                <td valign=top align=center width="100%">


<?
if($total_clip>=20) {
        }
        else {
?>
<table border=0 width="100%" cellpadding=3>
<tr><td><b><?=$member[mb_id]?></b>(<?=$nick?>)님의 Bookmark 입니다.</td></tr>
<tr><td height=1 bgcolor=#333333></td></tr>
</table>

<table border=0 cellspacing=0 cellpadding=3 width="100%" >
<col width=30></col><col width=></col>
<form actoin="<?=$PHP_SELF?>"  method="post" onsubmit="javascript:return clip_check_submit(this)">
<!--<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" enctype="multipart/form-data" autocomplete="off">---->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td align=center>
<input type=hidden name=exec value="insert">
<tr nowrap>
        <td align=right>제목</td>
        <td ><input type=input name=name  size=70 maxlength="50"  style="background-color:white; border-width:1px; border-color:rgb(102,102,102); border-style:solid;"></td>
</tr>
<tr nowrap>
        <td align=right >주소</td>
        <td ><input type=input name=url value="<?=$HTTP_REFERER?>" size=70 maxlength=250 style="background-color:white; border-width:1px; border-color:rgb(102,102,102); border-style:solid;"></td>
</tr>
<tr nowrap>
        <td colspan=2 align="right">
        <input type=submit value="저장하기" style="background-color:white; border-width:1px; border-color:rgb(102,102,102); border-style:solid;"></td>
</tr>
</form>
</table>

<br>
<?
        }
?>

<table border=0 width="100%" cellspacing=1 cellpadding="2" style=table-layout:fixed>
<col width=40></col><col width=150></col><col width=></col><col width=30></col>
<tr>
        <td colspan=4 height=1 align=center bgcolor=#999999 width="100%"></td>
</tr>
<tr align=center>
        <td bgcolor="#999999"><b>번호</b></td>
        <td bgcolor="#999999"><b>제목</b></td>
        <td bgcolor="#999999"><b>주소</b></td>
        <td bgcolor="#999999"><b>삭제</b></td>
</tr>
<tr>
        <td colspan=4 height=1 bgcolor=#999999 width="100%"></td>
</tr>
<?
        $num_clip=$total_clip;
        $num=$startNum+1;
        while($data2=mysql_fetch_array($result2))
        {echo "
<tr>
        <td>No. $num</td>
        <td>$data2[name]</td>
        <td><a href='$data2[url]' target=_blank>$data2[url]</a></td>
        <td align=center><a href='$PHP_SELF?exec=delete&no=$data2[no]' onclick=\"return confirm('삭제하시겠습니까?')\"><font style='font:bold 10px Verdana;color:c60000;text-decoration:none'>X</font></a></td>
</tr>
<tr>
        <td colspan=4 height=1 bgcolor=#999999></td>
</tr>";
        $num_clip--;
        $num++;
        }
?>
</table>


<?
}

// 클립추가
if($exec=="insert") {
        if($total_clip>=20) {
                Error("클립은 20개까지만 저장가능합니다....^^;;");
        }
        else {
                        //if(isblank($name)) Error("이름을 입력하셔야 합니다");
                      // if(isblank($url)) Error("URL을 입력하셔야 합니다");
                        if($name=="Clip Name") Error("Clip Name을 제대로 입력하셔야 합니다");
                        mysql_query("insert into clip (member_no, name, url) values ('$member[no]','$name','$url')", $connect) or die(mysql_error());
        }
      header("Location: $PHP_SELF");
}

// 클립삭제
if($exec=="delete") {
        mysql_query("DELETE FROM clip WHERE no = '$no' and member_no = '$member[no]'", $connect);
      header("Location: $PHP_SELF");
}
?>
</body>

</html>



----------------------------이런식으로 하면....다 작동은 되는데 멤버 아이디 하고 닉네임을 못불러오네요...
살펴보시고...방법좀 알려주세요&&

감사합니다

일단위의 소스는 펌입니다(무단사용금지^^)

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT