/**
  * Prints the template header HTML for a non-modal window.
  *
  * @param string page title
  * @param array JavaScript / CSS files to load
  * @return void
  */
 public static function printHeader($pageTitle, $headIncludes = array())
 {
     pageTitle($pageTitle);
     if($headIncludes)
     {
         foreach($headIncludes as $include)
         {
             pageHeaderInclude($include);
         }
     }
 }
			var getQuantity = document.getElementById("quantity").value;

			if(!quantityRegex.test(getQuantity) || getQuantity==0){ // error if quantity isn't a number or if it's 0
				document.getElementById("quantityError").textContent = "Invalid Quantity";
			} 
			else {
				document.getElementById("quantityError").textContent = "";
				document.purchaseForm.hItemId.value=iid; //hidden value for hItemId set to iid
				document.purchaseForm.action.value=action; //hidden action value set
				document.purchaseForm.hQuantity.value=getQuantity; //hidden hQuantity value set to quantity
				document.purchaseForm.submit(); //submit the form
			}
		}
		</script>
		<?php 
pageTitle($_GET['itemID']);
?>
	</head>
	<body>		
		<div id="header">			
			<div id="headBox">
				<div id="logo">
					<img alt="Sheet Music Logo" src="images/logo.png">
				</div>
				<div id="topLinks">
					<span id="topLinkStyle">
						<span class="homeLink">
							<?php 
signInStatus();
?>
						</span>
Exemple #3
0
<?php

pageHeaderInclude('js/highlightrows.js');
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/export.js');
pageHeaderInclude('js/dataGrid.js');
pageTitle('Lists');
ob_start();
if ($this->dataGrid->getNumberOfRows()): ?>
            <table width="100%">
                <tr>
                    <td width="3%">
                        <img src="images/job_orders.gif" width="24" height="24" border="0" alt="Job Orders" style="margin-top: 3px;" />&nbsp;
                    </td>
                    <td><h2>Lists: Home</h2></td>
                    <td align="right">
                        <form name="jobOrdersViewSelectorForm" id="jobOrdersViewSelectorForm" action="<?php echo(CATSUtility::getIndexName()); ?>" method="get">
                            <input type="hidden" name="m" value="joborders" />
                            <input type="hidden" name="a" value="list" />

                            <table class="viewSelector">
                                <tr>
                                    <td>
                                    </td>
                                 </tr>
                            </table>
                        </form>
                    </td>
                </tr>
            </table>
