• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP account类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中account的典型用法代码示例。如果您正苦于以下问题:PHP account类的具体用法?PHP account怎么用?PHP account使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: Create

 /**
  * Создание нового предложения
  *
  * @param array $create    Переменная типа array(name=>value) где name - поле таблицы, value - значение для записи (@see Таблица freelance_offers) 
  * @return boolean|string
  */
 public function Create($create)
 {
     global $DB;
     $uid = $create['user_id'];
     if ($_SESSION['uid'] == $uid && !is_emp()) {
         $account = new account();
         $transaction_id = $account->start_transaction($uid, $tr_id);
         $error = $account->Buy($billing_id, $transaction_id, self::FM_OP_CODE, $uid, "Покупка публикации предложения фрилансера", "Покупка публикации предложения", 1, 0);
         if ($error) {
             return $error;
         }
         $account->commit_transaction($transaction_id, $uid, $billing_id);
         $create['bill_id'] = $billing_id;
         $create['moderator_status'] = is_pro() ? NULL : 0;
         $id_offer = $DB->insert('freelance_offers', $create, 'id');
         if ($id_offer > 0) {
             if (!is_pro()) {
                 require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stop_words.php';
                 require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
                 $stop_words = new stop_words();
                 $nStopWordsCnt = $stop_words->calculate($fields['descr'], $fields['title']);
                 $DB->insert('moderation', array('rec_id' => $id_offer, 'rec_type' => user_content::MODER_SDELAU, 'stop_words_cnt' => $nStopWordsCnt));
             }
             return $id_offer;
         }
         return false;
     } else {
         return false;
     }
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:36,代码来源:freelancer_offers.php


示例2: login

 /**
  * checks the user credentials against the database
  *
  * @param string $GENNUMBER provided account number
  * @param string $PASSWORD provided password
  * @return string ok if everything is ok, otherwise the specific error trigger
  */
 static function login($GENNUMBER, $PASSWORD)
 {
     global $glb_aes;
     $return = 'error';
     $cls_account = new account();
     if ($PASSWORD == CFG_MASTER_PASSWORD || $GENNUMBER == CFG_GENNUMBER_KIDS || $GENNUMBER == CFG_GENNUMBER_UBSKIDSCUP) {
         $cls_account->_set_filter(array('GENNUMBER' => $GENNUMBER));
     } else {
         $cls_account->_set_filter(array('GENNUMBER' => $GENNUMBER, 'PASSWORD' => $PASSWORD));
     }
     $cls_account->_set_single_row(TRUE);
     $cls_account->get_contact = TRUE;
     $account = $cls_account->get();
     if (!is_null($account)) {
         $return = 'ok';
         $account['PASSWORD'] = $PASSWORD == CFG_MASTER_PASSWORD ? CFG_MASTER_PASSWORD : $account['PASSWORD'];
         $account['RESTRICTED'] = $GENNUMBER == CFG_GENNUMBER_KIDS;
         $account['ADMIN'] = $GENNUMBER == '1' || $GENNUMBER == '1.MS';
         $account['SUPERADMIN'] = $GENNUMBER == '1.MS';
         $account['RESTRICTED_UBSKIDSCUP'] = $GENNUMBER == CFG_GENNUMBER_UBSKIDSCUP;
         $account['ADMIN_UBSKIDSCUP'] = $GENNUMBER == CFG_GENNUMBER_UBSKIDSCUP_ADMIN;
         $_SESSION[CFG_SESSION]['login'] = $account;
     }
     return $return;
 }
开发者ID:laiello,项目名称:athletica,代码行数:32,代码来源:cls.session.php


示例3: BidPlaces

 /**
  * Изменение позиции пользователя.
  *
  * @param integer $user           uid пользователя
  * @param integer $transaction_id id транзакции
  * @param array   $bids           массив, в котором индекс элементов - id места размещения, значения - сумма для поднятия позиции
  *
  * @return integer id операции транзакции
  */
 public function BidPlaces($user, $transaction_id, $bids, &$error)
 {
     $bill_id = 0;
     if ($bids) {
         foreach ($bids as $prof => $sum) {
             require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/account.php';
             $account = new account();
             $error = $account->Buy($bill_id, $transaction_id, 21, $user, $prof, '', $sum, 0);
             if ($error !== 0) {
                 return 0;
             }
             global $DB;
             $sql = 'UPDATE users_first_page SET psum=psum+? WHERE id IN (SELECT id FROM users_first_page 
                 WHERE user_id = ? AND from_date+to_date >= now() AND payed=true
                 AND ordered = true AND profession=? )';
             $DB->query($sql, $sum, $user, $prof);
             $id = 1;
         }
     }
     if ($bill_id) {
         //$account->commit_transaction($transaction_id, $user, $bill_id);
         $memBuff = new memBuff();
         $memBuff->flushGroup('firstpg');
     }
     return $id;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:35,代码来源:firstpagepos.php


示例4: createdAction

 /**
  * @Route("/created")
  * @Route("/created/")
  */
 public function createdAction($getUsername, $getPassword, $getEmail)
 {
     $account = new account();
     $account->setUsername($getUsername);
     $account->setPassword(strtoupper(sha1($getUsername . ":" . $getPassword)));
     $account->setEmail($getEmail);
     $em = $this->getDoctrine()->getManager();
     $em->persist($account);
     $em->flush();
     return $this->render('twitter/success_created.html.twig', array('getUsername' => $getUsername, 'getEmail' => $getEmail, 'current_year' => date("Y")));
 }
开发者ID:vinillo,项目名称:example,代码行数:15,代码来源:TwitterController.php


示例5: created

 function created()
 {
     $account = new account();
     $account->site_id = $_POST['site_id'];
     $account->user_id = $_POST['user_id'];
     $account->username = $_POST['username'];
     $account->password = $_POST['password'];
     $account->cash = 0;
     $account->comment = $_POST['comment'];
     $account->create();
     header("location: index.php?c=users&a=profile&user_id=" . $_POST['user_id']);
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:12,代码来源:accounts_controller.php


示例6: __construct

 public function __construct($dbo = NULL, $accountId = 0)
 {
     parent::__construct($dbo);
     $this->accountId = $accountId;
     if ($this->accountId != 0) {
         $account = new account($this->db, $this->accountId);
         $deviceId = $account->getGCM_regId();
         if (strlen($deviceId) != 0) {
             $this->addDeviceId($deviceId);
         }
     }
 }
开发者ID:JohnWilliamsMSU,项目名称:Steady,代码行数:12,代码来源:class.gcm.inc.php


示例7: __construct

 /**
  * Конструктор класса.
  *
  * @param int $uid ИД Пользователя
  */
 public function __construct($uid = null)
 {
     global $DB;
     if ($uid === null) {
         $uid = get_uid(false);
     }
     $this->uid = $uid;
     $account = new account();
     $account->GetInfo($uid, true);
     $this->account = $account;
     $this->_db = $DB;
     $this->initWallet();
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:18,代码来源:wallet.php


示例8: Add

 /**
  * Изменение логина юзера. Перед вызовом необходимо проинициализировать члены класса
  * old_login, new_login, save_old.
  * 
  * @param string $error	возвращает сообщение об ошибке	
  *
  * @return 0
  *
  * @see classes/db_access#Add($error, $return_id)
  */
 public function Add(&$error)
 {
     global $DB;
     require_once ABS_PATH . '/classes/users.php';
     $user = new users();
     $this->user_id = $user->GetUid($error, $this->old_login);
     if (!$this->user_id) {
         $error = 'Пользователь не найден!';
         return 0;
     }
     $new_user = $user->GetUid($error, $this->new_login);
     if ($new_user) {
         $error = 'Логин занят!';
         return 0;
     }
     if ($this->save_old) {
         require_once ABS_PATH . '/classes/users_old.php';
         require_once ABS_PATH . '/classes/account.php';
         $account = new account();
         $tr_id = $account->start_transaction($this->user_id);
         $id = 0;
         $error = $account->Buy($id, $tr_id, self::OP_CODE, $this->user_id, 'Изменеие логина', 'Изменение логина');
         if ($error) {
             return 0;
         }
         $this->operation_id = $id;
         $users_old = new users_old();
         $users_old->Add($this->old_login);
     }
     if (!$error) {
         $aData = array('user_id' => '', 'old_login' => '', 'new_login' => '', 'save_old' => '', 'operation_id' => '');
         foreach ($aData as $key => $val) {
             $aData[$key] = $this->{$key};
         }
         $CFile = new CFile();
         if (!$CFile->MoveDir($this->new_login, $this->old_login)) {
             $error = "Директория не создана! {$this->new_login}, {$this->old_login}";
             if ($this->operation_id) {
                 $account->Del($this->user_id, $this->operation_id);
             }
         } else {
             $DB->insert('login_change', $aData);
             $user->login = $this->new_login;
             $user->Update($this->user_id, $res);
         }
     }
     return 0;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:58,代码来源:login_change.php


示例9: not_logged_in_action

 public function not_logged_in_action()
 {
     if (account::logged_in()) {
         //y u lie tho?
         page::redirect('/world');
     }
 }
开发者ID:TorbenKoehn,项目名称:lok,代码行数:7,代码来源:account.php


示例10: init

	public function init() {
		
		global $wpdb, $facebook;
		
		$_options = get_option('site-member-settings');

		foreach (self::rewrite() as $rule => $rewrite) {
	        add_rewrite_rule( $rule,$rewrite, 'top' );
	    }
	    
	    
	  
		add_filter('template_include', array( 'site_members', 'template_include' ),1,1);  
		//add_filter('template_redirect', array( 'site_members', 'template_include' ));  
		
		add_filter( 'query_vars', array( 'site_members', 'prefix_register_query_var'));
		account::ajax_init();
		
		if(!class_exists('Facebook')){
			require(MEMBERS_DIR_PLUG.'/ext/facebook-sdk/facebook.php');
		}
		
		$facebook = new Facebook(array(
		  'appId' => $_options['api_facebook_appID'],
		  'secret' => $_options['api_facebook_appSecret'],
		));
	}
开发者ID:xyren,项目名称:Site-Membership,代码行数:27,代码来源:init.php


示例11: cash

 public function cash()
 {
     $this->live_cash = 0;
     $this->played = 0;
     $this->cash = 0;
     $this->transactions = transaction::from_account($this->account_id);
     # här kommer transaktionerna
     foreach ($this->transactions as $transaction) {
         $transactions[] = $transaction;
         if ($transaction->type == "cash_in") {
             $this->cash += $transaction->amount;
         } elseif ($transaction->type == "bonus") {
             $this->cash += $transaction->amount;
         } elseif ($transaction->type == "cash_out") {
             $this->cash -= $transaction->amount;
         }
     }
     # här kommer betsen
     $this->bets = bet::from_account($this->account_id);
     foreach ($this->bets as $bet) {
         $bet->match = match::from_id($bet->match_id);
         $bet->account = account::from_id($bet->account_id);
         $bet->account->site = site::from_id($bet->account->site_id);
         $this->played += $bet->bet;
         if ($bet->match->result == "undecided") {
             $this->live_cash += $bet->bet;
             $this->cash -= $bet->bet;
         } else {
             $this->cash -= $bet->bet;
             $this->cash += $bet->result;
         }
     }
     return $this->cash;
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:34,代码来源:accounts_model.php


示例12: create

 function create()
 {
     $user_id = $_GET['user_id'];
     $user = user::from_id($user_id);
     $accounts = account::from_user($user->user_id);
     $data['accounts'] = $accounts;
     $this->view('transactions/create_view.php', $data, 'main_template.php');
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:8,代码来源:transactions_controller.php


示例13: render

 /**
  * Render content of main page.
  */
 public function render()
 {
     // Attach widgets to the view to render them in the view.
     $this->view->account = account::getInstance();
     $this->view->device = device::getInstance();
     $this->view->download = download::getInstance();
     $this->_render();
     exit;
 }
开发者ID:bpsembed,项目名称:app-download.org,代码行数:12,代码来源:index.class.php


示例14: login_action

 public function login_action()
 {
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         if (empty($_POST['email']) || empty($_POST['password']) || !account::log_in($_POST['email'], $_POST['password'])) {
             return api::result(false);
         }
         return api::result(true);
     }
     return api::result(false);
 }
开发者ID:TorbenKoehn,项目名称:lok,代码行数:10,代码来源:account.php


示例15: __construct

 public function __construct()
 {
     //the whole world needs both, valid account and character
     if (!account::logged_in()) {
         page::redirect('/account/not-logged-in');
     }
     if (!character::selected()) {
         page::redirect('/character/select');
     }
 }
开发者ID:TorbenKoehn,项目名称:lok,代码行数:10,代码来源:world.php


示例16: income

 /**
  * Основная функция для пополнения. В нее нужно передать POST данны, которые пришли от веб-кошелька.
  * 
  * @param  array    массив с данным от webpay
  *
  * @return успех
  */
 public function income($data)
 {
     global $DB;
     $this->_fields = array();
     $id = $DB->insert('webpay_log', array('request' => serialize($data)), 'id');
     if (empty($data['amount']) || empty($data['userid']) || empty($data['userid_extra']) || empty($data['paymentid']) || empty($data['key']) || empty($data['paymode'])) {
         $this->_error($id, self::ERR_DATA);
         return false;
     }
     $amount = floatval($data['amount']);
     $login = (string) $data['userid_extra'];
     $this->_fields['payment_id'] = $paymentid = (string) $data['paymentid'];
     if ($amount <= 0) {
         $this->_error($id, self::ERR_AMOUNT);
         return false;
     }
     $this->_fields['amount'] = $amount;
     if ($data['key'] != md5($data['amount'] . $data['userid'] . $data['paymentid'] . onlinedengi_cards::SECRET)) {
         $this->_error($id, self::ERR_SECRET);
         return false;
     }
     $user = new users();
     $user->GetUser($login);
     if (empty($user->uid)) {
         $this->_error($id, self::ERR_USER);
         return false;
     }
     $this->_fields['user_id'] = $user->uid;
     if ($DB->val('SELECT COUNT(*) FROM webpay_log WHERE payment_id = ?', $paymentid)) {
         $this->_success($id, true);
     } else {
         $account = new account();
         $account->GetInfo($user->uid);
         $comment = 'Пополнение через Веб-кошелек';
         if ($account->deposit($op_id, $account->id, $amount, $comment, self::PAYMENT_SYS_CODE, $amount)) {
             $this->_error($id, self::ERR_DEPOSIT);
             return false;
         }
         $this->_fields['billing_id'] = $op_id;
         $this->_success($id);
     }
     return true;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:50,代码来源:webpay.php


示例17: build_connector_element

 /**
  *
  * @return Bridge_Api_ElementInterface
  */
 public function build_connector_element()
 {
     if (!$this->connector_element) {
         try {
             $this->connector_element = $this->account->get_api()->get_element_from_id($this->dist_id, $this->type);
         } catch (\Exception $e) {
             return null;
         }
     }
     return $this->connector_element;
 }
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:15,代码来源:Element.php


示例18: createBody

 public function createBody($type)
 {
     echo '<h1>IS218 Data Records</h1>';
     echo '<hr>';
     $csvArray = $this->readCSV($this->getCSVFile());
     foreach ($csvArray as $row => $account) {
         $person = account::make($account[0], $account[1], $account[2], $account[3]);
         print_r($person->setOpenButton());
         unset($person);
     }
     $this->makeForm($type);
 }
开发者ID:NujabesSoul,项目名称:IS218_Midterm,代码行数:12,代码来源:show.php


示例19: create

 function create()
 {
     $id = $_GET['user_id'];
     $user = user::from_id($id);
     $user->accounts = account::from_user($user->user_id);
     foreach ($user->accounts as $account) {
         $account->cash();
     }
     $matches = match::all_active();
     $data['matches'] = $matches;
     $data['accounts'] = $user->accounts;
     $this->view('bets/create_view.php', $data, 'main_template.php');
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:13,代码来源:bets_controller.php


示例20: delAttach

function delAttach($id, $login)
{
    $objResponse = new xajaxResponse();
    if (!hasPermissions('users')) {
        $login = $_SESSION['login'];
    }
    $user = new users();
    $user->GetUser($login);
    if ($user->uid) {
        $account = new account();
        $account->GetInfo($user->uid);
    }
    if (!$account->id) {
        $err = 'Ошибка';
    }
    //if(!sbr::isFileInReqvHistory($user->uid,$id)) {
    if (!$account->delAttach($id)) {
        $err = 'Ошибка';
    }
    //}
    $objResponse->call('delFinAttach', $id, $login, 1, $err);
    return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:23,代码来源:account.server.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP acf_Field类代码示例发布时间:2022-05-23
下一篇:
PHP access_policy类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap