本文整理汇总了PHP中Client::getAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getAddress方法的具体用法?PHP Client::getAddress怎么用?PHP Client::getAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client::getAddress方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encodeClient
public function encodeClient(Client $client)
{
$data = ['name' => $client->getName(), 'company' => $client->getCompany(), 'identifier' => $client->getIdentifier(), 'vat_number' => $client->getVatNumber(), 'tax_number' => $client->getTaxNumber()];
if ($client->getAddress()) {
$data['address'] = $this->encodeAddress($client->getAddress());
}
return $data;
}
示例2: updateClient
/**
*
* @param Client $client
* @return type
* @throws DaoException
*/
public function updateClient(Client $client)
{
try {
$query = Doctrine_Query::create()->update('Client i');
$query->set('i.name', '?', $client->getName());
$query->set('i.address', '?', $client->getAddress());
$query->set('i.tp_hp', '?', $client->getTpHp());
$query->set('i.tp_home', '?', $client->getTpHome());
$query->set('i.notes', '?', $client->getNotes());
$query->where('i.id = ?', $client->getId());
return $query->execute();
} catch (Exception $e) {
throw new DaoException($e->getMessage(), $e->getCode(), $e);
}
}
示例3: editClient
/**
* Modify a client saved in the database.
*
* @param Client $client
* @return integer
*/
public function editClient(Client $client)
{
$mcrypt = new MCrypt();
$sql = "UPDATE client \n\t\t\tSET id_client = '" . $client->getIdClient() . "', client_name = '" . replaceCharacters($client->getClientName()) . "', agent = '" . replaceCharacters($client->getAgent()) . "', address = '" . replaceCharacters($client->getAddress()) . "', phone = '" . $client->getPhone() . "', email = '" . $client->getEmail() . "', website = '" . $client->getWebsite() . "', user = '" . $client->getUser() . "', password = '" . $mcrypt->encrypt($client->getPassword()) . "' WHERE id_client = '" . $client->getIdClient() . "'";
return DB::query($sql);
}
示例4: json_encode
include 'common.php';
$con = mysqli_connect("{$db_host}", "{$db_user}", "{$db_pass}", "{$db_name}");
$key = $_GET['key'];
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL. Make sure to edit the common.php file: " . mysqli_connect_error();
}
$result = mysqli_query($con, "SELECT * FROM users where secret = '{$key}' and authused=1");
while ($row = mysqli_fetch_array($result)) {
$id = $row['id'];
$username = $row['username'];
$pin = $row['supportpin'];
$twofactoren = $row['authused'];
$isadmin = $row['admin'];
$client = new Client($rpc_host, $rpc_port, $rpc_user, $rpc_pass);
$apibal = $client->getBalance($username);
$addr = $client->getAddress($username);
}
if ($isadmin == 1) {
$ifadmin = "true";
} else {
$ifadmin = "false";
}
if ($twofactoren == 1) {
$iftwofactor = "true";
} else {
$iftwofactor = "false";
}
echo json_encode(array("id" => "{$id}", "username" => "{$username}", "balance" => "{$apibal}", "addresses" => "{$addr}", "Support Pin" => "{$pin}", "Two Factor Enabled" => "{$iftwofactor}", "admin" => "{$ifadmin}"));
?>
示例5: array
<?php
require_once 'config.php';
// print_r($_REQUEST);
$id = $_REQUEST["id"];
?>
<a href="explorer.php">Return to explorer</a>
<form action="search.php" method="post">
<input name="id" type="text" placeholder="enter block, txid or address" style="width:450px;"/>
<input type="submit" value="Submit">
</form>
<?php
$data = array();
$cnt = 0;
if (strlen($id) == 34) {
$addressData = Client::getAddress($id);
$balance = Client::getBalance($id);
$in = 0;
$out = 0;
$total = 0;
$tx_cnt = 0;
foreach ($addressData as $data) {
if ($data["amount"] < 0) {
$out += $data["amount"];
}
if ($data["amount"] > 0) {
$in += $data["amount"];
}
$total += $data["amount"];
$tx_cnt++;
}
示例6: render
//.........这里部分代码省略.........
</option>
<?php
}
}
?>
</select>
</div>
<div>
<label for="client_name">
Nombre <small>(*)</small>
</label>
<input name="client_name" type="text" required value="<?php
echo $client->getClientName();
?>
" />
</div>
<div>
<label for="agent">
Representante <small>(*)</small>
</label>
<input name="agent" type="text" required value="<?php
echo $client->getAgent();
?>
" />
</div>
<div>
<label for="address">
Dirección <small>(*)</small>
</label>
<input name="address" type="text" required value="<?php
echo $client->getAddress();
?>
" />
</div>
<div>
<label for="phone">
Teléfono <small>(*)</small>
</label>
<input name="phone" type="tel" required value="<?php
echo $client->getPhone();
?>
" />
</div>
</div>
<div class="col-md-6">
<div>
<label for="email">
Correo electrónico <small>(*)</small>
</label>
<input name="email" type="email" required value="<?php
echo $client->getEmail();
?>
" />
</div>
<div>
<label for="website">
Sitio web
</label>
示例7: render
/**
* Renderize the view.
*
* @return null
*/
public function render(Client $client)
{
?>
<p>
<?php
echo REQUIRED_FIELDS_TEXT;
?>
</p>
<form action="<?php
echo $this->generateURL('client', 'edit', $client->getIdClient());
?>
" method="post">
<fieldset>
<div class="row">
<div class="col-md-6">
<div>
<label for="client_name">
Nombre <small>(*)</small>
</label>
<input name="client_name" type="text" required value="<?php
echo $client->getClientName();
?>
" />
</div>
<div>
<label for="agent">
Representante <small>(*)</small>
</label>
<input name="agent" type="text" required value="<?php
echo $client->getAgent();
?>
" />
</div>
<div>
<label for="address">
Dirección <small>(*)</small>
</label>
<input name="address" type="text" required value="<?php
echo $client->getAddress();
?>
" />
</div>
<div>
<label for="phone">
Teléfono <small>(*)</small>
</label>
<input name="phone" type="tel" required value="<?php
echo $client->getPhone();
?>
" />
</div>
</div>
<div class="col-md-6">
<div>
<label for="email">
Correo electrónico <small>(*)</small>
</label>
<input name="email" type="email" required value="<?php
echo $client->getEmail();
?>
" />
</div>
<div>
<label for="website">
Sitio web
</label>
<input name="website" type="url" value="<?php
echo $client->getWebsite();
?>
" />
</div>
<div>
<label for="user">
Usuario <small>(*)</small>
</label>
<input name="user" type="text" required value="<?php
echo $client->getUser();
?>
" />
</div>
//.........这里部分代码省略.........