public static function test($roles) { $ad = new AdminDao(); $current = $ad->getLoginRole(); if (count(array_intersect($roles, $current))) { return TRUE; } else { return FALSE; } }
<?php require '../dao/AdminDao.php'; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $obj_arr = $adminDao->getScholarship($sc_admin); echo json_encode($obj_arr);
<?php require '../dao/AdminDao.php'; $id = $_REQUEST['id']; $adminDao = new AdminDao(); $result = false; if ($adminDao->delItemScore($id) > 0) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; $id = $_REQUEST['id']; $adminDao = new AdminDao(); $result = false; if ($adminDao->delComp($id) > 0) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $obj_arr = $adminDao->getActivityComp($sc_admin); echo json_encode($obj_arr);
<?php require '../dao/AdminDao.php'; $cp_name = $_REQUEST['cp_name']; $cp_rate = $_REQUEST['cp_rate']; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $result = false; if ($adminDao->setScieTechComp($cp_name, $cp_rate, $sc_admin) > 0) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $obj_arr = $adminDao->getScieTechComp($sc_admin); echo json_encode($obj_arr);
<?php require '../dao/AdminDao.php'; $cp_name = $_REQUEST['cp_name']; $cp_rate = $_REQUEST['cp_rate']; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $result = false; if ($adminDao->setActivityComp($cp_name, $cp_rate, $sc_admin) > 0) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; $name = $_REQUEST['name']; $describe_a = $_REQUEST['describe_a']; $describe_b = $_REQUEST['describe_b']; $type = $_REQUEST['type']; $score = (int) $_REQUEST['score']; $ratio = (double) $_REQUEST['ratio']; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $result = false; if ($adminDao->setItemScore($name, $describe_a, $describe_b, $score, $ratio, $sc_admin, $type) > 0) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; $name = $_REQUEST['name']; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $obj_arr = $adminDao->getItemScore($name, $sc_admin); echo json_encode($obj_arr);
<?php require '../dao/AdminDao.php'; $sc_name = $_REQUEST['sc_name']; $sc_ratio = $_REQUEST['sc_ratio']; session_start(); $sc_admin = $_SESSION['admin']; $adminDao = new AdminDao(); $result = false; if ($adminDao->setScholarship($sc_name, $sc_ratio, $sc_admin) == 1) { $result = true; } echo $result;
<?php require '../dao/AdminDao.php'; session_start(); $ad_id = $_SESSION['admin']; $adminDao = new AdminDao(); $obj_arr = $adminDao->getAdminSetting($ad_id); echo json_encode($obj_arr);