Пример #1
0
function check_upi2db_on($user_data)
{
    global $config;
    $user_upi2db_on = $user_data['user_upi2db_which_system'];
    $user_upi2db_disable = $user_data['user_upi2db_disable'];
    $admin_upi2db_on = $config['upi2db_on'];
    if ($config['board_disable'] || $user_upi2db_disable || !$user_data['session_logged_in'] || !$admin_upi2db_on) {
        return false;
    } elseif ($admin_upi2db_on == 1 || $admin_upi2db_on == 2 && $user_upi2db_on == 1) {
        return check_group_auth($user_data);
    }
    return false;
}
Пример #2
0
 if ($cpl_mode != 'board_settings' && $cpl_mode != 'all') {
     $s_hidden_fields .= '<input type="hidden" name="style" value="' . $user_style . '" />';
     $s_hidden_fields .= '<input type="hidden" name="language" value="' . $user_lang . '" />';
     $s_hidden_fields .= '<input type="hidden" name="timezone" value="' . $user_timezone . '" />';
     $s_hidden_fields .= '<input type="hidden" name="dateformat" value="' . $user_dateformat . '" />';
     $s_hidden_fields .= '<input type="hidden" name="time_mode" value="' . $time_mode . '" />';
     $s_hidden_fields .= '<input type="hidden" name="dst_time_lag" value="' . $dst_time_lag . '" />';
 }
 // End Mod User CP Organize
 if ($mode == 'editprofile') {
     // Mod User CP Organize: Added This Code => $cpl_registration_info .
     $template->assign_block_vars($cpl_registration_info . 'switch_edit_profile', array());
 }
 // UPI2DB - BEGIN
 if (!$user->data['user_upi2db_disable'] && $config['upi2db_on'] != '0') {
     if (check_group_auth($user->data) == true) {
         if ($config['upi2db_on'] != '0') {
             $template->assign_block_vars($cpl_preferences . 'switch_upi2db_is_on', array());
             $template->assign_block_vars($cpl_preferences . 'switch_upi2db_words', array());
         }
         if ($config['upi2db_on'] == '2') {
             $template->assign_block_vars($cpl_preferences . 'switch_upi2db_user_select', array());
         }
     }
 }
 // UPI2DB - END
 if ($mode == 'register' || $config['allow_namechange']) {
     // Mod User CP Organize: Added This Code => $cpl_registration_info .
     $template->assign_block_vars($cpl_registration_info . 'switch_namechange_allowed', array());
 } else {
     // Mod User CP Organize: Added This Code => $cpl_registration_info .