本文整理汇总了PHP中user::getAccType方法的典型用法代码示例。如果您正苦于以下问题:PHP user::getAccType方法的具体用法?PHP user::getAccType怎么用?PHP user::getAccType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类user
的用法示例。
在下文中一共展示了user::getAccType方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$this->view->js = array('join/js/index.js');
$referer = $this->model->getReferer();
$this->view->referer = $referer;
if ($referer != FALSE) {
$refererData = $this->model->getRefererData($referer);
$refererAcc = user::getAccType($refererData['acc_type']);
$this->view->refererData = array("username" => $refererData['username'], "accType" => $refererAcc['label']);
}
$this->view->accTypeList = user::getAccType();
$this->view->breadcrumbs = $this->breadcrumb->get();
$this->view->render('join/index');
}
示例2: __construct
function __construct()
{
session::init();
$this->breadcrumb = new breadcrumb();
$this->view = new view();
$this->_userProfileImages = IMAGES_PATH . "user-default.png";
if (session::exist(AGENT_SESSION_NAME) and session::exist(AGENT_LOGIN_SESSION)) {
$agent_id = session::get(AGENT_SESSION_NAME);
$userData = new user();
// USERDATA
$this->_userData = $userData->getUserData('agent_id', $agent_id);
$user = $this->_userData;
// USER ACC. TYPE
$userAccType = user::getAccType($user['acc_type']);
$this->_userAccType = $userAccType['label'];
// PROFILE IMAGE
$profileImageExist = user::checkExist("user_images", "agent_id = '{$agent_id}' AND profile = '1'");
if ($profileImageExist) {
$image = user::getUserImages($agent_id, TRUE);
$this->_userProfileImages = IMAGES_PATH . "users/" . $image['filename'];
}
// AVAILABLE COMMISSION
$this->_availableCommission = user::getAvailableComm($agent_id);
// BADGE
$countAccPaymentBadge = user::countBadge("user_payment", "status = '0'");
$this->_accPaymentBadge = $countAccPaymentBadge > 0 ? $countAccPaymentBadge : "";
$countWithdrawalBadge = user::countBadge("user_withdrawal", "status = '0' OR status = '1'");
$this->_withdrawalBadge = $countWithdrawalBadge > 0 ? $countWithdrawalBadge : "";
// $countMessageBadge = user::countBadge("user_messages", "agent_id = '$agent_id' AND status = '0'");
// $this->_messageBadge = ($countMessageBadge > 0) ? $countMessageBadge : "";
}
$this->view->_userData = $this->_userData;
$this->view->_userAccType = $this->_userAccType;
$this->view->_userProfileImages = $this->_userProfileImages;
$this->view->_availableCommission = $this->_availableCommission;
// BADGE
$this->view->_accPaymentBadge = $this->_accPaymentBadge;
$this->view->_withdrawalBadge = $this->_withdrawalBadge;
// $this->view->_messageBadge = $this->_messageBadge;
}
示例3: addagent
public function addagent()
{
$lv1Exist = isset($_REQUEST['lv1']) ? TRUE : FALSE;
if (!$lv1Exist) {
redirect::to("mynetwork/geneology");
} else {
$agent_id = $_GET['lv1'];
$hasData = user::checkExist("user_accounts", "agent_id = '{$agent_id}'");
if (!$hasData) {
redirect::to("mynetwork/geneology");
} else {
$newUplineData = $this->model->newUplineData($agent_id);
}
}
$this->view->accTypeList = user::getAccType();
$this->view->newUplineData = $newUplineData;
$this->view->countryList = user::getCountry();
$this->view->statesList = user::getStates("MY");
$this->breadcrumb->add("Geneology", "mynetwork/geneology");
$this->breadcrumb->add("Add Agent", "mynetwork/addagent");
$this->view->breadcrumbs = $this->breadcrumb->get();
$this->view->js = array('mynetwork/js/addagent.js');
$this->view->render('mynetwork/addagent', 'backoffice');
}
示例4: downlineList
//.........这里部分代码省略.........
}
for ($i = max(1, $current_page - 5); $i <= min($current_page + 5, $total_pages); $i++) {
if ($current_page == $i) {
$pagination .= "<li class='active'><a href='#'>{$i}</a></li>";
} else {
$pagination .= "<li><a href='{$self_address}?p={$i}{$get_search}'>{$i}</a></li>";
}
}
if ($current_page < $total_pages - 5) {
$pagination .= "<li class='disabled'><a href='#'>..</a></li>";
$pagination .= "<li><a href='#'>{$total_pages}</a></li>";
}
if ($current_page < $total_pages) {
$pagination .= "<li><a href='{$self_address}?p={$next_page}{$get_search}'>Next <span class='fa fa-angle-double-right fa-fw'></span></a></li>";
} else {
$pagination .= "<li class='disabled'><a href='#'>Next <span class='fa fa-angle-double-right fa-fw'></span></a></li>";
}
$pagination .= "</ul>";
if ($searchItm == NULL) {
$downlineList_limit = $this->db->select("user_accounts", "*", "sponsor_id = '{$agent_id}' LIMIT {$from},{$max_result}");
} else {
$downlineList_limit = $this->db->select("user_accounts", "*", "sponsor_id = '{$agent_id}' {$searchSQL} LIMIT {$from},{$max_result}");
}
if ($total_row == 0) {
$content .= "<tr><td class ='text-center' colspan='8'>No downline record.</td></tr>";
$pagination = NULL;
} else {
if ($total_row <= $max_result) {
$pagination = NULL;
}
$x = $from + 1;
foreach ($downlineList_limit as $value) {
$user_id = $value['agent_id'];
// GET USER IMAGE
$userImageExist = user::checkExist("user_images", "agent_id = '{$user_id}' AND profile = '1'");
if (!$userImageExist) {
$image = "user-default.png";
} else {
$image = $this->db->select("user_images", "filename", "agent_id = '{$user_id}' AND profile = '1'", "fetch");
$image = "users/" . $image['filename'];
}
// GET ACCOUNT STATUS
$emailVerify = $value['activate'];
if (!$emailVerify) {
$labelStatus = "label-danger";
$abbr = "Email and payment verification not complete.";
$status = "Not Activate";
} else {
$paymentVerify = $value['payment'];
switch ($paymentVerify) {
case '-1':
$labelStatus = "label-danger";
$abbr = "Payment not complete.";
$status = "Pending";
break;
case 0:
$labelStatus = "label-danger";
$abbr = "Waiting for payment.";
$status = "Pending";
break;
case 1:
$labelStatus = "label-warning";
$abbr = "Payment have been issue and still in verification process.";
$status = "Pending";
break;
default:
$labelStatus = "label-success";
$abbr = "Email and payment verification complete.";
$status = "Active";
break;
}
}
// CONSTRUCT CONTENT
$fullname = ucwords(strtolower($value['fullname']));
$userImage = IMAGES_PATH . $image;
$email = $value['email'];
$mobile = $value['mobile'];
$username = $value['username'];
$accType = user::getAccType($value['acc_type']);
$accType = $accType['label'];
$status = "<abbr title='{$abbr}'><span class='label {$labelStatus}'>{$status}</span></abbr>";
$message = BASE_PATH . "message/compose?to={$username}";
$content .= "<tr>";
$content .= "<td class='text-center'>{$x}</td>";
$content .= "<td><a class='userImage' href='#' data-image='{$userImage}'>{$fullname}</a></td>";
$content .= "<td class='text-center'>{$email}</td>";
$content .= "<td class='text-center'>{$mobile}</td>";
$content .= "<td class='text-center'>{$username}</td>";
$content .= "<td class='text-center'>{$accType}</td>";
$content .= "<td class='text-center'>{$status}</td>";
$content .= "<td><div class='col-xs-12 text-center'><a class='unavailable-link' href='{$message}' title='Message {$username}'><i class='fa fa-comment fa-fw'></i> Message</a></div></td>";
$content .= "</tr>";
$x++;
}
}
}
$footer = "</tbody></table>";
$result = $header . $content . $footer . $pagination;
echo json_encode($result);
}
示例5: payment
function payment()
{
$userdata = $this->user;
$agent_id = $userdata['agent_id'];
$paymentComplete = TRUE;
$db = new database(DBTYPE, DBHOST, DBNAME, DBUSER, DBPASS);
$payment_chk = $userdata['payment'];
if ($payment_chk == 2 or $payment_chk == 1) {
redirect::to("dashboard");
}
$this->view->bankList = user::getBanks();
$this->view->paymentMethodList = user::getPaymentMethod();
$this->view->accType = user::getAccType($this->user['acc_type']);
$this->breadcrumb->add("Payment Details", "setup/payment");
$this->view->breadcrumbs = $this->breadcrumb->get();
$this->view->js = array('setup/js/setup.js');
$this->view->render('setup/payment', 'backoffice');
}
示例6: checkPin
public function checkPin($data)
{
$response_array = array();
$agent_id = $data['pin'];
$userExist = user::checkExist("user_accounts", "agent_id = '{$agent_id}'");
if (!$userExist) {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Advertisement Pin</b> not valid!</div>";
} else {
$userdata = $this->db->select("user_accounts", "*", "agent_id = '{$agent_id}'", "fetch");
$header = "<table class='table table-bordered table-condensed'><thead><tr class='active'><th class='text-center' width='50'>#</th><th class='text-center' width='150'>Available Pin</th><th class='text-center' width='200'>Pin Code</th><th class='text-center'>Acc. Type</th><th class='text-center' width='150'>Action</th></tr></thead><tbody>";
$content = "";
$footer = "</tbody></table>";
$acc_type = $userdata['acc_type'];
$activate = $userdata['activate'];
$payment = $userdata['payment'];
$available_pin = $userdata['available_pin'];
if ($acc_type == "pb" or $acc_type == "aa" or $activate == 0 or $payment != 2) {
$response_array['r'] = "false";
$response_array['msg'] = "<div><b>Advertisement Pin</b> not valid!</div>";
} elseif ($available_pin == 0) {
$response_array['r'] = "false";
$response_array['msg'] = "<div>Insufficient <b>Advertisement Pin</b> balance!</div>";
} else {
// CONSTRUCT CONTENT
$highlight = $userdata['acc_type'] == "ep" ? "warning" : NULL;
$pin_code = $userdata['agent_id'];
$accType = user::getAccType($acc_type);
$accType = $accType['label'];
$content .= "<tr class='text-center {$highlight}'>";
$content .= "<td>1</td>";
$content .= "<td>{$available_pin}</td>";
$content .= "<td>{$pin_code}</td>";
$content .= "<td>{$accType}</td>";
$content .= "<td><button class='btnSelect btn btn-primary btn-xs' type='button' data-pin='{$pin_code}'>Select</button></td>";
$content .= "</tr>";
$result = $header . $content . $footer;
$response_array['r'] = "true";
$response_array['msg'] = $result;
}
}
return $response_array;
}
示例7: ajaxAgentList
public function ajaxAgentList($s, $p)
{
$self_address = BASE_PATH . "management/agentList";
$header = "<table class='table table-bordered table-condensed small table-hover'><thead><tr class='active'><th class='text-center' width='50px'>No.</th><th class='text-center' width='100px'>Agent ID</th><th class='text-center' width='250px'>Fullname</th><th class='text-center' width='150px'>Username</th><th class='text-center' width='150px'>Sponsor</th><th class='text-center' width='150px'>Upline</th><th class='text-center' width='150px'>Acc. Type</th><th class='text-center' width='200px'>(Payment / Acc. Activation)</th><th class='text-center' width='150px'>Date Join</th><th class='text-center' width='150px'>Last Login</th><th class='text-center'>Action</th></tr></thead><tbody>";
$content = "";
$pagination = "";
if ($s == '') {
$countAgentList = $this->db->count("user_accounts");
} else {
$countAgentList = $this->db->count("user_accounts", "(agent_id LIKE '%{$s}%' OR username LIKE '%{$s}%')");
}
if ($countAgentList == 0) {
$content .= "<tr class='text-center'><td colspan='11'>No agent record found.</td></tr>";
$total_row = 0;
} else {
$page = $p;
$current_page = $page;
$prev_page = $current_page - 1;
$next_page = $current_page + 1;
$max_result = 30;
$from = $current_page * $max_result - $max_result;
if ($s == '') {
$agentList_full = $this->db->select("user_accounts", "*", "agent_id != '1000000' ORDER BY id DESC");
$get_param = NULL;
} else {
$agentList_full = $this->db->select("user_accounts", "*", "(agent_id LIKE '%{$s}%' OR username LIKE '%{$s}%' OR fullname LIKE '%{$s}%') ORDER BY id DESC");
$get_param = "&s={$s}";
}
$total_row = count($agentList_full);
$total_pages = ceil($total_row / $max_result);
$pagination .= "<ul class='pagination pagination-sm'>";
if ($current_page > 1) {
$pagination .= "<li><a href='{$self_address}?p={$prev_page}{$get_param}'><span class='fa fa-angle-double-left fa-fw'></span> Back</a></li>";
} else {
$pagination .= "<li class='disabled'><a href='#'><span class='fa fa-angle-double-left fa-fw'></span> Back</a></li>";
}
if ($current_page >= 7) {
$pagination .= "<li><a href='{$self_address}?p=1{$get_param}'>1</a></li>";
$pagination .= "<li class='disabled'><a href='#'>..</a></li>";
}
for ($i = max(1, $current_page - 5); $i <= min($current_page + 5, $total_pages); $i++) {
if ($current_page == $i) {
$pagination .= "<li class='active'><a href='#'>{$i}</a></li>";
} else {
$pagination .= "<li><a href='{$self_address}?p={$i}{$get_param}'>{$i}</a></li>";
}
}
if ($current_page < $total_pages - 5) {
$pagination .= "<li class='disabled'><a href='#'>..</a></li>";
$pagination .= "<li><a href='{$self_address}?p={$total_pages}{$get_param}'>{$total_pages}</a></li>";
}
if ($current_page < $total_pages) {
$pagination .= "<li><a href='{$self_address}?p={$next_page}{$get_param}'>Next <span class='fa fa-angle-double-right fa-fw'></span></a></li>";
} else {
$pagination .= "<li class='disabled'><a href='#'>Next <span class='fa fa-angle-double-right fa-fw'></span></a></li>";
}
$pagination .= "</ul>";
if ($s == '') {
$agentList_limit = $this->db->select("user_accounts", "*", "agent_id != '1000000' ORDER BY id DESC LIMIT {$from},{$max_result}");
} else {
$agentList_limit = $this->db->select("user_accounts", "*", "(agent_id LIKE '%{$s}%' OR username LIKE '%{$s}%' OR fullname LIKE '%{$s}%') ORDER BY id DESC LIMIT {$from},{$max_result}");
}
if ($total_row == 0) {
$content .= "<tr><td class ='text-center' colspan='11'>No agent record found.</td></tr>";
$pagination = NULL;
} else {
if ($total_row <= $max_result) {
$pagination = NULL;
}
$x = $from + 1;
foreach ($agentList_limit as $value) {
$agent_id = $value['agent_id'];
$fullname = ucwords(strtolower($value['fullname']));
$username = "<a target='_blank' href='" . BASE_PATH . "mynetwork/geneology?top={$agent_id}'>" . $value['username'] . "</a>";
$sponsor_id = $value['sponsor_id'];
$sponsorData = $this->db->select("user_accounts", "username", "agent_id = {$sponsor_id}", "fetch");
$sponsor = "<a target='_blank' href='" . BASE_PATH . "mynetwork/geneology?top={$sponsor_id}'>" . $sponsorData['username'] . "</a>";
$upline_id = $value['lv1'];
$uplineData = $this->db->select("user_accounts", "username", "agent_id = {$upline_id}", "fetch");
$upline = "<a target='_blank' href='" . BASE_PATH . "mynetwork/geneology?top={$upline_id}'>" . $uplineData['username'] . "</a>";
$acc_type = $value['acc_type'];
$acc_type = user::getAccType($acc_type);
$acc_type = $acc_type['label'];
$payment = $value['payment'];
switch ($payment) {
case 0:
$payment = "<span class='label label-danger'>Not Complete</span>";
break;
case 1:
$payment = "<span class='label label-warning'>Pending</span>";
break;
case 2:
$payment = "<span class='label label-success'>Complete</span>";
break;
default:
$payment = "<span class='label label-danger'>Rejected</span>";
break;
}
$activatation = $value['activate'];
switch ($activatation) {
//.........这里部分代码省略.........
示例8: generateAPRCommission
/**
*
* @param type $data (agent_id, acc_type, date)
* @param type $upgrade (default: false)
* @return type
*/
public static function generateAPRCommission($data)
{
$agent_id = $data['agent_id'];
$db = new database(DBTYPE, DBHOST, DBNAME, DBUSER, DBPASS);
$userdata = $db->select("user_accounts", "ads_pin, acc_type, username", "agent_id = {$agent_id}", "fetch");
$commission_data = $db->select("commissions_type", "*", "code = 'apr'", "fetch");
$idata = array();
$idata['agent_id'] = $userdata['ads_pin'];
$idata['ads_pin'] = $userdata['ads_pin'];
$accDetails = user::getAccType($data['acc_type']);
$username = $userdata['username'];
$acc_typeLabel = $accDetails['label'];
$idata['subject'] = $commission_data['subject'] . " <b>{$username} - {$acc_typeLabel}</b>";
$idata['from'] = $agent_id;
$idata['type'] = $commission_data['code'];
$idata['amount'] = 1200;
$dateProcess = $data['date'];
$idata['date_release'] = date("Y-m-d H:i:s", mktime(0, 0, 0, date("m", strtotime($dateProcess)), date("t", strtotime($dateProcess)), date("Y", strtotime($dateProcess))));
$idata['date'] = $dateProcess;
$idata['remarks'] = NULL;
$idata['f'] = 0;
$r = commission::addCommission($idata);
return $r;
}
示例9: resend_details
function resend_details($email = FALSE)
{
if (!$email) {
return FALSE;
} else {
// Email temporary password
$data = user::getUserData('email', $email);
$sponsorData = user::getUserData('agent_id', $data['sponsor_id']);
$sponsor_fullname = $sponsorData['fullname'];
if ($sponsorData['wyw_email'] != NULL) {
$sponsor_email = $sponsorData['wyw_email'] . '@whatyouwant.my1';
} else {
$sponsor_email = $sponsorData['email'];
}
$sponsor_mobile = $sponsorData['mobile'];
$company_name = $this->db->select("site_settings", "*", "name = 'company_name'", "fetch");
$company_name = $company_name['param'];
$agent_id = $data['agent_id'];
$acc_type_code = $data['acc_type'];
$acc_type_detail = user::getAccType($acc_type_code);
$acc_type = $acc_type_detail['label'];
$acc_price = number_format($acc_type_detail['price']);
$agent_fullname = ucwords(strtolower($data['fullname']));
$agent_username = $data['username'];
$agent_tmp_password = $data['tmp_password'];
$support_email = SUPPORT_EMAIL;
// Generate email body
$html = file_get_contents(BASE_PATH . 'email_template/activation_success');
$html = htmlspecialchars($html);
$html = str_replace('[AGENT_ID]', $agent_id, $html);
$html = str_replace('[ACC_TYPE]', $acc_type, $html);
$html = str_replace('[ACC_PRICE]', $acc_price, $html);
$html = str_replace('[FULLNAME]', $agent_fullname, $html);
$html = str_replace('[USERNAME]', $agent_username, $html);
$html = str_replace('[TMP_PASSWORD]', $agent_tmp_password, $html);
$html = str_replace('[SPONSOR_FULLNAME]', $sponsor_fullname, $html);
$html = str_replace('[SPONSOR_EMAIL]', $sponsor_email, $html);
$html = str_replace('[SPONSOR_MOBILE]', $sponsor_mobile, $html);
$html = str_replace('[SUPPORT_EMAIL]', $support_email, $html);
$html = str_replace('[COMPANY_NAME]', $company_name, $html);
$html = html_entity_decode($html);
$body = $html;
// Send Email
$mailer = new mailer();
$mailer->IsSMTP();
// set mailer to use SMTP
$mailer->Port = EMAIL_PORT;
$mailer->Host = EMAIL_HOST;
// specify main and backup server
$mailer->SMTPAuth = true;
// turn on SMTP authentication
$mailer->Username = NOREPLY_EMAIL;
// SMTP username
$mailer->Password = NOREPLY_PASS;
// SMTP password
$mailer->From = NOREPLY_EMAIL;
$mailer->FromName = SUPPORT_NAME;
$mailer->AddAddress($data['email']);
$mailer->IsHTML(true);
$mailer->Subject = "Welcome to 1STG Entrepreneurship Program.";
$mailer->Body = $body;
return $mailer->Send();
}
}
示例10: getAccDetails
function getAccDetails()
{
$code = $_POST['code'];
$data = user::getAccType($code);
if ($code == "") {
$data = "";
}
echo json_encode($data);
}