if ($month == "") { } elseif ($month != "") { if ($day == "") { } elseif ($day != "") { $query[sStats] = 'select time, user, clientip, url, bytes from logaccess where date like \'$year-$month-$day\'' . $query[sStatsC]; $query[htmlFields] = 'htmlStatsDetailFields()'; $query[htmlRow] = 'htmlStatsDetailRow()'; statsMysqlQuery(); } } } ########## if ($type == "{$statsType}") { $selectTable = 'log' . $client . 's'; if ($month == "") { } elseif ($month != "") { if ($day == "") { $query[sStats] = 'select $qFields, sum(loadbytes) as loadbytes$qFields, sum(cachebytes) as cachebytes$qFields from $selectTable where date like \'$year-$month-%\' group by $qFields'; $query[htmlFields] = 'htmlStatsClientListMonthFields()'; $query[htmlRow] = 'htmlStatsClientListMonthRow()'; statsMysqlQuery(); } elseif ($day != "") { $query[sStats] = 'select $qFields, sum(loadbytes) as loadbytes$qFields, sum(cachebytes) as cachebytes$qFields from $selectTable where date like \'$year-$month-$day%\' group by $qFields'; $query[htmlFields] = 'htmlStatsClientListDayFields()'; $query[htmlRow] = 'htmlStatsClientListDayRow()'; statsMysqlQuery(); } } } print bodyBottom($TimerStart);
$departmentid = $stats_data[0]; $department = $stats_data[1]; print htmlDepartmentEdit(); } } if ($action == "departmentdel") { mysql_query("delete from departments where departmentid='{$departmentid}'") or die(mysql_error()); print htmlDepartmentDel(); } if ($action == "departmentlist") { if (!is_null($_GET['sort'])) { $sorttype = "rsort"; } elseif (!is_null($_GET['rsort'])) { $sorttype = "sort"; $desc = "desc"; } $departnum = 1; $select_sort = " order by department {$desc}"; $result = mysql_query("select departmentid,department from departments {$select_sort}") or die(mysql_error()); $departmenttotal = mysql_num_rows($result); print htmlDepartmentListFields(); while ($stats_data = mysql_fetch_row($result)) { $departmentid = $stats_data[0]; $department = $stats_data[1]; print htmlDepartmentListRow(); $departnum++; } print htmlTableEnd(); } print bodyBottom(); }