コード例 #1
0
 public function process()
 {
     \CADB\Lib\importResource('app-field-edit');
     $context = \CADB\Model\Context::instance();
     $this->layout = 'admin';
     $this->taxonomy = \CADB\Taxonomy\DBM::getTaxonomyList();
     $this->fields = \CADB\Organize::getFieldInfo(0);
 }
コード例 #2
0
 public function process()
 {
     \CADB\Lib\importResource('es6-promise');
     \CADB\Lib\importResource('jquery-scrollTo');
     $this->react[] = 'public/js/bundle.js';
     $this->css[] = 'app-front.css';
     $context = \CADB\Model\Context::instance();
 }
コード例 #3
0
 public function process()
 {
     $context = \CADB\Model\Context::instance();
     \CADB\Lib\importResource('app-guide-edit');
     $this->layout = 'admin';
     if (!$this->params['nid']) {
         \CADB\Lib\Error('모범단체협약서 번호를 입력하세요.');
     }
     if (!$this->themes) {
         $this->themes = $context->getProperty('service.themes');
     }
     $this->fields = \CADB\Guide::getFieldInfo(1);
     $this->guide = \CADB\Guide\DBM::getGuide($this->params['nid']);
     if (!$this->guide) {
         \CADB\Lib\Error('존재하지않는 모범단체협약서입니다.');
     }
     $this->taxonomylist = \CADB\Taxonomy\DBM::getTaxonomyList();
     $taxonomys = \CADB\Guide\DBM::getTaxonomy($this->guide['cid']);
     $this->taxonomy = \CADB\Taxonomy::getTaxonomy($taxonomys);
     $taxonomy_terms = \CADB\Taxonomy::getTaxonomyTerms($taxonomys);
     foreach ($taxonomy_terms as $c => $taxo) {
         foreach ($taxo as $t => $term) {
             $this->taxonomy_terms[$c][$term['parent']][$t] = $term;
         }
     }
     $this->current_taxonomys = $taxonomys;
     $clauses = \CADB\Guide\DBM::getClauses($this->params['nid']);
     $c = 0;
     foreach ($clauses as $i => $cl) {
         if (!$c) {
             $this->preamble = \CADB\Guide::getClause($cl['id']);
         }
         if (!$cl['parent']) {
             $cl['nsubs'] = 0;
             $cl['articles'] = array();
             $this->indexes[$i] = $cl;
             $index_map[$cl['id']] = $i;
         } else {
             $idx = $index_map[$cl['parent']];
             $this->indexes[$idx]['articles'][] = $cl;
             $this->indexes[$idx]['nsubs']++;
         }
         $c++;
     }
     if ($this->preamble) {
         $this->preamble['terms'] = \CADB\Guide\DBM::getClauseTerms($this->guide['vid'], $this->preamble['id']);
     }
 }
コード例 #4
0
 public function process()
 {
     $context = \CADB\Model\Context::instance();
     if ($this->params['request_URI']) {
         $redirect_uri .= "?requestURI=" . rawurldecode($this->params['request_URI']);
     }
     if ($this->params['output'] != "json" && $this->params['output'] != "xml") {
         \CADB\Lib\importResource('app-login', true);
     }
     if (\CADB\Lib\doesHaveMembership()) {
         if ($this->params['output'] == "xml") {
             Respond::ResultPage(array(2, "이미 로그인하셨습니다"));
         } else {
             if ($this->params['output'] == "json") {
                 RespondJson::ResultPage(array(2, "이미 로그인하셨습니다"));
             } else {
                 Respond::ResultPage(array(-3, "이미 로그인하셨습니다."));
             }
         }
     }
     $this->title = $context->getProperty('service.title') . " 로그인";
 }
