本文整理汇总了PHP中getModel函数的典型用法代码示例。如果您正苦于以下问题:PHP getModel函数的具体用法?PHP getModel怎么用?PHP getModel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getModel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dispTrashAdminList
/**
* Trash list
* @return void
*/
function dispTrashAdminList()
{
$args->page = Context::get('page');
// /< Page
$args->list_count = 30;
// /< the number of posts to display on a single page
$args->page_count = 5;
// /< the number of pages that appear in the page navigation
$args->search_target = Context::get('search_target');
// /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword');
// /< keyword to search
$oTrashModel = getModel('trash');
$output = $oTrashModel->getTrashList($args);
// for no text comment language and for document manange language
$oCommentModel =& getModel('comment');
$oDocumentModel =& getModel('document');
Context::set('trash_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('trash_list');
}
示例2: dispStore_searchAdminSkinInfo
/**
* Skin Settings
*
* @return Object
*/
function dispStore_searchAdminSkinInfo()
{
$oModuleModel = getModel('module');
$module_srl = Context::get('module_srl');
// module_srl이 넘어오면 해당 모듈의 정보를 미리 구해 놓음
if($module_srl)
{
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
if(!$module_info)
{
Context::set('module_srl','');
$this->act = 'list';
}
else
{
$oModuleModel->syncModuleToSite($module_info);
$this->module_info = $module_info;
Context::set('module_info',$module_info);
}
}
// 공통 모듈 권한 설정 페이지 호출
$oModuleAdminModel = getAdminModel('module');
$skin_content = $oModuleAdminModel->getModuleSkinHTML($this->module_info->module_srl);
Context::set('skin_content', $skin_content);
$this->setTemplateFile('skininfo');
}
示例3: dispImporterAdminImportForm
/**
* Display a form to upload the xml file
* @return void
*/
function dispImporterAdminImportForm()
{
$oDocumentModel = getModel('document');
//for document lang use in this page
$this->setTemplatePath($this->module_path . 'tpl');
$this->setTemplateFile('index');
}
示例4: getCommunicationAdminColorset
/**
* the html to select colorset of the skin
* @return void
*/
function getCommunicationAdminColorset()
{
$skin = Context::get('skin');
$type = Context::get('type') == 'P' ? 'P' : 'M';
Context::set('type', $type);
if ($type == 'P') {
$dir = 'skins';
} else {
$dir = 'm.skins';
}
if (!$skin) {
$tpl = "";
} else {
$oModuleModel = getModel('module');
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir);
Context::set('skin_info', $skin_info);
$oModuleModel = getModel('module');
$communication_config = $oModuleModel->getModuleConfig('communication');
if (!$communication_config->colorset) {
$communication_config->colorset = "white";
}
Context::set('communication_config', $communication_config);
$security = new Security();
$security->encodeHTML('skin_info.colorset..title', 'skin_info.colorset..name');
$security->encodeHTML('skin_info.colorset..name');
$oTemplate = TemplateHandler::getInstance();
$tpl = $oTemplate->compile($this->module_path . 'tpl', 'colorset_list');
}
$this->add('tpl', $tpl);
$this->add('type', $type);
}
示例5: moduleUpdate
function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
$oDB =& DB::getInstance();
foreach ($this->triggers as $trigger) {
if (!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4])) {
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
}
}
if (!$oDB->isColumnExists('androidpushapp_gcmregid', 'member_srl')) {
$oDB->addColumn('androidpushapp_gcmregid', 'member_srl', 'number', 11);
}
if (!$oDB->isColumnExists('androidpushapp_gcmregid', 'setting')) {
$oDB->addColumn('androidpushapp_gcmregid', 'setting', 'text');
}
if (!$oDB->isColumnExists('androidpushapp_gcmregid', 'setting_board')) {
$oDB->addColumn('androidpushapp_gcmregid', 'setting_board', 'text');
}
if (!$oDB->isColumnExists('androidpushapp_gcmregid', 'last_login')) {
$oDB->addColumn('androidpushapp_gcmregid', 'last_login', 'date');
}
if (!$oDB->isColumnExists('androidpushapp_gcmregid', 'sort')) {
$oDB->addColumn('androidpushapp_gcmregid', 'sort', 'char', 1, 'W', 'true');
}
return new Object(0, 'success_updated');
}
示例6: dispCommentDeclare
/**
* Report an improper comment
* @return void
*/
function dispCommentDeclare()
{
$this->setLayoutFile('popup_layout');
$comment_srl = Context::get('target_srl');
$oMemberModel = getModel('member');
// A message appears if the user is not logged-in
if (!$oMemberModel->isLogged()) {
return $this->stop('msg_not_logged');
}
// Create the comment object.
$oCommentModel = getModel('comment');
// Creates an object for displaying the selected comment
$oComment = $oCommentModel->getComment($comment_srl);
if (!$oComment->isExists()) {
return new Object(-1, 'msg_invalid_request');
}
// Check permissions
if (!$oComment->isAccessible()) {
return new Object(-1, 'msg_not_permitted');
}
// Browser title settings
Context::set('target_comment', $oComment);
Context::set('target_srl', $comment_srl);
$this->setTemplatePath($this->module_path . 'tpl');
$this->setTemplateFile('declare_comment');
}
示例7: getNickChangeList
function getNickChangeList($obj)
{
$args->s_member_srl = $obj->member_srl;
$args->page = Context::get('page');
// /< Page
$args->list_count = 20;
// /< the number of posts to display on a single page
$args->page_count = 10;
// /< the number of pages that appear in the page navigation
$args->sort_index = 'regdate';
// /< sorting values
$args->order_type = 'desc';
// /< sorting values by order
if ($obj->search_target == 'nick_name') {
$args->nick_name_old = $obj->search_keyword;
$args->nick_name_new = $obj->search_keyword;
}
if ($obj->search_target == 'member_srl') {
$args->s_member_srl = $obj->search_keyword;
}
if ($obj->search_target == 'user_id') {
$oMemberModel =& getModel('member');
$member_info = $oMemberModel->getMemberInfoByUserID($obj->search_keyword);
$args->s_member_srl = $member_info->member_srl;
}
$output = executeQueryArray('sejin7940_nick.getNickChangeList', $args);
return $output;
}
示例8: getBoardAdminSimpleSetup
/**
* Get the board module admin simple setting page
* @return void
*/
public function getBoardAdminSimpleSetup($moduleSrl, $setupUrl)
{
if (!$moduleSrl) {
return;
}
Context::set('module_srl', $moduleSrl);
// default module info setting
$oModuleModel = getModel('module');
$moduleInfo = $oModuleModel->getModuleInfoByModuleSrl($moduleSrl);
$moduleInfo->use_status = explode('|@|', $moduleInfo->use_status);
if ($moduleInfo) {
Context::set('module_info', $moduleInfo);
}
// get document status list
$oDocumentModel = getModel('document');
$documentStatusList = $oDocumentModel->getStatusNameList();
Context::set('document_status_list', $documentStatusList);
// set order target list
foreach ($this->order_target as $key) {
$order_target[$key] = Context::getLang($key);
}
$order_target['list_order'] = Context::getLang('document_srl');
$order_target['update_order'] = Context::getLang('last_update');
Context::set('order_target', $order_target);
// for advanced language & url
$oAdmin = getClass('admin');
Context::set('setupUrl', $setupUrl);
// Extract admin ID set in the current module
$admin_member = $oModuleModel->getAdminId($moduleSrl);
Context::set('admin_member', $admin_member);
$oTemplate =& TemplateHandler::getInstance();
$html = $oTemplate->compile($this->module_path . 'tpl/', 'board_setup_basic');
return $html;
}
示例9: proc
/**
* @brief Widget execution
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
* After generating the result, do not print but return it.
*/
function proc($args)
{
// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);
// Specify a template file
if (Context::get('is_logged')) {
$tpl_file = 'login_info';
} else {
$tpl_file = 'login_form';
}
// Get the member configuration
$oModuleModel = getModel('module');
$this->member_config = $oModuleModel->getModuleConfig('member');
Context::set('member_config', $this->member_config);
// Set a flag to check if the https connection is made when using SSL and create https url
$ssl_mode = false;
$useSsl = Context::getSslStatus();
if ($useSsl != 'none') {
if (strncasecmp('https://', Context::getRequestUri(), 8) === 0) {
$ssl_mode = true;
}
}
Context::set('ssl_mode', $ssl_mode);
// Compile a template
$oTemplate =& TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
示例10: dispMessage
/**
* @brief Message output
**/
function dispMessage()
{
// Get configurations (using module model object)
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('message');
if (!$config->mskin) {
$config->mskin = 'default';
}
// Set the template path
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin);
// Get the member configuration
$oModuleModel = getModel('module');
$member_config = $oModuleModel->getModuleConfig('member');
Context::set('member_config', $member_config);
// Set a flag to check if the https connection is made when using SSL and create https url
$ssl_mode = false;
if ($member_config->enable_ssl == 'Y') {
if (strncasecmp('https://', Context::getRequestUri(), 8) === 0) {
$ssl_mode = true;
}
}
Context::set('ssl_mode', $ssl_mode);
Context::set('system_message', nl2br($this->getMessage()));
Context::set('act', 'procMemberLogin');
Context::set('mid', '');
$this->setTemplatePath($template_path);
$this->setTemplateFile('system_message');
}
示例11: moduleUpdate
/**
* @brief Execute update
*/
function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
// 2007.10.17 When deleting posts/comments delete the poll as well
if (!$oModuleModel->getTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after');
}
// 2008.04.22 A poll connection to add posts/comments
if (!$oModuleModel->getTrigger('document.insertDocument', 'poll', 'controller', 'triggerInsertDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.insertDocument', 'poll', 'controller', 'triggerInsertDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.insertComment', 'poll', 'controller', 'triggerInsertCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.insertComment', 'poll', 'controller', 'triggerInsertCommentPoll', 'after');
}
if (!$oModuleModel->getTrigger('document.updateDocument', 'poll', 'controller', 'triggerUpdateDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.updateDocument', 'poll', 'controller', 'triggerUpdateDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after');
}
return new Object(0, 'success_updated');
}
示例12: dispLdapAdminConfig
/**
* @brief 스팸필터의 설정 화면
**/
function dispLdapAdminConfig()
{
$oModel =& getModel('ldap');
Context::set('config', $oModel->getConfig());
// 템플릿 파일 지정
$this->setTemplateFile('index');
}
示例13: procCounterExecute
/**
* @brief 카운터 기록
**/
function procCounterExecute()
{
$oDB =& DB::getInstance();
$oDB->begin();
$site_module_info = Context::get('site_module_info');
$site_srl = (int) $site_module_info->site_srl;
// 로그를 검사
$oCounterModel =& getModel('counter');
// 오늘자 row가 있는지 체크하여 없으면 등록
if (!$oCounterModel->isInsertedTodayStatus($site_srl)) {
$this->insertTodayStatus(0, $site_srl);
// 기존 row가 있으면 사용자 체크
} else {
// 등록되어 있지 않은 아이피일 경우
if (!$oCounterModel->isLogged($site_srl)) {
// 로그 등록
$this->insertLog($site_srl);
// unique 및 pageview 등록
$this->insertUniqueVisitor($site_srl);
} else {
// pageview 등록
$this->insertPageView($site_srl);
}
}
$oDB->commit();
}
示例14: moduleUpdate
/**
* @brief Execute update
**/
function moduleUpdate()
{
$oModuleModel =& getModel('module');
$oModuleController =& getController('module');
$oDB =& DB::getInstance();
// 2007. 10. 17 document.insertDocument, updateDocument, deleteDocument trigger property for
if (!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerArrangeTag', 'before')) {
$oModuleController->insertTrigger('document.insertDocument', 'tag', 'controller', 'triggerArrangeTag', 'before');
}
if (!$oModuleModel->getTrigger('document.insertDocument', 'tag', 'controller', 'triggerInsertTag', 'after')) {
$oModuleController->insertTrigger('document.insertDocument', 'tag', 'controller', 'triggerInsertTag', 'after');
}
if (!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerArrangeTag', 'before')) {
$oModuleController->insertTrigger('document.updateDocument', 'tag', 'controller', 'triggerArrangeTag', 'before');
}
if (!$oModuleModel->getTrigger('document.updateDocument', 'tag', 'controller', 'triggerInsertTag', 'after')) {
$oModuleController->insertTrigger('document.updateDocument', 'tag', 'controller', 'triggerInsertTag', 'after');
}
if (!$oModuleModel->getTrigger('document.deleteDocument', 'tag', 'controller', 'triggerDeleteTag', 'after')) {
$oModuleController->insertTrigger('document.deleteDocument', 'tag', 'controller', 'triggerDeleteTag', 'after');
}
// 2007. 10. 17 modules are deleted when you delete all registered triggers that add tag
if (!$oModuleModel->getTrigger('module.deleteModule', 'tag', 'controller', 'triggerDeleteModuleTags', 'after')) {
$oModuleController->insertTrigger('module.deleteModule', 'tag', 'controller', 'triggerDeleteModuleTags', 'after');
}
// tag in the index column of the table tag
if (!$oDB->isIndexExists("tags", "idx_tag")) {
$oDB->addIndex("tags", "idx_tag", array("document_srl", "tag"));
}
return new Object(0, 'success_updated');
}
示例15: triggerDispFileAdditionSetup
/**
* @brief 서비스형 모듈의 추가 설정을 위한 부분
* file의 사용 형태에 대한 설정만 받음
**/
function triggerDispFileAdditionSetup(&$obj)
{
$current_module_srl = Context::get('module_srl');
$current_module_srls = Context::get('module_srls');
if (!$current_module_srl && !$current_module_srls) {
// 선택된 모듈의 정보를 가져옴
$current_module_info = Context::get('current_module_info');
$current_module_srl = $current_module_info->module_srl;
if (!$current_module_srl) {
return new Object();
}
}
// 선택된 모듈의 file설정을 가져옴
$oFileModel =& getModel('file');
$file_config = $oFileModel->getFileModuleConfig($current_module_srl);
Context::set('file_config', $file_config);
// 그룹의 설정을 위한 권한 가져오기
$oMemberModel =& getModel('member');
$site_module_info = Context::get('site_module_info');
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
Context::set('group_list', $group_list);
// 템플릿 파일 지정
$oTemplate =& TemplateHandler::getInstance();
$tpl = $oTemplate->compile($this->module_path . 'tpl', 'file_module_config');
$obj .= $tpl;
return new Object();
}