本文整理汇总了PHP中getAccountUserId函数的典型用法代码示例。如果您正苦于以下问题:PHP getAccountUserId函数的具体用法?PHP getAccountUserId怎么用?PHP getAccountUserId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAccountUserId函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submitAnswerQuestion
function submitAnswerQuestion()
{
$id_question = $this->input->post("id_question");
$answer = $this->input->post("answer");
$questionRecord = $this->qa_m->getRecord_Question($id_question);
$array['answer'] = substr($answer, 0, $GLOBALS['global']['INPUT_LIMIT']['askme_answer']);
$array['id_askmeq'] = $id_question;
$array['asked_by'] = $questionRecord->asked_by;
$array['ans_by'] = getAccountUserId();
$array['ans_date'] = mysqlDate();
$this->mod_io_m->insert_map($array, TBL_ASK_ANSWER);
//update question status
$update['q_status'] = 1;
$this->mod_io_m->update_map($update, array('id_askmeq' => $id_question), TBL_ASK_QUESTION);
//also insert into wall feed
$wall['id_parent'] = 0;
$wall['id_user'] = getAccountUserId();
$wall['description'] = $array['answer'];
$wall['add_date_post'] = mysqlDate();
$wall['post_id'] = 0;
$wall['id_ques'] = $id_question;
$id_wall = $this->mod_io_m->insert_map($wall, TBL_WALL);
echo 'ok';
$this->email_sender->juzonSendEmail_JUZ_ASKME_ANSWER($array['asked_by'], $array['ans_by'], $array['answer']);
$this->user_io_m->postItemOnFbTt($id_wall, TIMELINE_AKSME_ANSWER);
exit;
}
示例2: remove
function remove($id_user)
{
$wishlistdata = $this->seekWishListRecord($owner_id = getAccountUserId(), $id_user);
if ($wishlistdata) {
$this->db->where('id_owner', getAccountUserId())->where('id_user', $id_user)->delete(TBL_WISHLIST);
}
}
示例3: getBalance
function getBalance()
{
$earn = $this->db->query("SELECT SUM(user_amt) as tot_earning from " . TBL_TRANSACTION . " WHERE id_user=" . getAccountUserId() . " AND user_amt !=0")->result();
$tot_earn = $earn[0]->tot_earning;
$expense = $this->db->query("SELECT SUM(amount) as tot_expense from " . TBL_TRANSACTION . " WHERE id_owner=" . getAccountUserId() . " AND amount !=0 \r\n\t\t\t\t\t\t\t\t\tAND trans_type !=" . $GLOBALS['global']['TRANS_TYPE']['pet_sold_cash'] . " AND trans_type !=" . $GLOBALS['global']['TRANS_TYPE']['message'] . " AND trans_type !=" . $GLOBALS['global']['TRANS_TYPE']['convert_cash'])->result();
//excluding pet_sold_cash becoz its already calculated in pet_buy for expense
$tot_expense = $expense[0]->tot_expense;
return array('total_earn' => $tot_earn, 'total_expense' => $tot_expense);
}
示例4: deleteFlirt
function deleteFlirt()
{
$id_flirt = $this->input->post('id_flirt');
$flirtdataobj = $this->mod_io_m->init('id_flirt', $id_flirt, TBL_FLIRT);
if ($flirtdataobj->id_sender == getAccountUserId() or $flirtdataobj->id_receiver == getAccountUserId()) {
$this->db->where('id_flirt', $id_flirt)->delete(TBL_FLIRT);
}
exit;
}
示例5: deleteChatBlock
function deleteChatBlock()
{
$user_to_id = $this->input->post('id_user');
$current_dbprefix = $ci->db->dbprefix;
$this->db->set_dbprefix('');
$this->db->where('fromid', getAccountUserId())->where('toid', $user_to_id)->delete('cometchat_block');
$this->db->set_dbprefix($current_dbprefix);
exit;
}
示例6: submitReportAbuse
function submitReportAbuse()
{
$data['id_user'] = $this->input->post('id_user');
$data['id_reporter'] = getAccountUserId();
$data['message'] = substr($this->input->post('message'), 0, $GLOBALS['global']['INPUT_LIMIT']['askmeq']);
$data['datetime'] = mysqlDate();
$this->mod_io_m->insert_map($data, TBL_REPORT_ABUSE);
echo 'ok';
exit;
}
示例7: updateWatchingStatus
function updateWatchingStatus($video_id)
{
$checkdata = $this->db->where('video_id', $video_id)->where('user_id', getAccountUserId())->get(TBL_WATCHING_VIDEO)->result();
if ($checkdata) {
$update['timestamp'] = time();
$this->mod_io_m->update_map($update, array('watching_video_id' => $checkdata[0]->watching_video_id), TBL_WATCHING_VIDEO);
} else {
$data['user_id'] = getAccountUserId();
$data['timestamp'] = time();
$data['video_id'] = $video_id;
$this->mod_io_m->insert_map($data, TBL_WATCHING_VIDEO);
}
}
示例8: buyBackstagePhoto
function buyBackstagePhoto()
{
$this->load->model('user/collection_m');
$id_photo = $this->input->post('id_photo', 0);
$gallerydata = $this->gallery_io_m->init('id_image', $id_photo);
$userdataobj = getAccountUserDataObject(true);
$price = $gallerydata->price;
$id_owner = $gallerydata->id_user;
if ($this->collection_m->isMyCollectionPhoto($id_photo)) {
echo json_encode(array('result' => 'ERROR', 'message' => 'This photo was in your collection.'));
exit;
}
if ($userdataobj->cash < $price) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Your cash is not to buy this backstage photo.'));
exit;
}
/* update collection data */
$data['id_user'] = getAccountUserId();
$data['id_image'] = $id_photo;
$data['coll_type'] = $GLOBALS['global']['COLLECTION_TYPE']['photo'];
$data['added_date'] = mysqlDate();
$id_collection = $this->mod_io_m->insert_map($data, TBL_COLLECTION);
unset($data);
/* update views gallery */
$this->db->query("UPDATE " . TBL_GALLERY . " SET v_count= v_count+1 WHERE id_image={$id_photo}");
/*update user amount cash */
$site_amount = $GLOBALS['global']['BACKSTG_PRICE']['site'] * $price / 100;
$owner_amount = $GLOBALS['global']['BACKSTG_PRICE']['owner'] * $price / 100;
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash+{$owner_amount} WHERE id_user={$id_owner}");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash-{$price} WHERE id_user=" . $userdataobj->id_user);
/*update transaction data */
$data['id_owner'] = $userdataobj->id_user;
$data['id_user'] = $id_owner;
$data['amount'] = $price;
$data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['backstg_photo'];
$data['site_amt'] = $site_amount;
$data['user_amt'] = $owner_amount;
$data['image'] = $gallerydata->image;
$data['trans_date'] = mysqlDate();
$data['ip'] = $this->geo_lib->getIpAddress();
$id_transaction = $this->mod_io_m->insert_map($data, TBL_TRANSACTION);
debug("id_collection={$id_collection} | id_transaction={$id_transaction} | id_owner:{$id_owner} | site_amount:{$site_amount} | owner_amount:{$owner_amount}");
$ownerdata = $this->user_io_m->init('id_user', $id_owner);
$CMCHATMSG = str_replace(array('$u1', '$u2', '$p3'), array($userdataobj->username, $ownerdata->username, $price), language_translate('hook_chat_buy_backstage'));
echo json_encode(array('result' => 'ok', 'message' => 'Buy backstage photo successfully.', 'id_user' => $id_owner, 'CMCHATMSG' => $CMCHATMSG));
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_MY_BACKSTAGE_PHOTO($id_buyer = $userdataobj->id_user, $id_seller = $id_owner, $id_photo, $data['amount']);
exit;
}
示例9: submitBuyPeepedAccess
function submitBuyPeepedAccess()
{
$userdataobj = getAccountUserDataObject(true);
$id_user = $this->input->post('id_user', 0);
$sellerdataobj = $this->user_io_m->init('id_user', $id_user);
$days = $this->input->post('days', 0);
$amountfee = $days * $sellerdataobj->peep_access;
$cash = $userdataobj->cash;
if ($cash < $amountfee) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Your balance is not enough to access peeped.'));
exit;
}
if ($days < 1) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Unknown error.'));
exit;
}
$data['id_buyer'] = getAccountUserId();
$data['id_user'] = $id_user;
$data['amount'] = $amountfee;
$data['ip'] = $this->geo_lib->getIpAddress();
$data['access_days'] = $days;
$data['buy_date'] = mysqlDate();
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($data['buy_date']) + 86400 * $days, 'Y-m-d H:i:s');
$id_history = $this->mod_io_m->insert_map($data, TBL_PEEPBOUGHT_HISTORY);
$site_amt = $amountfee * ($GLOBALS['global']['PEEP_PRICE']['site'] / 100);
$user_amt = $amountfee * ($GLOBALS['global']['PEEP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $data['id_user'];
$transaction_data['amount'] = $data['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['buy_peeped'];
$transaction_data['site_amt'] = $site_amt;
$transaction_data['user_amt'] = $user_amt;
$transaction_data['trans_date'] = mysqlDate();
$transaction_data['ip'] = $this->geo_lib->getIpAddress();
$transaction_id = $this->mod_io_m->insert_map($transaction_data, TBL_TRANSACTION);
if ($transaction_id) {
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $site_amt . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $data['amount'] . "' WHERE id_user='" . getAccountUserId() . "'");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='" . $data['id_user'] . "'");
}
$CMCHATMSG = str_replace(array('$u1', '$u2', '$p3'), array($userdataobj->username, $sellerdataobj->username, $amountfee), language_translate('hook_chat_buy_peep_access'));
echo json_encode(array('result' => 'ok', 'message' => 'Buy peeped access successfully.', 'CMCHATMSG' => $CMCHATMSG));
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_WHO_PEEPED_ME($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
exit;
}
示例10: buyFavouriteAccessPackage
function buyFavouriteAccessPackage()
{
$userdata = getAccountUserDataObject(true);
if ($userdata->cash < $GLOBALS['global']['ADMIN_DEFAULT']['favourite']) {
echo json_encode(array('result' => 'error', 'message' => "Your balance is not enough to buy this package."));
exit;
}
$sql = "INSERT INTO " . TBL_TRANSACTION . " (id_owner,id_user,amount,trans_type,site_amt,trans_date,ip) \r\n\t\t\t\t\tVALUES('" . getAccountUserId() . "',1,'" . $GLOBALS['global']['ADMIN_DEFAULT']['favourite'] . "','" . $GLOBALS['global']['TRANS_TYPE']['favourite'] . "','" . $GLOBALS['global']['ADMIN_DEFAULT']['favourite'] . "',NOW(),'" . $_SERVER['REMOTE_ADDR'] . "')";
$this->db->query($sql);
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $GLOBALS['global']['ADMIN_DEFAULT']['favourite'] . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $GLOBALS['global']['ADMIN_DEFAULT']['favourite'] . "' WHERE id_user='" . getAccountUserId() . "'");
$data['id_user'] = getAccountUserId();
$data['price'] = $GLOBALS['global']['ADMIN_DEFAULT']['favourite'];
$data['datetime'] = mysqlDate();
$this->mod_io_m->insert_map($data, TBL_FAVOURITE_BUY_LOG);
echo json_encode(array('result' => 'ok', 'message' => "Buy Favourite View Package successfully."));
exit;
}
示例11: sendMessage
function sendMessage()
{
$gender = $this->input->post('gender');
$type = $this->input->post('type');
$message = substr($this->input->post('message'), 0, $GLOBALS['global']['INPUT_LIMIT']['random_message']);
$sql = "SELECT u.id_user FROM " . TBL_USER . " u, " . TBL_FRIENDLIST . " f WHERE u.status=0 ";
$cond = '';
if ($type == 'friend') {
$my_id_user = getAccountUserId();
$cond .= " AND ( (u.id_user=f.id_user AND f.friend={$my_id_user}) OR ( f.friend=u.id_user AND f.id_user={$my_id_user}) ) AND f.request_type=0 ";
}
if ($gender != 'Both') {
$cond .= " AND u.gender= '{$gender}'";
}
$offset_result = $this->db->query(" SELECT FLOOR(RAND() * COUNT(*)) AS offset FROM " . TBL_USER . " u, " . TBL_FRIENDLIST . " f WHERE u.status=0 {$cond}")->result();
if (!$offset_result) {
echo json_encode(array('result' => 'ERROR', 'message' => 'No such user found. Send failure.'));
exit;
}
$offset = $offset_result[0]->offset;
$res = $this->db->query(" SELECT u.id_user FROM " . TBL_USER . " u, " . TBL_FRIENDLIST . " f WHERE u.status=0 {$cond} LIMIT {$offset},1")->result();
if (!$res) {
echo json_encode(array('result' => 'ERROR', 'message' => 'No such user found. Send failure.'));
exit;
}
$id_user = $res[0]->id_user;
$data['id_user_from'] = getAccountUserId();
$data['id_user_to'] = $id_user;
$data['message'] = $message;
$data['sentdate'] = mysqlDate();
if ($this->online_m->checkOnlineUser($id_user)) {
//send chat message ...
$data['type_message'] = 0;
include_once './cometchat/cometchat_init.php';
sendMessageTo($data['id_user_to'], $data['message']);
} else {
//send email
$data['type_message'] = 1;
$this->email_sender->juzonSendEmail_RANDOMMESSAGEEMAIL($id_user, $message);
}
$this->mod_io_m->insert_map($data, TBL_RANDOM_MESSAGE);
echo json_encode(array('result' => 'ok', 'message' => 'Send successfully.'));
exit;
}
示例12: deleteComment
function deleteComment()
{
$id_photo_comment = $this->input->post('id_photo_comment');
$id_user = getAccountUserId();
$dataobj = $this->mod_io_m->init('id_photo_comment', $id_photo_comment, TBL_PHOTO_COMMENT);
if ($dataobj) {
$gallerydataobj = $this->gallery_io_m->init('id_image', $dataobj->id_wall);
if ($dataobj->comment_by == $id_user or $id_user == $gallerydataobj->id_user) {
$this->db->where('id_photo_comment', $id_photo_comment)->delete(TBL_PHOTO_COMMENT);
echo json_encode(array('result' => 'OK'));
exit;
} else {
echo json_encode(array('result' => 'ERROR'));
exit;
}
} else {
echo json_encode(array('result' => 'ERROR'));
exit;
}
}
示例13: tweetByApp
function tweetByApp($message, $link)
{
$connection = new TwitterOAuth($this->consumerKey, $this->consumerSecret, $GLOBALS['global']['TWITTER']['oauth_token'], $GLOBALS['global']['TWITTER']['oauth_token_secret']);
$twitterdata = $ci->db->where('userid', getAccountUserId())->get(TBL_TWITTER_CONNECT)->result();
if ($twitterdata and $twitterdata[0]->session_data) {
$_SESSION['twitterconnection'] = $twitterdata[0]->session_data;
}
$userdetails = $this->connection->get('account/verify_credentials');
$url = 'https://api.twitter.com/1/statuses/update.json';
$status = "status=" . urlencode($message . ' ' . $link) . "&trim_user=true&include_entities=true&in_reply_to_status_id=@" . $userdetails['screen_name'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
return $result;
}
示例14: downloadVideo
function downloadVideo()
{
$id_video = $this->input->post('id_video');
$videodata = $this->mod_io_m->init('id_video', $id_video, TBL_VIDEO);
$link = $this->hentai_m->getFacebookVideoSource($id_video);
if (!$link) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Link is not existed. Download failure.'));
exit;
} else {
$sql = "INSERT INTO " . TBL_TRANSACTION . " (id_owner,id_user,amount,trans_type,site_amt,trans_date,ip) \r\n\t\t\t\t\tVALUES('" . getAccountUserId() . "',1,'" . $GLOBALS['global']['ADMIN_DEFAULT']['download'] . "','" . $GLOBALS['global']['TRANS_TYPE']['download'] . "','" . $GLOBALS['global']['ADMIN_DEFAULT']['download'] . "',NOW(),'" . $_SERVER['REMOTE_ADDR'] . "')";
$this->db->query($sql);
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $GLOBALS['global']['ADMIN_DEFAULT']['download'] . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $GLOBALS['global']['ADMIN_DEFAULT']['download'] . "' WHERE id_user='" . getAccountUserId() . "'");
$session_key = md5(getAccountUserId() . time() . $id_video);
$_SESSION['file'][$session_key] = array('name' => slugify($videodata->name) . '.mp4', 'link' => $link);
//$downloadLink = site_url().'download.php?id='.$session_key;
$downloadLink = $link;
echo json_encode(array('result' => 'ok', 'message' => "<div id='downloadIconID'><a href='{$downloadLink}' target='_blank'><img src='" . site_url() . 'media/images/download.png' . "' /></a></div>"));
exit;
}
}
示例15: getAccountUserId
}
?>
<?php
if (!isset($cat)) {
$cat = $this->uri->segment(3, '');
}
if ($this->input->get('task', '') == 'qedit') {
$data['gender'] = $this->input->get('gender', '');
$data['age_from'] = $this->input->get('age_from', '');
$data['age_to'] = $this->input->get('age_to', '');
$data['country'] = $this->input->get('country', '');
$this->load->model('mod_io/mod_io_wall_m');
$this->mod_io_wall_m->quickEditUserFilter($data);
}
$id_user = getAccountUserId();
$userdataobj = $result = getAccountUserDataObject(true);
$friend_ids = $city = $limit = $my_chat = $country = null;
if ($this->input->get('per_page') != '') {
$limit = intval($this->input->get('per_page')) * 15;
}
//$cat == '' OR $cat == 'friends' OR !in_array($cat, array('near_me', 'friends', 'everyone', 'my_chatter'))
if ($cat == 'friends') {
$cond = "(id_user=" . $id_user . " AND request_type=0) OR (friend=" . $id_user . " AND request_type=0)";
$friends = $this->db->query("SELECT * FROM " . TBL_FRIENDLIST . " WHERE {$cond}")->result();
$friend_ids = array();
if ($friends) {
foreach ($friends as $k => $v) {
if ($v->friend == $id_user) {
$friend_ids[] = $v->id_user;
} else {