APO-Epsilon/apo-website

View on GitHub
service_hours.php

Summary

Maintainability
F
3 days
Test Coverage

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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' );
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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' );
Severity: Minor
Found in service_hours.php by phpmd

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' );
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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' );
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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');
Severity: Minor
Found in service_hours.php by phpmd

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' );
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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'];
Severity: Minor
Found in service_hours.php by phpmd

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";
Severity: Minor
Found in service_hours.php by phpmd

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');
Severity: Minor
Found in service_hours.php by phpmd

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');
Severity: Major
Found in service_hours.php - About 7 hrs to fix

    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');
    ?>
    Severity: Minor
    Found in service_hours.php - About 5 hrs to fix

      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';";
      Severity: Critical
      Found in service_hours.php - About 5 hrs to fix

        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";
        Severity: Major
        Found in service_hours.php - About 3 hrs to fix

          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";
          Severity: Minor
          Found in service_hours.php - About 1 hr to fix

          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'];
          Severity: Minor
          Found in service_hours.php - About 1 hr to fix

            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'];
            Severity: Minor
            Found in service_hours.php - About 1 hr to fix

            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'];
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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'];
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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);
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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)) {
            Severity: Minor
            Found in service_hours.php by phpmd

            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);
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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 = "";
              }
            Severity: Minor
            Found in service_hours.php by phpmd

            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
            Severity: Minor
            Found in service_hours.php by phpmd

            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 = "";
              }
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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);
            Severity: Minor
            Found in service_hours.php by phpmd

            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);
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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;
            Severity: Minor
            Found in service_hours.php by phpmd

            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
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Avoid variables with short names like $i. Configured minimum length is 3.
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpmd

            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;'>
            Severity: Minor
            Found in service_hours.php by phpmd

            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)) {
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            }
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            }
            Severity: Minor
            Found in service_hours.php by phpmd

            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'];
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
            Open

              if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
            Open

            $exec_page = False;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
            Open

              if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
            Open

            $public_page = False;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
            Open

              if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
            Open

              if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
            Open

            $active_page = True;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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') {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            End of line character is invalid; expected "\n" but found "\r\n"
            Open

            <?php
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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';";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line exceeds 120 characters; contains 126 characters
            Open

                  $fund = "<img src='img/fundraising_coin.jpg' style='vertical-align: middle;' title='Fundraising!' alt='Fundraising!'/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if (isset($_GET['delete'])) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $day = $_POST['day'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $year = $_POST['year'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $semester = $_POST['semester'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "You have entered an invalid date.<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Whitespace found at end of line
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $result = $db->query($sql) or exit("There was an error, contact Webmaster");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            $month_name = date('M');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              show_form();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $fundraising = "";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if(isset($_POST['youth'])) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              } else {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $result = "Your didn't fill out the form completely.<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if (!checkdate($month, $day, $year)){
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>APO Hours:</span> $apo_hours<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>APO Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

                if ($result == 1){
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error - Contact Webmaster");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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') {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              else {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $apo_hours = round($i['sum_hours'], 2);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $fund = "";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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!'/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Fundraising Hours:</span> $i[sum_hours]<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $inc = 1;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $hours = $_POST['hours'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 0
            Open

            if(isset($result)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              } else {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $youth = $_POST['youth'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $associate_hours;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 0
            Open

              if (!checkdate($month, $day, $year)){
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $total_hours = round($i['sum_hours'], 2);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Chapter Hours:</span> $i[sum_hours]<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

            include ('session.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

            include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function show_active() {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $user_id = $_SESSION['sessionID'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $youth = "";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function process_form() {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if ($month == NULL || $day == NULL || $event == NULL || $hours == NULL || $servicetype == NULL) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              global $total_query;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $query2 = $db->query($insert) or die($db->error);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            return $result;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $max_bought_hours;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Campus Hours:</span> $i[sum_hours]<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Whitespace found at end of line
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<tr><td width='20%'>$i[event]</td>
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 2
            Open

              echo $result;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $next_semester;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $result = process_form();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $date = "$year-$month-$day";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if(isset($_POST['fundraising'])) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $apo_hours;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Community Hours:</span> $community_hours<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Whitespace found at end of line
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              echo "<div style='margin: 0px auto; width: 100%; text-align: center;'>
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                if ($i['fundraising'] == 1) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $inc = $inc + 1;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function show_form() {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $previous_year;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              if (isset($_POST['action']) && $_POST['action'] == "add_hour") {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $hours = round($hours, 2);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $servicetype = $_POST['servicetype'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after closing brace; newline found
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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';";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

            include ('requirements.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $event = $_POST['event'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

              if(isset($_POST['fundraising'])) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function list_stats($hours_id, $semester) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $previous_semester;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours. $db->error");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $unexcused_absences;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Country Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              echo "</table></div>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $hour_id = $_GET['delete'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $excused_absences;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $id = $_SESSION['sessionID'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              echo "<br><br><h2>Total Hours</h2><br>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Lifetime Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $description = $_POST['description'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Total Hours:</span> $total_hours<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Campus Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            $month_no = date('n');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $current_year;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $user_id = $_SESSION['sessionID'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Community Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            $day_of_month = date('j');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $leadership_points;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $month = $_POST['month'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Space before opening parenthesis of function call prohibited
            Open

              include ('mysql_access.php');
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $community_hours = round($i['sum_hours'], 2);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while ($result = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results = $db->query($sql) or die("Error Calculating Hours");
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function delete_hour($hour_id, $user_id) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

            if(isset($result)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $c_number;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $fundraising_hours;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $fundraising = $_POST['fundraising'];
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after IF keyword; 0 found
            Open

              if(isset($_POST['youth'])) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $description = htmlspecialchars($description, ENT_QUOTES);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after closing brace; newline found
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Bought Hours:</span> $i[sum_hours]<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Whitespace found at end of line
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 0
            Open

            }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                if ($result == 1){
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 8 spaces, found 4
            Open

                }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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'";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $required_hours;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $taskforce_events;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                delete_hour($hour_id, $user_id);
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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') {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                $result = '1';
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Expected 1 space after WHILE keyword; 0 found
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              while($i = mysqli_fetch_array($results)) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Country Hours:</span> $i[sum_hours]<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 8 spaces, found 4
            Open

                echo "<span>Chapter Hours: </span>" . $result['sum(hours)'] . "<br/>";
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected 4 spaces, found 2
            Open

              }
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 2
            Open

              $results->free();  
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Opening brace should be on a new line
            Open

            function list_hours($hours_id) {
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $current_semester;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            Line indented incorrectly; expected at least 4 spaces, found 0
            Open

            global $friendship_points;
            Severity: Minor
            Found in service_hours.php by phpcodesniffer

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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' );
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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;'>
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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' );
            Severity: Minor
            Found in service_hours.php by phpmd

            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' );
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            }
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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' );
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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";
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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");
            }
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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');
            Severity: Minor
            Found in service_hours.php by phpmd

            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

            There are no issues that match your filters.

            Category
            Status