• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getState函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getState函数的典型用法代码示例。如果您正苦于以下问题:PHP getState函数的具体用法?PHP getState怎么用?PHP getState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_substitutionarray_thirdparty

 /**
  * Define array with couple subtitution key => subtitution value
  *
  * @param	Object		$object			Object
  * @param   Translate	$outputlangs    Language object for output
  * @return	array						Array of substitution key->code
  */
 function get_substitutionarray_thirdparty($object, $outputlangs)
 {
     global $conf;
     if (empty($object->country) && !empty($object->country_code)) {
         $object->country = $outputlangs->transnoentitiesnoconv("Country" . $object->country_code);
     }
     if (empty($mysoc->state) && !empty($mysoc->state_code)) {
         $object->state = getState($object->state_code, 0);
     }
     return array('company_name' => $object->name, 'company_email' => $object->email, 'company_phone' => $object->phone, 'company_fax' => $object->fax, 'company_address' => $object->address, 'company_zip' => $object->zip, 'company_town' => $object->town, 'company_country' => $object->country, 'company_country_code' => $object->country_code, 'company_state' => $object->state, 'company_state_code' => $object->state_code, 'company_web' => $object->url, 'company_barcode' => $object->barcode, 'company_vatnumber' => $object->tva_intra, 'company_customercode' => $object->code_client, 'company_suppliercode' => $object->code_fournisseur, 'company_customeraccountancycode' => $object->code_compta, 'company_supplieraccountancycode' => $object->code_compta_fournisseur, 'company_juridicalstatus' => $object->forme_juridique, 'company_capital' => $object->capital, 'company_idprof1' => $object->idprof1, 'company_idprof2' => $object->idprof2, 'company_idprof3' => $object->idprof3, 'company_idprof4' => $object->idprof4, 'company_idprof5' => $object->idprof5, 'company_idprof6' => $object->idprof6, 'company_note' => $object->note);
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:18,代码来源:commondocgenerator.class.php


示例2: getCountry

</td>
                                                                    <td align="center"><?php 
            echo $row['BuyerName'];
            ?>
</td>
                                                                    <td align="center"><?php 
            echo $row['Address'];
            ?>
</td>
                                                                    <td align="center"><?php 
            echo getCountry($row['CountryId']);
            ?>
</td>
                                                                    <td align="center"><?php 
            if ($row['State'] != 0) {
                echo getState($row['State']);
            } else {
                echo $row['OtherState'];
            }
            ?>
</td>
                                                                    <td align="center"><?php 
            if ($row['City'] != 0) {
                echo getCity($row['City']);
            } else {
                echo $row['OtherCity'];
            }
            ?>
</td>
                                                                    <td align="center"><?php 
            echo $row['Email'];
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:list_buyer.php


示例3: processMessage

 public function processMessage($message)
 {
     LogWrite("LinnDSClientSocket::processMessage - {$message}");
     $DataHandled = false;
     if ($DEBUG > 1) {
         LogWrite($message);
     }
     if (strpos($message, "Jukebox") !== false) {
         // Here things happens - we execute the actions sent from the
         // application, by issuing a number of ACTIONs.
         $D = getParameters($message);
         if (strpos($message, "Jukebox PlayNow ") !== false) {
             //Jukebox PlayNow \"(\d+)\" \"(\d+)\"
             $JukeBoxPlay = $D[0];
             $JukeBoxTrack = $D[1];
             LogWrite("JukeBoxPlayNow: " . $JukeBoxPlay . ", " . $JukeBoxTrack);
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('SelectPlaylist') == false) {
                 $Continue = false;
             }
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('Stop') == false) {
                 $Continue = false;
             }
             $musicDB = new MusicDB();
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients1('DeleteAll', $musicDB) == false) {
                 $Continue = false;
             }
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients4('InsertDIDL_list', $musicDB, $JukeBoxPlay, $JukeBoxTrack, 0) == false) {
                 $Continue = false;
             }
             $musicDB->close();
             //Send("ACTION Ds/Jukebox 3 SetCurrentPreset \"" . $JukeBoxPlay . "\"");
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('Play') == false) {
                 $Continue = false;
             }
             if ($this->listeningSocket->getLPECListeningSocket()->Send("ACTION Ds/Playlist 1 IdArray") == false) {
                 $Continue = false;
             }
             $DataHandled = true;
         } elseif (strpos($message, "Jukebox PlayNext ") !== false) {
             //Jukebox PlayNext \"(\d+)\" \"(\d+)\"
             $JukeBoxPlay = $D[0];
             $JukeBoxTrack = $D[1];
             LogWrite("JukeBoxPlayNext: " . $JukeBoxPlay . ", " . $JukeBoxTrack);
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('SelectPlaylist') == false) {
                 $Continue = false;
             }
             $musicDB = new MusicDB();
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients4('InsertDIDL_list', $musicDB, $JukeBoxPlay, $JukeBoxTrack, $this->getState()->getState('Id')) == false) {
                 $Continue = false;
             }
             $musicDB->close();
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('Play') == false) {
                 $Continue = false;
             }
             if ($this->listeningSocket->getLPECListeningSocket()->Send("ACTION Ds/Playlist 1 IdArray") == false) {
                 $Continue = false;
             }
             if ($DEBUG > 0) {
                 //LogWrite($message);
                 //print_r($State);
             }
             $DataHandled = true;
         } elseif (strpos($message, "Jukebox PlayLater ") !== false) {
             //Jukebox PlayLater \"(\d+)\" \"(\d+)\"
             $JukeBoxPlay = $D[0];
             $JukeBoxTrack = $D[1];
             LogWrite("JukeBoxPlayLater: " . $JukeBoxPlay . ", " . $JukeBoxTrack);
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('SelectPlaylist') == false) {
                 $Continue = false;
             }
             $musicDB = new MusicDB();
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients4('InsertDIDL_list', $musicDB, $JukeBoxPlay, $JukeBoxTrack, end($this->getState()->getState('IdArray'))) == false) {
                 $Continue = false;
             }
             $musicDB->close();
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('Play') == false) {
                 $Continue = false;
             }
             $this->listeningSocket->getLPECListeningSocket()->Send("ACTION Ds/Playlist 1 IdArray");
             if ($DEBUG > 0) {
                 //LogWrite($message);
                 //print_r($State);
             }
             $DataHandled = true;
         } elseif (strpos($message, "Jukebox PlayRandomTracks ") !== false) {
             //Jukebox PlayRandomTracks \"(\d+)\" \"(\d+)\"
             $JukeBoxFirstAlbum = $D[0];
             $JukeBoxLastAlbum = $D[1];
             LogWrite("JukeBoxPlayRandomTracks: " . $JukeBoxFirstAlbum . ", " . $JukeBoxLastAlbum);
             if ($this->listeningSocket->getLPECListeningSocket()->CallClients('SelectPlaylist') == false) {
                 $Continue = false;
             }
             $musicDB = new MusicDB();
             if ($this->getState()->getState('TransportState') == "Stopped") {
                 if ($this->listeningSocket->getLPECListeningSocket()->CallClients1('DeleteAll', $musicDB) == false) {
                     $Continue = false;
                 }
             }
             for ($i = 0; $i < 50; $i++) {
                 $RandomPreset = rand($JukeBoxFirstAlbum, $JukeBoxLastAlbum);
//.........这里部分代码省略.........
开发者ID:HenrikTolboel,项目名称:LinnDS-jukebox,代码行数:101,代码来源:LinnDSClientSocket.php


示例4: sys_get_temp_dir

require_once '../../resources/portabilityLayer.php';
# This script may only be used by appcache/fail-on-update-2.html test, since it uses global data.
$tmpFile = sys_get_temp_dir() . "/" . "appcache_fail-on-update-2_state";
function setState($newState, $file)
{
    file_put_contents($file, $newState);
}
function getState($file)
{
    if (!file_exists($file)) {
        return "Uninitialized";
    }
    return file_get_contents($file);
}
$command = $_GET['command'];
$state = getState($tmpFile);
header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
if ($command == "reset") {
    unlink($tmpFile);
} else {
    if ($command == "delete") {
        setState("Deleted", $tmpFile);
    } else {
        if ($state == "Uninitialized") {
            header("Content-Type: text/cache-manifest");
            print "CACHE MANIFEST\n";
            print "fail-on-update-2.html\n";
            print "NETWORK:\n";
            print "fail-on-update-2.php?command=\n";
开发者ID:houzhenggang,项目名称:webkit,代码行数:31,代码来源:fail-on-update-2.php


示例5: getBackUrl

function getBackUrl()
{
    return getState('back_url');
}
开发者ID:paranoidxc,项目名称:iwebhost,代码行数:4,代码来源:globals.php


示例6: getTime

                $nome = $perfil['personaname'];
                $lastLogin = $perfil['lastlogoff'];
                $lastLogin = getTime($lastLogin);
                $imgProf = $perfil['avatarfull'];
                $estado = $perfil['personastate'];
                $estado = getState($estado);
                $tempoConta = $perfil['timecreated'];
                $tempoConta = getTimed($tempoConta);
                $jogando = $perfil['gameextrainfo'];		
	}*/
$imgProf = $steamprofile['avatarfull'];
$nome = $steamprofile['personaname'];
$lastLogin = $steamprofile['lastlogoff'];
$lastLogin = getTime($lastLogin);
$estado = $steamprofile['personastate'];
$estado = getState($estado);
$tempoConta = $steamprofile['timecreated'];
$tempoConta = getTimed($tempoConta);
$jogando = $steamprofile['gameextrainfo'];
$Img = "<img src={$imgProf} class=\"profimg\" style='";
if ($estado == "Offline") {
    $Img .= "border-color: #b6b6ba;'/>";
} else {
    $Img .= "border-color: #a2a9ec;'/>";
}
$Perf = "<div class=\"info\">\n                <span style='font-size:20px;font-weight: bold;'>{$nome}</span></br>\n                Estado: {$estado}</br>\n                Último Login: {$lastLogin}</br>\n                Usuário Steam desde: {$tempoConta}</br>";
if (isset($jogando)) {
    $Perf .= "Jogando: {$jogando}";
    echo "<style> .profimg{border-color: #47f360;}</style>";
} else {
}
开发者ID:pendrive148,项目名称:Mochila.tf,代码行数:31,代码来源:perfil.php


示例7: picto_from_langcode

 print '</td></tr>';
 // Status
 print '<tr><td>' . $langs->trans("Status") . '</td>';
 print '<td colspan="3">' . $account->getLibStatut(4) . '</td></tr>';
 // Country
 print '<tr><td>' . $langs->trans("BankAccountCountry") . '</td><td>';
 if ($account->country_id > 0) {
     $img = picto_from_langcode($account->country_code);
     print $img ? $img . ' ' : '';
     print getCountry($account->getCountryCode(), 0, $db);
 }
 print '</td></tr>';
 // State
 print '<tr><td>' . $langs->trans('State') . '</td><td>';
 if ($account->state_id > 0) {
     print getState($account->state_id);
 }
 print '</td></tr>';
 // Conciliate
 print '<tr><td>' . $langs->trans("Conciliable") . '</td>';
 print '<td colspan="3">';
 $conciliate = $account->canBeConciliated();
 if ($conciliate == -2) {
     print $langs->trans("No") . ' (' . $langs->trans("CashAccount") . ')';
 } else {
     if ($conciliate == -3) {
         print $langs->trans("No") . ' (' . $langs->trans("Closed") . ')';
     } else {
         print $account->rappro == 1 ? $langs->trans("Yes") : $langs->trans("No") . ' (' . $langs->trans("ConciliationDisabled") . ')';
     }
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card.php


示例8: getCountry

echo $sno;
?>
</td>
                                                                    <td align="center"><?php 
echo $row['BuyerName'];
?>
</td>
                                                                    <td align="center"><?php 
echo $row['Address'];
?>
</td>
                                                                    <td align="center"><?php 
echo getCountry($row['CountryId']);
?>
</td>
                                                                    <td align="center"><? if($row['State']!=0){echo getState($row['State']);} else { echo $row['OtherState'];}?></td>
                                                                    <td align="center"><? if($row['City']!=0){ echo getCity($row['City']);} else{ echo $row['OtherCity'];}?></td>
                                                                    <td align="center"><?php 
echo $row['Email'];
?>
</td>
                                                                    <td align="center"><?php 
echo $row['ContactNumber'];
?>
</td>
                                                                    <td align="center"><a href="javascript:;" onClick="return hs.htmlExpand(this)">
                                                                    	<img src="images/Find-icon.png" border="0" width="24" height="24" /></a>
                                                                        <div class="highslide-maincontent">
                                                                        <table align="center" width="100%" cellpadding="1" cellspacing="1" border="0">
                                                                            <tr class="gredBg">
                                                                                <td align="center"><b>Name</b></td>
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:list_buyer.php


示例9: setCoordinates

 /**
  * @param IGeoCodingService $geo_service
  * @return void
  */
 public function setCoordinates(IGeoCodingService $geo_service)
 {
     list($lat, $lng) = $geo_service->getAddressCoordinates(new AddressInfo($this->getAddress(), '', $this->getZipCode(), $this > getState(), $this->getCity(), $this->getCountry()));
     $this->Lat = $lat;
     $this->Lng = $lng;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:10,代码来源:SummitGeoLocatedLocation.php


示例10: getLastColor

	function getLastColor() { return getState('last_color'); }	
开发者ID:skoczen,项目名称:impact4-builder,代码行数:1,代码来源:obedit_html_filter.inc.php


示例11: pdf_build_address

/**
 *   	Return a string with full address formated
 * 		@param		outputlangs		Output langs object
 *   	@param      sourcecompany	Source company object
 *   	@param      targetcompany	Target company object
 *      @param      targetcontact	Target contact object
 * 		@param		usecontact		Use contact instead of company
 * 		@param		mode			Address type
 * 		@param		deliverycompany	Delivery company object
 * 		@return		string			String with full address
 */
function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $targetcontact = '', $usecontact = 0, $mode = 'source', $deliverycompany = '')
{
    global $conf;
    $stringaddress = '';
    if ($mode == 'source' && !is_object($sourcecompany)) {
        return -1;
    }
    if ($mode == 'target' && !is_object($targetcompany)) {
        return -1;
    }
    if ($mode == 'delivery' && !is_object($deliverycompany)) {
        return -1;
    }
    if ($sourcecompany->departement_id && empty($sourcecompany->departement)) {
        $sourcecompany->departement = getState($sourcecompany->departement_id);
    }
    if ($targetcompany->departement_id && empty($targetcompany->departement)) {
        $targetcompany->departement = getState($targetcompany->departement_id);
    }
    if ($mode == 'source') {
        $stringaddress .= ($stringaddress ? "\n" : '') . pdf_format_address($outputlangs, $sourcecompany) . "\n";
        // Tel
        if ($sourcecompany->tel) {
            $stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->transnoentities("Phone") . ": " . $outputlangs->convToOutputCharset($sourcecompany->tel);
        }
        // Fax
        if ($sourcecompany->fax) {
            $stringaddress .= ($stringaddress ? $sourcecompany->tel ? " - " : "\n" : '') . $outputlangs->transnoentities("Fax") . ": " . $outputlangs->convToOutputCharset($sourcecompany->fax);
        }
        // EMail
        if ($sourcecompany->email) {
            $stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->transnoentities("Email") . ": " . $outputlangs->convToOutputCharset($sourcecompany->email);
        }
        // Web
        if ($sourcecompany->url) {
            $stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->transnoentities("Web") . ": " . $outputlangs->convToOutputCharset($sourcecompany->url);
        }
    }
    if ($mode == 'target') {
        if ($usecontact) {
            $stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->convToOutputCharset($targetcontact->getFullName($outputlangs, 1));
            $stringaddress .= ($stringaddress ? "\n" : '') . pdf_format_address($outputlangs, $targetcontact) . "\n";
            // Country
            if ($targetcontact->pays_code && $targetcontact->pays_code != $sourcecompany->pays_code) {
                $stringaddress .= $outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country" . $targetcontact->pays_code)) . "\n";
            }
        } else {
            $stringaddress .= ($stringaddress ? "\n" : '') . pdf_format_address($outputlangs, $targetcompany) . "\n";
            // Country
            if ($targetcompany->pays_code && $targetcompany->pays_code != $sourcecompany->pays_code) {
                $stringaddress .= $outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country" . $targetcompany->pays_code)) . "\n";
            }
        }
        // Intra VAT
        if ($targetcompany->tva_intra) {
            $stringaddress .= "\n" . $outputlangs->transnoentities("VATIntraShort") . ': ' . $outputlangs->convToOutputCharset($targetcompany->tva_intra);
        }
        // Professionnal Ids
        if ($conf->global->MAIN_PROFID1_IN_ADDRESS) {
            $tmp = $outputlangs->transcountrynoentities("ProfId1", $targetcompany->pays_code);
            if (preg_match('/\\((.+)\\)/', $tmp, $reg)) {
                $tmp = $reg[1];
            }
            $stringaddress .= "\n" . $tmp . ': ' . $outputlangs->convToOutputCharset($targetcompany->idprof1);
        }
        if ($conf->global->MAIN_PROFID2_IN_ADDRESS) {
            $tmp = $outputlangs->transcountrynoentities("ProfId2", $targetcompany->pays_code);
            if (preg_match('/\\((.+)\\)/', $tmp, $reg)) {
                $tmp = $reg[1];
            }
            $stringaddress .= "\n" . $tmp . ': ' . $outputlangs->convToOutputCharset($targetcompany->idprof2);
        }
        if ($conf->global->MAIN_PROFID3_IN_ADDRESS) {
            $tmp = $outputlangs->transcountrynoentities("ProfId3", $targetcompany->pays_code);
            if (preg_match('/\\((.+)\\)/', $tmp, $reg)) {
                $tmp = $reg[1];
            }
            $stringaddress .= "\n" . $tmp . ': ' . $outputlangs->convToOutputCharset($targetcompany->idprof3);
        }
        if ($conf->global->MAIN_PROFID4_IN_ADDRESS) {
            $tmp = $outputlangs->transcountrynoentities("ProfId4", $targetcompany->pays_code);
            if (preg_match('/\\((.+)\\)/', $tmp, $reg)) {
                $tmp = $reg[1];
            }
            $stringaddress .= "\n" . $tmp . ': ' . $outputlangs->convToOutputCharset($targetcompany->idprof4);
        }
    }
    if ($mode == 'delivery') {
        $stringaddress .= ($stringaddress ? "\n" : '') . pdf_format_address($outputlangs, $deliverycompany) . "\n";
//.........这里部分代码省略.........
开发者ID:netors,项目名称:dolibarr,代码行数:101,代码来源:pdf.lib.php


示例12: picto_from_langcode

 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("CompanyTown") . '</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? '' : $conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td>' . $langs->trans("CompanyCountry") . '</td><td>';
 if ($mysoc->country_code) {
     $img = picto_from_langcode($mysoc->country_code);
     print $img ? $img . ' ' : '';
     print getCountry($mysoc->country_code, 1);
 } else {
     print img_warning() . ' <font class="error">' . $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")) . '</font>';
 }
 print '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td>' . $langs->trans("State") . '</td><td>';
 if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) {
     print getState($conf->global->MAIN_INFO_SOCIETE_STATE);
 } else {
     print '&nbsp;';
 }
 print '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("CompanyCurrency") . '</td><td>';
 print currency_name($conf->currency, 1);
 print ' (' . $langs->getCurrencySymbol($conf->currency) . ')';
 print '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Phone") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Fax") . '</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . '</td></tr>';
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("Mail") . '</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . '</td></tr>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:company.php


示例13: getRegionByID

    $regionID = $_POST["regionID"];
    getRegionByID($regionID, $mysqli);
}
if ($functionname == 'delRegion') {
    $regionID = $_POST["regionID"];
    delRegion($regionID, $mysqli);
}
/*State*/
if ($functionname == 'setState') {
    $stateID = $_POST["stateID"];
    $stateName = $_POST["stateName"];
    $stateCode = $_POST["stateCode"];
    setState($stateID, $stateName, $stateCode, $mysqli);
}
if ($functionname == 'getState') {
    getState($mysqli);
}
if ($functionname == 'getStateByID') {
    $stateID = $_POST["stateID"];
    getStateByID($stateID, $mysqli);
}
if ($functionname == 'delState') {
    $stateID = $_POST["stateID"];
    delState($stateID, $mysqli);
}
/*City*/
if ($functionname == 'setCity') {
    $cityID = $_POST["cityID"];
    $cityName = $_POST["cityName"];
    $cityCode = $_POST["cityCode"];
    $cityStateID = $_POST["cityStateID"];
开发者ID:hefhem,项目名称:TDO,代码行数:31,代码来源:db_connect_functioncall.php


示例14: get_substitutionarray_contact

 /**
  * Define array with couple subtitution key => subtitution value
  *
  * @param	Contact 		$object        	contact
  * @param	Translate 	$outputlangs   	object for output
  * @param   array_key	$array_key	    Name of the key for return array
  * @return	array of substitution key->code
  */
 function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
 {
     global $conf;
     if (empty($object->country) && !empty($object->country_code)) {
         $object->country = $outputlangs->transnoentitiesnoconv("Country" . $object->country_code);
     }
     if (empty($object->state) && !empty($object->state_code)) {
         $object->state = getState($object->state_code, 0);
     }
     $array_contact = array($array_key . '_fullname' => $object->getFullName($outputlangs, 1), $array_key . '_lastname' => $object->lastname, $array_key . '_firstname' => $object->firstname, $array_key . '_address' => $object->address, $array_key . '_zip' => $object->zip, $array_key . '_town' => $object->town, $array_key . '_state_id' => $object->state_id, $array_key . '_state_code' => $object->state_code, $array_key . '_state' => $object->state, $array_key . '_country_id' => $object->country_id, $array_key . '_country_code' => $object->country_code, $array_key . '_country' => $object->country, $array_key . '_poste' => $object->poste, $array_key . '_socid' => $object->socid, $array_key . '_statut' => $object->statut, $array_key . '_code' => $object->code, $array_key . '_email' => $object->email, $array_key . '_jabberid' => $object->jabberid, $array_key . '_phone_pro' => $object->phone_pro, $array_key . '_phone_perso' => $object->phone_perso, $array_key . '_phone_mobile' => $object->phone_mobile, $array_key . '_fax' => $object->fax, $array_key . '_birthday' => $object->birthday, $array_key . '_default_lang' => $object->default_lang, $array_key . '_note_public' => $object->note_public, $array_key . '_note_private' => $object->note_private);
     // Retrieve extrafields
     require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
     $extrafields = new ExtraFields($this->db);
     $extralabels = $extrafields->fetch_name_optionals_label('socpeople', true);
     $object->fetch_optionals($object->id, $extralabels);
     foreach ($extrafields->attribute_label as $key => $label) {
         if ($extrafields->attribute_type[$key] == 'price') {
             $object->array_options['options_' . $key] = price($object->array_options['options_' . $key], 0, $outputlangs, 0, 0, -1, $conf->currency);
         } elseif ($extrafields->attribute_type[$key] == 'select') {
             $object->array_options['options_' . $key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_' . $key]];
         }
         $array_contact = array_merge($array_contact, array($array_key . '_options_' . $key => $object->array_options['options_' . $key]));
     }
     return $array_contact;
 }
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:33,代码来源:commondocgenerator.class.php


示例15: while

$University = "";
$Campus = "";
$Store = "";
// --------------------------------------------------
while ($condition) {
    switch ($option) {
        case "":
            $option = getOptions();
            // General Options
            break;
        case 1:
            unset($state);
            unset($University);
            unset($Campus);
            unset($StoreUrl);
            $state = getState();
            $University = getStateUniversity($state);
            $Campus = getCampusUniversity($University[0]);
            $Store = getBK_BOOKS_URL($Campus[0]);
            $option = getOptions();
            break;
        case 2:
            if ($Store != "") {
                echo "Processsing File here \n\n\n";
                //------------------- Start Processing File
                //ProcessDataDigging($StoreUrl);
                ProcessDataDigging_Generic($Store, $University[1], $Campus[1]);
            }
            $option = getOptions();
            // General Options
            break;
开发者ID:eduify,项目名称:crawler,代码行数:31,代码来源:csv_system_g.php


示例16: getData

{
    $url = 'http://www.auspost.com.au/postcode/' . $postcode;
    //$data = file_get_contents($url) or exit("Unable to open url: <br/>".$url);
    $data = getData($url) or exit("Unable to open url: <br/>" . $url);
    //echo $data;
    $regex = "/<td class=\"first\"><a class=\"result(?:.*)\" href=\"\\/(?:.*)\\/(?:.*)\\/(.*?)\\/(?:.*)\">" . $postcode . "<\\/a>/";
    preg_match($regex, $data, $state);
    $states = array('act', 'nsw', 'nt', 'qld', 'sa', 'tas', 'vic', 'wa');
    if (in_array($state[1], $states, true)) {
        return $state[1];
    } else {
        exit("Error finding state.");
    }
}
if (checkPostcode($postcode)) {
    $state = getState($postcode);
} else {
    exit("There is an issue. Please check regex.");
}
function getWeather($state, $postcode, $mycity, $mystate)
{
    //Generate url using state and postcode
    $url = 'https://weather.yahoo.com.au/local-forecast/' . $state . '/' . $postcode;
    //$data = file_get_contents($url) or exit("Unable to open weather url: <br/>".$url);
    $data = getData($url) or exit("Unable to open weather url: <br/>" . $url);
    // Get weather location name
    $regex = "/<span id='qualified_location_name' style='display: none;'>(.*?)<\\/span>/";
    preg_match($regex, $data, $loc);
    $autoloc = $loc[1];
    if (empty($autoloc)) {
        exit("Unable to fetch weather for postcode: " . $postcode);
开发者ID:EasyBB1,项目名称:Polycom-Stuff,代码行数:31,代码来源:pcom-weather-aus.php


示例17: getCountry

		print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
		print '<td colspan="3">'.$account->getLibStatut(4).'</td></tr>';

		// Country
		print '<tr><td>'.$langs->trans("Country").'</td><td>';
		if ($account->fk_pays > 0)
		{
			$img=picto_from_langcode($account->pays_code);
			print $img?$img.' ':'';
			print getCountry($account->getCountryCode(),0,$db);
		}
		print '</td></tr>';

		// State
		print '<tr><td>'.$langs->trans('State').'</td><td>';
		if ($account->fk_departement > 0) print getState($account->fk_departement);
		print '</td></tr>';

		// Conciliate
		print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
		print '<td colspan="3">';
		$conciliate=$account->canBeConciliated();
		if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
        else if ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')';
		else print ($account->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')'));
		print '</td></tr>';

		// Accountancy code
		print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
		print '<td colspan="3">'.$account->account_number.'</td></tr>';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:fiche.php


示例18: checkZkState

 public function checkZkState()
 {
     /*{{{*/
     $ext = new ReflectionExtension('zookeeper');
     $ver = $ext->getVersion();
     if (version_compare($ver, '0.2.0') < 0) {
         //throw new LogConfException("Required version of extension($name) is at least $version_min!");
         return;
     }
     $state = getState($this->zkClient_);
     if (ZOK != $state) {
         throw new LogConfException("zookeeper connection state wrong: {$state}");
     }
 }
开发者ID:stgrandet,项目名称:logkafka,代码行数:14,代码来源:log_config.php


示例19: hasParentSameReservation

/**
 * @author coster
 * checks if the parent has the same reservation
 * as the child room
 * */
function hasParentSameReservation($reservierungs_id)
{
    global $unterkunft_id;
    global $link;
    global $root;
    include_once $root . "/include/zimmerFunctions.php";
    $zi_id = getZimmerID($reservierungs_id, $link);
    if (!hasRoomParentRooms($zi_id)) {
        return false;
    }
    $gast = getIDFromGast($reservierungs_id, $link);
    $datum_von = getDatumVon($reservierungs_id, $link);
    $datum_bis = getDatumBis($reservierungs_id, $link);
    $status = getState($reservierungs_id, $link);
    $query = "SELECT\t\t \n\t\t\t   r.PK_ID\n\t\t\t   FROM\n\t\t\t   Rezervi_Reservierung r, Rezervi_Zimmer z\n\t\t\t   WHERE\t\t\t\t\n\t\t\t   FK_GAST_ID = '{$gast}' and" . " r.Datum_von = '{$datum_von}' and" . " r.Datum_bis = '{$datum_bis}' and" . " r.Status = '{$status}' and\n\t\t\t\t\tz.Parent_ID is null and \n\t\t\t\t\tr.FK_Zimmer_ID = z.PK_ID ";
    $res = mysqli_query($link, $query);
    if (!$res) {
        echo "die Anfrage scheitert";
        echo "<br/>" . mysqli_error();
    } else {
        $d = mysqli_fetch_array($res);
        $id = $d["PK_ID"];
        if (!empty($id)) {
            return true;
        }
    }
    return false;
}
开发者ID:utilo-web-app-development,项目名称:REZERVI,代码行数:33,代码来源:reservierungFunctions.php


示例20: setState

function setState($newState, $file)
{
    file_put_contents($file, $newState);
}
function getState($file)
{
    if (!file_exists($file)) {
        return "";
    }
    return file_get_contents($file);
}
$stateFile = sys_get_temp_dir() . "/tripmine-status";
$command = $_GET['command'];
if ($command) {
    if ($command == "status") {
        echo getState($stateFile);
    }
    exit;
}
$method = $_SERVER['REQUEST_METHOD'];
$contentType = $_SERVER['CONTENT_TYPE'];
if ($method == "OPTIONS") {
    // Don't allow cross-site requests with preflight.
    exit;
}
// Only allow simple cross-site requests - since we did not allow preflight, this is all we should ever get.
if ($method != "GET" && $method != "HEAD" && $method != "POST") {
    setState("FAIL. Non-simple method {$method}.", $stateFile);
    exit;
}
if (isset($contentType) && !preg_match("/^application\\/x\\-www\\-form\\-urlencoded(;.+)?\$/", $contentType) && !preg_match("/^multipart\\/form\\-data(;.+)?\$/", $contentType) && !preg_match("/^text\\/plain(;.+)?\$/", $contentType)) {
开发者ID:gwindlord,项目名称:lenovo_b6000-8000_kernel_source,代码行数:31,代码来源:tripmine.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getStats函数代码示例发布时间:2022-05-15
下一篇:
PHP getStatData_LineLabels函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap