本文整理汇总了PHP中account函数的典型用法代码示例。如果您正苦于以下问题:PHP account函数的具体用法?PHP account怎么用?PHP account使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了account函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: server
/**
* 返回服务端.
*
* @return Response
*/
public function server(Request $request)
{
$account = account()->getAccountByTag($request->t);
if (!$account) {
return;
}
return $this->server->make($account);
}
示例2: account_report_add
function account_report_add($account, $account_type)
{
$acc = account($account);
if ($acc) {
pdo_update('account', array('report_count' => $acc['report_count'] + 1), array('account' => $account, 'account_type' => $account_type));
} else {
pdo_insert('account', array('account' => $account, 'account_type' => $account_type, 'report_count' => 1));
}
}
示例3: compose
public function compose(View $view)
{
if (!Auth::check()) {
$newConversationsCount = 0;
} else {
$newConversationsCount = account()->participations()->unread()->count();
}
$view->with(compact('newConversationsCount'));
}
示例4: handle
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
if (!account()->chosedId()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect(admin_url('account'));
}
}
return $next($request);
}
示例5: verify
public function verify()
{
$uid = $this->__Return_Verify($this->config);
if ($uid == 'VERIFY_FAILED')
{
return false;
}
account('ulogin')->token($uid, get('token'));
$this->adata || $this->__cddata();
get('target_url') && account()->loginReferer(get('target_url'), false);
return $uid;
}
示例6: __construct
public function __construct(FanGroupRepository $fanGroupRepository)
{
$account = account()->getCurrent();
/*
* 1 初始化 SDK Config
* 2 构建 SDK 对象
*/
$this->group = new Group($account->app_id, $account->app_secret);
/*
* 3 构建 FanGroup Repository 对象
*/
$this->fanGroupRepository = $fanGroupRepository;
}
示例7: queryuserid
public function queryuserid()
{
$this->CheckAdminPrivs('reports','ajax');
$username = get('username', 'string');
$acc = account()->Search('name', $username, 1);
if ($acc)
{
exit($acc['uid'].'');
}
else
{
exit('0');
}
}
示例8: CreateLink
public function CreateLink($payment, $parameter)
{
$parameter['name'] = preg_replace('/\&[a-z]{2,4}\;/i', '', $parameter['name']);
$parameter['detail'] = str_replace(array('"',"'",'\\','&'), '', $parameter['detail']);
$post = array(
'service' => $payment['config']['service'],
'payment_type' => '1',
'seller_email' => $payment['config']['account'],
'partner' => $payment['config']['partner'],
'return_url' => $parameter['notify_url'],
'notify_url' => $parameter['notify_url'],
'_input_charset' => ini('settings.charset'),
'show_url' => $parameter['product_url'],
'out_trade_no' => $parameter['sign'],
'subject' => $parameter['name'],
'body' => '',
'price' => $parameter['price'],
'quantity' => 1,
'logistics_fee' => '0.00',
'logistics_type' => 'EXPRESS',
'logistics_payment' => 'SELLER_PAY',
);
if ($payment['config']['service'] == 'create_partner_trade_by_buyer')
{
$parameter['addr_name'] || $parameter['addr_name'] = 'USER';
$parameter['addr_address'] || $parameter['addr_address'] = 'ADDRESS';
$parameter['addr_zip'] || $parameter['addr_zip'] = '000000';
$parameter['addr_phone'] || $parameter['addr_phone'] = '13000000000';
$post['receive_name'] = $parameter['addr_name'];
$post['receive_address'] = $parameter['addr_address'];
$post['receive_zip'] = $parameter['addr_zip'];
$post['receive_phone'] = $parameter['addr_phone'];
}
$token = account('ulogin')->token();
if ($token)
{
$post['token'] = $token;
}
$post['extend_param'] = 'isv^tt11';
return $this->__BuildForm($payment, $post);
}
示例9: post_insertHandler
function post_insertHandler()
{
if (!isset($_POST['comment'])) {
return false;
}
if ($_POST['comment'] == 'Type your comment here') {
return false;
}
$auth = account();
$what = array();
$what['feedback_comment'] = $_POST['comment'];
$what['user_upn'] = $auth['upn'];
//print_r($what);
$dbh = db_connect();
$result = db_insertFeedback($dbh, $what);
if ($result == -1) {
return false;
}
return true;
}
示例10: get_password
public function get_password() {
if(MEMBER_ID > 0) {
$this->msg('您已经登录了');
}
$is_android = stripos($_SERVER['HTTP_USER_AGENT'], 'android');
$act = ($_GET['act'] ? $_GET['act'] : $_POST['act']);
if('step2' == $act) {
$username = post('username');
if(empty($username)) {
$this->msg('用户名不能为空', -1);
}
$username = account()->username($username);
$user = dbc(DBCMax)->select("members")->where(array('username' => $username))->limit(1)->done();
if(false == $user) {
$this->msg('用户已经不存在了', -1);
}
$uid = $user['uid'];
if(empty($user['phone']) || false == $user['phone_validate']) {
$this->msg('该用户没有设置手机或该号码还没有通过验证,不能通过手机方式找回密码');
}
$phone = substr($user['phone'], 0, 3) . '****' . substr($user['phone'], -4);
$ret = logic('phone')->VfSend($user['phone'], $uid);
if($ret) {
$this->msg($ret);
}
} elseif ('step3' == $act) {
$uid = post('uid', 'int');
if($uid < 1) {
$this->msg('请指定一个用户UID');
}
$user = user($uid)->get();
if(false == $user) {
$this->msg('用户已经不存在了');
}
$vfcode = post('vfcode');
if(empty($vfcode)) {
$this->msg('手机验证码不能为空', -1);
}
if('' == $this->Post['password'])
{
$this->msg('新密码不能为空', -1);
}
if($this->Post['password']!=$this->Post['confirm'])
{
$this->msg('两次输入的密码不一致', -1);
}
$ret = logic('phone')->Vfcode($user['phone'], $vfcode, $uid);
if($ret) {
$this->msg($ret, -1);
}
if($user['email2']=='zuitu'){
$password=md5($this->Post['password'].'@4!@#$%@');
}else{
$password=md5($this->Post['password']);
}
$sql="UPDATE ".TABLE_PREFIX. 'system_members'." SET `password`='{$password}' WHERE uid='$uid'";
$this->DatabaseHandler->Query($sql);
$sql="UPDATE ".TABLE_PREFIX.'system_memberfields'." SET `authstr`='',`auth_try_times`='0' WHERE uid='$uid'";
$this->DatabaseHandler->Query($sql);
if ( true === UCENTER )
{
include_once (UC_CLIENT_ROOT . './client.php');
$result = uc_user_edit($user['username'], '', $this->Post['password'], '', 1);
if($result ==0 || $result ==1)
{
;
}
elseif($result ==-8)
{
$this->msg('您的帐号在UC里是管理员,请到UC里修改密码!');
}
else
{
$this->msg('通知UC修改密码失败,请检查你的UC配置!');
}
}
$this->msg("新密码设置成功");
}
include handler('template')->file('@wap/get_password');
}
示例11: gl_link
function gl_link()
{
if ($this->input->post('cmdSave')) {
$data['accounts_payable'] = $this->acc_id($this->input->post('accounts_payable'));
$data['po_freight'] = $this->acc_id($this->input->post('po_freight'));
$data['po_other'] = $this->acc_id($this->input->post('po_other'));
$data['po_tax'] = $this->acc_id($this->input->post('po_tax'));
$data['po_discounts_taken'] = $this->acc_id($this->input->post('po_discounts_taken'));
$data['supplier_credit_account_number'] = $this->acc_id($this->input->post('supplier_credit_account_number'));
$data['inventory_sales'] = $this->acc_id($this->input->post('inventory_sales'));
$data['inventory'] = $this->acc_id($this->input->post('inventory'));
$data['inventory_cogs'] = $this->acc_id($this->input->post('inventory_cogs'));
$data['accounts_receivable'] = $this->acc_id($this->input->post('accounts_receivable'));
$data['so_freight'] = $this->acc_id($this->input->post('so_freight'));
$data['so_other'] = $this->acc_id($this->input->post('so_other'));
$data['so_tax'] = $this->acc_id($this->input->post('so_tax'));
$data['so_discounts_given'] = $this->acc_id($this->input->post('so_discounts_given'));
$data['customer_credit_account_number'] = $this->acc_id($this->input->post('customer_credit_account_number'));
$data['default_cash_payment_account'] = $this->acc_id($this->input->post('default_cash_payment_account'));
$data['earning_account'] = $this->acc_id($this->input->post('earning_account'));
$data['year_earning_account'] = $this->acc_id($this->input->post('year_earning_account'));
$data['historical_balance_account'] = $this->acc_id($this->input->post('historical_balance_account'));
$data['default_bank_account_number'] = $this->acc_id($this->input->post('default_bank_account_number'));
$data['default_credit_card_account'] = $this->acc_id($this->input->post('default_credit_card_account'));
$this->company_model->update($this->access->cid, $data);
$this->sysvar->save('COA Uang Muka Pembelian', $this->acc_id($this->input->post('txtUangMukaBeli')));
$this->sysvar->save('COA Retur Penjualan', $this->acc_id($this->input->post('txtReturJual')));
$this->sysvar->save('COA Item Out Others', $this->acc_id($this->input->post('txtCoaItemOut')));
$this->sysvar->save('COA Item In Others', $this->acc_id($this->input->post('txtCoaItemIn')));
$this->sysvar->save('COA Item Adjustment', $this->acc_id($this->input->post('txtCoaItemAdj')));
$this->sysvar->save('COA Uang Muka Penjualan', $this->acc_id($this->input->post('txtUangMukaJual')));
$this->sysvar->save('CoaChargeCreditCard', $this->acc_id($this->input->post('txtChargeCC')));
$this->sysvar->save('CoaPromo', $this->acc_id($this->input->post('txtPromo')));
$this->sysvar->save('CoaGift', $this->acc_id($this->input->post('txtGift')));
}
$set = $this->company_model->get_by_id($this->access->cid)->row();
$data['accounts_payable'] = account($set->accounts_payable);
$data['po_freight'] = account($set->po_freight);
$data['po_other'] = account($set->po_other);
$data['po_tax'] = account($set->po_tax);
$data['po_discounts_taken'] = account($set->po_discounts_taken);
$data['supplier_credit_account_number'] = account($set->supplier_credit_account_number);
$data['inventory_sales'] = account($set->inventory_sales);
$data['inventory'] = account($set->inventory);
$data['inventory_cogs'] = account($set->inventory_cogs);
$data['accounts_receivable'] = account($set->accounts_receivable);
$data['so_freight'] = account($set->so_freight);
$data['so_other'] = account($set->so_other);
$data['so_tax'] = account($set->so_tax);
$data['so_discounts_given'] = account($set->so_discounts_given);
$data['customer_credit_account_number'] = account($set->customer_credit_account_number);
$data['default_cash_payment_account'] = account($set->default_cash_payment_account);
$data['earning_account'] = account($set->earning_account);
$data['year_earning_account'] = account($set->year_earning_account);
$data['historical_balance_account'] = account($set->historical_balance_account);
$data['default_bank_account_number'] = account($set->default_bank_account_number);
$data['default_credit_card_account'] = account($set->default_credit_card_account);
$data['txtUangMukaBeli'] = account($this->sysvar->getvar('COA Uang Muka Pembelian'));
$data['txtReturJual'] = account($this->sysvar->getvar('COA Retur Penjualan'));
$data['txtCoaItemOut'] = account($this->sysvar->getvar('COA Item Out Others'));
$data['txtCoaItemIn'] = account($this->sysvar->getvar('COA Item In Others'));
$data['txtCoaItemAdj'] = account($this->sysvar->getvar('COA Item Adjustment'));
$data['txtUangMukaJual'] = account($this->sysvar->getvar('COA Uang Muka Penjualan'));
$data['txtChargeCC'] = account($this->sysvar->getvar('CoaChargeCreditCard'));
$data['txtPromo'] = account($this->sysvar->getvar('CoaPromo'));
$data['txtGift'] = account($this->sysvar->getvar('CoaGift'));
$this->template->display_form_input('admin/gl_link', $data);
}
示例12: writebody
function writebody()
{
global $db, $domain, $suserid, $sitename, $cachelife, $template, $gamesfolder, $thumbsfolder, $limitboxgames, $seo_on, $blogentriesshown, $enabledcode_on, $comments_on, $directorypath, $autoapprovecomments, $gamesonpage, $abovegames, $belowgames, $showwebsitelimit, $supportemail, $showblog, $blogentriesshown, $blogcharactersshown, $blogcommentpermissions, $blogcommentsshown, $blogfollowtags, $blogcharactersrss, $usrdata, $userid, $avatar_on, $gender_on, $aimg, $fimg, $mimg;
if (!isset($suserid)) {
echo '<div class=\'error\'>Please login first.</div>';
return;
}
function changeavatar()
{
global $domain, $db, $usrdata, $seo_on, $template, $directorypath;
$userid = $usrdata['userid'];
if (isset($_POST['avatar'])) {
$avatar = clean($_POST['avatar']);
if ($avatar == 0) {
mysql_query("UPDATE fas_users SET avatar='{$avatar}', avatarfile='' WHERE userid='{$userid}'");
echo '<div class=\'msg\'>Profile updated</div>';
} else {
function findexts($filename)
{
$filename = strtolower($filename);
$exts = explode(".", $filename);
$n = count($exts) - 1;
$exts = $exts[$n];
return $exts;
}
if ($_FILES['uploaded']['size'] > 40000) {
echo '<div class=\'error\'>File size too big.</div>';
return;
}
$ext = findexts($_FILES['uploaded']['name']);
$os = array("gif", "jpg", "jpeg", "png");
if (!in_array($ext, $os)) {
echo '<div class=\'error\'>File type not allowed or no file selected!</div>';
return;
} else {
}
$ran = "avatar";
$ran3 = $usrdata['userid'];
$ran4 = $ran . $userid . '.';
$avatarfile = $ran4 . $ext;
//This assigns the subdirectory you want to save into... make sure it exists!
$target = $directorypath . "avatars/";
//This combines the directory, the userid, and the extension
$target = $target . $ran4 . $ext;
if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {
echo '<div class=\'msg\'>The file has been uploaded.</div>';
mysql_query("UPDATE fas_users SET avatar='{$avatar}', avatarfile='{$avatarfile}' WHERE userid='{$userid}'");
} else {
echo '<div class=\'error\'>Sorry, there was a problem uploading your file.</div>';
}
}
} else {
if ($seo_on == 1) {
$curl1 = '' . $domain . '/myaccount/changeavatar/';
} else {
$curl1 = '' . $domain . '/index.php?action=myaccount&cmd=changeavatar';
}
echo '<table align=\'center\' width="100%">
<tr>
<td colspan=\'4\' class=\'header\'>Edit Avatar</td>
</tr>
<tr>
<td class=\'content\'>
<form enctype=\'multipart/form-data\' action=\'' . $curl1 . '\' method=\'POST\'>
Use Avatar?:
<select type=\'dropdown\' name=\'avatar\'>
<option value=\'0\'>No</option>
<option value=\'1\' >Yes</option>
</select>
<p>
Please choose a file: <input name=\'uploaded\' type=\'file\' /><br />
<input type=\'submit\' value=\'Upload\' />
</form>
</td>
</tr>
</table>';
}
}
function account()
{
global $domain, $db, $seo_on, $usrdata, $utemplate, $template, $avatar_on, $gender_on, $aimg, $fimg, $mimg;
if ($seo_on == 1) {
$url1 = '' . $domain . '/myaccount/favorites/';
$url2 = '' . $domain . '/myaccount/changepassword/';
$url3 = '' . $domain . '/myaccount/';
$url4 = '' . $domain . '/messages/';
$url5 = '' . $domain . '/myaccount/changeavatar/';
$url6 = '' . $domain . '/myaccount/changequestion/';
$url7 = '' . $domain . '/myaccount/changeemail/';
} else {
$url1 = '' . $domain . '/index.php?action=myaccount&cmd=favorites';
$url2 = '' . $domain . '/index.php?action=myaccount&cmd=changepassword';
$url3 = '' . $domain . '/index.php?action=myaccount';
$url4 = '' . $domain . '/index.php?action=messages';
$url5 = '' . $domain . '/index.php?action=myaccount&cmd=changeavatar';
$url6 = '' . $domain . '/index.php?action=myaccount&cmd=changequestion';
$url7 = '' . $domain . '/index.php?action=myaccount&cmd=changeemail';
//.........这里部分代码省略.........
示例13: view
function view($id, $message = null)
{
$id = urldecode($id);
$model = $this->customer_model->get_by_id($id)->row();
$data = $this->set_defaults($model);
$data['id'] = $id;
$data['mode'] = 'view';
$data['message'] = $message;
$data['finance_charge_acct'] = account($data['finance_charge_acct']);
$this->template->display_form_input('sales/customer', $data);
}
示例14: strtolower
$sqlt = "SELECT * FROM `tests` where `id`='" . $row2[it] . "'";
$queryt = @mysql_query($sqlt);
$rowt = @mysql_fetch_array($queryt);
// Lấy cate1
$sql11 = "SELECT * FROM `cate1` where `id`='" . $rowt[id1] . "'";
$query11 = @mysql_query($sql11);
$row11 = @mysql_fetch_array($query11);
// Lấy cate2
$sql22 = "SELECT * FROM `cate2` where `id`='" . $row11[id2] . "'";
$query22 = @mysql_query($sql22);
$row22 = @mysql_fetch_array($query22);
// Lấy cate3
$sql33 = "SELECT * FROM `cate3` where `id`='" . $row22[id3] . "'";
$query33 = @mysql_query($sql33);
$row33 = @mysql_fetch_array($query33);
echo "\n<table class='lololol' width='100%'>\n<tr>\n<td rowspan='3' align='center'>\n<img src='" . $rowt['thumb'] . "' width='60' height='61' class='img2'>\n</td>\n<td class='title' colspan=2 width='100%'>\n<a href='./bao-cao-lam-thu/" . strtolower(str_filter(account($row2[uid], username))) . "/" . strtolower(str_filter($rowt[title])) . "-" . $row2['id'] . "'><div class='more2'>Xem</div></a>\n<a href='./bao-cao-lam-thu/" . strtolower(str_filter(account($row2[uid], username))) . "/" . strtolower(str_filter($rowt[title])) . "-" . $row2['id'] . "' style='font-size: 1.2em;' alt='" . $rowt['title'] . "' title='" . $rowt['title'] . "'><b>" . cu_t($rowt[title], 50) . "</a></b>\n</td>\n</tr>\n<tr>\n<td width='*'>\nNgày làm: <i id='yeah'>" . ti_me($row2[time]) . "</i>\n</td>\n<td width='100px'>\nĐiểm: <i id='yeah'>" . $row2[score] . "</i>\n</td>\n</tr>\n<tr>\n<td width='*'>\nDanh mục: <i id='yeah'><a href='./" . strtolower(str_filter($row33[title])) . "." . $row33[id] . "'>" . $row33[title] . "</a> > <a href='./" . strtolower(str_filter($row33[title])) . "/" . strtolower(str_filter($row22[title])) . "." . $row22[id] . "'>" . $row22[title] . "</a> > <a href='./" . strtolower(str_filter($row33[title])) . "/" . strtolower(str_filter($row22[title])) . "/" . strtolower(str_filter($row11[title])) . "." . $row11[id] . "'>" . $row11[title] . "</a></i></td>\n<td>\nThời gian hoàn thành: " . $row2[comp] . " phút\n</td>\n</tr>\n</table>\n";
}
echo "</fieldset>";
if ($page > 1) {
echo "<ul class='pagination' align='center'>";
$prev = $p - 1;
$next = $p + 1;
if ($p - 1 > 1) {
echo "<li><b><a href='./danh-sach-bao-cao-lam-thu-moi-nhat' title='Trang đầu tiên - 1'>«</a></b></li> ";
}
if ($p > 1) {
echo "<li><b><a href='./danh-sach-bao-cao-lam-thu-moi-nhat_" . $prev . "' title='Trang trước - " . $prev . "' alt='Trang trước - " . $prev . "'><font face='arial'>◄</font></a></b></li> ";
echo "<li><b><a href='./danh-sach-bao-cao-lam-thu-moi-nhat_" . $prev . "' title='Trang " . $prev . "' alt='Trang " . $prev . "'>" . $prev . "</a></b></li> ";
}
echo "<li><b><a title='Trang hiện tại' alt='Trang hiện tại' class='current'>" . $p . "</a></b></li> ";
if ($p < $page) {
示例15: finish
function finish()
{
$sql = "insert into `test_history`(it,uid,comp,time) values('" . $_GET['it'] . "','" . $_SESSION["userid"] . "','" . $comp . "','" . $_POST["timee"] . "')";
$query = @mysql_query($sql);
$tid = @mysql_insert_id();
$comp = time() - $_POST["timee"];
$comp2 = round($comp / 60);
$sqlques = "SELECT * FROM `ques_parts` where `it`='" . $_GET['it'] . "'";
$queryques = @mysql_query($sqlques);
$i = 0;
$score = 0;
while ($rowques = @mysql_fetch_array($queryques)) {
$i++;
if ($rowques[answer] != NULL) {
$score2 = $score2 + $rowques[score];
if ($_POST["ans" . $i] == $rowques[tf]) {
$score = $score + $rowques[score];
$tf = 1;
} else {
$tf = 0;
}
$sqlqueshis = "insert into `ques_history`(qid,tid,content,tf) values('" . $rowques[id] . "','" . $tid . "','" . mysql_escape_string($_POST["ans" . $i]) . "','" . $tf . "')";
$queryqueshis = @mysql_query($sqlqueshis);
} else {
$sqlqueshis = "insert into `ques_history`(qid,tid,content,tf) values('" . $rowques[id] . "','" . $tid . "','" . mysql_escape_string($_POST["ans" . $i]) . "',3)";
$queryqueshis = @mysql_query($sqlqueshis);
}
}
$sql = "update `test_history` set `score`='" . $score . "',`comp`='" . $comp2 . "' where `id`=" . $tid . "";
$query = @mysql_query($sql);
$sql = "SELECT * FROM `tests` where `id`='" . $_GET['it'] . "'";
$query = @mysql_query($sql);
$row = @mysql_fetch_array($query);
echo "<h4 style='font-style: normal;'>Điểm: " . $score . "/" . $score2 . "</h4>";
echo "<h4 style='font-style: normal;'>Thời gian làm bài: " . $comp2 . " phút/" . $row[time2] . " phút</h4>";
echo "<center><p><a href='./bao-cao-lam-thu/" . strtolower(str_filter(account($_SESSION["userid"], username))) . "/" . strtolower(str_filter($row[title])) . "-" . $tid . "'><button class='button2'>Xem chi tiết kết quả</button></a><br/></p></center>";
}