ohctech_p8/review_ohc_selection.php
2024-10-16 19:18:52 +05:30

32 lines
1.1 KiB
PHP

<?php
include_once('techsyn_header_blank.php');
$_SESSION['current_ohcttype'] = $_POST['ohc_type'];
$sql = "select ohc_type_name from ohc_type where ohc_type_id ='" . $_POST['ohc_type'] . "'";
// echo $sql;
$result = mysqli_query($conn, $sql);
$num = @mysqli_num_rows($result);
if ($num > 0) {
if ($row = @mysqli_fetch_array($result)) {
$_SESSION['current_ohcttype_name'] = $_REQUEST['ohc_type_name'];
}
}
if (isset($_SESSION['role_home_page']) && sizeOf($_SESSION['role_home_page']) > 0) {
$roles_str = getTableFieldValue('tbl_users', 'role_id', 'user_id', $_SESSION['user_id']);
$roles_arr = explode(',', $roles_str);
// $_SESSION['roleids'] = $roles_str;
// error_log('assign roles=' . count(($roles_arr)));
if (count(($roles_arr)) > 1) {
echo "<script>location.replace('interim_role_selection.php')</script>";
} else {
echo "<script>location.replace('" . $_SESSION['role_home_page'] . "')</script>";
}
} else {
$_SESSION['role_home_page'] = "home.php";
echo "<script>location.replace('home.php')</script>";
}
//echo "<script>location.replace('home.php')</script>";