Ejemplo n.º 1
0
 /**
  * diary_file情報取得
  *
  * @param $file_id ファイルID
  * @return diary_file情報
  */
 function get_diary_file_row_by_file_id($file_id)
 {
     $sql = "SELECT *";
     $sql .= " FROM diary_file";
     $sql .= " WHERE file_id = '" . pg_escape_string($file_id) . "'";
     $sql .= " LIMIT 1";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 2
0
 /**
  * システムアナウンスを取得する
  * 
  * @param $system_announce_id
  * @return システムアナウンス情報
  */
 static function get_system_announce_row($system_announce_id)
 {
     $system_announce_id = pg_escape_string($system_announce_id);
     $sql = "SELECT *, acs_is_expire_date(system_announce.expire_date) AS is_expire";
     $sql .= " FROM (system_announce LEFT OUTER JOIN community ON system_announce.user_community_id = community.community_id)";
     $sql .= " WHERE system_announce.system_announce_id = '{$system_announce_id}'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 3
0
 /**
  * 公開レベルマスタの配列を取得する
  *
  * @param $open_level_code 公開レベルコード
  * @return 公開レベルマスタの配列
  */
 static function get_open_level_master_row($open_level_code)
 {
     $open_level_code = pg_escape_string($open_level_code);
     $sql = "SELECT *";
     $sql .= " FROM open_level_master";
     $sql .= " WHERE open_level_master.open_level_code = '{$open_level_code}'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 4
0
 /**
  * 待機を取得する
  *
  * @param $waiting_id 待機ID
  * @return 待機情報 (連想配列)
  */
 static function get_waiting_row($waiting_id)
 {
     $waiting_id = pg_escape_string($waiting_id);
     $sql = "SELECT *";
     $sql .= " FROM waiting, waiting_type_master, waiting_status_master";
     $sql .= " WHERE waiting.waiting_id = '{$waiting_id}'";
     $sql .= "  AND waiting.waiting_type_code = waiting_type_master.waiting_type_code";
     $sql .= "  AND waiting.waiting_status_code = waiting_status_master.waiting_status_code";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 5
0
 /**
  * ファイル履歴情報を取得する
  *
  * @param $file_id ファイルID
  * @return ファイル履歴情報
  */
 static function get_file_history_row($file_history_id)
 {
     $file_id = pg_escape_string($file_id);
     $sql = "SELECT *";
     $sql .= " FROM file_history, file_history_operation_master, community as USER_COMMUNITY";
     $sql .= " WHERE file_history.file_history_id = '{$file_history_id}'";
     $sql .= "  AND file_history.file_history_operation_code = file_history_operation_master.file_history_operation_code";
     $sql .= "  AND file_history.update_user_community_id = USER_COMMUNITY.community_id";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 6
0
 /**
  * BBSファイル情報取得(1件)
  * ひとつのBBS(掲示板)が持つFile情報
  *
  * @param $bbs_id
  * @return bbs_fileとfile_infoの結合ファイル情報
  */
 static function select_bbs_file_row($bbs_id)
 {
     $sql = "SELECT bbs_file.*,";
     $sql .= " file_info.display_file_name AS save_file_name,file_info.server_file_name AS insystem_file_name,";
     $sql .= " file_info.mime_type AS file_kind";
     //種類
     $sql .= " FROM file_info, bbs_file";
     $sql .= " WHERE bbs_id = " . $bbs_id;
     $sql .= " AND file_info.file_id = bbs_file.file_id";
     $sql .= " ORDER BY bbs_file.file_id ASC";
     $result = ACSDB::_get_row($sql);
     return $result;
 }
 /**
  * スケジュール参加インスタンス生成
  *
  * @param string $schedule_id 該当のスケジュールid
  * @param string $user_community_id 該当のユーザコミュニティid
  * @return object ACSScheduleParticipantオブジェクト
  */
 function &get_schedule_participant_instance($schedule_id, $user_community_id)
 {
     $sql = "SELECT pa.*, cm.community_name AS user_community_name " . "FROM schedule_participant AS pa " . "LEFT JOIN community AS cm " . "    ON pa.user_community_id = cm.community_id " . "WHERE pa.schedule_id = " . pg_escape_string($schedule_id) . " AND pa.user_community_id = " . pg_escape_string($user_community_id);
     $participant_row = ACSDB::_get_row($sql);
     $sql = "SELECT * FROM schedule_answer " . "WHERE schedule_id = " . pg_escape_string($schedule_id) . " AND user_community_id = " . pg_escape_string($user_community_id) . " ORDER BY adjustment_date_id";
     $answer_rows = ACSDB::_get_row_array($sql);
     $schedule_participant =& new ACSScheduleParticipant($schedule_id, $user_community_id);
     $schedule_participant->initialize($participant_row, $answer_rows);
     return $schedule_participant;
 }
Ejemplo n.º 8
0
 /**
  * ファイル公開情報を取得する
  *
  * @param file_id ファイルID
  * @return row(正常)/false(失敗)
  */
 static function get_file_public_access_row($file_id = "", $where = "")
 {
     $file_id = pg_escape_string($file_id);
     $sql = "SELECT * FROM file_public_access";
     $condition = "1=1";
     if ($file_id != "") {
         $condition = $condition . " AND file_id = " . $file_id;
     }
     if ($where != "") {
         $condition = $condition . " AND " . $where;
     }
     $sql = $sql . " WHERE " . $condition;
     $file_public_access_row = ACSDB::_get_row($sql);
     return $file_public_access_row;
 }
Ejemplo n.º 9
0
 /**
  * スケジュールインスタンス生成
  *
  * @param string $community_id 該当のコミュニティid
  * @param string $schedule_id 該当のスケジュールid
  * @return object ACSScheduleオブジェクト
  */
 function &get_schedule_instance($community_id, $schedule_id)
 {
     $sql = "SELECT SCH.*, COM.community_name AS user_community_name " . " FROM schedule AS SCH LEFT JOIN community AS COM " . " ON SCH.user_community_id = COM.community_id " . " WHERE SCH.community_id = " . pg_escape_string($community_id) . " AND SCH.schedule_id = " . pg_escape_string($schedule_id);
     $row = ACSDB::_get_row($sql);
     $schedule = new ACSSchedule($community_id, $row['user_community_id'], $schedule_id);
     $schedule->initialize($row);
     return $schedule;
 }
Ejemplo n.º 10
0
 /**
  * MLアドレスの存在チェック
  * @param $ml_addr メールアドレス
  * return boolean true...既に存在/false...存在しない
  */
 static function is_exists_ml_addr($ml_addr)
 {
     $sql = "SELECT count(*) AS cnt FROM contents " . "WHERE contents_type_code = '61' " . "AND contents_value = '" . pg_escape_string($ml_addr) . "'";
     $row = ACSDB::_get_row($sql);
     return $row['cnt'] > 0 ? TRUE : FALSE;
 }
 /**
  * コミュニティ画像ファイルIDを取得する(公開範囲選択有り)
  *
  * @param $community_id コミュニティID
  * @return 各公開範囲毎のファイルID
  */
 static function get_file_id_with_open_level($community_id)
 {
     if (!$community_id) {
         return;
     }
     $sql = "SELECT file_id, file_id_ol01, file_id_ol02, file_id_ol05 ";
     $sql .= " FROM community_image_file";
     $sql .= " WHERE community_image_file.community_id = '{$community_id}'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 12
0
 /**
  * ログインユーザ情報を取得する
  *
  * @param ユーザID
  * @return ログインユーザ情報 (連想配列)
  */
 static function get_user_info_row($user_id)
 {
     $sql = "SELECT community.community_id,";
     $sql .= "\t\tcommunity.community_name,";
     $sql .= "\t\tcontents.contents_value as user_name,";
     $sql .= "\t\tuser_info.user_id";
     $sql .= " FROM community,";
     $sql .= "  contents,";
     $sql .= "  user_info";
     $sql .= " WHERE community.community_id = '{$user_id}'";
     $sql .= "  AND community.community_id = user_info.user_community_id";
     $sql .= "  AND community.community_id = contents.community_id";
     $sql .= "  AND contents.contents_type_code = '01'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 13
0
 /**
  * ファイルのアクセス履歴情報を取得する
  *
  * @param $user_community_id ユーザコミュニティID
  * @param $file_id ファイルID
  * @return ファイルのアクセス履歴情報 (連想配列)
  */
 static function get_file_access_history_row($user_community_id, $file_id)
 {
     $user_community_id = pg_escape_string($user_community_id);
     $file_id = pg_escape_string($file_id);
     $sql = "SELECT *" . " FROM file_access_history" . " WHERE user_community_id = '" . $user_community_id . "'" . "  AND file_id = '" . $file_id . "'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 14
0
 /**
  * 掲示板のアクセス履歴情報を取得する
  *
  * @param $user_community_id ユーザコミュニティID
  * @param $bbs_id bbs_id
  * @return 掲示板のアクセス履歴情報 (連想配列)
  */
 static function get_bbs_access_history_row($user_community_id, $bbs_id)
 {
     $user_community_id = pg_escape_string($user_community_id);
     $bbs_id = pg_escape_string($bbs_id);
     $sql = "SELECT *";
     $sql .= " FROM bbs_access_history";
     $sql .= " WHERE user_community_id = '{$user_community_id}'";
     $sql .= "  AND bbs_id = '{$bbs_id}'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 15
0
 /**
  * ダイアリーのコメントを取得する
  *
  * @param $diary_comment_id ダイアリーID
  * @return マイダイアリーのコメント(クエリ結果リソース)
  */
 static function get_diary_comment_row($diary_comment_id)
 {
     $sql = "SELECT *";
     $sql .= " FROM (diary_comment LEFT OUTER JOIN community ON diary_comment.user_community_id = community.community_id) as JOINED_DIARY_COMMENT";
     $sql .= " WHERE JOINED_DIARY_COMMENT.diary_comment_id = '{$diary_comment_id}'";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 16
0
 /**
  * 外部RSS情報を取得する
  *
  * @param $bbs_id bbs_id
  * @return 外部RSS情報(連想配列)
  */
 static function get_external_rss_row($bbs_id)
 {
     $bbs_id = pg_escape_string($bbs_id);
     $sql = "SELECT *";
     $sql .= " FROM bbs, external_rss";
     $sql .= " WHERE bbs.bbs_id = '{$bbs_id}'";
     $sql .= "   AND bbs.bbs_id = external_rss.bbs_id";
     $row = ACSDB::_get_row($sql);
     return $row;
 }
Ejemplo n.º 17
0
 /**
  * 返信時の引用メッセージを取得する
  *
  * @param $message_id メッセージID
  * @return 引用メッセージの詳細 (連想配列の配列)
  */
 static function get_message_row($message_id)
 {
     $message_id = pg_escape_string($message_id);
     $sql = "SELECT message.subject";
     $sql .= ", message.body";
     $sql .= " FROM message";
     $sql .= " WHERE message.message_id = '{$message_id}'";
     $row_array = ACSDB::_get_row($sql);
     return $row_array;
 }