예제 #1
0
파일: pps.php 프로젝트: xpd1437/swap
 protected static function do_render_in($_view_dir, $_pps_type, target $_target)
 {
     foreach ($_target->get_param('link', []) as $_linked_name) {
         $_file = $_pps_type . '/' . $_linked_name . '.' . $_pps_type;
         $_pps_file = $_view_dir . '/' . $_file;
         if (is_readable($_pps_file)) {
             if (kernel::is_debug()) {
                 echo "\n/******** {$_file} ********/\n\n";
             }
             require $_pps_file;
         }
     }
     $_layout_name = $_target->get_param('layout', '');
     if ($_layout_name !== '') {
         $_file = 'layout/' . $_layout_name . '.' . $_pps_type;
         $_pps_file = $_view_dir . '/' . $_file;
         if (is_readable($_pps_file)) {
             if (kernel::is_debug()) {
                 echo "\n/******** {$_file} ********/\n\n";
             }
             require $_pps_file;
         }
     }
     foreach ($_target->get_param('block', []) as $_block_name) {
         $_file = 'block/' . $_block_name . '.' . $_pps_type;
         $_pps_file = $_view_dir . '/' . $_file;
         if (is_readable($_pps_file)) {
             if (kernel::is_debug()) {
                 echo "\n/******** {$_file} ********/\n\n";
             }
             require $_pps_file;
         }
     }
     if ($_target->get_target_name() !== '') {
         $_file = 'page/' . $_target->get_target_file('.' . $_pps_type);
         $_pps_file = $_view_dir . '/' . $_file;
         if (is_readable($_pps_file)) {
             if (kernel::is_debug()) {
                 echo "\n/******** {$_file} ********/\n\n";
             }
             require $_pps_file;
         }
     }
 }
예제 #2
0
<?php

$PAGE = "S_REPORT_MONTHLY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Report.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    $report = new report($request);
    $target = new target($request);
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        $termid = getTermId($date);
        $param['date'] = $date;
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        $month = sprintf('%01d', $month);
        $param['target_date'] = $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);
예제 #3
0
파일: list.php 프로젝트: te-koyama/sheep
<?php