コード例 #5
0
 public function render()
 {
     global $uri, $browser;
     $context = \CADB\Model\Context::instance();
     /**
      * @brief settting gloabl variables to be used in themes
      **/
     global $user;
     $this->breadcrumbs = ltrim(substr($uri->uri['appPath'], strlen(CADB_PATH)), '/');
     if ($uri->uri['appFile'] != 'index') {
         $this->breadcrumbs .= "/" . $uri->uri['appFile'];
     }
     $this->MyAppClass();
     if (isset($this->owner) && !$this->owner) {
         $this->owner = Acl::imMaster();
     }
     if (!$this->user) {
         if ($_SESSION['user']) {
             $user = array_merge($user, $_SESSION['user']);
         }
     } else {
         $user = $this->user;
     }
     if ($this->total_cnt) {
         $this->PageNavigation();
     }
     if ($this->contentType == "redirect") {
         header("Location: {$this->redirectURI}");
     } else {
         if ($this->params['output'] == "xml" || $this->contentType == "xml") {
             extract((array) $this);
             if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".xml.php")) {
                 include $this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".xml.php";
             } else {
                 if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['process'] . ".xml.php")) {
                     include $this->params['controller']['path'] . "/" . $this->params['controller']['process'] . ".xml.php";
                 } else {
                     \CADB\Respond::NotFoundPage(true);
                 }
             }
         } else {
             if ($this->params['browserType'] == 'api' || $this->params['output'] == 'json' || $this->contentType == "json") {
                 extract((array) $this);
                 header("Content-Type: application/json; charset=utf-8");
                 if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".json.php")) {
                     include $this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".json.php";
                 } else {
                     if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['process'] . ".json.php")) {
                         include $this->params['controller']['path'] . "/" . $this->params['controller']['process'] . ".json.php";
                     } else {
                         print json_encode(array());
                     }
                 }
             } else {
                 if (!$this->themes) {
                     $this->themes = $context->getProperty('service.themes');
                 }
                 if ($this->params['output'] != "nolayout") {
                     /**
                      * @brief default javascript 를 호출. ex jquery
                      **/
                     //				\CADB\View\Resource::addScript("jquery.min.js");
                     $this->initJs($this->initscript);
                     //				\CADB\View\Resource::addScript("defaults.js",-100,array('compress'=>true));
                     //				\CADB\View\Resource::addCss("defaults.css",-100,array('compress'=>true));
                     /**
                      * @brief resource/css에서 불러오도록 지정된 css들의 경로를 잡아준다.
                      **/
                     if (@count($this->css)) {
                         foreach ($this->css as $css) {
                             \CADB\View\Resource::addCss($css, 0, array('compress' => true));
                         }
                     }
                     /**
                      * @brief 해당 controller 경로에 style.css가 있으면 이 경로 밑에 있는 모는 페이지는 이 style.css를 포함한다.
                      **/
                     if (file_exists($this->params['controller']['path'] . "/style.css")) {
                         \CADB\View\Resource::addCssURI($this->params['controller']['uri'] . "/style.css", 0, array('compress' => true));
                     }
                     /**
                      * @brief 해당 controller에 매치되는 controller.css가 있으면 포함한다.
                      **/
                     if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".css")) {
                         \CADB\View\Resource::addCssURI($this->params['controller']['uri'] . "/" . $this->params['controller']['file'] . ".css", 0, array('compress' => true));
                     }
                     /**
                      * @brief resource/script에서 불러오도록 지정된 script들의 경로를 잡아준다.
                      **/
                     if (@count($this->js)) {
                         foreach ($this->js as $js) {
                             \CADB\View\Resource::addJs($js, 0, array('compress' => true));
                         }
                     }
                     if (@count($this->react)) {
                         foreach ($this->react as $script) {
                             \CADB\View\Resource::addReact($script, 0, array('compress' => false, 'position' => 'footer'));
                         }
                     }
                     if (@count($this->babel)) {
                         \CADB\Lib\importResource('babel');
                         foreach ($this->babel as $script) {
                             \CADB\View\Resource::addScript($script, 0, array('compress' => true, 'type' => 'babel'));
                         }
                     }
                     if (@count($this->script)) {
                         foreach ($this->script as $script) {
                             \CADB\View\Resource::addScript($script, 0, array('compress' => true));
                         }
                     }
                     /**
                      * @brief 해당 controller 경로에 script.js가 있으면 이 경로 밑에 있는 모는 페이지는 이 script.js를 포함한다.
                      **/
                     if (file_exists($this->params['controller']['path'] . "/script.js")) {
                         \CADB\View\Resource::addJsURI($this->params['controller']['uri'] . "/script.js", 0, array('compress' => true));
                     }
                     /**
                      * @brief 해당 controller에 매치되는 controller.js가 있으면 포함한다.
                      **/
                     if (file_exists($this->params['controller']['path'] . "/" . $this->params['controller']['file'] . ".js")) {
                         \CADB\View\Resource::addJsURI($this->params['controller']['uri'] . "/" . $this->params['controller']['file'] . ".js", 0, array('compress' => true));
                     }
                     /**
                      * @brief themes에 있는 기본 css와 script 들을 가장 먼저 포함한다.
                      **/
                     $this->initTheme();
                     if ($this->layout == "admin") {
                         \CADB\Lib\importResource('app-admin');
                     }
                     if ($html_file = $this->appPath()) {
                         $this->themeCssJs($html_file);
                     }
                     /* FaceBook plugin */
                     $this->body_start = '';
                 }
                 extract((array) $this);
                 if ($html_file = $this->appPath()) {
                     ob_start();
                     include $this->renderPath($html_file);
                     $content = ob_get_contents();
                     ob_end_clean();
                     $layout_file = $this->LayoutFile();
                 } else {
                     \CADB\Respond::NotFoundPage();
                 }
                 if ($this->params['output'] == "nolayout") {
                     header("Content-Type:text/html; charset=utf-8");
                     echo $content;
                 } else {
                     /**
                      * @brief make admin theme
                      **/
                     if ($this->layout == 'admin' && file_exists(CADB_APP_PATH . "/admin/layout.html.php")) {
                         ob_start();
                         include CADB_APP_PATH . "/admin/layout.html.php";
                         $content = ob_get_contents();
                         ob_end_clean();
                     }
                     /**
                      * @brief make html result using theme layout
                      **/
                     if ($layout_file) {
                         ob_start();
                         include $layout_file;
                         $html = ob_get_contents();
                         ob_end_clean();
                         print $html;
                     }
                 }
             }
         }
     }
 }
