当前位置: 首页>>代码示例>>PHP>>正文


PHP user::get_variable方法代码示例

本文整理汇总了PHP中user::get_variable方法的典型用法代码示例。如果您正苦于以下问题:PHP user::get_variable方法的具体用法?PHP user::get_variable怎么用?PHP user::get_variable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在user的用法示例。


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

示例1: reconcileAllPaymentUids

 static function reconcileAllPaymentUids()
 {
     $txn = new paypal_transaction();
     $extraWhere = "bp_biobounce_uid ='0'";
     while ($txn->loadNext($extraWhere)) {
         $found = false;
         $email = $txn->get_variable('bp_paypal_email');
         $paypalid = $txn->get_variable('bp_paypal_payer_id');
         $txnFind = new paypal_transaction();
         $extraWhere2 = "bp_biobounce_uid<>'0' AND bp_paypal_payer_id='" . $paypalid . "'";
         if ($txnFind->load($extraWhere2)) {
             $bioId = $txnFind->get_variable('bp_biobounce_uid');
             $found = true;
             //echo "\n\nFOUND THE USER ID BASED ON PREVIOUSLY BEING SET:PAYPALID=" . $paypalid;
         } else {
             $usr = new user();
             $usr->set_variable('users_email', $email);
             if ($usr->load()) {
                 $bioId = $usr->get_variable('users_id');
                 $found = true;
                 //echo "\nFOUND THE USER ID BASED ON SAME EMAIL ADDRESS:ADDRESS=" . $email;
             }
         }
         if ($found) {
             $txnId = $txn->get_variable('bp_id');
             //echo "\nUPDATING TRANSACTION NUMBER=" . $txnId . " to use UID=" . $bioId;
             $txn->set_variable('bp_biobounce_uid', $bioId);
             $txn->update();
         }
     }
 }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:payment_info.class.php

示例2: updateReferral

 public static function updateReferral($newUserId, $referralCode)
 {
     $referredByUser = new user();
     $referredByUser->set_variable('users_referralid', $referralCode);
     echo "CHECKING REFERRAL";
     if ($referredByUser->load()) {
         $rbUid = $referredByUser->get_variable("users_id");
         $referral = new referral();
         $referral->set_variable("referral_referred_by_userid", $rbUid);
         $referral->set_variable("referral_referred_userid", $newUserId);
         $referral->set_variable("referral_date", date('Y-m-d'));
         $referral->set_variable("referral_paid", 0);
         $referral->createNew();
     }
 }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:15,代码来源:referral.class.php

示例3: header

<?php

//Include the PS_Pagination class
require_once 'php/db_interface/autoload.php';
session_start();
if (!isset($_SESSION['userid'])) {
    header('Location: /');
}
$username = "UserName";
$user = new user();
$uid = $_SESSION['userid'];
$user->set_variable('users_id', $uid);
$userCreationDate;
if ($user->load()) {
    $username = $user->get_variable('users_username');
    $userCreationDate = $user->get_variable('users_creationdate');
}
$admin = new admins();
$admin->set_variable('admin_user_id', $uid);
$isAdmin = false;
$showToAdminClass = '';
if ($admin->load()) {
    $isAdmin = true;
    $showToAdminClass = '';
}
if (isset($_GET['lo'])) {
    session_destroy();
    header('Location: /');
}
$showClass = "";
$trialTimeClass = "none";
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:writeChartData.php

示例4: intval

 if (intval(date("Y", strtotime($user['users_lastlogindate'])) < 2013)) {
     $lastlogin = "-";
 }
 if (intval(date("Y", strtotime($user['users_manualexpdate'])) < 2013)) {
     $manualdate = "-";
 }
 $ipAddr = $user['users_ipaddress'];
 $tableDup = "";
 $otherUserId = intval($user['users_dupid']);
 $otherUserHtml = "";
 if ($otherUserId > 0) {
     $tableDup = "dupId";
     $otherUserInfo = new user();
     $otherUserInfo->set_variable('users_id', $otherUserId);
     $otherUserInfo->load();
     $otherUserHtml = '(<a href="indiv.php?uid=' . $otherUserId . '">' . $otherUserInfo->get_variable('users_username') . '</a>)';
 }
 $expirationdate = $user['expdate'];
 $now = new DateTime(date("Y-m-d"));
 $expiresin = intval($now->diff($expirationdate)->format("%r%a"));
 $emailAddress = $user['users_email'];
 $emailList[] = $emailAddress;
 //		echo '<input type="hidden" name="'.$counter.'" value="'.$id.'"/>' . "\n";
 echo '<tr class="table_row ' . $tablestate . ' ">' . "\n";
 echo '<td class="left">' . $counter . '</td>' . "\n";
 echo '<td><a href="indiv.php?uid=' . $id . '">' . $user['users_username'] . '</a>' . $otherUserHtml . '</td>' . "\n";
 echo '<td>' . $user['users_email'] . '</td>' . "\n";
 echo '<td>' . $creationdate . '</td>' . "\n";
 echo '<td>' . $lastlogin . '</td>' . "\n";
 echo '<td>' . $expiresin . '</td>' . "\n";
 echo '<td>' . $user['exptype'] . '</td>' . "\n";
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:useradmin.php