$PAGE = "S_TARGET_LIST";
require_once '../_init_auth.php';
require_once 'target/class.Target.php';
try {
    $param = array();
    $param['page'] = $PAGE;
    $authority = $_SESSION[SESSION_GROUP_CD];
    //人事、開発以外はじく
    if (!in_array(ACCOUNT_DEVEL, $authority) && !in_array(ACCOUNT_HUMAN_RESOURCES, $authority)) {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    $target = new target($request);
    //新入社員が所属している本部リスト取得
    $list = $target->getAssignList();
    //パラメータ設定
    $param['list'] = $list;
    // //画面遷移
    renderTemplate("target/list.tpl", $param);
} catch (Exception $e) {
    $param['errors'][] = "システムエラーが発生しました。";
    renderTemplate('error.tpl', $param);
    exit;
}
예제 #4
0
파일: edit.php 프로젝트: te-koyama/sheep
<?php

$PAGE = "S_TARGET_EDIT";
require_once '../_init_auth.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    if (!in_array(ACCOUNT_DEPARTMENT, $_SESSION[SESSION_GROUP_CD])) {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    $target = new target($request);
    if (isset($request['year'])) {
        $year = $request['year'];
    } else {
        $year = date('Y');
    }
    if (isset($request['id']) && is_numeric($request['id'])) {
        $id = $request['id'];
    } else {
        $id = $_SESSION[SESSION_USER_ID];
        //         $param['errors'][] = "システムエラーが発生しました。";
        //         renderTemplate('error.tpl', $param);
        //         exit;
    }
    $department_cd = null;
    if (isset($request['department_cd'])) {
        $department_cd = $request['department_cd'];
        $param['department_cd'] = $department_cd;
    }
예제 #5
0
파일: index.php 프로젝트: te-koyama/sheep
<?php

$PAGE = "S_TARGET";
require_once '../_init_auth.php';
require_once 'target/class.Target.php';
try {
    $target = new target($request);
    $param['page'] = $PAGE;
    if (isset($request['year'])) {
        $year = $request['year'];
    } else {
        $year = date('Y');
    }
    if (isset($request['id'])) {
        $id = $request['id'];
    } else {
        //error
    }
    $department_cd = null;
    if (isset($request['department_cd'])) {
        $department_cd = $request['department_cd'];
        $param['department_cd'] = $department_cd;
    }
    $division_cd = null;
    if (isset($request['division_cd'])) {
        $division_cd = $request['division_cd'];
        $param['division_cd'] = $division_cd;
    }
    if (empty($department_cd)) {
        throw new Exception("システムエラー:本部CDが指定されていません");
        #部署CD(本部CDに9999が指定される条件にて発生)
예제 #6
0
파일: visitor.php 프로젝트: xpd1437/swap
 public static function set_target(target $target)
 {
     self::$configs = config::get_module('visitor', ['cookie_domain' => '', 'roles' => []]);
     self::$request['gets'] = array_merge(self::$request['gets'], $target->get_params());
     self::$request['target'] = $target;
 }
예제 #7
0
파일: php.php 프로젝트: xpd1437/swap
 public static function forward_to($target, $deny_self = true)
 {
     if (!$target instanceof target) {
         $target = new target($target);
     }
     if ($deny_self && $target->get_target_name() === parent::$target->get_target_name()) {
         throw new developer_error('cannot forward to self');
     }
     $forward = new action_forward();
     $forward->set_target($target);
     throw $forward;
 }
예제 #8
0
파일: step.php 프로젝트: dg711/moodle
 /**
  * Get the target instance for this step.
  *
  * @return  target
  */
 public function get_target()
 {
     return target::get_target_instance($this);
 }
예제 #9
0
파일: router.php 프로젝트: xpd1437/swap
 public static function build_csrf_url($csrf_role, $target, $echo = true, $for_html = true, $as_absolute = true)
 {
     if (!$target instanceof target) {
         $target = new target($target);
     }
     if (visitor::has_role($csrf_role)) {
         $role_secret = visitor::get_role_secret($csrf_role);
         $csrf_key = self::$base_csrf_key;
         if ($target->has_module()) {
             $csrf_key = self::$module_csrf_keys[$target->get_module_name()];
         }
         $target->set_param($csrf_key, $role_secret);
     }
     return self::build_php_url($target, $echo, $for_html, $as_absolute);
 }
예제 #10
0
파일: target.php 프로젝트: uvbs/MyProjects
<?php

require_once 'object_set.php';
class target extends object_set
{
    function table_name()
    {
        return "t_target";
    }
    function auto_id()
    {
        return true;
    }
}
$target = new target();
$target->process();
예제 #11
0
<?php

$PAGE = "S_TARGET_EDIT";
require_once '../_init_auth.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    $target = new target($request);
    if (isset($request['year'])) {
        $year = $request['year'];
    } else {
        $year = date('Y');
    }
    //id取得
    if (isset($request['target_id'])) {
        $target_id = $request['target_id'];
    }
    if (isset($request['title'])) {
        $title = $request['title'];
    }
    if (isset($request['note'])) {
        $note = $request['note'];
    }
    if (isset($request['level1'])) {
        $level1 = $request['level1'];
    }
    if (isset($request['level2'])) {
        $level2 = $request['level2'];
    }
    if (isset($request['level3'])) {
        $level3 = $request['level3'];
예제 #12
0
<?php

//header('Content-Type:application/json');
class target
{
    public function write($stroke)
    {
        $file = fopen("data/target.txt", "w");
        fwrite($file, "{$stroke}");
    }
}
$obj = new target();
if (isset($_POST["send"])) {
    $exp = explode(",", $_POST["send"]);
    $arr = array();
    foreach ($exp as $val) {
        $val = trim($val);
        $val = mysql_real_escape_string($val);
        $val = strip_tags($val);
        if ($val != "") {
            $arr[] = $val;
        }
    }
    $stroke = implode(",", $arr);
    $obj->write($stroke);
}
if (isset($_POST["pas"])) {
    $pas = $_POST["pas"];
    $error = "wrong password";
    $secr = file_get_contents('data/omg.txt');
    if ($secr != md5($pas)) {
예제 #13
0
<?php

$PAGE = "S_REPORT_MONTHLY";
require_once '../_init_auth.php';
require_once 'report/class.Report.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    $report = new report($request);
    $target = new target($request);
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        $termid = getTermId($date);
        $param['date'] = $date;
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        $month = sprintf('%01d', $month);
        $param['target_date'] = $date;
    } else {
        //初期表示
        $date = date('Ymd');
        $year = date('Y');
        $month = date('n');
        $termid = getTermId($date);
        $param['target_date'] = $date;
    }
    //新入社員情報取得
    if (isset($request['id']) && is_numeric($request['id'])) {
        $employee = $report->getEmpData($request['id']);