Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/erp/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/erp/z.php

<?php
include('include/config.inc');
include('include/functions.inc');

 		//$ds = ldap_connect("ldaps://172.31.1.41:636");
		if (!$ds) $ds = ldap_connect("ldap://172.31.1.41:389");
                ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
                $a = ldap_search($ds, "dc=iiita,dc=ac,dc=in", "uid=mmishra");
                $b = ldap_get_entries($ds, $a);
                $dn = $b[0]["dn"];
                $flag = (ldap_bind($ds, $dn, 'happy@2016') ? TRUE : FALSE);
                ldap_close($ds);
echo $flag;

//echo getIP();

/*
require('classes/PHPMailerAutoload.php');
date_default_timezone_set('Asia/Kolkata');

dbConnect("mm");
echo "<table border='1'>";
//$rs = mysql_query("select datediff(expiry,dated) as days,count(id) as no from announcements group by days");
$rs = mysql_query("select count(id) as no,datediff(expiry,dated) as days from announcements group by days");
while ($row = mysql_fetch_row($rs)) {
	echo "<tr><td>".implode($row, '</td><td>')."</td></tr>";
}
echo "</table>";
*/
/*
echo "<table border='1'>
<tr><th>subject</th><th>filename</th><th>dated</th><th>expiry</th><th>days</th><th>counter</th></tr>";
$rs = mysql_query("select * from announcements order by subject,id");
$rs = mysql_query("select datediff(expiry,dated) as days,count(id) from announcements group by days");
while ($o = mysql_fetch_object($rs)) {
	$no++;	

	if ($no == 1) $day1 = $o->dated;
	$day2 = $o->expiry;

	$days = floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));

	echo "<tr><td>$o->subject</td><td>$o->filename</td><td>$o->dated</td><td>$o->expiry</td><td>$days</td><td>$o->counter</td></tr>";
	
	if (strpos($o->filename,'pdf')) {
		$pdfno++;
		$pdfhits += $o->counter;
		$pdfdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}
	if (strpos($o->filename,'doc')) {
		$docno++;
		$dochits += $o->counter;
		$docdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}
	if (strpos($o->filename,'ttp')) {
		$htmno++;
		$htmhits += $o->counter;
		$htmdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}


	$totalhits += $o->counter;
}
	$totaldays = floor((strtotime($day2) - strtotime($day1)) / (60*60*24));
echo "</table>";

echo "Hits [total: $no/$totalhits in $pdfdays] [pdf: $pdfno/$pdfhits] [doc: $docno/$dochits] [htm: $htmno/$htmhits]";
*/
?>