当前位置: 首页>>代码示例>>PHP>>正文


PHP LabConfig::getUserCountry方法代码示例

本文整理汇总了PHP中LabConfig::getUserCountry方法的典型用法代码示例。如果您正苦于以下问题:PHP LabConfig::getUserCountry方法的具体用法?PHP LabConfig::getUserCountry怎么用?PHP LabConfig::getUserCountry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LabConfig的用法示例。


在下文中一共展示了LabConfig::getUserCountry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getObject

 public static function getObject($record)
 {
     global $DEFAULT_LANG;
     # Converts a user record in DB into a User object
     if ($record == null) {
         return null;
     }
     $user = new User();
     $user->userId = $record['user_id'];
     $user->username = $record['username'];
     $user->password = $record['password'];
     $user->actualName = $record['actualname'];
     $user->level = $record['level'];
     $user->email = $record['email'];
     $user->phone = $record['phone'];
     $user->createdBy = $record['created_by'];
     $user->labConfigId = $record['lab_config_id'];
     if (isset($record['lang_id'])) {
         $user->langId = $record['lang_id'];
     } else {
         $user->langId = $DEFAULT_LANG;
     }
     /*if( $user->labConfigId == 128 || $user->labConfigId == 129 || $user->labConfig == 131 ) */
     $user->country = LabConfig::getUserCountry($user->labConfigId);
     return $user;
 }
开发者ID:nchopra,项目名称:C4G-BLIS,代码行数:26,代码来源:db_lib.php

示例2: updateDatabase

function updateDatabase()
{
    global $labConfigId, $DB_HOST, $DB_USER, $DB_PASS;
    $country = strtolower(LabConfig::getUserCountry($labConfigId));
    $saved_db = DbUtil::switchToCountry($country);
    $currentDir = getcwd();
    $mainBlisDir = substr($currentDir, $length, strpos($currentDir, "htdocs"));
    //$blisLabBackupFilePath = "\"".$mainBlisDir.$backup_folder."\blis_".$lab_config_id."\blis_".$lab_config_id."_backup.sql\"";
    $sqlFilePath = "\"" . $mainBlisDir . "htdocs\\export\\temp.sql\"";
    $mysqlExePath = "\"" . $mainBlisDir . "server\\mysql\\bin\\mysql.exe\"";
    $dbname = "blis_" . $country;
    $command = $mysqlExePath . " -h {$DB_HOST} -P 7188 -u {$DB_USER} -p{$DB_PASS} {$dbname} < {$sqlFilePath}";
    $command = "C: &" . $command;
    //the C: is a useless command to prevent the original command from failing because of having more than 2 double quotes
    echo $command;
    system($command, $return_var);
    if ($return_var == 0) {
        echo "true";
    } else {
        echo "false";
    }
    DbUtil::switchRestore($saved_db);
}
开发者ID:caseyi,项目名称:BLIS,代码行数:23,代码来源:updateCountryDatabase.php


注:本文中的LabConfig::getUserCountry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。