本文整理汇总了PHP中Account::getWhere方法的典型用法代码示例。如果您正苦于以下问题:PHP Account::getWhere方法的具体用法?PHP Account::getWhere怎么用?PHP Account::getWhere使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Account
的用法示例。
在下文中一共展示了Account::getWhere方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: overwriteForm
public function overwriteForm($return, $returnfull)
{
$return = parent::overwriteForm($return, $returnfull);
$return['app_active'] = new Leap\View\InputSelect($this->arrayYesNO, "app_active", "app_active", $this->app_active);
$acc = new Account();
$arr1 = $acc->getWhere("admin_type = 1 ORDER BY admin_nama_depan ASC");
foreach ($arr1 as $cc) {
$arrClient[$cc->admin_id] = $cc->admin_nama_depan;
}
$return['app_client_id'] = new \Leap\View\InputSelect($arrClient, "app_client_id", "app_client_id", $this->app_client_id);
$acc = new Paket();
$arr1 = $acc->getWhere("paket_active = 1 ORDER BY paket_id ASC");
foreach ($arr1 as $cc) {
$arrClient[$cc->paket_id] = $cc->paket_name;
}
$return['app_paket_id'] = new \Leap\View\InputSelect($arrClient, "app_paket_id", "app_paket_id", $this->app_paket_id);
return $return;
}
示例2: impersonate
function impersonate()
{
if (in_array("master_admin", Account::getMyRoles())) {
$acc = new Account();
$arr = $acc->getWhere("admin_type = 1 ORDER BY admin_nama_depan ASC");
// pr($arr);
?>
<select id="clientselector">
<option value=""></option>
<?php
foreach ($arr as $user) {
?>
<option value="<?php
echo $user->admin_id;
?>
"><?php
echo $user->admin_nama_depan;
?>
</option>
<?php
}
?>
</select>
<script>
// $("#clientselector").change(function(){
// var slc = $("#clientselector").val();
//// alert(slc);
// $('#clientdata').load("<?php
//=_SPPATH;
?>
//AppStats/loadDataApp?clientID="+slc);
// });
</script>
<?php
}
}
示例3: searchMemberBaru
public function searchMemberBaru()
{
$qi = isset($_GET['qi']) ? addslashes($_GET['qi']) : "";
$t = isset($_GET['t']) ? addslashes($_GET['t']) : "";
$gid = isset($_GET['gid']) ? addslashes($_GET['gid']) : die("NO GID");
$acc = new Account();
$myid = Account::getMyID();
$cg = new ChatMember();
$arrMember = $cg->getMemberFromGID($gid);
foreach ($arrMember as $mm) {
$arrz[] = "admin_id != '" . $mm->admin_id . "'";
}
$imp = implode(" AND ", $arrz);
$arr = $acc->getWhere("admin_aktiv = 1 AND {$imp} AND (admin_nama_depan LIKE '%{$qi}%' OR admin_username LIKE '%{$qi}%') ORDER BY admin_nama_depan ASC LIMIT 0,15");
foreach ($arr as $ac) {
?>
<div class="usercheckbox" style="padding: 5px;">
<input type="checkbox" onclick="addToMemberArr('<?php
echo $ac->admin_id;
?>
','<?php
echo $ac->admin_nama_depan;
?>
','<?php
echo $t;
?>
');" value="<?php
echo $ac->admin_id;
?>
"> <?php
echo $ac->admin_nama_depan;
?>
</div>
<?php
}
//pr($arr);
}
示例4: receipt
function receipt()
{
$order_id = addslashes($_GET['order_id']);
$order = new VpTransaction();
$order->getByID($order_id);
// pr($order);
//TODO : harus dibikin
if ($order->order_acc_id != Account::getMyID() && !in_array("master_admin", Account::getMyRoles())) {
die("hacking attempt");
}
$app = new AppAccount();
$app->getByID($order->order_app_id);
if ($app->app_active == 0) {
die("App not active");
}
$acc = new Account();
$acc->getByID($app->app_client_id);
$paket = new Paket();
$paket->getByID($order->order_paket_id);
$vpData = new VpData();
$arr = $vpData->getWhere("order_id = '{$order_id}' LIMIT 0,1");
if (count($arr) > 0) {
$data = $arr[0];
} else {
$data = new VpData();
}
if ($acc->admin_marketer != "") {
$arrAg = $acc->getWhere("admin_username = '{$acc->admin_marketer}' LIMIT 0,1");
if (count($arrAg) > 0) {
$agent = $arrAg[0];
}
}
// pr($arr);
?>
<style>
h1{
font-size: 25px;
padding-top: 30px;
}
h3{
font-size: 20px;
font-style: italic;
}
h4{
font-size: 17px;
margin-top: 20px;
margin-bottom: 30px;
}
.billings td{
padding-right: 20px;
padding-bottom: 10px;
}
@media (max-width: 768px) {
.monly {
display: initial;
}
.donly {
display: none;
}
h1{
font-size: 20px;
}
h3{
font-size: 17px;
font-style: italic;
}
h4{
font-size: 14px;
margin-bottom: 30px;
}
.billings td{
padding-bottom: 10px;
}
}
@media (min-width: 768px) {
.monly {
display: none;
}
.donly {
display: initial;
}
}
@media print {
.pure-toggle-label[data-toggle-label='left']{
display: none;
}
#printme{
display: none;
}
body{
background-color: #ffffff;
}
//.........这里部分代码省略.........
示例5: Account
public function Account()
{
/*
* get All Active Department
*/
$dp = new RoleOrganization();
$arrOrg = $dp->getWhere("organization_active = 1 AND organization_parent_id != 0");
//simpan ke array yang mudah
$arrOrg2 = array();
foreach ($arrOrg as $or) {
$arrOrg2[$or->organization_id] = $or;
}
//pr($arrOrg2);
/*
* get All Active Level
*/
$dp = new RoleLevel();
$arrOrg = $dp->getWhere("level_active = 1");
//simpan ke array yang mudah
$arrLevel = array();
foreach ($arrOrg as $or) {
$arrLevel[$or->level_id] = $or;
}
/*
* get All Active Role
*/
$dp = new Role();
$arrOrg = $dp->getWhere("role_active = 1");
//simpan ke array yang mudah
$arrRoles = array();
foreach ($arrOrg as $or) {
$arrRoles[$or->role_id] = $or;
}
//pr($arrLevel);
//create the model object
$cal = new Account();
$arrCal = $cal->getWhere("admin_aktiv = 1 ORDER BY admin_username ASC LIMIT 0,10");
$meta = new AccountMeta();
$t = time();
?>
<h1><?php
echo Lang::t('Account Management');
?>
</h1>
<div class="row hidden-print" style="margin-bottom: 10px;">
<div class="col-md-4 col-xs-12">
<div class="input-group">
<input type="text" class="form-control" value="" id="Account2Deptsearchpat" placeholder="<?php
echo Lang::t('Username');
?>
,<?php
echo Lang::t('Name');
?>
">
<span class="input-group-btn">
<button class="btn btn-default" id="Account2Deptsearchpat<?php
echo $t;
?>
" type="button">Search</button>
</span>
</div>
<!-- /input-group -->
<script type="text/javascript">
$("#Account2Deptsearchpat<?php
echo $t;
?>
").click(function () {
var slc = encodeURI($('#Account2Deptsearchpat').val());
openLw(window.selected_page, '<?php
echo _SPPATH;
?>
PortalAdminWeb/Account?page=1&word=' + slc, 'fade');
});
$("#Account2Deptsearchpat").keyup(function (event) {
if (event.keyCode == 13) { //on enter
var slc = encodeURI($('#Account2Deptsearchpat').val());
openLw(selected_page, '/leapportal/PortalAdminWeb/Account?page=1&word=' + slc, 'fade');
}
});
</script>
</div>
</div>
<table class="table table-bordered table-striped table-hover" style="background-color: white;">
<thead>
<tr>
<th><?php
echo Lang::t('ID');
?>
</th>
<th><?php
echo Lang::t('Username');
?>
</th>
<th><?php
echo Lang::t('Name');
?>
</th>
//.........这里部分代码省略.........
示例6: agent
function agent()
{
$app = new Account();
$arrApp = $app->getWhere("admin_isAgent = -1 ORDER BY admin_id DESC");
// pr($arrApp);
?>
<h1>Agent Approval Queue</h1>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>
Agent Account
</th>
<th>
Agent Details
</th>
<th>
Record Penjualan
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($arrApp as $acc) {
?>
<tr>
<td>
<?php
echo $acc->admin_id;
?>
<?php
echo $acc->admin_username;
?>
<?php
echo $acc->admin_nama_depan;
?>
<br>
<?php
echo $acc->admin_email;
?>
<br>
<?php
echo $acc->admin_phone;
?>
</td>
<td>
<a href="<?php
echo _SPPATH . _PHOTOURL . $acc->admin_ktp;
?>
" target="_blank">
<img src="<?php
echo _SPPATH . _PHOTOURL . $acc->admin_ktp;
?>
" width="100px">
</a>
<a href="<?php
echo _SPPATH . _PHOTOURL . $acc->admin_npwp;
?>
" target="_blank">
<img src="<?php
echo _SPPATH . _PHOTOURL . $acc->admin_npwp;
?>
" width="100px">
</a>
<hr>
Bank :<?php
echo $acc->admin_bank;
?>
<br>
Acc Nr. : <?php
echo $acc->admin_bank_acc;
?>
<br>
Acc Name :<?php
echo $acc->admin_bank_acc_name;
?>
<br>
KCU : <?php
echo $acc->admin_bank_kcu;
?>
</td>
<td>
Paid :<?php
echo $acc->admin_total_paid_sales;
?>
<br>
Free : <?php
echo $acc->admin_total_free_sales;
?>
</td>
<td>
<?php
//.........这里部分代码省略.........
示例7: log
public static function log($app, $vpt)
{
if ($app->app_active != 1) {
die("App harus active utk dapat komisi");
}
$acc = new Account();
$acc->getByID($app->app_client_id);
// AppAccount::checkOwnership($app);
if ($acc->admin_marketer != "") {
$arrAcc = $acc->getWhere("admin_username = '{$acc->admin_marketer}' LIMIT 0,1");
if (count($arrAcc) > 0) {
$marketer = $arrAcc[0];
} else {
//set default marketer to 7 /elroy
$marketer = new Account();
$marketer->getByID(Efiwebsetting::getData("Default_Agent_ID"));
}
} else {
//set default marketer to 7 /elroy
$marketer = new Account();
$marketer->getByID(Efiwebsetting::getData("Default_Agent_ID"));
}
$paket = new Paket();
$paket->getByID($app->app_paket_id);
$komisi = new KomisiModel();
$komisi->komisi_acc_id = $marketer->admin_id;
$komisi->komisi_app_client_id = $app->app_client_id;
$komisi->komisi_app_date = leap_mysqldate();
$komisi->komisi_app_id = $app->app_id;
$komisi->komisi_paket_id = $paket->paket_id;
$komisi->komisi_value = $paket->paket_komisi;
$komisi->komisi_status = 0;
//blm dibayarkan
$komisi->komisi_sisa = $paket->paket_komisi;
$komisi->komisi_order_id = $vpt->order_id;
$komisi->komisi_bagi_pertama_value = $paket->paket_komisi_satu;
$komisi->komisi_bagi_kedua_value = $paket->paket_komisi_dua;
//langsung save datenya saja sehingga gampang
$pay1_date = getFirstDayOfNextMonth(date("n", strtotime($komisi->komisi_app_date)), date("Y", strtotime($komisi->komisi_app_date)));
$pay2_date = getFirstDayOfNext4Month(date("n", strtotime($komisi->komisi_app_date)), date("Y", strtotime($komisi->komisi_app_date)));
if ($paket->paket_id != 1) {
$komisi->komisi_bagi_pertama_date = $pay1_date;
$komisi->komisi_bagi_kedua_date = $pay2_date;
}
$succ = $komisi->save();
if ($succ) {
$isPending = 0;
if ($paket->paket_id == 1) {
$isPending = 1;
}
//email dpt komisi
$dpt = new DataEmail();
$dpt->dapatKomisi($marketer->admin_email, $paket->paket_komisi, $isPending, $acc->admin_nama_depan, $marketer->admin_isAgent);
//tambah counter paket //atau ambil counter paket disini
if ($paket->paket_id == 1) {
//free
//check sudah ada brp paid yang sudah dibayar dll
//cek apa bisa tingtong
self::checkTingTongFree($app, $marketer, $succ, $paket, $acc, "free");
$komisi = new KomisiModel();
$nr = $komisi->getJumlah("komisi_acc_id = '{$marketer->admin_id}' AND komisi_paket_id = 1");
$marketer->admin_total_free_sales = $nr;
$marketer->load = 1;
$marketer->save();
} else {
//pakai BagiKomisi
//cek apa bisa di tingtong
self::checkTingTongFree($app, $marketer, $succ, $paket, $acc, "paid");
$komisi = new KomisiModel();
$nr = $komisi->getJumlah("komisi_acc_id = '{$marketer->admin_id}' AND (komisi_paket_id = 2 OR komisi_paket_id = 3)");
$marketer->admin_total_paid_sales = $nr;
$marketer->load = 1;
$marketer->save();
//cek sudah kena kelipatan 6 blom
$bonus = new BonusKomisi();
$bonus->getByID($nr);
if ($bonus->bk_bonus_paid != "" && $bonus->bk_bonus_paid > 0) {
//masukan ke bonus
$bagiKomisi = new BagiKomisi();
$bagiKomisi->bagi_id = $marketer->admin_id . "_" . $nr;
$bagiKomisi->bagi_acc_id = $marketer->admin_id;
$bagiKomisi->bagi_bk_id = $nr;
$bagiKomisi->bagi_date_acquire = leap_mysqldate();
$bagiKomisi->bagi_status = 0;
//unpaid
$bagiKomisi->bagi_value = $bonus->bk_bonus_paid;
$bagiKomisi->save();
}
}
}
}
示例8: editProfileSubmit
public function editProfileSubmit()
{
$fname = addslashes($_POST['fname']);
$lname = addslashes($_POST['lname']);
$emailadd = addslashes($_POST['emailadd']);
$p1 = addslashes($_POST['p1']);
$p2 = addslashes($_POST['p2']);
$err = 0;
$msg = array();
//check if password matched
if ($p1 != Account::getMyPassword()) {
$err = 1;
$msg[] = "Password Salah";
}
if ($p2 != "") {
if (strlen($p2) < 5) {
$err = 1;
$msg[] = "Password Baru Kurang Panjang, min 5 Karakter";
}
}
if ($fname == "") {
$err = 1;
$msg[] = "Nama Depan Tidak Boleh Kosong";
}
if ($lname == "") {
$err = 1;
$msg[] = "Nama Belakang Tidak Boleh Kosong";
}
if (!filter_var($emailadd, FILTER_VALIDATE_EMAIL)) {
$err = 1;
$msg[] = "Email tidak valid";
}
if ($emailadd != Account::getMyEmail()) {
$fb = new Account();
$arr = $fb->getWhere("admin_email = '{$emailadd}'");
if (count($arr) > 0) {
$err = 1;
$msg[] = "Email sudah terpakai";
}
}
if (!$err) {
if ($p2 != "") {
$p1 = $p2;
}
$acc = new Account();
$acc->getByID(Account::getMyID());
$acc->admin_nama_depan = $fname;
$acc->admin_nama_belakang = $lname;
$acc->admin_name = $fname . " " . $lname;
$acc->admin_email = $emailadd;
$acc->admin_password = $p1;
//$acc->admin_role = "normal_user";
$acc->admin_lastupdate = leap_mysqldate();
//$acc->admin_createdate = leap_mysqldate();
//$acc->admin_aktiv = 1;
$acc->load = 1;
$acc->save();
$_SESSION['account'] = $acc;
//if($succ){
header("Location:" . _SPPATH . "myprofile?succ=Update%20Successful");
die;
/*}
else{
header("Location:"._SPPATH."myprofile?err=Penyimpanan%20Gagal");
die();
}*/
} else {
$msgerr = implode(",", $msg);
header("Location:" . _SPPATH . "myprofile?err=" . $msgerr);
die;
}
}
示例9: verify
function verify()
{
$mid = addslashes($_GET['mid']);
$hash = addslashes($_GET['token']);
if ($mid == "" || $hash == "") {
die("Hacking Attempt");
}
$acc = new Account();
$nr = $acc->getWhere("admin_hash = '{$hash}' AND admin_username = '{$mid}'");
if (count($nr) == 1) {
$acc = $nr[0];
$acc->getByID($mid);
$acc->admin_aktiv = 1;
$acc->load = 1;
$acc->save();
?>
<div class="container attop">
<h1 class="hype">You are now verified!!</h1>
<h2 class="hype">Please <a href="<?php
echo _SPPATH;
?>
loginpage">login</a></h2>
</div>
<?php
} else {
?>
<div class="container attop">
<h1 class="hype">Verification Error!!</h1>
<h2 class="hype">Please <a href="<?php
echo _SPPATH;
?>
register">register</a> again or <a href="<?php
echo _SPPATH;
?>
contact">contact us</a> </h2>
</div>
<?php
}
}
示例10: forgotpass2
public function forgotpass2()
{
$email = addslashes($_POST['email']);
if ($email == "") {
die("Please Insert Email Account");
}
$acc = new Account();
$arr = $acc->getWhere("admin_email = '{$email}'");
$acc = $arr[0];
$lm = new Leapmail();
$lm->senderMail = "po@b3l1.com";
$isi .= "Berikut Adalah Kredensial Pendaftaran Anda \n\n";
$isi .= "";
$isi .= "Email Anda : " . $acc->admin_email . "\n";
$isi .= "Password : " . $acc->admin_password;
$isi .= "\n\n";
$isi .= "Silahkan Mulai Membeli Barang Branded dan ORI dengan Harga Miring!! \n\n Visit http://b3l1.com/firsttime for more Information";
$isi .= "\n\n";
$isi .= "Untuk Informasi lebih lanjut bisa melakukan email ke info@b3l1.com";
$lm->sendEmail($acc->admin_email, "Recovery Password B3l1.COM", $isi);
header("Location:" . _LANGPATH . "register?msg=Recovery%20Email%20sudah%20dikirim");
exit;
}
示例11: processRegister
//.........这里部分代码省略.........
}
//apakah sudah terpakai
//END
//Check Phone
$phone = addslashes($_POST['phone']);
if (strlen($phone) < $hp_min || strlen($phone) > $hp_max) {
$json['err'] .= "The phone is the wrong length. Min {$hp_min} Max {$hp_max} Characters.<br>";
}
//ENd
if ($json['err'] == "") {
//cek apakah email dan username masi free
$acc = new Account();
$nr = $acc->getJumlah("admin_email = '{$email}'");
$nr2 = $acc->getJumlah("admin_username = '{$uname}'");
if ($nr > 0) {
$json['err'] .= "Email is already being registered.<br>";
}
if ($nr2 > 0) {
$json['err'] .= "Username is already being registered.<br>";
}
if ($json['err'] == "") {
//process password
$crypt = Account::cryptPassword($pwd);
//save as new Account
$acc->admin_email = $email;
$acc->admin_ip = $_SERVER['REMOTE_ADDR'];
$acc->admin_nama_depan = $name;
$acc->admin_password = $crypt;
$acc->admin_username = $uname;
$acc->admin_role = "normal_user";
$acc->admin_type = 1;
$acc->admin_aktiv = 0;
$acc->admin_hash = md5($uname . $pwd . time());
$acc->admin_reg_date = leap_mysqldate();
$acc->admin_lastupdate = leap_mysqldate();
$acc->admin_marketer = addslashes($_POST['marketer']);
$acc->admin_phone = $phone;
$mid = $acc->save();
if ($mid) {
$needVerify = Efiwebsetting::getData("needVerify");
$dataEmail = new DataEmail();
if ($needVerify == "true") {
$succEmail = $dataEmail->registrationSuccessWithVerify($email, $uname, $acc->admin_hash);
} else {
//aktivasi langsung
$arrAcc = $acc->getWhere("admin_email = '{$email}' LIMIT 0,1");
$acc2 = $arrAcc[0];
$acc2->load = 1;
// $acc->getByID($mid);
$acc2->admin_aktiv = 1;
$acc2->save();
$succEmail = $dataEmail->registrationSuccessWithOutVerify($email, $uname);
//kalau ada marketer send ke marketer jg
if ($acc2->admin_marketer != "") {
$arrAcc2 = $acc->getWhere("admin_username = '{$acc2->admin_marketer}' LIMIT 0,1");
if (count($arrAcc2) > 0) {
$acc_marketer = $arrAcc2[0];
$succEmail2 = $dataEmail->registrationSuccessToMarketer($acc_marketer->admin_email, $uname, $acc2->admin_marketer);
} else {
$succEmail2 = $dataEmail->registrationSuccessToMarketer(Efiwebsetting::getData("franchiseEmail"), $uname, $acc2->admin_marketer);
$acc2->admin_marketer = "";
$acc2->save();
}
}
//loginin
$_POST['admin_username'] = $acc->admin_username;
$_POST['admin_password'] = $acc->admin_password;
$_POST['rememberme'] = 1;
$username = addslashes($_POST["admin_username"]);
$password = addslashes($_POST["admin_password"]);
$rememberme = isset($_POST["rememberme"]) ? 1 : 0;
$row = array("admin_username" => $username, "admin_password" => $password, "rememberme" => $rememberme, "admin_ldap" => 0);
if ($mode == "web") {
//login pakai row credential
Auth::login($row);
}
}
//send email
// $lm = new Leapmail();
// $lm->senderMail = "registration@yourapp.com";
//sementara disini..krn response error
$json['status_code'] = 1;
$json['status_message'] = "Registration Success";
$json['bool'] = 1;
$json['mid'] = $mid;
if ($succEmail) {
// $json['err'] .= $succEmail;
} else {
$json['err'] .= "Send Email failed. Please <a href='" . _SPPATH . "contact'>contact</a> us by email or phone.<br>";
}
} else {
$json['status_code'] = 0;
$json['status_message'] = "Saving failed";
$json['err'] .= "Save failed. Please <a href='" . _SPPATH . "contact'>contact</a> us by email or phone.<br>";
}
}
}
echo json_encode($json);
die;
}
示例12: login
public function login()
{
IMBAuth::checkOAuth();
$username = addslashes($_POST['username']);
$password = addslashes($_POST['password']);
//untuk deviceModel
$device_id = addslashes($_POST['device_id']);
$type = addslashes($_POST['type']);
$acc = new Account();
$arr = $acc->getWhere("admin_username = '{$username}' OR admin_email ='{$username}'");
// pr($arr);
if (count($arr) > 0) {
$acc = $arr[0];
if ($password == $acc->admin_password) {
$json['status_code'] = 1;
$json['status_message'] = "Success";
$json_acc['acc_id'] = $acc->admin_id;
$json_acc['username'] = $acc->admin_username;
$json_acc['email'] = $acc->admin_email;
$json_acc['user_token'] = md5($acc->admin_email . $acc->admin_password);
$json['account'] = $json_acc;
//dashboard
$myid = $acc->admin_id;
$kom = new KomisiModel();
$arrKom = $kom->getWhere("komisi_acc_id = '{$myid}' ORDER BY komisi_app_date ASC");
$paid = 0;
$unpaid = 0;
$total = 0;
$free = 0;
$android = 0;
$androidios = 0;
$totalpaketbayar = 0;
$totalpaket = 0;
foreach ($arrKom as $kom) {
if ($kom->komisi_status == 1) {
$paid += $kom->komisi_value;
} else {
$unpaid += $kom->komisi_value;
}
$total += $kom->komisi_value;
if ($kom->komisi_paket_id == 1) {
//free
$free++;
}
if ($kom->komisi_paket_id == 2) {
//free
$android++;
$totalpaketbayar++;
}
if ($kom->komisi_paket_id == 3) {
//free
$androidios++;
$totalpaketbayar++;
}
$totalpaket++;
}
//get applied banner
$bm = new BannerModel();
$arrBm = $bm->getWhere("banner_interval_begin <= {$totalpaketbayar} AND banner_interval_end >= {$totalpaketbayar} AND banner_active = 1");
if (count($arrBm) > 0) {
$selBanner = $arrBm[0];
$json_banner['banner_img'] = _BPATH . _PHOTOURL . $selBanner->banner_img;
$json_banner['banner_link_url'] = $selBanner->banner_link_url;
}
//get applied level
$lv = new LevelModel();
$arrLvl = $lv->getWhere("level_start<={$totalpaketbayar} AND level_end>={$totalpaketbayar} AND level_active = 1");
if (count($arrLvl) > 0) {
$selLvl = $arrLvl[0];
$json_lvl['level_name'] = $selLvl->level_name;
$json_lvl['level_img'] = _BPATH . _PHOTOURL . $selLvl->level_img;
}
$dashboard['sales_total'] = $totalpaket;
$dashboard['sales_paid'] = $totalpaketbayar;
$dashboard['sales_fee'] = $free;
$dashboard['sales_android'] = $android;
$dashboard['sales_androidios'] = $androidios;
$dashboard['money_total'] = $total;
$dashboard['money_paid'] = $paid;
$dashboard['money_unpaid'] = $unpaid;
$dashboard['banner'] = $json_banner;
$dashboard['level'] = $json_lvl;
$json['dashboard'] = $dashboard;
//myapps
$app2acc = new App2Acc();
//AND app_active = 1
$apps = $app2acc->getWhereFromMultipleTable("ac_admin_id = '" . $acc->admin_id . "' AND ac_app_id = app_id ", array("AppAccount"));
if (count($apps) > 0) {
foreach ($apps as $ap) {
$rr = array();
$rr['app_id'] = $ap->app_id;
$rr['app_icon'] = $ap->app_icon;
$rr['app_name'] = $ap->app_name;
$rr['app_active'] = $ap->app_active;
$rr['app_shortdes'] = $ap->app_shortdes;
$rr['app_token'] = $ap->app_token;
$rr['app_contract_end'] = $ap->app_contract_end;
$rr['app_google_play_link'] = $ap->app_google_play_link;
$rr['app_google_version'] = $ap->app_google_version;
$rr['app_ios_link'] = $ap->app_ios_link;
//.........这里部分代码省略.........
示例13: replacePassword
public function replacePassword()
{
$acc = new Account();
$arrAcc = $acc->getWhere("admin_id != 0");
foreach ($arrAcc as $ac) {
$ac->load = 1;
$ac->admin_password = "demo";
$ac->save();
}
}