process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_POST. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_POST. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_GET. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_SESSION. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_SESSION. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_form accesses the super-global variable $_SESSION. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_GET. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
process_form accesses the super-global variable $_POST. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
list_stats accesses the super-global variable $_SESSION. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_form accesses the super-global variable $_SESSION. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method show_form
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
File service_hours.php
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
include ('session.php');
include ('requirements.php');
include ('mysql_access.php');
?>
Consider simplifying this complex logical expression. Open
else if ($description == 'KCOM' || $description == 'Lancaster' || $description == 'CSI Friday' || $description == 'Ray Miller' || $description == 'Pop-Tab Collection' ||$description == 'Twin Pines' ||$description == 'Humane Society' ||$description == 'Adair Co. Library' ||$description == 'Recycling Center' ||$description == 'Bought Hours' ||$description == 'Camp' ||$description == 'Bake sale' ||$description == 'Large Service Project' ||$description == 'Other Service Project' ||$description == 'Non-APO Hours' || $description == 'NMCAA' || $description == 'Multicultural Affairs Center' || $description == "MAC" || $description == 'Highway Cleanup' || $description == 'SAA Babysitting') {
$result = "<div class='entry'>The description cannot be the same as the event. Please enter a valid description.<br/></div>";
}
else {
$insert = "INSERT INTO apo.recorded_hours (user_id, event, month, day, year, date, description, hours, servicetype, fundraising, semester, youth) values('$id', '$event', '$month','$day', '$year', '$date', '$description', '$hours', '$servicetype', '$fundraising', '$semester', '$youth') ON DUPLICATE KEY UPDATE description='NEEDS NEW DESCRIPTION';";
Method list_stats
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
Function list_stats
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_form
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
Function process_form
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function process_form() has an NPath complexity of 528. The configured NPath complexity threshold is 200. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function show_form() has 193 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Exclude checks
The function list_stats() has 107 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
The function list_stats() has an NPath complexity of 16384. The configured NPath complexity threshold is 200. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function process_form() has a Cyclomatic Complexity of 30. The configured cyclomatic complexity threshold is 10. Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The function list_stats() has a Cyclomatic Complexity of 29. The configured cyclomatic complexity threshold is 10. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours. $db->error");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours. $db->error");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$result' which will lead to PHP notices. Open
echo $result;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$query2 = $db->query($insert) or die($db->error);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$result' which will lead to PHP notices. Open
if(isset($result)) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$query2 = $db->query($insert) or die($db->error);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error - Contact Webmaster");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method process_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$fundraising = "";
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method process_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
$insert = "INSERT INTO apo.recorded_hours (user_id, event, month, day, year, date, description, hours, servicetype, fundraising, semester, youth) values('$id', '$event', '$month','$day', '$year', '$date', '$description', '$hours', '$servicetype', '$fundraising', '$semester', '$youth') ON DUPLICATE KEY UPDATE description='NEEDS NEW DESCRIPTION';";
$query2 = $db->query($insert) or die($db->error);
$result = '1';
/*if($fundraising == 1){//also ads fundraising hours to another DB so we can see who the first 30 were. --030915 code appears old, table no longer used
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method process_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$youth = "";
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$db'. Open
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$previous_year'. Open
global $previous_year;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$result'. Open
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$query2'. Open
$query2 = $db->query($insert) or die($db->error);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function process_form() contains an exit expression. Open
$query2 = $db->query($insert) or die($db->error);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$db'. Open
$results = $db->query($sql) or die("Error - Contact Webmaster");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function delete_hour() contains an exit expression. Open
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$next_semester'. Open
global $next_semester;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$friendship_points'. Open
global $friendship_points;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$excused_absences'. Open
global $excused_absences;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours. $db->error");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$previous_semester'. Open
global $previous_semester;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_stats() contains an exit expression. Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function list_hours() contains an exit expression. Open
$results = $db->query($sql) or die("Error - Contact Webmaster");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$taskforce_events'. Open
global $taskforce_events;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$unexcused_absences'. Open
global $unexcused_absences;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$current_year'. Open
global $current_year;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$leadership_points'. Open
global $leadership_points;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 27 and the first side effect is on line 2. Open
<?php
- Exclude checks
Avoid variables with short names like $i. Configured minimum length is 3. Open
while($i = mysqli_fetch_array($results)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $hours_id is not named in camelCase. Open
function list_hours($hours_id) {
include ('mysql_access.php');
$sql = "SELECT * FROM `recorded_hours` WHERE `user_id` = '$hours_id' ORDER BY `year` DESC, `month` DESC, `day` DESC";
$results = $db->query($sql) or die("Error - Contact Webmaster");
echo "<div style='margin: 0px auto; width: 100%; text-align: center;'>
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $i. Configured minimum length is 3. Open
while ($i = mysqli_fetch_array($results)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $user_id is not named in camelCase. Open
function delete_hour($hour_id, $user_id) {
include ('mysql_access.php');
$sql = "DELETE FROM `recorded_hours` WHERE `index` = '$hour_id' AND `user_id` = '$user_id' LIMIT 1";
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $hour_id is not named in camelCase. Open
function delete_hour($hour_id, $user_id) {
include ('mysql_access.php');
$sql = "DELETE FROM `recorded_hours` WHERE `index` = '$hour_id' AND `user_id` = '$user_id' LIMIT 1";
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $id. Configured minimum length is 3. Open
$id = $_SESSION['sessionID'];
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
$exec_page = False;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
$public_page = False;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "True" Open
$active_page = True;
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='campus'";
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='country'";
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$result = "<div class='entry'>The description cannot be the same as the event. Please enter a valid description.<br/></div>";
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
/*if($fundraising == 1){//also ads fundraising hours to another DB so we can see who the first 30 were. --030915 code appears old, table no longer used
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Community' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 694 characters Open
else if ($description == 'KCOM' || $description == 'Lancaster' || $description == 'CSI Friday' || $description == 'Ray Miller' || $description == 'Pop-Tab Collection' ||$description == 'Twin Pines' ||$description == 'Humane Society' ||$description == 'Adair Co. Library' ||$description == 'Recycling Center' ||$description == 'Bought Hours' ||$description == 'Camp' ||$description == 'Bake sale' ||$description == 'Large Service Project' ||$description == 'Other Service Project' ||$description == 'Non-APO Hours' || $description == 'NMCAA' || $description == 'Multicultural Affairs Center' || $description == "MAC" || $description == 'Highway Cleanup' || $description == 'SAA Babysitting') {
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Country' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Campus' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `event` = 'Bought Hours' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='chapter'";
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
<tr class='hours_header'><td>Event</td><td>Date</td><td>Type</td><td>Hours</td><td>Description</td><td>Semester</td><td></td></tr>";
- Exclude checks
End of line character is invalid; expected "\n" but found "\r\n" Open
<?php
- Exclude checks
Line exceeds 120 characters; contains 165 characters Open
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `event` != 'Non-APO Hours' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 352 characters Open
$insert = "INSERT INTO apo.recorded_hours (user_id, event, month, day, year, date, description, hours, servicetype, fundraising, semester, youth) values('$id', '$event', '$month','$day', '$year', '$date', '$description', '$hours', '$servicetype', '$fundraising', '$semester', '$youth') ON DUPLICATE KEY UPDATE description='NEEDS NEW DESCRIPTION';";
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='community'";
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
$fund = "<img src='img/fundraising_coin.jpg' style='vertical-align: middle;' title='Fundraising!' alt='Fundraising!'/>";
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `fundraising` = '1' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Chapter' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND event!='Non-APO Hours'";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if (isset($_GET['delete'])) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$day = $_POST['day'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$year = $_POST['year'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$semester = $_POST['semester'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "You have entered an invalid date.<br/>";
- Exclude checks
Whitespace found at end of line Open
$results->free();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$month_name = date('M');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
show_form();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$fundraising = "";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if(isset($_POST['youth'])) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
} else {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$result = "Your didn't fill out the form completely.<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if (!checkdate($month, $day, $year)){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `event` != 'Non-APO Hours' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>APO Hours:</span> $apo_hours<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id'";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>APO Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ($result == 1){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error - Contact Webmaster");
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
else if ($description == 'KCOM' || $description == 'Lancaster' || $description == 'CSI Friday' || $description == 'Ray Miller' || $description == 'Pop-Tab Collection' ||$description == 'Twin Pines' ||$description == 'Humane Society' ||$description == 'Adair Co. Library' ||$description == 'Recycling Center' ||$description == 'Bought Hours' ||$description == 'Camp' ||$description == 'Bake sale' ||$description == 'Large Service Project' ||$description == 'Other Service Project' ||$description == 'Non-APO Hours' || $description == 'NMCAA' || $description == 'Multicultural Affairs Center' || $description == "MAC" || $description == 'Highway Cleanup' || $description == 'SAA Babysitting') {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
else {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$apo_hours = round($i['sum_hours'], 2);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$fund = "";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$fund = "<img src='img/fundraising_coin.jpg' style='vertical-align: middle;' title='Fundraising!' alt='Fundraising!'/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Chapter' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Fundraising Hours:</span> $i[sum_hours]<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$inc = 1;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$hours = $_POST['hours'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
if(isset($result)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
} else {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$youth = $_POST['youth'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $associate_hours;
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if (!checkdate($month, $day, $year)){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$total_hours = round($i['sum_hours'], 2);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Chapter Hours:</span> $i[sum_hours]<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='campus'";
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('session.php');
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Opening brace should be on a new line Open
function show_active() {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$user_id = $_SESSION['sessionID'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$youth = "";
- Exclude checks
Opening brace should be on a new line Open
function process_form() {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
global $total_query;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `event` = 'Bought Hours' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$query2 = $db->query($insert) or die($db->error);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND event!='Non-APO Hours'";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
return $result;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $max_bought_hours;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Campus Hours:</span> $i[sum_hours]<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Whitespace found at end of line Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT * FROM `recorded_hours` WHERE `user_id` = '$hours_id' ORDER BY `year` DESC, `month` DESC, `day` DESC";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<tr><td width='20%'>$i[event]</td>
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
echo $result;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $next_semester;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$result = process_form();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$date = "$year-$month-$day";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if(isset($_POST['fundraising'])) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Community' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Country' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $apo_hours;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Community Hours:</span> $community_hours<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `fundraising` = '1' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Whitespace found at end of line Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<div style='margin: 0px auto; width: 100%; text-align: center;'>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($i['fundraising'] == 1) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$inc = $inc + 1;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include ('mysql_access.php');
- Exclude checks
Opening brace should be on a new line Open
function show_form() {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $previous_year;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$hours = round($hours, 2);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$servicetype = $_POST['servicetype'];
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$insert = "INSERT INTO apo.recorded_hours (user_id, event, month, day, year, date, description, hours, servicetype, fundraising, semester, youth) values('$id', '$event', '$month','$day', '$year', '$date', '$description', '$hours', '$servicetype', '$fundraising', '$semester', '$youth') ON DUPLICATE KEY UPDATE description='NEEDS NEW DESCRIPTION';";
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('requirements.php');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$event = $_POST['event'];
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST['fundraising'])) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Opening brace should be on a new line Open
function list_stats($hours_id, $semester) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $previous_semester;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours. $db->error");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $unexcused_absences;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Country Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</table></div>";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$hour_id = $_GET['delete'];
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $excused_absences;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$id = $_SESSION['sessionID'];
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `servicetype` = 'Campus' AND `semester` = '$semester' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<br><br><h2>Total Hours</h2><br>";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Lifetime Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$description = $_POST['description'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='chapter'";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Total Hours:</span> $total_hours<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Campus Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "DELETE FROM `recorded_hours` WHERE `index` = '$hour_id' AND `user_id` = '$user_id' LIMIT 1";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$month_no = date('n');
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $current_year;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$user_id = $_SESSION['sessionID'];
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Community Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$day_of_month = date('j');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $leadership_points;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$month = $_POST['month'];
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$community_hours = round($i['sum_hours'], 2);
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($result = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results = $db->query($sql) or die("Error Calculating Hours");
- Exclude checks
Opening brace should be on a new line Open
function delete_hour($hour_id, $user_id) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($result)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $c_number;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $fundraising_hours;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$fundraising = $_POST['fundraising'];
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST['youth'])) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$description = htmlspecialchars($description, ENT_QUOTES);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Bought Hours:</span> $i[sum_hours]<br/>";
- Exclude checks
Whitespace found at end of line Open
$results->free();
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='community'";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($result == 1){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT sum(hours) FROM (SELECT * " . $total_query . ")mctable WHERE user_id='$user_id' AND servicetype='country'";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $required_hours;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $taskforce_events;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
delete_hour($hour_id, $user_id);
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
else if ($description == 'KCOM' || $description == 'Lancaster' || $description == 'CSI Friday' || $description == 'Ray Miller' || $description == 'Pop-Tab Collection' ||$description == 'Twin Pines' ||$description == 'Humane Society' ||$description == 'Adair Co. Library' ||$description == 'Recycling Center' ||$description == 'Bought Hours' ||$description == 'Camp' ||$description == 'Bake sale' ||$description == 'Large Service Project' ||$description == 'Other Service Project' ||$description == 'Non-APO Hours' || $description == 'NMCAA' || $description == 'Multicultural Affairs Center' || $description == "MAC" || $description == 'Highway Cleanup' || $description == 'SAA Babysitting') {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$result = "<div class='entry'>The description cannot be the same as the event. Please enter a valid description.<br/></div>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$result = '1';
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while($i = mysqli_fetch_array($results)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Country Hours:</span> $i[sum_hours]<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<span>Chapter Hours: </span>" . $result['sum(hours)'] . "<br/>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$results->free();
- Exclude checks
Opening brace should be on a new line Open
function list_hours($hours_id) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $current_semester;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
global $friendship_points;
- Exclude checks
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_hours($hours_id) {
include ('mysql_access.php');
$sql = "SELECT * FROM `recorded_hours` WHERE `user_id` = '$hours_id' ORDER BY `year` DESC, `month` DESC, `day` DESC";
$results = $db->query($sql) or die("Error - Contact Webmaster");
echo "<div style='margin: 0px auto; width: 100%; text-align: center;'>
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $apo_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $community_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $month_name is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $associate_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $previous_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $leadership_points is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $month_no is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $c_number is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $month_no is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_year is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $required_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $apo_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $friendship_points is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $month_name is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hour_id is not named in camelCase. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $apo_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hours_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function delete_hour($hour_id, $user_id) {
include ('mysql_access.php');
$sql = "DELETE FROM `recorded_hours` WHERE `index` = '$hour_id' AND `user_id` = '$user_id' LIMIT 1";
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $fundraising_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $c_number is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hour_id is not named in camelCase. Open
function show_active() {
if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
$result = process_form();
if ($result == 1){
//header('Location: ./service_hours.php' );
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $unexcused_absences is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $next_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $taskforce_events is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $previous_year is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $community_hours is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $total_query is not named in camelCase. Open
function list_stats($hours_id, $semester) {
include ('mysql_access.php');
global $total_query;
// Total Hours
$sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $required_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $day_of_month is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $day_of_month is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $hour_id is not named in camelCase. Open
function delete_hour($hour_id, $user_id) {
include ('mysql_access.php');
$sql = "DELETE FROM `recorded_hours` WHERE `index` = '$hour_id' AND `user_id` = '$user_id' LIMIT 1";
$result = $db->query($sql) or exit("There was an error, contact Webmaster");
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $associate_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $apo_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_bought_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $current_semester is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $fundraising_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_bought_hours is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $excused_absences is not named in camelCase. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}