/** * @brief Execute update **/ function moduleUpdate() { // opage module instance update $output = executeQueryArray('page.pageTypeOpageCheck'); if ($output->toBool() && count($output->data) > 0) { foreach ($output->data as $val) { $args->module_srl = $val->module_srl; $args->name = 'page_type'; $args->value = 'OUTSIDE'; $in_out = executeQuery('page.insertPageType', $args); } $output = executeQuery('page.updateAllOpage'); if (!$output->toBool()) { return $output; } } // old page module instance update $output = executeQueryArray('page.pageTypeNullCheck'); $skin_update_srls = array(); if ($output->toBool() && $output->data) { foreach ($output->data as $val) { $args->module_srl = $val->module_srl; $args->name = 'page_type'; $args->value = 'WIDGET'; $in_out = executeQuery('page.insertPageType', $args); $skin_update_srls[] = $val->module_srl; } } if (count($skin_update_srls) > 0) { $skin_args->module_srls = implode(',', $skin_update_srls); $skin_args->is_skin_fix = "Y"; $ouput = executeQuery('page.updateSkinFix', $skin_args); } return new Object(0, 'success_updated'); }
function nproductCategory($module_srl, $category = 0) { $args->node_id = $category; if ($args->node_id) { $output = executeQuery('nproduct.getCategoryInfo', $args); if (!$output->toBool()) { return $output; } $category_info = $output->data; $parent_nodes = explode('.', $category_info->node_route); $this->parent_nodes = $parent_nodes; } unset($args); // category tree $args->module_srl = $module_srl; $output = executeQueryArray('nproduct.getCategoryAllSubitems', $args); if (!$output->toBool()) { return $output; } $category_list = $output->data; $category_tree = array(); $category_index = array(); if ($category_list) { foreach ($category_list as $no => $cate) { $node_route = $cate->node_route . $cate->node_id; $stages = explode('.', $node_route); $code_str = '$category_tree["' . implode('"]["', $stages) . '"] = array();'; eval($code_str); $category_index[$cate->node_id] = $cate; } } $this->category_tree = $category_tree; $this->category_index = $category_index; }
/** * @brief install the module **/ function moduleInstall() { // use action forward(enabled in the admin model) $oModuleController = getController('module'); $oModuleModel = getModel('module'); // 2007. 10. 17 insert member menu trigger $oModuleController->insertTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after'); // install board module $args = new stdClass(); $args->site_srl = 0; $output = executeQuery('module.getSite', $args); if (!$output->data->index_module_srl) { $args->mid = 'board'; $args->module = 'board'; $args->browser_title = 'XpressEngine'; $args->skin = 'default'; $args->site_srl = 0; $output = $oModuleController->insertModule($args); if ($output->toBool()) { $module_srl = $output->get('module_srl'); $site_args = new stdClass(); $site_args->site_srl = 0; $site_args->index_module_srl = $module_srl; $oModuleController = getController('module'); $oModuleController->updateSite($site_args); } } return new Object(); }
function searchPartidaId($objPartida) { $sqlCommand = 'SELECT * FROM partidas WHERE id =:id'; $parameters = array(); $parameters[':id'] = $objPartida->id; return executeQuery($sqlCommand, $parameters); }
function dispSocialxeserverModifyClient() { if (!$this->grant->register) { return $this->stop('msg_not_permitted'); } $client_srl = Context::get('client_srl'); if (!$client_srl) { return $this->stop('msg_invalid_request'); } // 클라이언트 정보 얻기 $args->client_srl = $client_srl; $output = executeQuery('socialxeserver.getClient', $args); if (!$output->toBool()) { return $output; } if (!$output->data) { return $this->stop('msg_invalid_request'); } // 본인의 클라이언트인지 다시 한번 더 확인 $logged_info = Context::get('logged_info'); if ($output->data->member_srl != $logged_info->member_srl) { return $this->stop('msg_not_permitted'); } // 정보 가공 $client_info = $output->data; $domain_array = explode(',', $client_info->domain); foreach ($domain_array as $name => $val) { $domain_array[$name] = trim($val); } // 템플릿에 사용하기 위해 셋 Context::set('client_info', $client_info); Context::set('domain_list', $domain_array); $this->setTemplateFile('modify_client'); }
function dispSocialxeserverAdminModifyClient() { $client_srl = Context::get('client_srl'); if (!$client_srl) { return $this->stop('msg_invalid_request'); } // 클라이언트 정보 얻기 $args->client_srl = $client_srl; $output = executeQuery('socialxeserver.getClient', $args); if (!$output->toBool()) { return $output; } if (!$output->data) { return $this->stop('msg_invalid_request'); } // 정보 가공 $client_info = $output->data; $domain_array = explode(',', $client_info->domain); foreach ($domain_array as $name => $val) { $domain_array[$name] = trim($val); } // 템플릿에 사용하기 위해 셋 Context::set('client_info', $client_info); Context::set('domain_list', $domain_array); // 템플릿 파일 지정 $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('modify_client'); }
function read($session_key) { if (!$session_key || !$this->session_started) { return; } $oCacheHandler =& CacheHandler::getInstance('object'); if ($oCacheHandler->isSupport()) { $cache_key = 'object:' . $session_key; $output->data = $oCacheHandler->get($cache_key); } if (!$output->data) { $args->session_key = $session_key; $columnList = array('session_key', 'cur_mid', 'val'); $output = executeQuery('session.getSession', $args, $columnList); // Confirm there is a table created if read error occurs if (!$output->toBool()) { $oDB =& DB::getInstance(); if (!$oDB->isTableExists('session')) { $oDB->createTableByXmlFile($this->module_path . 'schemas/session.xml'); } if (!$oDB->isColumnExists("session", "cur_mid")) { $oDB->addColumn('session', "cur_mid", "varchar", 128); } $output = executeQuery('session.getSession', $args); } // Check if there is a table created in case there is no "cur_mid" value in the sessions information if (!isset($output->data->cur_mid)) { $oDB =& DB::getInstance(); if (!$oDB->isColumnExists("session", "cur_mid")) { $oDB->addColumn('session', "cur_mid", "varchar", 128); } } } return $output->data->val; }
function getTextyleHubInfo() { $oModuleModel =& getModel('module'); $output = executeQuery('textylehub.getTextyleHub'); if (!$output->data->module_srl) { return; } $module_info = $oModuleModel->getModuleInfoByModuleSrl($output->data->module_srl); if (!$module_info->textyle_creation_count) { $module_info->textyle_creation_count = 1; } if (!$module_info->newest_documents_count) { $module_info->newest_documents_count = 20; } if (!$module_info->newest_textyles_count) { $module_info->newest_textyles_count = 10; } if (!$module_info->sub_newest_textyles_count) { $module_info->sub_newest_textyles_count = 5; } if (!$module_info->newest_comments_count) { $module_info->newest_comments_count = 5; } if (!$module_info->newest_trackbacks_count) { $module_info->newest_trackbacks_count = 5; } return $module_info; }
function validatePassword($password, $encrypt = TRUE) { #echo "<h1>calling validatePassword({$password},{$encrypt})</h1>"; // crypting password if ($encrypt && $password) { //$salt = substr($this->name, 0, 2); //$enc_pw = crypt($password, $salt); $enc_pw = md5($password); } else { $enc_pw = $password; } if (XOX_DEBUG_MODE) { $this->debug(); } // get user query if ($rs = executeQuery("SELECT {$this->_password} FROM {$this->_table} WHERE {$this->_id}='" . $this->getID() . "' AND {$this->_password}='{$enc_pw}'")) { $this->set($rs->getrow()); $rs->free(); } // check authentification if ($this->isAuthenticated()) { return TRUE; // authenticated } else { $tag = $this->_password; $this->{$tag} = ''; return FALSE; } }
/** * @brief 특정 모두의 첨부파일 모두 삭제 **/ function deleteModuleFiles($module_srl) { // 전체 첨부파일 목록을 구함 $args->module_srl = $module_srl; $output = executeQueryArray('file.getModuleFiles', $args); if (!$output) { return $output; } $files = $output->data; // DB에서 삭제 $args->module_srl = $module_srl; $output = executeQuery('file.deleteModuleFiles', $args); if (!$output->toBool()) { return $output; } // 실제 파일 삭제 (일단 약속에 따라서 한번에 삭제) FileHandler::removeDir(sprintf("./files/attach/images/%s/", $module_srl)); FileHandler::removeDir(sprintf("./files/attach/binaries/%s/", $module_srl)); // DB에서 구한 파일 목록을 삭제 $path = array(); $cnt = count($files); for ($i = 0; $i < $cnt; $i++) { $uploaded_filename = $files[$i]->uploaded_filename; FileHandler::removeFile($uploaded_filename); $path_info = pathinfo($uploaded_filename); if (!in_array($path_info['dirname'], $path)) { $path[] = $path_info['dirname']; } } // 해당 글의 첨부파일 디렉토리 삭제 for ($i = 0; $i < count($path); $i++) { FileHandler::removeBlankDir($path[$i]); } return $output; }
/** * @brief Manage a list of pages showing **/ function dispPageAdminContent() { $args->sort_index = "module_srl"; $args->page = Context::get('page'); $args->list_count = 40; $args->page_count = 10; $args->s_module_category_srl = Context::get('module_category_srl'); $s_mid = Context::get('s_mid'); if ($s_mid) { $args->s_mid = $s_mid; } $s_browser_title = Context::get('s_browser_title'); if ($s_browser_title) { $args->s_browser_title = $s_browser_title; } $output = executeQuery('page.getPageList', $args); $oModuleModel =& getModel('module'); $page_list = $oModuleModel->addModuleExtraVars($output->data); moduleModel::syncModuleToSite($page_list); // To write to a template context:: set Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('page_list', $output->data); Context::set('page_navigation', $output->page_navigation); //Security $security = new Security(); $security->encodeHTML('page_list..browser_title'); $security->encodeHTML('page_list..mid'); $security->encodeHTML('module_info.'); // Set a template file $this->setTemplateFile('index'); }
/** * @brief 생성된 calendar들의 목록을 보여줌 * lifepod이라는 module명으로 등록된 모듈을 구하기 위해서 몇가지 설정을 한 후에 쿼리를 수행한다. * 쿼리수행은 executeQuery(모듈명.쿼리아이디, 인자변수) 로 하게 되며 이 쿼리아이디에 해당하는 xml파일은 모듈의 queries디렉토리에 지정이 되어 있다. * * 이 특정 module의 목록은 module model객체에서 구할 수 있지만 검색등의 각 모듈마다 다른 조건 때문에 각 모듈별로 쿼리를 생성해 놓는다. * 모든 모듈의 결과물(mid)는 modules 테이블에 저장이 된다. **/ function dispLifepodAdminContent() { $args->sort_index = "module_srl"; ///< 정렬 순서는 모듈의 sequence값으로 하고 정렬은 역순. 즉 생성된 순으로 한다. $args->page = Context::get('page'); ///< 현재 페이지를 설정 $args->list_count = 40; ///< 한페이지에 40개씩 보여주기로 고정. $args->page_count = 10; ///< 페이지의 수는 10개로 제한. $args->s_module_category_srl = Context::get('module_category_srl'); ///< 모듈분류값을 인자로 추가 $output = executeQuery('lifepod.getLifepodList', $args); ///< lifepod.getGuesbookList 쿼리 실행 (./modules/lifepod/query/getLifepodList.xml) /** * 템플릿에 쓰기 위해서 context::set * xml query에 navigation이 있고 list_count가 정의되어 있으면 결과 변수에 아래 5가지의 값이 세팅이 된다. **/ Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('lifepod_list', $output->data); Context::set('page_navigation', $output->page_navigation); // 템플릿 파일 지정 (./modules/lifepod/tpl/index.html파일이 지정이 됨) $this->setTemplateFile('index'); }
function read($session_key) { if (!$session_key || !$this->session_started) { return; } $args->session_key = $session_key; $output = executeQuery('session.getSession', $args); // 읽기 오류 발생시 테이블 생성 유무 확인 if (!$output->toBool()) { $oDB =& DB::getInstance(); if (!$oDB->isTableExists('session')) { $oDB->createTableByXmlFile($this->module_path . 'schemas/session.xml'); } if (!$oDB->isColumnExists("session", "cur_mid")) { $oDB->addColumn('session', "cur_mid", "varchar", 128); } $output = executeQuery('session.getSession', $args); } // 세션 정보에서 cur_mid값이 없을 경우 테이블 생성 체크 if (!isset($output->data->cur_mid)) { $oDB =& DB::getInstance(); if (!$oDB->isColumnExists("session", "cur_mid")) { $oDB->addColumn('session', "cur_mid", "varchar", 128); } } return $output->data->val; }
/** * @brief 어드민 페이지에서 입력한 옵션 값들 세팅\n * option values * - naver_api_key * - yahoo_api_key * - sphinx info **/ function procAroundmapAdminSetApiKey() { // 어드민 페이지에서 입력한 옵션값들을 가져온다. $config->naver_api_key = Context::get('naver_api_key'); $config->yahoo_api_key = Context::get('yahoo_api_key'); $config->useSphinx = Context::get('usesphinx'); $config->serverName = Context::get('servername'); $config->serverPort = Context::get('serverport'); // 가져온 옵션값들을 module config에 저장한다. $oModuleController =& getController('module'); $oModuleController->insertModuleConfig('aroundmap', $config); // 기존에 적용된 모듈을 삭제한다. $apply_module = Context::get('apply_module'); $output = executeQuery('aroundmap.deleteApplyModules'); if (!$output->toBool()) { return $output; } // 어드민 페이지에서 입력한 새로운 모듈을 입력한다. $modules = explode(',', $apply_module); for ($i = 0, $c = count($modules); $i < $c; $i++) { if ($modules[$i] != 0) { $args->module_srl = $modules[$i]; $output = executeQuery('aroundmap.insertApplyModule', $args); if (!$output->toBool()) { return $output; } } } $this->setMessage('success_applied'); }
function getPaynotyAdminDelete() { // get configs. $args->config_srl = Context::get('config_srl'); $output = executeQuery("paynoty.getConfig", $args); $id_list = $output->data->id_list; $group_srl_list = $output->data->group_srl_list; $config = $output->data; $args->config_srls = Context::get('config_srls'); $output = executeQueryArray("paynoty.getModuleInfoByConfigSrl", $args); $mid_list = array(); if ($output->data) { foreach ($output->data as $no => $val) { $mid_list[] = $val->mid; } } $config->mid_list = join(',', $mid_list); Context::set('config', $config); $oTemplate = &TemplateHandler::getInstance(); $tpl = $oTemplate->compile($this->module_path.'tpl', 'delete'); $this->add('tpl', str_replace("\n"," ",$tpl)); }
function create() { global $gorumroll, $webSiteUrl, $replyToAddress; $class = strstr($gorumroll->list, "user") ? "user" : "item"; if (!isset($webSiteUrl)) { $webSiteUrl = ""; } $this->valid(); if (Roll::isFormInvalid()) { return; } if (!preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$/i', $this->youremail)) { return Roll::setFormInvalid("invalidEmail"); } executeQuery("UPDATE @{$class} SET responded=responded+1 WHERE id=#id#", $gorumroll->rollid); G::load($n, Notification_adReply, "notification"); if ($n->active) { $obj = new $class(); $obj->id = $gorumroll->rollid; $ownerEmail = $obj->getEmailParams($params); $params["message"] = $this->mess; $params["name"] = $this->yourname; $params["email"] = $this->youremail; $sp = new SendingParameters(); $sp->to = $ownerEmail; $sp->replyTo = $n->cc = $this->youremail; $n->send($sp, $params); // TODO:url } //TODO: respnum increase Roll::setInfoText("mail_sent_{$class}"); }
/** * Execute update * * @return Object */ function moduleUpdate() { $oDB = DB::getInstance(); if (!$oDB->isColumnExists("addons", "is_used_m")) { $oDB->addColumn("addons", "is_used_m", "char", 1, "N", TRUE); } if (!$oDB->isColumnExists("addons_site", "is_used_m")) { $oDB->addColumn("addons_site", "is_used_m", "char", 1, "N", TRUE); } // 2011. 7. 29. add is_fixed column if (!$oDB->isColumnExists('addons', 'is_fixed')) { $oDB->addColumn('addons', 'is_fixed', 'char', 1, 'N', TRUE); // move addon info to addon_site table $output = executeQueryArray('addon.getAddons'); if ($output->data) { foreach ($output->data as $row) { $args = new stdClass(); $args->site_srl = 0; $args->addon = $row->addon; $args->is_used = $row->is_used; $args->is_used_m = $row->is_used_m; $args->extra_vars = $row->extra_vars; executeQuery('addon.insertSiteAddon', $args); } } } return new Object(0, 'success_updated'); }
/** * @brief 관리자 페이지의 신고 목록 보기 **/ function dispCommentAdminDeclared() { // 목록을 구하기 위한 옵션 $args->page = Context::get('page'); ///< 페이지 $args->list_count = 30; ///< 한페이지에 보여줄 글 수 $args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수 $args->sort_index = 'comment_declared.declared_count'; ///< 소팅 값 $args->order_type = 'desc'; ///< 소팅 정렬 값 // 목록을 구함 $declared_output = executeQuery('comment.getDeclaredList', $args); if ($declared_output->data && count($declared_output->data)) { $comment_list = array(); $oCommentModel =& getModel('comment'); foreach ($declared_output->data as $key => $comment) { $comment_list[$key] = new commentItem(); $comment_list[$key]->setAttribute($comment); } $declared_output->data = $comment_list; } // 템플릿에 쓰기 위해서 comment_model::getCommentList() 의 return object에 있는 값들을 세팅 Context::set('total_count', $declared_output->total_count); Context::set('total_page', $declared_output->total_page); Context::set('page', $declared_output->page); Context::set('comment_list', $declared_output->data); Context::set('page_navigation', $declared_output->page_navigation); // 템플릿 지정 $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('declared_list'); }
/** * Show the blacklist of comments in the admin page * @return void */ function dispCommentAdminDeclared() { // option to get a blacklist $args->page = Context::get('page'); // /< Page $args->list_count = 30; // /< the number of comment postings to appear on a single page $args->page_count = 10; // /< the number of pages to appear on the page navigation $args->sort_index = 'comment_declared.declared_count'; // /< sorting values $args->order_type = 'desc'; // /< sorted value // get a list $declared_output = executeQuery('comment.getDeclaredList', $args); if ($declared_output->data && count($declared_output->data)) { $comment_list = array(); $oCommentModel =& getModel('comment'); foreach ($declared_output->data as $key => $comment) { $comment_list[$key] = new commentItem(); $comment_list[$key]->setAttribute($comment); } $declared_output->data = $comment_list; } // set values in the return object of comment_model:: getCommentList() in order to use a template. Context::set('total_count', $declared_output->total_count); Context::set('total_page', $declared_output->total_page); Context::set('page', $declared_output->page); Context::set('comment_list', $declared_output->data); Context::set('page_navigation', $declared_output->page_navigation); // set the template $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('declared_list'); }
function searchCategoriaId($objCategoria) { $sqlCommand = 'SELECT * FROM categorias WHERE id =:id'; $parameters = array(); $parameters[':id'] = $objCategoria->id; return executeQuery($sqlCommand, $parameters); }
/** * 기록한 에러 목록을 표시하는 메소드. */ public function dispErrorLoggerAdminList() { // 현재 설정을 불러온다. Context::set('elconfig', $this->getConfig()); // 에러 목록을 불러온다. $obj = new stdClass(); $elcount = executeQuery('errorlogger.countErrorLog', $obj); $elcount = $elcount->toBool() ? $elcount->data->count : 0; $obj->page = $page = Context::get('page') ? Context::get('page') : 1; $ellog = executeQuery('errorlogger.getErrorLog', $obj); $ellog = $ellog->toBool() ? $ellog->data : array(); Context::set('elcount', $elcount); Context::set('ellog', $ellog); // 페이징을 처리한다. $paging = new Object(); $paging->total_count = $elcount; $paging->total_page = max(1, ceil($elcount / 20)); $paging->page = $page; $paging->page_navigation = new PageHandler($paging->total_count, $paging->total_page, $page, 10); Context::set('paging', $paging); Context::set('page', $page); // 템플릿을 지정한다. $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('list'); }
function storeJsonDataToDb($data) { $USERNAME = '******'; //database username $PASSWORD = '******'; //database password $DATABASE = 'vishakna_trumpster'; //database name $URL = 'localhost'; //database location // Connect to trumpsters database $con = mysql_connect($URL, $USERNAME, $PASSWORD); mysql_select_db($DATABASE) or die('Cannot connect to database.'); $data_length = count($data); $query = "TRUNCATE TABLE friends_info"; executeQuery($query, $con, "Table Cleared"); // Add all the friends to the table friends_info for ($i = 0; $i < $data_length; $i++) { $id = $data[$i][id]; // STATUS - PLAYER - FBID $query = "INSERT INTO friends_info VALUES('N', '1', '{$id}')"; executeQuery($query, $con, "1 record added"); } mysql_close($con); }
function loginUser() { $userName = $_REQUEST["userid"]; $pwd = $_REQUEST["password"]; $qry = "select * from user_pass where userid = \"" . $userName . "\" and password = \"" . $pwd . "\";"; //echo "<br> Login QRy : ".$qry; $userRows = executeQuery($qry); $cnt = 0; while ($row = mysql_fetch_assoc($userRows)) { $userId = $row['userid']; $cnt++; } if ($cnt == 0) { return "failed"; } else { $qry = "select * from user_base where userid = \"" . $userName . "\";"; //echo "<br> Login User info QRy : ".$qry; $userRows = executeQuery($qry); $usrName = "Naren"; while ($row = mysql_fetch_assoc($userRows)) { $userBean = $row; } //session_start(); $_SESSION['userBean'] = $userBean; return "logged"; } }
/** * @brief inserts virtual account numbers into the paypal DB table, called by dispPaypalAdminInsert */ function procPaypalAdminInsert() { $count = 0; // count for inserting records $bank = Context::get('bank'); $van_list = explode("\n", Context::get('van_list')); foreach ($van_list as $van) { if (!$van) { continue; } // check if $van is empty $args = new stdClass(); $args->bank = $bank; $args->van = trim($van); $output = executeQuery('paypal.insertAccount', $args); if (!$output->toBool()) { return $output; } $count++; } $this->setMessage(sprintf(Context::getLang('msg_regist_count'), $count)); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', Context::get('module'), 'act', 'dispPaypalAdminInsert'); $this->setRedirectUrl($returnUrl); } }
/** * @brief 설치시 추가 작업이 필요할시 구현 **/ function moduleInstall() { /** * planet 이라는 mid를 미리 입력해 놓음 * 이 mid는 차후 수정 가능하고 planet 메인 페이지를 사용하기 위한 더미 형식의 mid로 사용됨. * 만약 이미 존재하는 경우를 대비해서 뒤에 숫자를 붙이도록 함. **/ $oModuleModel =& getModel('module'); $oModuleController =& getController('module'); $oPlanetController =& getController('planet'); $module_info = $oModuleModel->getModuleConfig('planet'); if ($module_info->mid) { $_o = executeQuery('module.getMidInfo', $module_info); if (!$_o->data) { unset($module_info); } } if (!$module_info->mid) { $args->module = 'planet'; $args->browser_title = 'planetXE'; $args->skin = 'xe_planet'; $args->is_default = 'N'; $args->mid = 'planet'; $args->module_srl = getNextSequence(); $output = $oModuleController->insertModule($args); $planet_args->mid = $args->mid; $oPlanetController->insertPlanetConfig($planet_args); } // 2009. 01. 29 아이디 클릭시 나타나는 팝업메뉴에 플래닛 보기 기능 추가 $oModuleController->insertTrigger('member.getMemberMenu', 'planet', 'controller', 'triggerMemberMenu', 'after'); // 2009. 05. 07 개별 플래닛에서 메인 플래닛의 레이아웃을 승계하기 위한 트리거 추가 $oModuleController->insertTrigger('moduleHandler.init', 'planet', 'controller', 'triggerSetLayout', 'after'); }
/** * @brief 설치시 추가 작업이 필요할시 구현 **/ function moduleInstall() { // action forward에 등록 (관리자 모드에서 사용하기 위함) $oModuleController =& getController('module'); $oModuleModel =& getModel('module'); // 2007. 10. 17 아이디 클릭시 나타나는 팝업메뉴에 작성글 보기 기능 추가 $oModuleController->insertTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after'); // 기본 게시판 생성 $args->site_srl = 0; $output = executeQuery('module.getSite', $args); if (!$output->data->index_module_srl) { $args->mid = 'board'; $args->module = 'board'; $args->browser_title = 'XpressEngine'; $args->skin = 'xe_default'; $args->site_srl = 0; $output = $oModuleController->insertModule($args); $module_srl = $output->get('module_srl'); $site_args->site_srl = 0; $site_args->index_module_srl = $module_srl; $oModuleController =& getController('module'); $oModuleController->updateSite($site_args); } return new Object(); }
function getAllAppliances() { include 'config.php'; $query = "SELECT * FROM " . $APPLIANCE_TABLE_FIELD_NAME . " ORDER BY " . $APPLIANCE_ID_FK_FIELD_NAME; $result = executeQuery($query); return $result; }
function searchCampeonatoId($objCampeonato) { $sqlCommand = 'SELECT * FROM campeonato WHERE id =:id'; $parameters = array(); $parameters[':id'] = $objCampeonato->id; return executeQuery($sqlCommand, $parameters); }
function getUsuario($objUsuario) { $sqlCommand = 'SELECT * ' . 'FROM usuario ' . 'WHERE Id = :id '; $parameters = array(); $parameters[':id'] = $objUsuario->id; return executeQuery($sqlCommand, $parameters); }
function Settings($withInit = TRUE) { global $dbPrefix; static $singleton = array(); // Pl. A Settings form elotti initClassVars elott // inicializalas nelkul kell letrehozni egy init objektumot: if (!$withInit) { return; } // get classname $class = get_class($this); if (!array_key_exists($class, $singleton)) { if (!mysql_num_rows(executeQuery("SHOW TABLES LIKE '{$dbPrefix}" . $this->get_table() . "'"))) { return; } // ha nem letezik meg a settings table (install) $this->id = 1; if (load($this)) { return; } // ha a table mar letezik, de nincs nne semmi $singleton[$class] = $this; } // PHP doesn't allow us to assign a reference to $this, so we do this // little trick and fill our new object with references to the original // class' variables: $typ =& $this->getTypeInfo(); foreach ($typ["attributes"] as $attr => $value) { if (isset($singleton[$class]->{$attr})) { $this->{$attr} =& $singleton[$class]->{$attr}; } } }