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; }
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); } }
function getBalance() { $earn = $this->db->query("SELECT SUM(user_amt) as tot_earning from " . TBL_TRANSACTION . " WHERE id_user="******" 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); }
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; }
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; }
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; }
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); } }
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="******"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; }
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='******'"); $this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='******'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; }
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='******'"); $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; }
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; }
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; } }
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; }
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='******'"); $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; } }
} ?> <?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="******" 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 {
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?> <?php $userdataobj = getAccountUserDataObject(); $mymapflirtsearch = $this->db->where('id_user', getAccountUserId())->get(TBL_MAPFLIRT_SEARCH)->result(); $mygender = $mymapflirtsearch ? $mymapflirtsearch[0]->gender : null; $myagefrom = $mymapflirtsearch ? $mymapflirtsearch[0]->age_from : 18; $myageto = $mymapflirtsearch ? $mymapflirtsearch[0]->age_to : 100; $mydistance = $mymapflirtsearch ? $mymapflirtsearch[0]->distance : null; $mycountry_name = $mymapflirtsearch ? $mymapflirtsearch[0]->country : null; $mystatus = $mymapflirtsearch ? $mymapflirtsearch[0]->status : null; $mymapvalue = $mymapflirtsearch ? $mymapflirtsearch[0]->map : null; $myphoto = $mymapflirtsearch ? $mymapflirtsearch[0]->photo : null; ?> <div class="filter-split"> Set <?php echo form_dropdown('mymapvalue', mapValueOptionData_ioc(), array($userdataobj->map_access), 'id="mymapvalue" '); ?> J$ per 24 hours for other flirts to access your location. <br/> You will earn <?php echo $GLOBALS['global']['MAP_PRICE']['user']; ?> % from the total J$ revenue. </div> <div class="filter-split" style="border:1px solid #cfcfcf;padding-left:5px;"> <div class="sep"></div>
</h3> <?php //if($subitem->comment_by != getAccountUserId()): ?> <!-- <a href="#" class="chat">Chat</a> <a href="javascript:void(0);" onclick="callFuncShowDialogSubmitQuestion(<?php echo $subitem->comment_by; ?> );" class="ask-me">Ask Me</a> --> <?php //endif; ?> <?php if ($id_user == getAccountUserId() or $subitem->comment_by == getAccountUserId()) { echo loader_image_delete("class='deleteItem' onclick='callFuncDeleteComment({$subitem->id_photo_comment});'"); } ?> </div> <div class="comment"> <?php echo maintainHtmlBreakLine($subitem->comment); ?> </div> <p class="time"><?php echo timeDiff($subitem->add_date); ?> </p> </div> </div>
?> </span> characters left. <div class="clear"></div> <label> </label> <input type="checkbox" name="select_all" id="select_all" class="checkAll" /> Check all? </div> <div class="clear"></div> <div class="input" id="fbFriends"> <?php $i = 0; foreach ($this->facebookconnect_io_m->getFriendsList(getAccountUserId()) as $k => $v) { ?> <?php foreach ($v as $item) { $item = (array) $item; ?> <div class="wrap-left" style="width:23%;"> <div class="user-profile-avatar"> <?php echo "<img src=" . $this->facebookconnect_io_m->getFacebookUserProfileImage($item['id']) . " />"; ?> </div> <div class="user-profile-owner"> <?php echo $item['name'];
$('#leftLetters').text($length); }); }); </script> --> <?php if (isset($_GET['per_page'])) { $offset = intval($_GET['per_page']); } else { $offset = 0; } $total = count($this->random_message_m->getRandomMessage(getAccountUserId())); $searchArray = $this->random_message_m->getRandomMessage(getAccountUserId(), $offset, $GLOBALS['global']['PAGINATE']['rec_per_page']); $pagination = create_pagination($uri = "user/random_message/showHistory/", $total_rows = $total, $limit = $GLOBALS['global']['PAGINATE']['rec_per_page'], $uri_segment = 0, TRUE, TRUE); ?> <?php if ($total) { ?> <table> <thead> <tr> <td width="150px" style="text-align:center;">Sent To</td> <td width="200px" style="text-align:center;">Message</td> <td width="50px" style="text-align:center;">Type</td> <td width="100px" style="text-align:center;">Date/time</td> </tr>
function jsdetect() { $facebookconnected = $twitterconnected = 0; if (isFacebookLogin()) { $facebookconnected = 1; } if (isTwitterLogin()) { $twitterconnected = 1; } header("content-type:application/x-javascript"); echo "var SYS_JS_SOCIAL = {};"; echo "SYS_JS_SOCIAL.facebook = {$facebookconnected};"; echo "SYS_JS_SOCIAL.twitter = {$twitterconnected};"; echo "var USER_ID = " . getAccountUserId() . ";"; }
function submitSnapshotWebcam() { $title = $this->input->post('title'); $myPhoto = $this->input->post('image_name'); $price = round($this->input->post('price'), 2); if (!$price or $price <= 0) { echo json_encode(array('result' => 'error', 'message' => 'Price must greater than 0.')); exit; } $webcamDir = APP_ROOT . "webcamtemp/"; $uploadDir = APP_ROOT . $GLOBALS['global']['IMAGE']['image_orig'] . "photos/"; $thumbnailDir = APP_ROOT . $GLOBALS['global']['IMAGE']['image_thumb'] . "photos/"; $thumb_height = $GLOBALS['global']['IMAGE']['thumb_height']; $thumb_width = $GLOBALS['global']['IMAGE']['thumb_width']; $orig_width = $GLOBALS['global']['IMAGE']['orig_width']; $orig_height = $GLOBALS['global']['IMAGE']['orig_height']; if (!$myPhoto) { echo json_encode(array('result' => 'error', 'message' => 'Upload picture failure.')); exit; } else { copy($webcamDir . $myPhoto, $thumbnailDir . $myPhoto); copy($webcamDir . $myPhoto, $uploadDir . $myPhoto); //chmod( $thumbnailDir.$myPhoto, 0777 ); //chmod( $uploadDir.$myPhoto, 0777 ); makeThumb($myPhoto, $uploadDir, $orig_width, $orig_height); makeThumb($myPhoto, $thumbnailDir, $thumb_width, $thumb_height); $data['image'] = $myPhoto; $data['id_user'] = getAccountUserId(); $data['image_type'] = $GLOBALS['global']['IMAGE_STATUS']['private']; $data['price'] = $price; $data['comment'] = $title; $data['prof_flag'] = 0; $data['v_count'] = 0; $data['rate_num'] = 0; $data['rating'] = 0; $data['added_date'] = mysqlDate(); $id_photo = $this->gallery_io_m->insert_map($data); $array['id_parent'] = 0; $array['id_user'] = getAccountUserId(); $array['description'] = "priced at {$price}J\$"; $array['add_date_post'] = mysqlDate(); $array['post_name'] = getAccountUserId() . '_' . filterCharacter($title); $array['post_id'] = $id_photo; $array['post_code'] = $GLOBALS['global']['CHATTER_CODE']['backstage_photo']; $id_wall = $this->mod_io_m->insert_map($array, TBL_WALL); $this->user_io_m->postItemOnFbTt($id_wall, TIMELINE_BACKSTAGE_PHOTO); $_SESSION['BACKSTAGE_PRICE'] = $price; echo json_encode(array('result' => 'ok', 'message' => 'Upload your backstage photo successfully.')); exit; } echo 'Unknown error'; exit; }
function getListMyFriendsUsername() { $id_user = getAccountUserId(); $rs = $this->db->query("SELECT * FROM " . TBL_FRIENDLIST . " WHERE (id_user={$id_user} OR friend={$id_user}) AND request_type='0' ")->result(); $arr = array(); foreach ($rs as $item) { if ($item->id_user != $id_user) { $datauser = $this->user_io_m->init('id_user', $item->id_user); } else { $datauser = $this->user_io_m->init('id_user', $item->friend); } if ($datauser and $datauser->status == 0) { $arr[] = $datauser->username; } } return $arr; }
</h3> <p> For every friend you successfully invite, you will be rewarded J$ <?php echo $GLOBALS['global']['USER_CASH']['invite_cash']; ?> . <br/> Don't let other user invites your friend and rob your J$ <br/> Start inviting and earn all your J$ :) </p> </div> <div class="clear"></div> <?php if ($this->facebookconnect_io_m->init('userid', getAccountUserId())) { ?> <br/><br/> <a href="javascript:void(0);" onclick="callFuncShowMyFacebookFriends();" class="button spctext"> Invite your facebook friends </a> <?php } ?> <div class="clear"></div> <?php if (isTwitterLogin()) { ?>
<?php if ($subitem->id_user != getAccountUserId()) { ?> <a href="javascript:void(0);" onclick="javascript:jqcc.cometchat.chatWith('<?php echo $subitem->id_user; ?> ');" class="chat">Chat</a> <a href="javascript:void(0);" onclick="callFuncShowDialogSubmitQuestion(<?php echo $subitem->id_user; ?> );" class="ask-me">Ask Me</a> <?php } ?> <?php if ($isMyOwnFeed or $subitem->id_user == getAccountUserId()) { echo loader_image_delete("class='deleteItem' onclick='callFuncDeleteComment({$subitem->id_wall},{$id_wall});'"); } ?> </div> <div class="comment"> <?php echo $this->wall_m->commentAccordingType($subitem); ?> </div> <p class="time"><?php echo timeDiff($subitem->date_diff); //time_interval(explode(':',$subitem->add_date)); ?> </p> </div>
function checkTransactionInput($pet_uid, $curval, $cash, $fval, $pet_username) { //check if none of them is blank if ($pet_uid == '' or $curval == '' or $cash == '' or $fval == '' or $pet_username == '' or getAccountUserId() == '' or $_SERVER['REMOTE_ADDR'] == '' or $GLOBALS['global']['PET_VALUE']['tax_trans'] == '' or $GLOBALS['global']['TRANS_TYPE']['pet'] == '' or $GLOBALS['global']['TRANS_TYPE']['pet_sold_cash'] == '' or $GLOBALS['global']['CHATTER_CODE']['pet_store'] == '') { return false; } //check if none of them is null if ($pet_uid == NULL or $curval == NULL or $cash == NULL or $fval == NULL or $pet_username == NULL or getAccountUserId() == NULL or $_SERVER['REMOTE_ADDR'] == NULL or $GLOBALS['global']['PET_VALUE']['tax_trans'] == NULL or $GLOBALS['global']['TRANS_TYPE']['pet'] == NULL or $GLOBALS['global']['TRANS_TYPE']['pet_sold_cash'] == NULL or $GLOBALS['global']['CHATTER_CODE']['pet_store'] == NULL) { return false; } //check if numbers are numeric if (!is_numeric($pet_uid) or !is_numeric($curval) or !is_numeric($cash) or !is_numeric($fval) or !is_numeric(getAccountUserId()) or !is_numeric($GLOBALS['global']['PET_VALUE']['tax_trans']) or !is_numeric($GLOBALS['global']['TRANS_TYPE']['pet']) or !is_numeric($GLOBALS['global']['TRANS_TYPE']['pet_sold_cash']) or !is_numeric($GLOBALS['global']['CHATTER_CODE']['pet_store'])) { return false; } return true; }
function changeTimelineOption() { //print_r($_POST); $array = array('fb_status_update', 'tt_status_update', 'fb_askme_answer', 'tt_askme_answer', 'fb_backstage_photo', 'tt_backstage_photo', 'fb_buy_pet', 'tt_buy_pet', 'fb_lock_pet', 'tt_lock_pet', 'fb_rate_video', 'tt_rate_video'); $update = array(); foreach ($array as $key) { $update[$key] = intval($this->input->post($key)); } $this->mod_io_m->update_map($update, array('id_user' => getAccountUserId()), TBL_TIMELINE_OPTION); echo json_encode(array('result' => 'ok', 'message' => 'Update successfully.')); exit; }
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?> <?php $questionArray = $this->qa_m->getUnreadQuestion(getAccountUserId()); ?> <table> <thead> <td width="50%"><?php echo language_translate('question_table_head_questions'); ?> </td> <td width="15%"><?php echo language_translate('question_table_head_askby'); ?> </td> <td width="15%"><?php echo language_translate('question_table_head_datetime'); ?> </td> <td width="10%"><?php echo language_translate('question_table_head_answer'); ?> </td> <td width="10%"><?php echo language_translate('question_table_head_delete'); ?> </td>
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } $countUnreadQuestion = count($this->qa_m->getUnreadQuestion(getAccountUserId())); $announcement = $this->db->query(" SELECT * FROM " . TBL_CONFIG . " WHERE name LIKE 'ANNOUNCEMENT' AND f_key LIKE 'content'")->result(); ?> <style> #announcement{ position:relative; } #announcement #hide{ position:absolute; right:0px;top:0px; height:10px;width:10px; } </style> <script type="text/javascript"> var FBID = "<?php echo $GLOBALS['global']['FACEBOOK']['api_key']; ?> "; $(function(){ if (sessionStorage.hideAnnouncement) { callFuncDeleteAnnouncement(); } });
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?> <script type="text/javascript" src="<?php echo site_url(); ?> /media/js/pet.js"></script> <?php $myWishList = $this->wishlist_m->fetchMyWishlist(getAccountUserId()); ?> <?php if (!($count = count($myWishList))) { ?> <p class="msg"><?php echo language_translate('left_menu_label_wishlist_msg'); ?> </p> <?php } ?> <div id="myWishListBox"> <?php foreach ($myWishList as $item) { ?> <div class="wishlist-item" id="wishLISTid_<?php echo $item->id_user;
function isDeletableCommentFeed($id_wall) { if (!($id_user = getAccountUserId())) { return false; } $rs = $this->db->query("SELECT * FROM " . TBL_WALL . " WHERE id_wall={$id_wall}")->result(); if ($rs[0]->id_user == $id_user) { return true; } else { $parent_id_wall = $rs[0]->id_parent; return $this->isMyOwnWallFeed($parent_id_wall); } }