小编jan*_*ane的帖子

对活动目录进行ajax调用,并使用post提取缩略图照片

我想使用post从活动目录中检索信息(例如缩略图).

<?php
/**
 * Get a list of users from Active Directory.
 */
$ldap_password = $_POST['password'];
$ldap_username = $_POST['username'];
$server = 'ldap://xxxxxxxxxxxxxxxxxxxxxx';
$domain = 'xxxxxxxxxxxxxxxxx';
$port       = 389;
$ldap_connection = ldap_connect($server, $port);

if (FALSE === $ldap_connection){
    // Uh-oh, something is wrong...
}

// We have to set this option for the version of Active Directory we are using.
ldap_set_option($ldap_connection, LDAP_OPT_PROTOCOL_VERSION, 3) or die('Unable to set LDAP protocol version');
ldap_set_option($ldap_connection, LDAP_OPT_REFERRALS, 0); // We need this for doing an LDAP search. …
Run Code Online (Sandbox Code Playgroud)

javascript php ajax jquery

13
推荐指数
2
解决办法
1535
查看次数

单击图片时的引导模式

我在图片下方创建了一个模态,上面写着“点击查看详细信息”。

在此处输入图片说明

我们可以创建相同的模态,它可以用于单击人的图片。

代码 :

/* CSS Document */

/* Float Elements
---------------------------------*/

.fl-lt {
  float: left;
}
.fl-rt {
  float: right;
}
/* Clear Floated Elements
---------------------------------*/

.clear {
  clear: both;
  display: block;
  overflow: hidden;
  visibility: hidden;
  width: 0;
  height: 0;
}
.clearfix:before,
.clearfix:after {
  content: '\0020';
  display: block;
  overflow: hidden;
  visibility: hidden;
  width: 0;
  height: 0;
}
.clearfix:after {
  clear: both;
}
.figure {
  margin: 0px;
}
img {
  max-width: 100%;
}
a,
a:hover,
a:active {
  outline: 0px !important …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery twitter-bootstrap

5
推荐指数
1
解决办法
2009
查看次数

基于条件从表中回显UI上的图像

我有一张桌子:

Badgecount表

场景:在这里你会看到5个徽章(badge1直到badge5).当员工获得徽章奖励时1,其他人就会获得奖励0.例如: Brinda赢得所有徽章,而lyka只获胜badge1.

徽章作为blob图像存储在不同的badgePhoto表中:

徽章

用于显示徽章的UI:

UI

现在,我有一个UI,我想显示最近赢得的3个徽章.

  • 如果赢得1个徽章,则只会显示1个徽章.
  • 如果赢得5个徽章,则会显示3个徽章.
  • 如果没有赢得徽章那么回声"没有徽章赢了".

与上述用户界面中的徽章相关的HTML:

<div class="panel">
  <div class="form" style="width: 350px; height: 220px;">
    <div class="login">Recent badges</div>
    <span class="fa-stack fa-5x has-badge">
	    <div class="badgesize">
            <img src="images/7.png"  alt=""  >
	    </div>
    </span>
    <span class="fa-stack fa-5x has-badge">
	    <div class="badgesize">
			<img src="images/1.png"  alt=""   >
		</div>
    </span>
    <span class="fa-stack fa-5x has-badge">
		<div class="badgesize">
	        <img src="images/2.png"  alt="" >
	        <!-- <img class="cbImage" src="images/7.png" alt="" style="width:50px;height:50px"/> -->
		</div>
    </span> …
Run Code Online (Sandbox Code Playgroud)

html php sql-server-2012

5
推荐指数
2
解决办法
392
查看次数

在弹出窗口中显示信息

我有这个排行榜: 排行榜

单击排行榜中的名称时,将显示一个弹出窗口. 弹出式快照

现在,我想显示弹出窗口中已点击其名称的任何人的信息.因为,您可以看到弹出窗口中不包含任何数据.

我一直在使用一个活动目录,从那里我可以获取数据,如配置文件pic和我正在维护的数据库中的其他信息.

问题是如何链接活动目录和数据库,并在单击名称时在弹出窗口中显示所需信息.请帮助

弹出窗口涉及的Javascript:

$(document).ready(function() {
        $('.tab a').on('click', function(e) {
            e.preventDefault();
            var _this = $(this);
            var block = _this.attr('href');
            $(".tab").removeClass("active");
            _this.parent().addClass("active");
            $(".leadboardcontent").hide();
            $(block).fadeIn();
        });


        /**
         * Fade in the Popup
         */
        $('.leaderboard li').on('click', function () {
            $('#popup').fadeIn();
            var mark = $(this).find('name').text();
            var small = $(this).find('points').text();
            $('#popup-name').text('Name: ' + name);
            $('#popup-score').text('Score: ' + points);
        });

});
Run Code Online (Sandbox Code Playgroud)

对于活动目录我正在使用此变量并在登录用户的任何地方回显它:

<?php
$username   = $_POST['username'];
$password   = $_POST['password'];
$server = 'ldap:xxxxx';
$domain = 'xxx'
$port       = xxx;

$ldap_connection = ldap_connect($server, $port); …
Run Code Online (Sandbox Code Playgroud)

javascript php sql-server ajax json

5
推荐指数
1
解决办法
369
查看次数

将popup/infotip/tooltip显示为悬停特定文本

我有一张图表, http://codepen.io/Siddharth11/pen/LVQmjN

当我将鼠标悬停在上图中右侧写的颜色代码上时,我想显示一个弹出窗口.

我将为每个颜色代码显示seprete信息.那么我们如何为每个颜色代码创建一个单独的弹出窗口.

类似于莫里斯地图:http: //codepen.io/andreic/pen/CJoze

或者:http://codepen.io/anon/pen/woJMrX

这个问题没有得到任何正确的答案.我尝试使用jquery插件(poshy提示)并尝试解决问题.但是没有运气.我已经转发了问题并取得了进展.请参考链接了解当前的情况. code:jquery插件将数据绑定到工具提示(poshy tip)

'use strict';

var dataset1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];

// let colors = ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd'];
let colors = ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a', '#1a1a1a', '#1a1a1a'];
var weeks = ['January - 2016 ', 'February', 'March', '#fdae61', '#fee08b', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2', '#1a1a1a', '#1a1a1a']; …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery jquery-plugins d3.js

3
推荐指数
1
解决办法
611
查看次数