Exemple #4
0
function cpPhpcron ($phpcron_command="default") {
  global $PHP_SELF;

  global $phpcron_file;
  global $phpcron_off;
  global $phpcron_psinfo_file;
  global $assignment_info,$user_config_file, $left_mlc_ch, $right_mlc_ch, $sc_ch, $uc_contents_length;
  global $uc_contents, $uc_contents_length;
  global $cp_left_col;
  global $cp_right_col;
  global $cp_row_title;
  global $cp_title;
  global $status_on;
  global $status_off;
  global $status_venabled;
  global $phpcrontab_filename;
  global $log_result_file;
  global $admin_email_address;
  global $system_name;
  global $daemon_mode;
  global $phpcron_venabled_file;
  global $enable_virtual_daemon;
  global $phpcron_output_file;
  global $admin_email_address;
  global $error_messages;
  global $php_path;

   echo pageTitle("PHPCRON Admin - Control Panel");


  switch ($phpcron_command) {

  case "VStop":

    /* Disable Virtual Daemon */
	 
    if (file_exists($phpcron_venabled_file)) {
         
    
    deleteFile($phpcron_venabled_file);
    
    appendToFile("
****************************************************************
PHPCRON Virtual Daemon Stopped ".date("m/d/Y").":".date("h:i:s:A")."
****************************************************************
", $log_result_file);

 
    
    
    }

    break;
    
    case "DStop":

    /* Turn off Daemon */
    
    if(!stopOtherPhpcron()) {
     $error_messages.="
    Error: Cannot Stop Phpcron. Make sure the server process can write to ".dirname($phpron_off)."<BR>";
    
    }
  
    
    break;

  case "Start":


 
     $os_formatted_path=formatPath($phpcron_file);

  
	  if ($enable_virtual_daemon) { 

    /*Enable Virtual Daemon */

        /* If no perpetual loop just write "VIRTUAL DAEMON ENABLED" to phpcron_venabled_file. This will
        allow phpcron to be run from the unix crontab with the phpcron_virtuald script. 
         */
	 


       $save_results=saveFile("VIRTUAL DAEMON ENABLED", $phpcron_venabled_file);
	    appendToFile("
****************************************************************
PHPCRON Virtual Daemon Started ".date("m/d/Y").":".date("h:i:s:A")."
****************************************************************
", $log_result_file);



        if(!$save_results[0]) { //if not a successful save get error messages

        $index=1;
        $output="";
        while($save_results[$index]) {
        $output.=$save_results[$index];
        $index++;
        }


    $error_messages.=implode("\r\n",$save_results).
"Cannot Enable Virtual Daemon- Must be able to write to ".formatPath($phpcron_venabled_file)." in order for PHPCRON Admin
to control PHPCRON's execution. You will need to fix, and try again for PHPCRON Admin to work properly.<br>\r\n";

        } else {
	
       $error_messages.="The Virtual Daemon has been enabled. Make sure you place phpcron_virtuald
       on your unix crontab file using crontab -e.\n";



      }

	break;
    }
    
    /* Otherwise Start Up PHPCRON.PHP in either daemon(perpetual) or non-daemon mode) */
         
     if(isOtherPhpcrond() and $daemon_mode) { 
            $error_messages.="PHPCRON is already running in daemon mode - Cannot start more than one instance<br>";

     } else {

      /*Start phpcron in background. NoHup allows it to continue after logout */

   
      if ($daemon_mode) {
      $exec_string="nohup $php_path $os_formatted_path -r $phpcron_output_file > /dev/null &";
            } else {
      $exec_string="$php_path $os_formatted_path -r $phpcron_output_file";
               
      }
      //$error_messages.=$exec_string;
       exec($exec_string);


      sleep(1);    

      
      
      if (!$daemon_mode) {
      $error_messages.="Ran PHPCRON only once. This is usually only 
      done for testing purposes.<br>\n";
      
      } 
      
    } 
      
          /* Know there's an error somewhere if the output file can't be made */
	 
	    if (!file_exists("$phpcron_output_file")) {

	     $error_messages.= "
        	  Error: Failed to execute $phpcron_file. Check path and permissions. Can't read $phpcron_output_file.
        	  <br>
        	  ";
    	    }





    break;


  case "Email_Log":

  $attachment=$log_result_file;
  $mimetype="text/english";

  $subject="$system_name PHPCRON Log File Attached";
  $body="PHPCRON Log file is attached for $system_name";

if($mailserver_error=mailAttachment($log_email_address, $subject, $body, $attachment, $mimetype)) {


  $error_messages.="Error: Unable to Email Log File:<br>\r\n".$mailserver_error;
  } else {
  $error_messages.="Emailed Log File to $admin_email_address";
  }

  break;
  
  
  

 case "Delete_Log":
   $error_messages.=clearLogFile($log_result_file);
   break;



  case "Save_UC":


    list($uc_contents, $uc_contents_array)=parseUserConfig($user_config_file, $left_mlc_ch, $right_mlc_ch, $sc_ch);

    /* For Debugging (echo to screen instead of save):
    echo "File Rebuilt is: ".nl2br(htmlentities(rebuildUserCfg($assignment_info, $uc_contents_array)))."<br>";

    */

    /* Rebuild User Configuration File, then Save it */

      $save_results=saveFile(rebuildUserCfg($assignment_info, $uc_contents_array), $user_config_file);

        if($save_results[0]) { //this would be successful save
    
        $settings_state="
        <em>
        Options saved with the following settings:
        </em>
        <br>
        ";
      } else {
        $index=1;
        while($save_results[$index]) {
        $error_messages.=$save_results[$index];
        $index++;
        }
        $element=0;
        $tab_save_error=true;
        $error_messages.="Please fix and try again.<br>";


      }

     

  
    //Load Newly Saved File

    $uc_contents = addslashes(implode ("", file ($user_config_file)));
    $uc_contents_length=strlen($uc_contents);  
    
    /* Include new values to override old values included at top of file */
    include($user_config_file); 
  //no break - just let it flow into default

  default:
  break;
}

  
  /* Build Main Control Panel Box */

  $output.=    "
    <!--**********Begin JavaScript*******************-->
    <SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\">
     <!--  


   function isNumber(theField) {
   string=theField.value;
    for (i = 0; i < string.length; i++)   {   
          // Check that each character is number.
          var c = string.charAt(i);
  
          if (!((c >= \"0\") && (c <= \"9\")))  {
        
        alert(\"This field requires a number.\");
        theField.focus();
        return false;
        }
      }
     return true;
   }

    -->    

    </SCRIPT>
    <!--**********End JavaScript*******************-->

  <!--**********Begin Control Panel Table**************-->
  <table align=\"center\" border=\"0\" class=\"control_panel\" cellpadding=\"2\" cellspacing=\"0\" width=\"600px\" summary=\"Control Panel\">
        <tr>
        <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_title>
                <strong>PHPCRON CONTROL PANEL</strong>
        </td>
      </tr>
      <tr>
          <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <strong>Status</strong>
          </td>
      </tr>
      <tr>
        <td style=$cp_left_col>
          Server OS:
        </td>
        <td style=$cp_right_col>
            ".PHP_OS."
        </td>
        </tr>
        ";

  if (isOtherPhpcrond()) {

  $daemon_running=true;
  }
  
  $output.="
        <tr>
          <td style=$cp_left_col>
            Mode:
          </td>
	  ";
  if ($daemon_mode) {
    $output.="
         <td style=$cp_right_col>
            Daemon
          </td>
	  </tr>
	  ";
    
  } else {
  
   $output.="<td style=$cp_right_col>
            Non-Daemon
          </td>
	  </tr>
	  ";  
    
  }
  
    $output.="

        <tr>
          <td style=$cp_left_col>
            Daemon Running ?
          </td>
	  ";
  
	  
  if($daemon_running) {
  $output.="
          <td style=$status_on>
            Yes
          </td>
        </tr>";
	

  } else {
  
    $output.="
          <td style=$status_off>
            No
          </td>
        </tr>";
	  
  
  
  }


  //Echo Process Info if in Unix
  if(!MS_WINDOWS and file_exists($phpcron_psinfo_file)) {

        $file_contents=file($phpcron_psinfo_file);

          $output.= "
              <tr>
              <td style=$cp_left_col>
                 Owner:
               </td>
              <td style=$cp_right_col>
                  $file_contents[1]<br>
              </td>
            </tr>
            <tr>
              <td style=$cp_left_col>
                 Process Id:
               </td>
              <td style=$cp_right_col>
                  $file_contents[2]
                  <br>
                  <br>
              </td>
            </tr>
            ";

    }

  $output.="
    <tr>
        <td valign=\"baseline\" style=$cp_left_col>
          Start/Stop Controls:
        </td>
          ";
  
  if (MS_WINDOWS){
  if (!$daemon_running) {
  $output.="
     <td style=$cp_right_col>
  Start Control Not Available in Windows
  </td>
  </tr>
  <tr>";
  }
  
     
  $end_output .= "Please note that PHPCRON Admin does not allow starting PHPCRON under any Microsoft
  operating system (this may be fixed in a future version).  If using PHPCRON on a remote server, you 
  will need to start PHPCRON through a telnet session. A start control will only appear and work under Unix.
  You can however, enable the Virtual Daemon
  <br>
  ";
  }

  

  
 
  if (!MS_WINDOWS and $daemon_mode and !$daemon_running) {  
      $output.="
      <td style=$cp_right_col>
      <form action=$PHP_SELF method=\"post\">
      <input type=\"hidden\" name=\"phpcron_command\" value=\"Start\">
      <input type=\"submit\" value=\"Start Daemon\">
        </form>
	</td>
      ";
      
  } elseif (!MS_WINDOWS and !$daemon_mode and !$daemon_running) {
  
  $output.="
  
      <td style=$cp_right_col>
      <form action=$PHP_SELF method=\"post\">
        <input type=\"hidden\" name=\"phpcron_command\" value=\"Start\">
  	<input type=\"submit\" value=\"Run PHPCRON Once\">
        </form>
	</td>
      ";
  
   
  }

  
 if ($daemon_running) {

 $output.="
         <td style=$cp_right_col>
        <form action=\"$PHP_SELF\" method=\"post\">
        <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
        <input type=\"hidden\" name=\"phpcron_command\" value=\"DStop\">
        <input type=\"submit\" value=\"Stop Daemon\">
        </form>
        </td>        
        ";

}


  $output.="  
        </tr>
        <tr>
          <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <strong>Virtual Daemon</strong>
          </td>
      </tr>    
  
        <tr>
          <td style=$cp_left_col>
            Virtual Daemon:
          </td>
	  ";
  
  
  if (file_exists($phpcron_venabled_file)) {
      $output.="
          <td style=$status_on >
            Enabled
	 </td>
        </tr>
        ";
   
  } else {
      $output.="
          <td style=$status_off >
             Disabled
          </td>
        </tr>
        ";
  }



if (file_exists($phpcron_venabled_file)) {

 
  $output.="
	<tr>
        <td style=$cp_left_col>
	&nbsp;
        </td>
	<td style=$cp_right_col>    
        <form action=\"$PHP_SELF\" method=\"post\">
        <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
        <input type=\"hidden\" name=\"phpcron_command\" value=\"VStop\">
        <input type=\"submit\" value=\"Disable\">
        </form>
        </td>
        
        ";

} else {

    $output.="
      <tr>
      <td style=$cp_left_col>
      	&nbsp;
      </td>
    
      <td style=$cp_right_col>    
      <form action=$PHP_SELF method=\"post\">
      <input type=\"hidden\" name=\"phpcron_command\" value=\"Start\">       
      <input type=\"hidden\" name=\"enable_virtual_daemon\" value=\"true\">   
      <input type=\"submit\" value=\"Enable\">
        </form>
	</td>
	
      ";


}



  /* Save and Reset of Options */


    //allow to revert to original file
  $output.="

      </tr>
		<tr>
          <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <strong>Update Status</strong>
      </td>
      </tr>    
      <tr>
                <td style=$cp_left_col>
                    &nbsp;
                </td>
                <td style=$cp_right_col>
                <form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Update\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                </form>

                <!--************Begin Options Form************ -->


                </td>

      </tr>


      ";

     //Save Options


  /* Build Options Box */

     if($phpcron_command != "Save_UC") {

      $settings_state="
        <em>
        Current Settings:
        </em>
        <br>";
     }
    /*Separate out Multi-Line Comments, Single Line Comments, and Executable Portions of
    file into identifiable arrays stored in $uc_contents_array */
    list($uc_contents, $uc_contents_array)=parseUserConfig($user_config_file, $left_mlc_ch, $right_mlc_ch, $sc_ch);


    //Split up executable string into ordered arrays containing variable, value, and type of variable

      if($assignment_info=getAssignmentInfo($uc_contents_array)){

        $options_output.="
        <tr>
          <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <form action=\"$PHP_SELF\" method=\"post\">
              <strong>Options</strong>
              <br>
              (Set in ".formatPath($user_config_file).
      ")<br>
              $settings_state
          </td>

        ";


      $horiz_pos=0;
      while($horiz_pos<$uc_contents_length) {

      $i=0;
        while($assignment_info[$horiz_pos][$i]["variable"]) {
            $cell_width="400px";

            $options_output.="
            </tr>
            <tr>
               <td style=$cp_left_col width=\"$cell_width\">".
                $assignment_info[$horiz_pos][$i]["variable"].
                " (".$assignment_info[$horiz_pos][$i]["type"].
                "):".
              "</td>
              <td style=$cp_right_col width=\"$cell_width\" valign=\"middle\">".
                getFormElement($assignment_info[$horiz_pos][$i]["variable"], $assignment_info[$horiz_pos][$i]["value"], $assignment_info[$horiz_pos][$i]["type"], $horiz_pos, $i)."
                <input type=\"hidden\" name=\"assignment_info[$horiz_pos][$i][variable]\" value=\"".$assignment_info[$horiz_pos][$i][variable]."\">
		
                  <input type=\"hidden\" name=\"assignment_info[$horiz_pos][$i][type]\" value=\"".$assignment_info[$horiz_pos][$i]["type"]."\">

              </td>
            ";
            $i++;

        }
      $horiz_pos++;
      }
        $options_output.=
        "

           <!--*****************Begin Submit Buttons *********************-->
         <tr>
              <td style=$cp_left_col>
              <HR>
              </td>
              <td style=$cp_right_col>
              <HR>
              </td>
         </tr>


         <tr>
          <td style=$cp_left_col>
          Save Changes To Options:
          </td>
          <td style=$cp_right_col>

          <input type=\"submit\" value=\"Save\">
          <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
          <input type=\"hidden\" name=\"phpcron_command\" value=\"Save_UC\">
          </form>
          </td>
        </tr>

           <tr>
                <td style=$cp_left_col >
                    Reset Options to Values in File:
                </td>
                <td style=$cp_right_col>
                <form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Reset\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                </form>
                </td>

           </tr>

          <!--*****************End Submit Buttons *********************-->



         <!--*************************BEGIN PHPCRONTAB DISPLAY IN TEXT AREA*********************-->
        <tr>

               <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <strong>PHPCRONTAB SCHEDULE </strong>
              </td>
        </tr>
        <tr>


            <td style=$cp_right_col colspan=\"2\" >
                <form name=\"po_form\">
                  <input type=\"hidden\" name=\"focushere\">
                      <textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\">";

                      //Read from phpcrontab file
                      $path_errors=isPathBad($phpcrontab_filename,true,true); 
			if ($path_errors) {
//                      $error_messages.="Error: Unable to read file ".formatPath($phpcrontab_filename)."<br>";

                        while ( list($file_or_dir, $error_string) = each($path_errors)) {

                          while (list($each_error)  = each($error_string)) {
                            $error_messages.=$path_errors[$file_or_dir][$each_message];
                          }
                         }
			 }

                          $tab_output=explode("<br>","ERROR: CANNOT DISPLAY PHPCRONTAB\n ");
                        if (is_readable($phpcrontab_filename)) {
                          $tab_output=file($phpcrontab_filename);
                       }

                      $options_output.=implode("",$tab_output)."
                    </textarea>
                </form>
            </td>
        </tr>

         <!--*************************END PHPCRONTAB DISPLAY IN TEXT AREA*********************-->


           <!--*****************Begin Submit Buttons *********************-->
         <tr>

              <td style=$cp_right_col colspan=\"2\">
              <HR>
              </td>
         </tr>



         <tr>
         <!--
                <td style=$cp_left_col >
                    Edit Schedule (Basic):
                </td>
        -->
                <td style=$cp_right_col colspan=\"2\">
                <form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Edit Schedule (Basic)\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Edit_Tab_By_Form\">
                </form>
                </td>

           </tr>
           <tr>

              <td style=$cp_right_col colspan=\"2\">
              <HR>
              </td>
         </tr>


          <!--*****************End Submit Buttons *********************-->



    <!--*************************BEGIN PHPCRON OUTPUT DISPLAY IN TEXT AREA*********************-->
        <tr>

               <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <a name=\"Output_Display\">
              <strong>PHPCRON OUTPUT </strong>
              </a>
              </td>
        </tr>
        <tr>


            <td style=$cp_right_col colspan=\"2\" >
                <form name=\"po_form\">
                  <input type=\"hidden\" name=\"focushere\">
                      <textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\">";

                      //Read from phpcron_output file
                      if ($path_errors=isPathBad("$phpcron_output_file",true,true)) {

                       $error_messages.="Error: Unable to read output file ".formatPath("$phpcron_output_file")."<br>";

                        while ( list($file_or_dir, $error_string) = each($path_errors)) {

                          while (list($each_error)  = each($error_string)) {
                            $error_messages.=$path_errors[$file_or_dir][$each_error];
                          }
                         }
		
                          $command_output=explode("<br>","ERROR: CANNOT DISPLAY PHPCRON OUTPUT\r\nCannot Read Output File $phpcron_output_file\n ");
			
                       } else {
                          $command_output=file("$phpcron_output_file");
                       }

                      $options_output.=implode("",$command_output)."
                    </textarea>
                </form>
            </td>
        </tr>

         <!--*************************END PHPCRON OUTPUT DISPLAY IN TEXT AREA*********************-->
         <!--*************************BEGIN SUBMIT BUTTONS ****************************-->
         <tr>
                <td style=$cp_right_col colspan=\"2\">
                <form action=\"$PHP_SELF#Output_Display\" method=\"post\">
                <input type=\"submit\" value=\"Update Display\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                </form>
                </td>

          </tr>
          <!--*************************END SUBMIT BUTTONS ****************************-->

      <!--*************************BEGIN PHPCRON LOG DISPLAY IN TEXT AREA*********************-->
        <tr>

               <td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title>
              <a name=\"log_display\">
              <strong>PHPCRON COMMAND LOG </strong>
              </a>

              </td>
        </tr>
        <tr>



            <td style=$cp_right_col colspan=\"2\">


                <form name=\"log_form\" >

                  <input type=\"hidden\" name=\"focuslog\">
                      <textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\">";

                      //Read from phpcron_output file
                      if ($path_errors=isPathBad($log_result_file,true,true)) {


		       

                        while ( list($file_or_dir, $error_string) = each($path_errors)) {

                          while (list($each_error)  = each($error_string)) {
                            $error_messages.=$path_errors[$file_or_dir][$each_error];
                          }
                         }
			 
		       $error_messages.="Error: Unable to read log file ".formatPath($log_result_file)."<br>
		       This will occur if Phpcron has not been run as a Daemon or Virtual Daemon yet, since
		       the log is only created at that point.<br>";
		       

                          $log_output=explode("<br>","ERROR: CANNOT DISPLAY LOG FILE\r\nTo create, run Phpcron in Daemon mode or as a Virtual Daemon.\r\n			  
			  ");
                       } else {
                          $log_output=file($log_result_file);
                       }

                      $options_output.=implode("",$log_output)."
                    </textarea>

                </form>

            </td>


        </tr>

         <!--*************************END PHPCRON LOG DISPLAY IN TEXT AREA*********************-->
         <!--*************************BEGIN SUBMIT BUTTONS ****************************-->
         <tr>
                <td style=$cp_right_col colspan=\"2\">
                <form action=\"$PHP_SELF#log_display\" method=\"post\" onSubmit=\"document.log_form.scrollIntoView(false);\">
                <input type=\"submit\" value=\"Update Display\">
                
                </form>
		
		<form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Download Log File\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                <input type=\"hidden\" name=\"download_log\" value=\"true\">
                </form>

                <form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Email Log File To:\">
		<input type=\"text\" name=\"log_email_address\" value=\"$admin_email_address\">	
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                <input type=\"hidden\" name=\"phpcron_command\" value=\"Email_Log\">
                </form>
		
                <form action=\"$PHP_SELF\" method=\"post\">
                <input type=\"submit\" value=\"Permanently Clear Log File\">
                <input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\">
                <input type=\"hidden\" name=\"phpcron_command\" value=\"Delete_Log\">
                </form>

                </td>

          </tr>
          <!--*************************END SUBMIT BUTTONS ****************************-->



          <tr>
            <td align=\"center\" colspan=\"2\" style=$cp_row_title>
                   &nbsp;
            </td>

        </tr>

        </table>

       <!--**********End Control Panel Table**************-->
        ";

    } else {
      
        /* Syntax for user config file allows comments but is somewhat strict -stick to 
        assignments only! and no sinqle quoted strings */
        $output.="
        </table>
        <!--**********End Control Panel Table**************-->
        ";
        $error_messages.= "
        <br>Error: Syntax error in user configuration file ".formatPath($user_config_file).". User configuration file should only
    contain variable assignments and comments in proper php syntax - and must include php ending script characters (only &lt?php and ?&gt 
    are supported). No other statements or html should be included. Please edit manually and try again.
        ";
    }


  /* Echo to Page */

  echo menuBar()."<br>";
    if ($error_messages) {
       echoErrorMessages($error_messages);
    }
  echo $output.
  $options_output;
    if($end_output){
    echo "
    <span class=\"notes\">
       <hr>
        $end_output
      <hr>
    </span>
    "; 
    }
  echo "
  <br>
  ".menuBar();


}
<?php
pageHeaderInclude('js/highlightrows.js');
pageHeaderInclude('modules/settings/validator.js');
pageHeaderInclude('js/listEditor.js');
pageTitle('Settings');
ob_start();

 ?>
<p class="note">Customize Extra Fields</p>

<form name="editSettingsForm" id="editSettingsForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&amp;a=customizeExtraFields" method="post">
  <input type="hidden" name="postback" value="postback" />
  <table class="sortable" width="920">
    <div id="changedDiv" style="display:none;">
      <div style="font-weight:bold; border: 1px solid #000; background-color: #ff0000; padding:5px;">
         You have made changes, to apply them press 'Save' at the bottom of the page.
      </div>
      <br />
    </div>
    <input type="hidden" name="commandList" id="commandList" />
    <script type="text/javascript">
       function appendCommandList(command)
       {
          document.getElementById('commandList').value = document.getElementById('commandList').value + escape(command) + ',';
          document.getElementById('changedDiv').style.display = '';
          document.getElementById('buttonSave').style.display = '';
          document.getElementById('buttonDone').style.display = 'none';
       }
       var inlineEditIDCounter = 0;
    </script>
        <?php foreach (array(array("name" => "Job Orders", "RS" => $this->extraFieldSettingsJobOrdersRS, "type" => DATA_ITEM_JOBORDER), 
Exemple #6
0
 * Copyright (C) 2014 - 2015 Auieo Software Private Limited, Parent Company of Unicomtech.
 * 
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include_once("modules/candidates/ClsCandidateView.php");
$indexName=CATSUtility::getIndexName();
ob_start();
pageHeaderInclude('js/activity.js');
pageHeaderInclude('js/sorttable.js');
pageHeaderInclude('js/match.js');
pageHeaderInclude('js/lib.js');
pageHeaderInclude('js/pipeline.js');
pageHeaderInclude('js/attachment.js');

pageTitle('Candidate - '.$this->data['first_name'].' '.$this->data['last_name']);
//TemplateUtility::printHeader('Candidate - '.$this->data['firstName'].' '.$this->data['lastName'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js'));
$test = array(8=>1,9=>2,10=>3,11=>4,12=>5,13=>6,14=>7,15=>8);

$hookFunction=function ($k,$v,$data)
{
    if($k=="address") return nl2br("pppp".htmlspecialchars($data['address']));
    return true;
};

$AUIEO_HEADER=  ob_get_clean();$data=$this->data;//trace($data);
$objCandidateView=new ClsCandidateView($this->data);
$arrRender=$objCandidateView->render($hookFunction);//trace($arrRender);
$AUIEO_RECORD_ID=$this->data["candidate_id"];
//$arrRender=$objCandidateView->render();
$AUIEO_JSON_DATA=  json_encode($this->data);
Exemple #7
0
<?php
pageHeaderInclude('modules/contacts/validator.js');
pageHeaderInclude('js/searchSaved.js');
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/searchAdvanced.js');
pageHeaderInclude('js/highlightrows.js');
pageHeaderInclude('js/export.js');
pageTitle('Contacts');
ob_start();
 ?>





        <div id="contents">
            <table>
                <tr>
                    <td width="3%">
                        <img src="images/contact.gif" width="24" height="24" border="0" alt="Contacts" style="margin-top: 3px;" />&nbsp;
                    </td>
                    <td><h2>Contacts: Search Contacts</h2></td>
                </tr>
            </table>

            <p class="note">Search Contacts</p>

            <table class="searchTable" id="searchTable ">
                <tr>
                    <td>
                        <form name="searchForm" id="searchForm" action="<?php echo(CATSUtility::getIndexName()); ?>" method="get" autocomplete="off">
<?php
pageHeaderInclude('js/highlightrows.js');
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/dataGrid.js');
pageTitle('Activities');
ob_start();

            ?>
<div style="text-align: right;"><?php $this->dataGrid->printNavigation(false); ?>&nbsp;&nbsp;<?php echo($this->quickLinks); ?></div>
            <p class="note">
                <span style="float:left;">Activities - Page <?php echo($this->dataGrid->getCurrentPageHTML()); ?></span>
                <span style="float:right;">
                    <?php $this->dataGrid->drawRowsPerPageSelector(); ?>
                    <?php $this->dataGrid->drawShowFilterControl(); ?>
                </span>&nbsp;
            </p>

            <?php $this->dataGrid->drawFilterArea(); ?>
            <?php $this->dataGrid->draw();  ?>

            <div style="display:block;">
                <span style="float:left;">
                    <?php $this->dataGrid->printActionArea(); ?>
                </span>
                <span style="float:right;">
                    <?php $this->dataGrid->printNavigation(true); ?>
                </span>&nbsp;
            </div>

            
Exemple #9
0
<?php
pageHeaderInclude('js/sorttable.js');
pageTitle('Settings - Edit User');
ob_start();
?>

            <p class="note">
                <span style="float: left;">Edit Site User</span>
                <span style="float: right;"><a href='<?php echo(CATSUtility::getIndexName()); ?>?m=settings&amp;a=manageUsers'>Back to User Management</a></span>&nbsp;
            </p>

            <form name="editUserForm" id="editUserForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&amp;a=editUser" method="post" onsubmit="return checkEditUserForm(document.editUserForm);" autocomplete="off">
                <input type="hidden" name="postback" id="postback" value="postback" />
                <input type="hidden" id="userID" name="userID" value="<?php $this->_($this->data['userID']); ?>" />

                <table class="editTable" width="600">
                    <tr>
                        <td class="tdVertical">
                            <label id="firstNameLabel" for="firstName">First Name:</label>
                        </td>
                        <td class="tdData">
                            <input type="text" class="inputbox" id="firstName" name="firstName" value="<?php $this->_($this->data['firstName']); ?>" style="width: 150px;" />&nbsp;*
                        </td>
                    </tr>

                    <tr>
                        <td class="tdVertical">
                            <label id="lastNameLabel" for="lastName">Last Name:</label>
                        </td>
                        <td class="tdData">
                            <input type="text" class="inputbox" id="lastName" name="lastName" value="<?php $this->_($this->data['lastName']); ?>" style="width: 150px;" />&nbsp;*
    <?php 
$bodyClass = get_layout_class(true);
?>

    <div class="<?php 
echo $bodyClass;
?>
 interior-content">

        <div id="right">
            <div class="row">
                <div class="mainContent" id="content">

                    <?php 
$record_id = get_option('page_for_posts');
echo pageTitle($record_id);
?>

                    <div class="entry">
                        <?php 
getContentByID($record_id);
?>
                    </div>

                    <?php 
$classes = array('post', 'landing', 'row');
?>
                    <!-- WordPress Loop: Only happens if there are posts. -->
                    <?php 
if (have_posts()) {
    ?>
Exemple #11
0
<?php
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/dataGrid.js');
pageHeaderInclude('js/home.js');
pageTitle('Home');

ob_start();
?>
            <table style="width:100%;">
                <tr>
                    <td align="left" valign="top" style="text-align: left; width: 33%; height:50px;">
                        <div class="noteUnsizedSpan" style="width:98%;">My Recent Calls</div>
                        <?php $this->dataGrid2->drawHTML();  ?>
                    </td>

                    <td align="center" valign="top" style="text-align: left; width: 33%; font-size:11px; height:50px;">
                        <?php echo($this->upcomingEventsFupHTML); ?>
                    </td>

                    <td align="center" valign="top" style="text-align: left; font-size:11px; height:50px;">
                        <?php echo($this->upcomingEventsHTML); ?>
                    </td>
                </tr>
            </table>

            <table style="width:100%;">
                <tr>
                    <td align="left" valign="top" style="text-align: left; width: 50%; height: 240px;">
                        <div class="noteUnsizedSpan" style="width:410px;">Recent Hires</div>

                        <table class="sortable" width="410" style="margin: 0 0 4px 0;">
<?php
pageHeaderInclude('js/sorttable.js');
pageTitle('Quick Search');
ob_start();
?>
     
        <div id="contents">
            <table>
                <tr>
                    <td width="3%">
                        <img src="images/search.gif" width="24" height="24" border="0" alt="Quick Search" style="margin-top: 3px;" />&nbsp;
                    </td>
                    <td><h2>Quick Search</h2></td>
                </tr>
            </table>
            <br />

            <!-- JO -->
            <p class="note">Job Orders Results</p>
            <?php if (!empty($this->jobOrdersRS)): ?>
                <table class="sortable" width="100%">
                    <tr>
                        <th align="left">Title</th>
                        <th align="left">Company</th>
                        <th align="left">Type</th>
                        <th align="left">Status</th>
                        <th align="left">Start</th>
                        <th align="left">Recruiter</th>
                        <th align="left">Owner</th>
                        <th align="left">Created</th>
                        <th align="left">Modified</th>
Exemple #13
0
<?php
pageHeaderInclude('modules/calendar/Calendar.css');
pageHeaderInclude('js/highlightrows.js');
pageHeaderInclude('modules/calendar/Calendar.js');
pageHeaderInclude('modules/calendar/CalendarUI.js');
pageHeaderInclude('modules/calendar/validator.js');
pageTitle('Calendar');
ob_start();
 ?>

        <div id="contents">
            <table width="100%">
                <tr>
                    <td width="3%">
                        
                    </td>
                    <td></td>
                    <td align="right" nowrap="nowrap">
                        <?php if ($this->userIsSuperUser == 1): ?>
                            <input type="checkbox" name="hideNonPublic" id="hideNonPublic" onclick="refreshView();" <?php if ($this->superUserActive): ?>checked<?php endif; ?>/>Show Entries from Other Users
                        <?php else: ?>
                            <input type="checkbox" style="display:none;" name="hideNonPublic" id="hideNonPublic" onclick="" />
                        <?php endif; ?>
                    </td>
                </tr>
            </table>

            <p class="note" id="calendarTitle">Calendar</p>

            <table style="border-collapse: collapse;">
<?php

pageTitle('Support');
ob_start();
 ?>
<style type="text/css">
div.friendlyErrorTitle {
    font-size: 16pt;
    font-weight: bold;
    color: #444444;
    line-height: 14pt;
    font-family: Arial, Verdana, sans-serif;
}

div.friendlyErrorMessage {
    font-size: 9pt;
    color: #444444;
    line-height: 14pt;
    font-family: Arial, Verdana, sans-serif;
}
</style>
            <table style="padding: 25px;">
                <tr>
                    <?php if (!$this->modal): ?>
                    <td align="left" valign="top" style="padding-right: 20px;">
                        <img src="images/friendly_error.jpg" border="0" />
                    </td>
                    <?php endif; ?>
                    <td align="left" valign="top">
                        <div class="friendlyErrorTitle"><?php echo $this->errorTitle; ?></div>
                        <p />
Exemple #15
0
    <header>
        <h2><?php 
siteName();
?>
</h2>
        <nav class="menu">
            <a href="/" title="Home">Home</a> |    
            <a href="/?page=about-us">About</a> |
            <a href="/?page=products">Products</a> |
            <a href="/?page=contact-us">Contact</a>
        </nav>
    </header>    

    <article>
        <h3><?php 
pageTitle();
?>
</h3>
        <?php 
pageContent();
?>
    </article>

    <footer><small>&copy;<?php 
echo date('Y');
?>
 <?php 
siteName();
?>
. All rights reserved.</small></footer>
</div>
Exemple #16
0
<?php
pageHeaderInclude('modules/import/import.js');
pageTitle('Import');
ob_start();
?>

        <div id="contents">
            <table>
                <tr>
                    <td width="3%">
                        <img src="images/reports.gif" width="24" height="24" border="0" alt="Import" style="margin-top: 3px;" />&nbsp;
                    </td>
                    <td><h2>Import Data</h2></td>
                </tr>
            </table>

            <?php if (isset($this->errorMessage)): ?>

                <p class="warning" id="importHide0">Error!</p>

                <table class="searchTable" id="importHide1" width="100%">
                    <tr>
                        <td>
                            <?php echo($this->errorMessage); ?>
                        </td>
                    </tr>
                </table>

                <br />

            <?php elseif (isset($this->successMessage)): ?>
Exemple #17
0
<?php
pageHeaderInclude('modules/companies/validator.js');
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/listEditor.js');
pageTitle('Companies');
ob_start();
?>

            <form name="editCompanyForm" id="editCompanyForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=companies&amp;a=edit" method="post" onsubmit="return checkEditForm(document.editCompanyForm);" autocomplete="off">
                <input type="hidden" name="postback" id="postback" value="postback" />
                <input type="hidden" id="companyID" name="companyID" value="<?php echo($this->companyID); ?>" />

                <table width="100%">
                    <tr>
                        <td valign="top" width="50%" height="285">
                            <p class="noteUnsized">Basic Information</p>

                            <table class="editTable" width="100%" height="100%">
                                <tr>
                                    <td class="tdVertical">
                                        <label id="nameLabel" for="name">Company Name:</label>
                                    </td>
                                    <td class="tdData">
                                        <?php if ($this->data['default_company'] != 1): ?>
                                            <input type="text" name="name" id="name" value="<?php $this->_($this->data['name']); ?>" class="inputbox" style="width: 150px;" />&nbsp;*
                                        <?php else: ?>
                                            <?php $this->_($this->data['name']); ?>
                                            <input type="hidden" name="name" id="name" value="<?php $this->_($this->data['name']); ?>" />
                                        <?php endif; ?>
                                    </td>
                                </tr>
Exemple #18
0
function renderHolder($pages, $activePage) {
  include $activePage['path'];


  include "doctype.php";
  ?>
  
  <html>
    <head profile="http://www.w3.org/2005/10/profile">
    <link rel="stylesheet" type="text/css" href="style/fajitaboy.css" >
    <link rel="shortcut icon" type="image/png" href="image/favicon.png" >
    <script type="text/javascript" src="script/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="script/fajitaboy.js"></script>
    <title>
    <?= pageTitle($pages, $activePage); ?>
  </title>
	</head>
	<body>
      <?php				       

      fbHeader($pages, $activePage);

  ?>
  
  <div id="content">
     <?php fbRenderPage(); ?>		       
  </div>
     
  <?php fbFooter($pages, $activePage); ?>
  <?php include "include/ga.html"; ?>
     </body>
     </html>
	
<?
}
Exemple #19
0
<?php
pageHeaderInclude('modules/candidates/validator.js');
pageHeaderInclude('js/sweetTitles.js');
pageHeaderInclude('js/listEditor.js');
pageHeaderInclude('js/doubleListEditor.js');
pageTitle('Candidates');
ob_start();
?>
            <p class="note">Edit Candidate</p>

            <form name="editCandidateForm" id="editCandidateForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&amp;a=edit" method="post" onsubmit="return checkEditForm(document.editCandidateForm);" autocomplete="off">
                <input type="hidden" name="postback" id="postback" value="postback" />
                <input type="hidden" id="candidateID" name="candidateID" value="<?php $this->_($this->data['candidate_id']); ?>" />

                <table class="editTable" width="700">
                    <tr>
                        <td class="tdVertical" valign="top" style="height: 28px;">
                            <label id="isHotLabel" for="isHot">Active:</label>
                        </td>
                        <td class="tdData" >
                            <input type="checkbox" id="isActive" name="isActive"<?php if ($this->data['is_active'] == 1): ?> checked<?php endif; ?> />
                            <img title="Unchecking this box indicates the candidate is inactive, and will no longer display on the resume search results." src="images/information.gif" alt="" width="16" height="16" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="tdVertical">
                            <label id="firstNameLabel" for="firstName">First Name:</label>
                        </td>
                        <td class="tdData">
                            <input type="text" class="inputbox" id="firstName" name="firstName" value="<?php $this->_($this->data['first_name']); ?>" style="width: 150px;" />
Exemple #20
0
<?php

pageTitle('Reports');
?>
        echo $bodyClass;
        ?>
 interior-content">

                    <?php 
        //LEFT
        echo $outputLeftPageData;
        ?>

                    <div id="right">
                        <div class="row">

                            <div id="content" class="mainContent">

                                <?php 
        echo pageTitle();
        ?>

                                <div class="entry">
                                    <?php 
        the_content();
        ?>
                                </div> <!-- .entry -->

                            </div> <!-- #content .mainContent -->

                            <div id="sidebar">
                                <div id="bioSidebar">
                                    <div id="bioImage"><img class="glyph" src="<?php 
        echo get_field('bio_image');
        ?>
<?php
pageHeaderInclude('js/sorttable.js');
pageHeaderInclude('Add Candidate to This Job Order Pipeline');

pageTitle('Job Orders');

ob_start();
if (!$this->isFinishedMode): ?>
        <p>Search for a candidate below, and then click on the candidate's
        first or last name to add the selected candidate to the job order
        pipeline.</p>

        <table class="searchTable">
            <form id="searchByFullNameForm" name="searchByFullNameForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=joborders&amp;a=considerCandidateSearch" method="post">
                <input type="hidden" name="postback" id="postback" value="postback" />
                <input type="hidden" id="mode_fullname" name="mode" value="searchByFullName" />
                <input type="hidden" id="jobOrderID_fullName" name="jobOrderID" value="<?php echo($this->jobOrderID); ?>" />

                <tr>
                    <td>Search by Full Name:&nbsp;</td>
                    <td><input type="text" class="inputbox" id="wildCardString_fullname" name="wildCardString" />&nbsp;*</td>
                </tr>
                <tr>
                    <td><input type="submit" class="button" id="searchByFullName" name="searchByFullName" value="Search by Full Name" /></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </form>
        </table>
        <br />
Exemple #23
0
pageHeaderInclude('../js/careerPortalApply.js');
global $careerPage; 
if (isset($careerPage) && $careerPage == true)
{
    pageHeaderInclude('../js/lib.js');
    pageHeaderInclude('../js/sorttable.js');
    pageHeaderInclude('../js/calendarDateInput.js');
}
else
{
    pageHeaderInclude('js/lib.js');
    pageHeaderInclude('js/sorttable.js');
    pageHeaderInclude('js/calendarDateInput.js');
    pageHeaderInclude('js/careersPage.js');
}
pageTitle('Careers');
ob_start();
?>

        <style type="text/css" media="all">
            <?php echo($this->template['CSS']); ?>
			#poweredCATS { clear: both; margin: 30px auto; clear: both; width: 140px; height: 40px; border: none;}
			#poweredCATS img { border: none; }
        </style>
    <!-- TOP -->
    <?php echo($this->template['Header']); ?>

    <!-- CONTENT -->
    <?php echo($this->template['Content']); ?>

    <!-- FOOTER -->
Exemple #24
0
<?php
pageHeaderInclude('modules/joborders/validator.js');
pageHeaderInclude('js/company.js');
pageHeaderInclude('js/sweetTitles.js');
pageTitle('EEO Reports');
ob_start();
?>

            <p class="note">Generate a report on Equal Employment Opportunity Statistics.</p>

            <form name="jobOrderReportForm" id="jobOrderReportForm" action="<?php echo(CATSUtility::getIndexName()); ?>" method="get">
                <input type="hidden" name="m" value="reports">
                <input type="hidden" name="a" value="generateEEOReportPreview">
                
                <table>
                    <tr>
                        <td style="vertical-align: top;">
                            <table class="editTable" <?php if (isset($this->EEOReportStatistics)): ?>width="230"<?php else: ?>width="680"<?php endif; ?>>
                                <tr>
                                    <td class="tdVertical" style="width: 75px;">
                                        <label id="siteNameLabel" for="siteName">Date Range:</label>
                                    </td>
                                    <td class="tdData">
                                       <input type="radio" name="period" value="all" <?php if ($this->modePeriod == 'all'): ?>checked<?php endif; ?>>&nbsp;All time<br />
                                       <input type="radio" name="period" value="month" <?php if ($this->modePeriod == 'month'): ?>checked<?php endif; ?>>&nbsp;Last Month<br />
                                       <input type="radio" name="period" value="week" <?php if ($this->modePeriod == 'week'): ?>checked<?php endif; ?>>&nbsp;Last Week<br />
                                    </td>
                                </tr>

                                <tr>
                                    <td class="tdVertical" style="width: 75px;">
Exemple #25
0
<?php
pageHeaderInclude('js/sorttable.js');
pageHeaderInclude('js/match.js');
pageHeaderInclude('js/pipeline.js');
pageHeaderInclude('js/attachment.js');
pageTitle('Job Order');
ob_start();
?>
<p class="note">Job Order Details</p>

<?php if ($this->data['isAdminHidden'] == 1): ?>
    <p class="warning">This Job Order is hidden.  Only CATS Administrators can view it or search for it.  To make it visible by the site users, click <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=joborders&amp;a=administrativeHideShow&amp;jobOrderID=<?php echo($this->jobOrderID); ?>&amp;state=0" style="font-weight:bold;">Here.</a></p>
<?php endif; ?>

<?php if (isset($this->frozen)): ?>
    <table style="font-weight:bold; border: 1px solid #000; background-color: #ffed1a; padding:5px; margin-bottom:7px;" width="<?php /* if ($this->isModal): */ if(false): ?>100%<?php else: ?>100%<?php endif; ?>" id="candidateAlreadyInSystemTable">
        <tr>
            <td class="tdVertical" style="width:100%;">
                This Job Order is <?php $this->_($this->data['status']); ?> and can not be modified.
               <?php if ($this->accessLevel >= ACCESS_LEVEL_EDIT): ?>
                   <a id="edit_link" href="<?php echo(CATSUtility::getIndexName()); ?>?m=joborders&amp;a=edit&amp;jobOrderID=<?php echo($this->jobOrderID); ?>">
                       <img src="images/actions/edit.gif" width="16" height="16" class="absmiddle" alt="edit" border="0" />&nbsp;Edit
                   </a>
                   the Job Order to make it Active.&nbsp;&nbsp;
               <?php endif; ?>
            </td>
        </tr>
    </table>
<?php endif; 
/*$objArray=new ClsAuieoArray(4);
foreach($this->fields_detail as $record)
Exemple #26
0
    private function loadTheme($_AUIEO_ARR_THEME_VAR)
    {
        if($_SERVER["REQUEST_URI"]=="/demo/careers/")
        {
            $AUIEO_THEME_MODULE="careers";
        }
        else if(isset($_REQUEST["m"]) && $_REQUEST["m"]=="careers")
        {
            $AUIEO_THEME_MODULE="careers";
        }
        else if(!$_SESSION['CATS']->isLoggedIn())
        {
            $AUIEO_THEME_MODULE="login";
        }
        else
        {
            $AUIEO_THEME_MODULE=isset($_REQUEST["m"])?$_REQUEST["m"]:"index";
        }
        
        $objModule=new ClsAuieoModule($AUIEO_THEME_MODULE,isset($_REQUEST["a"])?$_REQUEST["a"]:"create");
        $actionTheme=$objModule->getConfigVar("actions");
        if($actionTheme)
        {
            $AUIEO_THEME_MODULE=$actionTheme;
        }
        if(!file_exists("themes/default/{$AUIEO_THEME_MODULE}.php"))
        {
            $AUIEO_THEME_MODULE="index";
        }
        extract($_AUIEO_ARR_THEME_VAR);
        unset($_AUIEO_ARR_THEME_VAR);
        
        $HTML_ENCODING=HTML_ENCODING;
        
        $AUIEO_USER_NAME     = $_SESSION['CATS']->getUsername();
        $AUIEO_SITE_NAME     = $_SESSION['CATS']->getSiteName();
        $AUIEO_FULL_NAME     = $_SESSION['CATS']->getFullName();
        $AUIEO_INDEX_NAME    = CATSUtility::getIndexName();
        
        $_AUIEO_MODULE=isset($_GET["m"])?$_GET["m"]:"home";
        
        if (strpos($AUIEO_USER_NAME, '@'.$_SESSION['CATS']->getSiteID()) !== false &&
            substr($AUIEO_USER_NAME, strpos($username, '@'.$_SESSION['CATS']->getSiteID())) ==
            '@'.$_SESSION['CATS']->getSiteID() )
        {
           $AUIEO_USER_NAME = str_replace('@'.$_SESSION['CATS']->getSiteID(), '', $AUIEO_USER_NAME);
        }

        $ACCESS_LEVEL_SA_GREATER="";
        if ($_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA)
        {
            $ACCESS_LEVEL_SA_GREATER = "&nbsp;<span style='font-weight:bold;'>Administrator</span>\n";
        }

        $AUIEO_NOTICE="";
        /* Disabled notice */
        if (!$_SESSION['CATS']->accountActive())
        {
            $AUIEO_NOTICE = "<span style='font-weight:bold;'>Account Inactive</span><br />\n";
        }
        else if ($_SESSION['CATS']->getAccessLevel() == ACCESS_LEVEL_READ)
        {
            $AUIEO_NOTICE = "<span>Read Only Access</span><br />\n";
        }
        
        ob_start();
        $forceHighlight = '';

        $modules = ModuleUtility::getModules();
        if($_SESSION["CATS"]->getSiteID()>0)
        {
            $objPRGManagement=PRGManagement::getInstance();
        }
        foreach ($modules as $moduleName => $parameters)
        {
            if($_SESSION["CATS"]->getSiteID()>0)
            {
                $permit=$objPRGManagement->isModulePermitted($moduleName);
                if($permit===false)
                {
                    continue;
                }
            }
           $tabText = $parameters[1];

           /* Don't display a module's tab if $tabText is empty. */
           if (empty($tabText))
           {
               continue;
           }

           /* If name = Companies and HR mode is on, change tab name to My Company. */
           if ($_SESSION['CATS']->isHrMode() && $tabText == 'Companies')
           {
               $tabText = 'My Company';
           }

           /* Allow a hook to prevent a module from being displayed. */
           $displayTab = true;

           if (!eval(Hooks::get('TEMPLATE_UTILITY_EVALUATE_TAB_VISIBLE'))) return;

           if (!$displayTab)
           {
               continue;
           }

           /* Inactive Tab? */
           if (!isset($this->active) || empty($this->active) || $moduleName != $this->active->getModuleName())
           {
               if ($moduleName == $forceHighlight)
               {
                   $className = 'active';
               }
               else
               {
                   $className = 'inactive';
               }

               $alPosition = strpos($tabText, "*al=");
               if ($alPosition === false)
               {
                   echo '<li><a class="', $className, '" href="', $AUIEO_INDEX_NAME,
                        '?m=', $moduleName, '">', $tabText, '</a></li>', "\n";
               }
               else
               {
                    $al = substr($tabText, $alPosition + 4);
                    if ($_SESSION['CATS']->getAccessLevel() >= $al ||
                        $_SESSION['CATS']->isDemo())
                    {
                       echo '<li><a class="', $className, '" href="', $indexName, '?m=', $moduleName, '">',
                            substr($tabText, 0, $alPosition), '</a></li>', "\n";
                   }
               }

               continue;
           }

           $alPosition = strpos($tabText, "*al=");
           if ($alPosition !== false)
           {
               $tabText = substr($tabText, 0, $alPosition);
           }

           /* Start the <li> block for the active tab. The secondary <ul>
            * for subtabs MUST be contained within this block. It is
            * closed after subtabs are printed. */
           echo '<li>';

           echo '<a class="active" href="', $AUIEO_INDEX_NAME, '?m=', $moduleName,
                '">', $tabText, '</a>', "\n";

           $subTabs = $this->active->getSubTabs($modules);
           if ($subTabs)
           {
               echo '<ul id="secondary">';

               foreach ($subTabs as $subTabText => $link)
               {
                   if (isset($this->subActive) && $subTabText == $this->subActive)
                   {
                       $style = "color:#cccccc;";
                   }
                   else
                   {
                       $style = "";
                   }

                   /* Check HR mode for displaying tab. */
                   $hrmodePosition = strpos($link, "*hrmode=");
                   if ($hrmodePosition !== false)
                   {
                       /* Access level restricted subtab. */
                       $hrmode = substr($link, $hrmodePosition + 8);
                       if ((!$_SESSION['CATS']->isHrMode() && $hrmode == 0) ||
                           ($_SESSION['CATS']->isHrMode() && $hrmode == 1))
                       {
                           $link =  substr($link, 0, $hrmodePosition);
                       }
                       else
                       {
                           $link = '';
                       }
                   }

                   /* Check access level for displaying tab. */
                   $alPosition = strpos($link, "*al=");
                   if ($alPosition !== false)
                   {
                       /* Access level restricted subtab. */
                       $al = substr($link, $alPosition + 4);
                       if ($_SESSION['CATS']->getAccessLevel() >= $al ||
                           $_SESSION['CATS']->isDemo())
                       {
                           $link =  substr($link, 0, $alPosition);
                       }
                       else
                       {
                           $link = '';
                       }
                   }

                   $jsPosition = strpos($link, "*js=");
                   if ($jsPosition !== false)
                   {
                       /* Javascript subtab. */
                       echo '<li><a href="', substr($link, 0, $jsPosition), '" onclick="',
                            substr($link, $jsPosition + 4), '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                   }

                   /* A few subtabs have special logic to decide if they display or not. */
                   /* FIXME:  Put the logic for these somewhere else.  Perhaps the definitions of the subtabs
                              themselves should have an eval()uatable rule?
                              Brian 6-14-07:  Second.  */
                   else if (strpos($link, 'a=internalPostings') !== false)
                   {
                       /* Default company subtab. */
                       include_once('./lib/Companies.php');

                       $companies = new Companies($_SESSION['CATS']->getSiteID());
                       $defaultCompanyID = $companies->getDefaultCompany();
                       if ($defaultCompanyID !== false)
                       {
                           echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                       }
                   }
                   else if (strpos($link, 'a=administration') !== false)
                   {
                       /* Administration subtab. */
                       if ($_SESSION['CATS']->getRealAccessLevel() >= ACCESS_LEVEL_DEMO)
                       {
                           echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                       }
                   }
                   else if (strpos($link, 'a=customizeEEOReport') !== false)
                   {
                       /* EEO Report subtab.  Shouldn't be visible if EEO tracking is disabled. */
                       $EEOSettings = new EEOSettings($_SESSION['CATS']->getSiteID());
                       $EEOSettingsRS = $EEOSettings->getAll();

                       if ($EEOSettingsRS['enabled'] == 1)
                       {
                           echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                       }
                   }


                   /* Tab is ok to draw. */
                   else if ($link != '')
                   {
                       /* Normal subtab. */
                       echo '<li><a href="', $link, '" style="'.$style.'">', $subTabText, '</a></li>', "\n";
                   }
               }

               if (!eval(Hooks::get('TEMPLATE_UTILITY_DRAW_SUBTABS'))) return;

               echo '</ul>';
           }

           echo '</li>';
        }

        $_AUIEO_TABS=  ob_get_clean();

        $systemInfo = new SystemInfo();
        $systemInfoData = $systemInfo->getSystemInfo();
        $AUIEO_DOWNLOAD_LATEST="";
        if (isset($systemInfoData['available_version']) &&
            $systemInfoData['available_version'] > CATSUtility::getVersionAsInteger() &&
            isset($systemInfoData['disable_version_check']) &&
            !$systemInfoData['disable_version_check'] &&
            $_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA)
        {
            $AUIEO_DOWNLOAD_LATEST = "<a href='http://www.catsone.com/download.php' target='catsdl'>A new CATS version is available!</a><br />";
        }
        $AUIEO_RECENT="";
        if (!empty($MRU))
        {
            $AUIEO_RECENT = '<span class="MRUTitle">Recent:&nbsp;</span>&nbsp;{$MRU}';
        }
        else
        {
            $AUIEO_RECENT = '<span class="MRUTitle"></span>&nbsp;';
        }
        $AUIEO_HAS_USER_CATEGORY="";
        //FIXME:  Abstract into a hook.
        if ($_SESSION['CATS']->hasUserCategory('msa'))
        {
            $AUIEO_HAS_USER_CATEGORY = "<input type='hidden' name='m' value='asp' />
                <input type='hidden' name='a' value='aspSearch' />
                <span class='quickSearchLabel' id='quickSearchLabel>ASP Search:</span>&nbsp;";
        }
        else
        {
            $AUIEO_HAS_USER_CATEGORY = "<input type='hidden' name='m' value='home' />
                <input type='hidden' name='a' value='quickSearch' />
                <span class='quickSearchLabel' id='quickSearchLabel'>Quick Search:</span>&nbsp;";
        }


        $wildCardString = '';
        /* Get the formatted MRU list from Session. */
                $MRU = $_SESSION['CATS']->getMRU()->getFormatted();
                $indexName = CATSUtility::getIndexName();
        
        $AUIEO_PREFIX="";
        if(isset($_REQUEST["m"]) && $_REQUEST["m"]=="careers")
        {
            $AUIEO_PREFIX="../";
        }
        
        $pageTitle = pageTitle();
        $headIncludes = pageHeaderInclude();
        $AUIEO_PAGE_START="";
        ob_start();
        //TemplateUtility::_printCommonHeader($pageTitle, $headIncludes);

        if (!is_array($headIncludes))
        {
            $headIncludes = array($headIncludes);
        }

        $siteID = $_SESSION['CATS']->getSiteID();

        /* This prevents caching problems when SVN updates are preformed. */
        if ($_SESSION['CATS']->getCachedBuild() > 0)
        {
            $javascriptAntiCache = '?b=' . $_SESSION['CATS']->getCachedBuild();
        }
        else
        {
            $javascriptAntiCache = '?v=' . CATSUtility::getVersionAsInteger();
        }

        $headIncludes[] = 'main.css';

        foreach ($headIncludes as $key => $filename)
        {
            /* Done manually to prevent a global dependency on FileUtility. */
            if ($filename == 'tinymce')
            {
                echo ('<script language="javascript" type="text/javascript" src="lib/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>'."\n".
                      '<script language="javascript" type="text/javascript">tinyMCE.init({
                            mode : "specific_textareas",
                            editor_selector : "mceEditor",
                            width : "100%",
                                theme : "advanced",
                                theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo",
                                theme_advanced_buttons2 : "",
                                theme_advanced_buttons3 : "",
                                language : "en",
                                theme_advanced_toolbar_location : "top",
                                theme_advanced_toolbar_align : "left",
                                theme_advanced_resizing : true,
                                browsers : "msie,gecko,opera,safari",
                                dialog_type : "modal",
                                theme_advanced_resize_horizontal : false,
                                convert_urls : false,
                                relative_urls : false,
                                remove_script_host : false,
                                force_p_newlines : false,
                                force_br_newlines : true,
                                convert_newlines_to_brs : false,
                                remove_linebreaks : false,
                                fix_list_elements : true
                        });</script>'."\n");
            }
            else
            {

                $extension = substr($filename, strrpos($filename, '.') + 1);

                $filename .= $javascriptAntiCache;

                if ($extension == 'js')
                {
                    echo '<script type="text/javascript" src="', $filename, '"></script>', "\n";
                }
                else if ($extension == 'css')
                {
                    echo '<style type="text/css" media="all">@import "', $filename, '";</style>', "\n";
                }
            }
        }


        $AUIEO_PAGE_START=  ob_get_clean();

        //ob_start();
        $AUIEO_LOAD_TIME = $_SESSION['CATS']->getExecutionTime();

        $AUIEO_CANDIDATS_VERSION=CANDIDATS_VERSION;
        
        include("themes/default/{$AUIEO_THEME_MODULE}.php");
        /**
        * for handing comment in html template. usage is {$_("This is comment")}
        */
       $_=function($comment)
       {
           return "";
       };
        ob_start();
        eval('echo <<< EOT
        '.file_get_contents("themes/default/{$AUIEO_THEME_MODULE}.html").'
EOT;
');
        $html = ob_get_clean();
        return $html;
    }