} $createdStats[$level][] = $userId; } } //now check nab foreach ($nabLevels as $level) { if (checkLevel($level, $oldStats[$userId]['nab'], $newStats[$userId]['nab'])) { if ($nabStats[$level] == null) { $nabStats[$level] = array(); } $nabStats[$level][] = $userId; } } //now check patrol foreach ($patrolLevels as $level) { if (checkLevel($level, $oldStats[$userId]['patrol'], $newStats[$userId]['patrol'])) { if ($patrolStats[$level] == null) { $patrolStats[$level] = array(); } $patrolStats[$level][] = $userId; } } } createEmail($editedStats, $createdStats, $nabStats, $patrolStats, $newStats, $startDate, $now); echo "\n\nFINISHED UPDATE\n\n"; return; } } } function createEmail(&$editedStats, &$createdStats, &$nabStats, &$patrolStats, &$stats, $startDate, $endDate) {
function buildHead($cubename_sel, $levels, $ncols, $result) { global $img_sortasc, $img_sortdesc, $img_lev, $img_hier, $img_save, $img_dim; $level_ser = implode("-", $levels); print "<tr>"; for ($i = 0; $i < $ncols; $i++) { $colname = mysql_fetch_field($result); $nome = $colname->name; $tabella = $colname->table; $pk = $colname->primary_key; $v = checkLevel($nome); if ($tabella == "") { $field = "{$nome}"; } else { $field = "{$tabella}.{$nome}"; } $colonna_ordinamento = "{$tabella}.{$nome}"; print "<th>"; print "<a href='#'><img border=0 src='{$img_sortasc}' width=20 height=20 onclick='ordina(\"{$cubename_sel}\",\"{$level_ser}\",\"{$colonna_ordinamento}\",\"asc\")'></a>"; print "<a href='#'><img border=0 src='{$img_sortdesc}' width=20 height=20 onclick='ordina(\"{$cubename_sel}\",\"{$level_ser}\",\"{$colonna_ordinamento}\",\"desc\")'></a>"; if ($v == true) { print " <a href='#'><img src='{$img_lev}' width=20px height=20px onclick='drill(\"{$cubename_sel}\",\"{$tabella}\",\"{$nome}\")'></a>"; print " <a href='#'><img src='{$img_hier}' width=20px height=20px onclick='change_hier(\"{$cubename_sel}\",\"{$tabella}\",\"{$nome}\")'></a>"; print " <a href='#'><img src='{$img_dim}' width=20px height=20px onclick='change_dim(\"{$cubename_sel}\",\"{$tabella}\",\"{$nome}\")'></a>"; } print "<br>{$field}"; print "</th>"; } print "</tr>"; }