APO-Epsilon/apo-website

View on GitHub
service_admin_week_setup.php

Summary

Maintainability
C
1 day
Test Coverage

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

initializeNewWeekForm accesses the super-global variable $_SERVER.
Open

function initializeNewWeekForm(){
  include('mysql_access.php');
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
  $z1 = $dateMap1[$currentDOW1];//go through map
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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

processNewWeek accesses the super-global variable $_POST.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.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 initializeNewWeekForm has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function initializeNewWeekForm(){
  include('mysql_access.php');
  $dateMap1 = array(0,6,5,4,3,2,1);
  $currentDOW1 = date('w');//returns integer of DOW
  $z1 = $dateMap1[$currentDOW1];//go through map
Severity: Major
Found in service_admin_week_setup.php - About 3 hrs to fix

    Function initializeNewWeekForm has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    function initializeNewWeekForm(){
      include('mysql_access.php');
      $dateMap1 = array(0,6,5,4,3,2,1);
      $currentDOW1 = date('w');//returns integer of DOW
      $z1 = $dateMap1[$currentDOW1];//go through map
    Severity: Minor
    Found in service_admin_week_setup.php - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method processNewWeek has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function processNewWeek(){
      include('mysql_access.php');
      $date = $_POST['date'];
      $detail_ids = $_POST['detail_ids'];
      $exclude = $_POST['exclude'];
    Severity: Minor
    Found in service_admin_week_setup.php - About 1 hr to fix

      Function processNewWeek has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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

      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_setup.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_setup.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_setup.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_setup.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_setup.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 initializeNewWeekForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

      }else{
        echo("Please wait to set up the next week until Monday");
      }
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm 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_setup.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 processNewWeek uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          }else{
            refresh();
          }
      Severity: Minor
      Found in service_admin_week_setup.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 processNewWeek uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          }else{
            $active = 3;
          }
      Severity: Minor
      Found in service_admin_week_setup.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 '$date2'.
      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_setup.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_setup.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 initializeNewWeekForm() contains an exit expression.
      Open

            die("error");
      Severity: Minor
      Found in service_admin_week_setup.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

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

      <?php
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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 $z. Configured minimum length is 3.
      Open

        $z = $dateMap[$currentDOW];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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

      Blank line found at start of control structure
      Open

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

      Blank line found at start of control structure
      Open

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

      Line exceeds 120 characters; contains 127 characters
      Open

              VALUES (".$detail_ids[$i].",'".$date[$i]."',".$active.",'".$start[$i]."','".$end[$i]."',".$length[$i].",".$max[$i].")";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line exceeds 120 characters; contains 200 characters
      Open

                echo("<tr><td width=\"20%\"><input type=\"checkbox\" name='exclude[]' value=\"$detail_id\"/></td><td>".$day." | ".$name."  :  ".$firstname." ".$lastname."  ".$start." - ".$end."</td></tr>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line exceeds 120 characters; contains 122 characters
      Open

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

      Line exceeds 120 characters; contains 161 characters
      Open

            $sql = "UPDATE service_occurrence SET active = $active WHERE (active = 1 OR active = 2 OR active = 3) AND detail_id = ".$detail_ids[$i]." AND active != 0";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line exceeds 120 characters; contains 182 characters
      Open

                //echo("<tr><td width=\"20%\"><input type=\"checkbox\" name='exclude[]' value=\"$detail_id\"/></td><td>".$date." | ".$eventDayInYR." | ".$DOW." | ".$r['DOW']."</td></tr>");
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

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

        $num_rows = 0;
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

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

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

        echo("Please wait to set up the next week until Monday");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

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

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          if($date >= $date1){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function initializeNewWeekForm(){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

            $num_rows = 1;
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

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

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

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

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

                echo("<input type=\"hidden\" name=\"allDID[]\" value=\"$detail_id\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Closing brace indented incorrectly; expected 2 spaces, found 0
      Open

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

      No space found after comma in function call
      Open

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

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

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

      Line indented incorrectly; expected 12 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

        processNewWeek();
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        <?php require 'head.php';?>
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.php by phpcodesniffer

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

        $eventDayInYR = date('z') + $z-1;//the start
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

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

      Line indented incorrectly; expected 8 spaces, found 4
      Open

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

      Line indented incorrectly; expected 8 spaces, found 4
      Open

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

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

            $sql = "UPDATE service_occurrence SET active = $active WHERE (active = 1 OR active = 2 OR active = 3) AND detail_id = ".$detail_ids[$i]." AND active != 0";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

            refresh();
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        for ($i = 0; $i <= 6; $i++){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

        for ($i = 0; $i <= 6; $i++){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

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

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

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

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

                echo("<input type=\"hidden\" name=\"end[]\" value=\"$end\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

      Space before opening parenthesis of function call prohibited
      Open

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

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

      echo "<h2>Set-Up a new week ({$date1} to {$date2})</h2>";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

      echo<<<FORM
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

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

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

      echo<<<FORM
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function processNewWeek(){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

        $detail_ids = $_POST['allDID'];
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

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

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

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

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

      initializeNewWeekForm();
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.php by phpcodesniffer

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

        $sql = "SELECT DATE(o.theDate) AS date
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

                echo("<input type=\"hidden\" name=\"date[]\" value=\"$date\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 0
      Open

      }else{
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

            $active = 4;
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

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

        $z = $dateMap[$currentDOW];//go through map
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

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

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

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

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

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

      No space found after comma in function call
      Open

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

      No space found after comma in function call
      Open

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

      Expected 1 space after closing brace; 0 found
      Open

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

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

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

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

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

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

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

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

        $sql = "SELECT * FROM service_details";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        for($i = 0; $i < count($detail_ids); $i++){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

        for($i = 0; $i < count($detail_ids); $i++){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

      if(isset($_POST['newWeekFormSubmit'])){
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        if(($num_rows)==0){
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

        $end = $_POST['end'];
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

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

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

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

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

                echo("<input type=\"hidden\" name=\"max[]\" value=\"$max\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

            $row = mysqli_fetch_assoc($result);
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

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

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

      Expected 1 space after IF keyword; 0 found
      Open

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

      Line indented incorrectly; expected 12 spaces, found 4
      Open

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

      Expected 1 space after closing brace; 0 found
      Open

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

      Expected 1 space after ELSE keyword; 0 found
      Open

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

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

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

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

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

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

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

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

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

      Expected 1 space after closing parenthesis; found 0
      Open

          for ($i = 0; $i<$num_rows; $i++){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

            $active = 3;
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

          }else{
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

      echo "<a href=\"service_admin_week.php\">back to dashboard</a><br/>";
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

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

                echo("<input type=\"hidden\" name=\"z[]\" value=\"$eventDayInYR\"/>");
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          if($date >= $date1){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

        $num_rows = mysqli_num_rows($result);
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

          echo "select all to exclude each time";
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 4
      Open

          }else{
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

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

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

            $detail_ids[$i] = $row['detail_id'];
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      No space found after comma in function call
      Open

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

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          if(in_array($detail_ids[$i], $exclude)){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

        $active = 3;
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          if(in_array($detail_ids[$i], $exclude)){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

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

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

              refresh();
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 6
      Open

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

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }else{
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

        $currentDOW = date('w');//returns integer of DOW
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          if($date >= $date1){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

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

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

                echo("<input type=\"hidden\" name=\"start[]\" value=\"$start\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

        $max = $_POST['max'];
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

            $detail_ids;
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          if(in_array($detail_ids[$i], $exclude)){
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

          }else{
      Severity: Minor
      Found in service_admin_week_setup.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_setup.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_setup.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_setup.php by phpcodesniffer

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

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

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

          $eventDayInYR += 1;
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 6
      Open

            while($r = mysqli_fetch_array($result)){
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      No space found after comma in function call
      Open

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

      Line indented incorrectly; expected 20 spaces, found 8
      Open

              }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after FOR keyword; 0 found
      Open

        for($i = 0; $i < count($detail_ids); $i++){
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

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

        die("you do not have sufficient permissions to view this page.");
      Severity: Minor
      Found in service_admin_week_setup.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_setup.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 8
      Open

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

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

                echo("<tr><td width=\"20%\"><input type=\"checkbox\" name='exclude[]' value=\"$detail_id\"/></td><td>".$day." | ".$name."  :  ".$firstname." ".$lastname."  ".$start." - ".$end."</td></tr>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

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

                echo("<input type=\"hidden\" name=\"length[]\" value=\"$length\"/>");
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 4
      Open

          }
      Severity: Minor
      Found in service_admin_week_setup.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

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

      Space before opening parenthesis of function call prohibited
      Open

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

      The variable $DOW is not named in camelCase.
      Open

      function initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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 $num_rows is not named in camelCase.
      Open

      function initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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 $num_rows is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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 $num_rows is not named in camelCase.
      Open

      function initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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 $num_rows is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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 $num_rows is not named in camelCase.
      Open

      function initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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 initializeNewWeekForm(){
        include('mysql_access.php');
        $dateMap1 = array(0,6,5,4,3,2,1);
        $currentDOW1 = date('w');//returns integer of DOW
        $z1 = $dateMap1[$currentDOW1];//go through map
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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_ids is not named in camelCase.
      Open

      function processNewWeek(){
        include('mysql_access.php');
        $date = $_POST['date'];
        $detail_ids = $_POST['detail_ids'];
        $exclude = $_POST['exclude'];
      Severity: Minor
      Found in service_admin_week_setup.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