<?php

\CADB\Lib\importResource('app-member-gnu5-edit');
?>
		<form id="member-edit-form">
			<input type="hidden" name="mode" value="<?php 
print $mode;
?>
" />
			<input type="hidden" name="mb_no" value="<?php 
print $member['mb_no'];
?>
" />
			<div class="fields-wrapper">
				<fieldset class="fields-member">
					<label class="field" for="mb_id">아이디</label>
					<div class="member-form">
						<input type="text" id="mb_id" name="mb_id" value="<?php 
print $member['mb_id'];
?>
" />
					</div>
				</fieldset>
				<fieldset class="fields-member">
					<label class="field" for="mb_password">비밀번호</label>
					<div class="member-form">
						<input type="password" id="mb_password" name="mb_password" value="" />
					</div>
				</fieldset>
				<fieldset class="fields-member">
					<label class="field" for="mb_password_confirm">비밀번호 확인</label>
コード例 #7
0
<?php

\CADB\Lib\importResource("jquery");
\CADB\Lib\importResource("NanumBarunGothic");
\CADB\Lib\importResource("Font-Awesome");
コード例 #8
0
<?php

\CADB\Lib\importResource('app-org-edit');
?>
		<form id="org-edit-form">
			<input type="hidden" name="oid" value="<?php 
print $organize['oid'];
?>
" />
			<input type="hidden" name="vid" value="<?php 
print $organize['vid'];
?>
" />
			<div class="fields-wrapper">
				<fieldset class="fields-org org-name">
					<input type="hidden" name="p1" id="p1" class="org-parent" value="<?php 
print $organize['p1'];
?>
" />
					<label class="field" for="nojo">노조명</label>
<?php 
if ($level <= 1) {
    ?>
					<div class="org-name-form collapsed">
						<div class="org-input-form">
							<input type="text" name="nojo" id="nojo" class="org-name" data-depth="1" value="<?php 
    print $organize['nojo'];
    ?>
" />
						</div>
						<div class="org-search-form">
コード例 #9
0
<?php

\CADB\Lib\importResource('app-article-edit');
?>
	<form id="article-edit-form">
		<input type="hidden" name="nid" value="<?php 
print $articles['nid'];
?>
" />
		<input type="hidden" name="did" value="<?php 
print $articles['did'];
?>
" />
		<fieldset class="form-header">
			<div class="form-header-fixed app-page">
				<fieldset class="fields-guide-group collapsed">
<?php 
foreach ($guide_taxonomy_terms as $cid => $g_taxonomy_terms) {
    \CADB\View\Component::getComponent('form/guide', array('cid' => $cid, 'guide_taxonomy_terms' => $g_taxonomy_terms));
}
?>
				</fieldset>
				<fieldset class="fields-title">
					<legend><span>단체협약 <?php 
print $articles['nid'] ? '수정하기' : '추가하기';
?>
</span></legend>
				</fieldset>
			</div>
		</fieldset>
		<fieldset class="fields-group meta">