<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<?php

        @$con=mysql_connect("$host","$user","$password");
            if(!$con){
                    if(file_exists(IQQOL_FILE_ROOT."install.lock")){

                    echo '<h1>数据库连接失败</h1></br>请检查配置文件config.inc.php<br>如果您已经成功安装IQQOL+UC,请访问UC后台选择"应用管理 => 添加应用"  添加一个IQQOL应用<br>然后到<a href="'.IQQOL_ROOT.'/admin.php?action=uc_config&nodb=1">“心挂Q—UCenter信息配置”</a>页面提交您的UC信息。<br>';
            
                    exit;
                }
                else {
                    $url = explode('index.php',$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF']);
                    echo '<script>location.href="http://'.$url[0].'install/index.php"</script>';
                
                }
            }

        mysql_select_db($db,$con);
        $try = mysql_query("SELECT * FROM {$table}config");

        if(!$try){
            echo '<h1>数据库连接失败</h1></br><h4>请检查配置文件config.inc.php</h4>';
            exit();
        }
        define("APP_ROOT",IQQOL_ROOT);
        $_info = mysql_fetch_array(mysql_query("SELECT * FROM {$table}config"));
        //$_members = mysql_fetch_array(mysql_query("SELECT * FROM {$table}members"));
        //$_online = mysql_fetch_array(mysql_query("SELECT * FROM {$table}online"));
        //$_admincp_power = mysql_fetch_array(mysql_query("SELECT * FROM {$table}admincp_power"));
        //$_group_power = mysql_fetch_array(mysql_query("SELECT * FROM {$table}group_power"));
        //$_idcode = mysql_fetch_array(mysql_query("SELECT * FROM {$table}idcode"));
      //  print_r($_info);
     // $_list = mysql_fetch_array(mysql_query("SELECT * FROM {$table}online"));

        @$ucon=mysql_connect(UC_DBHOST,UC_DBUSER,UC_DBPW)or 
            die('<h1>UC数据库连接失败</h1></br>请检查配置文件config.inc.php<br>如果您已经成功安装IQQOL+UC,请访问UC后台选择"应用管理 => 添加应用"  添加一个IQQOL应用<br>然后到<a href="'.IQQOL_ROOT.'/admin.php?action=uc_config&nodb=1">“心挂Q—UCenter信息配置”</a>页面提交您的UC信息。<br>如果还未能解决您的问题，请邮件至service@izzx.cc联系我们！');
        mysql_select_db(UC_DBNAME,$ucon);
        $try = mysql_query("SELECT * FROM ".UC_DBTABLEPRE."members");

        if(!$try){
            if(file_exists(IQQOL_FILE_ROOT."/ucenter/data/install.lock")){

                echo '<h1>UC数据库连接失败</h1></br>请检查配置文件config.inc.php<br>如果您已经成功安装IQQOL+UC,请访问UC后台选择"应用管理 => 添加应用"  添加一个IQQOL应用即可<br>然后到<a href="'.IQQOL_ROOT.'/admin.php?action=uc_config&nodb=1">“心挂Q—UCenter信息配置”</a>页面提交您的UC信息。<br>如果还未能解决您的问题，请邮件至service@izzx.cc联系我们！';
            
                exit;
            }
            else {
            
                echo '<h1>请安装UCenter用户中心<br><h4>位置在：'.IQQOL_FILE_ROOT.'/ucenter/install/index.php';
                
            }

        }