| Current Path : /var/www/html/mmishra/indem/ |
| Current File : /var/www/html/mmishra/indem/z.php |
<span id='title'>Mail Suscriptions</span><br><br>
<?php
/*
$uid = 'mmishra';
$ds = ldap_connect("ldap.iiita.ac.in"); // must be a valid LDAP server!
if ($ds) {
$q = ldap_search($ds, "dc=iiita,dc=ac,dc=in", "(&(uid=$uid)(objectclass=posixAccount))");
$info = ldap_get_entries($ds, $q);
if ($info["count"] > 0) {
foreach ($info[0]["businesscategory"] as $bc) {
echo shell_exec("ssh root@172.31.1.27 'ls -l'");
echo $bc;
}
}
} else {
echo "Ldap error";
}
ldap_close($ds);
*/
function get_last_month() {
$pmonth = (int)(date("n"));
if ($pmonth == 0) {
$pmonth = 12;
$pyear = date("Y") - 1;
} else
$pyear = date("Y");
return date("M-Y",mktime(0,0,0,$pmonth,0,$pyear));
}
echo get_last_month();
echo (int)(date("m") - 1);
?>