Difference between revisions of "Active Directory/Software Packages"

From WolfTech
Jump to navigation Jump to search
Line 16: Line 16:
 
define ('INCLUDES',"../_include/");
 
define ('INCLUDES',"../_include/");
 
require_once(INCLUDES . "myit/functions.inc.php");
 
require_once(INCLUDES . "myit/functions.inc.php");
 +
require_once(INCLUDES . "myit/phpAD-nodie.inc.php");
 +
 
$server  = $DB["server"];
 
$server  = $DB["server"];
 
$username = $DB["read-un"];
 
$username = $DB["read-un"];
 
$password = $DB["read-pw"];
 
$password = $DB["read-pw"];
 
$database = $DB["database"];
 
$database = $DB["database"];
$table = "packaged_software";
+
 
 +
$adServer = $WOLFTECH['server'];
 +
$adDomain = $WOLFTECH['domain'];
 +
$adUser = $WOLFTECH['myit.rd-un'];
 +
$adPass = $WOLFTECH['myit.rd-pw'];
 +
 
 +
$AD = new phpAD($WOLFTECH['server'], 3269);
 +
$AD->bind($WOLFTECH['myit.rd-un'], $WOLFTECH['myit.rd-pw']);
 +
 
 +
 
 
// Connect
 
// Connect
 
$link = mysql_connect($server, $username, $password)
 
$link = mysql_connect($server, $username, $password)
 
or die("Unable to connect to database server");
 
or die("Unable to connect to database server");
// Select Table
 
/*
 
@mysql_select_db($database)
 
or die("Unable to select database");
 
 
echo "<HTML>\n<HEAD>\n\t<title>$title</title>\n</HEAD>\n<BODY>\n";
 
$query = "SELECT vendor,title,version,licensor,notes FROM $table "
 
  . "ORDER BY vendor, title, version";
 
$result = mysql_query($query)
 
or die("Query failed! $result");
 
echo "<table BORDER=0 cellpadding='0' cellspacing='3'>\n";
 
echo "\t<tr><th>Vendor</th><th>Title</th><th>Version</th><th>Licensor</th><th>Notes</th></tr>\n";
 
while ( $line = mysql_fetch_array($result, MYSQL_ASSOC) ) {
 
  if($count++ % 2 == 0) echo "\t<tr bgcolor=#E7E7E7>\n";
 
  else echo "\t<tr bgcolor=#F8F8F8>\n";
 
  foreach ($line as $col_value) {
 
      echo "\t\t<td>$col_value</td>\n";
 
  }
 
  echo "\t</tr>\n";
 
}
 
echo "</table>\n";
 
echo "</BODY>\n</HTML>";
 
// Free resultset
 
mysql_free_result($result);
 
*/
 
 
$i = 0;
 
$i = 0;
 
echo '<table width="100%"><thead><th style="text-align: left; vertical-align: bottom">Name</th><th style="text-align: left; vertical-align: bottom">Version</th><th style="text-align: left; vertical-align: bottom">Date</th><th style="text-align: left; vertical-align: bottom">Type/Scope</th></tr></thead><tbody>';
 
echo '<table width="100%"><thead><th style="text-align: left; vertical-align: bottom">Name</th><th style="text-align: left; vertical-align: bottom">Version</th><th style="text-align: left; vertical-align: bottom">Date</th><th style="text-align: left; vertical-align: bottom">Type/Scope</th></tr></thead><tbody>';
 
$getSW = mysql_query("SELECT owner, sw_type, vendor, name, version, other, replication FROM wolftech_myit.log_sw_groups WHERE owner=replication ORDER BY vendor, name, version, other");
 
$getSW = mysql_query("SELECT owner, sw_type, vendor, name, version, other, replication FROM wolftech_myit.log_sw_groups WHERE owner=replication ORDER BY vendor, name, version, other");
 
while ($a = mysql_fetch_row($getSW)){
 
while ($a = mysql_fetch_row($getSW)){
 +
 +
if (empty($a[5])){
 +
$sw = $a[0] . '-' . $a[1] . '-' . $a[2] . '-' . $a[3] . '-' . $a[4];
 +
$findC = ldap_search($AD->_conn, 'DC=wolftech,DC=ad,DC=ncsu,DC=edu', '(CN=' . $AD->checkInput($sw) . ')', array('whencreated'));
 +
$tempOther = ldap_get_entries($AD->_conn, $findC);
 +
$a[5] = '(' . substr($tempOther[0]['whencreated'][0], 0, 4) . '-' . substr($tempOther[0]['whencreated'][0], 4, 2) . '-' . substr($tempOther[0]['whencreated'][0], 6, 2) . ')';
 +
}
 +
 
if ($lastVendor != $a[2])
 
if ($lastVendor != $a[2])
 
echo '<tr style="background-color: #000000;"><td colspan="4" style="color: #FFFFFF">', $a[2], '</td></tr>';
 
echo '<tr style="background-color: #000000;"><td colspan="4" style="color: #FFFFFF">', $a[2], '</td></tr>';

Revision as of 13:40, 7 July 2010

The WOLTECH domain was designed to ease, automate, and monitor the distribution of software to computers. We have an extensive list of software that has been packaged and configured for distribution via the domain, and new packages are being added every day.

Available Packages

The following software products are packaged and available for automatic distribution over the network. To request that software be installed on your computer, please email ecehelp@ncsu.edu.

Once we have configured the software to install on your computer, you can simply reboot and the software will be installed during Windows bootup.

Notes:

  • Many software packages have additional license restrictions not listed in the table.
  • Software packages that are only available for manual installation are not listed here.

<php> // define ('INCLUDES',"../_include/"); require_once(INCLUDES . "myit/functions.inc.php"); require_once(INCLUDES . "myit/phpAD-nodie.inc.php");

$server = $DB["server"]; $username = $DB["read-un"]; $password = $DB["read-pw"]; $database = $DB["database"];

$adServer = $WOLFTECH['server']; $adDomain = $WOLFTECH['domain']; $adUser = $WOLFTECH['myit.rd-un']; $adPass = $WOLFTECH['myit.rd-pw'];

$AD = new phpAD($WOLFTECH['server'], 3269); $AD->bind($WOLFTECH['myit.rd-un'], $WOLFTECH['myit.rd-pw']);


// Connect $link = mysql_connect($server, $username, $password) or die("Unable to connect to database server"); $i = 0;

echo '

<thead></thead><tbody>';

$getSW = mysql_query("SELECT owner, sw_type, vendor, name, version, other, replication FROM wolftech_myit.log_sw_groups WHERE owner=replication ORDER BY vendor, name, version, other"); while ($a = mysql_fetch_row($getSW)){

if (empty($a[5])){ $sw = $a[0] . '-' . $a[1] . '-' . $a[2] . '-' . $a[3] . '-' . $a[4]; $findC = ldap_search($AD->_conn, 'DC=wolftech,DC=ad,DC=ncsu,DC=edu', '(CN=' . $AD->checkInput($sw) . ')', array('whencreated')); $tempOther = ldap_get_entries($AD->_conn, $findC); $a[5] = '(' . substr($tempOther[0]['whencreated'][0], 0, 4) . '-' . substr($tempOther[0]['whencreated'][0], 4, 2) . '-' . substr($tempOther[0]['whencreated'][0], 6, 2) . ')'; }

if ($lastVendor != $a[2])

echo ''; echo '';

$lastVendor = $a[2]; }

echo '</tbody>
NameVersionDateType/Scope
', $a[2], '
', $a[3], '', $a[4], '', $a[5], '', $a[1], '/', $a[6], '

';

mysql_free_result($getSW); </php>