本文整理汇总了PHP中getAccountUserDataObject函数的典型用法代码示例。如果您正苦于以下问题:PHP getAccountUserDataObject函数的具体用法?PHP getAccountUserDataObject怎么用?PHP getAccountUserDataObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAccountUserDataObject函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: search_mapflirt
function search_mapflirt($input)
{
$userdataobj = getAccountUserDataObject(true);
$this->saveMapFlirtSearch($input);
$sql_block = "SELECT GROUP_CONCAT(blocked_user) as blocked_user FROM " . TBL_BLOCKED_LIST . " WHERE id_user='" . getAccountUserId() . "' AND (blocked_type = '" . $GLOBALS['global']['BLOCK_TYPE']['map'] . "' OR blocked_type = '" . $GLOBALS['global']['BLOCK_TYPE']['everything'] . "')";
$block_users = $this->db->query($sql_block)->result();
$sql = "SELECT id_user,username,photo,gender,address,city,state,country,\r\n\t\t\t\t\tfloor(datediff(now(),dob)/365.25) as age,longitude,latitude,if(rating,round(rating/rate_num),0) as rate,map_access \r\n\t\t\t\t\tFROM " . TBL_USER . " \r\n\t\t\t\t\tWHERE id_user!='" . getAccountUserId() . "' AND id_admin=0 AND loc_flag=1 AND status=0 AND random_num='0' AND latitude IS NOT NULL AND longitude IS NOT NULL AND address IS NOT NULL AND address!=''";
if ($block_users and $block_users[0]->blocked_user != '') {
$sql .= " AND id_user NOT IN(" . $block_users[0]->blocked_user . ")";
}
if ($input['distance'] != 0) {
$lat = $this->geo_lib->change_in_latitude($input['distance']);
$long = $this->geo_lib->change_in_longitude($userdataobj->latitude, $input['distance']);
$latitude1 = $userdataobj->latitude + $lat;
$latitude2 = $userdataobj->latitude - $lat;
$longitude1 = $userdataobj->longitude + $long;
$longitude2 = $userdataobj->longitude - $long;
$sql .= " AND latitude BETWEEN " . $latitude2 . " AND " . $latitude1 . " AND longitude BETWEEN " . $longitude2 . " AND " . $longitude1 . "";
}
if ($input['gen']) {
if (strtolower($input['gen']) == 'both') {
$sql .= " AND (gender='male' OR gender='female') ";
} else {
$sql .= " AND gender ='" . $input['gen'] . "' ";
}
}
if ($input['country_name']) {
$sql .= " AND country='" . $input['country_name'] . "'";
}
if ($input['agefrom']) {
$sql .= " AND (age BETWEEN " . $input['agefrom'] . " AND " . $input['ageto'] . ")";
}
if ($input['mapvalue']) {
$sql .= " AND (map_access < " . $input['mapvalue'] . ")";
}
if ($input['status'] == "1") {
//$sql .=" AND id_user IN (SELECT id_user FROM " . TBL_ONLINE . " WHERE 1 GROUP BY id_user)";
$sql .= " AND ( lastactivity +60 >= UNIX_TIMESTAMP() ) ";
}
if (isset($input['photo']) and $input['photo'] == "1") {
$sql .= " AND (photo IS NOT NULL AND photo != '' ) ";
}
$sql .= " ORDER BY id_user DESC";
return $this->db->query($sql)->result();
}
示例4: 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;
}
示例5: active_new_email
function active_new_email()
{
$new_email = $this->input->get('new_email');
$sc = $this->input->get('sc');
$userdataobj = getAccountUserDataObject(true);
if (md5($new_email . $userdataobj->id_user . '-salt') != $sc) {
return json_encode(array('result' => 'ERROR', 'message' => 'Email is not correct'));
exit;
}
if (!$this->phpvalidator->is_email($new_email)) {
return json_encode(array('result' => 'ERROR', 'message' => 'Email is not valid format'));
exit;
}
if (!checkRealEmail($new_email)) {
return json_encode(array('result' => 'ERROR', 'message' => 'Email is not real'));
exit;
}
$usercheckobj = $this->user_io_m->init('email', $new_email);
if ($usercheckobj and $userdataobj->id_user != $usercheckobj->id_user) {
return json_encode(array('result' => 'ERROR', 'message' => 'Email is used by other account.'));
exit;
}
$update['email'] = $new_email;
$this->user_io_m->update_map($update, $userdataobj->id_user);
return json_encode(array('result' => 'ok', 'message' => 'Activated new email successfully.'));
exit;
}
示例6: postOnWall
function postOnWall()
{
$message = $this->input->post('message');
$userdataobj = getAccountUserDataObject();
if (isFacebookLogin()) {
$this->facebookconnect_io_m->postOnUserWall($userdataobj->id_user, $message, $message, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
}
if (isTwitterLogin()) {
$this->twittermodel->postOnWall($message, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
}
echo json_encode(array('message' => 'Post on your wall successfully.'));
exit;
}
示例7: submitExtendAccessMapFlirts
function submitExtendAccessMapFlirts()
{
$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->map_access;
$cash = $userdataobj->cash;
if ($cash < $amountfee) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Your balance is not enough to access map flirts.'));
exit;
}
if ($days < 1) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Unknown error.'));
exit;
}
if ($this->mapflirt_m->checkUserBlockedOther($id_user, getAccountUserId())) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Error. This user was blocked you from access map location.'));
exit;
}
$historydata = $this->mapflirt_m->getHistory($id_user);
if ($historydata) {
$data['id_buyer'] = getAccountUserId();
$data['id_seller'] = $id_user;
$data['amount'] = $amountfee;
$data['ip'] = $this->geo_lib->getIpAddress();
if (mysql_to_unix($historydata->exp_date) > mysql_to_unix(mysqlDate())) {
// extend
$data['buy_date'] = $historydata->buy_date;
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($historydata->exp_date) + 86400 * $days, 'Y-m-d H:i:s');
$data['map_days'] = $days + (int) (mysql_to_unix($historydata->exp_date) / 86400);
} else {
//re-buy
$data['buy_date'] = mysqlDate();
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($data['buy_date']) + 86400 * $days, 'Y-m-d H:i:s');
$data['map_days'] = $days;
}
$id_history = $this->mod_io_m->update_map($data, array('id_map_history' => $historydata->id_map_history), TBL_MAP_HISTORY);
$site_amt = $amountfee * ($GLOBALS['global']['MAP_PRICE']['site'] / 100);
$user_amt = $amountfee * ($GLOBALS['global']['MAP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $data['id_seller'];
$transaction_data['amount'] = $data['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['map'];
$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_seller'] . "'");
}
debug("extend/buy map location transaction id={$transaction_id} ");
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_MY_MAPFLIRTS($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
} else {
$i = 0;
if (!$this->mapflirt_m->wasIMapedUser($id_user)) {
$sellerdataobj = $this->user_io_m->init('id_user', $id_user);
$data[$i]['id_buyer'] = getAccountUserId();
$data[$i]['id_seller'] = $id_user;
$data[$i]['amount'] = $sellerdataobj->map_access;
$data[$i]['map_days'] = 1;
$data[$i]['buy_date'] = mysqlDate();
$data[$i]['exp_date'] = sysDateTimeFormat(mysql_to_unix($data[$i]['buy_date']) + 86400, 'Y-m-d H:i:s');
$data[$i]['ip'] = $this->geo_lib->getIpAddress();
foreach ($data as $key => $value) {
$id_history = $this->mod_io_m->insert_map($value, TBL_MAP_HISTORY);
$site_amt = $value['amount'] * ($GLOBALS['global']['MAP_PRICE']['site'] / 100);
$user_amt = $value['amount'] * ($GLOBALS['global']['MAP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $value['id_seller'];
$transaction_data['amount'] = $value['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['map'];
$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 -'" . $value['amount'] . "' WHERE id_user='" . getAccountUserId() . "'");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='" . $value['id_seller'] . "'");
}
debug("extend/buy map location transaction id={$transaction_id} ");
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_MY_MAPFLIRTS($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
}
}
}
$context = $this->input->post('context');
if ($context == 'CMCHAT') {
$CMCHAT = str_replace(array('$u1', '$u2', '$p3'), array($userdataobj->username, $sellerdataobj->username, $amountfee), language_translate('hook_chat_buy_map'));
} else {
$CMCHAT = '';
}
echo json_encode(array('result' => 'ok', 'message' => 'Buy successfully.', 'CMCHATMSG' => $CMCHAT));
exit;
//.........这里部分代码省略.........
示例8: site_url
/media/js/wall.js"></script>
<script type="text/javascript" src="<?php
echo site_url();
?>
/media/js/qa.js"></script>
<script type="text/javascript" src="<?php
echo site_url();
?>
/media/js/report_abuse.js"></script>
<div id="fb-root"></div>
<?php
$myaccountdata = getAccountUserDataObject();
?>
<input type="hidden" id="username_userinfo" value="<?php
echo $userdataobj->username;
?>
" />
<div class="box-profile" style="position:relative;">
<div class="left">
<a href="<?php
echo $this->user_m->getUserHomeLink($userdataobj->id_user);
?>
">
<img src="<?php
echo $this->user_m->getProfileAvatar($userdataobj->id_user);
示例9: inviteTwitterFriend
function inviteTwitterFriend()
{
$friend_name = isset($_POST['usercheck']) ? $_POST['usercheck'] : null;
$message = substr($this->input->post('message'), 0, 80);
if (!$friend_name) {
echo 'Please choose any people first.';
exit;
}
$userdataobj = getAccountUserDataObject();
$invite_url = $this->user_io_m->getInviteUrl($userdataobj->username);
foreach ($friend_name as $usertt) {
$this->twittermodel->tweetOnOther($message, $invite_url, $usertt);
}
echo 'ok';
exit;
}
示例10: sendgiftToUser
function sendgiftToUser()
{
$this->load->model('user/user_m');
$id_gift = $this->input->post('id_gift', 0);
$id_user = $this->input->post('id_user');
$message = $this->input->post('message', '');
$context = $this->input->post('context');
if ($id_gift == 0) {
echo json_encode(array('result' => 'ERROR', 'message' => "Please choose a gift firstly."));
exit;
}
$giftdataobj = $this->mod_io_m->init('id_gift', $id_gift, TBL_GIFT);
$totalPrice = $giftdataobj->price;
$userdataobj = getAccountUserDataObject(true);
if ($userdataobj->cash < $totalPrice) {
echo json_encode(array('result' => 'ERROR', 'message' => "Your cash is not enough to send gifts."));
exit;
}
$userobj = $this->user_io_m->init('id_user', $id_user);
$giftbox = array();
$transaction = array();
$giftbox['id_reciever'] = $userobj->id_user;
$giftbox['id_sender'] = $userdataobj->id_user;
$giftbox['id_gift'] = $id_gift;
$giftbox['comment'] = $message;
$giftbox['image'] = $giftdataobj->image;
$giftbox['add_date'] = mysqlDate();
$giftbox['ip'] = $this->geo_lib->getIpAddress();
$id_gb = $this->mod_io_m->insert_map($giftbox, TBL_GIFTBOX);
debug("insert gift box ID={$id_gb}");
$transaction['id_user'] = $userobj->id_user;
$transaction['id_owner'] = $userdataobj->id_user;
$transaction['facevalue'] = 0;
$transaction['amount'] = $giftdataobj->price;
$transaction['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['gift'];
$transaction['site_amt'] = $giftdataobj->price;
$transaction['user_amt'] = 0;
//$giftdataobj->price;
$transaction['trans_date'] = mysqlDate();
$transaction['ip'] = $this->geo_lib->getIpAddress();
$this->mod_io_m->insert_map($transaction, TBL_TRANSACTION);
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash+" . $giftdataobj->price . " WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash-" . $giftdataobj->price . " WHERE id_user=" . $userdataobj->id_user);
if ($context == 'CMCHAT') {
if (ENVIRONMENT == 'development') {
$imageLink = site_url() . "image/thumb/gift/" . $giftdataobj->image;
} else {
$imageLink = "[WEB_URL]/image/thumb/gift/" . $giftdataobj->image;
}
$image = "[OPENTAG]img src=\"{$imageLink}\" class=\"cometchat_smiley\" height=\"25px\" width=\"25px\" [CLOSETAG]";
$postCHATMESSAGE = str_replace(array('$u1', '$u2', '$p3', '$image'), array($userdataobj->username, $userobj->username, $giftdataobj->price, $image), language_translate('hook_chat_send_gift'));
} else {
$postCHATMESSAGE = '';
}
echo json_encode(array('result' => 'ok', 'message' => "Sent gift successfully.", 'CMCHATMSG' => $postCHATMESSAGE));
$this->email_sender->juzonSendEmail_JUZ_SEND_GIFT($id_sender = $giftbox['id_sender'], $id_receiver = $giftbox['id_reciever'], $id_gift = $giftbox['id_gift'], $message = $giftbox['comment']);
exit;
}
示例11: juzTimeDisplay
function juzTimeDisplay($mysql_time)
{
if (!getAccountUserId()) {
$timestamp = mysql_to_unix($mysql_time);
return sysDateTimeFormat($timestamp, JUZDATETIMEFM);
} else {
$userdataobj = getAccountUserDataObject(true);
$timestamp = mysql_to_unix($mysql_time);
$gmtamount = time() - mysql_to_unix(mysqlDate());
$gmtconvert = $timestamp + $gmtamount;
$localtime = $gmtconvert + parseGMTtime($userdataobj->timezone);
return sysDateTimeFormat($localtime, JUZDATETIMEFM);
}
}
示例12: defined
<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<script type="text/javascript" src="<?php
echo site_url();
?>
/media/js/wall.js"></script>
<?php
$id_wall = intval($this->uri->segment(3, 0));
$friend_ids = $city = $limit = $my_chat = $country = null;
$result = getAccountUserDataObject(true);
$sql_post = $this->wall_m->get_all_post($result, $friend_ids, $city, $limit, $my_chat, $country, $id_wall);
$res = $this->db->query($sql_post)->result();
?>
<div id="body-content">
<?php
$this->load->view("user/partial/left");
?>
<div id="body">
<div class="body">
<div id="content">
<?php
$this->load->view("user/partial/top");
?>
<div class="clear"></div>
<div id="asyncSectionFeed">
示例13: forceUserConnect
function forceUserConnect()
{
$userdataobj = getAccountUserDataObject();
$ci =& get_instance();
$checkError = array();
if ($ci->facebookmodel->isUserLoggedin()) {
$facebookid = $ci->facebookmodel->getFacebookid();
$facebookconnectdataobj = $ci->facebookconnect_io_m->init('facebookid', $facebookid);
if ($facebookconnectdataobj and $facebookconnectdataobj->userid != getAccountUserId()) {
if ($id_user = $ci->facebookmodel->isFacebookConnected()) {
$ci->mod_io_m->update_map(array('access_token' => $ci->facebookmodel->getUserAccessToken()), array('userid' => $id_user), TBL_FACEBOOK_CONNECT);
}
$ci->user_io_m->userLogout();
reloadJS_url("member/login");
} else {
if (!$facebookconnectdataobj) {
if ($ci->facebookmodel->getTotalFriends() < $GLOBALS['global']['FACEBOOK']['MinFacebookFriendsRequired']) {
$checkError[] = str_replace('$s', $GLOBALS['global']['FACEBOOK']['MinFacebookFriendsRequired'], language_translate('member_fb_friend_request_error'));
}
if ($ci->facebookmodel->countPictures() < $GLOBALS['global']['FACEBOOK']['MinFacebookPhotosRequired']) {
$checkError[] = str_replace('$s', $GLOBALS['global']['FACEBOOK']['MinFacebookPhotosRequired'], language_translate('member_fb_photo_request_error'));
}
if (empty($checkError)) {
$data['userid'] = getAccountUserId();
$data['facebookid'] = $facebookid;
$data['add_date'] = mysqlDate();
$data['ip'] = $ci->geo_lib->getIpAddress();
$data['invitedfriends'] = 0;
$data['access_token'] = $ci->facebookmodel->getUserAccessToken();
$ci->facebookconnect_io_m->insert_map($data);
$postFB = true;
$ci->facebookmodel->getProfilePicture(getAccountUserId());
$FirstStatusMessage = $GLOBALS['global']['FACEBOOK']['FirstStatusMessage'];
$FirstStatusDescription = $GLOBALS['global']['FACEBOOK']['FirstStatusDescription'];
$invite_url = $ci->user_io_m->getInviteUrl($userdataobj->username);
//$this->facebookmodel->postOnWall($FirstStatusMessage,$FirstStatusDescription,$invite_url);
$ci->facebookconnect_io_m->postOnUserWall($userdataobj->id_user, $FirstStatusMessage, $FirstStatusDescription, $invite_url);
} else {
$ci->facebookmodel->logout();
}
}
}
}
if (isTwitterLogin()) {
$twitterid = $ci->twittermodel->getTwitterId();
$twitterconnectdataobj = $ci->mod_io_m->init('twitterid', $twitterid, TBL_TWITTER_CONNECT);
$availabelTwitterConnectObj = $ci->mod_io_m->init('userid', getAccountUserId(), TBL_TWITTER_CONNECT);
if ($twitterconnectdataobj and $twitterconnectdataobj->userid != getAccountUserId()) {
$ci->user_io_m->userLogout();
reloadJS_url("member/login");
} else {
if (!$twitterconnectdataobj and !$availabelTwitterConnectObj) {
if ($ci->twittermodel->getTotalFollowers() < $GLOBALS['global']['TWITTER']['MinFollowersRequired']) {
$checkError[] = str_replace('$s', $GLOBALS['global']['TWITTER']['MinFollowersRequired'], language_translate('member_tt_followers_request_error'));
}
if ($ci->twittermodel->getTotalTweets() < $GLOBALS['global']['TWITTER']['MinTweetsRequired']) {
$checkError[] = str_replace('$s', $GLOBALS['global']['TWITTER']['MinTweetsRequired'], language_translate('member_tt_mintweet_request_error'));
}
if ($ci->twittermodel->accountCreatedDaysBefore() < $GLOBALS['global']['TWITTER']['MinDaysOldAccountRequired']) {
$checkError[] = str_replace('$s', $GLOBALS['global']['TWITTER']['MinDaysOldAccountRequired'], language_translate('member_tt_mindays_request_error'));
}
if (empty($checkError)) {
$data['userid'] = getAccountUserId();
$data['twitterid'] = $twitterid;
$data['add_date'] = mysqlDate();
$data['ip'] = $ci->geo_lib->getIpAddress();
$data['session_data'] = $_SESSION['twwiterTokenInfo'];
$ci->mod_io_m->insert_map($data, TBL_TWITTER_CONNECT);
$ci->twittermodel->changeProfileImage(getAccountUserId(), $ci->twittermodel->savePictureToJuz(getAccountUserId()));
$invite_url = $ci->user_io_m->getInviteUrl($userdataobj->username);
$ci->twittermodel->postInviteStatus($invite_url);
} else {
unset($_SESSION['twitterconnection']);
}
}
}
}
return $checkError;
}
示例14: postItemOnFbTt
function postItemOnFbTt($id_wall, $context = '')
{
$this->load->model('user/wall_m');
$this->load->model('mod_io/timeline_setting_io_m');
$timeline_setting = $this->timeline_setting_io_m->init(getAccountUserId());
$sql = $this->wall_m->get_all_post($result = '', $friend = '', $city = '', $limit = '', $my_chat = "", $country = '', $id_wall);
$walldataarr = $this->db->query($sql)->result();
$walldata = $this->wall_m->commentAccordingType($walldataarr[0]);
$walldata = stripAllLinks($walldata);
$userdataobj = getAccountUserDataObject();
if (isFacebookLogin()) {
//$this->facebookmodel->postOnWall($walldata ,$walldata ,$url=$this->user_io_m->getInviteUrl($userdataobj->username));
if ($context) {
if ($context == TIMELINE_BACKSTAGE_PHOTO and $timeline_setting->fb_backstage_photo == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_BACKSTAGE_PHOTO post on FACEBOOK wall :' . $walldata);
}
if ($context == TIMELINE_AKSME_ANSWER and $timeline_setting->fb_askme_answer == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_AKSME_ANSWER post on FACEBOOK wall :' . $walldata);
}
if ($context == TIMELINE_STATUS_UPDATE and $timeline_setting->fb_status_update == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_STATUS_UPDATE post on FACEBOOK wall :' . $walldata);
}
if ($context == TIMELINE_BUY_PET and $timeline_setting->fb_buy_pet == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_BUY_PET post on FACEBOOK wall :' . $walldata);
}
if ($context == TIMELINE_LOCKPET and $timeline_setting->fb_lock_pet == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_LOCKPET post on FACEBOOK wall :' . $walldata);
}
if ($context == TIMELINE_RATE_VIDEO and $timeline_setting->fb_rate_video == 1) {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_RATE_VIDEO post on FACEBOOK wall :' . $walldata);
}
} else {
$this->facebookconnect_io_m->postOnUserWall($id_user = getAccountUserId(), $walldata, $walldata, $this->user_io_m->getInviteUrl($userdataobj->username));
debug(' post on FACEBOOK wall :' . $walldata);
}
}
if (isTwitterLogin()) {
if ($context) {
if ($context == TIMELINE_BACKSTAGE_PHOTO and $timeline_setting->tt_backstage_photo == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_BACKSTAGE_PHOTO post on TWITTER wall :' . $walldata);
}
if ($context == TIMELINE_AKSME_ANSWER and $timeline_setting->tt_askme_answer == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_AKSME_ANSWER post on TWITTER wall :' . $walldata);
}
if ($context == TIMELINE_STATUS_UPDATE and $timeline_setting->tt_status_update == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_STATUS_UPDATE post on TWITTER wall :' . $walldata);
}
if ($context == TIMELINE_BUY_PET and $timeline_setting->tt_buy_pet == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_BUY_PET post on TWITTER wall :' . $walldata);
}
if ($context == TIMELINE_LOCKPET and $timeline_setting->tt_lock_pet == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_LOCKPET post on TWITTER wall :' . $walldata);
}
if ($context == TIMELINE_RATE_VIDEO and $timeline_setting->tt_rate_video == 1) {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('TIMELINE_RATE_VIDEO post on TWITTER wall :' . $walldata);
}
} else {
$this->twittermodel->postOnWall($walldata, $url = $this->user_io_m->getInviteUrl($userdataobj->username));
debug('post on TWITTER wall :' . $walldata);
}
}
}
示例15: defined
defined('BASEPATH') or exit('No direct script access allowed');
?>
<style>
.extra-link{
position:absolute;
right:5px;
top:15px;
}
.extra-link a{
color:#3FAFFE;
}
</style>
<?php
$userdataobj = getAccountUserDataObject();
$myPetList = $this->pet_m->pet_list($userdataobj->id_user);
?>
<?php
if (!($count = count($myPetList))) {
?>
<h4><?php
echo language_translate('left_menu_label_petlist');
?>
</h4>
<p class="msg"><?php
echo language_translate('left_menu_label_petlist_msg');
?>
</p>