/** * プライベートキー取得時使用 * @return array * @access public */ function &getEncryptionKeys() { // 有効期限が切れてないものを取得 $int_time = mktime(date("H"), date("i"), date("s"), date("m"), date("d") - $this->expiration_day, date("Y")); $time = date("YmdHis", $int_time); $where_params = array("expiration_time >= " . $time => null); $result = $this->_db->selectExecute("encryption", $where_params, null, 1); if ($result === false) { return $result; } if (!isset($result[0])) { // 有効期限が切れている or 新規作成 $key_pair = new Crypt_RSA_KeyPair($this->key_length); $public_key = $key_pair->getPublicKey(); $private_key = $key_pair->getPrivateKey(); //insert $update_time = timezone_date(); $container =& DIContainerFactory::getContainer(); $session =& $container->getComponent("Session"); $user_id = $session->getParameter("_user_id"); $int_time = mktime(date("H"), date("i"), date("s"), date("m"), date("d") + $this->expiration_day, date("Y")); $time = date("YmdHis", $int_time); $params = array("public_key" => $public_key->toString(), "private_key" => $private_key->toString(), "key_length" => $this->key_length, "expiration_time" => $time, "update_time" => $update_time, "update_user" => $user_id); $result = $this->_db->insertExecute("encryption", $params, false); if ($result === false) { return $result; } } else { $params = $result[0]; //$private_key = $result[0]['private_key']; } return $params; }
/** * iframeモジュールUpdate * @param array(block_id-url-frame_width-frame_height-scrollbar_show-scrollframe_show) * @return boolean true or false * @access public */ function updIframe($params = array()) { $result = $this->_db->updateExecute("iframe", $params, "block_id", true); if ($result === false) { return false; } return true; }
/** * ブロックIDからカウンタデータ取得 * * @access public */ function getCounter() { $params = array($this->_request->getParameter("block_id")); $result = $this->_db->execute("SELECT " . " block_id," . " counter_digit," . " counter_num," . " show_type, " . " show_char_before," . " show_char_after," . " comment " . " FROM {counter} " . " WHERE block_id=?", $params); if (!$result) { return false; } return $result[0]; }
/** * ブロックIDからiframeデータ取得 * @param int block_id * @access public */ function &getIframeById($id) { $params = array("block_id" => $id); $result = $this->_db->execute("SELECT * " . " FROM {iframe} " . " WHERE {iframe}.block_id=?", $params); if (!$result) { return $result; } return $result[0]; }
/** * RSS用ブロックデータを更新する * * @param array $params 変更するRSS用ブロックデータ配列 * @return boolean true or false * @access public */ function update($params = array()) { $key = "block_id"; $params = $this->_serializeXml($params); $result = $this->_db->updateExecute("rss_block", $params, $key, true); if ($result === false) { return false; } return true; }
/** * itemを取得する * * @param int $item_id 項目ID * @return array * @access public */ function &getItems($where_params = null, $order_params = null, $limit = null, $offset = null, $func = null, $func_param = null) { $sql = "SELECT {items}.*, {items_options}.options,{items_options}.default_selected" . " FROM {items} " . " LEFT JOIN {items_options} ON ({items}.item_id={items_options}.item_id)"; $sql .= $this->_db->getWhereSQL($params, $where_params); $sql .= $this->_db->getOrderSQL($order_params); $result = $this->_db->execute($sql, $params, $limit, $offset, true, $func, $func_param); if ($result === false) { // エラーが発生した場合、エラーリストに追加 $this->_db->addError(); return $result; } return $result; }
/** * languageリストを取得する * * @param array $where_params Whereパラメータ引数 * @param array $order_params Orderパラメータ引数 * @param array $func 関数 * @param array $func_params Funcパラメータ引数 * @return array * @access public */ function &getLanguages($where_params = null, $order_params = null, $func = null, $func_param = null) { if (!isset($order_params)) { $order_params = array("{language}.display_sequence" => "ASC"); } $db_params = array(); $sql = $this->_db->getSelectSQL("language", $db_params, $where_params, $order_params); $result = $this->_db->execute($sql, $db_params, null, null, true, $func, $func_param); if (!$result) { $this->_db->addError(); return $result; } return $result; }
/** * * RSS用ブロックデータが存在するかチェック * * @return boolean true:存在する,false:存在しない * @access public */ function rssExists() { $params = array($this->_request->getParameter("block_id")); $sql = "SELECT block_id " . "FROM {rss_block} " . "WHERE block_id = ?"; $result = $this->_db->execute($sql, $params, 1); if ($result === false) { $this->_db->addError(); return $result; } if (count($result) > 0) { return true; } return false; }
/** * module_object(authority_module_link_object)の一覧を取得する * @return object module_object(authority_module_link_object) * @access public */ function &getAuthoritiesModulesLinkByAuthorityId($role_authority_id, $where_params = null, $order_params = null, $func = null, $func_param = null) { $db_params = array(); $sql_where = ""; if (isset($role_authority_id)) { $db_params[] = $role_authority_id; } if (!empty($where_params)) { foreach ($where_params as $key => $item) { $db_params[] = $item; $sql_where .= " AND " . $key . "=?"; } } $sql_order = ""; if (!isset($order_params)) { $order_params = array("{modules}.display_sequence" => "ASC"); } if (!empty($order_params)) { foreach ($order_params as $key => $item) { $sql_order .= "," . $key . " " . (empty($item) ? "ASC" : $item); } } $sql = ""; $sql .= "SELECT {modules}.*,{authorities_modules_link}.authority_id" . " FROM {modules}" . " LEFT JOIN {authorities_modules_link} ON ({modules}.module_id={authorities_modules_link}.module_id" . (isset($role_authority_id) ? " AND {authorities_modules_link}.role_authority_id=?)" : ")"); $sql .= " WHERE {modules}.disposition_flag=" . _ON; $sql .= $sql_where ? " AND " . substr($sql_where, 5) : ""; $sql .= $sql_order ? " ORDER BY " . substr($sql_order, 1) : ""; $result = $this->_db->execute($sql, $db_params, null, null, true, $func, $func_param); if ($result === false) { $this->_db->addError(); return $result; } return $result; }
/** * 解凍のデータベースに登録処理 * * @return boolean * @access private */ function execDecompress($params, $file_path = "") { if ($params["file_type"] == CABINET_FILETYPE_FILE) { $upload_params = array("room_id" => $this->_request->getParameter("room_id"), "module_id" => $this->_request->getParameter("module_id"), "unique_id" => $this->_request->getParameter("cabinet_id"), "file_name" => $params["file_name"] . "." . $params["extension"], "physical_file_name" => "", "file_path" => "cabinet/", "action_name" => "common_download_main", "file_size" => $params["size"], "mimetype" => $this->_uploadsView->mimeinfo("type", $params["file_name"] . "." . $params["extension"]), "extension" => $params['extension'], "garbage_flag" => _OFF); $upload_id = $this->_uploadsAction->insUploads($upload_params); if ($upload_id === false) { return false; } $result = $this->_uploadsView->getUploadById($upload_id); if ($result === false) { return false; } copy($file_path, FILEUPLOADS_DIR . $result[0]["file_path"] . $result[0]["physical_file_name"]); chmod(FILEUPLOADS_DIR . $result[0]["file_path"] . $result[0]["physical_file_name"], 0666); $params["upload_id"] = $upload_id; } $file_params = array("cabinet_id" => $this->_request->getParameter("cabinet_id"), "upload_id" => $params["upload_id"], "parent_id" => $params["parent_id"], "file_name" => $params["file_name"], "extension" => $params["extension"], "depth" => $params["depth"], "size" => $params["size"], "download_num" => 0, "file_type" => $params["file_type"], "display_sequence" => 0); $file_id = $this->_db->insertExecute("cabinet_file", $file_params, true, "file_id"); if ($file_id === false) { return false; } $file_params = array("file_id" => $file_id, "comment" => ""); $result = $this->_db->insertExecute("cabinet_comment", $file_params, true); if ($result === false) { return false; } return $file_id; }
/** * 入力データを削除する * * @return boolean true or false * @access public */ function deleteData() { $dataID = $this->_request->getParameter("data_id"); $params = array("registration_id" => $this->_request->getParameter("registration_id")); $where = "WHERE ID.registration_id = ? "; if (!empty($dataID)) { $params["data_id"] = $dataID; $where .= "AND ID.data_id = ?"; } $sql = $this->_getFileSQL() . $where; $files = $this->_db->execute($sql, $params); if ($files === false) { $this->_db->addError(); return false; } if (!$this->deleteFile($files)) { return false; } if (!$this->_db->deleteExecute("registration_item_data", $params)) { return false; } if (!$this->_db->deleteExecute("registration_data", $params)) { return false; } return true; }
/** * タスクデータを削除する * * @return boolean true or false * @access public */ function deleteTask() { $calendarAction =& $this->_container->getComponent("calendarAction"); $task = $this->_request->getParameter("task"); if (!empty($task["calendar_id"]) && !$calendarAction->deletePlan($task["calendar_id"], CALENDAR_PLAN_EDIT_THIS)) { return false; } $params = array("task_id" => $task["task_id"]); $sql = "SELECT task_sequence " . "FROM {todo_task} " . "WHERE task_id = ?"; $sequences = $this->_db->execute($sql, $params, 1, null, false); if ($sequences === false) { $this->_db->addError(); return false; } $sequence = $sequences[0][0]; if (!$this->_db->deleteExecute("todo_task", $params)) { return false; } $params = array("todo_id" => $task["todo_id"]); $sequenceParam = array("task_sequence" => $sequence); if (!$this->_db->seqExecute("todo_task", $params, $sequenceParam)) { return false; } // -- 新着情報関連 Start -- $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); $result = $whatsnewAction->delete($task["task_id"]); if ($result === false) { return false; } // -- 新着情報関連 End -- return true; }
/** * 投票データを登録する * * @return boolean true or false * @access public */ function vote() { $photoID = $this->_request->getParameter("photo_id"); $container =& DIContainerFactory::getContainer(); $session =& $container->getComponent("Session"); $userID = $session->getParameter("_user_id"); if (empty($userID)) { $votes = $session->getParameter("photoalbum_votes"); $votes[] = $photoID; $session->setParameter("photoalbum_votes", $votes); } else { $params = array("user_id" => $userID, "photo_id" => $photoID, "vote_flag" => _ON); if (!$this->_db->insertExecute("photoalbum_user_photo", $params, true)) { return false; } } $params = array($photoID); $sql = "UPDATE {photoalbum_photo} " . "SET photo_vote_count = photo_vote_count + 1 " . "WHERE photo_id = ?"; $result = $this->_db->execute($sql, $params); if ($result === false) { $this->_db->addError(); return false; } $params = array($this->_request->getParameter("album_id")); $sql = "UPDATE {photoalbum_album} " . "SET album_vote_count = album_vote_count + 1 " . "WHERE album_id = ?"; $result = $this->_db->execute($sql, $params); if ($result === false) { $this->_db->addError(); return false; } return true; }
/** * 回答データを変更する * * @param array $params 登録する回答データ配列 * @return boolean true or false * @access public */ function updateAnswer($params = array()) { if (!$this->_db->updateExecute("questionnaire_answer", $params, "answer_id", true)) { return false; } return true; }
/** * 投票データを登録する * * @return boolean true or false * @access public */ function vote() { $postID = $this->_request->getParameter("post_id"); $container =& DIContainerFactory::getContainer(); $session =& $container->getComponent("Session"); $userID = $session->getParameter("_user_id"); if (empty($userID)) { $votes = $session->getParameter("bbs_votes"); $votes[] = $postID; $session->setParameter("bbs_votes", $votes); } else { $where = array("user_id" => $userID, "post_id" => $postID); $params = array("vote_flag" => _ON); $result = $this->_db->updateExecute("bbs_user_post", $params, $where); if ($result === false) { return false; } } $params = array($postID); $sql = "UPDATE {bbs_post} " . "SET vote_num = vote_num + 1 " . "WHERE post_id = ?"; $result = $this->_db->execute($sql, $params); if ($result === false) { $this->_db->addError(); return false; } return true; }
/** * モジュールIDからアップロードオブジェクトを取得 * @param int module_id * @return array uploads_object * @access public */ function getUploadByModuleid($module_id) { $params = array("module_id" => $module_id); $sql = "SELECT * FROM {uploads}" . " WHERE {uploads}.module_id = ?" . " "; $result = $this->_db->execute($sql, $params); if ($result === false) { //エラーが発生した場合、エラーリストに追加 $db->addError(); return false; } if (isset($result[0])) { return $result; } else { return null; } }
/** * メールアドレスからユーザーIDを取得する * * @param string $mail メールアドレス * @param boolean $isActive 利用可能ユーザー対象フラグ * @return ユーザーID * @access private */ function &getUserIdByMail($mail, $isActive = false) { $userId = null; if (empty($mail)) { return $userId; } $sql = "SELECT UI.user_id " . "FROM {items} I " . "INNER JOIN {users_items_link} UI " . "ON I.item_id = UI.item_id "; if ($isActive) { $sql .= "INNER JOIN {users} U " . "ON UI.user_id = U.user_id "; } $sql .= "WHERE (I.type = ? " . "OR I.type = ?) " . "AND UI.content = ? "; $bindValues = array(USER_TYPE_EMAIL, USER_TYPE_MOBILE_EMAIL, $mail); if ($isActive) { $sql .= "AND U.active_flag = ? "; $bindValues[] = _USER_ACTIVE_FLAG_ON; } $users = $this->_db->execute($sql, $bindValues); if ($users === false) { $this->_db->addError(); } if (!empty($users)) { $userId = $users[0]['user_id']; } return $userId; }
/** * アドレス切り替え取得 * * @access public */ function switchFolder() { $address = $this->_request->getParameter("address"); if ($address == "") { return "0"; } $addressArr = explode("/", $address); if (count($addressArr) == 1) { return "0"; } $sql = "SELECT file_id, parent_id, depth" . " FROM {cabinet_file}" . " WHERE cabinet_id = ?" . " AND file_type = ?"; $params = array("cabinet_id" => $this->_request->getParameter("cabinet_id"), "file_type" => CABINET_FILETYPE_FOLDER); $sql_where = array(); foreach ($addressArr as $i => $file_name) { if ($i == 0) { continue; } $sql_where[] = "(depth = ? AND file_name = ?)"; $params["depth" . $i] = $i; $params["file_name" . $i] = $file_name; } $sql .= " AND (" . implode(" OR ", $sql_where) . ")"; $result = $this->_db->execute($sql, $params, null, null, true, array($this, "_switchFolder")); if ($result === false) { $this->_db->addError(); return $result; } return $result; }
/** * 新着情報にセットする(コメント) * * @return bool * @access public */ function setCommentWhatsnew($comment_id) { $params = array("post_id" => $comment_id); $comment = $this->_db->selectExecute("journal_post", $params); if (empty($comment)) { return false; } $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); $count = $this->_db->countExecute("journal_post", array("parent_id" => $comment[0]['parent_id'], "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); if ($count === false) { return false; } if ($comment[0]["agree_flag"] == JOURNAL_STATUS_AGREE_VALUE) { $journal_post = $this->_db->selectExecute("journal_post", array("post_id" => $comment[0]['parent_id'])); if ($journal_post === false && !isset($journal_post[0])) { return false; } $time = timezone_date(); if (intval($time) < intval($journal_post[0]['journal_date'])) { // 未来ならば、日誌の記事の時間をセット $time = $journal_post[0]['journal_date']; } $whatsnew = array("unique_id" => $comment[0]['parent_id'], "title" => $journal_post[0]['title'], "description" => $journal_post[0]['content'], "action_name" => "journal_view_main_detail", "parameters" => "post_id=" . $comment[0]['parent_id'] . "&comment_flag=1", "count_num" => $count, "child_flag" => _ON, "child_update_time" => $time, "insert_time" => $journal_post[0]['journal_date'], "insert_user_id" => $journal_post[0]['insert_user_id'], "insert_user_name" => $journal_post[0]['insert_user_name']); $result = $whatsnewAction->auto($whatsnew); if ($result === false) { return false; } } else { if ($count == 0) { $result = $whatsnewAction->delete($comment[0]['parent_id'], _ON); } } return true; }
/** * abbreviate_urlから取得 * * @param string $dir_name * @param string $unique_id * * @return boolean * @access public */ function getAbbreviateUrl($unique_id, $dir_name = null) { //dir_nameが省略されている場合、実行アクションから取得 if (!isset($dir_name)) { $dir_name = $this->getDefaultUniqueKey(); } $params = array('dir_name' => $dir_name, 'unique_id' => $unique_id); $result = $this->_db->selectExecute('abbreviate_url', $params); if ($result === false) { return $result; } if (isset($result[0])) { return $result[0]["short_url"]; } return ""; }
/** * 携帯表示に対応できるルームのツリーを作成する * ルームツリー自体はFilter_AllowRoom...にて作成されている * 作成済みルームツリーに対して、携帯メニューに表示可能なルームを判定する * 2010.02.04 add by AllCreator * * @return true false * @access public */ function getRoomTree(&$roomArr, $display_type, $each_room, $roomIds) { $roomTree = array(); $request =& $this->_container->getComponent('Request'); $invisiblePageIds = $this->getInvisiblePageIds($display_type, $each_room, $roomIds); // エラー if ($invisiblePageIds === false) { return false; } $mobileModuleIds = $this->getMobileModuleIds($display_type, $each_room, $roomIds); if ($mobileModuleIds === false) { return false; } // 表示可能なモジュールが何もない if (empty($mobileModuleIds)) { // Roomデータ全てにvisible=falseを設定して戻る $temporaryRoomArr = null; $this->setVisibleFlagToRoomRecursive($roomArr, $roomArr[0][0], array(), $temporaryRoomArr); return true; } $params = array(_DISPLAY_POSITION_CENTER); if (empty($invisiblePageIds)) { $invisiblePageWhere = ""; } else { $invisiblePageWhere = "AND P.page_id NOT IN (" . implode(',', $invisiblePageIds) . ") "; } $sql = "SELECT P.room_id, count(B.block_id) as block_ct " . " FROM {pages} P INNER JOIN {blocks} B ON P.page_id = B.page_id AND B.module_id IN (" . implode(',', $mobileModuleIds) . ") " . " WHERE P.room_id IN ( " . implode(',', $roomIds) . ")" . " AND P.space_type IN (" . _SPACE_TYPE_PUBLIC . "," . _SPACE_TYPE_GROUP . ") " . " AND P.private_flag IN (" . _ON . "," . _OFF . ") " . " AND P.display_position = ? " . $invisiblePageWhere . $this->_getPageWhereSQL($invisiblePageIds) . " GROUP BY P.room_id "; $visibleRoomIds = $this->_db->execute($sql, $params, null, null, true, array($this, '_fetchVisibleRoomIds')); $temporaryRoomArr = null; $this->setVisibleFlagToRoomRecursive($roomArr, $roomArr[0][0], $visibleRoomIds, $temporaryRoomArr); return true; }
/** * カテゴリリンクデータ配列を取得する * * @return array カテゴリリンクデータ配列 * @access public */ function &getCategoryLinks() { $categories = $this->getCategories(); if (empty($categories)) { return $categories; } $linklist = $this->_request->getParameter("linklist"); $entry = $this->_request->getParameter("entry"); $search = $this->_request->getParameter("search"); $params = array($this->_request->getParameter("linklist_id")); $sql = "SELECT L.link_id, L.linklist_id, L.category_id, L.link_sequence, L.title, L.url, L.insert_user_id"; if ($entry == _ON || $linklist["display"] != LINKLIST_DISPLAY_DROPDOWN) { $sql .= ", " . "L.description"; } if ($linklist["view_count_flag"] == _ON) { $sql .= ", " . "L.view_count"; } $sql .= " " . "FROM {linklist_link} L " . "INNER JOIN {linklist_category} C " . "ON L.category_id = C.category_id " . "WHERE L.linklist_id = ? "; if (!empty($search)) { $sql .= "AND (L.title LIKE ? " . "OR L.description LIKE ?) "; $params[] = "%" . $search . "%"; $params[] = "%" . $search . "%"; } $sql .= "ORDER BY C.category_sequence, L.link_sequence"; $categoryLinks = $this->_db->execute($sql, $params, null, null, true, array($this, "_makeCategoryLinkArray"), $categories); if ($categoryLinks === false) { $this->_db->addError(); } return $categoryLinks; }
/** * conf_nameよりConfig情報取得 * * @param int $conf_modid モジュールID * @param string $conf_name conf名 * @return array * @access public */ function &getConfigByConfname($conf_modid, $conf_name) { if (!$this->isMultiLanguage) { $where_params = array("conf_modid" => $conf_modid, "conf_name" => $conf_name); $configs =& $this->_db->selectExecute("config", $where_params); if ($configs === false) { return $configs; } } else { $params = array($this->_session->getParameter('_lang'), $conf_modid, $conf_name); $sql = $this->_getConfigSQL() . "AND C.conf_name = ?"; $configs = $this->_db->execute($sql, $params); if ($configs === false) { $this->_db->addError(); return $configs; } } if (empty($configs)) { $configs = null; return $configs; } $config = $configs[0]; if (isset($config['CLValue'])) { $config['conf_value'] = $config['CLValue']; } return $config; }
/** * プライベートスペースのデフォルトモジュール配置処理 * (TODOと新着を配置) * TODO:現状、汎用的には作成していない。 * * @param int $page_id ページID * @param string $user_id 会員ID * @param string $handle ハンドル * * @return boolean true or false * @access public */ function defaultPrivateRoomInsert($page_id, $user_id, $handle) { $modulesView =& $this->_container->getComponent("modulesView"); $session =& $this->_container->getComponent("Session"); $col_num = 1; $row_num = 1; $module = $modulesView->getModuleByDirname("todo"); $time = timezone_date(); $site_id = $session->getParameter("_site_id"); if (isset($module['module_id'])) { $block_obj = $this->_getBlockByDefaultPrivateRoom($page_id, $col_num, $row_num, $module); $block_id = $this->insBlock($block_obj); if (!$block_id) { return false; } $row_num++; $todo = array("room_id" => $page_id, "todo_name" => "TODO", "task_authority" => _AUTH_CHIEF, "insert_time" => $time, "insert_site_id" => $site_id, "insert_user_id" => $user_id, "insert_user_name" => $handle, "update_time" => $time, "update_site_id" => $site_id, "update_user_id" => $user_id, "update_user_name" => $handle); $todo_id = $this->_db->insertExecute("todo", $todo, false, "todo_id"); if ($todo_id === false) { return false; } $todo_block = array("block_id" => $block_id, "todo_id" => $todo_id, "default_sort" => 0, "room_id" => $page_id, "insert_time" => $time, "insert_site_id" => $site_id, "insert_user_id" => $user_id, "insert_user_name" => $handle, "update_time" => $time, "update_site_id" => $site_id, "update_user_id" => $user_id, "update_user_name" => $handle); $result = $this->_db->insertExecute("todo_block", $todo_block, true); if ($result === false) { return false; } } $module = $modulesView->getModuleByDirname("whatsnew"); if (isset($module['module_id'])) { $block_obj = $this->_getBlockByDefaultPrivateRoom($page_id, $col_num, $row_num, $module); $block_id = $this->insBlock($block_obj); if (!$block_id) { return false; } $row_num++; // 掲示板、日誌、カレンダーをチェック $display_modules_arr = array(); $sub_module = $modulesView->getModuleByDirname("bbs"); if (isset($sub_module['module_id'])) { $display_modules_arr[] = $sub_module['module_id']; } $sub_module = $modulesView->getModuleByDirname("journal"); if (isset($sub_module['module_id'])) { $display_modules_arr[] = $sub_module['module_id']; } $sub_module = $modulesView->getModuleByDirname("calendar"); if (isset($sub_module['module_id'])) { $display_modules_arr[] = $sub_module['module_id']; } $display_modules = implode(",", $display_modules_arr); $whatsnew_block = array("block_id" => $block_id, "display_type" => 2, "display_days" => 5, "display_modules" => $display_modules, "display_title" => _ON, "display_room_name" => _OFF, "display_module_name" => _OFF, "display_user_name" => _OFF, "display_insert_time" => _ON, "display_description" => _OFF, "allow_rss_feed" => _OFF, "select_room" => _OFF, "rss_title" => "WHATSNEW_RSS_TITLE", "rss_description" => "WHATSNEW_RSS_DESCRIPTION", "room_id" => $page_id, "insert_time" => $time, "insert_site_id" => $site_id, "insert_user_id" => $user_id, "insert_user_name" => $handle, "update_time" => $time, "update_site_id" => $site_id, "update_user_id" => $user_id, "update_user_name" => $handle); $result = $this->_db->insertExecute("whatsnew_block", $whatsnew_block, false); if ($result === false) { return false; } } $row_num++; return true; }
/** * 権限モジュールリンクテーブルDelete * * @param int $authority_id 権限ID * @param int $module_id モジュールID * @return boolean true or false * @access public */ function delAuthorityModuleLink($where_params) { $result = $this->_db->deleteExecute("authorities_modules_link", $where_params); if ($result === false) { $this->_db->addError(); return $result; } return true; }
/** * ConfigValue削除処理 * @return boolean true or false * @access public **/ function delConfigValue($conf_modid, $conf_name) { $params = array("conf_modid" => $conf_modid, "conf_name" => $conf_name); $result = $this->_db->deleteExecute("config", $params); if ($result === false) { return $result; } return true; }
/** * 自動番号の取得 * * @access public */ function getAutoNumber($metadata_id) { $params = array("metadata_id" => $metadata_id); $number = $this->_db->maxExecute("multidatabase_metadata_content", "content", $params); if ($number === false) { return 0; } return sprintf(MULTIDATABASE_META_AUTONUM_FORMAT, intval($number) + 1); }
function insMenuDetailByPageId($page_id, $visibility_flag = _ON) { $params = array("block_id" => 0, "page_id" => $page_id, "visibility_flag" => $visibility_flag); $result = $this->_db->insertExecute("mobile_menu_detail", $params, true); if ($result === false) { return false; } return true; }
/** * 条件に該当する短縮URLデータを削除する。 * * @param string $whereClause where句文字列 * @param array $bindValues バインド値配列 * @return boolean true or false * @access public */ function deleteByWhereClause($whereClause, $bindValues) { $sql = "DELETE FROM {abbreviate_url} " . "WHERE " . $whereClause; if (!$this->_db->execute($sql, $bindValues)) { $this->_db->addError(); return false; } return true; }
/** * sitesの一覧を取得する * * @param array $where_params Whereパラメータ引数 * @param array $order_params Orderパラメータ引数 * @param int $limit * @param int $start * @return array サイトリスト * @access public */ function &getSites($where_params = null, $order_params = array("{sites}.self_flag" => "DESC", "{sites}.url" => "ASC"), $limit = null, $offset = null) { $result = $this->_db->selectExecute("sites", $where_params, $order_params, $limit, $offset, array($this, "_getSites")); if ($result === false) { $this->_db->addError(); return $result; } return $result; }