示例#1
0
     }
     if (!$g_oSession->conn) {
         Refresh(DCL_WWW_ROOT . 'logout.php?cd=3');
     }
     if ($g_oSession->Load($dcl_session_id) == false) {
         Refresh(DCL_WWW_ROOT . 'logout.php?cd=2');
     }
     if (!$g_oSession->conn) {
         Refresh(DCL_WWW_ROOT . 'logout.php?cd=3');
     }
     if (!$g_oSession->IsValidSession()) {
         Refresh(DCL_WWW_ROOT . 'logout.php?cd=2');
     }
     LoadStringResource('cmmn');
 } else {
     $obj = GetAuthenticator();
     $aAuthInfo = array();
     if ($obj->IsValidLogin($aAuthInfo)) {
         $oConfig = CreateObject('dcl.dbConfig');
         $dcl_info = array();
         $oConfig->Load();
         $g_oSession = CreateObject('dcl.dbSession');
         if (!$g_oSession->conn) {
             Refresh('logout.php?cd=3');
         }
         $g_oSession->personnel_id = $aAuthInfo['id'];
         $g_oSession->Add();
         $oPreferences = CreateObject('dcl.dbPreferences');
         $oPreferences->Load($aAuthInfo['id']);
         // Save the user ID and copy it to global space so Security object can use the info
         $g_oSession->Register('DCLID', $aAuthInfo['id']);
示例#2
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Select License Info from the Help menu to view the terms and conditions of this license.
 */
include_once 'inc/config.php';
include_once DCL_ROOT . 'inc/functions.inc.php';
$realm = 'DCL';
if (isset($_SERVER['PHP_AUTH_USER'])) {
    $_REQUEST['UID'] = $_SERVER['PHP_AUTH_USER'];
    $_REQUEST['PWD'] = $_SERVER['PHP_AUTH_PW'];
    $oAuth = GetAuthenticator();
    $aAuthInfo = array();
    if ($oAuth->IsValidLogin($aAuthInfo)) {
        if (isset($_POST['menuAction'])) {
            $menuAction = $_POST['menuAction'];
            list($class, $method) = explode(".", $menuAction);
            if ($class == 'wsSccsXref') {
                define('SERVICE_AUTH', 1);
                Invoke($menuAction);
                exit;
            }
        }
        header('HTTP/1.1 403 Forbidden');
        exit;
    }
}