mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
planet Package Module 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4874 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
83ab586a60
commit
b3179d58d0
217 changed files with 12581 additions and 0 deletions
14
modules/planet/conf/info.xml
Normal file
14
modules/planet/conf/info.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">플래닛</title>
|
||||
<description xml:lang="ko">Microblog입니다.</description>
|
||||
<version>0.1</version>
|
||||
<date>2008-09-30</date>
|
||||
<category>package</category>
|
||||
<author email_address="sol@ngleader.com" link="http://www.ngleader.com">
|
||||
<name xml:lang="ko">sol</name>
|
||||
</author>
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
</author>
|
||||
</module>
|
||||
90
modules/planet/conf/module.xml
Normal file
90
modules/planet/conf/module.xml
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants>
|
||||
<grant name="access" default="guest">
|
||||
<title xml:lang="ko">접근</title>
|
||||
</grant>
|
||||
<grant name="create" default="member">
|
||||
<title xml:lang="ko">플래닛 생성</title>
|
||||
</grant>
|
||||
<grant name="write_document" default="member">
|
||||
<title xml:lang="ko">글쓰기</title>
|
||||
</grant>
|
||||
<grant name="manager" default="root">
|
||||
<title xml:lang="ko">관리</title>
|
||||
</grant>
|
||||
</grants>
|
||||
<permissions>
|
||||
<permission action="dispPlanetCreate" target="member" />
|
||||
<permission action="procPlanetCreate" target="member" />
|
||||
|
||||
<permission action="dispPlanetAdminSetup" target="manager" />
|
||||
<permission action="dispPlanetAdminInsert" target="manager" />
|
||||
<permission action="dispPlanetAdminList" target="manager" />
|
||||
<permission action="dispPlanetAdminSkinInfo" target="manager" />
|
||||
<permission action="dispPlanetAdminDelete" target="manager" />
|
||||
|
||||
<permission action="procPlanetAdminInsertConfig" target="manager" />
|
||||
<permission action="procPlanetAdminInsert" target="manager" />
|
||||
<permission action="procPlanetAdminDelete" target="manager" />
|
||||
<permission action="procPlanetAdminUpdateSkinInfo" target="manager" />
|
||||
</permissions>
|
||||
<actions>
|
||||
<action name="dispPlanetLogin" type="view" />
|
||||
<action name="dispPlanetCreate" type="view" />
|
||||
|
||||
<action name="dispPlanetHome" type="view" />
|
||||
<action name="dispPlanet" type="view" index="true" />
|
||||
<action name="dispPlanetInfo" type="view" />
|
||||
<action name="dispPlanetTag" type="view" />
|
||||
<action name="favorite" type="view" />
|
||||
<action name="countContentTagSearch" type="view" />
|
||||
|
||||
<action name="dispPlanetMemo" type="view" />
|
||||
<action name="dispPlanetContent" type="view" />
|
||||
<action name="dispPlanetConetentReply" type="view" />
|
||||
<action name="dispPlanetConetentTag" type="view" />
|
||||
<action name="dispPlanetTopConetentTag" type="view" />
|
||||
<action name="dispPlanetTagSearch" type="view" />
|
||||
<action name="dispPlanetContentSearch" type="view" />
|
||||
<action name="dispPlanetContentTagSearch" type="view" />
|
||||
|
||||
<action name="getPlanetMemoList" type="model" />
|
||||
<action name="getPlanetReplyList" type="model" />
|
||||
|
||||
<action name="procPlanetCreate" type="controller" />
|
||||
<action name="procPlanetColorsetModify" type="controller" />
|
||||
<action name="procPlanetPhotoModify" type="controller" />
|
||||
<action name="procPlanetContentWrite" type="controller" />
|
||||
<action name="procPlanetContentTagModify" type="controller" />
|
||||
<action name="procPlanetInsertMemo" type="controller" />
|
||||
<action name="procPlanetDeleteMemo" type="controller" />
|
||||
<action name="procPlanetInsertInterestTag" type="controller" />
|
||||
<action name="procPlanetDeleteInterestTag" type="controller" />
|
||||
<action name="procPlanetInsertFavorite" type="controller" />
|
||||
<action name="procPlanetMe2dayApi" type="controller" />
|
||||
|
||||
<action name="procPlanetEnableRss" type="controller" />
|
||||
<action name="procPlanetDisableRss" type="controller" />
|
||||
|
||||
<action name="procPlanetReplyWrite" type="controller" />
|
||||
<action name="procNotReadWelcome" type="controller" />
|
||||
<action name="procPlanetInfoModify" type="controller" />
|
||||
<action name="procPlanetVoteContent" type="controller" />
|
||||
|
||||
|
||||
<action name="dispPlanetAdminSetup" type="view" standalone="true" admin_index="true" />
|
||||
<action name="dispPlanetAdminList" type="view" standalone="true" />
|
||||
<action name="dispPlanetAdminInsert" type="view" standalone="true" />
|
||||
<action name="dispPlanetAdminDelete" type="view" standalone="true" />
|
||||
<action name="dispPlanetAdminSkinInfo" type="view" standalone="true" />
|
||||
|
||||
<action name="procPlanetAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procPlanetAdminInsert" type="controller" standalone="true" />
|
||||
<action name="procPlanetAdminDelete" type="controller" standalone="true" />
|
||||
<action name="procPlanetAdminUpdateSkinInfo" type="controller" standalone="true" />
|
||||
|
||||
<action name="procPlanetInsertSMS" type="controller" />
|
||||
<action name="procPlanetSetSMS" type="controller" />
|
||||
</actions>
|
||||
</module>
|
||||
174
modules/planet/lang/jp.lang.php
Normal file
174
modules/planet/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<?php
|
||||
/**
|
||||
* @file ja.lang.php
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @edit nmind(nmindplus@gmail.com)
|
||||
* @brief プラネット(planet)モジュールの日本語パック
|
||||
**/
|
||||
|
||||
$lang->planet = "プラネット";
|
||||
$lang->planet_title = "プラネットタイトル";
|
||||
$lang->planet_url = "プラネットURL";
|
||||
$lang->planet_myplanet = "マイプラネット";
|
||||
$lang->planet_whos_planet = "%s さんのプラネット";
|
||||
$lang->planet_whos_favorite = "%s さんのお気に入り";
|
||||
$lang->planet_whos_favorite_list = "'%s'さんがよく訪れるプラネット";
|
||||
|
||||
$lang->planet_welcome = "ようこそ!";
|
||||
|
||||
$lang->planet_reply_content = "プラネットのコメント内容";
|
||||
|
||||
$lang->about_planet = "microBlogのXEモジュールです。会員別のプラネットを作成して運営することができます。";
|
||||
|
||||
$lang->planet_mid = "プラネット接続アドレス";
|
||||
$lang->about_planet_mid = "プラネット接続アドレスは「http://XEアドレス/プラネット接続アドレス」のようにダイレクトで接続できるアドレスを指します。";
|
||||
|
||||
$lang->planet_default_skin = "プラネット基本スキン";
|
||||
$lang->about_planet_default_skin = "プラネットメインページ及び作成されたプラネットの基本スキンに設定されます。";
|
||||
|
||||
$lang->planet_comment = "プラネットひと言紹介";
|
||||
$lang->about_planet_comment = "プラネットひと言紹介はプラネットに接続した時ブラウザのタイトル及びプラネットのひと言紹介欄に表示される内容です。";
|
||||
|
||||
$lang->use_signup = "会員登録ボタン表示";
|
||||
$lang->about_use_signup = "会員登録ボタン表示を選択するとプラネットの上段メニュに会員登録ができるボタンが表示されます。";
|
||||
|
||||
|
||||
$lang->cmd_create_planet = "マイプラネット作成";
|
||||
$lang->create_message = "マイプラネット作成案内文";
|
||||
$lang->about_create_message = "プラネット作成時に表示される案内文が入力できます。";
|
||||
|
||||
$lang->cmd_planet_setup = "基本設定";
|
||||
$lang->cmd_planet_list = "プラネットリスト";
|
||||
|
||||
$lang->msg_not_logged = "ログインしていません。";
|
||||
$lang->msg_planet_exists = "既に作成したプラネットがありますので新しく作成することができません。";
|
||||
|
||||
$lang->planet_userinfo = "個人情報";
|
||||
$lang->planet_change_userinfo = "個人情報変更";
|
||||
|
||||
$lang->planet_change_photo = "写真変更";
|
||||
$lang->about_planet_change_photo = "画像サイズは96×96pxに設定されます。";
|
||||
$lang->cmd_planet_image_upload = "画像アップロード";
|
||||
|
||||
$lang->cmd_planet_good = "推薦";
|
||||
$lang->cmd_planet_addfavorite = "お気に入り追加";
|
||||
|
||||
$lang->planet_hot_tag = "人気タグ";
|
||||
$lang->planet_home = "TOP";
|
||||
$lang->cmd_planet_more_tag = "タグをもっと見る";
|
||||
|
||||
$lang->planet_memo = "メモ";
|
||||
$lang->cmd_planet_show_memo_write_form = "メモ作成";
|
||||
$lang->cmd_planet_delete_memo = "メモ削除";
|
||||
$lang->cmd_planet_memo_write_ok = "入力完了";
|
||||
|
||||
$lang->planet_interest_tag = "関心タグ";
|
||||
$lang->planet_interest_content = "関心記事";
|
||||
$lang->cmd_planet_show_interest_tag = "関心タグを見る";
|
||||
$lang->cmd_planet_close_interest_tag = "関心タグを閉じる";
|
||||
$lang->msg_planet_already_added_interest_tag = "既に登録された関心タグです。";
|
||||
|
||||
$lang->cmd_planet_edit_subject = "タイトル編集";
|
||||
$lang->cmd_planet_edit_intro = "ひと言紹介編集";
|
||||
$lang->cmd_planet_edit_tag = "タグ編集";
|
||||
|
||||
$lang->cmd_planet_openclose_memo = "メモを開く/閉じる";
|
||||
$lang->cmd_planet_del_tag = "タグ削除";
|
||||
|
||||
|
||||
$lang->cmd_planet_openclose_recommend_search = "推薦検索を開く/閉じる";
|
||||
$lang->about_planet_input_search_text = "検索語入力";
|
||||
|
||||
|
||||
$lang->about_planet_make_planet = "マイプラネットを作成しましょ。プラネットの上段に表示される「マイインフォ」を入力してください。";
|
||||
$lang->about_planet_make_planet_info = "マイプラネットの上段に表示されるマイインフォです。各項目を入力して設定を変更してください。";
|
||||
$lang->planet_input_personalinfo = "個人情報入力";
|
||||
$lang->planet_photo = "写真";
|
||||
$lang->planet_myintro = "自己紹介";
|
||||
|
||||
$lang->about_planet_url = "設定後変更できません。";
|
||||
$lang->planet_mytag = "人物タグ";
|
||||
$lang->about_planet_mytag = "自分を表現するタグです。複数のタグは「,」で区別されます。";
|
||||
|
||||
$lang->about_planet_tag = "複数のタグは「,」で区別されます。";
|
||||
|
||||
$lang->cmd_planet_makeOk_move_myplanet = "確認 : 作成されたマイプラネットに移動します。";
|
||||
$lang->cmd_planet_ok_move_myplanet = "確認 : マイプラネットに移動します。";
|
||||
|
||||
|
||||
$lang->about_planet_login = "IDとPasswordを入力してログインボタンをクリックしてください。";
|
||||
|
||||
$lang->cmd_planet_login = "ログイン";
|
||||
|
||||
|
||||
$lang->planet_nowhot_tag = "プラネット人気タグ";
|
||||
$lang->cmd_planet_close_nowhot_tag = "人気タグを閉じる";
|
||||
|
||||
$lang->about_planet_whats_textSearch_in_planet = "<strong>%s</strong>さんのプラネットから検索した<strong>'%s'</strong>の検索結果です。";
|
||||
$lang->about_planet_whats_textSearch = "<strong>'%s'</strong>の全体検索結果です。";
|
||||
|
||||
$lang->planet_acticle = "記事";
|
||||
$lang->planet_persontag = "人物タグ";
|
||||
|
||||
$lang->planet_recent_acticle = "最新記事";
|
||||
|
||||
|
||||
$lang->cmd_planet_add_tag = "関心タグ追加";
|
||||
$lang->cmd_planet_add_article = "書き込み";
|
||||
$lang->cmd_planet_post_article = "登録";
|
||||
$lang->planet_postscript = "P.S";
|
||||
$lang->planet_article_preview = "プレビュー";
|
||||
|
||||
|
||||
$lang->planet_notice_title = "%sさん、プラネットにようこそ!<br>%sさんの考え、意見、情報、知識などを自由にたくさんの人々と共有できるプラネットです。簡単な使い方を案内します。";
|
||||
$lang->planet_notice_list = array(
|
||||
"「書き込み」の「開く」ボタンを利用してみてください。記事を作成するウィンドウが開きます。",
|
||||
"作成された記事は %sさんのプラネットに訪問する人々に公開されます。",
|
||||
"「お気に入り追加」と「関心タグ追加」機能を利用すれば%sさんの関心記事を見ることができます。",
|
||||
"%sさんの「写真、ネックネーム、タグ」などの情報は現在ページから変更できます。",
|
||||
"他のプラネットが気になりますか?「リアルタイム人気タグ」または「検索」を利用してみてください。",
|
||||
"その他、気になる部分は「質問」タグを検索してみてください。他の方から答えてもらえます。",
|
||||
);
|
||||
$lang->planet_notice_disable = "以降このメッセージを表示しません。";
|
||||
|
||||
$lang->msg_planet_about_postscript = "追加で書きたいことがありましたら作成してください。";
|
||||
$lang->msg_planet_about_tag = "タグを書いてください。(「,」で区別)";
|
||||
$lang->msg_planet_already_added_favorite = "ですに登録されたお気に入りです。";
|
||||
$lang->msg_planet_no_memo = "登録されたメモがありません。";
|
||||
|
||||
$lang->msg_planet_rss_enabled = "RSS配布機能を使用中です。";
|
||||
$lang->msg_planet_rss_disabled = "RSS配布機能を使用していません。";
|
||||
|
||||
$lang->msg_me2day_sync = "me2dayに記事を送る";
|
||||
$lang->msg_me2day_sync_q = "me2dayに記事を伝送しますか?";
|
||||
$lang->me2day_id = "me2dayアドレス";
|
||||
$lang->me2day_ukey = "ユーザーキー";
|
||||
$lang->msg_me2day_activate = "自動伝送設定されました。";
|
||||
$lang->msg_fail_auth_me2day = "Me2dayの認証に失敗しました。";
|
||||
$lang->msg_success_auth_me2day = "Me2day認証に成功しました。";
|
||||
|
||||
$lang->planet_total_articles = "全て";
|
||||
$lang->planet_wantyou = "推薦";
|
||||
$lang->planet_best = "満船";
|
||||
$lang->planet_catch = "釣った記事";
|
||||
$lang->planet_fish = "釣られた記事";
|
||||
$lang->planet_bigfish = "満船";
|
||||
$lang->cmd_send_me2day = "me2day発送";
|
||||
|
||||
$lang->msg_already_have_phone_number = '이미 전화번호가 등록되어 있습니다.';
|
||||
$lang->planet_mobile_receive = '모바일 연동';
|
||||
$lang->planet_mobile_number = '전화번호';
|
||||
$lang->msg_success_set_phone_number = '전화번호가 등록되었습니다.';
|
||||
|
||||
|
||||
$lang->planet_tagtab = "메인 추가 Tag 탭";
|
||||
$lang->about_planet_tagtab = "콤마(,)로 여러개의 Tag를 지정할 수 있으며, 지정한 Tag는 메인에 탭으로 출력 됩니다. 글쓰기 창에도 출력됩니다.";
|
||||
$lang->planet_smstag = "SMS 등록 Tag";
|
||||
$lang->about_planet_smstag = "콤마(,)로 여러개의 Tag를 지정할 수 있으며, SMS로 등록시에 등록 되는 Tag";
|
||||
|
||||
$lang->planet_use_mobile = "SMS 연동";
|
||||
$lang->about_use_mobile = "핸드폰 SMS로 글을 작성할 수 있게 합니다.";
|
||||
$lang->planet_use_me2day = "미투데이 연동";
|
||||
$lang->about_use_me2day = "글 작성시 me2day에 보내게 됩니다.";
|
||||
|
||||
?>
|
||||
175
modules/planet/lang/ko.lang.php
Normal file
175
modules/planet/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
<?php
|
||||
/**
|
||||
* @file ko.lang.php
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief 플래닛(planet) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->planet = "플래닛";
|
||||
$lang->planet_title = "플래닛 제목";
|
||||
$lang->planet_url = "플래닛 URL";
|
||||
$lang->planet_myplanet = "내 플래닛";
|
||||
$lang->planet_whos_planet = "%s 님의 플래닛";
|
||||
$lang->planet_whos_favorite = "%s 님의 즐겨찾기";
|
||||
$lang->planet_whos_favorite_list = "'%s'님께서 즐겨찾는 플래닛";
|
||||
|
||||
$lang->planet_welcome = "축하합니다";
|
||||
|
||||
$lang->planet_reply_content = "플래닛 댓글 내용";
|
||||
|
||||
$lang->about_planet =
|
||||
"microBlog의 XE 모듈입니다. 회원별로 플래닛을 생성하여 운영할 수 있습니다
|
||||
홈페이지 패키지에서 사용되는 도메인으로는 플래닛이 접속이 안될 수도 있습니다.
|
||||
플래닛을 초기페이지로 사용하고 싶으시면 접속을 원하시는 도메인을 홈페이지 패키지등에서 사용하지 않으셔야 합니다";
|
||||
|
||||
$lang->planet_mid = "플래닛 접속 주소";
|
||||
$lang->about_planet_mid = "플래닛 접속 주소는 http://XE주소/플래닛주소 와 같이 바로 접속가능할 수 있는 주소를 뜻합니다";
|
||||
|
||||
$lang->planet_default_skin = "플래닛 기본 스킨";
|
||||
$lang->about_planet_default_skin = "플래닛 메인 페이지 및 생성된 플래닛들의 기본 스킨으로 설정됩니다";
|
||||
|
||||
$lang->planet_comment = "플래닛 한줄 소개";
|
||||
$lang->about_planet_comment = "플래닛 한줄 소개는 플래닛 접속시 브라우저 제목과 플래닛의 한줄 소개란에 표시되는 내용입니다";
|
||||
|
||||
$lang->use_signup = "회원가입 연결";
|
||||
$lang->about_use_signup = "회원가입 연결을 선택하시면 플래닛의 상단메뉴에 회원가입할 수 있는 링크가 나타납니다";
|
||||
|
||||
|
||||
$lang->cmd_create_planet = "내 플래닛 만들기";
|
||||
$lang->create_message = "플래닛 생성 안내글";
|
||||
$lang->about_create_message = "플래닛 생성시 나타나는 안내글을 입력하실 수 있습니다";
|
||||
|
||||
$lang->cmd_planet_setup = "기본 설정";
|
||||
$lang->cmd_planet_list = "플래닛 목록";
|
||||
|
||||
$lang->msg_not_logged = "로그인 되어 있지 않습니다";
|
||||
$lang->msg_planet_exists = "이미 생성하신 플래닛이 있어서 새로 만드실 수 없습니다";
|
||||
|
||||
$lang->planet_userinfo = "개인정보";
|
||||
$lang->planet_change_userinfo = "개인정보변경";
|
||||
|
||||
$lang->planet_change_photo = "사진바꾸기";
|
||||
$lang->about_planet_change_photo = "이미지 사이즈는 96x96 픽셀(MSN 메신져 사진과 같은 크기)으로 설정 됩니다.";
|
||||
$lang->cmd_planet_image_upload = "이미지올리기";
|
||||
|
||||
$lang->cmd_planet_good = "원츄";
|
||||
$lang->cmd_planet_addfavorite = "즐겨찾기추가";
|
||||
|
||||
$lang->planet_hot_tag = "실시간 인기태그";
|
||||
$lang->planet_home = "홈";
|
||||
$lang->cmd_planet_more_tag = "더 많은 태그 보기";
|
||||
|
||||
$lang->planet_memo = "메모";
|
||||
$lang->cmd_planet_show_memo_write_form = "메모쓰기";
|
||||
$lang->cmd_planet_delete_memo = "메모삭제";
|
||||
$lang->cmd_planet_memo_write_ok = "입력완료";
|
||||
|
||||
$lang->planet_interest_tag = "관심태그";
|
||||
$lang->planet_interest_content = "관심글";
|
||||
$lang->cmd_planet_show_interest_tag = "관심태그 보기";
|
||||
$lang->cmd_planet_close_interest_tag = "관심태그 닫기";
|
||||
$lang->msg_planet_already_added_interest_tag = "이미 등록된 관심태그입니다";
|
||||
|
||||
$lang->cmd_planet_edit_subject = "제목편집";
|
||||
$lang->cmd_planet_edit_intro = "한줄소개편집";
|
||||
$lang->cmd_planet_edit_tag = "태그편집";
|
||||
|
||||
$lang->cmd_planet_openclose_memo = "메모 열기/닫기";
|
||||
$lang->cmd_planet_del_tag = "태그삭제";
|
||||
|
||||
|
||||
$lang->cmd_planet_openclose_recommend_search = "추천 검색어 열기/닫기";
|
||||
$lang->about_planet_input_search_text = "검색어입력";
|
||||
|
||||
|
||||
$lang->about_planet_make_planet = "내 플래닛을 만들어 보세요. 플래닛 상단에 보여질 나의 정보를 입력해주세요.";
|
||||
$lang->about_planet_make_planet_info = "내 플래닛의 상단에 보여질 나의 정보입니다. 각 항목을 원하는 대로 설정하고 변경해보세요.";
|
||||
$lang->planet_input_personalinfo = "개인정보입력";
|
||||
$lang->planet_photo = "사진";
|
||||
$lang->planet_myintro = "자기소개";
|
||||
|
||||
$lang->about_planet_url = "설정 후 변경할 수 없습니다";
|
||||
$lang->planet_mytag = "인물 태그";
|
||||
$lang->about_planet_mytag = "나를 표현하는 태그로써 여러개의 태그는 쉼표로 구분 합니다.";
|
||||
|
||||
$lang->about_planet_tag = "여러개의 태그는 쉼표로 구분 합니다.";
|
||||
|
||||
$lang->cmd_planet_makeOk_move_myplanet = "확인 : 생성된 내 플래닛으로 이동 합니다";
|
||||
$lang->cmd_planet_ok_move_myplanet = "확인 : 내 플래닛으로 이동 합니다";
|
||||
|
||||
|
||||
$lang->about_planet_login = "아이디와 비밀번호를 입력하고 로그인 버튼을 누르세요";
|
||||
|
||||
$lang->cmd_planet_login = "로그인";
|
||||
|
||||
|
||||
$lang->planet_nowhot_tag = "플래닛 실시간 인기태그";
|
||||
$lang->cmd_planet_close_nowhot_tag = "실시간 인기태그 닫기";
|
||||
|
||||
$lang->about_planet_whats_textSearch_in_planet = "<strong>%s</strong>님의 플래닛에서 검색한 <strong>'%s'</strong> 에 대한 결과 입니다.";
|
||||
$lang->about_planet_whats_textSearch = "<strong>'%s'</strong> 에 대한 전체 검색결과 입니다.";
|
||||
|
||||
$lang->planet_acticle = "글";
|
||||
$lang->planet_persontag = "인물태그";
|
||||
|
||||
$lang->planet_recent_acticle = "최신 업데이트 글";
|
||||
|
||||
|
||||
$lang->cmd_planet_add_tag = "관심태그추가";
|
||||
$lang->cmd_planet_add_article = "새글쓰기";
|
||||
$lang->cmd_planet_post_article = "글 올리기";
|
||||
$lang->planet_postscript = "P.S.";
|
||||
$lang->planet_article_preview = "미리보기";
|
||||
|
||||
|
||||
$lang->planet_notice_title = "%s님 반갑습니다!<br>%s님의 생각, 의견, 정보, 지식 등을 자유롭고 편안하게 많은 분들과 나눌 수 있는 곳, 플래닛 입니다. 몇 가지 사용법을 안내해 드릴께요.^^";
|
||||
$lang->planet_notice_list = array(
|
||||
"'새글쓰기'창의 '열기' 버튼을 이용해 보세요. 글을 작성할 수 있는 창이 열립니다.",
|
||||
"작성된 새글은 %s님의 플래닛을 방문하신 모든 분들이 볼 수 있고 댓글도 추가할 수 있습니다.",
|
||||
"'즐겨찾기추가'와 '관심태그추가' 기능을 이용하면 %s님의 관심글로 언제든지 바로가기 할 수 있습니다.",
|
||||
"%s님의 '사진, 닉네임, 태그' 등의 정보는 현재 페이지에서 즉시 변경할 수 있습니다.",
|
||||
"다른 플래닛이 궁금하시다구요? 실시간 인기태그 또는 검색을 이용해보세요.",
|
||||
"기타 궁금하신 점은 '질문' 태그를 검색해 보세요. 다른 분들의 도움을 받을 수 있습니다.",
|
||||
);
|
||||
$lang->planet_notice_disable = "이 메시지를 다시 보지 않습니다.";
|
||||
|
||||
$lang->msg_planet_about_postscript = "덧붙이고 싶은 말이 있으면 적으세요";
|
||||
$lang->msg_planet_about_tag = "태그를 적으세요. (쉼표로 구분)";
|
||||
$lang->msg_planet_already_added_favorite = "이미 등록된 즐겨찾기 입니다";
|
||||
$lang->msg_planet_no_memo = "등록된 메모가 없습니다";
|
||||
|
||||
$lang->msg_planet_rss_enabled = "RSS 배포 기능을 사용중입니다";
|
||||
$lang->msg_planet_rss_disabled = "RSS 배포 기능을 사용하지 않고 있습니다";
|
||||
|
||||
$lang->msg_me2day_sync = "미투데이로 글 보내기";
|
||||
$lang->msg_me2day_sync_q = "미투데이로 내 글을 전송하시겠습니까?";
|
||||
$lang->me2day_id = "미투 주소";
|
||||
$lang->me2day_ukey = "사용자 키";
|
||||
$lang->msg_me2day_activate = "항상 자동으로 전송합니다";
|
||||
$lang->msg_fail_auth_me2day = "Me2day 인증 실패하였습니다";
|
||||
$lang->msg_success_auth_me2day = "Me2day 인증에 성공하였습니다";
|
||||
|
||||
$lang->planet_total_articles = "전부";
|
||||
$lang->planet_wantyou = "원츄";
|
||||
$lang->planet_best = "월척";
|
||||
$lang->planet_catch = "낚은 글";
|
||||
$lang->planet_fish = "낚인 글";
|
||||
$lang->planet_bigfish = "월척";
|
||||
$lang->cmd_send_me2day = "미투발송";
|
||||
|
||||
$lang->msg_already_have_phone_number = '이미 전화번호가 등록되어 있습니다.';
|
||||
$lang->planet_mobile_receive = '모바일 연동';
|
||||
$lang->planet_mobile_number = '전화번호';
|
||||
$lang->msg_success_set_phone_number = '전화번호가 등록되었습니다.';
|
||||
|
||||
$lang->planet_tagtab = "메인 추가 Tag 탭";
|
||||
$lang->about_planet_tagtab = "콤마(,)로 여러개의 Tag를 지정할 수 있으며, 지정한 Tag는 메인에 탭으로 출력 됩니다. 글쓰기 창에도 출력됩니다.";
|
||||
$lang->planet_smstag = "SMS 등록 Tag";
|
||||
$lang->about_planet_smstag = "콤마(,)로 여러개의 Tag를 지정할 수 있으며, SMS로 등록시에 등록 되는 Tag";
|
||||
|
||||
$lang->planet_use_mobile = "SMS 연동";
|
||||
$lang->about_use_mobile = "핸드폰 SMS로 글을 작성할 수 있게 합니다.";
|
||||
$lang->planet_use_me2day = "미투데이 연동";
|
||||
$lang->about_use_me2day = "글 작성시 me2day에 보내게 됩니다.";
|
||||
|
||||
?>
|
||||
86
modules/planet/libs/me2day.api.php
Normal file
86
modules/planet/libs/me2day.api.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
class me2api {
|
||||
var $user_id = null;
|
||||
var $user_key = null;
|
||||
|
||||
var $application_key = '537a368d9049d9e86b2b169d75a2a4c3';
|
||||
|
||||
var $api_host = 'me2day.net';
|
||||
var $api_port = 80;
|
||||
|
||||
function me2api($user_id, $user_key) {
|
||||
$this->user_id = $user_id;
|
||||
$this->user_key = $user_key;
|
||||
}
|
||||
|
||||
function _getNonce() {
|
||||
for($i=0;$i<8;$i++) $nonce .= dechex(rand(0, 15));
|
||||
return $nonce;
|
||||
}
|
||||
|
||||
function _getAuthKey() {
|
||||
$nonce = $this->_getNonce();
|
||||
return $nonce.md5($nonce.$this->user_key);
|
||||
}
|
||||
|
||||
function _getPath($method, $user_id = null) {
|
||||
if(!$user_id) return sprintf('/api/%s.xml', $method);
|
||||
return sprintf('/api/%s/%s.xml',$method, $user_id);
|
||||
}
|
||||
|
||||
function _getContent($method, $user_id = null, $params = null) {
|
||||
$host = $this->api_host;
|
||||
$path = $this->_getPath($method, $user_id);
|
||||
$port = $this->api_port;
|
||||
$auth = base64_encode($this->user_id.':'.$this->_getAuthKey());
|
||||
|
||||
$arr_content = array();
|
||||
if(is_array($params) && count($params)) {
|
||||
foreach($params as $key => $val) {
|
||||
$arr_content[] = sprintf('%s=%s', $key, urlencode($val));
|
||||
}
|
||||
$content = implode('&',$arr_content);
|
||||
}
|
||||
$header = sprintf(
|
||||
"POST %s HTTP/1.0\r\n".
|
||||
"Host: %s\r\n".
|
||||
"me2_application_key: %s\r\n".
|
||||
"Content-Type: application/x-www-form-urlencoded\r\n".
|
||||
"Authorization: Basic %s\r\n".
|
||||
"Content-Length: %d\r\n\r\n",
|
||||
$path,
|
||||
$host,
|
||||
$this->application_key,
|
||||
$auth,
|
||||
strlen($content)
|
||||
);
|
||||
if($content) $header.=$content."\r\n\r\n";
|
||||
|
||||
$fp = fsockopen($host, $port);
|
||||
if(!$fp) return null;
|
||||
|
||||
fwrite($fp, $header);
|
||||
$started = false;
|
||||
while(!feof($fp)) {
|
||||
$str = fgets($fp, 1024);
|
||||
if(!trim($str)) $started = true;
|
||||
if($started) $buff .= $str;
|
||||
}
|
||||
fclose($fp);
|
||||
return trim($buff);
|
||||
}
|
||||
|
||||
function chkNoop() {
|
||||
$buff = $this->_getContent('noop');
|
||||
if(strpos($buff, '<code>0</code>')!==false) return new Object();
|
||||
return new Object(-1, $buff);
|
||||
}
|
||||
|
||||
function doPost($body, $tags, $content_type = 'document') {
|
||||
$params = array('post[body]'=>$body, 'post[tags]'=>str_replace(',',' ',$tags), 'content_type'=>$content_type);
|
||||
$buff = $this->_getContent('create_post',$this->user_id,$params);
|
||||
if(strpos($buff, '<code>0</code>')!==false) return new Object();
|
||||
return new Object(-1,$buff);
|
||||
}
|
||||
}
|
||||
?>
|
||||
201
modules/planet/planet.admin.controller.php
Normal file
201
modules/planet/planet.admin.controller.php
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetAdminController
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 admin controller class
|
||||
**/
|
||||
|
||||
class planetAdminController extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
function procPlanetAdminInsertConfig() {
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
|
||||
// mid, browser_title, is_default 값이 바뀌면 처리
|
||||
$config->mid = $args->mid = Context::get('planet_mid');
|
||||
$args->browser_title = Context::get('browser_title');
|
||||
$args->is_default = Context::get('is_default');
|
||||
$args->skin = Context::get('planet_default_skin');
|
||||
|
||||
|
||||
|
||||
$args->module = 'planet';
|
||||
$args->module_srl = $config->module_srl;
|
||||
if($args->is_default == 'Y') {
|
||||
$output = $oModuleController->clearDefaultModule();
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
$output = $oModuleController->updateModule($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 그외 정보 처리
|
||||
$config->planet_default_skin = Context::get('planet_default_skin');
|
||||
$config->use_mobile = Context::get('use_mobile');
|
||||
$config->use_me2day = Context::get('use_me2day');
|
||||
|
||||
|
||||
$tagtab = explode(',',Context::get('planet_tagtab'));
|
||||
for($i=0,$c=count($tagtab);$i<$c;$i++){
|
||||
if(trim($tagtab[$i])) continue;
|
||||
$tagtab[$i] = trim($tagtab[$i]);
|
||||
}
|
||||
$tagtab = array_unique($tagtab);
|
||||
$config->tagtab = $tagtab;
|
||||
|
||||
|
||||
$smstag = explode(',',Context::get('planet_smstag'));
|
||||
for($i=0,$c=count($smstag);$i<$c;$i++){
|
||||
if(trim($smstag[$i])) continue;
|
||||
$tagtab[$i] = trim($tagtab[$i]);
|
||||
}
|
||||
$smstag = array_unique($smstag);
|
||||
$config->smstag = $smstag;
|
||||
|
||||
|
||||
$config->create_message = Context::get('create_message');
|
||||
$config->use_signup = Context::get('use_signup');
|
||||
if($config->use_signup != 'Y') $config->use_signup = 'N';
|
||||
|
||||
$grant_list = array('access','create','manager');
|
||||
foreach($grant_list as $key) {
|
||||
$tmp = trim(Context::get($key));
|
||||
if(!$tmp) {
|
||||
$config->grants[$key] = null;
|
||||
continue;
|
||||
}
|
||||
$config->grants[$key] = explode('|@|', $tmp);
|
||||
}
|
||||
|
||||
$oPlanetController = &getController('planet');
|
||||
$oPlanetController->insertPlanetConfig($config);
|
||||
|
||||
$this->setMessage("success_saved");
|
||||
}
|
||||
|
||||
function procPlanetAdminInsert() {
|
||||
$args = Context::gets('planet_mid','browser_title','description','module_srl');
|
||||
$args->mid = $args->planet_mid;
|
||||
unset($args->planet_mid);
|
||||
|
||||
if(!$args->module_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$oPlanetController = &getController('planet');
|
||||
|
||||
$oPlanet = $oPlanetModel->getPlanet($args->module_srl);
|
||||
$planet = $oPlanet->getObjectVars();
|
||||
$planet->mid = $args->mid;
|
||||
$planet->browser_title = $args->browser_title;
|
||||
$planet->description = $args->description;
|
||||
|
||||
$output = $oPlanetController->updatePlanet($planet);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('module_srl',$output->get('module_srl'));
|
||||
$this->setMessage('success_saved');
|
||||
}
|
||||
|
||||
function procPlanetAdminDelete() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 원본을 구해온다
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->deleteModule($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
executeQuery('planet.deletePlanet', $args);
|
||||
executeQuery('planet.deletePlanetFavorites', $args);
|
||||
executeQuery('planet.deletePlanetTags', $args);
|
||||
executeQuery('planet.deletePlanetVoteLogs', $args);
|
||||
executeQuery('planet.deletePlanetMemos', $args);
|
||||
|
||||
$this->add('module','planet');
|
||||
$this->add('page',Context::get('page'));
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
function procPlanetAdminUpdateSkinInfo() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$skin = $config->planet_default_skin;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
|
||||
$obj = Context::getRequestVars();
|
||||
unset($obj->act);
|
||||
unset($obj->module_srl);
|
||||
unset($obj->page);
|
||||
unset($obj->module);
|
||||
|
||||
$config->colorset = $obj->colorset;
|
||||
|
||||
// 원 skin_info에서 extra_vars의 type이 image일 경우 별도 처리를 해줌
|
||||
if($skin_info->extra_vars) {
|
||||
foreach($skin_info->extra_vars as $vars) {
|
||||
if($vars->type!='image') {
|
||||
$config->{$vars->name} = $obj->{$vars->name};
|
||||
continue;
|
||||
}
|
||||
|
||||
$image_obj = $obj->{$vars->name};
|
||||
|
||||
// 삭제 요청에 대한 변수를 구함
|
||||
$del_var = $obj->{"del_".$vars->name};
|
||||
unset($obj->{"del_".$vars->name});
|
||||
if($del_var == 'Y') {
|
||||
FileHandler::removeFile($config->{$vars->name});
|
||||
$config->{$vars->name} = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
// 업로드 되지 않았다면 이전 데이터를 그대로 사용
|
||||
if(!$image_obj['tmp_name']) continue;
|
||||
|
||||
// 정상적으로 업로드된 파일이 아니면 무시
|
||||
if(!is_uploaded_file($image_obj['tmp_name'])) continue;
|
||||
|
||||
// 이미지 파일이 아니어도 무시
|
||||
if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) continue;
|
||||
|
||||
// 경로를 정해서 업로드
|
||||
$path = sprintf("./files/attach/planet/", $module_srl);
|
||||
|
||||
// 디렉토리 생성
|
||||
if(!FileHandler::makeDir($path)) return false;
|
||||
|
||||
$filename = $path.$image_obj['name'];
|
||||
|
||||
// 파일 이동
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename)) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
|
||||
// 변수를 바꿈
|
||||
$config->{$vars->name} = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
$oPlanetController = &getController('planet');
|
||||
$oPlanetController->insertPlanetConfig($config);
|
||||
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('default_layout.html');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile("top_refresh.html");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
18
modules/planet/planet.admin.model.php
Normal file
18
modules/planet/planet.admin.model.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetAdminModel
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @version 0.1
|
||||
* @brief planet 모듈의 admin model class
|
||||
**/
|
||||
|
||||
class planetAdminModel extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
111
modules/planet/planet.admin.view.php
Normal file
111
modules/planet/planet.admin.view.php
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetAdminView
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 admin view class
|
||||
**/
|
||||
|
||||
class planetAdminView extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$this->config = $oPlanetModel->getPlanetConfig();
|
||||
Context::set('config',$this->config);
|
||||
$oPlanetModel->isAccessGranted();
|
||||
|
||||
$this->setTemplatePath($this->module_path."/tpl/");
|
||||
$template_path = sprintf("%stpl/",$this->module_path);
|
||||
$this->setTemplatePath($template_path);
|
||||
}
|
||||
|
||||
function dispPlanetAdminSetup() {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins($this->module_path);
|
||||
Context::set('skin_list',$skin_list);
|
||||
|
||||
$grant_list = $this->xml_info->grant;
|
||||
Context::set('grant_list', $grant_list);
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups();
|
||||
Context::set('group_list', $group_list);
|
||||
if(is_array($this->config->tagtab)) Context::set('tagtab', join(',',$this->config->tagtab));
|
||||
if(is_array($this->config->smstag)) Context::set('smstag', join(',',$this->config->smstag));
|
||||
|
||||
|
||||
$this->setTemplateFile('setup');
|
||||
}
|
||||
|
||||
function dispPlanetAdminList() {
|
||||
|
||||
$page = Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$output = $oPlanetModel->getPlanetList(20, $page, 'regdate');
|
||||
|
||||
Context::set('planet_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('list');
|
||||
}
|
||||
|
||||
function dispPlanetAdminInsert() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
if($module_srl) {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
Context::set('planet', $oPlanetModel->getPlanet($module_srl));
|
||||
}
|
||||
|
||||
$this->setTemplateFile('insert');
|
||||
}
|
||||
|
||||
function dispPlanetAdminDelete() {
|
||||
if(!Context::get('module_srl')) return $this->dispPlanetAdminList();
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$oPlanet = $oPlanetModel->getPlanet($module_srl);
|
||||
$planet_info = $oPlanet->getObjectVars();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_count = $oDocumentModel->getDocumentCount($planet_info->module_srl);
|
||||
$planet_info->document_count = $document_count;
|
||||
|
||||
Context::set('planet_info',$planet_info);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('planet_delete');
|
||||
}
|
||||
|
||||
function dispPlanetAdminSkinInfo() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$skin = $config->planet_default_skin;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
|
||||
// skin_info에 extra_vars 값을 지정
|
||||
if(count($skin_info->extra_vars)) {
|
||||
foreach($skin_info->extra_vars as $key => $val) {
|
||||
$group = $val->group;
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
$value = $config->{$name};
|
||||
if($type=="checkbox"&&!$value) $value = array();
|
||||
$skin_info->extra_vars[$key]->value= $value;
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('skin_info', $skin_info);
|
||||
$this->setTemplateFile('skin_info');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
66
modules/planet/planet.api.php
Normal file
66
modules/planet/planet.api.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetAPI
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief planet 모듈의 View Action에 대한 API 처리
|
||||
**/
|
||||
|
||||
class planetAPI extends planet {
|
||||
|
||||
function dispPlanetHome(&$oModule) {
|
||||
$oModule->add('contentList', $this->arrangeContentList( Context::get('content_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function dispPlanet(&$oModule) {
|
||||
$oModule->add('contentList', $this->arrangeContentList( Context::get('content_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function favorite(&$oModule) {
|
||||
$oModule->add('contentList', $this->arrangeContentList( Context::get('content_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function dispPlanetContentTagSearch(&$oModule){
|
||||
$oModule->add('contentList', $this->arrangeContentList( Context::get('content_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function dispPlanetContentSearch(&$oModule){
|
||||
$oModule->add('contentList', $this->arrangeContentList( Context::get('content_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function dispPlanetTagSearch(&$oModule){
|
||||
$oModule->add('planetList', $this->arrangePlanetList( Context::get('planet_list') ) );
|
||||
$oModule->add('pageNavigation', Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
function arrangeContentList($content_list) {
|
||||
$output = array();
|
||||
if(count($content_list)) {
|
||||
foreach($content_list as $key => $val) {
|
||||
$item = null;
|
||||
$item = $val->gets('mid','document_srl','nick_name','content','postscript','voted_count','regdate','tag_list');
|
||||
$item->photo = $val->getPlanetPhotoSrc();
|
||||
$output[] = $item;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function arrangePlanetList($planet_list) {
|
||||
$output = array();
|
||||
if(count($planet_list)) {
|
||||
foreach($planet_list as $key => $val) {
|
||||
$item = null;
|
||||
$item = $val->gets('mid','document_srl','nick_name','content','postscript','voted_count','regdate','tag_list');
|
||||
$item->photo = $val->getPhotoSrc();
|
||||
$output[] = $item;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
84
modules/planet/planet.class.php
Normal file
84
modules/planet/planet.class.php
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planet
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 high class
|
||||
**/
|
||||
|
||||
require_once(_XE_PATH_.'modules/planet/planet.item.php');
|
||||
require_once(_XE_PATH_.'modules/planet/planet.info.php');
|
||||
|
||||
class planet extends ModuleObject {
|
||||
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
/**
|
||||
* planet 이라는 mid를 미리 입력해 놓음
|
||||
* 이 mid는 차후 수정 가능하고 planet 메인 페이지를 사용하기 위한 더미 형식의 mid로 사용됨.
|
||||
* 만약 이미 존재하는 경우를 대비해서 뒤에 숫자를 붙이도록 함.
|
||||
**/
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
$oPlanetController = &getController('planet');
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('planet');
|
||||
if($config->mid) {
|
||||
$_o = executeQuery('module.getMidInfo', $config);
|
||||
if(!$_o->data) unset($config);
|
||||
}
|
||||
|
||||
if(!$config->mid) {
|
||||
$args->module = 'planet';
|
||||
$args->browser_title = 'planetXE';
|
||||
$args->skin = 'xe_planet';
|
||||
$args->is_default = 'N';
|
||||
$args->mid = 'planet';
|
||||
$idx = 0;
|
||||
while(true) {
|
||||
$_o = executeQuery('module.getMidInfo', $args);
|
||||
if(!$_o->data) break;
|
||||
$idx = $idx + 1;
|
||||
}
|
||||
$args->module_srl = getNextSequence();
|
||||
$output = $oModuleController->insertModule($args);
|
||||
|
||||
$planet_args->mid = $args->mid;
|
||||
$oPlanetController->insertPlanetConfig($planet_args);
|
||||
}
|
||||
|
||||
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetHome');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetAdminSetup');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetAdminList');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetAdminSkinInfo');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetAdminDelete');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'dispPlanetAdminInsert');
|
||||
$oModuleController->insertActionForward('planet', 'view', 'favorite');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
761
modules/planet/planet.controller.php
Normal file
761
modules/planet/planet.controller.php
Normal file
|
|
@ -0,0 +1,761 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetController
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 Controller class
|
||||
**/
|
||||
|
||||
class planetController extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 생성
|
||||
**/
|
||||
function procPlanetCreate() {
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_logged');
|
||||
if(!$this->grant->create) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if($myplanet->isExists()) return new Object(-1,'msg_planet_exists');
|
||||
|
||||
$args->planet_title = Context::get("planet_title");
|
||||
$args->browser_title = Context::get("browser_title");
|
||||
$args->mid = Context::get("planet_mid");
|
||||
$args->tag = Context::get("tag");
|
||||
|
||||
if(in_array($args->mid, array('www','naver','hangame','promotion','notice','group','team','center','division','tf','faq','question','uit'))) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$output = $this->insertPlanet($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setError($output->getError());
|
||||
$this->setMessage($output->getMessage());
|
||||
$this->add('mid', $args->mid);
|
||||
$this->add('mid_url', getUrl('','mid',$args->mid));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 사진 업로드
|
||||
**/
|
||||
function procPlanetPhotoModify() {
|
||||
if(!Context::isUploaded()) exit();
|
||||
|
||||
$photo = Context::get('photo');
|
||||
if(!is_uploaded_file($photo['tmp_name'])) exit();
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$planet = $oPlanetModel->getMemberPlanet();
|
||||
if($planet->isExists()) $url = getUrl('','mid',$planet->getMid());
|
||||
else {
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$url = getUrl('','mid',$config->mid);
|
||||
}
|
||||
Context::set('url',$url);
|
||||
|
||||
$this->insertPlanetPhoto($planet->getModuleSrl(), $photo['tmp_name']);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('move_myplanet');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 플래닛 컬러셋 변경
|
||||
**/
|
||||
function procPlanetColorsetModify() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$colorset = Context::get('colorset');
|
||||
if(!$colorset) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$this->updatePlanetColorset($myplanet->getModuleSrl(), $colorset);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('move_myplanet');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 글 등록
|
||||
* 새글 등록. document 모듈을 이용
|
||||
**/
|
||||
|
||||
function procPlanetContentWrite() {
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1, 'msg_not_permitted');
|
||||
if($this->module_srl != $myplanet->getModuleSrl()) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$obj = Context::getRequestVars();
|
||||
$obj->module_srl = $myplanet->module_srl;
|
||||
|
||||
$output = $this->insertContent($obj);
|
||||
|
||||
// 오류 발생시 멈춤
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// me2day연동 처리
|
||||
if(Context::get('me2day_autopush')=='Y') {
|
||||
$content = Context::get('content');
|
||||
$tags = Context::get('tags');
|
||||
$postscript = Context::get('extra_vars20');
|
||||
if($postscript) $content .= " (".$postscript.")";
|
||||
if($tags) $tags = str_replace(',',' ',str_replace(' ','',$tags));
|
||||
$this->doPostToMe2day($myplanet->getMe2dayUID(), $myplanet->getMe2dayUKey(), $content, $tags);
|
||||
}
|
||||
|
||||
// 결과를 리턴
|
||||
$this->add('mid', Context::get('mid'));
|
||||
$this->add('document_srl', $output->get('document_srl'));
|
||||
|
||||
// 성공 메세지 등록
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
|
||||
function insertContent($obj,$manual_inserted=false){
|
||||
|
||||
$obj->content = str_replace(array('<','>'),array('<','>'),$obj->content);
|
||||
$obj->content = preg_replace('/"([^"]*)":(http|ftp|https|mms)([^ ]+)/is','<a href="$2$3" onclick="window.open(this.href);return false;">$1</a>$4', $obj->content);
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->insertDocument($obj,$manual_inserted);
|
||||
if(!$output->toBool()) return $output;
|
||||
$planet_args->latest_document_srl = $output->get('document_srl');
|
||||
$planet_args->module_srl = $obj->module_srl;
|
||||
$output = executeQuery('planet.updatePlanetLatestDocument', $planet_args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컨텐츠의 태그 수정
|
||||
**/
|
||||
function procPlanetContentTagModify(){
|
||||
|
||||
$req = Context::getRequestVars();
|
||||
|
||||
// document module의 model 객체 생성
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// document module의 controller 객체 생성
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocument = $oDocumentModel->getDocument($req->document_srl);
|
||||
$oDocument->add('tags',$req->planet_content_tag);
|
||||
$obj = $oDocument->getObjectVars();
|
||||
|
||||
$output = $oDocumentController->updateDocument($oDocument, $obj);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 타인의 플래닛에 메모 추가
|
||||
**/
|
||||
function procPlanetInsertMemo() {
|
||||
$planet_memo = trim(Context::get('planet_memo'));
|
||||
|
||||
if(!$planet_memo) return new Object(-1,'msg_invalid_request');
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
|
||||
// 대상 플래닛의 존재 유무 점검
|
||||
$planet = $oPlanetModel->getPlanet($this->module_srl);
|
||||
if(!$planet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 현재 접속자의 플래닛 점검
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
// 메모 등록
|
||||
$output = $this->insertMemo($this->module_srl, $myplanet->getModuleSrl(), $planet_memo);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 가장 최신 페이지 추출하여 tpl로 return
|
||||
$this->add('tpl', $oPlanetModel->getMemoHtml($this->module_srl, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메모 삭제
|
||||
**/
|
||||
function procPlanetDeleteMemo() {
|
||||
$planet_memo_srl = trim(Context::get("planet_memo_srl"));
|
||||
if(!$planet_memo_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$args->planet_memo_srl = $planet_memo_srl;
|
||||
$output = executeQuery('planet.getPlanetMemo', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$memo = $output->data;
|
||||
|
||||
if(!$output->data) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
Context::set('myplanet', $myplanet);
|
||||
|
||||
$planet = $oPlanetModel->getPlanet($memo->module_srl);
|
||||
if(!$planet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
Context::set('planet', $planet);
|
||||
|
||||
// 내플래닛인지 아닌지
|
||||
$logged_info = Context::get('logged_info');
|
||||
Context::set('isMyPlanet', $planet->getMemberSrl() == $logged_info->member_srl);
|
||||
|
||||
if($planet->getModuleSrl() != $memo->module_srl && $myplanet->getModuleSrl() != $memo->write_planet_srl) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$this->deleteMemo($planet_memo_srl);
|
||||
|
||||
// 가장 최신 페이지 추출하여 tpl로 return
|
||||
$this->add('tpl', $oPlanetModel->getMemoHtml($memo->module_srl, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 기본 설정 저장
|
||||
* 플래닛의 전체 설정은 module config를 이용해서 저장함
|
||||
* 대상 : 기본 플래닛 스킨, 권한, 스킨 정보
|
||||
**/
|
||||
function insertPlanetConfig($planet) {
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('planet', $planet);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 생성
|
||||
* 플래닛은 modules 테이블에 기본적인 정보(mid, browser_title)을 입력하고 planet테이블에 플래닛 개설자 정보를 매핑한다
|
||||
**/
|
||||
function insertPlanet($planet, $member_srl = 0) {
|
||||
$planet->module = 'planet';
|
||||
$planet->module_srl = getNextSequence();
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModule($planet);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if(!$member_srl) $member_info = Context::get('logged_info');
|
||||
else $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
|
||||
$args->planet_title = $planet->planet_title;
|
||||
$args->module_srl = $output->get('module_srl');
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$args->close_notice = 'N';
|
||||
$output = executeQuery('planet.insertPlanet', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if($planet->tag) {
|
||||
$tmp_arr = explode(",",trim($planet->tag));
|
||||
$tag_list = null;
|
||||
for($i=0;$i<count($tmp_arr);$i++) {
|
||||
$tag = trim($tmp_arr[$i]);
|
||||
if(!$tag) continue;
|
||||
unset($tag_args);
|
||||
$tag_args->module_srl = $args->module_srl;
|
||||
$tag_args->tag = $tag;
|
||||
executeQuery('planet.insertPlanetTag', $tag_args);
|
||||
}
|
||||
}
|
||||
|
||||
$output->add('module_srl', $planet->module_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 수정
|
||||
* 플래닛의 기본 정보를 수정
|
||||
**/
|
||||
function updatePlanet($planet) {
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->updateModule($planet);
|
||||
$output->add('module_srl', $planet->module_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 이미지 등록
|
||||
**/
|
||||
function insertPlanetPhoto($module_srl, $source) {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$path = $oPlanetModel->getPlanetPhotoPath($module_srl);
|
||||
if(!is_dir($path)) FileHandler::makeDir($path);
|
||||
|
||||
$filename = sprintf('%s/%d.jpg', $path, $module_srl);
|
||||
|
||||
FileHandler::createImageFile($source, $filename, 96, 96, 'jpg', 'crop');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 브라우져 제목 수정
|
||||
* 플래닛의 제목은 modules테이블의 browser_title컬럼을 이용한다
|
||||
**/
|
||||
function updatePlanetBrowserTitle($module_srl, $browser_title) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->browser_title = $browser_title;
|
||||
return executeQuery('planet.updatePlanetBrowserTitle', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 컬러셋 변경
|
||||
**/
|
||||
function updatePlanetColorset($module_srl, $colorset) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->colorset = $colorset;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
return executeQuery('planet.updatePlanetColorset', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 제목 수정
|
||||
* 플래닛의 제목은 planet테이블의 planet_title컬럼을 이용한다
|
||||
**/
|
||||
function updatePlanetTitle($module_srl, $planet_title) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->planet_title = $planet_title;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
return executeQuery('planet.updatePlanetTitle', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 소개 수정
|
||||
* 플래닛의 소개는 modules 테이블의 description컬럼을 이용한다.
|
||||
**/
|
||||
function updatePlanetIntro() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 인물 태그 수정
|
||||
* 플래닛의 인물 태그 수정
|
||||
**/
|
||||
function updatePlanetTag($module_srl,$arrTags) {
|
||||
$arrAddTags = array();
|
||||
$arrDeleteTags = array();
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$output = $oPlanetModel->getPlanetTags($module_srl);
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
executeQuery('planet.deletePlanetTags', $args);
|
||||
|
||||
if(count($arrTags)) {
|
||||
$arrTags = array_unique($arrTags);
|
||||
foreach($arrTags as $tag){
|
||||
if(strlen($tag) > 0){
|
||||
unset($tag_args);
|
||||
$tag_args->module_srl = $module_srl;
|
||||
$tag_args->tag = $tag;
|
||||
executeQuery('planet.insertPlanetTag', $tag_args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛에 메모 추가
|
||||
* 다른 회원들이 타회원의 플래닛에 메모를 추가
|
||||
**/
|
||||
function insertMemo($module_srl, $write_planet_srl, $memo_content) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->write_planet_srl = $write_planet_srl;
|
||||
$args->memo_content = $memo_content;
|
||||
return executeQuery('planet.insertPlanetMemo', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 메모 삭제
|
||||
**/
|
||||
function deleteMemo($planet_memo_srl) {
|
||||
$args->planet_memo_srl = $planet_memo_srl;
|
||||
$output = executeQuery('planet.deletePlanetMemo', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 즐찾 플래닛 추가
|
||||
* 플래닛이 있는 사용자만 즐찾 플래닛을 추가할 수 있다
|
||||
**/
|
||||
function addFavoritePlanet() {
|
||||
return executeQuery('planet.insertPlanetFavorite', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 즐찾 플래닛 제거
|
||||
**/
|
||||
function removeFavoritePlanet() {
|
||||
return executeQuery('planet.deletePlanetFavorite', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 이미지 수정
|
||||
* 플래닛에 표시되는 이미지를 수정
|
||||
**/
|
||||
function updatePlanetPhoto() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 welcome 메세지 표시여부
|
||||
**/
|
||||
function procNotReadWelcome(){
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_logged');
|
||||
if(!$this->grant->create) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$args->close_notice = 'Y';
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('planet.updateShowReadWelcome', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 정보 수정
|
||||
* 플래닛정보수정
|
||||
**/
|
||||
function procPlanetInfoModify(){
|
||||
$target = Context::get('target');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
$planet = $oPlanetModel->getPlanet($this->module_srl);
|
||||
if($myplanet->getModuleSrl()!=$planet->getModuleSrl()) return new ObjecT(-1,'msg_not_permitted');
|
||||
|
||||
switch($target){
|
||||
case 'planet_tag':
|
||||
$planet_tag = Context::get('planet_tag');
|
||||
$planet_tag = explode(',',$planet_tag);
|
||||
foreach($planet_tag as $v) $v = trim($v);
|
||||
|
||||
$this->updatePlanetTag($myplanet->getModuleSrl(),$planet_tag);
|
||||
break;
|
||||
case 'planet_name':
|
||||
$planet_name = Context::get('planet_name');
|
||||
return $this->updatePlanetTitle($myplanet->getModuleSrl(), $planet_name);
|
||||
break;
|
||||
case 'browser_title':
|
||||
$browser_title = Context::get('browser_title');
|
||||
return $this->updatePlanetBrowserTitle($myplanet->getModuleSrl(), $browser_title);
|
||||
break;
|
||||
case 'planet_info_photo':
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 글에 추천
|
||||
**/
|
||||
function procPlanetVoteContent(){
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocumentController = &getController('document');
|
||||
return $oDocumentController->updateVotedCount($document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관심태그 추가
|
||||
**/
|
||||
function procPlanetInsertInterestTag() {
|
||||
$tag = trim(Context::get('tag'));
|
||||
if(!$tag) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$interest_tags = $oPlanetModel->getInterestTags($myplanet->getModuleSrl());
|
||||
if(in_array($tag, $interest_tags)) return new Object(-1,'msg_planet_already_added_favorite');
|
||||
|
||||
$args->module_srl = $myplanet->getModuleSrl();
|
||||
$args->tag = $tag;
|
||||
$output = executeQuery('planet.insertInterestTag', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('tpl', $oPlanetModel->getInterestTagsHtml($myplanet->getModuleSrl()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관심태그 삭제
|
||||
**/
|
||||
function procPlanetDeleteInterestTag() {
|
||||
$tag = trim(Context::get('tag'));
|
||||
if(!$tag) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$args->module_srl = $myplanet->getModuleSrl();
|
||||
$args->tag = $tag;
|
||||
$output = executeQuery('planet.deleteInterestTag', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('tpl', $oPlanetModel->getInterestTagsHtml($myplanet->getModuleSrl()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 즐겨찾기추가
|
||||
**/
|
||||
function procPlanetInsertFavorite() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
if(!$module_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
if($myplanet->getModuleSrl() == $module_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
if($oPlanetModel->isInsertedFavorite($myplanet->getModuleSrl(), $module_srl)) return new Object(-1,'msg_planet_already_added_favorite');
|
||||
|
||||
$args->list_order = $args->planet_favorite_srl = getNextSequence();
|
||||
$args->module_srl = $myplanet->getModuleSrl();
|
||||
$args->reg_planet_srl = $module_srl;
|
||||
return executeQuery('planet.insertPlanetFavorite', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛에 댓글 추가
|
||||
*
|
||||
**/
|
||||
function procPlanetReplyWrite() {
|
||||
|
||||
// 권한 체크
|
||||
// 댓글 입력에 필요한 데이터 추출
|
||||
$req = Context::gets('document_srl','planet_reply_content');
|
||||
$obj->module_srl = $this->module_srl;
|
||||
$obj->document_srl = $req->document_srl;
|
||||
$obj->content = $req->planet_reply_content;
|
||||
|
||||
|
||||
// 원글이 존재하는지 체크
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
|
||||
if(!$oDocument->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
// comment 모듈의 model 객체 생성
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
// comment 모듈의 controller 객체 생성
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
$obj->comment_srl = getNextSequence();
|
||||
$output = $oCommentController->insertComment($obj);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// notice 남김
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($oDocument->get('member_srl') != $logged_info->member_srl) {
|
||||
$h_args->module_srl = $obj->module_srl;
|
||||
$h_args->document_srl = $obj->document_srl;
|
||||
$h_args->list_order = -1*$obj->comment_srl;
|
||||
$checkOutput = executeQuery('planet.getCatch', $h_args);
|
||||
if($checkOutput->data->count) executeQuery('planet.deleteCatch', $h_args);
|
||||
executeQuery('planet.insertCatch', $h_args);
|
||||
}
|
||||
|
||||
$this->setMessage('success_registed');
|
||||
$this->add('mid', Context::get('mid'));
|
||||
$this->add('document_srl', $obj->document_srl);
|
||||
$this->add('comment_srl', $obj->comment_srl);
|
||||
}
|
||||
|
||||
function procPlanetEnableRss() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$oRssAdminController = &getAdminController('rss');
|
||||
$oRssAdminController->setRssModuleConfig($myplanet->getModuleSrl(), 'Y');
|
||||
}
|
||||
|
||||
function procPlanetDisableRss() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$oRssAdminController = &getAdminController('rss');
|
||||
$oRssAdminController->setRssModuleConfig($myplanet->getModuleSrl(), 'N');
|
||||
}
|
||||
|
||||
function procPlanetMe2dayApi() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$myplanet = $oPlanetModel->getMemberPlanet();
|
||||
if(!$myplanet->isExists()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$args = Context::gets('me2day_id','me2day_ukey','me2day_autopush');
|
||||
if(!$args->me2day_autopush) $args->me2day_autopush = 'N';
|
||||
|
||||
$output = $this->doValidateMe2dayInfo($args->me2day_id, $args->me2day_ukey);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$args->module_srl = $myplanet->getModuleSrl();
|
||||
$args->member_srl = $myplanet->getMemberSrl();
|
||||
$output = executeQuery('planet.updatePlanetMe2day', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('msg_success_auth_me2day');
|
||||
}
|
||||
|
||||
function doValidateMe2dayInfo($user_id, $user_key) {
|
||||
require_once($this->module_path.'libs/me2day.api.php');
|
||||
$oMe2 = new me2api($user_id, $user_key);
|
||||
return $oMe2->chkNoop($user_id, $user_key);
|
||||
}
|
||||
|
||||
function doPostToMe2day($user_id, $user_key, $body, $tags) {
|
||||
require_once($this->module_path.'libs/me2day.api.php');
|
||||
$oMe2 = new me2api($user_id, $user_key);
|
||||
return $oMe2->doPost($body, $tags);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief SMS를 받는다
|
||||
*
|
||||
**/
|
||||
function procPlanetInsertSMS(){
|
||||
|
||||
$phone_number = Context::get('phone_number');
|
||||
$message = Context::get('message');
|
||||
|
||||
$message = Context::convertEncodingStr($message);
|
||||
|
||||
//@골뱅이를 빼자
|
||||
if(substr($message,0,1)=='@') $message = substr($message,1);
|
||||
|
||||
$args->phone_number = $phone_number;
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$output = $oPlanetModel->getSMSUser($args);
|
||||
|
||||
// SMS 사용자가 있으면 해당 planet에 등록
|
||||
if($output->data){
|
||||
|
||||
$args->content = $message;
|
||||
$args->module_srl = $output->data->module_srl;
|
||||
$args->member_srl = $output->data->member_srl;
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$output = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
||||
$args->user_id = $output->user_id;
|
||||
$args->user_name = $output->user_name;
|
||||
$args->nick_name = $output->nick_name;
|
||||
$args->email_address = $output->email_address;
|
||||
$args->homepage = $output->homepage;
|
||||
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$args->tags = join(',',$config->smstag);
|
||||
|
||||
$manual_inserted = true;
|
||||
$output = $this->insertContent($args,$manual_inserted);
|
||||
|
||||
}else{
|
||||
// SMS 사용자가 아니라면 planet_sms_resv에 쌓는다
|
||||
$output = $this->insertSMSRecv($phone_number,$message);
|
||||
}
|
||||
|
||||
|
||||
if($output->toBool()){
|
||||
header("X-SMSMORESPONSE:0");
|
||||
}else{
|
||||
header("X-SMSMORESPONSE:1");
|
||||
}
|
||||
|
||||
// response를 XMLRPC로 변환
|
||||
Context::setResponseMethod('XMLRPC');
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function insertSMSRecv($phone_number,$message){
|
||||
$args->phone_number = $phone_number;
|
||||
$args->message = $message;
|
||||
$output = executeQuery('planet.insertSMSRecv', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief SMS를 위한 핸드폰 번호를 셋팅한다
|
||||
**/
|
||||
function procPlanetSetSMS(){
|
||||
|
||||
// is login?
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_logged');
|
||||
|
||||
$phone_number = Context::get('phone_number');
|
||||
if(!$phone_number) return new Object(-1,'error');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$planet = $oPlanetModel->getMemberPlanet();
|
||||
$args->phone_number = $phone_number;
|
||||
|
||||
|
||||
// dont have planet!
|
||||
if(!$planet->isExists()) return new Object(-1,'error');
|
||||
|
||||
$output = $oPlanetModel->getSMSUser($args);
|
||||
if($output->data) return new Object(-1,'msg_already_have_phone_number');
|
||||
|
||||
$mid = $planet->getMid();
|
||||
$oModuleModel = &getModel('module');
|
||||
$output = $oModuleModel->getModuleInfoByMid($mid);
|
||||
$args->module_srl = $output->module_srl;
|
||||
|
||||
// SMSUser에 이미 있다면 지워준다
|
||||
$this->removeSMSUser($args->module_srl);
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
|
||||
$output = executeQuery('planet.insertSMSUser', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 이미 받아놓은 메세지들을 가져와 planet에 넣자
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$output = $oPlanetModel->getSMSRecv($phone_number);
|
||||
if($output->data && is_array($output->data)){
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$smstag = join(',',$config->smstag);
|
||||
for($i=0,$c=count($output->data);$i<$c;$i++){
|
||||
unset($obj);
|
||||
$obj->content = $output->data[$i]->message;
|
||||
$obj->module_srl = $args->module_srl;
|
||||
$args->tags = $smstag;
|
||||
|
||||
$this->insertContent($obj);
|
||||
}
|
||||
$this->removeSMSRecv($phone_number);
|
||||
}
|
||||
|
||||
$this->setMessage('msg_success_set_phone_number');
|
||||
}
|
||||
|
||||
function removeSMSRecv($phone_number){
|
||||
$args->phone_number = $phone_number;
|
||||
$output = executeQuery('planet.deleteSMSRecv', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
function removeSMSUser($module_srl){
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('planet.deleteSMSUser', $args);
|
||||
return $output;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
350
modules/planet/planet.info.php
Normal file
350
modules/planet/planet.info.php
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
<?php
|
||||
|
||||
class planetInfo extends Object {
|
||||
|
||||
var $planet_srl = null;
|
||||
var $module_srl = null;
|
||||
var $member_srl = null;
|
||||
var $photo_src = null;
|
||||
var $planet_title = null;
|
||||
var $colorset = null;
|
||||
|
||||
function planetInfo($planet_srl = 0) {
|
||||
if(!$planet_srl) return;
|
||||
|
||||
$this->setPlanet($planet_srl);
|
||||
}
|
||||
|
||||
function setPlanet($planet_srl) {
|
||||
$this->module_srl = $this->planet_srl = $planet_srl;
|
||||
$this->_loadFromDB();
|
||||
}
|
||||
|
||||
function _loadFromDB() {
|
||||
if(!$this->planet_srl) return;
|
||||
|
||||
$args->module_srl = $this->planet_srl;
|
||||
$output = executeQuery('planet.getPlanet', $args);
|
||||
if(!$output->toBool()||!$output->data) return;
|
||||
|
||||
$this->setAttribute($output->data);
|
||||
}
|
||||
|
||||
function setAttribute($attribute) {
|
||||
if(!$attribute->module_srl) {
|
||||
$this->planet_srl = null;
|
||||
return;
|
||||
}
|
||||
$this->module_srl = $this->planet_srl = $attribute->module_srl;
|
||||
$this->member_srl = $attribute->member_srl;
|
||||
$this->colorset = $attribute->colorset;
|
||||
|
||||
$this->adds($attribute);
|
||||
}
|
||||
|
||||
function isHome() {
|
||||
$config = Context::get('config');
|
||||
if($this->getModuleSrl() == $config->module_srl) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function getColorset() {
|
||||
if($this->isHome() || !$this->colorset) {
|
||||
$config = Context::get('config');
|
||||
return $config->colorset;
|
||||
}
|
||||
return $this->colorset;
|
||||
|
||||
}
|
||||
|
||||
function getBrowserTitle() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('browser_title');
|
||||
}
|
||||
|
||||
function getPlanetTitle() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('planet_title');
|
||||
}
|
||||
|
||||
function getPhotoSrc() {
|
||||
if(!$this->isExists()) return;
|
||||
$oPlanetModel = &getModel('planet');
|
||||
return $oPlanetModel->getPlanetPhotoSrc($this->planet_srl);
|
||||
}
|
||||
|
||||
function getMid() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('mid');
|
||||
}
|
||||
|
||||
function getMemberSrl() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('member_srl');
|
||||
}
|
||||
|
||||
function getModuleSrl() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->getPlanetSrl();
|
||||
}
|
||||
|
||||
function getPlanetSrl() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->planet_srl;
|
||||
}
|
||||
|
||||
function getPlanetMid() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('mid');
|
||||
}
|
||||
|
||||
function getNickName() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('nick_name');
|
||||
}
|
||||
|
||||
function getUserName() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('user_name');
|
||||
}
|
||||
|
||||
function getUserID() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('getUserID');
|
||||
}
|
||||
|
||||
function isExists() {
|
||||
return $this->planet_srl?true:false;
|
||||
}
|
||||
|
||||
function isNoticeClosed() {
|
||||
if(!$this->isExists()) return;
|
||||
return $this->get('close_notice')=='Y'?true:false;
|
||||
}
|
||||
|
||||
function isMyPlanet($planet = null) {
|
||||
if(!$this->isExists()) return;
|
||||
if(!Context::get('is_logged')) return false;
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($planet) return $logged_info->member_srl == $planet->get('member_srl');
|
||||
return $logged_info->member_srl == $this->get('member_srl');
|
||||
}
|
||||
|
||||
function isMyFavorite($planet) {
|
||||
if(!$this->isExists()) return false;
|
||||
if($planet->isMyPlanet()) return true;
|
||||
|
||||
$args->module_srl = $this->getModuleSrl();
|
||||
$args->reg_planet_srl = $planet->getModuleSrl();
|
||||
$output = executeQuery('planet.getMyFavorite', $args);
|
||||
if($output->data->count>0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function getPermanentUrl() {
|
||||
if(!$this->isExists()) return;
|
||||
return getUrl('','mid',$this->getMid());
|
||||
}
|
||||
|
||||
function getTags() {
|
||||
static $tags = null;
|
||||
if(!$this->isExists()) return;
|
||||
if(!is_null($tags)) return $tags;
|
||||
|
||||
$args->module_srl = $this->planet_srl;
|
||||
$output = executeQueryArray('planet.getPlanetTag', $args);
|
||||
if(!$output->toBool() || !$output->data) return array();
|
||||
|
||||
$tags = array();
|
||||
foreach($output->data as $key => $val) $tags[] = $val->tag;
|
||||
return $tags;
|
||||
}
|
||||
|
||||
function getTagsString() {
|
||||
if(!$this->isExists()) return;
|
||||
return join(',',$this->getTags());
|
||||
}
|
||||
|
||||
function isRssEnabled() {
|
||||
static $open_rss = null;
|
||||
if(!$this->isExists()) return;
|
||||
if(is_null($open_rss)) {
|
||||
$oRssModel = &getModel('rss');
|
||||
$config = $oRssModel->getRssModuleConfig($this->getModuleSrl());
|
||||
$open_rss = $config->open_rss;
|
||||
}
|
||||
return $open_rss=='Y'?true:false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 최신 업데이트 글 추출
|
||||
* mid : 대상 플래닛, null이면 전체 글 대상
|
||||
* date : 선택된 일자(필수값, 없으면 오늘을 대상으로 함)
|
||||
* page : 페이지 번호
|
||||
* list_count : 추출 대상 수
|
||||
**/
|
||||
function getNewestContentList($date = null, $page=1, $list_count = 10,$sort_index='documents.listorder',$order='asc') {
|
||||
if(!$this->isExists()) return;
|
||||
if(!$page) $page = 1;
|
||||
if(!$date) $date = date("Ymd");
|
||||
|
||||
// 전체 글을 추출 (module='planet'에 대해서 추출해야 하기에 document 모델을 사용하지 않음)
|
||||
if(!$this->isHome()) $args->mid = $this->getMid();
|
||||
$args->date = $date;
|
||||
$args->page = $page;
|
||||
$args->sort_index = $sort_index;
|
||||
$args->order = $order;
|
||||
$args->list_count = $list_count;
|
||||
$output = executeQueryArray('planet.getPlanetNewestContentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
unset($oPlanet);
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글이 달렸는데 확인하지 않은 글
|
||||
**/
|
||||
function getCatchContentList($page=1) {
|
||||
if(!$page) $page = 1;
|
||||
|
||||
$args->module_srl = $this->getModuleSrl();
|
||||
$args->page = $page;
|
||||
$output = executeQueryArray('planet.getCatchContentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
unset($oPlanet);
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관심 태그로 등록된 글 가져오기
|
||||
**/
|
||||
function getInterestTagContentList($date, $page=1) {
|
||||
if(!$page) $page = 1;
|
||||
|
||||
$args->module_srl = $this->getModuleSrl();
|
||||
$args->date = $date;
|
||||
$args->page = $page;
|
||||
$output = executeQueryArray('planet.getInterestTagContentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
unset($oPlanet);
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 마지막 글 쓴 날짜 return
|
||||
**/
|
||||
function getContentLastDay() {
|
||||
if(!$this->isExists()) return;
|
||||
if(!$this->isHome()) $args->module_srl = $this->getModuleSrl();
|
||||
|
||||
$args->date = $date . '235959';
|
||||
$output = executeQuery('planet.getPlanetContentLastDay', $args);
|
||||
if(!$output->toBool() || !$output->data) return date("Ymd");
|
||||
$last_day = $output->data->last_date;
|
||||
if(!$last_day) $last_day = date("Ymd");
|
||||
$last_day = substr($last_day,0,8);
|
||||
if(!$last_day || $last_day > date("Ymd") ) return date("Ymd");
|
||||
return $last_day;
|
||||
}
|
||||
|
||||
function getInterestTags() {
|
||||
if(!$this->isExists()) return;
|
||||
$oPlanetModel = &getModel('planet');
|
||||
return $oPlanetModel->getInterestTags($this->module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 전체 태그중 인기 태그 return
|
||||
* mid : 대상 플래닛 (null이면 전체 플래닛)
|
||||
* shuffle : 태그 결과값에 rank를 부여하고 shuffle
|
||||
* list_coutn : 추출 대상 수
|
||||
**/
|
||||
function getPopularTags($shuffle = false, $list_count = 100) {
|
||||
if(!$this->isExists()) return;
|
||||
if(!$this->isHome()) $args->mid = $this->getMid();
|
||||
|
||||
$cache_file = sprintf('%sfiles/cache/planet/%s/%d.%d.txt', _XE_PATH_,getNumberingPath($this->getModuleSrl(),3), $shuffle?1:0,$list_count);
|
||||
if(!file_exists($cache_file)||filemtime($cache_file)<time()-60*5) {
|
||||
$args->list_count = $list_count;
|
||||
|
||||
// 24시간 이내의 태그중에서 인기 태그를 추출
|
||||
$args->date = date("YmdHis", time()-60*60*24);
|
||||
|
||||
$output = executeQueryArray('planet.getPlanetPopularTags',$args);
|
||||
if(!$output->toBool() || !$output->data) return array();
|
||||
|
||||
$tags = array();
|
||||
$max = 0;
|
||||
$min = 99999999;
|
||||
foreach($output->data as $key => $val) {
|
||||
$tag = $val->tag;
|
||||
$count = $val->count;
|
||||
if($max < $count) $max = $count;
|
||||
if($min > $count) $min = $count;
|
||||
$tags[] = $val;
|
||||
}
|
||||
|
||||
if($shuffle) {
|
||||
$mid2 = $min+(int)(($max-$min)/2);
|
||||
$mid1 = $mid2+(int)(($max-$mid2)/2);
|
||||
$mid3 = $min+(int)(($mid2-$min)/2);
|
||||
|
||||
$output = null;
|
||||
|
||||
foreach($tags as $key => $item) {
|
||||
if($item->count > $mid1) $rank = 1;
|
||||
elseif($item->count > $mid2) $rank = 2;
|
||||
elseif($item->count > $mid3) $rank = 3;
|
||||
else $rank= 4;
|
||||
|
||||
$tags[$key]->rank = $rank;
|
||||
}
|
||||
shuffle($tags);
|
||||
}
|
||||
FileHandler::writeFile($cache_file, serialize($tags));
|
||||
} else {
|
||||
$tags = unserialize(FileHandler::readFile($cache_file));
|
||||
}
|
||||
|
||||
return $tags;
|
||||
}
|
||||
|
||||
function getMe2dayUID() {
|
||||
return $this->get('me2day_uid');
|
||||
}
|
||||
|
||||
function getMe2dayUKey() {
|
||||
return $this->get('me2day_ukey');
|
||||
}
|
||||
|
||||
function getMe2dayAuthPush() {
|
||||
return $this->get('me2day_autopush')=='Y'?true:false;
|
||||
}
|
||||
|
||||
function getPhoneNumber(){
|
||||
return $this->get('phone_number');
|
||||
}
|
||||
}
|
||||
?>
|
||||
142
modules/planet/planet.item.php
Normal file
142
modules/planet/planet.item.php
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?php
|
||||
|
||||
require_once("./modules/document/document.item.php");
|
||||
|
||||
class planetItem extends documentItem {
|
||||
|
||||
function planetItem($document_srl = 0) {
|
||||
parent::documentItem($document_srl);
|
||||
}
|
||||
|
||||
function setPlanet($document_srl) {
|
||||
$this->document_srl = $document_srl;
|
||||
$this->_loadFromDB();
|
||||
}
|
||||
|
||||
function _loadFromDB() {
|
||||
if(!$this->document_srl) return;
|
||||
parent::_loadFromDB();
|
||||
|
||||
$this->add('postscript', $this->get('extra_vars20'));
|
||||
}
|
||||
|
||||
function setAttribute($attribute) {
|
||||
parent::setAttribute($attribute);
|
||||
$this->add('postscript', $attribute->extra_vars20);
|
||||
}
|
||||
|
||||
|
||||
function getWriteInfo() {
|
||||
static $planet_info = array();
|
||||
if(!isset($planet_info[$this->get('module_srl')])) {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$info = $planet_info[$this->get('module_srl')] = $oPlanetModel->getPlanet($this->get('module_srl'));
|
||||
$this->add('planet_title', $info->getBrowserTitle());
|
||||
$this->add('nick_name', $info->getNickName());
|
||||
$this->add('user_name', $info->getUserName());
|
||||
$this->add('user_id', $info->getUserID());
|
||||
$this->add('planet_title', $info->getPlanetTitle());
|
||||
$this->add('mid', $info->getMid());
|
||||
}
|
||||
}
|
||||
|
||||
function getPlanetPhotoSrc() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
return $oPlanetModel->getPlanetPhotoSrc($this->get('module_srl'));
|
||||
}
|
||||
|
||||
function getPlanetMid() {
|
||||
$this->getWriteInfo();
|
||||
return $this->get('mid');
|
||||
}
|
||||
|
||||
function getPlanetTitle() {
|
||||
$this->getWriteInfo();
|
||||
return $this->get('planet_title');
|
||||
}
|
||||
|
||||
function getUserID() {
|
||||
$this->getWriteInfo();
|
||||
return parent::getUserID();
|
||||
}
|
||||
|
||||
function getUserName() {
|
||||
$this->getWriteInfo();
|
||||
return parent::getUserName();
|
||||
}
|
||||
|
||||
function getNickName() {
|
||||
$this->getWriteInfo();
|
||||
return parent::getNickName();
|
||||
}
|
||||
|
||||
|
||||
function getPostScript() {
|
||||
return $this->get('postscript');
|
||||
}
|
||||
|
||||
function getContent() {
|
||||
if(!$this->document_srl) return;
|
||||
return parent::getContent(false,true);
|
||||
}
|
||||
|
||||
function getArrTags() {
|
||||
return $this->get('tag_list');
|
||||
}
|
||||
|
||||
function getTextTags() {
|
||||
return $this->get('tags');
|
||||
}
|
||||
|
||||
function getRegdate(){
|
||||
return $this->get('regdate');
|
||||
}
|
||||
|
||||
function getVotedCount(){
|
||||
return $this->get('voted_count');
|
||||
|
||||
}
|
||||
|
||||
function PopularTags($list_count = 100, $shuffle = false) {
|
||||
if(!$this->isHome()) $args->mid = $this->getMid();
|
||||
$args->list_count = $list_count;
|
||||
|
||||
// 24시간 이내의 태그중에서 인기 태그를 추출
|
||||
$args->date = date("YmdHis", time()-60*60*24);
|
||||
|
||||
$output = executeQueryArray('planet.getPlanetPopularTags',$args);
|
||||
if(!$output->toBool() || !$output->data) return array();
|
||||
|
||||
$tags = array();
|
||||
$max = 0;
|
||||
$min = 99999999;
|
||||
foreach($output->data as $key => $val) {
|
||||
$tag = $val->tag;
|
||||
$count = $val->count;
|
||||
if($max < $count) $max = $count;
|
||||
if($min > $count) $min = $count;
|
||||
$tags[] = $val;
|
||||
}
|
||||
|
||||
if($shuffle) {
|
||||
$mid2 = $min+(int)(($max-$min)/2);
|
||||
$mid1 = $mid2+(int)(($max-$mid2)/2);
|
||||
$mid3 = $min+(int)(($mid2-$min)/2);
|
||||
|
||||
$output = null;
|
||||
|
||||
foreach($tags as $key => $item) {
|
||||
if($item->count > $mid1) $rank = 1;
|
||||
elseif($item->count > $mid2) $rank = 2;
|
||||
elseif($item->count > $mid3) $rank = 3;
|
||||
else $rank= 4;
|
||||
|
||||
$tags[$key]->rank = $rank;
|
||||
}
|
||||
shuffle($tags);
|
||||
}
|
||||
|
||||
return $tags;
|
||||
}
|
||||
}
|
||||
?>
|
||||
612
modules/planet/planet.model.php
Normal file
612
modules/planet/planet.model.php
Normal file
|
|
@ -0,0 +1,612 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetModel
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 Model class
|
||||
**/
|
||||
|
||||
class planetModel extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 플래닛 기본 설정 return
|
||||
**/
|
||||
function getPlanetConfig() {
|
||||
static $config = null;
|
||||
if(is_null($config)) {
|
||||
// module config의 값을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('planet');
|
||||
|
||||
// planet dummy module의 is_default 값을 구함
|
||||
$dummy = $oModuleModel->getModuleInfoByMid($config->mid);
|
||||
$config->is_default = $dummy->is_default;
|
||||
$config->module_srl = $dummy->module_srl;
|
||||
$config->browser_title = $dummy->browser_title;
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 접속 권한 return
|
||||
* 플래닛 서비스 컨텐츠에 대한 접속 권한을 확인
|
||||
**/
|
||||
function isAccessGranted() {
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['access'];
|
||||
if(!$grant || !count($grant)) return true;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
$group_list = $logged_info->group_list;
|
||||
$group_srls = array_keys($group_list);
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 생성 권한 return
|
||||
**/
|
||||
function isCreateGranted() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['create'];
|
||||
if(!$grant || !count($grant)) return true;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
$group_list = $logged_info->group_list;
|
||||
$group_srls = array_keys($group_list);
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 - 플래닛 모듈 전체 관리 권한 return
|
||||
**/
|
||||
function isManageGranted() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['manage'];
|
||||
if(!$grant || !count($grant)) return false;
|
||||
|
||||
$group_list = $logged_info->group_list;
|
||||
$group_srls = array_keys($group_list);
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 회원의 플래닛 정보 얻기
|
||||
* 회원 번호를 입력하지 않으면 현재 로그인 사용자의 플래닛 정보를 구함
|
||||
**/
|
||||
function getMemberPlanet($member_srl = 0) {
|
||||
if(!$member_srl && !Context::get('is_logged')) return new PlanetInfo();
|
||||
|
||||
if(!$member_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
} else {
|
||||
$args->member_srl = $member_srl;
|
||||
}
|
||||
|
||||
$output = executeQuery('planet.getMemberPlanet', $args);
|
||||
if(!$output->toBool() || !$output->data) return new PlanetInfo();
|
||||
|
||||
$planet = $output->data;
|
||||
$output = $this->getSMSUser($planet);
|
||||
|
||||
if(strlen($output->data->phone_number)==10){
|
||||
$planet->phone_number = array(substr($output->data->phone_number,0,3),substr($output->data->phone_number,3,3),substr($output->data->phone_number,6,4));
|
||||
}else if(strlen($output->data->phone_number)== 11){
|
||||
$planet->phone_number = array(substr($output->data->phone_number,0,3),substr($output->data->phone_number,3,4),substr($output->data->phone_number,7,4));
|
||||
}else{
|
||||
$planet->phone_number = array();
|
||||
}
|
||||
|
||||
$oPlanet = new PlanetInfo();
|
||||
$oPlanet->setAttribute($planet);
|
||||
|
||||
return $oPlanet;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 목록 return
|
||||
**/
|
||||
function getPlanetList($list_count=20, $page=1, $sort_index = 'module_srl') {
|
||||
if(!in_array($sort_index, array('module_srl'))) $sort_index = 'module_srl';
|
||||
$args->sort_index = $sort_index;
|
||||
$args->list_count = $list_count;
|
||||
$args->page = $page;
|
||||
$output = executeQueryArray('planet.getPlanetList', $args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$oPlanet = null;
|
||||
$oPlanet = new PlanetInfo();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = null;
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 개별 정보 return
|
||||
**/
|
||||
function getPlanet($module_srl) {
|
||||
return new PlanetInfo($module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 태그 return
|
||||
**/
|
||||
function getPlanetTags($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('planet.getPlanetTag', $args);
|
||||
if(!$output->toBool() || !$output->data) return array();
|
||||
|
||||
$tags = array();
|
||||
foreach($output->data as $key => $val) $tags[] = $val->tag;
|
||||
return $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 회원의 플래닛 생성 개수 return
|
||||
**/
|
||||
function getPlanetCount($member_srl = null) {
|
||||
if(!$member_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
}
|
||||
if(!$member_srl) return null;
|
||||
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('planet.getPlanetCount',$args);
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 최신 업데이트 글 추출
|
||||
* mid : 대상 플래닛, null이면 전체 글 대상
|
||||
* date : 선택된 일자(필수값, 없으면 오늘을 대상으로 함)
|
||||
* page : 페이지 번호
|
||||
* list_count : 추출 대상 수
|
||||
**/
|
||||
function getNewestContentList($mid = null, $date = null, $page=1, $list_count = 10, $sort_index = 'documents.list_order', $order = 'asc',$tag=null) {
|
||||
if(!$page) $page = 1;
|
||||
if(!$date) $date = date("Ymd");
|
||||
|
||||
// 전체 글을 추출 (module='planet'에 대해서 추출해야 하기에 document 모델을 사용하지 않음)
|
||||
if($mid) $args->mid = $mid;
|
||||
$args->date = $date;
|
||||
$args->page = $page;
|
||||
$args->sort_index = $sort_index;
|
||||
$args->order = $order;
|
||||
$args->list_count = $list_count;
|
||||
if($args->sort_index == 'documents.voted_count') $args->voted_count = 1;
|
||||
elseif($args->sort_index == 'documents.comment_count') $args->comment_count = 1;
|
||||
|
||||
if($tag){
|
||||
$args->tag = $tag;
|
||||
$output = executeQueryArray('planet.getPlanetNewestTagSearchContentList', $args);
|
||||
}else{
|
||||
$output = executeQueryArray('planet.getPlanetNewestContentList', $args);
|
||||
}
|
||||
if(!$output->toBool()) return $output;
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
unset($oPlanet);
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메인 추출용 각 플래닛별 최신글 추출
|
||||
**/
|
||||
function getHomeContentList($date, $page, $list_count = 10) {
|
||||
// 즐찾 플래닛 추출
|
||||
$args->date = $date;
|
||||
$args->page = $page?$page:1;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->sort_index = "documents.list_order";
|
||||
|
||||
$output = executeQueryArray('planet.getHomeContentList', $args);
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
$document_indexes = $document_srls = array();
|
||||
foreach($output->data as $key => $val) {
|
||||
$document_srls[] = $val->document_srl;
|
||||
$document_indexes[$val->document_srl] = $key;
|
||||
}
|
||||
|
||||
$content_args->document_srls = implode(',',$document_srls);
|
||||
$content_output = executeQueryArray('planet.getContents', $content_args);
|
||||
if(!$content_output->toBool() || !$content_output->data) return $content_output;
|
||||
|
||||
$output->data = null;
|
||||
foreach($content_output->data as $val) {
|
||||
$oPlanet = null;
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[ $document_indexes[$val->document_srl] ] = $oPlanet;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 태그/글/인물태그 검색 결과 return
|
||||
**/
|
||||
function getSearchResultCount($module_srl, $search_keyword) {
|
||||
$result->tag = 0;
|
||||
$result->content = 0;
|
||||
$result->planetTag = 0;
|
||||
|
||||
if(!$search_keyword) return $result;
|
||||
|
||||
if($module_srl) $args->module_srl = $module_srl;
|
||||
|
||||
$result->tag = $this->getTagSearchResultCount($module_srl, $search_keyword);
|
||||
$result->planetTag = $this->getPlanetTagSearchResultCount($module_srl, $search_keyword);
|
||||
$result->content = $this->getContentSearchResultCount($module_srl, $search_keyword);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
function getTagSearchResultCount($module_srl, $search_keyword) {
|
||||
if(!$search_keyword) return $result;
|
||||
if($module_srl) $args->module_srl = $module_srl;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$output = executeQuery('planet.getTagSearchResult', $args);
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
function getContentSearchResultCount($module_srl, $search_keyword) {
|
||||
if(!$search_keyword) return $result;
|
||||
if($module_srl) $args->module_srl = $module_srl;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->search_keyword = $search_keyword;
|
||||
|
||||
$output = executeQuery('planet.getContentSearchResult', $args);
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
|
||||
function getPlanetTagSearchResultCount($module_srl, $search_keyword) {
|
||||
if(!$search_keyword) return $result;
|
||||
if($module_srl) $args->module_srl = $module_srl;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$output = executeQuery('planet.getPlanetTagSearchResult', $args);
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 태그/글 검색
|
||||
**/
|
||||
function getContentList($module_srl = 0, $search_target = 'tag', $search_keyword = '', $page = 1, $list_count = 10){
|
||||
if($module_srl) {
|
||||
if(is_array($module_srl)) $args->module_srl = implode(',', $module_srl);
|
||||
else $args->module_srl = $module_srl;
|
||||
}
|
||||
|
||||
$args->page = $page?$page:1;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
|
||||
// 검색 옵션 정리
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'content' :
|
||||
$search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_content = $search_keyword;
|
||||
$output = executeQueryArray('planet.getContentList', $args);
|
||||
break;
|
||||
case 'tag' :
|
||||
$args->s_tags = str_replace(' ','%',$search_keyword);
|
||||
$output = executeQueryArray('planet.getContentListSearchTag', $args);
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
$output = executeQueryArray('planet.getContentList', $args);
|
||||
}
|
||||
|
||||
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
$idx = 0;
|
||||
$data = $output->data;
|
||||
unset($output->data);
|
||||
|
||||
if(!isset($virtual_number))
|
||||
{
|
||||
$keys = array_keys($data);
|
||||
$virtual_number = $keys[0];
|
||||
}
|
||||
|
||||
foreach($data as $key => $attribute) {
|
||||
$document_srl = $attribute->document_srl;
|
||||
$oPlanet = null;
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($attribute);
|
||||
if($this->grant->manager) $oPlanet->setGrant();
|
||||
|
||||
$output->data[$virtual_number] = $oPlanet;
|
||||
$virtual_number --;
|
||||
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 태그 검색 return
|
||||
**/
|
||||
function getPlanetTagList($search_keyword, $page, $list_count = 10) {
|
||||
$args->page = $page?$page:1;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_keyword = $search_keyword;
|
||||
|
||||
$output = executeQueryArray('planet.getPlanetTagList', $args);
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
$output->data[$key] = $this->getPlanet($val->module_srl);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @breif 회원 - 즐찾 return
|
||||
**/
|
||||
function getFavoriteContentList($module_srl, $page=1, $list_count =10) {
|
||||
// 즐찾 플래닛 추출
|
||||
$args->module_srl = $module_srl;
|
||||
$args->page = $page?$page:1;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
|
||||
$output = executeQueryArray('planet.getFavoriteContentList', $args);
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
$oPlanet = null;
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$output->data[$key] = $oPlanet;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 즐찾에 추가되어 있는지를 확인
|
||||
**/
|
||||
function isInsertedFavorite($module_srl, $reg_planet_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->reg_planet_srl = $reg_planet_srl;
|
||||
$output = executeQuery('planet.getMyFavorite', $args);
|
||||
if($output->data->count>0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 메모 목록 return
|
||||
**/
|
||||
function getMemoList($module_srl, $page=1) {
|
||||
if(!$module_srl) return;
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->page = $page;
|
||||
return executeQueryArray('planet.getPlanetMemoList', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메모 목록 html return action
|
||||
**/
|
||||
function getPlanetMemoList() {
|
||||
$target_module_srl = Context::get('target_module_srl');
|
||||
if(!$target_module_srl) return;
|
||||
$page = Context::get('page');
|
||||
|
||||
Context::set('planet', $this->getPlanet($target_module_srl));
|
||||
Context::set('myplanet', $this->getMemberPlanet());
|
||||
|
||||
$this->add('tpl', $this->getMemoHtml($target_module_srl, $page));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메모 목록 html 생성
|
||||
**/
|
||||
function getMemoHtml($module_srl, $page=1) {
|
||||
// 메모 목록을 구함
|
||||
$output = $this->getMemoList($module_srl, $page);
|
||||
Context::set('memo_list', $output->data);
|
||||
Context::set('memo_navigation', $output->page_navigation);
|
||||
|
||||
$planet = $this->getPlanet($module_srl);
|
||||
$logged_info = Context::get('logged_info');
|
||||
Context::set('myplanet', $this->getMemberPlanet());
|
||||
Context::set('planet', $planet);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($template_path, 'memo_list');
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관심태그 html 목록 return
|
||||
**/
|
||||
function getInterestTagsHtml($module_srl) {
|
||||
$interest_tags = $this->getInterestTags($module_srl);
|
||||
Context::set('interest_tags', $interest_tags);
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$planet = $this->getPlanet($module_srl);
|
||||
Context::set('planet', $planet);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($template_path, 'interest_tags');
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 플래닛 이미지 경로 return
|
||||
**/
|
||||
function getPlanetPhotoPath($module_srl) {
|
||||
return sprintf('files/attach/images/%d/%s', $module_srl, getNumberingPath($module_srl, 3));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 이미지 유무 체크후 경로 return
|
||||
**/
|
||||
function getPlanetPhotoSrc($module_srl) {
|
||||
$path = $this->getPlanetPhotoPath($module_srl);
|
||||
if(!is_dir($path)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif');
|
||||
$filename = sprintf('%s/%d.jpg', $path, $module_srl);
|
||||
if(!file_exists($filename)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif');
|
||||
return Context::getRequestUri().$filename."?rnd=".filemtime($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관심태그 가져오기
|
||||
**/
|
||||
function getInterestTags($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('planet.getInterestTags', $args);
|
||||
if(!$output->toBool()||!$output->data) return array();
|
||||
|
||||
$result = array();
|
||||
foreach($output->data as $key => $val) $result[] = $val->tag;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 댓글 목록 return
|
||||
**/
|
||||
function getReplyList($document_srl, $page=1) {
|
||||
if(!$document_srl) return;
|
||||
|
||||
// 해당 문서의 모듈에 해당하는 댓글 수를 구함
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 문서가 존재하지 않으면 return~
|
||||
if(!$oDocument->isExists()) return;
|
||||
|
||||
// 정해진 수에 따라 목록을 구해옴
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('planet.getPlanetComments', $args);
|
||||
if($output->data) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$output->data[$key]->content = preg_replace('/"([^"]*)":(http|ftp|https|mms)([^ ]+)/is','<a href="$2$3" onclick="window.open(this.href);return false;">$1</a>$4', $val->content);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($oDocument->get('member_srl')==$logged_info->member_srl) {
|
||||
$args->module_srl = $oDocument->get('module_srl');
|
||||
$args->document_srl = $oDocument->get('document_srl');
|
||||
executeQuery('planet.deleteCatch', $args);
|
||||
}
|
||||
|
||||
// 쿼리 결과에서 오류가 생기면 그냥 return
|
||||
if(!$output->toBool()) return;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 목록 html return action
|
||||
**/
|
||||
function getPlanetReplyList() {
|
||||
$document_srl = Context::get('document_srl');
|
||||
if(!$document_srl) return;
|
||||
$page = Context::get('page');
|
||||
|
||||
Context::set('planet', $this->getPlanet($document_srl));
|
||||
Context::set('myplanet', $this->getMemberPlanet());
|
||||
|
||||
$this->add('document_srl',$document_srl);
|
||||
$this->add('tpl', $this->getReplyHtml($document_srl));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 목록 html 생성
|
||||
**/
|
||||
function getReplyHtml($document_srl, $page=1) {
|
||||
// 메모 목록을 구함
|
||||
$output = $this->getReplyList($document_srl);
|
||||
Context::set('reply_list', $output->data);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($template_path, 'reply_list');
|
||||
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief SMS가 등록된 사용자를 가져온다
|
||||
* $args->phone_number 또는 $args->member_srl
|
||||
**/
|
||||
function getSMSUser($args){
|
||||
$output = executeQuery('planet.getSMSUser',$args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function getSMSRecv($phone_number){
|
||||
$args->phone_number = $phone_number;
|
||||
$output = executeQueryArray('planet.getSMSRecv',$args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
344
modules/planet/planet.view.php
Normal file
344
modules/planet/planet.view.php
Normal file
|
|
@ -0,0 +1,344 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetView
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 View class
|
||||
**/
|
||||
|
||||
class planetView extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
/**
|
||||
* @brief 플래닛 모듈의 기본 설정은 view에서는 언제든지 사용하도록 load하여 Context setting
|
||||
**/
|
||||
$oPlanetModel = &getModel('planet');
|
||||
Context::set('config',$this->config = $oPlanetModel->getPlanetConfig());
|
||||
|
||||
/**
|
||||
* 스킨이 없으면 플래닛 기본 설정의 스킨으로 설정
|
||||
**/
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $this->config->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
/**
|
||||
* myplanet(접속자 플래닛), planet(접속된 페이지의 플래닛)을 Context setting 하여 모든 곳에서 사용
|
||||
**/
|
||||
// myplanet 을 무조건 Context::set(), $myplanet->isExists()에 따라서 나의 플래닛 유무 확인
|
||||
Context::set('myplanet', $this->myplanet = $oPlanetModel->getMemberPlanet());
|
||||
|
||||
// 현재 mid의 플래닛을 세팅 (홈이건 개별 플래닛이건 모두 $planet 로 판별 가능, PlanetInfo::isHome() 참고
|
||||
Context::set('planet', $this->planet = $oPlanetModel->getPlanet($this->module_srl));
|
||||
|
||||
// 메인 페이지 일 경우 특정 액션이 아니라면 무조건 메인 화면 뿌려줌
|
||||
if($this->planet->isHome() && !in_array($this->act, array('dispPlanetCreate','dispPlanetLogin','dispPlanetTagSearch','dispPlanetContentSearch','dispPlanetContentTagSearch')) ) {
|
||||
Context::set('act',$this->act = 'dispPlanetHome');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 로그인
|
||||
**/
|
||||
function dispPlanetLogin(){
|
||||
$this->setTemplateFile('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 플래닛 생성
|
||||
**/
|
||||
function dispPlanetCreate() {
|
||||
if(!Context::get('is_logged')) return $this->dispPlanetMessage("msg_not_logged");
|
||||
if(!$this->grant->create) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
if($this->myplanet->isExists()) return $this->dispPlanetMessage("msg_planet_exists");
|
||||
|
||||
$this->setTemplateFile('create');
|
||||
}
|
||||
|
||||
/**
|
||||
* @biref 플래닛 메인 페이지
|
||||
**/
|
||||
function dispPlanetHome() {
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
// 플래닛의 기본 단위인 날짜를 미리 계산 (지정된 일자의 이전/다음날도 미리 계산하여 세팅)
|
||||
$last_date = $this->planet->getContentLastDay();
|
||||
$date = Context::get('date');
|
||||
if(!$date || $date > $last_date) $date = $last_date;
|
||||
Context::set('date', $date);
|
||||
Context::set('prev_date', date("Ymd",ztime($date)-60*60*24));
|
||||
Context::set('next_date', date("Ymd",ztime($date)+60*60*24));
|
||||
|
||||
|
||||
// 초기화면에서 tagtab이 나오기 위해 set type 한다
|
||||
$type = Context::get('type');
|
||||
if(!$type){
|
||||
if(is_array($this->config->tagtab) && $this->config->tagtab[0]){
|
||||
$type = 'tagtab';
|
||||
Context::set('type',$type);
|
||||
Context::set('tagtab',$this->config->tagtab[0]);
|
||||
}else{
|
||||
$type = 'all';
|
||||
Context::set('type',$type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tagtab = null;
|
||||
if($type == 'tagtab'){
|
||||
$tagtab = Context::get('tagtab');
|
||||
$page = Context::get('page');
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$sort_index = 'documents.list_order';
|
||||
$order = 'asc';
|
||||
}else{
|
||||
switch($type) {
|
||||
case 'wantyou':
|
||||
$sort_index = 'documents.voted_count';
|
||||
$order = 'desc';
|
||||
break;
|
||||
case 'best':
|
||||
$sort_index = 'documents.comment_count';
|
||||
$order = 'desc';
|
||||
break;
|
||||
|
||||
case 'all':
|
||||
$sort_index = 'documents.list_order';
|
||||
$order = 'asc';
|
||||
break;
|
||||
}
|
||||
|
||||
$page = Context::get('page');
|
||||
$oPlanetModel = &getModel('planet');
|
||||
}
|
||||
|
||||
$output = $oPlanetModel->getNewestContentList(null, $date, $page, 10, $sort_index, $order,$tagtab );
|
||||
Context::set('content_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$args->date = $date;
|
||||
$output = executeQuery('planet.getTotalContents', $args);
|
||||
Context::set('total_content', $output->data->count);
|
||||
|
||||
$args->voted_count = 1;
|
||||
$output = executeQuery('planet.getTotalContents', $args);
|
||||
Context::set('total_wantyou', $output->data->count);
|
||||
|
||||
unset($args->voted_count);
|
||||
$args->comment_count = 1;
|
||||
$output = executeQuery('planet.getTotalContents', $args);
|
||||
Context::set('total_best', $output->data->count);
|
||||
|
||||
|
||||
// tagtab을 만든다
|
||||
if(is_array($this->config->tagtab) && $this->config->tagtab[0]){
|
||||
$tagtab_list = array();
|
||||
foreach($this->config->tagtab as $key => $val){
|
||||
$args->tag = $val;
|
||||
$output = executeQuery('planet.getTotalTagSearchContents', $args);
|
||||
$tagtab_list[$val] = $output->data->count;
|
||||
}
|
||||
Context::set('tagtab_list', $tagtab_list);
|
||||
}
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('main');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 개별 플래닛
|
||||
**/
|
||||
function dispPlanet(){
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
|
||||
// 플래닛의 기본 단위인 날짜를 미리 계산 (지정된 일자의 이전/다음날도 미리 계산하여 세팅)
|
||||
$last_date = $this->planet->getContentLastDay();
|
||||
$date = Context::get('date');
|
||||
if(!$date || $date > $last_date) $date = $last_date;
|
||||
Context::set('date', $date);
|
||||
Context::set('prev_date', date("Ymd",ztime($date)-60*60*24));
|
||||
Context::set('next_date', date("Ymd",ztime($date)+60*60*24));
|
||||
|
||||
// 최신 업데이트 글 추출
|
||||
$page = Context::get('page');
|
||||
|
||||
$type = Context::get('type');
|
||||
switch($type) {
|
||||
case 'catch':
|
||||
$output = $this->planet->getCatchContentList($page);
|
||||
break;
|
||||
case 'interest':
|
||||
$output = $this->planet->getInterestTagContentList($date, $page);
|
||||
break;
|
||||
default :
|
||||
$sort_index = 'documents.list_order';
|
||||
$order = 'asc';
|
||||
$output = $this->planet->getNewestContentList($date, $page, 10,$sort_index,$order);
|
||||
break;
|
||||
}
|
||||
Context::set('content_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 오늘의 전체 글 수
|
||||
$args->date = $date;
|
||||
$args->module_srl = $this->planet->getModuleSrl();
|
||||
$output = executeQuery('planet.getTotalContents', $args);
|
||||
Context::set('total_content', $output->data->count);
|
||||
|
||||
// 낚은 글 수
|
||||
$output = executeQuery('planet.getCatchContentCount', $args);
|
||||
Context::set('total_catch', $output->data->count);
|
||||
|
||||
// 플래닛의 메모 가져오기
|
||||
$memo_output = $oPlanetModel->getMemoList($this->module_srl);
|
||||
Context::set('memo_list', $memo_output->data);
|
||||
Context::set('memo_navigation', $memo_output->page_navigation);
|
||||
|
||||
// 플래닛의 관심태그 가져오기
|
||||
$interest_tags = $oPlanetModel->getInterestTags($this->module_srl);
|
||||
Context::set('interest_tags', $interest_tags);
|
||||
|
||||
// 브라우저 타이틀 변경
|
||||
Context::setBrowserTitle($this->planet->getPlanetTitle().' - '.$this->planet->getBrowserTitle());
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('myPlanet');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 즐겨찾기 보기
|
||||
**/
|
||||
function favorite() {
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
|
||||
// 개별 플래닛의 정보를 세팅
|
||||
$planet = $oPlanetModel->getPlanet($this->module_srl);
|
||||
Context::set('planet', $planet);
|
||||
|
||||
// 내플래닛인지 아닌지
|
||||
$logged_info = Context::get('logged_info');
|
||||
Context::set('isMyPlanet', $planet->getMemberSrl() == $logged_info->member_srl);
|
||||
|
||||
// 플래닛의 메모 가져오기
|
||||
$memo_output = $oPlanetModel->getMemoList($this->module_srl);
|
||||
Context::set('memo_list', $memo_output->data);
|
||||
Context::set('memo_navigation', $memo_output->page_navigation);
|
||||
|
||||
// 플래닛의 관심태그 가져오기
|
||||
$interest_tags = $oPlanetModel->getInterestTags($this->module_srl);
|
||||
Context::set('interest_tags', $interest_tags);
|
||||
|
||||
// 브라우저 타이틀 변경
|
||||
Context::setBrowserTitle($planet->getPlanetTitle().' - '.$planet->getBrowserTitle());
|
||||
|
||||
// 내 플래닛이 아닐 경우 즐찾에 포함되어 있는 대상인지 확인
|
||||
$myplanet = Context::get('myplanet');
|
||||
if(Context::get('isMyPlanet') || $oPlanetModel->isInsertedFavorite($myplanet->module_srl, $this->module_srl)) {
|
||||
Context::set('myFavoritePlanet',true);
|
||||
} else {
|
||||
Context::set('myFavoritePlanet',false);
|
||||
}
|
||||
|
||||
// 즐찾 가져오기
|
||||
$page = Context::get('page');
|
||||
$output = $oPlanetModel->getFavoriteContentList($this->module_srl, $page, 10);
|
||||
Context::set('content_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('favorite');
|
||||
}
|
||||
|
||||
function dispPlanetContentTagSearch(){
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
$keyword = urldecode(Context::get('keyword'));
|
||||
$page = Context::get('page');
|
||||
if(!$this->planet->isHome()) $module_srl = $this->module_srl;
|
||||
else $module_srl = null;
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
Context::set('search_result', $oPlanetModel->getSearchResultCount($module_srl, $keyword));
|
||||
|
||||
if($keyword) {
|
||||
$output = $oPlanetModel->getContentList($module_srl,'tag',$keyword, $page, 10);
|
||||
Context::set('content_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
}
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('search');
|
||||
}
|
||||
|
||||
function dispPlanetContentSearch(){
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
$keyword = urldecode(Context::get('keyword'));
|
||||
$page = Context::get('page');
|
||||
if(!$this->planet->isHome()) $module_srl = $this->module_srl;
|
||||
else $module_srl = null;
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
|
||||
Context::set('search_result', $oPlanetModel->getSearchResultCount($module_srl, $keyword));
|
||||
|
||||
if($keyword) {
|
||||
$output = $oPlanetModel->getContentList($module_srl,'content',$keyword, $page, 10);
|
||||
Context::set('content_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
}
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('search');
|
||||
}
|
||||
|
||||
function dispPlanetTagSearch(){
|
||||
if(!$this->grant->access) return $this->dispPlanetMessage("msg_not_permitted");
|
||||
|
||||
$keyword = urldecode(Context::get('keyword'));
|
||||
$page = Context::get('page');
|
||||
if(!$this->planet->isHome()) $module_srl = $this->module_srl;
|
||||
else $module_srl = null;
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
|
||||
Context::set('search_result', $oPlanetModel->getSearchResultCount($module_srl, $keyword));
|
||||
|
||||
if($keyword) {
|
||||
$output = $oPlanetModel->getPlanetTagList($keyword, $page, 10);
|
||||
Context::set('planet_list', $output->data);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
}
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('search_planet');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
9
modules/planet/queries/deleteCatch.xml
Normal file
9
modules/planet/queries/deleteCatch.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deleteCatch" action="delete">
|
||||
<tables>
|
||||
<table name="planet_catch" alias="modules" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deleteInterestTag.xml
Normal file
9
modules/planet/queries/deleteInterestTag.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deleteInterestTag" action="delete">
|
||||
<tables>
|
||||
<table name="planet_interest_tags" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="tag" var="tag" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deletePlanet.xml
Normal file
8
modules/planet/queries/deletePlanet.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deletePlanet" action="delete">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deletePlanetFavorite.xml
Normal file
9
modules/planet/queries/deletePlanetFavorite.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deletePlanetFavorite" action="delete">
|
||||
<tables>
|
||||
<table name="planet_favorite" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_favorite_srl" var="planet_favorite_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deletePlanetFavorites.xml
Normal file
9
modules/planet/queries/deletePlanetFavorites.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deletePlanetFavorites" action="delete">
|
||||
<tables>
|
||||
<table name="planet_favorite" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="reg_planet_srl" var="module_srl" filter="number" notnull="notnull" pipe="or"/>
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deletePlanetMemo.xml
Normal file
8
modules/planet/queries/deletePlanetMemo.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deletePlanetMemo" action="delete">
|
||||
<tables>
|
||||
<table name="planet_memo" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_memo_srl" var="planet_memo_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deletePlanetMemos.xml
Normal file
9
modules/planet/queries/deletePlanetMemos.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deletePlanetMemos" action="delete">
|
||||
<tables>
|
||||
<table name="planet_memo" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srel" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="write_planet_srl" var="module_srl" filter="number" notnull="notnull" pipe="or" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deletePlanetReply.xml
Normal file
9
modules/planet/queries/deletePlanetReply.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deletePlanetReply" action="delete">
|
||||
<tables>
|
||||
<table name="planet_reply" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_reply_srl" var="planet_reply_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="write_planet_srl" var="write_planet_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/planet/queries/deletePlanetTag.xml
Normal file
9
modules/planet/queries/deletePlanetTag.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deletePlanetTag" action="delete">
|
||||
<tables>
|
||||
<table name="planet_tags" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="tag" var="tag" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deletePlanetTags.xml
Normal file
8
modules/planet/queries/deletePlanetTags.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deletePlanetTags" action="delete">
|
||||
<tables>
|
||||
<table name="planet_tags" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deletePlanetVoteLogs.xml
Normal file
8
modules/planet/queries/deletePlanetVoteLogs.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deletePlanetVoteLogs" action="delete">
|
||||
<tables>
|
||||
<table name="planet_content_vote_log" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deleteSMSRecv.xml
Normal file
8
modules/planet/queries/deleteSMSRecv.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteSMSRecv" action="delete">
|
||||
<tables>
|
||||
<table name="planet_sms_recv" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="phone_number" var="phone_number" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/planet/queries/deleteSMSUser.xml
Normal file
8
modules/planet/queries/deleteSMSUser.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteSMSUser" action="delete">
|
||||
<tables>
|
||||
<table name="planet_sms_user" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/getCatch.xml
Normal file
12
modules/planet/queries/getCatch.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getCatch" action="select">
|
||||
<tables>
|
||||
<table name="planet_catch" alias="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/getCatchContentCount.xml
Normal file
12
modules/planet/queries/getCatchContentCount.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getTotalContents" action="select">
|
||||
<tables>
|
||||
<table name="planet_catch" alias="planet_catch" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
||||
36
modules/planet/queries/getCatchContentList.xml
Normal file
36
modules/planet/queries/getCatchContentList.xml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<query id="getCatchContentList" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet_catch" alias="planet_catch" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet_catch.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
<column name="member.user_id" alias="user_id" />
|
||||
<column name="member.user_name" alias="user_name" />
|
||||
<column name="member.member_srl" alias="member_srl" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.extra_vars20" alias="postscript" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_catch.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="planet_catch.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.document_srl" default="planet_catch.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="planet_catch.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
39
modules/planet/queries/getContentList.xml
Normal file
39
modules/planet/queries/getContentList.xml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<query id="getContentList" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
<column name="member.user_id" alias="user_id" />
|
||||
<column name="member.user_name" alias="user_name" />
|
||||
<column name="member.member_srl" alias="member_srl" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.extra_vars20" alias="postscript" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="documents.content" var="s_content" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
40
modules/planet/queries/getContentListSearchTag.xml
Normal file
40
modules/planet/queries/getContentListSearchTag.xml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<query id="getContentListSearchTag" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="member" alias="member" />
|
||||
<table name="tags" alias="tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
<column name="member.user_id" alias="user_id" />
|
||||
<column name="member.user_name" alias="user_name" />
|
||||
<column name="member.member_srl" alias="member_srl" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.extra_vars20" alias="postscript" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.document_srl" default="documents.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.tag" var="s_tags" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
17
modules/planet/queries/getContentSearchResult.xml
Normal file
17
modules/planet/queries/getContentSearchResult.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<query id="getTagSearchResult" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="like" column="documents.content" var="search_keyword" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
||||
37
modules/planet/queries/getContents.xml
Normal file
37
modules/planet/queries/getContents.xml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<query id="getContents" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
<column name="member.user_id" alias="user_id" />
|
||||
<column name="member.user_name" alias="user_name" />
|
||||
<column name="member.member_srl" alias="member_srl" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.extra_vars20" alias="postscript" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="in" column="documents.document_srl" var="document_srls" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="documents.content" var="s_content" pipe="or" />
|
||||
<condition operation="like" column="documents.tags" var="s_tags" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
21
modules/planet/queries/getFavoriteContentList.xml
Normal file
21
modules/planet/queries/getFavoriteContentList.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<query id="getContentList" action="select">
|
||||
<tables>
|
||||
<table name="planet_favorite" alias="planet_favorite" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="documents.*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_favorite.module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="equal" column="planet.module_srl" default="planet_favorite.reg_planet_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.document_srl" default="planet.latest_document_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
31
modules/planet/queries/getFavorites.xml
Normal file
31
modules/planet/queries/getFavorites.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<query id="getPlanetList" action="select">
|
||||
<tables>
|
||||
<table name="planet_favorite" alias="favorite" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.*" />
|
||||
<column name="planet.member_srl" alias="member_srl" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="planet.planet_title" alias="planet_title" />
|
||||
<column name="planet.close_notice" alias="close_notice" />
|
||||
<column name="planet.colorset" alias="colorset" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="member.user_name" />
|
||||
<column name="member.user_id" />
|
||||
<column name="planet.me2day_uid" />
|
||||
<column name="planet.me2day_ukey" />
|
||||
<column name="planet.me2day_autopush" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="favorite.module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="modules.module_srl" default="favorite.reg_planet_srl" pipe="and" />
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="planet.member_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="favorite.planet_favorite_srl" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
22
modules/planet/queries/getHomeContentList.xml
Normal file
22
modules/planet/queries/getHomeContentList.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<query id="getContentList" action="select">
|
||||
<tables>
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" default="documents.module_srl" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
<groups>
|
||||
<group column="documents.module_srl" />
|
||||
</groups>
|
||||
</query>
|
||||
41
modules/planet/queries/getInterestTagContentList.xml
Normal file
41
modules/planet/queries/getInterestTagContentList.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<query id="getInterestTagContentList" action="select">
|
||||
<tables>
|
||||
<table name="planet_interest_tags" alias="planet_interest_tags" />
|
||||
<table name="tags" alias="tags" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
<column name="member.user_id" alias="user_id" />
|
||||
<column name="member.user_name" alias="user_name" />
|
||||
<column name="documents.module_srl" alias="module_srl" />
|
||||
<column name="documents.member_srl" alias="member_srl" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.extra_vars20" alias="postscript" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_interest_tags.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="tags.tag" default="planet_interest_tags.tag" pipe="and" />
|
||||
<condition operation="equal" column="documents.document_srl" default="tags.document_srl" pipe="and" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
<groups>
|
||||
<group column="documents.document_srl" />
|
||||
</groups>
|
||||
</query>
|
||||
11
modules/planet/queries/getInterestTags.xml
Normal file
11
modules/planet/queries/getInterestTags.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getInterestTags" action="select">
|
||||
<tables>
|
||||
<table name="planet_interest_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
</conditions>
|
||||
</query>
|
||||
25
modules/planet/queries/getMemberPlanet.xml
Normal file
25
modules/planet/queries/getMemberPlanet.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<query id="getMemberPlanet" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.*" />
|
||||
<column name="planet.member_srl" alias="member_srl" />
|
||||
<column name="planet.planet_title" alias="planet_title" />
|
||||
<column name="planet.close_notice" alias="close_notice" />
|
||||
<column name="planet.colorset" alias="colorset" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="member.user_name" />
|
||||
<column name="member.user_id" />
|
||||
<column name="planet.me2day_uid" />
|
||||
<column name="planet.me2day_ukey" />
|
||||
<column name="planet.me2day_autopush" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="planet.member_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/getMyFavorite.xml
Normal file
12
modules/planet/queries/getMyFavorite.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getMyFavorite" action="select">
|
||||
<tables>
|
||||
<table name="planet_favorite" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="reg_planet_srl" var="reg_planet_srl" notnull="notnull" filter="number" pipe="and"/>
|
||||
</conditions>
|
||||
</query>
|
||||
25
modules/planet/queries/getPlanet.xml
Normal file
25
modules/planet/queries/getPlanet.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<query id="getPlanet" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.*" />
|
||||
<column name="planet.member_srl" alias="member_srl" />
|
||||
<column name="planet.planet_title" alias="planet_title" />
|
||||
<column name="planet.close_notice" alias="close_notice" />
|
||||
<column name="planet.colorset" alias="colorset" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="member.user_name" />
|
||||
<column name="member.user_id" />
|
||||
<column name="planet.me2day_uid" />
|
||||
<column name="planet.me2day_ukey" />
|
||||
<column name="planet.me2day_autopush" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="planet.member_srl" default="member.member_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
19
modules/planet/queries/getPlanetComments.xml
Normal file
19
modules/planet/queries/getPlanetComments.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<query id="getPlanetComments" action="select">
|
||||
<tables>
|
||||
<table name="comments" alias="comments" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="modules" alias="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="comments.*" />
|
||||
<column name="modules.mid" alias="mid" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comments.document_srl" var="document_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="planet.member_srl" default="comments.member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="comments.comment_srl" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
14
modules/planet/queries/getPlanetContentLastDay.xml
Normal file
14
modules/planet/queries/getPlanetContentLastDay.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getPlanetContentLastDay" action="select">
|
||||
<tables>
|
||||
<table name="modules"/>
|
||||
<table name="documents"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="max(documents.regdate)" alias="last_date" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module" default="planet" />
|
||||
<condition operation="equal" column="modules.module_srl" var="module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="modules.module_srl" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
18
modules/planet/queries/getPlanetContentSearch.xml
Normal file
18
modules/planet/queries/getPlanetContentSearch.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<query id="getPlanetContentSearch" action="select">
|
||||
<tables>
|
||||
<table name="planet_content"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="like" column="content" var="search_text" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="module_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
12
modules/planet/queries/getPlanetContentSearchCount.xml
Normal file
12
modules/planet/queries/getPlanetContentSearchCount.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getPlanetTagSearchCount" action="select">
|
||||
<tables>
|
||||
<table name="planet_content"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="cnt" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" />
|
||||
<condition operation="like" column="content" var="search_text" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
16
modules/planet/queries/getPlanetContents.xml
Normal file
16
modules/planet/queries/getPlanetContents.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<query id="getPlanetContents" action="select">
|
||||
<tables>
|
||||
<table name="documents"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="more" column="regdate" var="start_date" pipe="and" />
|
||||
<condition operation="less" column="regdate" var="end_date" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/planet/queries/getPlanetCount.xml
Normal file
11
modules/planet/queries/getPlanetCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPlanetCount" action="select">
|
||||
<tables>
|
||||
<table name="planet" alias="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
30
modules/planet/queries/getPlanetList.xml
Normal file
30
modules/planet/queries/getPlanetList.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<query id="getPlanetList" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.*" />
|
||||
<column name="planet.member_srl" alias="member_srl" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="modules.*" />
|
||||
<column name="planet.member_srl" alias="member_srl" />
|
||||
<column name="planet.planet_title" alias="planet_title" />
|
||||
<column name="planet.close_notice" alias="close_notice" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="member.user_name" />
|
||||
<column name="member.user_id" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module" default="planet" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="planet.member_srl" default="member.member_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="modules.module_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/planet/queries/getPlanetMemo.xml
Normal file
11
modules/planet/queries/getPlanetMemo.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPlanetMemo" action="select">
|
||||
<tables>
|
||||
<table name="planet_memo" alias="planet_memo" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_memo_srl" var="planet_memo_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
25
modules/planet/queries/getPlanetMemoList.xml
Normal file
25
modules/planet/queries/getPlanetMemoList.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<query id="getPlanetMemoList" action="select">
|
||||
<tables>
|
||||
<table name="planet_memo" alias="planet_memo" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_memo.*" />
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="member.nick_name" alias="nick_name" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_memo.module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet_memo.write_planet_srl" pipe="and" />
|
||||
<condition operation="equal" column="planet.module_srl" default="planet_memo.write_planet_srl" pipe="and" />
|
||||
<condition operation="equal" column="member.member_srl" default="planet.member_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="planet_memo.planet_memo_srl" order="desc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
35
modules/planet/queries/getPlanetNewestContentList.xml
Normal file
35
modules/planet/queries/getPlanetNewestContentList.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<query id="getPlanetNewestContentList" action="select">
|
||||
<tables>
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="member" alias="member" />
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.mid" var="mid" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="modules.module_srl" pipe="and"/>
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
<condition operation="excess" column="documents.voted_count" var="voted_count" pipe="and" />
|
||||
<condition operation="excess" column="documents.comment_count" var="comment_count" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="order" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<query id="getPlanetNewestTagSearchContentList" action="select">
|
||||
<tables>
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="member" alias="member" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="tags" alias="tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="modules.mid" alias="mid" />
|
||||
<column name="planet.module_srl" alias="module_srl" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="documents.document_srl" alias="document_srl" />
|
||||
<column name="documents.content" alias="content" />
|
||||
<column name="documents.extra_vars20" alias="extra_vars20" />
|
||||
<column name="documents.comment_count" alias="comment_count" />
|
||||
<column name="documents.voted_count" alias="voted_count" />
|
||||
<column name="documents.tags" alias="tags" />
|
||||
<column name="documents.regdate" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.mid" var="mid" />
|
||||
<condition operation="equal" column="modules.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="modules.module_srl" pipe="and"/>
|
||||
<condition operation="equal" column="member.member_srl" default="documents.member_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.document_srl" default="documents.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.tag" var="tag" pipe="and" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="order" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
23
modules/planet/queries/getPlanetPopularTags.xml
Normal file
23
modules/planet/queries/getPlanetPopularTags.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<query id="getPlanetPopularTags" action="select">
|
||||
<tables>
|
||||
<table name="tags" />
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="tags.tag" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.mid" var="mid" />
|
||||
<condition operation="equal" column="modules.module" default="planet" pipe="and" />
|
||||
<condition operation="equal" column="tags.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="more" column="tags.regdate" var="date" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="count" default="count" order="desc" />
|
||||
<list_count var="list_count" default="100" />
|
||||
</navigation>
|
||||
<groups>
|
||||
<group column="tags.tag" />
|
||||
</groups>
|
||||
</query>
|
||||
14
modules/planet/queries/getPlanetReply.xml
Normal file
14
modules/planet/queries/getPlanetReply.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getPlanetReply" action="select">
|
||||
<tables>
|
||||
<table name="planet_reply"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_content_srl" var="planet_content_srl" filter="number" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="planet_reply_srl" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
0
modules/planet/queries/getPlanetReplyList.xml
Normal file
0
modules/planet/queries/getPlanetReplyList.xml
Normal file
14
modules/planet/queries/getPlanetTag.xml
Normal file
14
modules/planet/queries/getPlanetTag.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getPlanetTag" action="select">
|
||||
<tables>
|
||||
<table name="planet_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="tag" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
19
modules/planet/queries/getPlanetTagList.xml
Normal file
19
modules/planet/queries/getPlanetTagList.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<query id="getPlanetTagList" action="select">
|
||||
<tables>
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="planet_tags" alias="planet_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet.*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" default="planet_tags.module_srl" />
|
||||
<condition operation="equal" column="planet_tags.tag" var="search_keyword" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="planet.module_srl" order="desc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
14
modules/planet/queries/getPlanetTagSearchCount.xml
Normal file
14
modules/planet/queries/getPlanetTagSearchCount.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getPlanetTagSearchCount" action="select">
|
||||
<tables>
|
||||
<table name="planet_tag" alias="planet_tag" />
|
||||
<table name="planet_tag_text" alias="planet_tag_text" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(planet_tag_text_srl)" alias="PlanetTagCount" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_tag.module_srl" var="module_srl" />
|
||||
<condition operation="equal" column="planet_tag.tag_type" var="tag_type" default="P" pipe="and" />
|
||||
<condition operation="equal" column="planet_tag_text" var="search_text" filter="string" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/getPlanetTagSearchResult.xml
Normal file
12
modules/planet/queries/getPlanetTagSearchResult.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getTagSearchResult" action="select">
|
||||
<tables>
|
||||
<table name="planet_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="tag" var="search_keyword" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
||||
11
modules/planet/queries/getPlanetTagTextCount.xml
Normal file
11
modules/planet/queries/getPlanetTagTextCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPlanetTagTextCount" action="select">
|
||||
<tables>
|
||||
<table name="planet_tag_text"/>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="cnt" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="tag_text" var="tag_text" />
|
||||
</conditions>
|
||||
</query>
|
||||
15
modules/planet/queries/getSMSRecv.xml
Normal file
15
modules/planet/queries/getSMSRecv.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="getSMSRecv" action="select">
|
||||
<tables>
|
||||
<table name="planet_sms_recv" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="message" />
|
||||
<column name="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="phone_number" var="phone_number" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
14
modules/planet/queries/getSMSUser.xml
Normal file
14
modules/planet/queries/getSMSUser.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getSMSUser" action="select">
|
||||
<tables>
|
||||
<table name="planet_sms_user" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="phone_number" />
|
||||
<column name="module_srl" />
|
||||
<column name="member_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="phone_number" var="phone_number" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" pipe="or" />
|
||||
</conditions>
|
||||
</query>
|
||||
20
modules/planet/queries/getTagSearchResult.xml
Normal file
20
modules/planet/queries/getTagSearchResult.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getTagSearchResult" action="select">
|
||||
<tables>
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="planet" alias="planet" />
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="tags" alias="tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet.module_srl" var="module_srl" filter="numbers" />
|
||||
<condition operation="equal" column="tags.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.document_srl" default="documents.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="planet.module_srl" default="modules.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="documents.module_srl" default="planet.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.tag" var="search_keyword" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
||||
17
modules/planet/queries/getTotalContents.xml
Normal file
17
modules/planet/queries/getTotalContents.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<query id="getTotalContents" action="select">
|
||||
<tables>
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="modules" alias="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module" default="planet" />
|
||||
<condition operation="equal" column="modules.module_srl" var="module_srl" pipe="and"/>
|
||||
<condition operation="equal" column="modules.module_srl" default="documents.module_srl" pipe="and" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
<condition operation="excess" column="documents.voted_count" var="voted_count" pipe="and" />
|
||||
<condition operation="excess" column="documents.comment_count" var="comment_count" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
18
modules/planet/queries/getTotalTagSearchContents.xml
Normal file
18
modules/planet/queries/getTotalTagSearchContents.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<query id="getTotalTagSearchContents" action="select">
|
||||
<tables>
|
||||
<table name="documents" alias="documents" />
|
||||
<table name="modules" alias="modules" />
|
||||
<table name="tags" alias="tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module" default="planet" />
|
||||
<condition operation="equal" column="modules.module_srl" var="module_srl" pipe="and"/>
|
||||
<condition operation="equal" column="modules.module_srl" default="documents.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.document_srl" default="documents.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="tags.tag" var="tag" pipe="and" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="date" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/planet/queries/insertCatch.xml
Normal file
11
modules/planet/queries/insertCatch.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="insertCatch" action="insert">
|
||||
<tables>
|
||||
<table name="planet_catch" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" notnull="notnull" />
|
||||
<column name="document_srl" var="document_srl" notnull="notnull" />
|
||||
<column name="list_order" var="list_order" notnull="notnull" />
|
||||
<column name="regdate" default="curdate()" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
9
modules/planet/queries/insertInterestTag.xml
Normal file
9
modules/planet/queries/insertInterestTag.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="insertInterestTag" action="insert">
|
||||
<tables>
|
||||
<table name="planet_interest_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="tag" var="tag" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
12
modules/planet/queries/insertPlanet.xml
Normal file
12
modules/planet/queries/insertPlanet.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="insertPlanet" action="insert">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
<column name="planet_title" var="planet_title" />
|
||||
<column name="close_notice" var="close_notice" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
14
modules/planet/queries/insertPlanetContent.xml
Normal file
14
modules/planet/queries/insertPlanetContent.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="insertPlanetContent" action="insert">
|
||||
<tables>
|
||||
<table name="planet_content" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_content_srl" var="planet_memo_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="content" var="content" notnull="notnull" minlength="1" maxlength="250" />
|
||||
<column name="post_script" var="post_script" minlength="1" maxlength="250" />
|
||||
<column name="reply_count" var="reply_count" filter="number" default="0" />
|
||||
<column name="voted_count" var="voted_count" filter="number" default="0" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
11
modules/planet/queries/insertPlanetContentVoteLog.xml
Normal file
11
modules/planet/queries/insertPlanetContentVoteLog.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="insertPlanetContentVoteLog" action="insert">
|
||||
<tables>
|
||||
<table name="planet_content_vote_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_content_vote_srl" var="planet_content_vote_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="planet_content_srl" var="planet_content_srl" filter="number" default="0" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
11
modules/planet/queries/insertPlanetFavorite.xml
Normal file
11
modules/planet/queries/insertPlanetFavorite.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="insertPlanetFavorite" action="insert">
|
||||
<tables>
|
||||
<table name="planet_favorite" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_favorite_srl" var="planet_favorite_srl" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="reg_planet_srl" var="reg_planet_srl" filter="number" default="0" />
|
||||
<column name="list_order" var="list_order" filter="number" />
|
||||
</columns>
|
||||
</query>
|
||||
12
modules/planet/queries/insertPlanetMemo.xml
Normal file
12
modules/planet/queries/insertPlanetMemo.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="insertPlanetMemo" action="insert">
|
||||
<tables>
|
||||
<table name="planet_memo" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_memo_srl" var="planet_memo_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" notnull="notnull" />
|
||||
<column name="write_planet_srl" var="write_planet_srl" filter="number" default="0" notnull="notnull" />
|
||||
<column name="memo_content" var="memo_content" notnull="notnull" minlength="1" maxlength="250" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
13
modules/planet/queries/insertPlanetReply.xml
Normal file
13
modules/planet/queries/insertPlanetReply.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="insertPlanetReply" action="insert">
|
||||
<tables>
|
||||
<table name="planet_reply" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_reply_srl" var="planet_reply_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="plante_content_srl" var="plante_content_srl" filter="number" default="0" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="write_planet_srl" var="write_planet_srl" filter="number" default="0" />
|
||||
<column name="reply_content" var="reply_content" notnull="notnull" minlength="1" maxlength="250" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
10
modules/planet/queries/insertPlanetTag.xml
Normal file
10
modules/planet/queries/insertPlanetTag.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertPlanetTag" action="insert">
|
||||
<tables>
|
||||
<table name="planet_tags" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="tag" var="tag" notnull="notnull" />
|
||||
<column name="list_order" default="sequence()" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
9
modules/planet/queries/insertPlanetTagText.xml
Normal file
9
modules/planet/queries/insertPlanetTagText.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="insertPlanetTagText" action="insert">
|
||||
<tables>
|
||||
<table name="planet_tag_text" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_tag_text_srl" var="planet_tag_text_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="tag_text" var="tag_text" notnull="notnull" minlength="1" maxlength="100" />
|
||||
</columns>
|
||||
</query>
|
||||
10
modules/planet/queries/insertSMSRecv.xml
Normal file
10
modules/planet/queries/insertSMSRecv.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertSMSRecv" action="insert">
|
||||
<tables>
|
||||
<table name="planet_sms_recv" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="phone_number" var="phone_number" filter="number" notnull="notnull" />
|
||||
<column name="message" var="message" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
10
modules/planet/queries/insertSMSUser.xml
Normal file
10
modules/planet/queries/insertSMSUser.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertSMSUser" action="insert">
|
||||
<tables>
|
||||
<table name="planet_sms_user" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="phone_number" var="phone_number" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
12
modules/planet/queries/updatePlanetBrowserTitle.xml
Normal file
12
modules/planet/queries/updatePlanetBrowserTitle.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updatePlanetBrowserTitle" action="update">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="browser_title" var="browser_title" notnull="notnull" minlength="1" maxlength="250" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
<condition operation="equal" column="module" default="planet" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/updatePlanetColorset.xml
Normal file
12
modules/planet/queries/updatePlanetColorset.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updatePlanetColorset" action="update">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="colorset" var="colorset" notnull="notnull" minlength="1" maxlength="250" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/planet/queries/updatePlanetContentReplyCount.xml
Normal file
11
modules/planet/queries/updatePlanetContentReplyCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updatePlanetContentReplyCount" action="update">
|
||||
<tables>
|
||||
<table name="planet_content" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="reply_count" var="reply_count" default="plus(1)" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="planet_content_srl" var="planet_content_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/planet/queries/updatePlanetContentVoteCount.xml
Normal file
11
modules/planet/queries/updatePlanetContentVoteCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updatePlanetContentVoteCount" action="update">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="voted_count" var="voted_count" default="plus(1)" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/planet/queries/updatePlanetLatestDocument.xml
Normal file
11
modules/planet/queries/updatePlanetLatestDocument.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updatePlanetLatestDocument" action="update">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="latest_document_srl" var="latest_document_srl" filter="number" notnull="notnull" minlength="1" maxlength="250" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
</conditions>
|
||||
</query>
|
||||
14
modules/planet/queries/updatePlanetMe2day.xml
Normal file
14
modules/planet/queries/updatePlanetMe2day.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="updatePlanetMe2day" action="update">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="me2day_uid" var="me2day_id" minlength="1" maxlength="250" />
|
||||
<column name="me2day_ukey" var="me2day_ukey" minlength="1" maxlength="250" />
|
||||
<column name="me2day_autopush" var="me2day_autopush" default="N" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/updatePlanetTitle.xml
Normal file
12
modules/planet/queries/updatePlanetTitle.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updatePlanetTitle" action="update">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="planet_title" var="planet_title" notnull="notnull" minlength="1" maxlength="250" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/queries/updateShowReadWelcome.xml
Normal file
12
modules/planet/queries/updateShowReadWelcome.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updateShowReadWelcome" action="update">
|
||||
<tables>
|
||||
<table name="planet" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="close_notice" var="close_notice" default="R" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/planet/schemas/planet.xml
Normal file
12
modules/planet/schemas/planet.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<table name="planet">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl"/>
|
||||
<column name="planet_title" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="close_notice" type="char" size="1" notnull="notnull" default="N"/>
|
||||
<column name="latest_document_srl" type="number" size="11" default="0" />
|
||||
<column name="colorset" type="varchar" size="15" default="cyan" />
|
||||
<column name="me2day_uid" type="varchar" size="40" />
|
||||
<column name="me2day_ukey" type="varchar" size="40" />
|
||||
<column name="me2day_autopush" type="varchar" size="1" default="N" />
|
||||
<column name="regdate" type="date" notnull="notnull" />
|
||||
</table>
|
||||
6
modules/planet/schemas/planet_catch.xml
Normal file
6
modules/planet/schemas/planet_catch.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<table name="planet_catch">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="document_srl" type="number" size="11" notnull="notnull" primary_key="primary_key"/>
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
<column name="regdate" type="date" notnull="notnull" />
|
||||
</table>
|
||||
6
modules/planet/schemas/planet_content_vote_log.xml
Normal file
6
modules/planet/schemas/planet_content_vote_log.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<table name="planet_content_vote_log">
|
||||
<column name="planet_content_vote_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" index="idx_planet_srl" />
|
||||
<column name="planet_content_srl" type="number" size="11" notnull="notnull" index="idx_planet_content_srl" />
|
||||
<column name="regdate" type="date" />
|
||||
</table>
|
||||
6
modules/planet/schemas/planet_favorite.xml
Normal file
6
modules/planet/schemas/planet_favorite.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<table name="planet_favorite">
|
||||
<column name="planet_favorite_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" index="idx_planet_srl" />
|
||||
<column name="reg_planet_srl" type="number" size="11" notnull="notnull" index="idx_reg_planet_srl" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" default="0" />
|
||||
</table>
|
||||
4
modules/planet/schemas/planet_interest_tags.xml
Normal file
4
modules/planet/schemas/planet_interest_tags.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<table name="planet_interest_tags">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" index="idx_tag" />
|
||||
<column name="tag" type="varchar" size="40" notnull="notnull" index="idx_tag"/>
|
||||
</table>
|
||||
7
modules/planet/schemas/planet_memo.xml
Normal file
7
modules/planet/schemas/planet_memo.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<table name="planet_memo">
|
||||
<column name="planet_memo_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" index="idx_planet_srl" />
|
||||
<column name="write_planet_srl" type="number" size="11" notnull="notnull" index="idx_write_planet_srl" />
|
||||
<column name="memo_content" type="varchar" size="255" />
|
||||
<column name="regdate" type="date" />
|
||||
</table>
|
||||
5
modules/planet/schemas/planet_sms_recv.xml
Normal file
5
modules/planet/schemas/planet_sms_recv.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="planet_sms_recv">
|
||||
<column name="phone_number" type="varchar" size="11" index="idx_phone_number" />
|
||||
<column name="message" type="varchar" size="255" notnull="notnull" />
|
||||
<column name="regdate" type="date" />
|
||||
</table>
|
||||
5
modules/planet/schemas/planet_sms_user.xml
Normal file
5
modules/planet/schemas/planet_sms_user.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="planet_sms_user">
|
||||
<column name="phone_number" type="varchar" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_srl" />
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" />
|
||||
</table>
|
||||
5
modules/planet/schemas/planet_tags.xml
Normal file
5
modules/planet/schemas/planet_tags.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="planet_tags">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" index="idx_tag" />
|
||||
<column name="tag" type="varchar" size="40" notnull="notnull" index="idx_tag"/>
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_tag_list_order" />
|
||||
</table>
|
||||
90
modules/planet/skins/xe_planet/content_list.html
Normal file
90
modules/planet/skins/xe_planet/content_list.html
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<!--@foreach($content_list as $no => $item)-->
|
||||
<div class="commentBody <!--@if($planet->getMid() == $item->getPlanetMid())-->myPlanet<!--@end-->">
|
||||
<!--// Original Text -->
|
||||
<div class="comment">
|
||||
<!--@if($planet->getMid() != $item->getPlanetMid())-->
|
||||
<h3 class="identity"> <a href="{getUrl('','mid',$item->getPlanetMid())}"><img src="{$item->getPlanetPhotoSrc()}" width="96" height="96" alt="{htmlspecialchars($item->nick_name)}" /><em>{htmlspecialchars($item->get('nick_name'))}</em></a> </h3>
|
||||
<!--@end-->
|
||||
<div class="tongue">
|
||||
<div class="post">
|
||||
{$item->getContent()}
|
||||
</div>
|
||||
<!--@if($item->getPostScript())-->
|
||||
<p class="postScript"><strong>{$lang->planet_postscript}</strong> {htmlspecialchars($item->getPostScript())}</p>
|
||||
<!--@end-->
|
||||
<div class="postExtra">
|
||||
<div class="tag">
|
||||
<!--// class="tag" | class="tag edit" -->
|
||||
{@ $regdate = $item->get('regdate') }
|
||||
<p class="time">{getTimeGap($item->get('regdate'), sprintf('y/m/d a H%s i%s', $lang->unit_hour,$lang->unit_min))}</p>
|
||||
<dl>
|
||||
<dt>TAG</dt>
|
||||
<!--@if($item->get('mid')==$myplanet->getMid())-->
|
||||
<dd class="tagRead">
|
||||
<!--@for($i=0,$tag=$item->getArrTags(),$c=count($tag);$i<$c;$i++)-->
|
||||
<a href="{getUrl('act','dispPlanetContentTagSearch','keyword',urlencode($tag[$i]))}" onmouseover="showBtnDeleteTag($Element(this).next())" onmouseout="closeBtnDeleteTag($Element(this).next())" name="planet_content_tag:{$item->get('document_srl')}">{htmlspecialchars($tag[$i])}</a><button type="button" class="delete" onclick="deletePlanetContentTag({$item->get('document_srl')},{$i});return false;" onmouseover="showBtnDeleteTag(this)" onmouseout="closeBtnDeleteTag(this)"><span>{$lang->cmd_planet_del_tag}</span></button>
|
||||
<!--@end-->
|
||||
|
||||
<button type="button" class="modify" onclick="showPlanetContentTagEditForm(this,{$item->get('document_srl')});"><span>{$lang->cmd_planet_edit_tag}</span></button>
|
||||
</dd>
|
||||
<dd class="tagModify">
|
||||
<form id="form_planet_content_tag:{$item->get('document_srl')}" action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, modify_content_tag)" enctype="multipart/form-data">
|
||||
<input type="hidden" name="document_srl" value="{$item->get('document_srl')}" />
|
||||
<input type="text" name="planet_content_tag" value="{$item->getTextTags()}" class="inputText" /><button type="submit">{$lang->cmd_save}</button><button type="button" onclick="closePlanetContentTagEditForm(this);return false;">{$lang->cmd_cancel}</button>
|
||||
</form>
|
||||
</dd>
|
||||
<!--@else-->
|
||||
<dd class="tagRead">
|
||||
<!--@for($i=0,$tag=$item->getArrTags(),$c=count($tag);$i<$c;$i++)-->
|
||||
<a href="{getUrl('act','dispPlanetContentTagSearch','keyword',urlencode($tag[$i]))}" name="planet_content_tag:{$item->get('document_srl')}">{htmlspecialchars($tag[$i])}</a>
|
||||
<!--@end-->
|
||||
|
||||
</dd>
|
||||
<!--@end-->
|
||||
</dl>
|
||||
</div>
|
||||
<div class="sympathy">
|
||||
<!--@if($myplanet->isExists() && $item->get('mid')!=$myplanet->getMid())--><button type="button" onclick="doPlanetVoteContent({$item->get('document_srl')});return false;">{$lang->cmd_planet_good} +</button> <!--@end-->
|
||||
<strong class="num" id="content_voted:{$item->get('document_srl')}">{$item->getVotedCount()}</strong>
|
||||
<a href="#" onclick="showPlanetReply({$item->get('document_srl')});return false;">{$lang->comment}(<span id="reply_count:{$item->get('document_srl')}">{$item->getCommentCount()}</span>)</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// //Original Text -->
|
||||
<!--// Reply Text -->
|
||||
<div class="reply" id="reply:{$item->get('document_srl')}">
|
||||
|
||||
<div id="reply_content:{$item->get('document_srl')}"></div>
|
||||
|
||||
|
||||
<!--@if($myplanet->isExists())-->
|
||||
<dl>
|
||||
<dt>{$logged_info->nick_name}</dt>
|
||||
<dd>
|
||||
<form id="writeReply:{$item->get('document_srl')}" action="./" method="post" onsubmit="return procFilter(this, insert_reply)">
|
||||
<input name="document_srl" type="hidden" value="{$item->get('document_srl')}"/>
|
||||
<input name="planet_reply_content" type="text" class="inputText" />
|
||||
<span class="button"><button type="submit">{$lang->cmd_input}</button></span>
|
||||
</form>
|
||||
</dd>
|
||||
</dl>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--// //Reply Text -->
|
||||
<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
|
||||
<!--@if($page_navigation->total_page>1)-->
|
||||
<div class="pagination">
|
||||
<!--@if($page_navigation->cur_page<$page_navigation->last_page)-->
|
||||
<a href="{getUrl('page',$page_navigation->cur_page+1)}" class="prev">{$lang->cmd_prev}</a>
|
||||
<!--@end-->
|
||||
<!--@if($page_navigation->cur_page>1)-->
|
||||
<a href="{getUrl('page',$page_navigation->cur_page-1)}" class="next">{$lang->cmd_next}</a>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>
|
||||
38
modules/planet/skins/xe_planet/create.html
Normal file
38
modules/planet/skins/xe_planet/create.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("filter/create.xml")-->
|
||||
|
||||
<div class="personalHeader">
|
||||
<h2>Welcome</h2>
|
||||
<p>{$lang->about_planet_make_planet}</p>
|
||||
<span class="leftCap"></span><span class="rightCap"></span>
|
||||
</div>
|
||||
<form action="./" target="photo_iframe" method="post" enctype="multipart/form-data" onsubmit="return procFilter(this, create)">
|
||||
<input type="hidden" name="module" value="planet" />
|
||||
<input type="hidden" name="act" value="" />
|
||||
<input type="hidden" name="mid" value="" />
|
||||
<fieldset>
|
||||
<legend>{$lang->planet_input_personalinfo}</legend>
|
||||
<div class="myInfo">
|
||||
<dl>
|
||||
<dt><label for="planet_title">{$lang->planet_title}</label></dt>
|
||||
<dd>: <input name="planet_title" id="planet_title" type="text" value="{sprintf($lang->planet_whos_planet, $logged_info->nick_name)}" class="inputText" size="50" /></dd>
|
||||
<dt><label for="photo">{$lang->planet_photo}</label></dt>
|
||||
<dd>: <input name="photo" id="photo" type="file" size="42" onchange="doPlanetPhotoUpload(this);" /> </dd>
|
||||
<dt><label for="summary">{$lang->planet_myintro}</label></dt>
|
||||
<dd>: <input name="planet_myintro" id="summary" type="text" class="inputText" size="50" /></dd>
|
||||
<dt><label for="url">{$lang->planet_url}</label></dt>
|
||||
<dd>: {Context::getRequestUri()} <input name="planet_url" id="url" type="text" class="inputText" size="22" /> <em>*{$lang->about_planet_url}</em></dd>
|
||||
<dt><label for="tag">{$lang->planet_mytag}</label></dt>
|
||||
<dd>: <input name="planet_mytag" id="tag" type="text" class="inputText" size="50" /> <em>*{$lang->about_planet_mytag}</em></dd>
|
||||
</dl>
|
||||
<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>
|
||||
</div>
|
||||
<div class="buttonArea">
|
||||
<span class="button large strong planetBlue"><button type="submit">{$lang->cmd_planet_makeOk_move_myplanet}</button></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<iframe name="photo_iframe" style="visibility:hidden;width:1px;height:1px;"></iframe>
|
||||
|
||||
<!--#include("footer.html")-->
|
||||
17
modules/planet/skins/xe_planet/css/blue.css
Normal file
17
modules/planet/skins/xe_planet/css/blue.css
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@charset "utf-8";
|
||||
/* NHN > UIT Center > Open UI Platform Team > Jeong Chan Myeong(dece24@nhncorp.com) */
|
||||
|
||||
.authorHeader,
|
||||
.writePost{ background:#8BBED8;}
|
||||
.authorFooter,
|
||||
.commentList{ background:#f3f8fb;}
|
||||
.writePost .writeBody button{ background-image:url(../images/buttonWriteBlue.gif);}
|
||||
|
||||
.myTab li,
|
||||
.exTab li,
|
||||
.myTab li a,
|
||||
.exTab li a{ background-color:#aed1e4;}
|
||||
.myTab li.active,
|
||||
.exTab li.active,
|
||||
.myTab li.active a,
|
||||
.exTab li.active a{ background-color:#8BBED8;}
|
||||
116
modules/planet/skins/xe_planet/css/button.css
Normal file
116
modules/planet/skins/xe_planet/css/button.css
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
@charset "utf-8";
|
||||
/* Anchor Button */
|
||||
a.button,
|
||||
a.button span { position:relative; display:inline-block; text-decoration:none !important; background:url(../images/buttonWhite.gif) no-repeat; cursor:pointer; white-space:nowrap; vertical-align:middle; *vertical-align:top;}
|
||||
a.button { padding:0; background-position:left top; overflow:visible;}
|
||||
a.button span { left:2px; padding:6px 10px 5px 8px; color:#000; font:12px/12px Sans-serif; background-position:right top;}
|
||||
a.button, x:-moz-any-link { font:0/23px Sans-serif; padding:12px 0; top:1px;} /* Firefox 2 Fix */
|
||||
a.button, x:-moz-any-link, x:default { padding:0; top:0;} /* Firefox 2 Fix */
|
||||
/* Large Size */
|
||||
a.button.large { background-position:left -30px; }
|
||||
a.button.large span { padding:7px 10px 6px 8px; font:16px/16px Sans-serif; background-position:right -30px;}
|
||||
a.button.large, x:-moz-any-link { font:0/29px Sans-serif; padding:15px 0;} /* Firefox 2 Fix */
|
||||
a.button.large, x:-moz-any-link, x:default { padding:0;} /* Firefox 2 Fix */
|
||||
/* xLarge Size */
|
||||
a.button.xLarge { background-position:left -65px; }
|
||||
a.button.xLarge span { padding:8px 10px 7px 8px; font:20px/20px Sans-serif; background-position:right -65px;}
|
||||
a.button.xLarge, x:-moz-any-link { font:0/35px Sans-serif; padding:18px 0;} /* Firefox 2 Fix */
|
||||
a.button.xLarge, x:-moz-any-link, x:default { padding:0;} /* Firefox 2 Fix */
|
||||
/* Small Size */
|
||||
a.button.small { background-position:left -107px; }
|
||||
a.button.small span { padding:4px 6px 3px 4px; font:11px/11px Sans-serif; background-position:right -107px;}
|
||||
a.button.small, x:-moz-any-link { font:0/18px Sans-serif; padding:9px 0;} /* Firefox 2 Fix */
|
||||
a.button.small, x:-moz-any-link, x:default { padding:0;} /* Firefox 2 Fix */
|
||||
|
||||
/* Control Button + Submit Button */
|
||||
span.button,
|
||||
span.button button,
|
||||
span.button input { position:relative; margin:0; display:inline-block; border:0; font:12px Sans-serif; white-space:nowrap; background:url(../images/buttonWhite.gif) no-repeat; vertical-align:middle;}
|
||||
span.button { padding:0; background-position:left top;}
|
||||
span.button, x:-moz-any-link{ font:0/23px Sans-serif; padding:11px 0;} /* Firefox 2 Fix */
|
||||
span.button, x:-moz-any-link, x:default{ padding:0;} /* Firefox 2 Fix */
|
||||
span.button button,
|
||||
span.button input { height:23px; left:2px; *top:-1px; _top:0; padding:0 10px 0 8px; *padding:0 5px 0 3px; line-height:24px; background-position:right top; cursor:pointer;}
|
||||
/* Large Size */
|
||||
span.button.large { background-position:left -30px; *top:-1px;}
|
||||
span.button.large, x:-moz-any-link{ font:0/29px Sans-serif; padding:14px 0;} /* Firefox 2 Fix */
|
||||
span.button.large, x:-moz-any-link, x:default{ padding:0;} /* Firefox 2 Fix */
|
||||
span.button.large button,
|
||||
span.button.large input { height:30px; *top:0; _top:-1px; padding:0 10px 0 8px; *padding:0 5px 0 3px; font:16px/30px Sans-serif; background-position:right -30px;}
|
||||
/* xLarge Size */
|
||||
span.button.xLarge { background-position:left -65px;}
|
||||
span.button.xLarge, x:-moz-any-link{ font:0/35px Sans-serif; padding:17px 0;} /* Firefox 2 Fix */
|
||||
span.button.xLarge, x:-moz-any-link, x:default{ padding:0;} /* Firefox 2 Fix */
|
||||
span.button.xLarge button,
|
||||
span.button.xLarge input { height:35px; padding:0 10px 0 8px; *padding:0 5px 0 3px; font:20px/36px Sans-serif; background-position:right -65px;}
|
||||
/* Large Size */
|
||||
span.button.small { background-position:left -107px;}
|
||||
span.button.small, x:-moz-any-link{ font:0/18px Sans-serif; padding:9px 0;} /* Firefox 2 Fix */
|
||||
span.button.small, x:-moz-any-link, x:default{ padding:0;} /* Firefox 2 Fix */
|
||||
span.button.small button,
|
||||
span.button.small input { height:18px; *top:0; _top:-1px; padding:0 6px 0 4px; *padding:0 3px 0 2px; font:11px/18px Sans-serif; background-position:right -107px;}
|
||||
span.button.small button, x:-moz-any-link,
|
||||
span.button.small input, x:-moz-any-link{ top:-1px;} /* Firefox 2 Fix */
|
||||
span.button.small button, x:-moz-any-link, x:default,
|
||||
span.button.small input, x:-moz-any-link, x:default{ top:0;} /* Firefox 2 Fix */
|
||||
|
||||
/* Strong Button */
|
||||
a.button.strong *,
|
||||
span.button.strong * { font-weight:bold !important;}
|
||||
|
||||
/* Icon Add */
|
||||
a.button .icon { position:relative; border:0; vertical-align:middle;}
|
||||
span.button .icon { position:relative; left:10px; margin-right:8px; vertical-align:middle;}
|
||||
|
||||
/* Color Preset */
|
||||
a.button.green,
|
||||
a.button.green span,
|
||||
span.button.green,
|
||||
span.button.green button,
|
||||
span.button.green input { background-image:url(../images/buttonGreen.gif); color:#fff;}
|
||||
a.button.black,
|
||||
a.button.black span,
|
||||
span.button.black,
|
||||
span.button.black button,
|
||||
span.button.black input { background-image:url(../images/buttonBlack.gif); color:#fff;}
|
||||
a.button.red,
|
||||
a.button.red span,
|
||||
span.button.red,
|
||||
span.button.red button,
|
||||
span.button.red input { background-image:url(../images/buttonRed.gif); color:#fff;}
|
||||
a.button.blue,
|
||||
a.button.blue span,
|
||||
span.button.blue,
|
||||
span.button.blue button,
|
||||
span.button.blue input { background-image:url(../images/buttonBlue.gif); color:#fff;}
|
||||
|
||||
/* Offset Debug */
|
||||
a.button,
|
||||
span.button{ margin-right:2px;}
|
||||
|
||||
/* Planet Style */
|
||||
a.button.planetBlue,
|
||||
a.button.planetGreen,
|
||||
span.button.planetBlue,
|
||||
span.button.planetGreen{ background-position:left top;}
|
||||
a.button.planetBlue span,
|
||||
a.button.planetGreen span,
|
||||
span.button.planetBlue button,
|
||||
span.button.planetGreen button{ background-position:right top;}
|
||||
a.button.planetBlue,
|
||||
a.button.planetBlue span,
|
||||
span.button.planetBlue,
|
||||
span.button.planetBlue button,
|
||||
span.button.planetBlue input { background-image:url(../images/buttonPlanetBlue.gif); color:#fff;}
|
||||
a.button.planetGreen,
|
||||
a.button.planetGreen span,
|
||||
span.button.planetGreen,
|
||||
span.button.planetGreen button,
|
||||
span.button.planetGreen input { background-image:url(../images/buttonPlanetGreen.gif); color:#fff;}
|
||||
|
||||
/* Font Family */
|
||||
.button.large,
|
||||
.button.large *,
|
||||
.button.xLarge,
|
||||
.button.xLarge * { font-family:AppleGothic, "돋움", Dotum, "굴림", Gulim, Sans-serif !important; letter-spacing:-1px;}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue