public function addPost() { $category = Category::all(); $details = get_user_details(Auth::user()->id); $publisher_test = Publisher::count(); $publishers = Publisher::orderBy('name', 'ASC')->get(); return View::make('contributor.addPost')->with('title', "Posts Management")->with('page', "posts")->with('details', $details)->with('publishers', $publishers)->with('publisher_test', $publisher_test)->with('category', $category); }
public function addPost() { $category = Category::all(); $details = get_user_details(Auth::user()->id); $authors = User::where('is_activated', 1)->get(); $publisher_test = Publisher::count(); $publishers = Publisher::orderBy('name', 'ASC')->get(); return View::make('moderate.addPost')->with('title', "Posts Management")->with('page', "posts")->with('details', $details)->with('category', $category)->with('publishers', $publishers)->with('publisher_test', $publisher_test)->with('authors', $authors); }
function initiate() { include ABSPATH . 'applist.php'; set_connection(); // Start the Database Connection get_user_details(); // Get the User Record from the DB load_applications($all_apps); // Load App List for the User initiate_email(); }
function initiate() { if (isset($_GET['fetch'])) { require_once ABSCPATH . 'modules/citizens/fetch.php'; } //Fetch Initial User Data include ABSCPATH . 'applist.php'; load_applications($all_apps); // Load App List for the User set_connection(); // Start the Database Connection get_user_details(); // Get the User Details initiate_email(); }
private function load_profile_page($file = false) { if (!$file) { return false; } global $wp_query, $wpdb; //$vars['uname'] = FU_USERNAME; if ($wp_query->query_vars['username']) { //error_log('i should be here.'); $vars['user'] = get_user_details($wp_query->query_vars['username']); } else { global $current_user; $vars['user'] = $current_user; } // Something about redirecting if $vars['user'] not set. // Votes by user the votes you've made. $vars['votes'] = $wpdb->get_results($wpdb->prepare("SELECT \n\t\t\t\tCOUNT(id) AS total_votes,\n\t\t\t\tSUM(rating) AS positive_votes\n\t\t\tFROM {$this->tutable}\n\t\t\tWHERE user_id=%d\n\t\t\tGROUP BY id", $vars['user']->ID)); // Reputation $vars['reputation'] = $this->get_reputation_data($vars['user']->ID); // articles submitted $vars['posts'] = $this->get_posts_for_user($vars['user']->ID); // Activity $vars['activity'] = $this->parse_activity($wpdb->get_results($wpdb->prepare("SELECT * FROM " . $this->tables['activity'] . "\n\t\t\tWHERE user_id=%d ORDER BY date DESC LIMIT 30", $vars['user']->ID))); $filename = FU_PLUGIN_DIR_PATH . $file; if (is_file($filename)) { ob_start(); extract((array) $vars); include $filename; $contents = ob_get_contents(); ob_end_clean(); return $contents; } return false; }
<title>Sprint Editor</title> <link rel="stylesheet" href="editor.css"> <script src="/js/jquery.js"></script> <script src="/js/materialize.js"></script> <script src="js/knockout.js"></script> <script> var user = { name: <?php echo json_encode(@$_SESSION['username']); ?> , id: <?php echo json_encode(@get_user_details(@$_SESSION['username'])['name']); ?> }; </script> </head> <body> <nav data-bind="foreach: nav"> <a data-bind="text: $data.name, click: $data.click"></a> </nav> <main class="row"> <div class="col s6"> username: <span data-bind="text: user.name"></span><br> userid: <span data-bind="text: user.id"></span><br> </div>
if (isset($_POST['ajax_action'])) { switch ($_POST['ajax_action']) { // query for all users in // the db case "get_users": get_user_list($user_list); $xml = generate_object_list_xml($user_list, ""); echo $xml; break; // the caller wishes get details // about a user // the caller wishes get details // about a user case "get_user_details": $uid = $_POST['ajax_uid']; $xml = get_user_details($uid); echo $xml; break; // the caller wishes to update // attributes associated with // a user // the caller wishes to update // attributes associated with // a user case "update_user": $uid = $_POST['ajax_uid']; $fname = $_POST['ajax_fname']; $lname = $_POST['ajax_lname']; $email = $_POST['ajax_email']; $active = $_POST['ajax_active']; $new_passwd = "";
$settings .= 'uc_name["' . $unfocus_chat[$i] . '"] = "' . $db->escape_string(strip_tags($chat['username'])) . '";'; $settings .= 'uc_status["' . $unfocus_chat[$i] . '"] = "' . $chat['status'] . '";'; $settings .= 'uc_avatar["' . $unfocus_chat[$i] . '"] = "' . $avatar . '";'; $settings .= 'uc_link["' . $unfocus_chat[$i] . '"] = "' . $link . '";'; $double_check[] = $unfocus_chat[$i]; } } // Get the logged in user's avatar if (check_if_guest($userid)) { $user_username = create_guest_username($userid, $guest_name); $user_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif"; $user_is_guest = 1; } else { $user_is_guest = 0; $user_username = get_username($userid); $sql = get_user_details($userid); $result = $db->execute($sql); if ($result and $db->count_select() > 0) { $row = $db->fetch_array($result); $user_avatar = $row['avatar']; $user_avatar = get_avatar($user_avatar, $userid); } else { $user_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif"; } } $num_mod_reports = 0; if ($is_admin == 1) { $is_mod = 1; } if ($is_admin == 1 or $is_mod == 1) { $result = $db->execute("\n\t\t\t\tSELECT COUNT(id)\n\t\t\t\tFROM arrowchat_reports\n\t\t\t\tWHERE (working_time < (" . time() . " - 600)\n\t\t\t\t\t\t\tOR working_by = '" . $db->escape_string($userid) . "')\n\t\t\t\t\tAND completed_time = 0\n\t\t\t");
require_once '../config.php'; require_once '../Db.php'; require_once '../Banking.php'; require_once '../functions.php'; require_once 'Banklink.php'; session_start(); if (isset($_POST) && empty($_SESSION["authenticated"]) || $_SESSION["authenticated"] != 'true') { if (array_key_exists('username', $_POST) && array_key_exists('password', $_POST)) { if (login_auth($_POST['username'], $_POST['password'])) { $user_details = get_user_details($_POST['username']); $_SESSION["authenticated"] = 'true'; $_SESSION["username"] = $_POST['username']; unset($_POST['username']); unset($_POST['password']); $user_details = get_user_details($_SESSION["username"]); $_SESSION['owner_name'] = $user_details['owner_name']; $_SESSION['account_number'] = $user_details['account_number']; $_SESSION['available_funds'] = $user_details['amount']; } else { $_SESSION["failed"] = 'true'; header('Location:login.php'); exit; } } } if (!empty($_SESSION["authenticated"]) && $_SESSION["authenticated"]) { if (array_key_exists('confirm', $_POST)) { $transfer = Banking::tranfer($_SESSION['account_number'], $_SESSION['beneficiary_account'], $_SESSION['amount'], $_SESSION['description']); if ($transfer === 'Your payment is made') { $_SESSION['confirmed'] = $transfer;
<div class="module_content"> <div class="subtitle">Current Administrators</div> <div class="subExplain"><i>Administrators have the same access that moderators have as well as additional options available.</i></div> <h2 class="subHeading">Administrators</h2> <ol class="scrollable"> <?php $result = $db->execute("\n\t\t\tSELECT arrowchat_status.userid userid\n\t\t\tFROM arrowchat_status\n\t\t\tWHERE arrowchat_status.is_admin = 1\n\t\t\tORDER BY arrowchat_status.userid ASC\n\t\t"); if ($result and $db->count_select() > 0) { while ($row = $db->fetch_array($result)) { if (check_if_guest($row['userid'])) { $mod_username = create_guest_username($row['userid'], '', true); if (empty($mod_username)) { $mod_username = create_guest_username($row['userid'], '', false); } } else { $sql = get_user_details($row['userid']); $result2 = $db->execute($sql); if ($result2 and $db->count_select() > 0) { $row = $db->fetch_array($result2); $mod_username = $row['username']; } } ?> <li class="listItem"> <a href="users.php?do=view&id=<?php echo $row['userid']; ?> " class="secondaryContent">Edit</a> <a href="users.php?do=logs&id=<?php echo $row['userid']; ?>
} echo "1"; close_session(); exit(0); } // ####################### START POST SILENCE USER ########################## if (var_check('chatroom_silence')) { $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t"); if ($result and $db->count_select() > 0 and is_numeric($chatroom_silence_length)) { if (check_if_guest($chatroom_silence)) { $silence_username = create_guest_username($chatroom_silence, '', true); if (empty($silence_username)) { $silence_username = create_guest_username($chatroom_silence, '', false); } } else { $sql = get_user_details($chatroom_silence); $result = $db->execute($sql); if ($result and $db->count_select() > 0) { $row = $db->fetch_array($result); $silence_username = $row['username']; } } $silence_message = $silence_username . $language[163] . $db->escape_string(strip_tags(get_username($userid))) . "."; $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_messages (\n\t\t\t\t\tchatroom_id,\n\t\t\t\t\tuser_id,\n\t\t\t\t\tusername,\n\t\t\t\t\tmessage,\n\t\t\t\t\tglobal_message,\n\t\t\t\t\tsent\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "', \n\t\t\t\t\t'" . $db->escape_string($userid) . "', \n\t\t\t\t\t'Global',\n\t\t\t\t\t'" . $silence_message . "',\n\t\t\t\t\t'1',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t)\n\t\t\t"); if ($push_on == 1) { $arrowpush->publish(array('channel' => 'chatroom' . $chatroom_id, 'message' => array('chatroommessage' => array("id" => $db->last_insert_id(), "name" => 'Global', "message" => $silence_message, "userid" => $userid, "sent" => time(), "global" => '1')))); } // Max silence time is 300 seconds (5 minutes) if ($chatroom_silence_length > 300) { $chatroom_silence_length = 300; }
$_SESSION['enddate'] = $_POST['enddate']; } elseif (!isset($_SESSION['enddate'])) { $_SESSION['enddate'] = "+7 days"; } $enddate = $_SESSION['enddate']; ########################## $athlete_id = $_SESSION['athlete_id']; // Check whether the user is requesting to view a different athlete's log // and check whether he has permission. Some functions request this // via GET, others by POST so check both. POST gets priority. if (isset($_POST['athlete_id']) && check_share_permission($_POST['athlete_id'], "view log {$athlete_id}")) { $athlete_id = $_POST['athlete_id']; } elseif (isset($_GET['shareid']) && check_share_permission($_GET['shareid'], "view log {$athlete_id}")) { $athlete_id = $_GET['shareid']; } $athlete_details = get_user_details($athlete_id); ######################## # Display HTML headers ######################## include_once "log_display_functions.php"; include_once "validation/validate_date.php"; include_once "menubar.php"; // Only send the IE Quirks mode header if this is ie, else hidden stuff will not reveal in FFox $browser = $_SERVER['HTTP_USER_AGENT']; if (preg_match("/MSIE/", $browser)) { echo <<<ENDHTML <!-- Internet Explorer has to be in quirks mode, this comment just does that --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> ENDHTML; }
/** * This display the list of subscriptions of user. * Uses "subscriptions/user.html" for output. * * Following things are assigned: * {$classes} - List classes * {$attributes} - List attributes * * @author Fawaz Tahir <*****@*****.**> * @global object $userquery * @param int $userid * @return string */ function display_subscriptions_list($userid = null) { global $userquery; if (is_null($userid)) { $userid = $userquery->udetails ? $userquery->udetails : userid(); } if ($userid) { if (is_numeric($userid)) { $user = get_user_details($userid); } else { $user = $userid; } } if (!$user) { return false; } if (!has_subscriptions($user)) { return false; } $subscriptions = get_user_subscriptions($userid); if ($subscriptions) { end($subscriptions); $last_index = key($subscriptions); reset($subscriptions); $first_index = key($subscriptions); foreach ($subscriptions as $key => $subscription) { $params['file'] = 'subscriptions/user.html'; $params['user'] = $subscription; $params['classes'] = 'subscription-user' . ($key == $first_index ? " subscription-user-first" : "") . ($key == $last_index ? " subscription-user-last" : ""); $params['attributes'] = ' data-subscription-id="' . $subscription['subscription_id'] . '" data-userid="' . $subscription['subscribed_to'] . '" '; if (is_active_subscription($subscription)) { $params['classes'] .= " active active-subscription "; } $output .= fetch_template_file($params); } return $output; } else { return false; } }
/** * * @global type $cbgroup * @param type $array * @return type */ function add_feed($array) { global $userquery; $group_id = $array['group_id']; if (!$group_id) { return false; } $group = $array['group']; if (!$group) { $group = $this->get_group_details($group_id); } if (!$group) { return false; } $userid = $array['userid']; if (!$userid) { if (userid()) { $userid = userid(); $user = $userquery->udetails; } } if (!$userid) { return false; } if (!$user) { $user = $array['user']; } if (!$user) { $user = get_user_details($user); } if (!$user) { return false; } if ($array['message']) { $message = apply_filters($array['message'], 'feed_message'); } if ($array['type']) { $type = $array['type']; } else { $type = 'message'; } $content_id = ''; $content = ''; $content_type = ''; if ($array['content_id']) { $content_id = $array['content_id']; $content = $array['content']; $content_type = $array['content_type']; } $action = $array['action']; if ($array['icon']) { $icon = $array['icon']; } else { $icon = ''; } if ($array['action_group_id']) { $action_group_id = $array['action_group_id']; } $array = array('message' => $message, 'message_attributes' => array(), 'userid' => userid(), 'user' => $userquery->udetails, 'content_id' => $content_id, 'content' => $content, 'content_type' => $content_type, 'object_id' => $group_id, 'object' => $group, 'object_type' => 'group', 'action_group_id' => $action_group_id, 'action' => $action, 'icon' => $icon); global $cbfeeds; $cbfeeds->add_feed($array); }
} // ################### START POST REMOVE MODERATOR ####################### if (var_check('chatroom_remove_mod')) { $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t"); if ($result and $db->count_select() > 0) { $db->execute("\n\t\t\t\tUPDATE arrowchat_chatroom_users \n\t\t\t\tSET is_mod = '0' \n\t\t\t\tWHERE user_id = '" . $db->escape_string($chatroom_remove_mod) . "'\n\t\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t"); } echo "1"; close_session(); exit(0); } // ####################### START POST BAN USER ########################## if (var_check('chatroom_ban')) { $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t"); if ($result and $db->count_select() > 0) { $sql = get_user_details($chatroom_ban); $result = $db->execute($sql); if ($result and $db->count_select() > 0) { $row = $db->fetch_array($result); $ban_username = $row['username']; } $ban_message = $ban_username . $language[107] . $db->escape_string(strip_tags(get_username($userid))) . "."; $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_messages (\n\t\t\t\t\tchatroom_id,\n\t\t\t\t\tuser_id,\n\t\t\t\t\tusername,\n\t\t\t\t\tmessage,\n\t\t\t\t\tglobal_message,\n\t\t\t\t\tsent\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "', \n\t\t\t\t\t'" . $db->escape_string($userid) . "', \n\t\t\t\t\t'Global',\n\t\t\t\t\t'" . $ban_message . "',\n\t\t\t\t\t'1',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t)\n\t\t\t"); if ($push_on == 1) { $pubnub->publish(array('channel' => 'chatroom' . $chatroom_id, 'message' => array('chatroommessage' => array("id" => $db->last_insert_id(), "name" => 'Global', "message" => $ban_message, "userid" => $userid, "sent" => time(), "global" => '1')))); } $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_banlist (\n\t\t\t\t\tuser_id, \n\t\t\t\t\tchatroom_id, \n\t\t\t\t\tban_length, \n\t\t\t\t\tban_time\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_ban) . "',\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "',\n\t\t\t\t\t'" . $db->escape_string($chatroom_ban_length) . "',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t) \n\t\t\t\tON DUPLICATE KEY \n\t\t\t\t\tUPDATE ban_length = '" . $db->escape_string($chatroom_ban_length) . "', ban_time = '" . time() . "'\n\t\t\t"); $db->execute("\n\t\t\t\tUPDATE arrowchat_chatroom_users \n\t\t\t\tSET session_time = '0'\n\t\t\t\tWHERE user_id = '" . $db->escape_string($chatroom_ban) . "'\n\t\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t"); } echo "1"; close_session();
search_users_filter(); break; case 'new_user': new_user(); break; case 'save_user': save_user(); break; case 'save_user_pass': save_user_pass(); break; case 'delete_user': delete_user(); break; case 'get_user_details': get_user_details(); break; case 'get_user_image': get_user_image(); break; case 'get_user_cert': get_user_cert(); break; case 'get_logo_image': get_logo_image(); break; case 'get_store_image': get_store_image(); break;
} elseif ($user->role_id == 3) { if ($post->is_approved == 0) { echo "Contributor<br> <em>(Waiting for Approval)</em>"; } else { echo "Contributor"; } } else { echo "Admin"; } } else { echo ""; } ?> </td> <td><?php $user = get_user_details($post->user_id); if ($user) { echo $user->author_name; } ?> </td> <td style="width: 297px;"> @if($post->is_approved != 0) <a title="Un Publish" class="btn ink-reaction btn-floating-action btn-warning" href="{{route('adminPostDecline', array('id' => $post->id))}}"><i class="fa fa-times"></i></a> @else <a title="Publish" class="btn ink-reaction btn-floating-action btn-primary" href="{{route('adminPostActivate', array('id' => $post->id))}}"><i class="fa fa-check"></i></a> @endif <!-- <a class="btn ink-reaction btn-floating-action btn-info" href="{{route('sendPush')}}"><i class="fa fa-paper-plane"></i></a> --> <!-- <a class="btn ink-reaction btn-floating-action btn-info" href="{{route('adminAddPost')}}"><i class="fa fa-plus"></i></a> --> <a title="Edit Post" class="btn ink-reaction btn-floating-action btn-info" href="{{route('adminEditPost', array('id' => $post->id))}}"><i class="fa fa-edit"></i></a> <a target="_blank" title="View Post" class="btn ink-reaction btn-floating-action btn-info" href="{{route('adminViewPost', array('id' => $post->share_cat,'data' => $post->link))}}"><i class="fa fa-eye"></i></a>
public function editPost($id) { $check_con = 0; $category = Category::all(); $post = Post::find($id); $check_role = get_user_details($post->user_id); if ($check_role->role_id == 3 && $post->is_approved == 0) { $check_con = 1; } $authors = User::where('is_activated', 1)->get(); $cate = explode(',', $post->category); return View::make('admin.editPost')->with('title', "Posts Management")->with('page', "posts")->with('authors', $authors)->with('contributor', $check_con)->with('category', $category)->with('post', $post)->with('cate', $cate); }
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/../includes/base.php"; if (!is_logged_in()) { http_response_code(307); header("Location: /login"); } $id = get_user_id(); $user = get_user_details($id); if ($user === null) { http_response_code(409); header("Location: /error/409/no-user"); } ?> <!DOCTYPE html> <html> <head> <?php include $_SERVER["DOCUMENT_ROOT"] . "/../includes/content.head.php"; ?> <title><?php echo get_config_value("site", "title"); ?> </title> </head> <body> <div class="component-left"> <div class="container container-center"> <?php include $_SERVER["DOCUMENT_ROOT"] . "/../includes/content.sidebar_left.php"; ?>
if ($newpassword != $repeatpassword) { $user = get_user_details($_SESSION['user_id']); $message = 'The new passwords did not match'; include 'accountManagement.php'; } else { $result = change_password($user_id, $oldpassword, $newpassword); if ($result == 'error') { $user = get_user_details($_SESSION['user_id']); $message = 'An error occurred while attempting to change your password'; include 'accountManagement.php'; } elseif ($result == 'password') { $user = get_user_details($_SESSION['user_id']); $message = 'That Password did not match your current password'; include 'accountManagement.php'; } elseif ($result == 'success') { $user = get_user_details($_SESSION['user_id']); $message = 'Password changed'; include 'accountManagement.php'; } } } break; case 'collection': $collection_id = filter_input(INPUT_GET, 'collectionid', FILTER_VALIDATE_INT); if ($collection_id == NULL || $collection_id == FALSE) { $message = 'That Collection doesnt exist'; include 'home.php'; } else { $collection = get_collection($collection_id); $ownerinfo = get_owner($collection_id); $editview = filter_input(INPUT_GET, 'editview', FILTER_VALIDATE_BOOLEAN);
public function addPost() { $category = Category::all(); $details = get_user_details(Auth::user()->id); return View::make('moderate.addPost')->with('title', "Posts Management")->with('page', "posts")->with('details', $details)->with('category', $category); }
$continue = false; } } if ($continue === true) { $javascript = '<script>$( document ).ready( function(){ cb_confirm( "' . $heading . '","' . $body . '",function(){ window.location="' . $url . '" }) } )</script>'; register_anchor($javascript, 'cb_head'); } } } } if ($confirm == 2) { $subscribe = get('subscribe'); $unsubscribe = get('unsubscribe'); if ($subscribe || $unsubscribe) { $sub_id = get('owner'); $sub = get_user_details($sub_id); if ($sub) { $is_subscribed = is_user_subscribed($sub['userid']); if ($subscribe and !$is_subscribed) { subscribe_user($sub_id); } else { if ($unsubscribe and $is_subscribed) { unsubscribe_user($sub_id); } } if (!error()) { $success = true; } if ($success) { redirect_to(BASEURL . '/manage_subscriptions.php'); }
echo "Invalid Mobile Number<br/>"; } else { update_user($user_id, 'FirstName', $firstname); update_user($user_id, 'LastName', $lastname); update_user($user_id, 'Address', $address); update_user($user_id, 'Gender', $gender); update_user($user_id, 'Mobile', $mobile); } } } } } ?> <?php $student = get_user_details($_SESSION['user_id']); $fakes = array(); $fakes['Password'] = true; $fakes['ID'] = true; $fakes['AccountType'] = true; $fakes['Username'] = true; $fakes['Email'] = true; ?> <html> <head> <title>Edit Profile</title> </head> <body> <form name = "editprofile_form" method = "post">
$bind_pwd = $xerte_toolkits_site->bind_pwd; $basedn = $xerte_toolkits_site->basedn; $bind_dn = $xerte_toolkits_site->bind_dn; $result = authenticate_to_host($host, $port, $bind_pwd, $basedn, $bind_dn, $username, $password, $xerte_toolkits_site); if ($result) { receive_message($username, "USER", "SUCCESS", "Logging in succeeded for " . $username, "Logging in succeeded for " . $username); return $result; } else { receive_message($username, "USER", "CRITICAL", "Login failed for " . $username, "Login failed for " . $username); return $result; } } } else { while ($host = mysql_fetch_array($ldap_hosts)) { $result = authenticate_to_host($host['ldap_host'], $host['ldap_port'], $host['ldap_password'], $host['ldap_username'], $host['ldap_basedn'], $host['ldap_filter'], $host['ldap_filter_attr'], $username, $password, $xerte_toolkits_site); if ($result[0]) { return true; } } } return false; } require "../config.php"; if (valid_login($_POST['username'], $_POST['password'], $xerte_toolkits_site)) { echo "Logging in worked"; } else { echo "Logging in failed"; } $data = get_user_details($_POST['username'], $_POST['password']); echo "<p>Getting LDAP record for user - to work with Toolkits - [sn][0] should the surname and [givenname][0] should be the first name<pre>"; print_r($data[1][0]);
} else { $sql = get_user_details($fetchid); $result3 = $db->execute($sql); $user = $db->fetch_array($result3); $from_name = $user['username']; $from_avatar = get_avatar($user['avatar'], $fetchid); } $fetchid = $row['report_about']; if (check_if_guest($fetchid)) { $sql = get_guest_details($fetchid); $result2 = $db->execute($sql); $user = $db->fetch_array($result2); $about_name = create_guest_username($user['userid'], $user['guest_name']); $about_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif"; } else { $sql = get_user_details($fetchid); $result3 = $db->execute($sql); $user = $db->fetch_array($result3); $about_name = $user['username']; $about_avatar = get_avatar($user['avatar'], $fetchid); } $reports[] = array('id' => $row['id'], 'from' => $from_name, 'from_pic' => $from_avatar, 'about' => $about_name, 'about_pic' => $about_avatar, 'time' => relative_time($row['report_time']), 'about_num' => $row['COUNT(id)']); } $result = $db->execute("\n\t\t\tSELECT COUNT(id)\n\t\t\tFROM arrowchat_reports\n\t\t\tWHERE (working_time < (" . time() . " - 600)\n\t\t\t\t\t\tOR working_by = '" . $db->escape_string($userid) . "')\n\t\t\t\tAND completed_time = 0\n\t\t"); if ($row = $db->fetch_array($result)) { $total_reports = $row['COUNT(id)']; } else { $total_reports = 0; } $response['total_reports'] = array('count' => $total_reports); $response['reports'] = $reports;
<body> <?php include_once 'header.php'; include_once '_database/database.php'; include_once 'functions/functions.php'; ?> <?php if (isset($_SESSION['userID'])) { $userID = $_SESSION['userID']; } if (isset($_GET['user'])) { $userID = $_GET['user']; } $result = get_user_details($userID); $user = mysqli_fetch_assoc($result); $result2 = get_customer_details($userID); $sp = mysqli_fetch_assoc($result2); ?> <div id="fullscreen"> <div id="fullscreen-inner"> <div id="fullscreen-inner-left" class="fullscreen-inner-button"><span class="icon-caret-left"></span></div> <div id="fullscreen-inner-right" class="fullscreen-inner-button"><span class="icon-caret-right"></span></div> <div id="fullscreen-inner-close" class="fullscreen-inner-button"><span class="icon-close"></span></div> <div id="fullscreen-image"></div> </div> </div>