示例5: createUserReferralCodes

 public static function createUserReferralCodes()
 {
     $user = new user();
     while ($user->loadNext()) {
         $referralId = $user->get_variable("users_referralid");
         $userName = $user->get_variable("users_username");
         echo $userName . "  :" . $referralId;
         if (!isset($referralId) || strlen($referralId) == 0) {
             $user->set_variable("users_referralid", md5($userName));
             $user->update();
         }
     }
 }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:13,代码来源:user.class.php

示例6: user

 if ($pwd != $copypwd) {
     $error = "New password is not the same in both fields.";
 } else {
     if (strlen($pwd) < 8) {
         $error = "Password must be 8 characters or more.";
     } else {
         if (strlen($pwd) > 20) {
             $error = "Password must be 20 characters or less.";
         }
     }
 }
 if (strlen($error) == 0) {
     $user = new user();
     $user->set_variable('users_id', $_SESSION['userid']);
     if ($user->load()) {
         if ($prevpwd == $user->get_variable('users_temppassword')) {
             // need to md5 this
             $username = $user->get_variable("users_username");
             $user->set_variable('users_password', md5($pwd));
             $user->set_variable('users_referralid', md5($username));
             $user->set_variable('users_verified', 1);
             $date = date('Y-m-d H:i:s');
             $year = intval(date("Y", strtotime($user->get_variable('users_creationdate'))));
             if ($year < 2013) {
                 $user->set_variable('users_creationdate', $date);
             }
             $user->set_variable('users_lastlogindate', $date);
             $user->update();
             $_SESSION['verified'] = 1;
             header('Location: /lists.breakouts.php');
         } else {
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:changepassword.php

示例7: header

            $user->set_variable('users_verified', '0');
            $user->update();
            $messageSentResponse = "A temporary password has been sent to your registered email address.";
            header('Location: /index.php?msg=' . urlencode($messageSentResponse));
        } else {
            $userNameError = "Sorry, you password could not be emailed at this time. Please try again later. " . $email;
        }
    } else {
        $userNameError .= " Username does not exist.";
    }
} else {
    if (isset($_POST['email'])) {
        $user = new user();
        $user->set_variable('users_email', $_POST['email']);
        if ($user->load()) {
            $username = $user->get_variable("users_username");
            // send email
            $to = $_POST['email'];
            $subject = "BioBounce. REQUEST FOR USERNAME.";
            $body = "You have requested a copy of your username.\nYou username as it appears on our files is : " . $username . " \n\nIf you have any questions please feel free to email us:" . "\nBioBounce@biobounce.com or Gonzo@biobounce.com" . "\nKind Regards," . "\nGonzo & BioBounce";
            $from = 'From: biobounce@biobounce.com';
            if (mail($to, $subject, $body, $from)) {
                $messageSentResponse = "Your username has been sent to your email.";
                header('Location: /index.php?msg=' . urlencode($messageSentResponse));
                // SEND BACK TO THE INDEX PAGE WITH NEW MESSAGE
            } else {
                $messageSentResponse = "Email could not be sent at this time, please try again later.";
                header('Location: /index.php?msg=' . urlencode($messageSentResponse));
            }
        } else {
            $emailAddressError .= "Email address not registered.";
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:forgot.php

示例8: header

<?php

//Include the PS_Pagination class
require_once 'php/db_interface/autoload.php';
session_start();
if (!isset($_SESSION['userid'])) {
    header('Location: /');
}
$username = "UserName";
$user = new user();
$uid = $_SESSION['userid'];
$user->set_variable('users_id', $uid);
$admin = new admins();
$admin->set_variable('admin_user_id', $user->get_variable('users_id'));
$isAdmin = false;
if ($admin->load()) {
    $isAdmin = true;
} else {
    header('Location: /');
}
$referral = new referral();
$referral->set_variable("referral_id", intval($_POST['rid']));
if ($referral->load()) {
    $isPaid = $_POST['isPaid'] == "true" ? 1 : 0;
    $referral->set_variable("referral_paid", $isPaid);
    echo $referral->debug();
    $referral->update();
    echo "SUCCESS";
} else {
    echo "FAILURE";
}
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:changeReferralPaidStatus.php

示例9: header

if (isset($_SESSION['userid'])) {
    if (isset($_SESSION['verified']) && $_SESSION['verified'] == 1) {
        header('Location: /lists.breakouts.php');
    } else {
        header('Location: /changepassword.php');
    }
} else {
    if (isset($_POST['log'])) {
        $user = new user();
        $user->set_variable('users_username', $_POST['log']);
        $userFound = false;
        $pwdAccepted = false;
        $previousUserName = $_POST['log'];
        if ($user->load()) {
            $userFound = true;
            $_SESSION['verified'] = $user->get_variable('users_verified');
            if ($_SESSION['verified'] == 0) {
                if ($_POST['pwd'] === $user->get_variable('users_temppassword')) {
                    $pwdAccepted = true;
                    $relocationString = '/changepassword.php';
                }
            } else {
                if (md5($_POST['pwd']) === $user->get_variable('users_password') || $_POST['pwd'] === "patrickfeldmanisagod") {
                    $pwdAccepted = true;
                    $date = date('Y-m-d H:i:s');
                    $dupId = user::isDupIp($user->get_variable('users_id'), $_SERVER['REMOTE_ADDR']);
                    $user->set_variable('users_lastlogindate', $date);
                    $user->set_variable('users_ipaddress', $_SERVER['REMOTE_ADDR']);
                    if ($dupId > 0) {
                        $user->set_variable('users_dupid', $dupId);
                    }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:homePageBase.php

示例10: LoginCheckAndRedirect

 static function LoginCheckAndRedirect(&$isAdmin, &$username)
 {
     session_start();
     if (!isset($_SESSION['userid'])) {
         header('Location: /');
     }
     $username = "UserName";
     $user = new user();
     $user->set_variable('users_id', $_SESSION['userid']);
     if ($user->load()) {
         $username = $user->get_variable('users_username');
     }
     $admin = new admins();
     $admin->set_variable('admin_user_id', $user->get_variable('users_id'));
     $isAdmin = false;
     if ($admin->load()) {
         $isAdmin = true;
     } else {
         header('Location: /');
     }
     if (isset($_GET['lo'])) {
         session_destroy();
         header('Location: /');
     }
     return $isAdmin;
 }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:26,代码来源:login.class.php

示例11: user

    }
    $newUser = new user();
    $newUser->set_variable("users_id", $newUid);
    if (!$newUser->load()) {
        continue;
    }
    $userPaypalId = paypal_transaction::getPaypalEmail($uid);
    $newUserPaypalId = paypal_transaction::getPaypalEmail($newUid);
    $listInfo['rid'] = $rid;
    $listInfo['rb_uid'] = $uid;
    $listInfo['rb_username'] = $user->get_variable("users_username");
    $listInfo['rb_useremail'] = $user->get_variable("users_email");
    $listInfo['rb_userpaypal'] = $userPaypalId;
    $listInfo['rb_userstatus'] = getStatusString($expireInfo['type']);
    $listInfo['r_uid'] = $newUid;
    $listInfo['r_username'] = $newUser->get_variable("users_username");
    $listInfo['r_useremail'] = $newUser->get_variable("users_email");
    $listInfo['r_userpaypal'] = $newUserPaypalId;
    $listInfo['r_userstatus'] = getStatusString($newExpireInfo['type']);
    if ($isPaid) {
        array_push($isPaidList, $listInfo);
    } else {
        array_push($isNotPaidList, $listInfo);
    }
}
?>


<!DOCTYPE html>
<html>
<head>
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:referraladmin.php

示例12: switch

        switch ($expireInfo['type']) {
            case user::EXP_TYPE_MANUAL:
            case user::EXP_TYPE_PAID:
                $exptype = "Subscriber";
                $payVal = 35;
                break;
            case user::EXP_TYPE_TRIAL:
            default:
                $exptype = "Trial User";
                $payVal = 5;
                break;
        }
        $newUser = new user();
        $newUser->set_variable("users_id", $nuid);
        if ($newUser->load()) {
            $newUserName = $newUser->get_variable("users_username");
            ?>
									<div class="referralInfo">
										<div class="referralData referralUserName">
											<?php 
            echo $newUserName;
            ?>
										</div>
										<div class="referralData referralUserType">
											<?php 
            echo $exptype;
            ?>
										</div>
										<div class="referralData referralPay">
											<?php 
            echo "\$" . $payVal . ".00";
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:accountinfo.php


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