/** * Function to edit the notification page of a user email * @param * @author : Anup * @return */ public function index() { $this->load->helper('pinterest_helper'); //get reference and reference id $referenceId = $this->session->userdata('referenceId'); $reference = $this->session->userdata('reference'); //get current email $neededValue = 'email'; $data['email'] = getUserDetails($referenceId, $reference, $neededValue); //get current email settings $this->load->model('editprofile_model'); $row = $this->editprofile_model->emailSettingDetails($data['email']); if (!empty($row)) { //assign checked or not checked foreach ($row as $key => $value) { if ($key != 'frequency' && $key != 'email') { $data[$key] = $value == 'on' ? 'checked=checked' : ''; } if ($key == 'frequency') { if ($value == 1) { $data['frequency_1'] = 'checked=checked'; $data['frequency_2'] = ''; } elseif ($value == 2) { $data['frequency_1'] = ''; $data['frequency_2'] = 'checked=checked'; } } } } else { $data['all'] = $data['group_pins'] = $data['comments'] = $data['likes'] = $data['repins'] = $data['follows'] = $data['frequency_1'] = $data['frequency_2'] = $data['digest'] = $data['news'] = ''; } $this->load->view('notifications_view', $data); }
function recruitSoldier($id) { $com = getUserDetails($id, "commander"); updateUser($id, " exp =exp+6,clicks=clicks+4"); if ($com->commander AND $com->commander == $_SESSION['isLogined']) { updateUser($com->commander, " exp =exp+3,clicks=clicks+1,uu=uu+1"); } }
function deleteUser($id) { $details = getUserDetails($id); if ($details) { $requete = 'UPDATE membre SET niveau = 10, pseudo = "Utilisateur Supprimé", mdp = "Bien essayé", civilite = NULL, nom = NULL, prenom = NULL, ddn = NULL, mail = "Bien essayé", tel = NULL, description = NULL, id_photo = NULL, id_adresse = NULL, date_derniere_connexion = NULL WHERE id = :id;'; $execution = [':id' => $id]; $removeAddress = 'DELETE FROM adresse WHERE id = :id_adresse;'; $removeMedia = 'DELETE FROM media WHERE id = :id_photo;'; if ($details["id_adresse"]) { $requete .= $removeAddress; $execution = array_merge([':id_adresse' => $details['id_adresse']], $execution); } if ($details["id_photo"]) { $requete .= $removeMedia; unlink(PHOTO_PROFIL . $details['lien_photo']); $execution = array_merge([':id_photo' => $details['id_photo']], $execution); } $bdd = new PDO(DSN, DBUSER, DBPASS); $query = $bdd->prepare($requete); if ($query->execute($execution)) { return True; } else { var_dump($query->errorInfo()); return False; } } else { return False; } }
/** * Function to change user password * @param * @author : Vishal * @since : 20-03-2012 * @return */ public function index() { $this->sitelogin->entryCheck(); $this->load->helper('pinterest_helper'); $data['title'] = 'Change password'; $data['message'] = $message = ''; $data['olderror'] = $olderror = ''; /*get reference id and reference field*/ $referenceId = $this->session->userdata('referenceId'); $reference = $this->session->userdata('reference'); //get current password $neededValue = 'password'; if ($referenceId) { $data['password'] = $password = getUserDetails($referenceId, $reference, $neededValue); } else { redirect(); } //if new passwords submit if ($_POST) { $old = $this->input->post('old_password'); $new1 = $this->input->post('new_password1'); $new2 = $this->input->post('new_password2'); //check for the old passwords matching if (md5($old) != $password) { $data['olderror'] = $olderror .= 'seems to be a wrong value'; } else { //if correct update the db table $this->load->model('editprofile_model'); $this->editprofile_model->changePassword(md5($new1), md5($old), $reference, $referenceId); $data['message'] = 'saved successfully'; } } //$this->load->view('header',$data); $this->load->view('changepassword_view', $data); }
public function get_user_details() { $user_details = getUserDetails(1); $data['user_details'] = $user_details; $this->load->view('get_user_details', $data); $this->load->view('footer'); }
function login($un = "", $pw = "", $remember = false) { if ($un != "" && $pw != "") { $session_token = login($un, $pw); if ($session_token) { $this->token = $session_token['session']; $this->userid = $session_token['uid']; $details = getUserDetails($this->userid); $this->username = $details['email']; $this->type = $details['administrator']; $this->first_name = $details['firstname']; $this->last_name = $details['lastname']; $now = time(); $timeout = 60 * 60 * 24 * 14; $to = $now + $timeout; if ($remember) { setcookie('isense_login', $this->token, $to, "/"); } else { setcookie('isense_login', $this->token, 0, "/"); } return true; } } return false; }
function userstatus() { global $helper; $loggedin = isLoggedIn(); $user = getUserDetails(); $helper->set('user', $user); return $helper->render(); }
function Login($user, $pass) { $details = getUserDetails($user); if (!is_array($details)) { return false; } if ($details['pass'] == $pass) { $_SESSION['logged'] = true; $_SESSION['details'] = $details; //echo 'logged ;)'; return true; } return false; }
function getComments($id) { require MODELES . 'membres/getUserDetails.php'; $bdd = new PDO(DSN, DBUSER, DBPASS); $query = $bdd->prepare('SELECT id,contenu, id_auteur, DAY(date_modification) AS jour, MONTH(date_modification) AS mois, YEAR(date_modification) AS annee, HOUR(date_modification) AS heure, MINUTE(date_modification) AS minute, SECOND(date_modification) AS seconde FROM message WHERE message.id_topic = :id;'); $query->execute(['id' => $id]); $comments = $query->fetchAll(PDO::FETCH_ASSOC); foreach ($comments as $key => $value) { $extraInfo = getUserDetails($comments[$key]['id_auteur']); $comments[$key]['pseudo'] = $extraInfo['pseudo']; $comments[$key]['lien'] = $extraInfo['lien_photo']; } return $comments; }
function updateFollowStatus($conn, $appid, $secret) { $startDate = trim($_GET["startDate"]); $endDate = trim($_GET["endDate"]); $query = "set names utf8"; $result = $conn->query($query); $query = "SELECT openId FROM `T_scan_information` where createdDt > '{$startDate}' and createdDt < '{$endDate}'"; $result = $conn->query($query); while ($row = $result->fetch_assoc()) { $openid = $row["openId"]; $json_obj = getUserDetails($openid, $appid, $secret); $followed = $json_obj["subscribe"]; $query = "update `T_scan_information` set followed = '{$followed}' where openId = '{$openid}'"; $conn->query($query); } }
function login() { include "user.php"; $obj = new User(); $uname = $_REQUEST['uname']; $pword = $_REQUEST['pword']; if (!$obj->getUser($uname, $pword)) { echo '{"result":0,"message": "failed to access user information"}'; } else { $row = $obj->fetch(); $_SESSION['userid'] = $row['id']; $_SESSION['username'] = $row['username']; $_SESSION['password'] = $row['password']; $_SESSION['permission'] = $row['permission']; getUserDetails(); } }
/** * Responsible for rendering the start page when you login with a SLC account * @param Integer $id Id of the SLC * @return Template of the SLC */ public function slcPage($id) { $result = getUserDetails($id); // Gets the courses $statement = $this->db->prepare('SELECT cursus_Id, cursus_Name, cursus_Code, user_Name FROM Cursus as C, User as U WHERE C.User_user_Id = U.user_Id AND C.actief = :actief'); $statement->bindValue('actief', 1); $statement->execute(); $courses = $statement->fetchAll(\PDO::FETCH_ASSOC); // Gets all the students $statement = $this->db->prepare('SELECT * FROM User'); $statement->execute(); $students = $statement->fetchAll(\PDO::FETCH_ASSOC); if (isLogged($id) && $result['Rol_rol_Id'] == 3) { echo $this->twigRenderer->renderTemplate('slc.twig', array('id' => $id, 'courses' => $courses, 'students' => $students)); } else { echo $this->twigRenderer->renderTemplate('noaccess.twig'); } }
function monProfil() { // ToDo : ajouter les options de modification // Attention : lors de la modification il faut vérifier les droits de l'utilisateur ! (car pas de vérif de privilèges dans cette page) // Rq: Il faut faire de même pour les messages privés (ou alors membres -> messages ne peut pointer QUE sur MES messages) // Pour les événents : si c'est mon profil on affiche tout, si c'est celui de qqun d'autre on affiche seulement les events publics, et les events privés auxquels je participe aussi. global $title; global $styles; global $blocks; global $contents; // On affichera les onglets : $styles = ['onglets_compte.css']; $blocks = ['onglets_compte']; $contents['ongletActif'] = 'profil'; $contents['monProfil'] = True; $title = 'Mon profil'; $details = getUserDetails($_SESSION['id']); /* echo '<pre>'; var_dump($details); echo '</pre>';*/ loadContents($details); return True; }
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "plugins.php"; if ($p_ < 2) { exit; } $id = $_GET['id']; $sql = getUserDetails($id); if ($guestsMode && $id >= 10000000) { $sql = getGuestDetails($id); } $query = mysql_query($sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysql_error(); } $user = mysql_fetch_array($query); if (function_exists('processName')) { $user['username'] = processName($user['username']); } $log = ''; $filename = 'Conversation with ' . $user['username'] . ' on ' . date('M jS Y'); $messages = array(); getChatboxData($id);
require_once '../phpInclude/dbconn.php'; require_once '../phpInclude/AdminClass.php'; $token = $_REQUEST['token'] ? $_REQUEST['token'] : ''; $others_id = $_REQUEST['others_id'] ? $_REQUEST['others_id'] : ''; $paging_enabled = $_REQUEST['paging_enabled'] ? $_REQUEST['paging_enabled'] : 0; $pageno = (int) (!isset($_REQUEST['pageno']) ? 1 : $_REQUEST['pageno']); $row_count = 10; $offset = $pageno * $row_count - $row_count; $users_details = array(); $all_posts = array(); $is_following = array(); if (!empty($token) && empty($others_id)) { $users_id = getUsersId($token); if (!empty($users_id)) { $result = getUserDetails($users_id); if ($paging_enabled) { $result1 = getAllPostsByUserwthpaging($users_id, $offset, $row_count); } else { $result1 = getAllPostsByUserwthoutpaging($users_id); } if (!empty($result)) { $success = "1"; $msg = "This is Users Profile"; $users_details = $result; if (!empty($result1)) { $all_posts = $result1; } } else { $success = "0"; $msg = "Nothing to show";
order-caricature.php" /> <area shape="poly" coords="186,105,435,122,434,150,187,148,187,120" href="<?php echo $_SERVER['HTTP_HOST']; ?> buy-caricature-gift.php" /> <area shape="poly" coords="455,112,577,122,575,153,450,149" href="<?php echo $_SERVER['HTTP_HOST']; ?> contact.php" /> </map> </div> </div> <div class="headershadow"> </div> <?php if (isloggedIn() || $getuserDetails['utype_id'] == 2) { $getuserDetails = getUserDetails($_SESSION['sess_tt_uid']); //Fetching the user details according to the userid ?> <div align="right" style="padding-right:10px;" class="header_text"> Hello <?php echo $getuserDetails['user_fname']; ?> | <a href="<?php echo $_SERVER['HTTP_HOST']; ?> aproset.php" class="header_links">Account</a> | <a href="<?php echo $_SERVER['HTTP_HOST']; ?> logout.php" class="header_links">Sign out</a> |
function getStatus() { global $response; global $userid; global $status; global $startOffline; global $processFurther; global $chromeReorderFix; if ($userid > 10000000) { $sql = getGuestDetails($userid); } else { $sql = getUserDetails($userid); } $query = mysqli_query($GLOBALS['dbh'], $sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); } $chat = mysqli_fetch_assoc($query); if (!empty($_REQUEST['callbackfn'])) { $_SESSION['cometchat']['startoffline'] = 1; } if ($startOffline == 1 && empty($_SESSION['cometchat']['startoffline'])) { $_SESSION['cometchat']['startoffline'] = 1; $chat['status'] = 'offline'; setStatus('offline'); $_SESSION['cometchat']['cometchat_sessionvars']['buddylist'] = 0; $processFurther = 0; } else { if (empty($chat['status'])) { $chat['status'] = 'available'; } else { if ($chat['status'] == 'away') { $chat['status'] = 'available'; setStatus('available'); } if ($chat['status'] == 'offline') { $processFurther = 0; $_SESSION['cometchat']['cometchat_sessionvars']['buddylist'] = 0; } } } if (empty($chat['message'])) { $chat['message'] = $status[$chat['status']]; } $chat['message'] = html_entity_decode($chat['message']); $s = array('id' => $chat['userid'], 'n' => $chat['username'], 'l' => fetchLink($chat['link']), 'a' => getAvatar($chat['userid']), 's' => $chat['status'], 'm' => $chat['message']); $response['userstatus'] = $s; }
<?php /* CONTROLEUR D'ACTION /* /****** Préparation des contenus ******/ // ===== RECUPERE LES VALEURS DEJA PRESENTES DE L'UTILISATEUR ===== require MODELES . 'membres/getUserDetails.php'; require MODELES . 'functions/google.php'; require MODELES . 'functions/date.php'; require MODELES . 'membres/updateUser.php'; require MODELES . 'functions/form.php'; if (connected()) { if ($user = getUserDetails($_SESSION['id'])) { // Si la récup BDD marche pas // exit(); } } else { alert("error", "Vous devez être connecté !"); header("Location: " . getLink(["membres", "connexion"])); exit; } // Bloc de traitement de l'adresse if (isset($user["adresse_condensee"])) { $user["adresse"] = $user["adresse_condensee"]; } elseif (isset($user["coordonnee_long"]) and isset($user["coordonnee_lat"])) { // Convertit coordonnées vers adresse $user["adresse"] = googleCoordToAddress($user['coordonnee_lat'], $user['coordonnee_long']); } // (A supprimer si je trouve pourquoi) Nettoie les -1 qui trainent en cas de suppression. foreach ($user as $key => $value) { if ($value == -1) { $value = '';
function getStatus() { global $response; global $userid; global $status; global $startOffline; global $processFurther; global $channelprefix; global $language; global $cookiePrefix; global $announcementpushchannel; global $bannedUserIDs; if ($userid > 10000000) { $sql = getGuestDetails($userid); } else { $sql = getUserDetails($userid); } $query = mysqli_query($GLOBALS['dbh'], $sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); } if (mysqli_num_rows($query) > 0) { $chat = mysqli_fetch_assoc($query); if (!empty($_REQUEST['callbackfn'])) { $_SESSION['cometchat']['startoffline'] = 1; } if ($startOffline == 1 && empty($_SESSION['cometchat']['startoffline'])) { $_SESSION['cometchat']['startoffline'] = 1; $chat['status'] = 'offline'; setStatus('offline'); $_SESSION['cometchat']['cometchat_sessionvars']['buddylist'] = 0; $processFurther = 0; } else { if (empty($chat['status'])) { $chat['status'] = 'available'; } else { if ($chat['status'] == 'away') { $chat['status'] = 'available'; setStatus('available'); } if ($chat['status'] == 'offline') { $processFurther = 0; $_SESSION['cometchat']['cometchat_sessionvars']['buddylist'] = 0; } } } if (empty($chat['message'])) { $chat['message'] = $status[$chat['status']]; } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . "announcements" . DIRECTORY_SEPARATOR . "config.php")) { include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . "announcements" . DIRECTORY_SEPARATOR . "config.php"; } $chat['message'] = html_entity_decode($chat['message']); $ccmobileauth = 0; if (!empty($_REQUEST['callbackfn']) && $_REQUEST['callbackfn'] == 'ccmobiletab') { $ccmobileauth = md5($_SESSION['basedata'] . 'cometchat'); } if (empty($chat['ch'])) { if (defined('KEY_A') && defined('KEY_B') && defined('KEY_C')) { $key = KEY_A . KEY_B . KEY_C; } $chat['ch'] = md5($chat['userid'] . $key); } $s = array('id' => $chat['userid'], 'n' => $chat['username'], 'l' => fetchLink($chat['link']), 'a' => getAvatar($chat['avatar']), 's' => $chat['status'], 'm' => $chat['message'], 'push_channel' => 'C_' . md5($channelprefix . "USER_" . $userid . BASE_URL), 'ccmobileauth' => $ccmobileauth, 'push_an_channel' => $announcementpushchannel, 'webrtc_prefix' => $channelprefix, 'ch' => $chat['ch'], 'ls' => $chat['lastseen'], 'lstn' => $chat['lastseensetting']); if (in_array($chat['userid'], $bannedUserIDs)) { $s['b'] = 1; } $response['userstatus'] = $_SESSION['cometchat']['user'] = $s; } else { if (USE_CCAUTH != 1) { $response['loggedout'] = '1'; $response['logout_message'] = $language[30]; setcookie($cookiePrefix . 'guest', '', time() - 3600, '/'); setcookie($cookiePrefix . 'state', '', time() - 3600, '/'); unset($_SESSION['cometchat']); } } }
/** * Function to check a valid user login by checking the entry in database and set the user id session if present * @param * @author : Vishal * @since : 10-04-2012 * @return */ function loginCheck() { //Fb login check $fb_data = $this->CI->session->userdata('fb_data'); $noentryMessage = "Invalid login"; if ($fb_data['uid'] && $fb_data['me'] && $fb_data['uid'] != 0 && $fb_data['uid'] != '') { $referenceId = $fb_data['uid']; $reference = 'facebook_id'; $this->CI->session->set_userdata('referenceId', $referenceId); $this->CI->session->set_userdata('reference', $reference); $login = $this->CI->login_model->getProfileDetails($referenceId, $reference); //$noentryMessage = "Your facebook doesnt have a pininterest account.Invalid login"; } elseif ($this->CI->session->userdata('twitter_userid')) { $referenceId = $this->CI->session->userdata('twitter_userid'); $reference = 'twitter_id'; $this->CI->session->set_userdata('referenceId', $referenceId); $this->CI->session->set_userdata('reference', $reference); $login = $this->CI->login_model->getProfileDetails($referenceId, $reference); //$noentryMessage = "Your twitter doesnt have a pininterest account.Invalid login"; } elseif ($this->CI->session->userdata('normal_user_email')) { $referenceId = $this->CI->session->userdata('normal_user_email'); $reference = 'email'; $this->CI->session->set_userdata('referenceId', $referenceId); $this->CI->session->set_userdata('reference', $reference); $login = $this->CI->login_model->getProfileDetails($referenceId, $reference); //$noentryMessage = "Invalid login"; } else { $noentryMessage = "Invalid login"; } //Check for logged entry in db if (isset($login)) { if ($login->verification != 'done') { $noentryMessage = "Your account is not verified.Invalid login"; $this->CI->session->set_userdata('noentry', 1); $this->CI->session->set_userdata('noentry_message', $noentryMessage); } elseif ($login->status != 1) { $noentryMessage = "Your account has been blocked.Invalid login"; $this->CI->session->set_userdata('noentry', 1); $this->CI->session->set_userdata('noentry_message', $noentryMessage); } else { //get current user id $neededValue = 'id'; $data['userid'] = getUserDetails($referenceId, $reference, $neededValue); $this->CI->session->set_userdata('login_user_id', $data['userid']); } } else { $this->CI->session->set_userdata('noentry', 1); $this->CI->session->set_userdata('noentry_message', $noentryMessage); } }
function loadChatroomPro() { global $chatrooms_language; global $language; global $embed; global $embedcss; global $userid; global $moderatorUserIDs; global $lightboxWindows; $close = 'setTimeout("window.close()",2000);'; if (!empty($_GET['embed']) && $_GET['embed'] == 'web') { $embed = 'web'; $embedcss = 'embed'; $close = 'parent.closeCCPopup("loadChatroomPro");'; } $id = $_GET['roomid']; $uid = $_GET['inviteid']; $roomname = $_GET['roomname']; $owner = $_GET['owner']; $apiAccess = $_GET['apiAccess']; $options = ""; $caller = "window.opener."; if ($apiAccess) { $options = " <input type=button class='invitebutton' onclick=javascript:window.opener.parent.jqcc.cometchat.chatWith({$uid});{$close} value='" . $chatrooms_language[43] . "' />"; if ($lightboxWindows) { $options = " <input type=button class='invitebutton' onclick=javascript:parent.jqcc.cometchat.chatWith({$uid});{$close} value='" . $chatrooms_language[43] . "' />"; $caller = "\$('#cometchat_trayicon_chatrooms_iframe,.cometchat_embed_chatrooms',parent.document)[0].contentWindow."; } } if ($owner == 1 || in_array($userid, $moderatorUserIDs)) { $sql = "select createdby from cometchat_chatrooms where id = '" . mysql_real_escape_string($id) . "' limit 1"; $query = mysql_query($sql); $room = mysql_fetch_array($query); if (!in_array($uid, $moderatorUserIDs) && $uid != $room['createdby']) { $options = "<input type=button value='" . $chatrooms_language[40] . "' onClick=javascript:" . $caller . "kickUser({$uid},0);{$close} class='invitebutton' />\n\t\t\t<input type=button value='" . $chatrooms_language[41] . "' onClick=javascript:" . $caller . "banUser({$uid},0);{$close} class='invitebutton' />" . $options; } } if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysql_error(); } $sql = getUserDetails($uid); if ($uid > 10000000) { $sql = getGuestDetails($uid); } $res = mysql_query($sql); $result = mysql_fetch_array($res); $link = fetchLink($result['link']); $avatar = getAvatar($result['avatar']); if ($link != '' && $uid < 10000000) { $options .= " <input type=button class='invitebutton' onClick=javascript:window.open('" . $link . "');" . $close . " value='" . $chatrooms_language[42] . "' />"; } echo <<<EOD <!DOCTYPE html> <html> \t<head> \t\t<title>{$result['username']}</title> \t\t<meta http-equiv="content-type" content="text/html; charset=utf-8"/> \t\t<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> \t\t<link type="text/css" rel="stylesheet" media="all" href="../../css.php?type=module&name=chatrooms" /> \t</head> \t<body> \t\t<form method="post"> \t\t\t<div class="container"> \t\t\t\t<div class="container_title {$embedcss}">{$result['username']}</div>\t \t\t\t\t<div class="chatroom_avatar"><img src="{$avatar}" height="50px" width="50px" /></div> \t\t\t\t<div class="control_buttons">{$options}</div>\t \t\t\t</div> \t\t</form> \t</body> </html> EOD; }
echo $projectCases->project_name; ?> </a></td> <td><?php echo $projectCases->case_type; ?> </td> <td><?php echo $projectCases->case_reason; ?> </td> <td><a href="<?php echo admin_url('users/userDetails/' . $projectCases->user_id); ?> "><?php echo getUserDetails($projectCases->user_id, 'user_name'); ?> </a></td> <td> <a href="<?php echo admin_url('projectCases/view/' . $projectCases->id); ?> "><?php echo $this->lang->line('view'); ?> </a></td> </tr> <?php } //Foreach End }
echo "<div style='background:white;padding:15px;'>Please ask your administrator to configure this plugin using administration panel.</div>"; exit; } $sql = "update cometchat_chatrooms set vidsession = '" . mysqli_real_escape_string($GLOBALS['dbh'], $newsessionid) . "' where id = '" . mysqli_real_escape_string($GLOBALS['dbh'], $grp) . "'"; $query = mysqli_query($GLOBALS['dbh'], $sql); $grp = $newsessionid; } else { $grp = $chatroom['vidsession']; } if (empty($_REQUEST['join'])) { sendChatroomMessage($grporg, $broadcast_language[9] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccbroadcast.join('" . $grporg . "');\">" . $broadcast_language[10] . "</a>", 0); } $avchat_token = $apiObj->generateToken($grp); } $name = ""; $sql = getUserDetails($userid); if ($guestsMode && $userid >= 10000000) { $sql = getGuestDetails($userid); } $result = mysqli_query($GLOBALS['dbh'], $sql); if ($row = mysqli_fetch_assoc($result)) { if (function_exists('processName')) { $row['username'] = processName($row['username']); } $name = $row['username']; } $name = urlencode($name); $baseUrl = BASE_URL; $embed = ''; $embedcss = ''; $resize = 'window.resizeTo(';
require $root . '../../database.php'; $permission = loginCheck($session); include 'head.php'; head('Film Night Settings'); ?> <body> <?php include 'top-nav.php'; ?> <div id="container"> <?php if ($permission != FALSE) { ?> <script>window.onload = function() { closeClapper(); setTimeout(shrinkHeader, 500); };</script> <?php $details = getUserDetails($_SESSION['ID']); if ($details != "Error") { $rollCall = $details['Attending']; $attending = $details['Reminder_Attending']; $voting = $details['Reminder_Voting']; $results = $details['Reminder_Results']; $email = $details['Email']; $voting30 = $details['Reminder_Voting30']; $voting60 = $details['Reminder_Voting60']; $attendingNotification = $details['Notification_Attending']; $votingNotification = $details['Notification_Voting']; $resultsNotification = $details['Notification_Results']; $voting30Notification = $details['Notification_Voting30']; $voting60Notification = $details['Notification_Voting60']; } else { $SESSION['ERROR'] = "settings.php failed to retreive user details for user " . $_SESSION['ID'];
<?php include "includes/configuration.php"; include "includes/functions/encryption.php"; $shoform = true; @($encrypt_obj = new AzDGCrypt(1074)); $user_id = $_SESSION['sess_tt_uid']; //Fetching the userid $getuserDetails = getUserDetails($user_id); //Fetching the user details according to the userid $res = mysql_query("SELECT * FROM `toon_users` where user_id='{$user_id}'"); $row = mysql_fetch_array($res); $user = $_REQUEST['artist']; $product_id = $_REQUEST['product']; $change_proid = $_POST['change_proid1']; /*if($change_proid) { $pro_priority1=$_POST['pro'.$change_proid]; $query1= "UPDATE `toon_products` SET `product_priority`='$pro_priority1' WHERE `product_id`='$change_proid' AND `product_delete`=0"; $result1 = mysql_query($query1); }*/ if ($product_id) { $del_query = "UPDATE `toon_products` SET `product_delete` = '1' where product_id='{$product_id}'"; mysql_query($del_query); } $artist_name = mysql_fetch_assoc(mysql_query("SELECT `user_fname` FROM `toon_users` WHERE `user_id`='{$user}'")); $sql_product = "SELECT * FROM `toon_products` WHERE `user_id`='{$user}' AND `product_delete`=0"; $rs_product = mysql_query($sql_product); $count = mysql_query("SELECT COUNT( * ) as count FROM `toon_products` WHERE `user_id` ='{$user}' AND `product_delete`=0 GROUP BY `user_id` ORDER BY `product_priority` ASC"); $artistpdt_count = mysql_fetch_assoc($count); if ($getuserDetails['utype_id'] == 2) {
<?php include "includes/configuration.php"; include 'includes/imageResize.php'; if (!isloggedIn()) { header('Location:alogin.php'); exit; } $userDetails = getUserDetails(); $status = $_REQUEST['status']; $proof_id = $_REQUEST['proof_id']; if ($proof_id != "" && $status == 'approved') { $proof_table = mysql_query("SELECT * FROM `toon_proofs` where `proof_id`='{$proof_id}'"); $proof_details = mysql_fetch_array($proof_table); $proof_img = $proof_details['proof_image']; $proof_opro_id = $proof_details['opro_id']; $order_products_table = mysql_query("SELECT * FROM `toon_order_products` where `opro_id`='{$proof_opro_id}'"); $order_products_details = mysql_fetch_array($order_products_table); $order_products_id = $order_products_details['order_id']; $update_toon_orders = mysql_query("UPDATE `toon_orders` SET `order_status` = 'Completed',`order_completed_date`=NOW() WHERE `order_id`='{$order_products_id}'"); //mail $sql_content = mysql_query("SELECT \n\t\t\tT.*, \n\t\t\tTP.`product_title`,\n\t\t\tTP.`product_turnaroundtime`, \n\t\t\tTA.`user_fname` AS `artist_fname`, \n\t\t\tTA.`user_lname` AS `artist_lname`, \n\t\t\tTC.`user_fname` AS `cust_fname`, \n\t\t\tTC.`user_lname` AS `cust_lname` \n\t\tFROM `toon_orders` T,`toon_products` TP,`toon_users`TA ,`toon_users`TC \n\t\tWHERE T.`order_id` = {$order_products_id}\n\t\t\tAND T.`product_id` = TP.`product_id` \n\t\t\tAND T.user_id = TC.user_id \n\t\t\tAND T.artist_id = TA.user_id"); $sql_details = mysql_fetch_array($sql_content); $order_date = strtotime($sql_details['order_date']); $deadline = $order_date + $sql_details['product_turnaroundtime'] * 24 * 60 * 60; $wholesale_price = number_format($sql_details['order_wholesale_price'], 2, '.', ','); $to = $_CONFIG['email_contact_us']; $subject = "Order ID {$order_products_id} Toon Accepted"; $from = $_CONFIG['site_name'] . "< " . $_CONFIG['email_outgoing'] . " >"; $header = "From: " . $from . "\n"; $header .= "MIME-Verson: 1.1\n";
<th width="16%" align="right" class="subh">Enemy Damage</th> <th width="14%" align="right" class="subh">Your Damage</th> <th width="9%" align="center" class="subh">Report</th> </tr> <? if (!$cgi['page2']) { $cgi['page2'] = 1; } $atackA2 = getAttackByAttacker($user->ID, $cgi['page2']); for ($i = 0;$i < count($atackA2);$i++) { ?> <tr> <td colspan="2" align="right"><? echo vDate($atackA2[$i]->time); ?></td> <td align="left"> <? $tus = getUserDetails($atackA2[$i]->toUserID, "userName,active"); if ($tus->active == 1) { echo "<a href='stats.php?id={$atackA2[$i]->toUserID}'>" . $tus->userName . "</a>"; } else { echo "{" . $tus->userName . "}"; } ?> </td> <td align="right"> <? if ($atackA2[$i]->type == 1) { echo "<b>Nuke</b>"; } else { if ($atackA2[$i]->attackStrength > $atackA2[$i]->defStrength) { numecho($atackA2[$i]->gold); echo " Gold stolen";
*/ include_once dirname(__FILE__) . "/cometchat_init.php"; $response = array(); $messages = array(); $status['available'] = $language[30]; $status['busy'] = $language[31]; $status['offline'] = $language[32]; $status['invisible'] = $language[33]; $status['away'] = $language[34]; if (!empty($_REQUEST['userid'])) { $fetchid = $_REQUEST['userid']; } else { $fetchid = $userid; } $time = getTimeStamp(); $sql = getUserDetails($fetchid); if ($guestsMode && $fetchid >= 10000000) { $sql = getGuestDetails($fetchid); } $query = mysql_query($sql); if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysql_error(); } $chat = mysql_fetch_array($query); if ($time - processTime($chat['lastactivity']) < ONLINE_TIMEOUT && $chat['status'] != 'invisible' && $chat['status'] != 'offline') { if ($chat['status'] != 'busy' && $chat['status'] != 'away') { $chat['status'] = 'available'; } } else { $chat['status'] = 'offline'; }
function sendmessage() { if (!empty($_REQUEST['token']) && $_REQUEST['token'] == $_SESSION['token']) { } else { echo "CSRF attack detected. Halting request."; exit; } global $userid; global $db; global $cookiePrefix; if (!empty($_POST['message']) && !empty($_POST['currentroom'])) { $to = $_POST['currentroom']; $message = $_POST['message']; $sql = "update cometchat_chatrooms set lastactivity = '" . getTimeStamp() . "' where id = '" . mysql_real_escape_string($to) . "'"; $query = mysql_query($sql); $styleStart = ''; $styleEnd = ''; if (!empty($_COOKIE[$cookiePrefix . 'chatroomcolor']) && preg_match('/^[a-f0-9]{6}$/i', $_COOKIE[$cookiePrefix . 'chatroomcolor'])) { $styleStart = '<span style="color:#' . $_COOKIE[$cookiePrefix . 'chatroomcolor'] . '">'; $styleEnd = '</span>'; } if (USE_COMET == 1 && COMET_CHATROOMS == 1) { $comet = new Comet(KEY_A, KEY_B); if (empty($_SESSION['cometchat']['username'])) { $name = ''; $sql = getUserDetails($userid); $result = mysql_query($sql); if ($row = mysql_fetch_array($result)) { if (function_exists('processName')) { $row['username'] = processName($row['username']); } $name = $row['username']; } $_SESSION['cometchat']['username'] = $name; } else { $name = $_SESSION['cometchat']['username']; } if (!empty($name)) { $info = $comet->publish(array('channel' => md5('chatroom_' . $to . KEY_A . KEY_B . KEY_C), 'message' => array("from" => $name, "message" => $styleStart . sanitize($message) . $styleEnd, "sent" => getTimeStamp()))); } $insertedid = getTimeStamp() . rand(0, 1000000); } else { $sql = "insert into cometchat_chatroommessages (userid,chatroomid,message,sent) values ('" . mysql_real_escape_string($userid) . "', '" . mysql_real_escape_string($to) . "','" . $styleStart . mysql_real_escape_string(sanitize($message)) . $styleEnd . "','" . getTimeStamp() . "')"; $query = mysql_query($sql); $insertedid = mysql_insert_id(); } echo $insertedid; exit; } }
$membre = getMembre($id); $contents['pseudo'] = $membre['pseudo']; $contents['id_auteur'] = $membre['id_auteur']; $images = getImages($membre['id_auteur']); $contents['lien'] = $images['lien']; $contents['id_auteur'] = $membre['id_auteur']; $nombre = getNombre($contents['id_auteur']); $contents['COUNT(*)'] = $nombre['COUNT(*)']; // FIN INFO TOPIC // INFO REPONSES $comments = getComments($id); $contents['comments'] = $comments; // FIN INFO REPONSES if (connected()) { $id_user = $_SESSION['id']; $userDetails = getUserDetails($id_user)['pseudo']; $contents['pseudo1'] = $userDetails; $userImage = getImages($id_user); $contents['lien1'] = $userImage['lien']; } /**** Préparation de la vue ****/ $title = $titre['titre']; $styles = ['forum.css', 'search.css']; /**** Affichage de la page ****/ //Appel de la vue : if (empty($_POST)) { // Le formulaire n'a pas été rempli vue(['sujet'], $styles, $title, $contents); } else { if ($_POST['contenu']) { if (connected()) {