本文整理汇总了PHP中Account::getAccountObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Account::getAccountObject方法的具体用法?PHP Account::getAccountObject怎么用?PHP Account::getAccountObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Account
的用法示例。
在下文中一共展示了Account::getAccountObject方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pay
function pay()
{
$id = addslashes($_GET['app_id']);
$acc = new App2Acc();
$apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id AND ac_app_id = '{$id}' ", array("AppAccount"));
if (count($apps) < 1) {
die("hacking attempt");
} else {
$app = $apps[0];
}
$paket = new Paket();
$paket->getByID($app->app_paket_id);
$dibayarkan = $paket->paket_price * 12;
//veritrans config
Veritrans_Config::$serverKey = self::$serverKey;
$transaction_details = array('order_id' => rand(), 'gross_amount' => $dibayarkan);
$item1_details = array('id' => $app->app_id, 'price' => $dibayarkan, 'quantity' => 1, 'name' => "Payment for " . $app->app_name);
$item_details = array($item1_details);
$ac = Account::getAccountObject();
$exp = explode(" ", Account::getMyName());
$lastname = array_pop($exp);
$billing_address = array('first_name' => implode(" ", $exp), 'last_name' => $lastname, 'address' => "Mangga 20", 'city' => "Jakarta", 'postal_code' => "16602", 'phone' => "081122334455", 'country_code' => 'IDN');
$customer_details = array('first_name' => implode(" ", $exp), 'last_name' => $lastname, 'email' => $ac->admin_email, 'phone' => "081122334455", 'billing_address' => $billing_address);
$transaction = array('transaction_details' => $transaction_details, 'customer_details' => $customer_details, 'item_details' => $item_details);
try {
// Redirect to Veritrans VTWeb page
header('Location: ' . Veritrans_VtWeb::getRedirectionUrl($transaction));
} catch (Exception $e) {
echo $e->getMessage();
if (strpos($e->getMessage(), "Access denied due to unauthorized")) {
echo "<code>";
echo "<h4>Please set real server key from sandbox</h4>";
echo "In file: " . __FILE__;
echo "<br>";
echo "<br>";
echo htmlspecialchars('Veritrans_Config::$serverKey = \'<your server key>\';');
die;
}
}
}
示例2: pay
function pay()
{
$id = addslashes($_GET['app_id']);
$acc = new App2Acc();
$apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id AND ac_app_id = '{$id}' ", array("AppAccount"));
if (count($apps) < 1) {
die("hacking attempt");
} else {
$app = $apps[0];
}
if ($app->app_active) {
header("Location:" . _SPPATH . "myapps");
die;
}
AppAccount::checkOwnership($app);
$activeAcc = Account::getAccountObject();
?>
<style>
.app_details{
padding: 20px;
}
.app_details_img img{
width: 120px;
}
.app_details_name{
font-weight: bold;
padding-top: 10px;
}
.app_details_heading{
display: none;
}
.paket_details{
}
.free_apply{
text-align: center;
background-color: #ffffff;
padding: 20px;
margin-top: 20px;
}
.free_details{
font-style: italic;
padding-bottom: 15px;
}
@media (max-width: 768px) {
.monly {
display: initial;
}
.donly {
display: none;
}
.app_details{
padding: 10px;
}
.container{
padding-right: 0px;
padding-left: 0px;
}
}
@media (min-width: 768px) {
.monly {
display: none;
}
.donly {
display: initial;
}
}
</style>
<div class="container attop" style="text-align: center;" >
<div class="col-md-6 col-md-offset-3">
<div class="appear_logo_pages">
<a href="<?php
echo _SPPATH;
?>
">
<img src="<?php
echo _SPPATH;
?>
images/appear-payment.png" >
</a>
</div>
<div class="app" style="background-color: #ffffff; ">
<div style=" padding: 5px; text-align: center; font-size: 16px; font-weight: bold;">Payment For</div>
<div class="app_details" >
<div class="app_details_heading">App Details</div>
<div class="app_details_img">
<img src="<?php
echo $app->app_icon;
?>
//.........这里部分代码省略.........
示例3:
.account_name{
font-size: 17px;
}
.account_item{
font-size: 12px;
}
</style>
<nav class="pure-drawer" data-position="left">
<ul class="nav-primary">
<?php
if (Auth::isLogged()) {
?>
<li>
<?php
$acc = Account::getAccountObject();
// echo $acc->admin_username;
?>
<div class="account_details" style="cursor: pointer;" onclick="document.location='<?php
echo _SPPATH;
?>
editAcc';">
<div class="account_name"><?php
echo $acc->admin_nama_depan;
?>
</div>
<div class="account_item"><?php
echo $acc->admin_username;
?>
</div>
<div class="account_item"><?php
示例4: mysales
//.........这里部分代码省略.........
echo $y;
?>
">payout details</a></div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-6 topborder mobilelb">
<div class="inside">
<div class="heading_earning">All Time Revenue</div>
<div class="heading_amount">IDR <?php
echo idr(AppearSales::calculateRevenue($agent_id));
?>
</div>
<div class="detail_text">from <?php
echo $paid_count;
?>
Sales and <?php
echo AppearSales::freeCount($agent_id);
?>
Freebies</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<?php
$acc = Account::getAccountObject();
//get applied banner
$bm = new BannerModel();
$arrBm = $bm->getWhere("banner_interval_begin <= {$paid_count} AND banner_interval_end >= {$paid_count} AND banner_active = 1");
// pr($arrBm);
if (count($arrBm) > 0) {
$selBanner = $arrBm[0];
}
//get applied level
$lv = new LevelModel();
$arrLvl = $lv->getWhere("level_start<={$paid_count} AND level_end>={$paid_count} AND level_active = 1");
if (count($arrLvl) > 0) {
$selLvl = $arrLvl[0];
}
?>
<?php
if (count($arrBm) > 0) {
?>
<div class="col-md-4 col-sm-12 col-xs-12" >
<!-- <div style="background-color:#dedede; text-align:center; line-height: 30px; cursor: pointer; position: absolute; width: 30px; height: 30px;" onclick="$('#agentbanner').hide();">x</div>-->
<a href="<?php
echo $selBanner->banner_link_url;
?>
">
<img src="<?php
echo _SPPATH . _PHOTOURL . $selBanner->banner_img;
?>
" width="100%">
</a>
</div>
<div class="col-md-4" style="padding-left: 0px; padding-right: 0px;" >
<!-- <div style="background-color:#dedede; text-align:center; line-height: 30px; cursor: pointer; position: absolute; width: 30px; height: 30px;" onclick="$('#agentbanner').hide();">x</div>-->
<a href="<?php
示例5: pay
function pay()
{
$app_id = addslashes($_GET['app_id']);
$app = new AppAccount();
$app->getByID($app_id);
AppAccount::checkOwnership($app);
$paket_id = addslashes($_GET['paket']);
$paket = new Paket();
$paket->getByID($paket_id);
global $db;
//create new order
$vpt = new VpTransaction();
$vpt->order_id = mt_rand() . $app->app_id . Account::getMyID();
$vpt->order_acc_id = Account::getMyID();
$vpt->order_app_id = $app->app_id;
$vpt->order_date = leap_mysqldate();
$vpt->order_paket_id = $paket->paket_id;
$vpt->order_value = $paket->paket_price;
$vpt->order_status = 0;
$vpt->order_status_from = 0;
//hapus yang blom ada action apa2
$q = "DELETE FROM {$vpt->table_name} WHERE order_app_id = '{$app->app_id}' AND order_status = '0' AND order_status_from = '0'";
$db->query($q, 0);
$arrVpt = $vpt->getWhere("order_app_id = '{$app->app_id}' AND order_status = '0' AND order_status_from != '0' ");
if (count($arrVpt) > 0) {
die("Please wait for the payment response");
}
if ($vpt->save()) {
// pr($paket);
// pr($app);
try {
// Set our server key
//live
// Veritrans_Config::$serverKey = 'VT-server-3UfrS7tn0EDT99S2B18TnUh_';
//sandbox
Veritrans_Config::$serverKey = $this->getKeyUsed();
} catch (Exception $e) {
echo $e->getMessage();
}
if ($this->isProd) {
// Uncomment for production environment
Veritrans_Config::$isProduction = true;
// Uncomment to enable sanitization
Veritrans_Config::$isSanitized = true;
// Uncomment to enable 3D-Secure
Veritrans_Config::$is3ds = true;
}
$acc = Account::getAccountObject();
$exp = explode(" ", $acc->admin_nama_depan);
$billing_address = array('first_name' => $exp[0], 'last_name' => $exp[1], 'phone' => $acc->admin_phone, 'country_code' => 'IDN');
$customer_details = array('first_name' => $exp[0], 'last_name' => $exp[1], 'email' => $acc->admin_email, 'phone' => $acc->admin_phone, 'billing_address' => $billing_address);
$item1_details = array('id' => $app->app_id, 'price' => $paket->paket_price, 'quantity' => 1, 'name' => $app->app_name . " " . $paket->paket_name . " 1 year");
$item_details = array($item1_details);
$transaction = array('transaction_details' => array('order_id' => $vpt->order_id, 'gross_amount' => $paket->paket_price), 'customer_details' => $customer_details, 'item_details' => $item_details);
try {
// Redirect to Veritrans VTWeb page
header('Location: ' . Veritrans_VtWeb::getRedirectionUrl($transaction));
} catch (Exception $e) {
echo $e->getMessage();
if (strpos($e->getMessage(), "Access denied due to unauthorized")) {
echo "<code>";
echo "<h4>Please set real server key from sandbox</h4>";
echo "In file: " . __FILE__;
echo "<br>";
echo "<br>";
echo htmlspecialchars('Veritrans_Config::$serverKey = \'<your server key>\';');
die;
}
}
} else {
//if save
die("Please contact admin");
}
}
示例6: mydashboard
function mydashboard()
{
$acc = Account::getAccountObject();
?>
<style>
#attratas{
text-align: right;
}
</style>
<div class="container attop" >
<div class="col-md-10 col-md-offset-1">
<h1>Dashboard</h1>
<div id="attratas">
<button onclick="document.location='<?php
echo _SPPATH;
?>
MyApp/newApp';" class="btn btn-success" style="margin: 0px;">Create New Apps</button>
<button onclick="document.location='<?php
echo _SPPATH;
?>
editAcc';" class="btn btn-info" style=" margin: 0px;">Edit Account</button>
<button onclick="document.location='<?php
echo _SPPATH;
?>
myOrders';" class="btn btn-warning" style=" margin: 0px;">Order History</button>
</div>
<?php
if (in_array("master_admin", Account::getMyRoles())) {
$acc = new AppAccount();
$apps = $acc->getAll();
//
} else {
$acc = new App2Acc();
//AND app_active = 1
$apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id ", array("AppAccount"));
}
if (count($apps) > 0) {
?>
<div class="table-responsive" style="margin-top: 20px;">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>
No.
</th>
<th>App Name</th>
<th>Package</th>
<th>Status</th>
<th>Expired Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
foreach ($apps as $num => $ap) {
$paket = new Paket();
$paket->getByID($ap->app_paket_id);
?>
<tr>
<td><?php
echo $num + 1;
?>
</td>
<td><?php
echo $ap->app_name;
?>
</td>
<td><?php
echo $paket->paket_name;
?>
</td>
<td><?php
echo $ap->app_active;
?>
</td>
<td><?php
if ($ap->app_active == 1) {
echo indonesian_date($ap->app_contract_end);
}
?>
</td>
<td>
<!-- <a href='--><?php
//=_SPPATH;
?>
<!--MyApp/appView?id=--><?php
//=$ap->app_id;
?>
<!--' class="btn btn-info">Edit</a>-->
<?php
if ($ap->app_active == 1) {
?>
<a href='<?php
echo _SPPATH;
?>
PushHome/setID?app_id=<?php
echo $ap->app_id;
//.........这里部分代码省略.........
示例7: become_agent
public static function become_agent()
{
$rand = time() . rand(0, 100);
$_SESSION['rand'] = $rand;
$acc = Account::getAccountObject();
if ($acc->admin_isAgent == 1) {
die('Already Agent');
}
// pr($acc);
?>
<style>
.foto100{
width: 100px;
height: 100px;
overflow: hidden;
cursor: pointer;
}
.foto100 img{
/*width: 100%;*/
}
@media (max-width: 768px) {
.monly {
display: initial;
}
.donly {
display: none;
}
.fotowadah{
text-align: center;
}
.foto100{
margin: 0 auto;
}
input[type="file"]{
text-align: center;
margin: 0 auto;
}
}
@media (min-width: 768px) {
.monly {
display: none;
}
.donly {
display: initial;
}
}
</style>
<div class="container attop" >
<div class="col-md-8 col-md-offset-2">
<div class="appear_logo_pages">
<a href="<?php
echo _SPPATH;
?>
">
<img src="<?php
echo _SPPATH;
?>
images/appear-agent.png" >
</a>
</div>
<div id="waitingApproval" <?php
if ($acc->admin_isAgent != -1) {
?>
style="display: none;"<?php
}
?>
>
<h3 style="text-align: center;">Your request is being processed. Please wait for our updates.</h3>
<div class="back_to_button" style="text-align: center;" >
<a href="<?php
echo _SPPATH;
?>
mydashboard">back to dashboard</a>
</div>
</div>
<?php
if ($acc->admin_isAgent != -1) {
?>
<div id="uploadKTP">
<div style="text-align: center; padding: 15px;">
<p>Please upload your KTP and NPWP, and do not forget to fill your bank credentials to receive payment.</p>
</div>
<div class="berpadding" style="text-align: center; margin-bottom: 100px;">
<form id="form_agent" class="form-horizontal" role="form" >
<input type="hidden" name="token" value="<?php
echo $rand;
?>
">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-sm-2" for="ktp">KTP : </label>
//.........这里部分代码省略.........
示例8: getMyApps
static function getMyApps()
{
$acc = Account::getAccountObject();
?>
<style>
@media (max-width: 768px) {
.monly {
display: initial;
}
.donly {
display: none;
}
.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {
padding-left: 0px;
padding-right: 0px;
}
.container {
padding-right: 0px;
padding-left: 0px;
}
.attop{
/*padding-top: 50px;*/
}
#session{
margin-left: 15px; margin-right: 15px;
}
}
@media (min-width: 768px) {
.monly {
display: none;
}
.donly {
display: initial;
}
#attratas{
margin-top: 30px;
}
#agentbanner{
padding-right: 0px;
}
.stats{
/*min-height: 250px;*/
}
.stats_text{
/*padding-top: 30px;*/
}
.stats_number_big{
/*font-size: 40px;*/
}
.stats_money{
font-weight: bold;
/*font-size: 30px;*/
}
.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {
padding-left: 0px;
padding-right: 0px;
}
}
</style>
<div class="container attop" >
<div class="col-md-12">
<div class="appear_logo_pages">
<a href="<?php
echo _SPPATH;
?>
">
<img src="<?php
echo _SPPATH;
?>
images/appear-apps.png" >
</a>
</div>
<div id="attratas">
<button id="list" onclick="$('#list').hide();$('#icons').show();$('#app_icons').hide();$('#app_lists').show();" class="btn btn-success btn-abu" style="margin: 0px;display: none;"><i class="glyphicon glyphicon-th-list"></i></button>
<button id="icons" onclick="$('#list').show();$('#icons').hide();$('#app_icons').show();$('#app_lists').hide();" class="btn btn-success btn-abu" style="margin: 0px;"><i class="glyphicon glyphicon-th"></i></button>
<button onclick="document.location='<?php
echo _SPPATH;
?>
mydashboard';" class="btn btn-success btn-abu" style="margin: 0px;">Dashboard</button>
<button onclick="document.location='<?php
echo _SPPATH;
?>
apps/makenew';" class="btn btn-success btn-abu" style="margin: 0px;">Create New Apps</button>
</div>
<?php
if (ZAppFeature::checkRemainingSession()) {
$link = _SPPATH . "apps/make";
if ($_SESSION['ZAppFeature']['app_id'] > 0) {
$link = _SPPATH . "apps/make?id=" . $_SESSION['ZAppFeature']['app_id'];
}
?>
//.........这里部分代码省略.........