예제 #1
0
     $controller->set_mode($mode);
     $html = $controller->process();
     break;
 case 'register':
     include 'controllers/register.class.php';
     $controller = new register();
     $controller->set_mode($mode);
     $html = $controller->process();
     break;
 case 'logout':
     $user->set_logout();
     redirect('');
     break;
 case 'profile':
     include 'controllers/edit.class.php';
     $controller = new edit();
     $controller->set_mode($mode);
     $html = $controller->process();
     break;
 case 'members':
     include 'controllers/members.class.php';
     $controller = new members();
     $controller->set_mode($mode);
     $html = $controller->process();
     break;
 case 'infos':
     include 'controllers/infos.class.php';
     $controller = new infos();
     $controller->set_mode($mode);
     $html = $controller->process();
     break;
예제 #2
0
<?php

$PAGE = "S_REPORT_DAILY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Report.php';
require_once 'report/class.Edit.php';
try {
    $param['page'] = $PAGE;
    $edit = new edit($request);
    $report = new report($request);
    $error = false;
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        //         $date = 20140101;
        $termid = getTermId($date);
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        //         $preg = '%02d%02d';
        //         $date =  sprintf('%04d', substr($date, 4, 4));
        //         $param['target_date'] = $date;
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    //新入社員情報取得
    $authority = $_SESSION[SESSION_GROUP_CD];
    //新入社員以外エラー
    if (in_array(ACCOUNT_NEW_EMP, $_SESSION[SESSION_GROUP_CD])) {
예제 #3
0
<?php

$PAGE = "S_REPORT_MONTHLY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Edit.php';
require_once 'report/class.Report.php';
try {
    $param['page'] = $PAGE;
    $edit = new edit($request);
    $report = new report($request);
    $error = false;
    $authority = $_SESSION[SESSION_GROUP_CD];
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        //         $termid = getTermId($date);
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    //新入社員情報取得
    if (isset($request['id'])) {
        $employee = $report->getEmpData($request['id']);
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
예제 #4
0
<?php

$PAGE = "S_REPORT_WEEKLY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Edit.php';
require_once 'report/class.Report.php';
try {
    $param['page'] = $PAGE;
    $report = new report($request);
    $edit = new edit($request);
    $paramflg = false;
    $error = false;
    $authority = $_SESSION[SESSION_GROUP_CD];
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        $term_id = getTermId($date);
        $param['date'] = $date;
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        $param['target_date'] = $date;
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    //m_termに存在しない日付の場合エラー文言表示
    //     $notExist = $report->notExistDate($year, $month);
    if (!$term_id) {
        $param['errors'][] = "システムエラーが発生しました。";
예제 #5
0
파일: mod_edit.php 프로젝트: poef/ariadne
 function _isEmpty($var)
 {
     return edit::isEmpty($var);
 }
예제 #6
0
파일: mod_url.php 프로젝트: poef/ariadne
 public static function ARtoRAW($page)
 {
     global $ARCurrent, $AR;
     $context = pobject::getContext();
     $me = $context["arCurrentObject"];
     $find = array();
     $repl = array();
     if ($ARCurrent->session && $ARCurrent->session->id) {
         $session = '/-' . $ARCurrent->session->id . '-';
     } else {
         $session = '';
     }
     $site = $me->currentsite($me->path, true);
     $root = $me->store->get_config("root");
     if (substr($root, -3) == "/{$me->nls}") {
         $root = substr($root, 0, -3);
     }
     if ($site && $site !== '/') {
         $page = preg_replace_callback("%\\{(?:arSite)(?:/([^}]+))?\\}\\Q\\E%", function ($matches) use($me, $site) {
             return $me->make_url($site, $matches[1]);
         }, $page);
         $page = preg_replace_callback("%\\{(?:arRoot|arBase)(?:/([^}]+))?\\}\\Q" . $site . "\\E%", function ($matches) use($me, $site) {
             return $me->make_url($site, $matches[1]);
         }, $page);
     }
     $find[] = "%\\{arBase(/(?:[^}]+))?\\}%";
     $repl[] = $AR->host . $root . "\\1";
     $find[] = "%\\{arRoot(/(?:[^}]+))?\\}%";
     $repl[] = $AR->host . $me->store->get_config("root") . "\\1";
     $page = preg_replace_callback("%\\{arCurrentPage(?:/([^}]+))?\\}%", function ($matches) use($me) {
         return $me->make_local_url('', $matches[1]);
     }, $page);
     $find[] = "%\\{arSession\\}%";
     $repl[] = $session;
     if (class_exists('edit', false) && edit::getEditMode()) {
         $find[] = "%ar:editable=([^ ]+)%";
         $repl[] = "contentEditable=\\1";
     }
     $page = preg_replace($find, $repl, $page);
     // FIXME: Maybe do not process arCall when ESI is enabled?
     $page = URL::processArCall($page, $full);
     return $page;
 }