當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。