APO-Epsilon/apo-website

View on GitHub
service_admin_week.php

Summary

Maintainability
F
6 days
Test Coverage

displayListing accesses the super-global variable $_SERVER.
Open

function displayListing(){
  include('mysql_access.php');
  $dateMapNew = array(1,0,6,5,4,3,2);
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
Severity: Minor
Found in service_admin_week.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

editPosting accesses the super-global variable $_SERVER.
Open

function editPosting($i){
    include('mysql_access.php');
    $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
          FROM contact_information AS c
          JOIN service_leaders AS l
Severity: Minor
Found in service_admin_week.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

displayListing accesses the super-global variable $_SERVER.
Open

function displayListing(){
  include('mysql_access.php');
  $dateMapNew = array(1,0,6,5,4,3,2);
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
Severity: Minor
Found in service_admin_week.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

displayListing accesses the super-global variable $_SESSION.
Open

function displayListing(){
  include('mysql_access.php');
  $dateMapNew = array(1,0,6,5,4,3,2);
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
Severity: Minor
Found in service_admin_week.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

view accesses the super-global variable $_SESSION.
Open

function view($i){
  include('mysql_access.php');
  $id = $_SESSION['sessionID'];

$sql = "SELECT d.detail_id, d.event_id, d.DOW,
Severity: Minor
Found in service_admin_week.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 displayListing has 292 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function displayListing(){
  include('mysql_access.php');
  $dateMapNew = array(1,0,6,5,4,3,2);
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
Severity: Major
Found in service_admin_week.php - About 1 day to fix

    Function displayListing has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

    function displayListing(){
      include('mysql_access.php');
      $dateMapNew = array(1,0,6,5,4,3,2);
      $dateMap1 = array(0,6,5,4,3,2,1);
      $currentDOW1 = date('w');//returns integer of DOW
    Severity: Minor
    Found in service_admin_week.php - About 1 day 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

    File service_admin_week.php has 458 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    require_once ('session.php');
    require_once ('mysql_access.php');
    require_once ('service_admin_functions.php');
    ?>
    Severity: Minor
    Found in service_admin_week.php - About 7 hrs to fix

      Method view has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function view($i){
        include('mysql_access.php');
        $id = $_SESSION['sessionID'];
      
      $sql = "SELECT d.detail_id, d.event_id, d.DOW,
      Severity: Minor
      Found in service_admin_week.php - About 1 hr to fix

        Method editPosting has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function editPosting($i){
            include('mysql_access.php');
            $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
                  FROM contact_information AS c
                  JOIN service_leaders AS l
        Severity: Minor
        Found in service_admin_week.php - About 1 hr to fix

          Function view has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 displayListing() has an NPath complexity of 127008. The configured NPath complexity threshold is 200.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 displayListing() has 319 lines of code. Current threshold is set to 100. Avoid really long methods.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.php by phpmd

          The function displayListing() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.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

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

            }else{
              while($r = mysqli_fetch_array($result)){
                //$user_id = $r['id'];
                $detail_id = $r['detail_id'];
                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

            }else{
              while($r = mysqli_fetch_array($result)){
                //$user_id = $r['id'];
                $detail_id = $r['detail_id'];
                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  $start = substr($start,0,-3)."am";
                }
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

            }else{
              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
              echo"<select name=\"occurrence_id\">";
              while($r = mysqli_fetch_array($result)){
                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.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 view uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

            }else{
              while($r = mysqli_fetch_array($result)){
                $user_id = $r['id'];
                $detail_id = $r['detail_id'];
                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  $start = substr($start,0,-3)."am";
                }
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  $rowClass = "row2";
                }
          Severity: Minor
          Found in service_admin_week.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 editPosting uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  while($r = mysqli_fetch_array($result)){
                    $user_id = $r['id'];
                    $detail_id = $r['detail_id'];
                    $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  $end = substr($end,0,-3)."am";
                }
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                }else{
                  $end = substr($end,0,-3)."am";
                }
          Severity: Minor
          Found in service_admin_week.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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

            }else{
              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
              echo"<select name=\"occurrence_id\">";
              while($r = mysqli_fetch_array($result)){
                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.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

          Avoid unused local variables such as '$detail_id'.
          Open

                    $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.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 '$id'.
          Open

          $id = $_SESSION['sessionID'];
          Severity: Minor
          Found in service_admin_week.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 displayListing() contains an exit expression.
          Open

              die("error");
          Severity: Minor
          Found in service_admin_week.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 '$id'.
          Open

            $id = $_SESSION['sessionID'];
          Severity: Minor
          Found in service_admin_week.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 '$start'.
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.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 '$end'.
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.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 '$name'.
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.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 '$theDate'.
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.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 displayListing() contains an exit expression.
          Open

              die("error");
          Severity: Minor
          Found in service_admin_week.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 '$lastname'.
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.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 '$weekAgoEnd'.
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.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 '$day'.
          Open

              $day = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.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 '$event_id'.
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.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 '$max'.
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.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 '$firstname'.
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.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 displayListing() contains an exit expression.
          Open

              die("error");
          Severity: Minor
          Found in service_admin_week.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);
          Severity: Minor
          Found in service_admin_week.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 editPosting() contains an exit expression.
          Open

                  die("error");
          Severity: Minor
          Found in service_admin_week.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 '$DOW'.
          Open

                    $DOW = date('w', strtotime($r['DOW']));
          Severity: Minor
          Found in service_admin_week.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 '$user_id'.
          Open

                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.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 '$DOW'.
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.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 displayListing() contains an exit expression.
          Open

              die("error");
          Severity: Minor
          Found in service_admin_week.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 '$firstname'.
          Open

                    $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.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 '$firstname'.
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.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 '$user_id'.
          Open

                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.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 '$user_id'.
          Open

                    $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.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 '$dateMapNew'.
          Open

            $dateMapNew = array(1,0,6,5,4,3,2);
          Severity: Minor
          Found in service_admin_week.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 '$event_id'.
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.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 '$lastname'.
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.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 '$count'.
          Open

                  $count = $r['count'];
          Severity: Minor
          Found in service_admin_week.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 '$lastname'.
          Open

                    $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.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 view() contains an exit expression.
          Open

              die("error");
          Severity: Minor
          Found in service_admin_week.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 '$length'.
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.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

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

            if(!$result){
              die("error");
            }else{
              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
              echo"<select name=\"occurrence_id\">";
          Severity: Major
          Found in service_admin_week.php and 1 other location - About 7 hrs to fix
          service_admin_week.php on lines 438..461

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 228.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

            if(!$result){
              die("error");
            }else{
              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
              echo"<select name=\"occurrence_id\">";
          Severity: Major
          Found in service_admin_week.php and 1 other location - About 7 hrs to fix
          service_admin_week.php on lines 257..281

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 228.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

                if($end > 12){
                  $endstr = substr($end, 0,2);
                  $endstr -= 12;
                  $end = $endstr.substr($end,2,-3)."pm";
                }else{
          Severity: Major
          Found in service_admin_week.php and 5 other locations - About 45 mins to fix
          service_admin_week.php on lines 209..215
          service_admin_week.php on lines 403..409
          service_admin_week.php on lines 410..416
          service_signup.php on lines 221..227
          service_signup.php on lines 228..234

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 95.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

                if($start > 12){
                  $startstr = substr($start, 0,2);
                  $startstr -= 12;
                  $start = $startstr.substr($start,2,-3)."pm";
                }else{
          Severity: Major
          Found in service_admin_week.php and 5 other locations - About 45 mins to fix
          service_admin_week.php on lines 216..222
          service_admin_week.php on lines 403..409
          service_admin_week.php on lines 410..416
          service_signup.php on lines 221..227
          service_signup.php on lines 228..234

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 95.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

                if($start > 12){
                  $startstr = substr($start, 0,2);
                  $startstr -= 12;
                  $start = $startstr.substr($start,2,-3)."pm";
                }else{
          Severity: Major
          Found in service_admin_week.php and 5 other locations - About 45 mins to fix
          service_admin_week.php on lines 209..215
          service_admin_week.php on lines 216..222
          service_admin_week.php on lines 410..416
          service_signup.php on lines 221..227
          service_signup.php on lines 228..234

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 95.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

                if($end > 12){
                  $endstr = substr($end, 0,2);
                  $endstr -= 12;
                  $end = $endstr.substr($end,2,-3)."pm";
                }else{
          Severity: Major
          Found in service_admin_week.php and 5 other locations - About 45 mins to fix
          service_admin_week.php on lines 209..215
          service_admin_week.php on lines 216..222
          service_admin_week.php on lines 403..409
          service_signup.php on lines 221..227
          service_signup.php on lines 228..234

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 95.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          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 44 and the first side effect is on line 2.
          Open

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

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

                  while($r = mysqli_fetch_array($result)){
          Severity: Minor
          Found in service_admin_week.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

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

            $id = $_SESSION['sessionID'];
          Severity: Minor
          Found in service_admin_week.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

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

          function editPosting($i){
          Severity: Minor
          Found in service_admin_week.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

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

          $id = $_SESSION['sessionID'];
          Severity: Minor
          Found in service_admin_week.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

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

          function view($i){
          Severity: Minor
          Found in service_admin_week.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

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

              while($r = mysqli_fetch_array($result)){
          Severity: Minor
          Found in service_admin_week.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

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

            $z1 = $dateMap1[$currentDOW1];//go through map
          Severity: Minor
          Found in service_admin_week.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

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

              while($r = mysqli_fetch_array($result)){
          Severity: Minor
          Found in service_admin_week.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

          Function closing brace must go on the next line following the body; found 1 blank lines before brace
          Open

          }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Blank line found at end of control structure
          Open

          
          
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 137 characters
          Open

            $sql = "UPDATE service_occurrence SET start='".$start."',end='".$end."',length=$length,max=$max WHERE occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 133 characters
          Open

              $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 122 characters
          Open

                echo "<tr class=\"displayListing\"><td>date</td><td></td><td>start</td><td>end</td><td>max</td><td>hours</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 195 characters
          Open

                <tr><td><input type='hidden' name=\"Navigate\" value='edit'/><input type='hidden' name=\"occurrence_id\" value={$i} /><input type='submit' name=\"Navigate\" value='submitEdit'/></td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 156 characters
          Open

                echo "<meta http-equiv=\"refresh\" content=\"0;URL='service_leader_dashboard.php?d=".$detail_id."&z=".$i.$additional_info."&o=".$occurrence_id."'\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 129 characters
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 240 characters
          Open

            echo "<br/><input type='submit' name=\"Navigate\" value='cancel'/><input type='submit' name=\"Navigate\" value='view'/><input type='submit' name=\"Navigate\" value='activate'/><input type='submit' name=\"Navigate\" value='edit'/></form>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 176 characters
          Open

                echo "<tr class=\"$rowClass\"><td>$DOW</td><td>$theDate</td><td>$name</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length</td><td>$message</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 129 characters
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 128 characters
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 154 characters
          Open

          echo "<tr class=\"displayListing\"><td>date</td><td></td><td>name</td><td>start</td><td>end</td><td>current</td><td>max</td><td>hours</td><td></td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 156 characters
          Open

                echo "<tr><td>$DOW</td><td>$theDate</td><td>$name</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length</td><td>$message</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 154 characters
          Open

          echo "<tr class=\"displayListing\"><td>date</td><td></td><td>name</td><td>start</td><td>end</td><td>current</td><td>max</td><td>hours</td><td></td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line exceeds 120 characters; contains 240 characters
          Open

            echo "<br/><input type='submit' name=\"Navigate\" value='cancel'/><input type='submit' name=\"Navigate\" value='view'/><input type='submit' name=\"Navigate\" value='activate'/><input type='submit' name=\"Navigate\" value='edit'/></form>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Space before opening parenthesis of function call prohibited
          Open

          require_once ('mysql_access.php');
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          if($position != "Webmaster" && $position != "VP of Regular Service"){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Space before opening parenthesis of function call prohibited
          Open

          require_once ('session.php');
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

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

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

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Opening brace should be on a new line
          Open

          function editPosting($i){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                echo "<table border=0 class=\"displayListingTable\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $day = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            <?php require 'head.php';?>
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Space before opening parenthesis of function call prohibited
          Open

          require_once ('service_admin_functions.php');
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Opening brace should be on a new line
          Open

          function view($i){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            die("you do not have permission to view this page.");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $DOW = date('w', strtotime($r['DOW']));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

          Expected 1 space after IF keyword; 0 found
          Open

                if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 6
          Open

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

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                echo "<tr class=\"displayListing\"><td>date</td><td></td><td>start</td><td>end</td><td>max</td><td>hours</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 6
          Open

                if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          if(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'submitEdit')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $today = (date('Y-m-d'));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($active==2){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

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

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $endstr = substr($end, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($max==-1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $dateMap1 = array(0,6,5,4,3,2,1);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<table border=0 class=\"displayListingTable\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Line indented incorrectly; expected 8 spaces, found 4
          Open

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

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

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

          if($position != "Webmaster" && $position != "VP of Regular Service"){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              echo mysqli_error()."<br/>".$sql;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $occurrence_id = $r['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $count = $r['count'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($i == 0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Expected 1 space after closing parenthesis; found 0
          Open

                }elseif($active==1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $rowClass = "row1";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

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

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

                  $rowClass = "row2";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          No space found after comma in function call
          Open

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<h2>Next Week</h2>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

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

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

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

            $sql = "UPDATE service_occurrence SET start='".$start."',end='".$end."',length=$length,max=$max WHERE occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $date = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

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

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

                  $max = "-";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

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

              $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $occurrence_id = $r['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $count = $r['count'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $start =  $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "<br/><input type='submit' name=\"Navigate\" value='cancel'/><input type='submit' name=\"Navigate\" value='view'/><input type='submit' name=\"Navigate\" value='activate'/><input type='submit' name=\"Navigate\" value='edit'/></form>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            view($i);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if($detailDetailId > $maxDetailId){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<hr/>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<h3>Run new week setup for {$date1} to {$date2} <a href=\"service_admin_week_setup.php\">here</a>.</h3>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              die("error");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $message = "";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

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

          Expected 1 space after ELSE keyword; 0 found
          Open

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

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

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              die("error");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          if(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'cancel')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          No space found after comma in function call
          Open

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSEIF keyword; 0 found
          Open

                }elseif($active==1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

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

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<table border=0 class=\"displayListingTable\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $message = "cancelled";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $endstr -= 12;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

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

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

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSEIF keyword; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'activate')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

          if(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'submitEdit')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Opening brace should be on a new line
          Open

          function displayListing(){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

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

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo $today;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($active==2){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $DOW = date('w', strtotime($r['DOW']));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $occurrence_id = $r['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $active = $r['active'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $startstr -= 12;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo("<meta http-equiv=\"REFRESH\" content=\"0;url=service_admin_week.php\">");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSEIF keyword; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'edit')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $sql = "UPDATE service_attendance SET length = $length WHERE occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 10
          Open

                    $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                echo "<tr class=\"rowm1\">
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              die("error");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $result2 = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $dateMapNew = array(1,0,6,5,4,3,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              echo"<select name=\"occurrence_id\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

              }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

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

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $lastname = $r['lastname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'activate')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

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

          Expected 1 space after closing parenthesis; found 0
          Open

                if($max==-1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $rowClass = "row0";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                echo "<tr class=\"$rowClass\"><td>$DOW</td><td>$theDate</td><td>$name</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length</td><td>$message</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $occurrence_id = $r['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "<br/><input type='submit' name=\"Navigate\" value='cancel'/><input type='submit' name=\"Navigate\" value='view'/><input type='submit' name=\"Navigate\" value='activate'/><input type='submit' name=\"Navigate\" value='edit'/></form>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $maxDetailId = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if($detailDetailId > $maxDetailId){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($active==4){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = substr($start,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $occurrence_id = $r['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'activate')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'view')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($i == 0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<tr class=\"displayListing\"><td>date</td><td></td><td>name</td><td>start</td><td>end</td><td>current</td><td>max</td><td>hours</td><td></td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Expected 1 space after IF keyword; 0 found
          Open

                if($max==-1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $z1 = $dateMap1[$currentDOW1];//go through map
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

            if($detailDetailId > $maxDetailId){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'view')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $additional_info = "&p=-1";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                echo "<meta http-equiv=\"refresh\" content=\"0;URL='service_leader_dashboard.php?d=".$detail_id."&z=".$i.$additional_info."&o=".$occurrence_id."'\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $active = $r['active'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $startstr -= 12;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

                }elseif($active==1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              die("error");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                echo "<option value='$r[occurrence_id]'>$r[DOW] | $r[theDate] | $r[name] | start: $r[start]</option>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $day = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "</select>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          Expected 1 space after IF keyword; 0 found
          Open

                if($i == 0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $z1 = $dateMap1[$currentDOW1];//go through map
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              die("error");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($active==0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($active==0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          Expected 1 space after IF keyword; 0 found
          Open

                if($active==2){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $count = $r['count'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoEnd = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6-7+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

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

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $endstr -= 12;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          No space found after comma in function call
          Open

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $dateMap1 = array(0,6,5,4,3,2,1);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $z1 = $dateMap1[$currentDOW1];//go through map
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $sql = "INSERT INTO service_occurrence (detail_id, theDate, active, start, end, length, max)
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "</select>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

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

              $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          No space found after comma in function call
          Open

              $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$DOW+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $length = $r['length'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "<hr/>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

          if(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'cancel')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "UPDATE service_occurrence SET active = active-1 WHERE occurrence_id = ".$_POST['occurrence_id']."
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $i = $_POST['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            editPosting($i);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

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

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

          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo "<h2>Current Week</h2>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Expected 1 space after WHILE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $message = "";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = ".$occurrence_id;
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $startstr = substr($start, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $startstr = substr($start, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $endstr = substr($end, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

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

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($active==0){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

              }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

              $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $start = $r['start'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                echo "<option value='$r[occurrence_id]'>$r[DOW] | $r[theDate] | $r[name] | start: $r[start]</option>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            displayListing();
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

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

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = substr($end,0,-3)."am";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                echo "<tr><td>$DOW</td><td>$theDate</td><td>$name</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length</td><td>$message</td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

              echo"<select name=\"occurrence_id\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $detail_id = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

              }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "UPDATE service_attendance SET processed = -2 WHERE occurrence_id = ".$_POST['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "UPDATE service_attendance SET processed = 0 WHERE occurrence_id = ".$_POST['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            echo("<meta http-equiv=\"REFRESH\" content=\"0;url=service_admin_week.php\">");
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing brace; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'edit')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $start = $startstr.substr($start,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $endstr = substr($end, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $endstr = substr($end, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $sql = "UPDATE service_occurrence SET active = active+1 WHERE occurrence_id = ".$_POST['occurrence_id']."
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $event_id = $r['event_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $end = $r['end'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                while($r = mysqli_fetch_array($result2)){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

              }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

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

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }elseif($active==1){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date2 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+6+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after WHILE keyword; 0 found
          Open

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

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

              $detailDetailId = $r['detail_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($active==4){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $end = $endstr.substr($end,2,-3)."pm";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

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

              echo"<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 4
          Open

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

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $DOW = $r['DOW'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $max = $r['max'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $name = $r['name'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $startstr = substr($start, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

                  $startstr = substr($start, 0,2);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSEIF keyword; 0 found
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'view')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after IF keyword; 0 found
          Open

                if($end > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after ELSE keyword; 0 found
          Open

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

          Line indented incorrectly; expected 8 spaces, found 4
          Open

              }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $theDate = $r['theDate'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $user_id = $r['id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          No space found after comma in function call
          Open

            $date1 = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected at least 12 spaces, found 6
          Open

                $firstname = $r['firstname'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

                  $message = "cancelled";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 6
          Open

                }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            }
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $dateMap1 = array(0,6,5,4,3,2,1);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $weekAgoStart = (date('Y-m-d', mktime(0,0,0,date("m"),date("d")+$z1-7,date("Y"))));
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

          echo "<tr class=\"displayListing\"><td>date</td><td></td><td>name</td><td>start</td><td>end</td><td>current</td><td>max</td><td>hours</td><td></td></tr>";
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 2
          Open

            if(!$result){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($active==4){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

                if($start > 12){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $result = $db->query($sql);
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          Expected 1 space after closing parenthesis; found 0
          Open

          }elseif(isset($_POST['Navigate']) && ($_POST['Navigate'] == 'edit')){
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

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

            $i = $_POST['occurrence_id'];
          Severity: Minor
          Found in service_admin_week.php by phpcodesniffer

          The variable $detail_id is not named in camelCase.
          Open

          function editPosting($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
                    FROM contact_information AS c
                    JOIN service_leaders AS l
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $event_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $event_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 editPosting($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
                    FROM contact_information AS c
                    JOIN service_leaders AS l
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $event_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $additional_info is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function editPosting($i){
              include('mysql_access.php');
              $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
                    FROM contact_information AS c
                    JOIN service_leaders AS l
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $event_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $event_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $additional_info is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $occurrence_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $DOW is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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 $detail_id is not named in camelCase.
          Open

          function displayListing(){
            include('mysql_access.php');
            $dateMapNew = array(1,0,6,5,4,3,2);
            $dateMap1 = array(0,6,5,4,3,2,1);
            $currentDOW1 = date('w');//returns integer of DOW
          Severity: Minor
          Found in service_admin_week.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