Saturday, May 12, 2012

Customize and save a theme in PowerPoint 2010

copy from (http://office.microsoft.com/en-us/powerpoint-help/customize-and-save-a-theme-in-powerpoint-2010-HA010338409.aspx)


Microsoft PowerPoint 2010 provides several standard, prebuilt themes. Find a standard theme that has a look that you like, and then modify it by changing the colors, the fonts, or the line and fill effects. You can then save it as your very own custom theme.

Create a design power point template

copy form (http://office.microsoft.com/en-us/powerpoint-help/create-a-design-template-HP001147452.aspx)

PowerPoint comes with a gallery of design templates to choose from, but you can also create a template of your own and add it to the Slide Design task pane. Starting from a blank design, you can apply such elements as a background and color scheme, font style, layout, and art.

Saturday, May 05, 2012

Tuesday, May 01, 2012

PHP - Change Active Directory Password


<?php
$username=$_POST['user_name'];
//print $username;

$ldap = ldap_connect($config['ldapServers'], 636);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
  if ($ldap)
{
$bind = ldap_bind($ldap, $config['ldapUsername'], $config['ldapPassword']);
$filter="(sAMAccountName=$username)";
$result = ldap_search($ldap,"dc=yourcompany,dc=com",$filter);
//var_dump($results); 
        ldap_sort($ldap,$result,"sn");
       $info = ldap_get_entries($ldap, $result);
       for ($i=0; $i<$info["count"]; $i++)
       {
echo "You are changing the password for  ". $info[$i]["givenname"][0] .", " . $info[$i]["sn"][0] ." (" . $info[$i]["samaccountname"][0] .") to " . $_POST['user_pass'] ."

\n";
             $passwd1 = $_POST['user_pass'];
              $userDn = $info[$i]["distinguishedname"][0];
              $newPassword = $passwd1;
      $newPassword = "\"" . $newPassword . "\"";
      $len = strlen($newPassword);
      for ($i = 0; $i < $len; $i++){
            $newPassw .= "{$newPassword{$i}}\000";}
      $newPassword = $newPassw;
      $userdata["unicodePwd"] = $newPassword;
      $result = ldap_mod_replace($ldap, $userDn , $userdata);
      if ($result) echo "Your password has been changed!" ;
      else echo "There was a problem changing your password, please call IT for help"; 
 }
         }
        @ldap_close($ldap);
?>

Reference : 
http://snippets.dzone.com/posts/show/4059