<?php


function P_SERVICE($ID) {
 global $error,$thiss,$result;

 if($COMMAND=='POST_VERIFY') { 
   echo "Weryfikacja niedostepna";
  } else {
  if($_SESSION['CURRENT_MENU']==$thiss->DETECT_EDIT_FUNCTION) {
   if($_SESSION['CURRENT_MENU']=='SES_USERS2_A_EDIT') { 

      ZAP_SQL("SELECT * from EXTRA_SERVICES where ID_SERVICES='".$_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDIT_TEMPLATE']['ID_SERVICES']."' ");
       echo "<table border=1 cellspacing=0 cellpadding=1>";
       while ($h=mysql_fetch_object($result)) {
          echo "<tr>";
	  echo "<td ".USERS_COLUMN_COLOR_RETURN(A_STATUS,$h->A_STATUS,bgcolor)."><a href=$PHP_SELF?MENU_INIT=EXTRA_SERVICES_EDIT&ARG1=EDIT&ARG1_VAL=".$h->ID." alt=EDYCJA_PODRZEDNEJ_USLUGI>".$h->E_SERVICE." ".$h->A_STATUS_INFO."</a></td>" ; 
          echo "<td>ID:".$h->ID."</td>";       
	  echo "<td ".USERS_COLUMN_COLOR_RETURN(A_PROBLEM,$h->A_PROBLEM,bgcolor).">".$h->A_PROBLEM . $h->A_PROBLEM_DESC."</td>" ; 
	  echo "<td ".USERS_COLUMN_COLOR_RETURN(A_PROBLEM_DATE,$h->A_PROBLEM_DATE,bgcolor).">".$h->A_PROBLEM_DATE."</td>" ; 
	  echo "<td>".$h->E_SERVICE."@".$h->T_NETWORK_SERVER."</td>" ; 
	  echo "<td>".$h->E_S_V.":".$h->E_S_V2.":".$h->E_S_V3.":".$h->E_S_V4."".$h->E_S_V5.":".$h->E_S_V6."</td>" ; 
	  echo "<td ".USERS_COLUMN_COLOR_RETURN(L_APPOITMENT_DATE,$h->P_HANGUP_FROM,bgcolor).">Zawieszenie_od:".$h->P_HANGUP_FROM."</td>" ; 
	  echo "<td ".USERS_COLUMN_COLOR_RETURN(L_APPOITMENT_DATE,$h->P_HANGUP_TILL,bgcolor).">do:".$h->P_HANGUP_TILL."</td>" ; 
	echo "</tr>";
       }
          echo "</table>";
if(strstr($_SESSION[$thiss->DETECT_TABLE_COLUMN]['PERMEDIT']['P_SERVICE'],"W"))  GETFORMITEM($_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['P_SERVICE'],$_SESSION[$thiss->DETECT_TABLE_COLUMN]['TYPE']['P_SERVICE'],'P_SERVICE'); else echo $_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['P_SERVICE'] ;
//TODO
  echo "<a href=$PHP_SELF?MENU_INIT=NEW_EXTRA_SERVICES&ARG1=NEWRECORDPARENT&ARG1_VAL".$_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDIT_TEMPLATE']['ID_SERVICES'].">+</a>";
   } else if(strstr($_SESSION[$thiss->DETECT_TABLE_COLUMN]['PERMEDIT']['P_SERVICE'],"W")) GETFORMITEM($_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['P_SERVICE'],$_SESSION[$thiss->DETECT_TABLE_COLUMN]['TYPE']['P_SERVICE'],'P_SERVICE'); else echo $_SESSION[$thiss->DETECT_TABLE_COLUMN]['EDITRECORD']['P_SERVICE'] ;
  } 
 }


}

?>
