Location: PHPKode > projects > Phpcron - a crond graphical alternative > phpcron0.5b.0.2/html/phpcron_manual_big.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
  <!-- Beginning of Form Styles -->
<style>
<!--

A:hover {
color: red;
}

H2.questionaire {
font-size: 16px;
fint-family: verdana;

}
  
span.questionaire {

color       : #000011;
background  : #CCCCCC;

font-size : 12px;
font-family: verdana, sans-serif;
 
  margin-left: 10px;
  margin-right: 100px;
  width: 700px;
 
  padding:   015px; 
    border:     2px groove;
}

.qintro {

  margin-left: 50px;
  margin-right: 50px;


}

.hotscripts, FORM, TABLE, TD, INPUT {
font-size: 12px;

}
-->
</style>

<!-- End of Form Styles -->
  
  
  
  
  
  
    <title>PhpCron, a scheduling utility that provides a convenient
    browser interface, Phpcron Admin</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.71 ">
  </head>

  <body class="ARTICLE" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
  
  <a href="http://www.gemini1consulting.com/tekhelp/phpcron/demo/">Visit the Live Demo</a> |
  
  <a href="#questionaire">Please Fill Out the Feedback Form!</a>
    <div class="ARTICLE">
      <div class="TITLEPAGE">
        <h1 class="TITLE"><a name="AEN2"><a href=
        "http://phpcron.sourceforge.net/" target="_top"><span
        class="INLINEMEDIAOBJECT"><img border=0 src="../images/phpcron.gif"
        alt=
        " PhpCron, a scheduling utility that provides a convenient browser interface, Phpcron Admin ">
        </span></a></a></h1>

        <h3 class="AUTHOR"><a name="AEN10" href="http://www.gemini1consulting.com/dcd/">David Druffner</a></h3>

        <div class="AFFILIATION">
          <div class="ADDRESS">
            <p class="ADDRESS">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hide@address.com<br>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
          </div>
        </div>

        <p class="COPYRIGHT">Copyright &copy; 2001 by David C.
        Druffner</p>

        <div class="REVHISTORY">
          <table width="100%" border="0">
            <tr>
              <th align="LEFT" valign="TOP" colspan="3"><b>Revision
              History</b></th>
            </tr>

            <tr>
              <td align="LEFT">Revision v. 0.5.1.0</td>

              <td align="LEFT">10-09-2001</td>

              <td align="LEFT">Revised by: dcd</td>
            </tr>

            <tr>
              <td align="LEFT" colspan="3">Initial Manual for v.0.5
              of phpcron</td>
            </tr>
          </table>
        </div>

        <div>
          <div class="ABSTRACT">
            <a name="AEN22"></a>

            <p>Manual for <tt class="FUNCTION">Phpcron</tt>,a <a
            href="http://www.php.net" target="_top">PHP</a> command
            line utility which allows you to schedule programs to
            run at certain specified times similar to the Unix
            standard Crond daemon (which it can be used in place of
            when started as a daemon or in conjunction with when
            Phpcron is being used as a <a href=
            "#VIRTUALDAEMON">"Virtual Daemon"</a>). This manual
            also covers Phpcron Admin,an optional browser based
            interface to Phpcron, allowing a user to remotely
            schedule programs and change Phpcron options in a user
            friendly way without having to deal with console based
            sessions using ssh, telnet, or arcane text editors.
            Download updates to this manual and to <tt class=
            "FUNCTION">Phpcron</tt> at <a href=
            "http://www.gemini1consulting.com/tekhelp/" target=
            "_top">Gemini 1 Consulting, LLC</a>. Phpcron and
            Phpcron Admin provide an ideal solution for web hosts
            who wish to provide a graphical interface with the
            scheduling power of Crond.</p>

            <p>An <a href=
            "http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/html/"
             target="_top">online manual</a> is available which
            displays users comments, modifications, and tips, as
            well as any author comments since this manual was
            published.</p>

            <p>The Phpcron scripts have been heavily commented with
            inline documentation using a <a href=
            "http://www.gemini1consulting.com/tekhelp/" target=
            "_top">version of Robodoc</a> which this author revised
            to produce <a href="http://www.docbook.org" target=
            "_top">DocBook</a> SGML. Attached as an <a href=
            "#CODEREFERENCE">Appendix</a> is the generated source
            code documentation.</p>
          </div>
        </div>
        <hr>
      </div>

      <div class="TOC">
        <dl>
          <dt><b>Table of Contents</b></dt>

          <dt>1. <a href="#INTRO">Introduction</a></dt>

          <dd>
            <dl>
              <dt>1.1. <a href="#OVERVIEW">What is
              Phpcron?</a></dt>

              <dt>1.2. <a href="#WHYPHPCRON">Why Use Phpcron
              instead of just Unix's Crond?</a></dt>

              <dt>1.3. <a href="#COPYRIGHT">Copyright
              Information</a></dt>

              <dt>1.4. <a href="#DISCLAIMER">Disclaimer</a></dt>

              <dt>1.5. <a href="#SOFTWARELICENSE">Phpcron
              License</a></dt>

              <dt>1.6. <a href="#MANUALVERSION">Manual
              Version</a></dt>

              <dt>1.7. <a href="#CREDITS">Credits</a></dt>

              <dt>1.8. <a href="#FEEDBACK">Feedback</a></dt>

              <dt>1.9. <a href=
              "#TRANSLATIONS">Translations</a></dt>
            </dl>
          </dd>

          <dt>2. <a href="#DOWNLOAD">Download Phpcron</a></dt>

          <dt>3. <a href="#SYSTEMREQUIREMENTS">System
          Requirements</a></dt>

          <dt>4. <a href="#INSTALLATION">Installation</a></dt>

          <dt>5. <a href="#PHPCRONTAB">Scheduling Program
          Execution</a></dt>

          <dt>6. <a href="#COMMANDLINE">Command Line
          Execution</a></dt>

          <dt>7. <a href="#OPTIONS">Phpcron Options</a></dt>

          <dt>8. <a href="#PHPCRONADMIN">Phpcron Admin</a></dt>

          <dd>
            <dl>
              <dt>8.1. <a href="#ADMINOVERVIEW">Overview</a></dt>

              <dt>8.2. <a href="#CONTROLPANEL">Control
              Panel</a></dt>

              <dt>8.3. <a href="#EDITTAB">Edit Scheduled
              Programs</a></dt>
            </dl>
          </dd>

          <dt>9. <a href="#MODESVIRTUALDAEMON">Modes and the
          Virtual Daemon</a></dt>

          <dd>
            <dl>
              <dt>9.1. <a href="#MODES">Modes (Daemon and
              Non-Daemon)</a></dt>

              <dt>9.2. <a href="#VIRTUALDAEMON">Virtual
              Daemon</a></dt>
            </dl>
          </dd>

          <dt>10. <a href="#CODEHISTORY">Code History</a></dt>

          <dt>11. <a href="#DEMO">Demo</a></dt>

          <dt>12. <a href="#CONTRIBUTIONS">Code
          Contributions</a></dt>

          <dt>13. <a href="#CODEREFERENCE">Code Reference</a></dt>

          <dt>A. <a href="#AEN464">Phpcron Code Reference</a></dt>

          <dd>
            <dl>
              <dt>A.1. <a href="#AEN468">Phpcron Source Code
              Reference</a></dt>

              <dd>
                <dl>
                  <dt>A.1.1. <a href="#AEN470">Source
                  Files</a></dt>

                  <dd>
                    <dl>
                      <dt>A.1.1.1. <a href="#AEN472"><a href=
                      "#ANCHORPHPCRON.PHP"><tt class=
                      "LITERAL">phpcron.php</tt></a></a></dt>

                      <dt>A.1.1.2. <a href="#AEN477"><a href=
                      "#ANCHORPHPCRON3ADMIN.PHP"><tt class=
                      "LITERAL">phpcron_admin.php</tt></a></a></dt>

                      <dt>A.1.1.3. <a href="#AEN482"><a href=
                      "#ANCHORPHPCRON3COMMONLIB.PHP"><tt class=
                      "LITERAL">phpcron_commonlib.php</tt></a></a></dt>
                    </dl>
                  </dd>

                  <dt>A.1.2. <a href="#AEN487">Functions</a></dt>

                  <dd>
                    <dl>
                      <dt>A.1.2.1. <a href="#AEN489"><a href=
                      "#ANCHORAPPENDTOFILE"><tt class=
                      "LITERAL">appendToFile</tt></a></a></dt>

                      <dt>A.1.2.2. <a href="#AEN494"><a href=
                      "#ANCHORBUILDNEWTAB"><tt class=
                      "LITERAL">buildNewtab</tt></a></a></dt>

                      <dt>A.1.2.3. <a href="#AEN499"><a href=
                      "#ANCHORCHECKPHPVERSION"><tt class=
                      "LITERAL">checkPhpVersion</tt></a></a></dt>

                      <dt>A.1.2.4. <a href="#AEN504"><a href=
                      "#ANCHORCLEARLOGFILE"><tt class=
                      "LITERAL">clearLogFile</tt></a></a></dt>

                      <dt>A.1.2.5. <a href="#AEN509"><a href=
                      "#ANCHORCPPHPCRON"><tt class=
                      "LITERAL">cpPhpcron</tt></a></a></dt>

                      <dt>A.1.2.6. <a href="#AEN514"><a href=
                      "#ANCHORDELETEFILE"><tt class=
                      "LITERAL">deleteFile</tt></a></a></dt>

                      <dt>A.1.2.7. <a href="#AEN519"><a href=
                      "#ANCHORDOWNLOADFILE"><tt class=
                      "LITERAL">downloadFile</tt></a></a></dt>

                      <dt>A.1.2.8. <a href="#AEN524"><a href=
                      "#ANCHOREDITTABBYFORM"><tt class=
                      "LITERAL">editTabByForm</tt></a></a></dt>

                      <dt>A.1.2.9. <a href="#AEN529"><a href=
                      "#ANCHORFORMATPATH"><tt class=
                      "LITERAL">formatPath</tt></a></a></dt>

                      <dt>A.1.2.10. <a href="#AEN534"><a href=
                      "#ANCHORFULLEDITBOX"><tt class=
                      "LITERAL">fullEditBox</tt></a></a></dt>

                      <dt>A.1.2.11. <a href="#AEN539"><a href=
                      "#ANCHORGETASSIGNMENTINFO"><tt class=
                      "LITERAL">getAssignmentInfo</tt></a></a></dt>

                      <dt>A.1.2.12. <a href="#AEN544"><a href=
                      "#ANCHORGETCOMMENTS"><tt class=
                      "LITERAL">getComments</tt></a></a></dt>

                      <dt>A.1.2.13. <a href="#AEN549"><a href=
                      "#ANCHORGETFORMELEMENT"><tt class=
                      "LITERAL">getFormElement</tt></a></a></dt>

                      <dt>A.1.2.14. <a href="#AEN554"><a href=
                      "#ANCHORGETPROCESSINFO78"><tt class=
                      "LITERAL">getProcessInfo()</tt></a></a></dt>

                      <dt>A.1.2.15. <a href="#AEN559"><a href=
                      "#ANCHORISBADPHP"><tt class=
                      "LITERAL">isBadPhp</tt></a></a></dt>

                      <dt>A.1.2.16. <a href="#AEN564"><a href=
                      "#ANCHORISCRONTIMEPARAMSBAD"><tt class=
                      "LITERAL">isCronTimeParamsBad</tt></a></a></dt>

                      <dt>A.1.2.17. <a href="#AEN569"><a href=
                      "#ANCHORISINTEGER"><tt class=
                      "LITERAL">isInteger</tt></a></a></dt>

                      <dt>A.1.2.18. <a href="#AEN574"><a href=
                      "#ANCHORISINTEGERINRANGE"><tt class=
                      "LITERAL">isIntegerInRange</tt></a></a></dt>

                      <dt>A.1.2.19. <a href="#AEN579"><a href=
                      "#ANCHORISOTHERPHPCROND"><tt class=
                      "LITERAL">isOtherPhpcrond</tt></a></a></dt>

                      <dt>A.1.2.20. <a href="#AEN584"><a href=
                      "#ANCHORISPATHBAD"><tt class=
                      "LITERAL">isPathbad</tt></a></a></dt>

                      <dt>A.1.2.21. <a href="#AEN589"><a href=
                      "#ANCHORISTABFORMBAD"><tt class=
                      "LITERAL">isTabFormBad</tt></a></a></dt>

                      <dt>A.1.2.22. <a href="#AEN594"><a href=
                      "#ANCHORIS3EMAIL"><tt class=
                      "LITERAL">is_email</tt></a></a></dt>

                      <dt>A.1.2.23. <a href="#AEN599"><a href=
                      "#ANCHORKILLOTHERPHPCRON"><tt class=
                      "LITERAL">killOtherPhpcron</tt></a></a></dt>

                      <dt>A.1.2.24. <a href="#AEN604"><a href=
                      "#ANCHORMAILATTACHMENT"><tt class=
                      "LITERAL">mailAttachment</tt></a></a></dt>

                      <dt>A.1.2.25. <a href="#AEN609"><a href=
                      "#ANCHORMENUBAR"><tt class=
                      "LITERAL">menuBar</tt></a></a></dt>

                      <dt>A.1.2.26. <a href="#AEN614"><a href=
                      "#ANCHORPAGETITLE"><tt class=
                      "LITERAL">pageTitle</tt></a></a></dt>

                      <dt>A.1.2.27. <a href="#AEN619"><a href=
                      "#ANCHORPARSECRONTIMEPARAMS"><tt class=
                      "LITERAL">parseCronTimeParams</tt></a></a></dt>

                      <dt>A.1.2.28. <a href="#AEN624"><a href=
                      "#ANCHORPARSEUSERCONFIG"><tt class=
                      "LITERAL">parseUserConfig</tt></a></a></dt>

                      <dt>A.1.2.29. <a href="#AEN629"><a href=
                      "#ANCHORREBUILDUSERCFG"><tt class=
                      "LITERAL">rebuildUserCfg</tt></a></a></dt>

                      <dt>A.1.2.30. <a href="#AEN634"><a href=
                      "#ANCHORSAVEFILE"><tt class=
                      "LITERAL">saveFile</tt></a></a></dt>

                      <dt>A.1.2.31. <a href="#AEN639"><a href=
                      "#ANCHORSENDOUTPUT"><tt class=
                      "LITERAL">sendOutput</tt></a></a></dt>

                      <dt>A.1.2.32. <a href="#AEN644"><a href=
                      "#ANCHORSTOPOTHERPHPCRON"><tt class=
                      "LITERAL">stopOtherPhpcron</tt></a></a></dt>

                      <dt>A.1.2.33. <a href="#AEN649"><a href=
                      "#ANCHORSTOPTHISPROCESS"><tt class=
                      "LITERAL">stopThisProcess</tt></a></a></dt>

                      <dt>A.1.2.34. <a href="#AEN654"><a href=
                      "#ANCHORSTRIPPHP"><tt class=
                      "LITERAL">stripPhp</tt></a></a></dt>

                      <dt>A.1.2.35. <a href="#AEN659"><a href=
                      "#ANCHORTABTOPCOMMENTS"><tt class=
                      "LITERAL">tabTopComments</tt></a></a></dt>
                    </dl>
                  </dd>

                  <dt>A.1.3. <a href="#AEN664">Variables</a></dt>

                  <dd>
                    <dl>
                      <dt>A.1.3.1. <a href="#AEN666"><a href=
                      "#ANCHOR4ADMIN3EMAIL3ADDRESS"><tt class=
                      "LITERAL">$admin_email_address</tt></a></a></dt>

                      <dt>A.1.3.2. <a href="#AEN671"><a href=
                      "#ANCHOR4ADMIN3SUBPAGE"><tt class=
                      "LITERAL">$admin_subpage</tt></a></a></dt>

                      <dt>A.1.3.3. <a href="#AEN676"><a href=
                      "#ANCHOR4ASSIGNMENT3INFO"><tt class=
                      "LITERAL">$assignment_info</tt></a></a></dt>

                      <dt>A.1.3.4. <a href="#AEN681"><a href=
                      "#ANCHOR4CL3HELP"><tt class=
                      "LITERAL">$cl_help</tt></a></a></dt>

                      <dt>A.1.3.5. <a href="#AEN686"><a href=
                      "#ANCHOR4DAEMON3MODE"><tt class=
                      "LITERAL">$daemon_mode</tt></a></a></dt>

                      <dt>A.1.3.6. <a href="#AEN691"><a href=
                      "#ANCHOR4DEBUG"><tt class=
                      "LITERAL">$debug</tt></a></a></dt>

                      <dt>A.1.3.7. <a href="#AEN696"><a href=
                      "#ANCHOR4ERROR3EMAIL3ADDRESS"><tt class=
                      "LITERAL">$error_email_address</tt></a></a></dt>

                      <dt>A.1.3.8. <a href="#AEN701"><a href=
                      "#ANCHOR4LEFT3MLC3CH"><tt class=
                      "LITERAL">$left_mlc_ch</tt></a></a></dt>

                      <dt>A.1.3.9. <a href="#AEN706"><a href=
                      "#ANCHOR4LICENSE"><tt class=
                      "LITERAL">$license</tt></a></a></dt>

                      <dt>A.1.3.10. <a href="#AEN711"><a href=
                      "#ANCHOR4LOG3RESULT"><tt class=
                      "LITERAL">$log_result</tt></a></a></dt>

                      <dt>A.1.3.11. <a href="#AEN716"><a href=
                      "#ANCHOR4LOG3RESULT3FILE"><tt class=
                      "LITERAL">$log_result_file</tt></a></a></dt>

                      <dt>A.1.3.12. <a href="#AEN721"><a href=
                      "#ANCHOR4MAIL3ERRORS"><tt class=
                      "LITERAL">$mail_errors</tt></a></a></dt>

                      <dt>A.1.3.13. <a href="#AEN726"><a href=
                      "#ANCHOR4MAIL3SUCCESS"><tt class=
                      "LITERAL">$mail_success</tt></a></a></dt>

                      <dt>A.1.3.14. <a href="#AEN731"><a href=
                      "#ANCHOR4PHPCRON3DIRECTORY"><tt class=
                      "LITERAL">$phpcron_directory</tt></a></a></dt>

                      <dt>A.1.3.15. <a href="#AEN736"><a href=
                      "#ANCHOR4PHPCRON3FILE"><tt class=
                      "LITERAL">$phpcron_file</tt></a></a></dt>

                      <dt>A.1.3.16. <a href="#AEN741"><a href=
                      "#ANCHOR4PHPCRON3OFF"><tt class=
                      "LITERAL">$phpcron_off</tt></a></a></dt>

                      <dt>A.1.3.17. <a href="#AEN746"><a href=
                      "#ANCHOR4PHPCRON3OUTPUT"><tt class=
                      "LITERAL">$phpcron_output</tt></a></a></dt>

                      <dt>A.1.3.18. <a href="#AEN751"><a href=
                      "#ANCHOR4PHPCRON3PSINFO3FILE"><tt class=
                      "LITERAL">$phpcron_psinfo_file</tt></a></a></dt>

                      <dt>A.1.3.19. <a href="#AEN756"><a href=
                      "#ANCHOR4PHPCRON3VENABLED3FILE"><tt class=
                      "LITERAL">$phpcron_venabled_file</tt></a></a></dt>

                      <dt>A.1.3.20. <a href="#AEN761"><a href=
                      "#ANCHOR4PHPCRONTAB3FILENAME"><tt class=
                      "LITERAL">$phpcrontab_filename</tt></a></a></dt>

                      <dt>A.1.3.21. <a href="#AEN766"><a href=
                      "#ANCHOR4PID"><tt class=
                      "LITERAL">$pid</tt></a></a></dt>

                      <dt>A.1.3.22. <a href="#AEN771"><a href=
                      "#ANCHOR4REDIRECT3OUTPUT"><tt class=
                      "LITERAL">$redirect_output</tt></a></a></dt>

                      <dt>A.1.3.23. <a href="#AEN776"><a href=
                      "#ANCHOR4RIGHT3MLC3CH"><tt class=
                      "LITERAL">$right_mlc_ch</tt></a></a></dt>

                      <dt>A.1.3.24. <a href="#AEN781"><a href=
                      "#ANCHOR4SC3CH"><tt class=
                      "LITERAL">$sc_ch</tt></a></a></dt>

                      <dt>A.1.3.25. <a href="#AEN786"><a href=
                      "#ANCHOR4SECURE"><tt class=
                      "LITERAL">$secure</tt></a></a></dt>

                      <dt>A.1.3.26. <a href="#AEN791"><a href=
                      "#ANCHOR4SLOW3DEBUG3SCROLL"><tt class=
                      "LITERAL">$slow_debug_scroll</tt></a></a></dt>

                      <dt>A.1.3.27. <a href="#AEN796"><a href=
                      "#ANCHOR4START3TIME"><tt class=
                      "LITERAL">$start_time</tt></a></a></dt>

                      <dt>A.1.3.28. <a href="#AEN801"><a href=
                      "#ANCHOR4SUPPRESS3OUTPUT"><tt class=
                      "LITERAL">$suppress_output</tt></a></a></dt>

                      <dt>A.1.3.29. <a href="#AEN806"><a href=
                      "#ANCHOR4SYSTEM3NAME"><tt class=
                      "LITERAL">$system_name</tt></a></a></dt>

                      <dt>A.1.3.30. <a href="#AEN811"><a href=
                      "#ANCHOR4UC3CONTENTS"><tt class=
                      "LITERAL">$uc_contents</tt></a></a></dt>

                      <dt>A.1.3.31. <a href="#AEN816"><a href=
                      "#ANCHOR4UC3CONTENTS3ARRAY"><tt class=
                      "LITERAL">$uc_contents_array</tt></a></a></dt>

                      <dt>A.1.3.32. <a href="#AEN821"><a href=
                      "#ANCHOR4UC3CONTENTS3LENGTH"><tt class=
                      "LITERAL">$uc_contents_length</tt></a></a></dt>

                      <dt>A.1.3.33. <a href="#AEN826"><a href=
                      "#ANCHOR4USER3CONFIG3FILE"><tt class=
                      "LITERAL">$user_config_file</tt></a></a></dt>

                      <dt>A.1.3.34. <a href="#AEN831"><a href=
                      "#ANCHOR4VIEWED3BY3BROWSER"><tt class=
                      "LITERAL">$viewed_by_browser</tt></a></a></dt>

                      <dt>A.1.3.35. <a href="#AEN836"><a href=
                      "#ANCHORPHPCRON3DIRECTORY"><tt class=
                      "LITERAL">phpcron_directory</tt></a></a></dt>
                    </dl>
                  </dd>

                  <dt>A.1.4. <a href="#AEN841">Constants</a></dt>

                  <dd>
                    <dl>
                      <dt>A.1.4.1. <a href="#AEN843"><a href=
                      "#ANCHORCURRENT3DIRECTORY"><tt class=
                      "LITERAL">CURRENT_DIRECTORY</tt></a></a></dt>

                      <dt>A.1.4.2. <a href="#AEN848"><a href=
                      "#ANCHORCURRENT3DIRECTORY"><tt class=
                      "LITERAL">CURRENT_DIRECTORY</tt></a></a></dt>
                    </dl>
                  </dd>

                  <dt>A.1.5. <a href="#AEN853">Generic</a></dt>

                  <dd>
                    <dl>
                      <dt>A.1.5.1. <a href="#AEN855"><a href=
                      "#ANCHORPHPCRON3ADMIN3README"><tt class=
                      "LITERAL">phpcron_admin_readme</tt></a></a></dt>

                      <dt>A.1.5.2. <a href="#AEN860"><a href=
                      "#ANCHORPHPCRON3COMMONLIB3README"><tt class=
                      "LITERAL">phpcron_commonlib_readme</tt></a></a></dt>

                      <dt>A.1.5.3. <a href="#AEN865"><a href=
                      "#ANCHORPHPCRON3README"><tt class=
                      "LITERAL">phpcron_readme</tt></a></a></dt>
                    </dl>
                  </dd>
                </dl>
              </dd>

              <dt>A.2. <a href=
              "#ANCHORPHPCRON1PHPCRON3README">PHPCRON/phpcron_readme</a></dt>

              <dd>
                <dl>
                  <dt>A.2.1. <a href="#AEN877">NAME</a></dt>

                  <dt>A.2.2. <a href="#AEN881">DESCRIPTION</a></dt>

                  <dt>A.2.3. <a href="#AEN885">AUTHOR</a></dt>

                  <dt>A.2.4. <a href="#AEN889">COPYRIGHT</a></dt>

                  <dt>A.2.5. <a href="#AEN893">CREATION
                  DATE</a></dt>

                  <dt>A.2.6. <a href="#AEN897">MODIFICATION
                  HISTORY</a></dt>

                  <dt>A.2.7. <a href="#AEN900">BUGS</a></dt>

                  <dt>A.2.8. <a href="#AEN905">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.3. <a href=
              "#ANCHORPHPCRON1CURRENT3DIRECTORY">phpcron/CURRENT_DIRECTORY</a></dt>

              <dd>
                <dl>
                  <dt>A.3.1. <a href="#AEN919">NAME</a></dt>

                  <dt>A.3.2. <a href="#AEN924">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.4. <a href=
              "#ANCHORPHPCRON1PHPCRON3DIRECTORY">phpcron/phpcron_directory</a></dt>

              <dd>
                <dl>
                  <dt>A.4.1. <a href="#AEN932">NAME</a></dt>

                  <dt>A.4.2. <a href="#AEN937">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.5. <a href=
              "#ANCHORPHPCRON14START3TIME">phpcron/$start_time</a></dt>

              <dd>
                <dl>
                  <dt>A.5.1. <a href="#AEN945">NAME</a></dt>

                  <dt>A.5.2. <a href="#AEN949">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.6. <a href=
              "#ANCHORPHPCRON14PHPCRONTAB3FILENAME">phpcron/$phpcrontab_filename</a></dt>

              <dd>
                <dl>
                  <dt>A.6.1. <a href="#AEN957">NAME</a></dt>

                  <dt>A.6.2. <a href="#AEN961">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.7. <a href=
              "#ANCHORPHPCRON14DEBUG">phpcron/$debug</a></dt>

              <dd>
                <dl>
                  <dt>A.7.1. <a href="#AEN969">NAME</a></dt>

                  <dt>A.7.2. <a href="#AEN973">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.8. <a href=
              "#ANCHORPHPCRON14SLOW3DEBUG3SCROLL">phpcron/$slow_debug_scroll</a></dt>

              <dd>
                <dl>
                  <dt>A.8.1. <a href="#AEN981">NAME</a></dt>

                  <dt>A.8.2. <a href="#AEN985">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.9. <a href=
              "#ANCHORPHPCRON14LOG3RESULT">phpcron/$log_result</a></dt>

              <dd>
                <dl>
                  <dt>A.9.1. <a href="#AEN993">NAME</a></dt>

                  <dt>A.9.2. <a href="#AEN997">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.10. <a href=
              "#ANCHORPHPCRON14LOG3RESULT3FILE">phpcron/$log_result_file</a></dt>

              <dd>
                <dl>
                  <dt>A.10.1. <a href="#AEN1005">NAME</a></dt>

                  <dt>A.10.2. <a href=
                  "#AEN1009">DESCRIPTION</a></dt>

                  <dt>A.10.3. <a href="#AEN1012">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.11. <a href=
              "#ANCHORPHPCRON14MAIL3SUCCESS">phpcron/$mail_success</a></dt>

              <dd>
                <dl>
                  <dt>A.11.1. <a href="#AEN1021">NAME</a></dt>

                  <dt>A.11.2. <a href=
                  "#AEN1025">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.12. <a href=
              "#ANCHORPHPCRON14ADMIN3EMAIL3ADDRESS">phpcron/$admin_email_address</a></dt>

              <dd>
                <dl>
                  <dt>A.12.1. <a href="#AEN1033">NAME</a></dt>

                  <dt>A.12.2. <a href=
                  "#AEN1037">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.13. <a href=
              "#ANCHORPHPCRON14MAIL3ERRORS">phpcron/$mail_errors</a></dt>

              <dd>
                <dl>
                  <dt>A.13.1. <a href="#AEN1045">NAME</a></dt>

                  <dt>A.13.2. <a href=
                  "#AEN1049">DESCRIPTION</a></dt>

                  <dt>A.13.3. <a href="#AEN1052">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.14. <a href=
              "#ANCHORPHPCRON14ERROR3EMAIL3ADDRESS">phpcron/$error_email_address</a></dt>

              <dd>
                <dl>
                  <dt>A.14.1. <a href="#AEN1061">NAME</a></dt>

                  <dt>A.14.2. <a href=
                  "#AEN1065">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.15. <a href=
              "#ANCHORPHPCRON14SYSTEM3NAME">phpcron/$system_name</a></dt>

              <dd>
                <dl>
                  <dt>A.15.1. <a href="#AEN1073">NAME</a></dt>

                  <dt>A.15.2. <a href=
                  "#AEN1078">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.16. <a href=
              "#ANCHORPHPCRON14SUPPRESS3OUTPUT">phpcron/$suppress_output</a></dt>

              <dd>
                <dl>
                  <dt>A.16.1. <a href="#AEN1086">NAME</a></dt>

                  <dt>A.16.2. <a href=
                  "#AEN1090">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.17. <a href=
              "#ANCHORPHPCRON14DAEMON3MODE">phpcron/$daemon_mode</a></dt>

              <dd>
                <dl>
                  <dt>A.17.1. <a href="#AEN1098">NAME</a></dt>

                  <dt>A.17.2. <a href=
                  "#AEN1102">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.18. <a href=
              "#ANCHORPHPCRON1STOPTHISPROCESS">phpcron/stopThisProcess</a></dt>

              <dd>
                <dl>
                  <dt>A.18.1. <a href="#AEN1111">NAME</a></dt>

                  <dt>A.18.2. <a href="#AEN1116">SYNOPSIS</a></dt>

                  <dt>A.18.3. <a href="#AEN1120">FUNCTION</a></dt>

                  <dt>A.18.4. <a href="#AEN1123">INPUTS</a></dt>

                  <dt>A.18.5. <a href="#AEN1126">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.19. <a href=
              "#ANCHORPHPCRON1KILLOTHERPHPCRON">phpcron/killOtherPhpcron</a></dt>

              <dd>
                <dl>
                  <dt>A.19.1. <a href="#AEN1140">NAME</a></dt>

                  <dt>A.19.2. <a href="#AEN1145">SYNOPSIS</a></dt>

                  <dt>A.19.3. <a href="#AEN1149">FUNCTION</a></dt>

                  <dt>A.19.4. <a href="#AEN1153">NOTES</a></dt>

                  <dt>A.19.5. <a href="#AEN1158">RESULT</a></dt>

                  <dt>A.19.6. <a href="#AEN1161">BUGS</a></dt>

                  <dt>A.19.7. <a href="#AEN1165">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.20. <a href=
              "#ANCHORPHPCRON14PID">phpcron/$pid</a></dt>

              <dt>A.21. <a href=
              "#ANCHORPHPCRON14CL3HELP">phpcron/$cl_help</a></dt>

              <dd>
                <dl>
                  <dt>A.21.1. <a href="#AEN1182">NAME</a></dt>

                  <dt>A.21.2. <a href=
                  "#AEN1186">DESCRIPTION</a></dt>

                  <dt>A.21.3. <a href="#AEN1189">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.22. <a href=
              "#ANCHORPHPCRON14REDIRECT3OUTPUT">phpcron/$redirect_output</a></dt>

              <dd>
                <dl>
                  <dt>A.22.1. <a href="#AEN1197">NAME</a></dt>

                  <dt>A.22.2. <a href=
                  "#AEN1201">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.23. <a href=
              "#ANCHORPHPCRON1PHPCRON3ADMIN3README">PHPCRON/phpcron_admin_readme</a></dt>

              <dd>
                <dl>
                  <dt>A.23.1. <a href="#AEN1211">NAME</a></dt>

                  <dt>A.23.2. <a href="#AEN1215">AUTHOR</a></dt>

                  <dt>A.23.3. <a href=
                  "#AEN1219">DESCRIPTION</a></dt>

                  <dt>A.23.4. <a href="#AEN1223">COPYRIGHT</a></dt>

                  <dt>A.23.5. <a href="#AEN1227">BUGS</a></dt>

                  <dt>A.23.6. <a href="#AEN1232">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.24. <a href=
              "#ANCHORPHPCRON3ADMIN1CURRENT3DIRECTORY">phpcron_admin/CURRENT_DIRECTORY</a></dt>

              <dd>
                <dl>
                  <dt>A.24.1. <a href="#AEN1246">NAME</a></dt>

                  <dt>A.24.2. <a href=
                  "#AEN1251">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.25. <a href=
              "#ANCHORPHPCRON3ADMIN14PHPCRON3DIRECTORY">phpcron_admin/$phpcron_directory</a></dt>

              <dd>
                <dl>
                  <dt>A.25.1. <a href="#AEN1260">NAME</a></dt>

                  <dt>A.25.2. <a href=
                  "#AEN1266">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.26. <a href=
              "#ANCHORPHPCRON3ADMIN14PHPCRON3OUTPUT">phpcron_admin/$phpcron_output</a></dt>

              <dd>
                <dl>
                  <dt>A.26.1. <a href="#AEN1277">NAME</a></dt>

                  <dt>A.26.2. <a href=
                  "#AEN1281">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.27. <a href=
              "#ANCHORPHPCRON3ADMIN14SECURE">phpcron_admin/$secure</a></dt>

              <dd>
                <dl>
                  <dt>A.27.1. <a href="#AEN1289">NAME</a></dt>

                  <dt>A.27.2. <a href=
                  "#AEN1293">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.28. <a href=
              "#ANCHORPHPCRON3ADMIN14USER3CONFIG3FILE">phpcron_admin/$user_config_file</a></dt>

              <dd>
                <dl>
                  <dt>A.28.1. <a href="#AEN1301">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.29. <a href=
              "#ANCHORPHPCRON3ADMIN14LEFT3MLC3CH">phpcron_admin/$left_mlc_ch</a></dt>

              <dd>
                <dl>
                  <dt>A.29.1. <a href="#AEN1310">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.30. <a href=
              "#ANCHORPHPCRON3ADMIN14RIGHT3MLC3CH">phpcron_admin/$right_mlc_ch</a></dt>

              <dd>
                <dl>
                  <dt>A.30.1. <a href="#AEN1319">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.31. <a href=
              "#ANCHORPHPCRON3ADMIN14SC3CH">phpcron_admin/$sc_ch</a></dt>

              <dd>
                <dl>
                  <dt>A.31.1. <a href="#AEN1328">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.32. <a href=
              "#ANCHORPHPCRON3ADMIN14UC3CONTENTS">phpcron_admin/$uc_contents</a></dt>

              <dd>
                <dl>
                  <dt>A.32.1. <a href="#AEN1337">NAME</a></dt>

                  <dt>A.32.2. <a href="#AEN1341">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.33. <a href=
              "#ANCHORPHPCRON3ADMIN14UC3CONTENTS3LENGTH">phpcron_admin/$uc_contents_length</a></dt>

              <dd>
                <dl>
                  <dt>A.33.1. <a href="#AEN1353">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.34. <a href=
              "#ANCHORPHPCRON3ADMIN14ADMIN3SUBPAGE">phpcron_admin/$admin_subpage</a></dt>

              <dd>
                <dl>
                  <dt>A.34.1. <a href="#AEN1362">NAME</a></dt>
                </dl>
              </dd>

              <dt>A.35. <a href=
              "#ANCHORPHPCRON3ADMIN1CLEARLOGFILE">phpcron_admin/clearLogFile</a></dt>

              <dd>
                <dl>
                  <dt>A.35.1. <a href="#AEN1371">NAME</a></dt>

                  <dt>A.35.2. <a href="#AEN1376">SYNOPSIS</a></dt>

                  <dt>A.35.3. <a href="#AEN1380">INPUTS</a></dt>

                  <dt>A.35.4. <a href="#AEN1384">FUNCTION</a></dt>

                  <dt>A.35.5. <a href="#AEN1387">RESULT</a></dt>

                  <dt>A.35.6. <a href="#AEN1390">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.36. <a href=
              "#ANCHORPHPCRON3ADMIN1ISBADPHP">phpcron_admin/isBadPhp</a></dt>

              <dd>
                <dl>
                  <dt>A.36.1. <a href="#AEN1401">NAME</a></dt>

                  <dt>A.36.2. <a href="#AEN1406">SYNOPSIS</a></dt>

                  <dt>A.36.3. <a href="#AEN1410">FUNCTION</a></dt>

                  <dt>A.36.4. <a href="#AEN1413">INPUTS</a></dt>

                  <dt>A.36.5. <a href="#AEN1416">PURPOSE</a></dt>

                  <dt>A.36.6. <a href="#AEN1421">RESULT</a></dt>

                  <dt>A.36.7. <a href="#AEN1424">NOTES</a></dt>

                  <dt>A.36.8. <a href="#AEN1428">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.37. <a href=
              "#ANCHORPHPCRON3ADMIN1ISTABFORMBAD">phpcron_admin/isTabFormBad</a></dt>

              <dd>
                <dl>
                  <dt>A.37.1. <a href="#AEN1442">NAME</a></dt>

                  <dt>A.37.2. <a href="#AEN1448">SYNOPSIS</a></dt>

                  <dt>A.37.3. <a href="#AEN1452">FUNCTION</a></dt>

                  <dt>A.37.4. <a href="#AEN1456">INPUTS</a></dt>

                  <dt>A.37.5. <a href="#AEN1459">RESULT</a></dt>

                  <dt>A.37.6. <a href="#AEN1462">NOTES</a></dt>

                  <dt>A.37.7. <a href="#AEN1467">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.38. <a href=
              "#ANCHORPHPCRON3ADMIN1MENUBAR">phpcron_admin/menuBar</a></dt>

              <dd>
                <dl>
                  <dt>A.38.1. <a href="#AEN1477">NAME</a></dt>

                  <dt>A.38.2. <a href="#AEN1482">SYNOPSIS</a></dt>

                  <dt>A.38.3. <a href="#AEN1486">FUNCTION</a></dt>

                  <dt>A.38.4. <a href="#AEN1489">INPUTS</a></dt>

                  <dt>A.38.5. <a href="#AEN1492">RESULT</a></dt>

                  <dt>A.38.6. <a href="#AEN1495">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.39. <a href=
              "#ANCHORPHPCRON3ADMIN1PAGETITLE">phpcron_admin/pageTitle</a></dt>

              <dd>
                <dl>
                  <dt>A.39.1. <a href="#AEN1505">NAME</a></dt>

                  <dt>A.39.2. <a href="#AEN1510">SYNOPSIS</a></dt>

                  <dt>A.39.3. <a href="#AEN1514">FUNCTION</a></dt>

                  <dt>A.39.4. <a href="#AEN1517">INPUTS</a></dt>

                  <dt>A.39.5. <a href="#AEN1520">RESULT</a></dt>

                  <dt>A.39.6. <a href="#AEN1523">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.40. <a href=
              "#ANCHORPHPCRON3ADMIN1BUILDNEWTAB">phpcron_admin/buildNewtab</a></dt>

              <dd>
                <dl>
                  <dt>A.40.1. <a href="#AEN1532">NAME</a></dt>

                  <dt>A.40.2. <a href="#AEN1537">SYNOPSIS</a></dt>

                  <dt>A.40.3. <a href="#AEN1541">FUNCTION</a></dt>

                  <dt>A.40.4. <a href="#AEN1545">INPUTS</a></dt>

                  <dt>A.40.5. <a href="#AEN1548">RESULT</a></dt>

                  <dt>A.40.6. <a href="#AEN1551">NOTES</a></dt>

                  <dt>A.40.7. <a href="#AEN1556">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.41. <a href=
              "#ANCHORPHPCRON3ADMIN1CPPHPCRON">phpcron_admin/cpPhpcron</a></dt>

              <dd>
                <dl>
                  <dt>A.41.1. <a href="#AEN1565">NAME</a></dt>

                  <dt>A.41.2. <a href="#AEN1570">SYNOPSIS</a></dt>

                  <dt>A.41.3. <a href="#AEN1574">FUNCTION</a></dt>

                  <dt>A.41.4. <a href="#AEN1578">INPUTS</a></dt>

                  <dt>A.41.5. <a href="#AEN1581">RESULT</a></dt>

                  <dt>A.41.6. <a href="#AEN1584">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.42. <a href=
              "#ANCHORPHPCRON3ADMIN1EDITTABBYFORM">phpcron_admin/editTabByForm</a></dt>

              <dd>
                <dl>
                  <dt>A.42.1. <a href="#AEN1619">NAME</a></dt>

                  <dt>A.42.2. <a href="#AEN1624">SYNOPSIS</a></dt>

                  <dt>A.42.3. <a href="#AEN1628">FUNCTION</a></dt>

                  <dt>A.42.4. <a href="#AEN1631">INPUTS</a></dt>

                  <dt>A.42.5. <a href="#AEN1634">RESULT</a></dt>

                  <dt>A.42.6. <a href="#AEN1637">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.43. <a href=
              "#ANCHORPHPCRON3ADMIN1FULLEDITBOX">phpcron_admin/fullEditBox</a></dt>

              <dd>
                <dl>
                  <dt>A.43.1. <a href="#AEN1649">NAME</a></dt>

                  <dt>A.43.2. <a href="#AEN1654">SYNOPSIS</a></dt>

                  <dt>A.43.3. <a href="#AEN1658">FUNCTION</a></dt>

                  <dt>A.43.4. <a href="#AEN1661">INPUTS</a></dt>

                  <dt>A.43.5. <a href="#AEN1664">RESULT</a></dt>

                  <dt>A.43.6. <a href="#AEN1667">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.44. <a href=
              "#ANCHORPHPCRON3ADMIN1GETASSIGNMENTINFO">phpcron_admin/getAssignmentInfo</a></dt>

              <dd>
                <dl>
                  <dt>A.44.1. <a href="#AEN1679">NAME</a></dt>

                  <dt>A.44.2. <a href="#AEN1684">SYNOPSIS</a></dt>

                  <dt>A.44.3. <a href="#AEN1688">FUNCTION</a></dt>

                  <dt>A.44.4. <a href="#AEN1691">INPUTS</a></dt>

                  <dt>A.44.5. <a href="#AEN1694">RESULT</a></dt>

                  <dt>A.44.6. <a href="#AEN1698">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.45. <a href=
              "#ANCHORPHPCRON3ADMIN1GETCOMMENTS">phpcron_admin/getComments</a></dt>

              <dd>
                <dl>
                  <dt>A.45.1. <a href="#AEN1708">NAME</a></dt>

                  <dt>A.45.2. <a href="#AEN1713">SYNOPSIS</a></dt>

                  <dt>A.45.3. <a href="#AEN1717">FUNCTION</a></dt>

                  <dt>A.45.4. <a href="#AEN1720">INPUTS</a></dt>

                  <dt>A.45.5. <a href="#AEN1724">RESULT</a></dt>

                  <dt>A.45.6. <a href="#AEN1727">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.46. <a href=
              "#ANCHORPHPCRON3ADMIN1GETFORMELEMENT">phpcron_admin/getFormElement</a></dt>

              <dd>
                <dl>
                  <dt>A.46.1. <a href="#AEN1736">NAME</a></dt>

                  <dt>A.46.2. <a href="#AEN1741">SYNOPSIS</a></dt>

                  <dt>A.46.3. <a href="#AEN1745">FUNCTION</a></dt>

                  <dt>A.46.4. <a href="#AEN1748">INPUTS</a></dt>

                  <dt>A.46.5. <a href="#AEN1752">RESULT</a></dt>

                  <dt>A.46.6. <a href="#AEN1755">NOTES</a></dt>

                  <dt>A.46.7. <a href="#AEN1760">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.47. <a href=
              "#ANCHORPHPCRON3ADMIN14UC3CONTENTS3ARRAY">phpcron_admin/$uc_contents_array</a></dt>

              <dd>
                <dl>
                  <dt>A.47.1. <a href="#AEN1769">NAME</a></dt>

                  <dt>A.47.2. <a href=
                  "#AEN1773">DESCRIPTION</a></dt>

                  <dt>A.47.3. <a href="#AEN1776">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.48. <a href=
              "#ANCHORPHPCRON3ADMIN14ASSIGNMENT3INFO">phpcron_admin/$assignment_info</a></dt>

              <dd>
                <dl>
                  <dt>A.48.1. <a href="#AEN1788">NAME</a></dt>

                  <dt>A.48.2. <a href=
                  "#AEN1792">DESCRIPTION</a></dt>

                  <dt>A.48.3. <a href="#AEN1798">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.49. <a href=
              "#ANCHORPHPCRON3ADMIN1PARSEUSERCONFIG">phpcron_admin/parseUserConfig</a></dt>

              <dd>
                <dl>
                  <dt>A.49.1. <a href="#AEN1809">NAME</a></dt>

                  <dt>A.49.2. <a href="#AEN1814">SYNOPSIS</a></dt>

                  <dt>A.49.3. <a href="#AEN1818">FUNCTION</a></dt>

                  <dt>A.49.4. <a href="#AEN1821">INPUTS</a></dt>

                  <dt>A.49.5. <a href="#AEN1824">RESULT</a></dt>

                  <dt>A.49.6. <a href="#AEN1827">NOTES</a></dt>

                  <dt>A.49.7. <a href="#AEN1832">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.50. <a href=
              "#ANCHORPHPCRON3ADMIN1REBUILDUSERCFG">phpcron_admin/rebuildUserCfg</a></dt>

              <dd>
                <dl>
                  <dt>A.50.1. <a href="#AEN1844">NAME</a></dt>

                  <dt>A.50.2. <a href="#AEN1849">SYNOPSIS</a></dt>

                  <dt>A.50.3. <a href="#AEN1853">FUNCTION</a></dt>

                  <dt>A.50.4. <a href="#AEN1856">INPUTS</a></dt>

                  <dt>A.50.5. <a href="#AEN1859">RESULT</a></dt>

                  <dt>A.50.6. <a href="#AEN1862">NOTES</a></dt>

                  <dt>A.50.7. <a href="#AEN1867">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.51. <a href=
              "#ANCHORPHPCRON3ADMIN1STRIPPHP">phpcron_admin/stripPhp</a></dt>

              <dd>
                <dl>
                  <dt>A.51.1. <a href="#AEN1876">NAME</a></dt>

                  <dt>A.51.2. <a href="#AEN1881">SYNOPSIS</a></dt>

                  <dt>A.51.3. <a href="#AEN1885">FUNCTION</a></dt>

                  <dt>A.51.4. <a href="#AEN1888">INPUTS</a></dt>

                  <dt>A.51.5. <a href="#AEN1891">RESULT</a></dt>

                  <dt>A.51.6. <a href="#AEN1894">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.52. <a href=
              "#ANCHORPHPCRON3ADMIN1TABTOPCOMMENTS">phpcron_admin/tabTopComments</a></dt>

              <dd>
                <dl>
                  <dt>A.52.1. <a href="#AEN1903">NAME</a></dt>

                  <dt>A.52.2. <a href="#AEN1908">SYNOPSIS</a></dt>

                  <dt>A.52.3. <a href="#AEN1912">FUNCTION</a></dt>

                  <dt>A.52.4. <a href="#AEN1915">INPUTS</a></dt>

                  <dt>A.52.5. <a href="#AEN1919">RESULT</a></dt>

                  <dt>A.52.6. <a href="#AEN1922">NOTES</a></dt>

                  <dt>A.52.7. <a href="#AEN1927">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.53. <a href=
              "#ANCHORPHPCRON1PHPCRON3COMMONLIB3README">PHPCRON/phpcron_commonlib_readme</a></dt>

              <dd>
                <dl>
                  <dt>A.53.1. <a href="#AEN1938">NAME</a></dt>

                  <dt>A.53.2. <a href=
                  "#AEN1943">DESCRIPTION</a></dt>

                  <dt>A.53.3. <a href="#AEN1948">AUTHOR</a></dt>

                  <dt>A.53.4. <a href="#AEN1952">COPYRIGHT</a></dt>

                  <dt>A.53.5. <a href="#AEN1956">BUGS</a></dt>

                  <dt>A.53.6. <a href="#AEN1961">NOTES</a></dt>
                </dl>
              </dd>

              <dt>A.54. <a href=
              "#ANCHORPHPCRON3COMMONLIB14LICENSE">phpcron_commonlib/$license</a></dt>

              <dd>
                <dl>
                  <dt>A.54.1. <a href="#AEN1976">NAME</a></dt>

                  <dt>A.54.2. <a href=
                  "#AEN1980">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.55. <a href=
              "#ANCHORPHPCRON3COMMONLIB14PHPCRON3FILE">phpcron_commonlib/$phpcron_file</a></dt>

              <dd>
                <dl>
                  <dt>A.55.1. <a href="#AEN1988">NAME</a></dt>

                  <dt>A.55.2. <a href=
                  "#AEN1992">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.56. <a href=
              "#ANCHORPHPCRON3COMMONLIB14PHPCRON3PSINFO3FILE">phpcron_commonlib/$phpcron_psinfo_file</a></dt>

              <dd>
                <dl>
                  <dt>A.56.1. <a href="#AEN2001">NAME</a></dt>

                  <dt>A.56.2. <a href=
                  "#AEN2005">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.57. <a href=
              "#ANCHORPHPCRON3COMMONLIB14PHPCRON3VENABLED3FILE">phpcron_commonlib/$phpcron_venabled_file</a></dt>

              <dd>
                <dl>
                  <dt>A.57.1. <a href="#AEN2014">NAME</a></dt>

                  <dt>A.57.2. <a href=
                  "#AEN2018">DESCRIPTION</a></dt>
                </dl>
              </dd>

              <dt>A.58. <a href=
              "#ANCHORPHPCRON3COMMONLIB14PHPCRON3OFF">phpcron_commonlib/$phpcron_off</a></dt>

              <dd>
                <dl>
                  <dt>A.58.1. <a href="#AEN2027">NAME</a></dt>

                  <dt>A.58.2. <a href="#AEN2032">NAME</a></dt>

                  <dt>A.58.3. <a href="#AEN2036">FUNCTION</a></dt>
                </dl>
              </dd>

              <dt>A.59. <a href=
              "#ANCHORPHPCRON3COMMONLIB14VIEWED3BY3BROWSER">phpcron_commonlib/$viewed_by_browser</a></dt>

              <dd>
                <dl>
                  <dt>A.59.1. <a href="#AEN2044">NAME</a></dt>

                  <dt>A.59.2. <a href="#AEN2048">FUNCTION</a></dt>

                  <dt>A.59.3. <a href="#AEN2051">BUGS</a></dt>

                  <dt>A.59.4. <a href="#AEN2056">NOTES</a></dt>

                  <dt>A.59.5. <a href="#AEN2064">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.60. <a href=
              "#ANCHORPHPCRON3COMMONLIB1CHECKPHPVERSION">phpcron_commonlib/checkPhpVersion</a></dt>

              <dd>
                <dl>
                  <dt>A.60.1. <a href="#AEN2072">NAME</a></dt>

                  <dt>A.60.2. <a href="#AEN2077">SYNOPSIS</a></dt>

                  <dt>A.60.3. <a href="#AEN2081">FUNCTION</a></dt>

                  <dt>A.60.4. <a href="#AEN2084">INPUTS</a></dt>

                  <dt>A.60.5. <a href="#AEN2087">RESULT</a></dt>

                  <dt>A.60.6. <a href="#AEN2090">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.61. <a href=
              "#ANCHORPHPCRON3COMMONLIB1SENDOUTPUT">phpcron_commonlib/sendOutput</a></dt>

              <dd>
                <dl>
                  <dt>A.61.1. <a href="#AEN2100">NAME</a></dt>

                  <dt>A.61.2. <a href="#AEN2105">SYNOPSIS</a></dt>

                  <dt>A.61.3. <a href="#AEN2109">FUNCTION</a></dt>

                  <dt>A.61.4. <a href="#AEN2113">INPUTS</a></dt>

                  <dt>A.61.5. <a href="#AEN2116">NOTES</a></dt>

                  <dt>A.61.6. <a href="#AEN2120">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.62. <a href=
              "#ANCHORPHPCRON3COMMONLIB1GETPROCESSINFO78">phpcron_commonlib/getProcessInfo()</a></dt>

              <dd>
                <dl>
                  <dt>A.62.1. <a href="#AEN2130">NAME</a></dt>

                  <dt>A.62.2. <a href="#AEN2135">SYNOPSIS</a></dt>

                  <dt>A.62.3. <a href="#AEN2138">FUNCTION</a></dt>

                  <dt>A.62.4. <a href="#AEN2141">RESULT</a></dt>

                  <dt>A.62.5. <a href="#AEN2144">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.63. <a href=
              "#ANCHORPHPCRON3COMMONLIBP1ISPATHBAD">phpcron_commonlibp/isPathbad</a></dt>

              <dd>
                <dl>
                  <dt>A.63.1. <a href="#AEN2152">NAME</a></dt>

                  <dt>A.63.2. <a href="#AEN2157">SYNOPSIS</a></dt>

                  <dt>A.63.3. <a href="#AEN2161">FUNCTION</a></dt>

                  <dt>A.63.4. <a href="#AEN2164">INPUTS</a></dt>

                  <dt>A.63.5. <a href="#AEN2167">RESULT</a></dt>

                  <dt>A.63.6. <a href="#AEN2171">EXAMPLE</a></dt>

                  <dt>A.63.7. <a href="#AEN2174">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.64. <a href=
              "#ANCHORPHPCRON3COMMONLIB1FORMATPATH">phpcron_commonlib/formatPath</a></dt>

              <dd>
                <dl>
                  <dt>A.64.1. <a href="#AEN2186">NAME</a></dt>

                  <dt>A.64.2. <a href="#AEN2191">SYNOPSIS</a></dt>

                  <dt>A.64.3. <a href="#AEN2195">FUNCTION</a></dt>

                  <dt>A.64.4. <a href="#AEN2198">PURPOSE</a></dt>

                  <dt>A.64.5. <a href="#AEN2201">INPUTS</a></dt>

                  <dt>A.64.6. <a href="#AEN2204">RESULT</a></dt>

                  <dt>A.64.7. <a href="#AEN2207">NOTES</a></dt>

                  <dt>A.64.8. <a href="#AEN2213">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.65. <a href=
              "#ANCHORPHPCRON3COMMONLIB1IS3EMAIL">phpcron_commonlib/is_email</a></dt>

              <dd>
                <dl>
                  <dt>A.65.1. <a href="#AEN2224">NAME</a></dt>

                  <dt>A.65.2. <a href="#AEN2229">SYNOPSIS</a></dt>

                  <dt>A.65.3. <a href="#AEN2233">FUNCTION</a></dt>

                  <dt>A.65.4. <a href="#AEN2236">INPUTS</a></dt>

                  <dt>A.65.5. <a href="#AEN2239">RESULT</a></dt>

                  <dt>A.65.6. <a href="#AEN2242">BUGS</a></dt>

                  <dt>A.65.7. <a href="#AEN2246">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.66. <a href=
              "#ANCHORPHPCRON3COMMONLIB1APPENDTOFILE">phpcron_commonlib/appendToFile</a></dt>

              <dd>
                <dl>
                  <dt>A.66.1. <a href="#AEN2255">NAME</a></dt>

                  <dt>A.66.2. <a href="#AEN2260">SYNOPSIS</a></dt>

                  <dt>A.66.3. <a href="#AEN2264">FUNCTION</a></dt>

                  <dt>A.66.4. <a href="#AEN2267">INPUTS</a></dt>

                  <dt>A.66.5. <a href="#AEN2270">RESULT</a></dt>

                  <dt>A.66.6. <a href="#AEN2273">EXAMPLE</a></dt>

                  <dt>A.66.7. <a href="#AEN2278">NOTES</a></dt>

                  <dt>A.66.8. <a href="#AEN2284">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.67. <a href=
              "#ANCHORPHPCRON3COMMONLIB1SAVEFILE">phpcron_commonlib/saveFile</a></dt>

              <dd>
                <dl>
                  <dt>A.67.1. <a href="#AEN2295">NAME</a></dt>

                  <dt>A.67.2. <a href="#AEN2300">SYNOPSIS</a></dt>

                  <dt>A.67.3. <a href="#AEN2304">FUNCTION</a></dt>

                  <dt>A.67.4. <a href="#AEN2307">INPUTS</a></dt>

                  <dt>A.67.5. <a href="#AEN2310">RESULT</a></dt>

                  <dt>A.67.6. <a href="#AEN2313">EXAMPLE</a></dt>

                  <dt>A.67.7. <a href="#AEN2321">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.68. <a href=
              "#ANCHORPHPCRON3COMMONLIB1DELETEFILE">phpcron_commonlib/deleteFile</a></dt>

              <dd>
                <dl>
                  <dt>A.68.1. <a href="#AEN2332">NAME</a></dt>

                  <dt>A.68.2. <a href="#AEN2337">SYNOPSIS</a></dt>

                  <dt>A.68.3. <a href="#AEN2341">FUNCTION</a></dt>

                  <dt>A.68.4. <a href="#AEN2344">INPUTS</a></dt>

                  <dt>A.68.5. <a href="#AEN2347">RESULT</a></dt>

                  <dt>A.68.6. <a href="#AEN2350">NOTES</a></dt>

                  <dt>A.68.7. <a href="#AEN2354">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.69. <a href=
              "#ANCHORPHPCRON3COMMONLIB1ISINTEGER">phpcron_commonlib/isInteger</a></dt>

              <dd>
                <dl>
                  <dt>A.69.1. <a href="#AEN2364">NAME</a></dt>

                  <dt>A.69.2. <a href="#AEN2369">SYNOPSIS</a></dt>

                  <dt>A.69.3. <a href="#AEN2373">FUNCTION</a></dt>

                  <dt>A.69.4. <a href="#AEN2376">INPUTS</a></dt>

                  <dt>A.69.5. <a href="#AEN2379">RESULT</a></dt>

                  <dt>A.69.6. <a href="#AEN2382">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.70. <a href=
              "#ANCHORPHPCRON3COMMONLIB1ISINTEGERINRANGE">phpcron_commonlib/isIntegerInRange</a></dt>

              <dd>
                <dl>
                  <dt>A.70.1. <a href="#AEN2391">NAME</a></dt>

                  <dt>A.70.2. <a href="#AEN2396">SYNOPSIS</a></dt>

                  <dt>A.70.3. <a href="#AEN2400">FUNCTION</a></dt>

                  <dt>A.70.4. <a href="#AEN2403">INPUTS</a></dt>

                  <dt>A.70.5. <a href="#AEN2406">RESULT</a></dt>

                  <dt>A.70.6. <a href="#AEN2409">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.71. <a href=
              "#ANCHORPHPCRON3COMMONLIB1MAILATTACHMENT">phpcron_commonlib/mailAttachment</a></dt>

              <dd>
                <dl>
                  <dt>A.71.1. <a href="#AEN2419">NAME</a></dt>

                  <dt>A.71.2. <a href="#AEN2424">SYNOPSIS</a></dt>

                  <dt>A.71.3. <a href="#AEN2428">FUNCTION</a></dt>

                  <dt>A.71.4. <a href="#AEN2431">INPUTS</a></dt>

                  <dt>A.71.5. <a href="#AEN2434">RESULT</a></dt>

                  <dt>A.71.6. <a href="#AEN2437">EXAMPLE</a></dt>

                  <dt>A.71.7. <a href="#AEN2441">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.72. <a href=
              "#ANCHORPHPCRON3COMMONLIB1ISOTHERPHPCROND">phpcron_commonlib/isOtherPhpcrond</a></dt>

              <dd>
                <dl>
                  <dt>A.72.1. <a href="#AEN2450">NAME</a></dt>

                  <dt>A.72.2. <a href="#AEN2455">SYNOPSIS</a></dt>

                  <dt>A.72.3. <a href="#AEN2459">FUNCTION</a></dt>

                  <dt>A.72.4. <a href="#AEN2462">PURPOSE</a></dt>

                  <dt>A.72.5. <a href="#AEN2465">RESULT</a></dt>

                  <dt>A.72.6. <a href="#AEN2468">BUGS</a></dt>

                  <dt>A.72.7. <a href="#AEN2472">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.73. <a href=
              "#ANCHORPHPCRON3COMMONLIB1STOPOTHERPHPCRON">phpcron_commonlib/stopOtherPhpcron</a></dt>

              <dd>
                <dl>
                  <dt>A.73.1. <a href="#AEN2485">NAME</a></dt>

                  <dt>A.73.2. <a href="#AEN2490">SYNOPSIS</a></dt>

                  <dt>A.73.3. <a href="#AEN2494">FUNCTION</a></dt>

                  <dt>A.73.4. <a href="#AEN2498">RESULT</a></dt>

                  <dt>A.73.5. <a href="#AEN2501">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.74. <a href=
              "#ANCHORPHPCRON3COMMONLIB1PARSECRONTIMEPARAMS">phpcron_commonlib/parseCronTimeParams</a></dt>

              <dd>
                <dl>
                  <dt>A.74.1. <a href="#AEN2513">NAME</a></dt>

                  <dt>A.74.2. <a href="#AEN2518">SYNOPSIS</a></dt>

                  <dt>A.74.3. <a href="#AEN2522">FUNCTION</a></dt>

                  <dt>A.74.4. <a href="#AEN2525">RESULT</a></dt>

                  <dt>A.74.5. <a href="#AEN2528">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.75. <a href=
              "#ANCHORPHPCRON3COMMONLIB1ISCRONTIMEPARAMSBAD">phpcron_commonlib/isCronTimeParamsBad</a></dt>

              <dd>
                <dl>
                  <dt>A.75.1. <a href="#AEN2538">SYNOPSIS</a></dt>

                  <dt>A.75.2. <a href="#AEN2542">FUNCTION</a></dt>

                  <dt>A.75.3. <a href="#AEN2545">INPUTS</a></dt>

                  <dt>A.75.4. <a href="#AEN2548">RESULT</a></dt>

                  <dt>A.75.5. <a href="#AEN2551">SOURCE</a></dt>
                </dl>
              </dd>

              <dt>A.76. <a href=
              "#ANCHORPHPCRON3COMMANDLIB1DOWNLOADFILE">phpcron_commandlib/downloadFile</a></dt>

              <dd>
                <dl>
                  <dt>A.76.1. <a href="#AEN2563">NAME</a></dt>

                  <dt>A.76.2. <a href="#AEN2568">SYNOPSIS</a></dt>

                  <dt>A.76.3. <a href="#AEN2572">FUNCTION</a></dt>

                  <dt>A.76.4. <a href="#AEN2575">INPUTS</a></dt>

                  <dt>A.76.5. <a href="#AEN2578">RESULT</a></dt>

                  <dt>A.76.6. <a href="#AEN2581">EXAMPLE</a></dt>

                  <dt>A.76.7. <a href="#AEN2585">SOURCE</a></dt>
                </dl>
              </dd>
            </dl>
          </dd>
        </dl>
      </div>

      <div class="SECT1">
        <h1 class="SECT1"><a name="INTRO">1. Introduction</a></h1>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="OVERVIEW">1.1. What is
          Phpcron?</a></h2>

          <p><span class="APPLICATION">Phpcron</span> is a <a href=
          "http://www.php.net" target="_top">PHP</a> command line
          program which allows you to execute programs and system
          commands at certain scheduled times. Phpcron operates in
          a similar fashion to Unix's Crond daemon, parsing a
          configuration file called phpcrontab.conf every minute
          and determining whether any programs are schedule to run.
          If so, Phpcron executes the indicated programs. Phpcron
          allows a host of options, including logging and email
          features.</p>

          <p>The Phpcron package also includes <a href=
          "#PHPCRONADMIN">Phpcron Admin</a> (phpcron_admin.php)
          which provides a browser based interface to Phpcron,
          allowing a user to remotely schedule programs and change
          Phpcron options in a user friendly way without having to
          deal with ssh, telnet, or arcane text editors.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="WHYPHPCRON">1.2. Why Use
          Phpcron instead of just Unix's Crond?</a></h2>

          <p>The primary advantage of using Phpcron is the <a href=
          "#PHPCRONADMIN">graphical interface</a> provided by
          Phpcron Admin and the additional logging and email
          features provided by Phpcron. With Phpcron you can turn
          email notification of command execution on or off,
          logging on or off, and access all the configuration
          options under Phpcron Admin. In addition, Phpcron can be
          used both on Unix and MS Windows' systems. Phpcron and
          Phpcron Admin provide an ideal solution for web hosts who
          wish to provide a graphical interface with the scheduling
          power of Crond and the added feature enhancements
          provided by Phpcron.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="COPYRIGHT">1.3. Copyright
          Information</a></h2>

          <p><span class="TRADEMARK">&#13; This document is
          copyrighted</span> &copy; 2001 <a href=
          "http://www.gemini1consulting.com/dcd/" target="_top">David
          C. Druffner</a> and is distributed under the terms of the
          license, stated below.</p>

          <p>This manual may be reproduced and distributed in whole
          or in part, in any medium physical or electronic, as long
          as this copyright notice is retained on all copies.
          Commercial redistribution is allowed and encouraged;
          however, this copyright notice must appear prominently in
          the work and this author would like to be notified at the
          following email address: <tt class="EMAIL">&lt;<a href=
          "mailto:hide@address.com">hide@address.com</a>&gt;</tt>
          prior to any such commercial distributions.</p>

          <p>All translations, derivative works, or aggregate works
          incorporating this manual must be covered under this
          copyright notice. That is, you may not produce a
          derivative work from this manual and impose additional
          restrictions on its distribution. Exceptions to these
          rules may be granted under certain conditions; please
          contact the <a href="mailto:hide@address.com"
          target="_top">author</a>.</p>

          <p><em>Modifications:</em> Any significant modifications
          (anything other than the correction of typos) to this
          document must be identified on the title page in the
          revision section of this document with the name and
          contact information of each author appearing next to each
          revision.</p>

          <p>If you have any questions, please contact <a href=
          "mailto:hide@address.com" target="_top">David
          Druffner</a></p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="DISCLAIMER">1.4.
          Disclaimer</a></h2>

          <p>NO LIABILITY FOR THE CONTENTS OF THIS DOCUMENT CAN BE
          ACCEPTED. USE THE CONCEPTS, EXAMPLES AND OTHER CONTENT AT
          YOUR OWN RISK. THERE MAY BE ERRORS AND INACCURACIES, THAT
          MAY OF COURSE BE DAMAGING TO YOUR SYSTEM. PROCEED WITH
          CAUTION, AND ALTHOUGH THIS IS HIGHLY UNLIKELY, THE
          AUTHOR(S) DO NOT TAKE ANY RESPONSIBILITY FOR THAT.</p>

          <p>All copyrights are held by their by their respective
          owners, unless specifically noted otherwise. Use of a
          term in this document should not be regarded as violating
          any trademark or service mark.</p>

          <p>Naming of particular products or brands should not be
          seen as endorsements.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="SOFTWARELICENSE">1.5. Phpcron
          License</a></h2>

          <p>Phpcron, Phpcron Admin,and associated scripts, carry
          the following license which is GPL compatible and modeled
          on the modified BSD license (for GNU descriptions of
          various license types see the <a href=
          "http://www.gnu.org/licenses/license-list.html" target=
          "_top">GNU License Page</a>):</p>

          <p>Redistribution and use in source and binary forms,
          with or without modification, are permitted provided that
          the following conditions are met:</p>

          <p>1.Redistributions of source code must retain the above
          copyright notice, this list of conditions and the
          following disclaimer.</p>

          <p>2.Redistributions in binary form must reproduce the
          above copyright notice, this list of conditions and the
          following disclaimer in the documentation and/or other
          materials provided with the distribution.</p>

          <p>3.The name of the author may not be used to endorse or
          promote products derived from this software without
          specific prior written permission.</p>

          <p>&#13;THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
          AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
          LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
          FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
          EVENT SHALL THE AUTHOR, ANY DISTRIBUTOR, OR ANY DOWNLOAD
          HOSTING COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT,
          INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
          (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
          GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
          BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
          OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
          TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
          WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
          THE POSSIBILITY OF SUCH DAMAGE.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="MANUALVERSION">1.6. Manual
          Version</a></h2>

          <p>This document is version 0.5.1.0 The document version
          number is in S.S.M.M format. S.S. will always match the
          version of the software and M.M. will indicate the
          release of the manual relating to that version. The
          latest version of this document, which will be made
          available in a variety of formats, including plain text,
          HTML (tarred and zipped), Single Html,Adobe Acrobat PDF,
          and the SGML source, can be found at the <a href=
          "http://www.gemini1consulting.com/tekhelp/phpcron/docs/"
          target="_top">Phpcron Document Page</a>.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="CREDITS">1.7. Credits</a></h2>

          <p>I have the pleasure of acknowledging:</p>

          <ul>
            <li>
              <p><em><a href="http://www.gemini1consulting.com"
              target="_top">Gemini 1 Consulting, LLC</a></em> for
              support during the development of this progam and for
              providing the resources to host the <tt class=
              "FUNCTION">Phpcron</tt>'s documentation page.Gemini 1
              Consulting, LLC is the developer of <span class=
              "TRADEMARK">GemTrend</span>&trade;, a Windows based
              Building Controls Software application,and other
              innovative software products.</p>
            </li>

            <li>
              <p><em><a href="http://www.sourceforge.net" target=
              "_top">SourceForge</a></em>, the host of <tt class=
              "FUNCTION">Phpcron</tt>'s download and development
              page.</p>
            </li>
          </ul>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="FEEDBACK">1.8.
          Feedback</a></h2>

          <p>Feedback is most certainly welcome for this document.
          Without your submissions and input, this document
          wouldn't exist. An <a href=
          "http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/html/"
           target="_top">online manual</a> is available for you to
          submit comments for all to read and for consideration for
          incorporation into the next version of this manual.</p>
	  <a href="#questionaire">At the minimum, please fill out the Feedback Form!</a>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="TRANSLATIONS">1.9.
          Translations</a></h2>

          <p>Translations of this document are welcome. Please use
          the SGML Source, or failing that, the HTML or text
          version, all of which are found at the <a href=
          "http://www.gemini1consulting.com/tekhelp/phpcron/docs/"
          target="_top">document page</a>. Translations can be
          emailed to <a href="mailto:hide@address.com"
          target="_top">David Druffner</a>.</p>
        </div>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="DOWNLOAD">2. Download
        Phpcron</a></h1>

        <p>The latest version of <span class=
        "APPLICATION">Phpcron</span> can be found on the
        Sourceforge <a href=
        "http://sourceforge.net/projects/phpcron/" target=
        "_top">Phpcron Project Page</a> and at <a href=
        "http://www.gemini1consulting.com/tekhelp/" target=
        "_top">Gemini 1 Consulting, LLC</a>. When the package is
        uncompressed it should contain the following files:</p>

        <ol type="1">
          <li>
            <p><tt class="FILENAME">phpcron.php</tt> <em>(the
            primary Phpcron script)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_admin.php</tt> <em>(the
            Phpcron Admin script</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_commonlib.php</tt>
            <em>(contains common library functions)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_userconfig.php</tt>
            <em>(user configuration file, optional only if you
            don't use Phpcron Admin)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcrontab.conf</tt>
            <em>(sample file which holds scheduling configuration,
            format is similar to Unix crontab)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcrond</tt> <em>(Linux bash
            shell script for invoking Phpcron as a daemon)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron</tt> <em>(Linux bash
            shell script for invoking phpcron.php)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_virtuald</tt>
            <em>(Linux bash shell script for invoking Phpcron as a
            Virtual Daemon - use this on the Unix crontab)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_test.sh</tt> <em>(a
            test shell script to put on phpcrontab.conf to test
            execution of Phpcron)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_manual_big.html</tt>
            <em>(this Phpcron manual in html)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">phpcron_manual_big.txt</tt>
            <em>(this Phpcron manual in text)</em></p>
          </li>

          <li>
            <p><tt class="FILENAME">LICENSE.txt</tt> <em>(license,
            info)</em></p>
          </li>
        </ol>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="SYSTEMREQUIREMENTS">3. System
        Requirements</a></h1>

        <p></p>

        <ol type="1">
          <li>
            <p><em><a href="http://www.php.net" target="_top">PHP
            4</a></em> (at least version 4.0.1, it was tested on
            version 4.0.3pl1 ) installed as a <a href=
            "http://www.php.net/manual/en/install.commandline.php"
            target="_top">CGI program</a> which provides a command
            line interpreter. The main engine behind Phpcron and
            Phpcron Admin is <tt class="FILENAME">phpcron.php</tt>,
            a script run at the command line.</p>
          </li>

          <li>
            <p><em>Operating System</em>. While the emphasis in
            development of Phpcron has been on Unix systems, it
            will run on Microsoft Windows platforms. However,
            Phpcron Admin will not be able to start the Phpcron
            Daemon,and the Virtual Daemon is designed to work with
            Unix's Crond.</p>
          </li>

          <li>
            <p>The web server must allow <em>system calls</em>.If
            in safe mode, it won't allow this unless the safe mode
            directory option has been enabled, and then only for
            system calls to commands that are in the safe mode
            directory. See the <a href=
            "http://www.php.net/manual/en/features.safe-mode.php"
            target="_top">safemode</a> section of the <a href=
            "http://www.php.net/manual/en/" target="_top">PHP
            Manual</a> for details.</p>
          </li>

          <li>
            <p>Read/write/execute permissions for the user of the
            server process ( for Apache, usually "nobody", "www",
            "apache" or "httpd" - do a <b class="COMMAND">ps</b><tt
            class="USERINPUT"><b>-ef | grep httpd</b></tt> to find
            out) to the directory containing Phpcron,read
            permissions to all files, write permissions to
            phpcrontab.conf. See <a href=
            "#INSTALLATION">Installation</a> for details. If you
            are operating on a remote server you may need telnet
            access to do this, although some ftp clients allow you
            to set permissions.</p>
          </li>
        </ol>
        <br>
        <br>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="INSTALLATION">4.
        Installation</a></h1>

        <p></p>

        <ol type="1">
          <li>
            <p>Create a new subdirectory in your web server's
            document root (e.g., phpcron).</p>
          </li>

          <li>
            <p>Copy the tar file to the new subdirectory and
            uncompress it.</p>
          </li>

          <li>
            <p>You can optionally place <tt class=
            "FILENAME">phpcron.php</tt> and <tt class=
            "FILENAME">phpcron_commonlib.php</tt> in a different
            directory than <tt class=
            "FILENAME">phpcron_admin.php</tt>. For example, you may
            wish to place those files in your bin directory outside
            of the web root (so that it is within your path and you
            can execute easily from the command line). If you do,
            you must edit <tt class=
            "FILENAME">phpcron_admin.php</tt>, find the definition
            of the <tt class="VARNAME">$phpcron_directory</tt>
            variable in the beginning of the script, and change it
            to equal a string which contains the path to the
            directory containing <tt class=
            "FILENAME">phpcron.php</tt>. The variable by default is
            set to the current directory.</p>
          </li>

          <li>
            <p>Edit <tt class=
            "FILENAME">phpcron_commonlib.php</tt>, find the
            definition of the <tt class="VARNAME">$php_path</tt>
            variable in the beginning of the script, and change it
            to equal a string which contains the path to the
            directory containing the "php" cgi executable. This
            will often be "/usr/local/bin" or "/usr/bin". Do an "ls
            /usr/local/bin/php" or "ls /usr/bin/php" to find out.
            If you still can't find it, check your $PATH
            environment variable: <b class="COMMAND">"echo
            $PATH"</b> and look in all the directories in your path
            to locate the "php" executable.</p>
          </li>

          <li>
            <p>Edit phpcron_virtuald, and change the definition of
            the <tt class="VARNAME">PHPCRON_DIRECTORY</tt>to equal
            the path to the directory which holds <tt class=
            "FILENAME">phpcron.php</tt>. In addition, change the
            PHP_PATH variable to equal a string which contains the
            path to the directory containing the "php" cgi
            executable (see above).</p>

            <div class="NOTE">
              <table class="NOTE" width="90%" border="0">
                <tr>
                  <td width="25" align="CENTER" valign="TOP"><img
                  src="../images/note.gif" hspace="5" alt=
                  "Note"></td>

                  <td align="LEFT" valign="TOP">
                    <p>If you are in a Windows environment, path
                    names should be written with a forward (/)
                    slash (<em>NOT</em> a backslash <em>or</em> an
                    escaped backslash (\\) ).</p>
                  </td>
                </tr>
              </table>
            </div>
            <br>
            <br>
          </li>

          <li>
            <p>Make sure the web server process has
            read/write/execute permissions to the installation
            directory, to the web server document root directory,
            <tt class="FILENAME">phpcrontab.conf</tt>, and <tt
            class="FILENAME">phpcron_userconfig.php</tt>. (Apache's
            process is usually owned by "www", "nobody", "apache"
            or "httpd").</p>
          </li>

          <li>
            <p>Make the installation directory password protected,
            preferably with ssl login only and allow only web
            and/or system administrators to access (see web server
            documentation). This is crucial as Phpcron allows a
            user to execute system programs!</p>
          </li>

          <li>
            <p>Point your browser to <tt class=
            "FILENAME">phpcron_admin.php</tt>. You probably will
            get some errors indicating that it cannot read your
            output file, log file and/or your phpcrontab.conf file.
            Scroll down until you see the options and edit the text
            boxes for <tt class="VARNAME">$phpcrontab_filename</tt>
            and <tt class="VARNAME">$log_result_file</tt> to point
            to your main installation directory. You will also want
            to change the email address, and any other appropriate
            options. Then click on the Save button. You may
            continue to get errors regarding not being able to read
            the output file until you start Phpcron since that file
            isn't created until Phpcron is run at least once.</p>

            <div class="NOTE">
              <table class="NOTE" width="90%" border="0">
                <tr>
                  <td width="25" align="CENTER" valign="TOP"><img
                  src="../images/note.gif" hspace="5" alt=
                  "Note"></td>

                  <td align="LEFT" valign="TOP">
                    <p>One option you may consider for security
                    reasons is to place your <tt class=
                    "FILENAME">phpcrontab.conf</tt> file outside of
                    your web root. If you do so you will need to
                    change the path of the phpcrontab.conf to point
                    to that location.</p>
                  </td>
                </tr>
              </table>
            </div>
            <br>
            <br>

            <p>For reference, here is a screen shot showing the
            available options:</p>

            <p></p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN241"></a>

              <p><img src="../images/cp_options.gif" align=
              "CENTER"></p>
            </div>
            <br>
            <br>
          </li>

          <li>
            <p>If you are on a Unix/Linux system, and want to
            utilize the <a href="#VIRTUALDAEMON">Virtual Daemon</a>
            you need to edit your Unix crontab file. Go to the
            command prompt (if you are installing on a remote
            system you will need to telnet or ssh to the server)
            and type <b class="COMMAND">crontab -e</b>. If your
            server gives you access to crontab, that should put you
            into <span class="APPLICATION">vi</span> (or some other
            text editor) showing your Crontab file. Insert the
            following line (in Vi you insert by typing the escape
            key, then the letter "i", then the text to be
            inserted):</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN249"></a>

              <table border="0" bgcolor="#E0E0E0" width="90%">
                <tr>
                  <td>
<pre class="PROGRAMLISTING">
<font color=
"#000000">* * * * * . [full path to phpcron directory]/phpcron_virtuald</font>
</pre>
                  </td>
                </tr>
              </table>
            </div>
            Notice the filename is preceeded by a dot and a space.
            The dot is the bash shell execute command. Many system
            admins (especially on virtual hosts) will require both
            the dot command, as well as the full path to the shell
            command (even if you would expect it already to be in
            your path). Now save and quit (in Vi this would be the
            escape key, then "ZZ"). This will cause Crond to
            execute <tt class="FILENAME">phpcron_virtuald</tt>
            every minute in <a href="#MODES">non-daemon mode</a>,
            which simulates the effect of a Phpcron daemon but
            without its overhead.<br>
            <br>
          </li>

          <li>
            <p>That's it. You can now view output, start and stop
            daemons (actual and virtual), view the log, and set
            options using the Control Panel. Set the schedule of
            programs using the Edit Schedule (Basic) and Edit
            Schedule (Advanced) menu selections. See the section on
            <a href="#PHPCRONADMIN">Phpcron Admin</a> for
            screenshots and explanations of these options.</p>
          </li>

          <li>
            <p>To test your installation, put the phpcron_test.sh
            script on your phpcrontab.conf file. Click on <a href=
            "#EDITTAB">Edit Schedule (Basic)</a> OR Edit Schedule
            (Advanced). For example, if it is Tuesday, enter
            something like this to execute the test script every
            minute (for more information on phpcrontab.conf see <a
            href="#PHPCRONTAB">Phpcrontab</a>):</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN260"></a>

              <table border="0" bgcolor="#E0E0E0" width="90%">
                <tr>
                  <td>
<pre class="PROGRAMLISTING">
<font color="#000000">* * * * 2 . ./phpcron_test.sh</font>
</pre>
                  </td>
                </tr>
              </table>
            </div>
            Then press Save. This should execute the
            phpcron_test.sh file every minute. This little script
            creates an HTML file called <tt class=
            "FILENAME">phpcron_test.html</tt> and outputs to it the
            time of the script's execution. To verify that it has
            been executed, make sure that the Phpcron daemon
            (either actual or Virtual) is enabled, wait a minute,
            then point your browser to
            http://[yoursite]/[phpcron_installation_directory]/phpcron_test.html.
            You should see the HTML page updated every minute with
            the current time when you press reload on your
            browser.<br>
            <br>
          </li>
        </ol>

        <div class="WARNING">
          <table class="WARNING" width="100%" border="0">
            <tr>
              <td width="25" align="CENTER" valign="TOP"><img src=
              "../images/warning.gif" hspace="5" alt=
              "Warning"></td>

              <td align="LEFT" valign="TOP">
                <p>A Note on privileges in Unix: Using chmod and
                chown, you should make the owner of the server
                process a member of a group (say phpcron_group) and
                grant that group the necessary privileges to read,
                write, and execute files in the phpcron
                installation directory . All other users should be
                denied even read access. These same restrictions
                should be implemented on a Windows system using the
                equivalent permission controls.</p>
              </td>
            </tr>
          </table>
        </div>

        <div class="NOTE">
          <table class="NOTE" width="100%" border="0">
            <tr>
              <td width="25" align="CENTER" valign="TOP"><img src=
              "../images/note.gif" hspace="5" alt="Note"></td>

              <td align="LEFT" valign="TOP">
                <p>The above instructions assume you are going to
                use Phpcron Admin with Phpcron. If you only want to
                use Phpcron at the command line, just copy <tt
                class="FILENAME">phpcron_commonlib.php</tt>, <tt
                class="FILENAME">phpcron.php</tt>, <tt class=
                "FILENAME">phpcrontab.conf</tt>, and in a Unix
                environment, the shell scripts, <tt class=
                "FILENAME">phpcrond</tt>, and <tt class=
                "FILENAME">phpcron</tt> to a directory in your
                path, set the proper permissions, and <a href=
                "#COMMANDLINE">execute</a> with the proper <a href=
                "#OPTIONS">options</a>.</p>
              </td>
            </tr>
          </table>
        </div>
        <br>
        <br>
      </div>

<!------ Start of Feedback Form --->
<hr>
<a name="questionaire"></a>
  <span class="questionaire">
      <span class="qintro">
        <h2 align="center">Your Feedback is Vital</h2>

        <p>I would really appreciate it if
        you could fill out this form and submit it. I was considering a scheme for a really
	annoying splash screen but decided that this form would be better.
	You will need to be connected to the internet when you do so. I have
	had hundreds of downloads of this script but have heard very little back. 
	 I  need <strong>
        your</strong> comments to make the next version of Phpcron better.
	 
        <p>Your email address won't be sold to or used by third
        parties, although, if you wish, we will place you on the developer's 
        mailing list to announce updates. All information, including the email address
	is optional.</p>
      </span>

      <form name="feedback" method="post" action="http://www.gemini1consulting.com/tekhelp/process_feedback.php">

	<input type=hidden name=program_name value=phpcron>
        <!-- Out table just 2 or 3 cells for alignment of columns -->

        <table align="center" border="1" cellspacing="0"
        cellpadding="1">
          <tr>
            <td>
              <table align="center" border="0" cellspacing="0"
              cellpadding="1">
                <tr align="left" valign="middle">
                  <td align="center" colspan="2"><strong>Ratings
                  are on a scale of 1-5 (5 is highest)</strong>
                  </td>
                </tr>
             
            <tr>
<td >
Email Address:
</td>
<td>
<input name="email_address" type=text>
</td>
</tr>
                 
                <tr>
                  <td>Usefulness:</td>

                  <td><select name="useful_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> </td>
                </tr>

                <tr>
                  <td>Ease of install:</td>

                  <td><select name="install_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> </td>
                </tr>

                <tr>
                  <td>Interface Design:</td>

                  <td><select name="interface_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> </td>
                </tr>

                <tr>
                  <td>Quality of Code:</td>

                  <td><select name="code_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> </td>
                </tr>

                <tr>
                  <td>Manual:</td>

                  <td><select name="manual_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> <br>
                   </td>
                </tr>

                <tr>
                  <td>Overall Rating:</td>

                  <td><select name="overall_rating">
                    <option value="5">
                      5
                    </option>

                    <option value="4">
                      4
                    </option>

                    <option value="3">
                      3
                    </option>

                    <option value="2">
                      2
                    </option>

                    <option value="1">
                      1
                    </option>
                  </select> </td>
                </tr>

                <tr>
                  <td>Operating System On<br>
                   Server (not client!)<br>
                   </td>

                  <td><select name="OS">
                    <option value="Linux">
                      Linux
                    </option>

                    <option value="Win95">
                      Win95
                    </option>

                    <option value="Win98">
                      Win98
                    </option>

                    <option value="Win2000">
                      Win2000
                    </option>

                    <option value="Mac">
                      Mac
                    </option>

                    <option value="Unix">
                      Unix
                    </option>
                  </select> <br>
                   </td>
                </tr>

                <tr>
                  <td>OS Brand, Version:</td>

                  <td><input type="text" name="os_specific"> </td>
                </tr>
                <!-- end of inside table for left column -->
              </table>
              Uncheck if don't want comments published: <input
              name="publish_ok" type="checkbox" value="true"
              checked><br>
               Check to receive notice of updates: <input name=
              "email_list" type="checkbox" value="true"> 
            </td>

            <td>
              <table>
                <!-- end of first cell for outer table, begin right column -->

                <tr align="center">
                  <td colspan="2">Install Problems/Resolution
                  Details:<br>
                   <textarea rows="3" cols="40" name=
                  "comments_install"></textarea><br>
                   Describe Bugs and Resolution:<br>
                   <textarea cols="40" rows="3" name=
                  "comments_bugs"></textarea><br>
                   Features to Add/Improve?<br>
                   <textarea cols="40" rows="3" name=
                  "comments_features"></textarea><br>
                   General Comments:<br>
                   <textarea cols="40" rows="3" name=
                  "comments_general"></textarea><br> <!-- end of right column, inside table --> </td>
                </tr>
              </table>
              <!-- end of outer table -->
            </td>
          </tr>
        </table>

        <div align="center">
          <br>
           <input align="center" type="submit" value="Submit">
   
      </form>

      <span align="center" class="hotscripts">
        <form action="http://www.hotscripts.com/cgi-bin/rate.cgi"
        method="POST">
          <!-- you can use this same code but make sure the id is right --><input
           type="hidden" name="ID" value="12699"> 

          <table border="0" cellspacing="0">
            <tr>
              <td align="center">You can also submit your vote on
              Phpcron to <a target="_top" href=
              "http://www.hotscripts.com"><i>HotScripts.com</i></a></td>

              <td align="center">
                <table border="0" cellspacing="2" align="center">
                  <tr>
                    <td align="center"><select name="ex_rate">
                      <option value="5" selected>
                        Excellent!
                      </option>

                      <option value="4">
                        Very Good
                      </option>

                      <option value="3">
                        Good
                      </option>

                      <option value="2">
                        Fair
                      </option>

                      <option value="1">
                        Poor
                      </option>
                    </select></td>

                    <td align="center"><input type="submit" value=
                    "Cast My Vote!"></td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
	       </div>
        </form>


      </span>
    </span>





<!------ End of Feedback Form ------>










      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="PHPCRONTAB">5. Scheduling
        Program Execution</a></h1>

        <p>Phpcrontab.conf is the text file that holds the Phpcron
        scheduling directives. An example file is included in your
        download package. The format is the same as Crond's
        crontab. The format is:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN279"></a>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color=
"#000000"> minute hour   day of month  month   weekday  command
 (0-59) (0-23)   (1-31)      (1-12)   (0-6)
 </font>
</pre>
              </td>
            </tr>
          </table>
        </div>
        <br>
        <br>

        <p>Wild Cards and ranges are allowed. Each parameter is
        separated by one pace, except the command text which can be
        separated from the time parameters by more than one space.
        You can use leading zeros (e.g, 03) but it is not
        necessary. You can comment to the end of a line by
        beginning the comment with a pound sign (#) (shell style
        comments) but multiple C style (e.g., /*comment */) line
        comments are not allowed.</p>

        <div class="EXAMPLE">
          <a name="AEN282"></a>

          <p><b>Example 1. Short Phpcrontab.conf Example</b></p>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color="#000000"> 
 # Example phpcrontab.conf file with wildcard. 
 
 # Executes command every Friday at 3:59
 
 59 3 * * 5     sample_script.sh  
 
 # executes on the 1st and 15th of the month
 
 0 0 1,15 * *   sample_script.sh  
 
 #executes on the 1st-15th of the month 
 #which are any weekday except Wednesday and Saturday
 
 0 0 1-15 * 0-2,4,6 sample_script.sh
 </font>
</pre>
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="COMMANDLINE">6. Command Line
        Execution</a></h1>

        <p>You don't need Phpcron Admin to invoke Phpcron. Assuming
        that the Phpcron scripts are in your path, at your system
        prompt type</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN290"></a>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color="#000000">php phpcron.php [commandline switches]</font>
</pre>
              </td>
            </tr>
          </table>
        </div>
        <br>
        <br>

        <p>To invoke Phpcron as a daemon type the following:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN293"></a>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color="#000000">php phpcron.php --daemon</font>
</pre>
              </td>
            </tr>
          </table>
        </div>
        &#13;<br>
        <br>

        <p>On Linux systems, instead of the above, you can use the
        shell scripts which are simpler:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN296"></a>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color="#000000">phpcron [commandline switches]</font>
</pre>
              </td>
            </tr>
          </table>
        </div>
        This executes the bash shell script phpcron which in turns
        executes phpcron.php.<br>
        <br>

        <p>For <em>daemon</em> execution in Linux, type</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN300"></a>

          <table border="0" bgcolor="#E0E0E0" width="100%">
            <tr>
              <td>
<pre class="PROGRAMLISTING">
<font color="#000000">phpcrond [command line switches]</font>
</pre>
              </td>
            </tr>
          </table>
        </div>
        <br>
        <br>

        <div class="NOTE">
          <table class="NOTE" width="100%" border="0">
            <tr>
              <td width="25" align="CENTER" valign="TOP"><img src=
              "../images/note.gif" hspace="5" alt="Note"></td>

              <td align="LEFT" valign="TOP">
                <p><tt class="FILENAME">phpcron.php</tt> relies on
                the <tt class="FILENAME">phpcron_commonlib.php</tt>
                file for certain critical functions. Thus, while
                <tt class="FILENAME">phpcron.php</tt> can be
                executed at the command line without using Phpcron
                Admin and without relying on the <tt class=
                "FILENAME">phpcron_admin.php</tt> script, it must
                have access to <tt class=
                "FILENAME">phpcron_commonlib.php</tt> file. Make
                sure that <tt class=
                "FILENAME">phpcron_commonlib.php</tt>. is in the
                same directory as <tt class=
                "FILENAME">phpcron.php</tt>.</p>
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="OPTIONS">7. Phpcron
        Options</a></h1>

        <p>There are a host of options to Phpcron - all of which
        can be set either on the command line or through Phpcron
        Admin. To see the entire set of switches type <b class=
        "COMMAND">php phpcron.php -h</b> (or in Linux <b class=
        "COMMAND">phpcron -h</b> at the system prompt). Most of the
        options have either a long format (using --) or a short
        format (-). Some of the more useful options are:</p>

        <div class="VARIABLELIST">
          <p><b>Common Phpcron Command Line Switches</b></p>

          <dl>
            <dt>--daemon, -D</dt>

            <dd>
              <p>Invokes phpcron as a daemon (runs
              continuously)</p>
            </dd>

            <dt>--daemon-off, -d</dt>

            <dd>
              <p>Invokes phpcron.php in non-daemon mode. In this
              mode, it runs once, then exits. Usually only used for
              debugging, also utilized by phpcron_virtuald to
              simulate a daemon.</p>
            </dd>

            <dt>--email-errors EMAIL_ADDRESS, -E EMAIL_ADDRESS</dt>

            <dd>
              <p>Email Errors on - Email failure message if
              scheduled program fails to execute</p>
            </dd>

            <dt>--mail-notification EMAIL_ADDRESS, -M
            EMAIL_ADDRESS</dt>

            <dd>
              <p>&#13; Turn the mail notification feature on</p>
            </dd>

            <dt>--help, -?, -h</dt>

            <dd>
              <p>Help - Gives Explanation of Options</p>
            </dd>

            <dt>--logging LOGFILE, -L LOGFILE</dt>

            <dd>
              <p>Turn logging on and set the path to the log
              file</p>
            </dd>

            <dt>--quit, -q</dt>

            <dd>
              <p>Stops all instances of the phpcron daemon</p>
            </dd>
          </dl>
        </div>

        <div class="NOTE">
          <table class="NOTE" width="100%" border="0">
            <tr>
              <td width="25" align="CENTER" valign="TOP"><img src=
              "../images/note.gif" hspace="5" alt="Note"></td>

              <td align="LEFT" valign="TOP">
                <p>All of the options in phpcron.php have what I
                call "original" defaults, the settings of which you
                can view with the -h switch. However, these are
                overridden by the settings in the optional
                phpcron_userconfig.php file if it exists in the
                Phpcron directory. Phpcron_userconfig.php file is
                also the one which Phpcron Admin parses, displays,
                and changes when it changes options. So if you use
                Phpcron Admin and change any Phpcron options, the
                original defaults will change at the command line.
                Finally,please note that the command line switches
                override <em>both</em> the original defaults
                <em>and</em> the settings in the
                phpcron_userconfig.php file.</p>
              </td>
            </tr>
          </table>
        </div>
        <br>
        <br>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="PHPCRONADMIN">8. Phpcron
        Admin</a></h1>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="ADMINOVERVIEW">8.1.
          Overview</a></h2>

          <p>Phpcron Admin is a browser-based interface to Phpcron
          which allows you to configure Phpcron's options, stop and
          start Phpcron, and view the log file. It is an ideal
          utility for system administrators to use to allow their
          clients to schedule programs in a user friendly
          manner.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="CONTROLPANEL">8.2. Control
          Panel</a></h2>

          <p>The Phpcron Admin Control Panel allows you to do the
          following:</p>

          <ul>
            <li>
              <p>view status of Phpcron (including PID of any
              currently running process)</p>
            </li>

            <li>
              <p>set all configuration options for Phpcron</p>
            </li>

            <li>
              <p>start and stop Phpcron (both in daemon and
              non-daemon modes)</p>
            </li>

            <li>
              <p>enable and disable the Virtual Daemon,</p>
            </li>

            <li>
              <p>view,download, and email the phpcron log file</p>
            </li>

            <li>
              <p>schedule command execution (either through a
              direct edit of the phpcrontab.conf file or a user
              friendly form that checks entries for correct
              format)</p>
            </li>
          </ul>
          <br>
          <br>

          <p>Below is a screenshot, showing a section of the
          Control Panel. As you can see, the Virtual Daemon has
          been enabled.</p>

          <div class="EXAMPLE">
            <a name="VENABLED"></a>

            <p><b>Example 2. Screenshot: Control Panel (Virtual
            Daemon Enabled)</b></p>

            <p><img src="../images/cp_status_enabledc.gif" align=
            "CENTER"></p>
          </div>
          <br>
          <br>

          <p>The control panel also allows you to view and clear
          the log file, the Phpcron output, and the programs that
          are scheduled (the screen shots of these sections are not
          shown).</p>

          <p>Below is the next section of the Control Panel showing
          the options that can be configured for Phpcron. These
          options mirror the options that can be set using the
          command line <a href="#OPTIONS">options</a>.</p>

          <div class="EXAMPLE">
            <a name="AEN391"></a>

            <p><b>Example 3. Screenshot: Control Panel Option
            Configuration</b></p>

            <p><img src="../images/cp_options.gif" align=
            "CENTER"></p>
          </div>

          <div class="NOTE">
            <table class="NOTE" width="100%" border="0">
              <tr>
                <td width="25" align="CENTER" valign="TOP"><img
                src="../images/note.gif" hspace="5" alt=
                "Note"></td>

                <td align="LEFT" valign="TOP">
                  <p>The options above are generated on the fly by
                  parsing the phpcron_userconfig.php file. This
                  file must exist to run Phpcron Admin (it is not
                  needed to run the Phpcron on the <a href=
                  "#COMMANDLINE">command line</a>). The options
                  shown will also change depending on what
                  variables are defined in the
                  phpcron_userconfig.php file.</p>
                </td>
              </tr>
            </table>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="EDITTAB">8.3. Edit Scheduled
          Programs</a></h2>

          <p>Phpcron Admin also allows you to edit the
          phpcrontab.conf file and schedule your programs. This can
          be done with the "Edit Schedule (Advanced)" screen which
          allows you to directly edit the file (you can also edit
          the Options directly by selecting the Set Options
          (Advanced) menu choice).</p>

          <p>However, a better (and safer) way to schedule programs
          is to use the "Edit Schedule (Basic)" option on the menu.
          This will present you with a form that allows you to edit
          the schedule parameters, and when saved, will validate
          the parameters to check that they are in the correct
          format (a Javascript validation is used also). Here is a
          screenshot of a portion of the Edit Schedule (Basic)
          screen:</p>

          <div class="EXAMPLE">
            <a name="AEN402"></a>

            <p><b>Example 4. Screenshot: Edit Schedule
            (Basic)</b></p>

            <p><img src="../images/cp_sched.gif" align=
            "CENTER"></p>
          </div>
          <br>
          <br>

          <p>As you can see, the top comments of the file are
          presented in a text box at the top. There is no need to
          add leading #, these are added automatically when the
          file is saved. The schedule parameters can be entered in
          time columns. When the file is saved (the save button is
          not shown in the screenshot) the form will be validated
          (the formats of the time parameters are checked to see if
          they are within the correct ranges, etc.)</p>
        </div>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="MODESVIRTUALDAEMON">9. Modes and
        the Virtual Daemon</a></h1>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="MODES">9.1. Modes (Daemon and
          Non-Daemon)</a></h2>

          <p>Phpcron can be run in one of two "modes". The first is
          the "daemon mode" in which Phpcron runs continuously in
          the background. This mode is appropriate for systems in
          which only one user will be utilizing Phpcron. Unlike
          Unix's Crond daemon, a single Phpcron process parses only
          one configuration file (phpcrontab.conf) and cannot be
          configured to parse multiple users' crontabs. However,
          Phpcron can be run as a "Virtual Daemon" in conjunction
          with Unix's Crond, allowing multiple users on a single
          system to use Phpcron and Phpcron Admin.</p>

          <p>The second mode that Phpcron can be run in is the
          "non-daemon mode". This simply runs the script once and
          quits. It parses the phpcrontab.conf file only once. It
          is not very useful except for testing purposes.</p>
        </div>

        <div class="SECT2">
          <hr>

          <h2 class="SECT2"><a name="VIRTUALDAEMON">9.2. Virtual
          Daemon</a></h2>

          <p>The real advantage that Phpcron has over Crond is the
          ability to use <a href="#PHPCRONADMIN">Phpcron Admin</a>
          - a user friendly web based interface for the various
          scheduling and configuration options. However, in order
          to allow multiple users to use Phpcron on the same
          machine (e.g., in a virtual hosting environment) one
          would ordinarily need to invoke multiple instances of the
          Phpcron daemon - an unacceptable situation since this
          would overwhelm the server (in fact Phpcron is written to
          avoid this situation. It will automatically detect if
          another instance of Phpcron is running, and if so, refuse
          to run in daemon mode). However, one <em>can</em> allow
          multiple users utilize Phpcron by running it as a
          "Virtual Daemon". Instead of Phpcron running
          continuously, it is executed once every minute using
          Unix's Crond. This is done by putting editing your
          crontab file(using crontab -e, see <a href=
          "#INSTALLATION">Installation</a> for details). This will
          cause Crond to run <tt class=
          "FILENAME">phpcron_virtuald</tt> every minute. <tt class=
          "FILENAME">phpcron_virtuald</tt> is a shell script
          wrapper which invokes <tt class=
          "FILENAME">phpcron.php</tt> in <em>non-daemon</em> mode
          <strong>only if</strong> the Virtual Daemon has been <a
          href="#VENABLED">enabled</a> by Phpcron Admin.</p>

          <p>Phpcron Admin enables the Virtual Daemon by creating
          the file <tt class="FILENAME">phpcron_venabled</tt> in
          the Phpcron directory. Before invoking <tt class=
          "FILENAME">phpcron.php</tt>, <tt class=
          "FILENAME">Phpcron_virtuald</tt> checks to see if the <tt
          class="FILENAME">phpcron_venabled</tt> exists.If so, it
          executes <tt class="FILENAME">phpcron.php</tt> in
          <em>non-daemon</em> mode. If the file does not exist, <tt
          class="FILENAME">phpcron_virtuald</tt> does nothing. Thus
          the Virtual Daemon allows you to get the advantage of
          using Phpcron without the overhead of actual daemons
          running in the background, allowing multiple users on a
          system to use its features.</p>
        </div>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="CODEHISTORY">10. Code
        History</a></h1>

        <p>0.5b is the first version of Phpcron. It is a beta
        version.</p>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="DEMO">11. Demo</a></h1>

        <p>A Demonstration of Phpcron Admin and Phpcron is
        available <a href=
        "http://www.gemini1consulting.com/tekhelp/phpcron/demo/"
        target="_top">here</a>. Note that for security reasons, you
        won't be able to edit any configuration files and will get
        error messages saying that the configuration files can't be
        written to.</p>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="CONTRIBUTIONS">12. Code
        Contributions</a></h1>

        <p>Code modifications and contributions are welcome.
        Suggestions include:</p>

        <ul>
          <li>
            <p>Further Testing and improvement on Windows
            95/98/NT/2000 (the current version has been tested on
            Windows 95 and Linux only)</p>
          </li>
        </ul>

        <p>Please contribute at the Sourceforge <a href=
        " http://sourceforge.net/projects/phpcron/" target=
        "_top">Phpcron Project Page</a></p>
      </div>

      <div class="SECT1">
        <hr>

        <h1 class="SECT1"><a name="CODEREFERENCE">13. Code
        Reference</a></h1>

        <p>The Phpcron scripts have been heavily commented with
        inline documentation using a <a href=
        "http://www.gemini1consulting.com/tekhelp/" target=
        "_top">version of Robodoc</a> which this author revised to
        produce <a href="http://www.docbook.org" target=
        "_top">DocBook</a> SGML. Attached as an Appendix is the
        documented code for your reference. Some versions of this
        document may not have the Appendix, in which case, you can
        obtain the full version of the manual with the attached
        Appendix at the <a href=
        "http://www.gemini1consulting.com/tekhelp/phpcron/docs/"
        target="_top">Phpcron document page</a>.</p>
      </div>

      <div class="APPENDIX">
        <hr>

        <h1 class="APPENDIX"><a name="AEN464">A. Phpcron Code
        Reference</a></h1>

        <p><a name="ANCHORXREF3FILE"></a>Generated from xref_file
        with ROBODoc v3.2.3 on Wed Oct 24 21:26:43 2001&#13;</p>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name="AEN468">A.1. Phpcron Source
          Code Reference</a></h1>

          <div class="SECT2">
            <h2 class="SECT2"><a name="AEN470">A.1.1. Source
            Files</a></h2>

            <div class="SECT3">
              <h3 class="SECT3"><a name="AEN472">A.1.1.1. <a href=
              "#ANCHORPHPCRON.PHP"><tt class=
              "LITERAL">phpcron.php</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN477">A.1.1.2. <a href=
              "#ANCHORPHPCRON3ADMIN.PHP"><tt class=
              "LITERAL">phpcron_admin.php</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN482">A.1.1.3. <a href=
              "#ANCHORPHPCRON3COMMONLIB.PHP"><tt class=
              "LITERAL">phpcron_commonlib.php</tt></a></a></h3>
            </div>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN487">A.1.2.
            Functions</a></h2>

            <div class="SECT3">
              <h3 class="SECT3"><a name="AEN489">A.1.2.1. <a href=
              "#ANCHORAPPENDTOFILE"><tt class=
              "LITERAL">appendToFile</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN494">A.1.2.2. <a href=
              "#ANCHORBUILDNEWTAB"><tt class=
              "LITERAL">buildNewtab</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN499">A.1.2.3. <a href=
              "#ANCHORCHECKPHPVERSION"><tt class=
              "LITERAL">checkPhpVersion</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN504">A.1.2.4. <a href=
              "#ANCHORCLEARLOGFILE"><tt class=
              "LITERAL">clearLogFile</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN509">A.1.2.5. <a href=
              "#ANCHORCPPHPCRON"><tt class=
              "LITERAL">cpPhpcron</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN514">A.1.2.6. <a href=
              "#ANCHORDELETEFILE"><tt class=
              "LITERAL">deleteFile</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN519">A.1.2.7. <a href=
              "#ANCHORDOWNLOADFILE"><tt class=
              "LITERAL">downloadFile</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN524">A.1.2.8. <a href=
              "#ANCHOREDITTABBYFORM"><tt class=
              "LITERAL">editTabByForm</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN529">A.1.2.9. <a href=
              "#ANCHORFORMATPATH"><tt class=
              "LITERAL">formatPath</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN534">A.1.2.10. <a href=
              "#ANCHORFULLEDITBOX"><tt class=
              "LITERAL">fullEditBox</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN539">A.1.2.11. <a href=
              "#ANCHORGETASSIGNMENTINFO"><tt class=
              "LITERAL">getAssignmentInfo</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN544">A.1.2.12. <a href=
              "#ANCHORGETCOMMENTS"><tt class=
              "LITERAL">getComments</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN549">A.1.2.13. <a href=
              "#ANCHORGETFORMELEMENT"><tt class=
              "LITERAL">getFormElement</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN554">A.1.2.14. <a href=
              "#ANCHORGETPROCESSINFO78"><tt class=
              "LITERAL">getProcessInfo()</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN559">A.1.2.15. <a href=
              "#ANCHORISBADPHP"><tt class=
              "LITERAL">isBadPhp</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN564">A.1.2.16. <a href=
              "#ANCHORISCRONTIMEPARAMSBAD"><tt class=
              "LITERAL">isCronTimeParamsBad</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN569">A.1.2.17. <a href=
              "#ANCHORISINTEGER"><tt class=
              "LITERAL">isInteger</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN574">A.1.2.18. <a href=
              "#ANCHORISINTEGERINRANGE"><tt class=
              "LITERAL">isIntegerInRange</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN579">A.1.2.19. <a href=
              "#ANCHORISOTHERPHPCROND"><tt class=
              "LITERAL">isOtherPhpcrond</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN584">A.1.2.20. <a href=
              "#ANCHORISPATHBAD"><tt class=
              "LITERAL">isPathbad</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN589">A.1.2.21. <a href=
              "#ANCHORISTABFORMBAD"><tt class=
              "LITERAL">isTabFormBad</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN594">A.1.2.22. <a href=
              "#ANCHORIS3EMAIL"><tt class=
              "LITERAL">is_email</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN599">A.1.2.23. <a href=
              "#ANCHORKILLOTHERPHPCRON"><tt class=
              "LITERAL">killOtherPhpcron</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN604">A.1.2.24. <a href=
              "#ANCHORMAILATTACHMENT"><tt class=
              "LITERAL">mailAttachment</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN609">A.1.2.25. <a href=
              "#ANCHORMENUBAR"><tt class=
              "LITERAL">menuBar</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN614">A.1.2.26. <a href=
              "#ANCHORPAGETITLE"><tt class=
              "LITERAL">pageTitle</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN619">A.1.2.27. <a href=
              "#ANCHORPARSECRONTIMEPARAMS"><tt class=
              "LITERAL">parseCronTimeParams</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN624">A.1.2.28. <a href=
              "#ANCHORPARSEUSERCONFIG"><tt class=
              "LITERAL">parseUserConfig</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN629">A.1.2.29. <a href=
              "#ANCHORREBUILDUSERCFG"><tt class=
              "LITERAL">rebuildUserCfg</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN634">A.1.2.30. <a href=
              "#ANCHORSAVEFILE"><tt class=
              "LITERAL">saveFile</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN639">A.1.2.31. <a href=
              "#ANCHORSENDOUTPUT"><tt class=
              "LITERAL">sendOutput</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN644">A.1.2.32. <a href=
              "#ANCHORSTOPOTHERPHPCRON"><tt class=
              "LITERAL">stopOtherPhpcron</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN649">A.1.2.33. <a href=
              "#ANCHORSTOPTHISPROCESS"><tt class=
              "LITERAL">stopThisProcess</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN654">A.1.2.34. <a href=
              "#ANCHORSTRIPPHP"><tt class=
              "LITERAL">stripPhp</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN659">A.1.2.35. <a href=
              "#ANCHORTABTOPCOMMENTS"><tt class=
              "LITERAL">tabTopComments</tt></a></a></h3>
            </div>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN664">A.1.3.
            Variables</a></h2>

            <div class="SECT3">
              <h3 class="SECT3"><a name="AEN666">A.1.3.1. <a href=
              "#ANCHOR4ADMIN3EMAIL3ADDRESS"><tt class=
              "LITERAL">$admin_email_address</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN671">A.1.3.2. <a href=
              "#ANCHOR4ADMIN3SUBPAGE"><tt class=
              "LITERAL">$admin_subpage</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN676">A.1.3.3. <a href=
              "#ANCHOR4ASSIGNMENT3INFO"><tt class=
              "LITERAL">$assignment_info</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN681">A.1.3.4. <a href=
              "#ANCHOR4CL3HELP"><tt class=
              "LITERAL">$cl_help</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN686">A.1.3.5. <a href=
              "#ANCHOR4DAEMON3MODE"><tt class=
              "LITERAL">$daemon_mode</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN691">A.1.3.6. <a href=
              "#ANCHOR4DEBUG"><tt class=
              "LITERAL">$debug</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN696">A.1.3.7. <a href=
              "#ANCHOR4ERROR3EMAIL3ADDRESS"><tt class=
              "LITERAL">$error_email_address</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN701">A.1.3.8. <a href=
              "#ANCHOR4LEFT3MLC3CH"><tt class=
              "LITERAL">$left_mlc_ch</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN706">A.1.3.9. <a href=
              "#ANCHOR4LICENSE"><tt class=
              "LITERAL">$license</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN711">A.1.3.10. <a href=
              "#ANCHOR4LOG3RESULT"><tt class=
              "LITERAL">$log_result</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN716">A.1.3.11. <a href=
              "#ANCHOR4LOG3RESULT3FILE"><tt class=
              "LITERAL">$log_result_file</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN721">A.1.3.12. <a href=
              "#ANCHOR4MAIL3ERRORS"><tt class=
              "LITERAL">$mail_errors</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN726">A.1.3.13. <a href=
              "#ANCHOR4MAIL3SUCCESS"><tt class=
              "LITERAL">$mail_success</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN731">A.1.3.14. <a href=
              "#ANCHOR4PHPCRON3DIRECTORY"><tt class=
              "LITERAL">$phpcron_directory</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN736">A.1.3.15. <a href=
              "#ANCHOR4PHPCRON3FILE"><tt class=
              "LITERAL">$phpcron_file</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN741">A.1.3.16. <a href=
              "#ANCHOR4PHPCRON3OFF"><tt class=
              "LITERAL">$phpcron_off</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN746">A.1.3.17. <a href=
              "#ANCHOR4PHPCRON3OUTPUT"><tt class=
              "LITERAL">$phpcron_output</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN751">A.1.3.18. <a href=
              "#ANCHOR4PHPCRON3PSINFO3FILE"><tt class=
              "LITERAL">$phpcron_psinfo_file</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN756">A.1.3.19. <a href=
              "#ANCHOR4PHPCRON3VENABLED3FILE"><tt class=
              "LITERAL">$phpcron_venabled_file</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN761">A.1.3.20. <a href=
              "#ANCHOR4PHPCRONTAB3FILENAME"><tt class=
              "LITERAL">$phpcrontab_filename</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN766">A.1.3.21. <a href=
              "#ANCHOR4PID"><tt class=
              "LITERAL">$pid</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN771">A.1.3.22. <a href=
              "#ANCHOR4REDIRECT3OUTPUT"><tt class=
              "LITERAL">$redirect_output</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN776">A.1.3.23. <a href=
              "#ANCHOR4RIGHT3MLC3CH"><tt class=
              "LITERAL">$right_mlc_ch</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN781">A.1.3.24. <a href=
              "#ANCHOR4SC3CH"><tt class=
              "LITERAL">$sc_ch</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN786">A.1.3.25. <a href=
              "#ANCHOR4SECURE"><tt class=
              "LITERAL">$secure</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN791">A.1.3.26. <a href=
              "#ANCHOR4SLOW3DEBUG3SCROLL"><tt class=
              "LITERAL">$slow_debug_scroll</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN796">A.1.3.27. <a href=
              "#ANCHOR4START3TIME"><tt class=
              "LITERAL">$start_time</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN801">A.1.3.28. <a href=
              "#ANCHOR4SUPPRESS3OUTPUT"><tt class=
              "LITERAL">$suppress_output</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN806">A.1.3.29. <a href=
              "#ANCHOR4SYSTEM3NAME"><tt class=
              "LITERAL">$system_name</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN811">A.1.3.30. <a href=
              "#ANCHOR4UC3CONTENTS"><tt class=
              "LITERAL">$uc_contents</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN816">A.1.3.31. <a href=
              "#ANCHOR4UC3CONTENTS3ARRAY"><tt class=
              "LITERAL">$uc_contents_array</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN821">A.1.3.32. <a href=
              "#ANCHOR4UC3CONTENTS3LENGTH"><tt class=
              "LITERAL">$uc_contents_length</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN826">A.1.3.33. <a href=
              "#ANCHOR4USER3CONFIG3FILE"><tt class=
              "LITERAL">$user_config_file</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN831">A.1.3.34. <a href=
              "#ANCHOR4VIEWED3BY3BROWSER"><tt class=
              "LITERAL">$viewed_by_browser</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN836">A.1.3.35. <a href=
              "#ANCHORPHPCRON3DIRECTORY"><tt class=
              "LITERAL">phpcron_directory</tt></a></a></h3>
            </div>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN841">A.1.4.
            Constants</a></h2>

            <div class="SECT3">
              <h3 class="SECT3"><a name="AEN843">A.1.4.1. <a href=
              "#ANCHORCURRENT3DIRECTORY"><tt class=
              "LITERAL">CURRENT_DIRECTORY</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN848">A.1.4.2. <a href=
              "#ANCHORCURRENT3DIRECTORY"><tt class=
              "LITERAL">CURRENT_DIRECTORY</tt></a></a></h3>
            </div>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN853">A.1.5.
            Generic</a></h2>

            <div class="SECT3">
              <h3 class="SECT3"><a name="AEN855">A.1.5.1. <a href=
              "#ANCHORPHPCRON3ADMIN3README"><tt class=
              "LITERAL">phpcron_admin_readme</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN860">A.1.5.2. <a href=
              "#ANCHORPHPCRON3COMMONLIB3README"><tt class=
              "LITERAL">phpcron_commonlib_readme</tt></a></a></h3>
            </div>

            <div class="SECT3">
              <hr>

              <h3 class="SECT3"><a name="AEN865">A.1.5.3. <a href=
              "#ANCHORPHPCRON3README"><tt class=
              "LITERAL">phpcron_readme</tt></a></a></h3>

              <p><a name="ANCHORPHPCRON.PHP"></a>Generated from
              phpcron.php with ROBODoc v3.2.3 on Wed Oct 24
              21:26:43 2001</p>
            </div>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1PHPCRON3README">A.2.
          PHPCRON/phpcron_readme</a></h1>
          <a name="ANCHORPHPCRON3README"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN877">A.2.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>phpcron</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN881">A.2.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This is the scheduling engine and command line utility. 
 It can be controlled by <a href=
"#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN885">A.2.3.
            AUTHOR</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>David C. Druffner
 hide@address.com</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN889">A.2.4.
            COPYRIGHT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> COPYRIGHT 2001 (C) David C. Druffner
 hide@address.com
 This script is released under a modified BSD License.
 See php <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> -license and LICENSE.txt in download package 
 for full license details</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN893">A.2.5. CREATION
            DATE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>October 25, 2001</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN897">A.2.6. MODIFICATION
            HISTORY</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> October 25, 2001 - first beta release, version 0.5b.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN900">A.2.7. BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Can't startup phpcron or execute most system calls in Windows, 
 although stop and other functions work
 Other Bugs can be reported via the online manual:
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN905">A.2.8.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>This script can be controlled by Phpcron Admin (<a
 href="#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a>), 
 a based interface.
 
 The current manual for Phpcron and Phpcron Admin is located at 
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a>
 The Home Page is:
 <a href="http://phpcron.sourceforge.net/" target=
"_top">http://phpcron.sourceforge.net/</a>
 Download from the Source Forge Project Page:
 <a href="http://www.sourceforge.net/projects/phpcron/" target=
"_top">http://www.sourceforge.net/projects/phpcron/</a>

 In-Line Documentation:
 A slightly modified version of ROBODOC is used to
 generate documentation for   this code. I have modified the headers.c file in
 the Robodoc source code to  et  the variable header_markers to equal only
 /*ROBODOC* as the start of a  header  marker - this avoids confusion with other
 strings and comments in PHP  code.   Robodoc is available at
 <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html" target=
"_top">http://www.xs4all.nl/~rfsber/Robo/robodoc.html</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1CURRENT3DIRECTORY">A.3.
          phpcron/CURRENT_DIRECTORY</a></h1>
          <a name="ANCHORCURRENT3DIRECTORY"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN919">A.3.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>CURRENT_DIRECTORY</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN924">A.3.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Constant which holds the path of the current directory.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1PHPCRON3DIRECTORY">A.4.
          phpcron/phpcron_directory</a></h1>
          <a name="ANCHORPHPCRON3DIRECTORY"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN932">A.4.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>phpcron_directory</font> - path that holds include files
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN937">A.4.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This is the directory  that holds the include files.  Must be able to be
 written to by process  running this script. By default this is null thus
 pointing to the same  directory as this script .</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14START3TIME">A.5.
          phpcron/$start_time</a></h1>
          <a name="ANCHOR4START3TIME"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN945">A.5.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$start_time - formatted string hold time script started</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN949">A.5.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> String containing time script started.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14PHPCRONTAB3FILENAME">A.6.
          phpcron/$phpcrontab_filename</a></h1>
          <a name="ANCHOR4PHPCRONTAB3FILENAME"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN957">A.6.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$phpcrontab_filename - name of phpcrontab.conf file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN961">A.6.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> String - Name of phpcrontab.conf file.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name="ANCHORPHPCRON14DEBUG">A.7.
          phpcron/$debug</a></h1>
          <a name="ANCHOR4DEBUG"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN969">A.7.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$debug - controls debug messages</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN973">A.7.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Boolean - true to see debug messages</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14SLOW3DEBUG3SCROLL">A.8.
          phpcron/$slow_debug_scroll</a></h1>
          <a name="ANCHOR4SLOW3DEBUG3SCROLL"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN981">A.8.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$slow_debug_scroll - controlls scroll of debug messages</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN985">A.8.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Int - increase to slow scroll of debug messages</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14LOG3RESULT">A.9.
          phpcron/$log_result</a></h1>
          <a name="ANCHOR4LOG3RESULT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN993">A.9.1. NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$log_result - controls logging</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN997">A.9.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Boolean - true to log of execution of commands in phpcrontab.conf</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14LOG3RESULT3FILE">A.10.
          phpcron/$log_result_file</a></h1>
          <a name="ANCHOR4LOG3RESULT3FILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1005">A.10.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$log_result_files - path to log file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1009">A.10.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> String - path to log file</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1012">A.10.3.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>For Dos, use forward slash only, not double escape</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14MAIL3SUCCESS">A.11.
          phpcron/$mail_success</a></h1>
          <a name="ANCHOR4MAIL3SUCCESS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1021">A.11.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$mail_success - controls email notificatio</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1025">A.11.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Boolean - set to true to mail user a notification that 
 commands in phpcrontab.conf has been executed successfully</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14ADMIN3EMAIL3ADDRESS">A.12.
          phpcron/$admin_email_address</a></h1>
          <a name="ANCHOR4ADMIN3EMAIL3ADDRESS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1033">A.12.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$admin_email_address - address to email phpcron messages to</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1037">A.12.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> String - contains email address of administrator</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14MAIL3ERRORS">A.13.
          phpcron/$mail_errors</a></h1>
          <a name="ANCHOR4MAIL3ERRORS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1045">A.13.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$mail_errors - controls mailing of error messages</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1049">A.13.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Boolean - set to true to mail the user an error message
 regarding the failure of a scheduled phpcron command.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1052">A.13.3.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>This does not work for Windows/Dos</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14ERROR3EMAIL3ADDRESS">A.14.
          phpcron/$error_email_address</a></h1>
          <a name="ANCHOR4ERROR3EMAIL3ADDRESS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1061">A.14.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$error_email_address- email address to send error messages to</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1065">A.14.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> String - address receiving mail sent if $mail_errors 
 set to true to mail the user an error message</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14SYSTEM3NAME">A.15.
          phpcron/$system_name</a></h1>
          <a name="ANCHOR4SYSTEM3NAME"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1073">A.15.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$system_name- unique name of system which <a
href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> is running</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1078">A.15.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> String - Unique name of system on which the phpscript is used. You can name
 it whatever you want, but I suggest the host name - Used to identify system in 
 email messages</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14SUPPRESS3OUTPUT">A.16.
          phpcron/$suppress_output</a></h1>
          <a name="ANCHOR4SUPPRESS3OUTPUT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1086">A.16.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$suppress_output- true to suppress all but non-fatal error messages</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1090">A.16.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Boolean - Suppress all non-fatal error messages and other output (including
debugging messages). This overides $debug</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14DAEMON3MODE">A.17.
          phpcron/$daemon_mode</a></h1>
          <a name="ANCHOR4DAEMON3MODE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1098">A.17.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$daemon_mode- set to true to run as a daemon</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1102">A.17.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Boolean - when this is set to true, <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> runs in a 
 continuously as a daemon.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1STOPTHISPROCESS">A.18.
          phpcron/stopThisProcess</a></h1>
          <a name="ANCHORSTOPTHISPROCESS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1111">A.18.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>stopThisProcess</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1116">A.18.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>stopThisProcess</strong>(string $stop_message)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1120">A.18.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Gracefully stops this script. Time stamps the log file,
 deletes phpcron_psinfo file and exits.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1123">A.18.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $stop_message - Message to be output to 
 screen</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1126">A.18.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>stopThisProcess</strong>($stop_message) {
    //Graceful Stop
    
    global $log_result;
    global $log_result_file;
    global $pid;
    global $phpcron_off;
    global $phpcron_psinfo_file;
    global $daemon_mode;
    /* Only do this if this process is running as a daemon.
    Don't want to log start/stops if only running once */
    <a href=
"#ANCHORSENDOUTPUT">sendOutput</a>($stop_message."\r\n", true);
    
    if($daemon_mode) {
    
      $stop_time= date("m/d/Y").":".date("h:i:s:A");
    
      if ($log_result) {
      $stop_message="
    ***********************************************************
    PHPCRON (DAEMON) $pid Stopped $stop_time
    
    Final Output Message:
    ".strip_tags($stop_message)."
    ***********************************************************
    ";
    
      <a href=
"#ANCHORAPPENDTOFILE">appendToFile</a>("$stop_message", $log_result_file);
      }
    
      <a href="#ANCHORDELETEFILE">deleteFile</a>($phpcron_off);
    
    }
    
    <a href=
"#ANCHORDELETEFILE">deleteFile</a>($phpcron_psinfo_file);
    <a href=
"#ANCHORDELETEFILE">deleteFile</a>("$TEMP_DIR/".basename($phpcron_psinfo_file));
    
    
    
    exit;
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1KILLOTHERPHPCRON">A.19.
          phpcron/killOtherPhpcron</a></h1>
          <a name="ANCHORKILLOTHERPHPCRON"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1140">A.19.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>killOtherPhpcron</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1145">A.19.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>killOtherPhpcron</strong>(void)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1149">A.19.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Kills any other phpcron daemons that may be running.
 This is a non-nice termination and is only used
 when <a href=
"#ANCHORSTOPOTHERPHPCRON">stopOtherPhpcron</a> doesn't work. It actually
 kills the process and does not properly 
 timestamp logs, etc.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1153">A.19.4.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORSTOPOTHERPHPCRON">stopOtherPhpcron</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1158">A.19.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true on success, false on failure.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1161">A.19.6.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Probably lots due to not testing on any other system.
 Ps command may be different for other systems. 
 Kill process won't work on Windows systems.</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1165">A.19.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>killOtherPhpcron</strong>() {
    
            /* Abort Phpcron daemons - not nice*/
            //First try to stop nicely
            if(<a href=
"#ANCHORSTOPOTHERPHPCRON">stopOtherPhpcron</a>()){
            
            return true;
            }
            
          
            exec("ps -C php O p |grep 'phpcron.php.(*['--daemon'|'-D'].*'$|cut -d' ' -f1-4",$output,$result_code);
    
            $i=0;
            //loop through processes and kill them
            while($i&lt;=count($output[$i])-1) { //-1 is don't kill this process
            //Get rid of any spaces and make sure only have one element
            $output[$i]=trim($output[$i]);
            $output_array=explode(" ", $output[$i]);
            $output[$i]=$output_array[0];
    
            //<a href=
"#ANCHORSENDOUTPUT">sendOutput</a>("Output: Killing Phpcron daemon process $output[$i]\r\n");
            
            exec("kill -9 $output[$i]",$killoutput, $result_code);
            if ($result_code) {
            //<a href=
"#ANCHORSENDOUTPUT">sendOutput</a>("Error: Can't Kill process $output[$i]\r\n");
            return false;
            }
    
            $i++;
            }
    
            return !isotherPhpcrond();
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name="ANCHORPHPCRON14PID">A.20.
          phpcron/$pid</a></h1>
          <a name="ANCHOR4PID"></a>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name="ANCHORPHPCRON14CL3HELP">A.21.
          phpcron/$cl_help</a></h1>
          <a name="ANCHOR4CL3HELP"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1182">A.21.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$cl_help - command line help string</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1186">A.21.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> String - holds command line help</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1189">A.21.3.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000">    $cl_help="
    --abort
    -a
    
            -Aborts a currently running phpcron daemon - Not Nice. Only use if 
            --quit fails
            
    --phpcrontab PHPCRONTAB_CONF_FILE
    -c PHPCRONTAB_CONF_FILE
    
             -Sets the path for configuration file named as PHPCRONTAB_CONF_FILE
             
    --daemon
    -D
            -Daemon Mode - Run until process is killed
            
    --daemon-off
    -d      
    
            -Daemon Off/Run Once - Parse the phpcrontab file once and stop 
            (original default)
            
    
    --email-errors EMAIL_ADDRESS
    -E EMAIL_ADDRESS
    
            Email Errors on - Email failure message if scheduled program fails to
            execute
            
    --email-errors-off
    -e      
            -Mail Errors Stop - Turn off email of errors (original default)
            
    --help
    -h 
    -? 
    
            -Prints this help
            
    --logging LOGFILE
    -L LOGFILE
    
            -Turn logging on and set the path to the log file
            
    --logging-off
    -l      
            -Stops logging (original default)
            
    --mail-notification EMAIL_ADDRESS
    -M EMAIL_ADDRESS
            
            -Turn the mail notification feature on 
            
    --mail-notification-off
    -m
            - Turn the mail notification feature off (original default)
            
            
    --name SYSTEM_NAME
    -n
            -Set the system same used in mail messages
    
    
    -r [DUMP_FILE]
    
            - Redirect All Output to DUMP_FILE (default file: phpcron_output)
            
    --suppress
    -S
            -Suppress all messages to screen except fatal errors
    
    --suppress-off
    -s
            -Stop Suppression of output (original default, opposite of -S)
            
    --slow-debug SECONDS
    -sd SECONDS
    
            -Slow Debug Scroll - SECONDS is integer by which debug messages are 
            slowed. Increase to slow debug messages when verbosity is turned on
    
    --quit
    -q
            -Stops gracefully all currently running phpcron deamons
    
    --verbose
    -v
    
            -Turn debugging messages on
            
    --verbose-off
    
            -Turn debugging messsages off (original default)
            
            
    NOTE: The actual defaults may be different from the \"original default\" setting
    if the user configuration options have been changed in the script or if a user
    configuration file is being used.
    For more information, see the manual that is packaged with the script.
    
    ";    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON14REDIRECT3OUTPUT">A.22.
          phpcron/$redirect_output</a></h1>
          <a name="ANCHOR4REDIRECT3OUTPUT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1197">A.22.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$redirect_output - if true, directs output to specified file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1201">A.22.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Redirects all output to specified file</font>
</pre>
                </td>
              </tr>
            </table>

            <p><a name="ANCHORPHPCRON3ADMIN.PHP"></a>Generated from
            phpcron_admin.php with ROBODoc v3.2.3 on Wed Oct 24
            21:26:43 2001</p>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1PHPCRON3ADMIN3README">A.23.
          PHPCRON/phpcron_admin_readme</a></h1>
          <a name="ANCHORPHPCRON3ADMIN3README"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1211">A.23.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>phpcron_admin</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1215">A.23.2.
            AUTHOR</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>David C. Druffner
 hide@address.com</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1219">A.23.3.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> This is the browser based interface to <a
href="#ANCHORPHPCRON.PHP">phpcron.php</a>.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1223">A.23.4.
            COPYRIGHT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> COPYRIGHT 2001 (C) David C. Druffner
 hide@address.com
 This script is released under a modified BSD License.
 See php <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> -license and LICENSE.txt in download package 
 for full license details</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1227">A.23.5.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Can't startup phpcron or execute most system calls in Windows, 
 although stop and other functions work
 Other Bugs can be reported via the online manual:
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1232">A.23.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>This is the browser based interface to <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a>.

 The current manual for Phpcron and Phpcron Admin is located at 
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a>
 The Home Page is:
 <a href="http://phpcron.sourceforge.net/" target=
"_top">http://phpcron.sourceforge.net/</a>
 Download from the Source Forge Project Page:
 <a href="http://www.sourceforge.net/projects/phpcron/" target=
"_top">http://www.sourceforge.net/projects/phpcron/</a>

 In-Line Documentation:
 A slightly modified version of ROBODOC is used to
 generate documentation for   this code. I have modified the headers.c file in
 the Robodoc source code to  et  the variable header_markers to equal only
 /*ROBODOC* as the start of a  header  marker - this avoids confusion with other
 strings and comments in PHP  code.   Robodoc is available at
 <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html" target=
"_top">http://www.xs4all.nl/~rfsber/Robo/robodoc.html</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1CURRENT3DIRECTORY">A.24.
          phpcron_admin/CURRENT_DIRECTORY</a></h1>
          <a name="ANCHORCURRENT3DIRECTORY"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1246">A.24.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>CURRENT_DIRECTORY</font> - constant giving path for current directory
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1251">A.24.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Constant containing path for directory of script being executed.  This is
 mainly used to expand directories when paths are sent to the screen and the
 a path  otherwise would have no directory name since it is in the current
 directory. See <a href="#ANCHORFORMATPATH">formatPath</a>
 
  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14PHPCRON3DIRECTORY">A.25.
          phpcron_admin/$phpcron_directory</a></h1>
          <a name="ANCHOR4PHPCRON3DIRECTORY"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1260">A.25.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$<a href=
"#ANCHORPHPCRON3DIRECTORY">phpcron_directory</a> - path to directory holding <a
 href="#ANCHORPHPCRON.PHP">phpcron.php</a> </strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1266">A.25.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This is the only variable you need to set after  installing.   Its value is the
 directory in which you put <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> and all supporting  scripts  (other than
 this script, <a href=
"#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a>) in the  installation  package,  including
 <a href=
"#ANCHORPHPCRON3COMMONLIB.PHP">phpcron_commonlib.php</a>,phpcron_userconfig.php,  and   phpcrontab.conf.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14PHPCRON3OUTPUT">A.26.
          phpcron_admin/$phpcron_output</a></h1>
          <a name="ANCHOR4PHPCRON3OUTPUT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1277">A.26.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$phpcron_output - name and path of output file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1281">A.26.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This is the file which all output is redirected when the
 -r flag is used. See $cl_help</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14SECURE">A.27.
          phpcron_admin/$secure</a></h1>
          <a name="ANCHOR4SECURE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1289">A.27.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$secure - set to implement some security features</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1293">A.27.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Make this true to turn on some security features. The
 only thing this does now is turn off the "save as"
 text box on the edit screens</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14USER3CONFIG3FILE">A.28.
          phpcron_admin/$user_config_file</a></h1>
          <a name="ANCHOR4USER3CONFIG3FILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1301">A.28.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$user_config_file - contains path and filename of user configuration
 file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14LEFT3MLC3CH">A.29.
          phpcron_admin/$left_mlc_ch</a></h1>
          <a name="ANCHOR4LEFT3MLC3CH"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1310">A.29.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$left_mlc_ch - contains beginning characters marking beginning of multiline
                comment</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14RIGHT3MLC3CH">A.30.
          phpcron_admin/$right_mlc_ch</a></h1>
          <a name="ANCHOR4RIGHT3MLC3CH"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1319">A.30.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$right_mlc_ch - contains end characters of multiline comment for userconfig parse
</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14SC3CH">A.31.
          phpcron_admin/$sc_ch</a></h1>
          <a name="ANCHOR4SC3CH"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1328">A.31.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$sc_ch - contains start characters for single line comments, used in userconfig parse
</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14UC3CONTENTS">A.32.
          phpcron_admin/$uc_contents</a></h1>
          <a name="ANCHOR4UC3CONTENTS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1337">A.32.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$uc_contents - contents of $user_config_file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1341">A.32.2.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a>, <a href=
"#ANCHORPARSEUSERCONFIG">parseUserConfig</a>, <a href=
"#ANCHORREBUILDUSERCFG">rebuildUserCfg</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14UC3CONTENTS3LENGTH">A.33.
          phpcron_admin/$uc_contents_length</a></h1>
          <a name="ANCHOR4UC3CONTENTS3LENGTH"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1353">A.33.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$uc_contents_length - length of $uc_contents</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14ADMIN3SUBPAGE">A.34.
          phpcron_admin/$admin_subpage</a></h1>
          <a name="ANCHOR4ADMIN3SUBPAGE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1362">A.34.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$admin_subpage - main url variable which determines which page to display</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1CLEARLOGFILE">A.35.
          phpcron_admin/clearLogFile</a></h1>
          <a name="ANCHORCLEARLOGFILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1371">A.35.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>clearLogFile</font> - clears the log file
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1376">A.35.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean  <strong>clearLogFile</strong>(string $log_result_file);</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1380">A.35.3.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $log_result_file   - file which <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> logs all execution results to</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1384">A.35.4.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Deletes the log file and stamps it with the time
 that it was cleared.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1387">A.35.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true if cleared, false if was not able to be cleared.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1390">A.35.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>clearLogFile</strong>($log_result_file) {
    /* Clears Log file, returns false on success, true and error messages on failure */
    
    $clear_time= date("m/d/Y").":".date("h:i:s:A");
    if(!<a href=
"#ANCHORDELETEFILE">deleteFile</a>($log_result_file)) {
    $error_messages="Cannot delete $log_result_file - Check path and permissions.&lt;br&gt;";
    } else {
    
    $clear_message="
    ***********************************************************
    PHPCRON Log File Cleared on $clear_time
    
    ***********************************************************
    ";
    
    //append to log file and  get error messages, not success message
    $append_results=<a href=
"#ANCHORAPPENDTOFILE">appendToFile</a>($clear_message,$log_result_file);
    $append_results[0]="";
    if(trim($append_results)) {
    $error_messages.=implode(" ",$append_results);
    }
    
    
    }
    return $error_messages; //if there are errors, this will return true, if not, false
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1ISBADPHP">A.36.
          phpcron_admin/isBadPhp</a></h1>
          <a name="ANCHORISBADPHP"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1401">A.36.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>isBadPhp</font> - checks to see if there are any parse errors in a PHP file
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1406">A.36.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> mixed  <strong>isBadPhp</strong>(string $file_contents, string $file_name)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1410">A.36.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This functions checks $file_contents to see if it has any PHP errors in it 
 (syntax or otherwise) and returns those errors. It does so by saving a
 temporary  file with file_contents  to the web server document root directory
 and then   opening a url to it. 
 
 This should only be used on files that don't have any output - since it
 assumes  that any  output is an error (i.e., mainly intended to check if the
 syntax of  the included  user configuration file is ok.)&#13;</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1413">A.36.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $file_contents - contains contents of $file_name file to be checked for errors
 
 $file_name     - contains full path of an existing file, the contents of which
 are $file_contents
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1416">A.36.5.
            PURPOSE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> The primary purpose of this function is to make sure that the user 
 configuration file does not have an error in it before it is saved  if it is
 being edited through phpcron_admin. This could happen  if the user mistakenly
 enters erroneous statements - especially  in the free style edit mode. Since
 the userconfiguration file  is included both in <a href=
"#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a> and
 <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a>  this could have disasterous results unless syntax errors, etc. 
 are anticipated.
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1421">A.36.6.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> It returns the PHP error messages, if none, returns false.  
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1424">A.36.7.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>
 This requires the web server to have read/write permissions to the
 web server's root document directory.
</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1428">A.36.8.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function isBadPHP($file_contents, $file_name) {
    
    
    global $DOCUMENT_ROOT;
    global $SERVER_NAME;
    global $<a href=
"#ANCHORPHPCRON3DIRECTORY">phpcron_directory</a>;
    
    
    $file_name=$DOCUMENT_ROOT."/".basename($file_name).".tmp.php"; //add temporary extension
    $save_results=<a href=
"#ANCHORSAVEFILE">saveFile</a>(trim($file_contents), $file_name);
    
    if(!$save_results[0]) { //if not a successful save
    $save_results=implode("",$save_results);
    $error_messages.="Save results: $save_results";
    
    
    $index=2;
     /* $error_messages.="
      Error: Cannot save $file_name, verify permissions allow writing to file.&lt;br&gt;
      Error: Cannot save temporary file - verify permissions allow writing to ".<a
 href="#ANCHORFORMATPATH">formatPath</a>($<a href=
"#ANCHORPHPCRON3DIRECTORY">phpcron_directory</a>)."&lt;br&gt;";
      */
      while(isset($save_results[$index])) {
      $error_messages.=$save_results[$index];
      $index++;
      }
    
      return $error_messages;
    }
    
    $handle = fopen ("http://$SERVER_NAME/".basename($file_name), "r");
    
    while (!feof($handle)) {
    $contents.=fread($handle,4096);
    
    }
    
    fclose($handle);
    $contents=trim(strip_tags($contents));
    //get rid of reference to temporary file name
    $contents=str_replace ("in ".<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name),"", $contents);
    <a href="#ANCHORDELETEFILE">deleteFile</a>($file_name);
    
    /*If the output from the open has any characters in it at
       all we are assuming there are errors*/
    
    if ($contents) {
      return "The following PHP errors are in your file&lt;br&gt;\r\n".$contents;
    } else {
      return false;
    }
    
    
    
    } //end of function    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1ISTABFORMBAD">A.37.
          phpcron_admin/isTabFormBad</a></h1>
          <a name="ANCHORISTABFORMBAD"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1442">A.37.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>isTabFormBad</font> - validates phpcrontab.conf created by <a
 href="#ANCHOREDITTABBYFORM">editTabByForm</a> function
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1448">A.37.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>isTabFormBad</strong> (array $ct_param, array $commands)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1452">A.37.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This functions checks $ct_param and $commands which are generated by
 <a href=
"#ANCHOREDITTABBYFORM">editTabByForm</a>  they conform with proper crontab format. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1456">A.37.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $ct_params - 2 dimensional array which contains scheduling parameters for 
              phpcrontab.conf.
 
 $commands   - array which contains scheduled phpcrontab commands. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1459">A.37.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> It returns true if there is a validation error, false if the phpcrontab
 contents are valid.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1462">A.37.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHOREDITTABBYFORM">editTabByForm</a>.</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1467">A.37.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isTabFormBad</strong>($ct_param, $commands) {
    /* Validate parameters in Chron Tab Form Submitted from Structured Edit */
    
    $command_number=0;
    
              /* Cycle through each parameter */
                 while (list($first, $second) = each($ct_param)) {
                  $command_number++;
                  while (list($each_second) = each($second)) {
    
                          $test_value=trim($ct_param[$first][$each_second]);
                         $commands[$first]=trim($commands[$first]);
    
                         /* If it's an asterisk than it's ok - continue to next value */
    
                         if ($test_value =="*") {
                           continue;
                         }
                  }
    
    
                         /* If either there are any parameters for this line or
                         there are commands for this line than validate each parameter
                         for correct format */
    
                         //test if either a time parameter or commands are entered
                         $test_whole_string=trim(implode(" ",$ct_param[$first]));
                         
                         if ($test_whole_string or $commands[$first]) {
    
                         $error_messages.=<a href=
"#ANCHORISCRONTIMEPARAMSBAD">isCronTimeParamsBad</a>($test_whole_string, $command_number);
                         }
                          
        
                       
                       
                }
                
                /* If there are time parameters and no commands than give error */
                if (trim(implode("",$ct_param[$first])) and !$commands[$first])  {
      
                $error_messages.="Error in Command #$command_number: The commands field is empty&lt;br&gt;";
      
                }
    
              
              if ($error_messages) {
                return "&lt;h3&gt;Cannot save because of validation errors - please fix and try again:&lt;/h3&gt;
                      $error_messages";
              } else {
                return false;
              }
    
    }</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1MENUBAR">A.38.
          phpcron_admin/menuBar</a></h1>
          <a name="ANCHORMENUBAR"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1477">A.38.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>menuBar</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1482">A.38.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> string <strong>menuBar</strong>(void)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1486">A.38.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Contains the HTML for the main navigational menu bar</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1489">A.38.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1492">A.38.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a formatted string containing HTML for the menu bar.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1495">A.38.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000">    function <strong>menuBar</strong>() {
    global $PHP_SELF;
    
    
      //Print Horizontal Menu Bar
    $output="
      &lt;!--**********Begin Menu Bar**************--&gt;
      &lt;table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\" width=\"800px\" class=\"<strong>menuBar</strong>\" bgcolor=\"#9999CC\" summary=\"Menu Bar\"&gt;
      &lt;tr&gt;
        &lt;td align=\"center\" width=\"25%\"&gt;
          &lt;a href=\"$PHP_SELF?admin_subpage=Control_Panel\" title=\"Turn ON/OFF, Set Options\"&gt;Control Panel&lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
        |
        &lt;/td&gt;
        &lt;td align=\"center\" width=\"25%\"&gt;
          &lt;a href=\"$PHP_SELF?admin_subpage=Edit_UC_Full\" title=\"Directly Edit Options\"&gt;Set Options (Advanced)&lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
        |
        &lt;/td&gt;
        &lt;td align=\"center\" width=\"25%\"&gt;
          &lt;a href=\"$PHP_SELF"."?admin_subpage=Edit_Tab_By_Form\" title=\"Form Edit of Phpcrontab\"&gt;Edit Schedule (Basic)&lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
        |
        &lt;/td&gt;
        &lt;td align=\"center\" width=\"25%\"&gt;
          &lt;a href=\"$PHP_SELF?admin_subpage=Edit_Tab_Full\" title=\"Directly Edit Phpcrontab\"&gt;Edit Schedule (Advanced)&lt;br&gt;&lt;/a&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      
      &lt;/table&gt;
      &lt;!--**********End Menu Bar**************--&gt;
      ";
    
    return $output;
        
    
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1PAGETITLE">A.39.
          phpcron_admin/pageTitle</a></h1>
          <a name="ANCHORPAGETITLE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1505">A.39.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>pageTitle</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1510">A.39.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>pageTitle</strong>(string $title)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1514">A.39.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Completes the header for the HTML page inserting the page title, ending title
 and head ta and creating the opening body tag</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1517">A.39.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $title - string containing the title of the HTML page</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1520">A.39.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a formatted string containing HTML for the end of the &lt;head&gt; and 
  beginning of the body tag</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1523">A.39.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>pageTitle</strong>($title) {
      return "
      $title
      &lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      
    &lt;!--Begin Note for Non Compliant Browsers |*--&gt;
    
          &lt;p class=\"ahem\" &gt; 
        &lt;font size=2px&gt; 
        &lt;strong&gt; 
        &lt;em&gt;
              For a better viewing experience, either turn your CSS stylesheets
            on in your browser, or if your browser does not support stylesheets, 
          &lt;a href=\"http://www.webstandards.org/upgrade/\"
            title=\"Download a browser that complies with Web standards.\"&gt;download &lt;/a&gt; a
            browser that complies with web standards. Some browsers disable stylesheets when
            JavaScript is disabled. 
        &lt;/em&gt;
        &lt;/strong&gt;    
        &lt;/font&gt;
          &lt;/p&gt;
    
          &lt;NOSCRIPT&gt;
              &lt;p class=type1&gt;  &lt;font size=2px&gt; &lt;strong&gt; &lt;em&gt; Either you have JavaScript
           turned off in your browser or your browser does not
               support JavaScript. Although this site supports non-JavaScript browsers,
               for better functionality you may want to &lt;a href=\"http://www.webstandards.org/upgrade/\"
              title=\"Download a browser that complies with Web standards.\"&gt;download &lt;/a&gt;
           a JavaScript enabled browser.
              &lt;/em&gt; 
           &lt;/strong&gt;
           &lt;/font&gt;
              &lt;/p&gt;&lt;br/&gt;
           &lt;/NOSCRIPT&gt;
    
    &lt;!--End Note for Non Compliant Browsers *|--&gt;
        ";
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1BUILDNEWTAB">A.40.
          phpcron_admin/buildNewtab</a></h1>
          <a name="ANCHORBUILDNEWTAB"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1532">A.40.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>buildNewtab</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1537">A.40.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>buildNewtab</strong>(int $max_line_number, string $phpcrontab_filename, array
 $ct_param, array $commands, array $side_line_comments);
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1541">A.40.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Takes information from <a href=
"#ANCHOREDITTABBYFORM">editTabByForm</a> and creates new file contents to be 
 saved over phpcrontab.conf</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1545">A.40.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> int $max_line_number           - max number of lines in file
 string $phpcrontab_filename   - filename of phpcrontab.conf
 array $ct_param                - array containing scheduling parameters
 array $commands                - array containing comments
 array $side_line_comments      - array containing single line # comments </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1548">A.40.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a string containing the contents of the new phpcrontab.conf file</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1551">A.40.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHOREDITTABBYFORM">editTabByForm</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1556">A.40.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>buildNewtab</strong>($max_line_number, $phpcrontab_filename, $ct_param, $commands, $side_line_comments, $top_line_comments, $bottom_line_comments) {
      
        global $PHP_SELF;
    
         $line_number=0;
         /* Get rid of # as first character of each line (in case user inserted it) */
         $top_line_comments=preg_replace("/^#/m", "", trim($top_line_comments));
         /* Inserts # as first character of each line */
         $top_line_comments=preg_replace("/^(.)/m", "#\\1", trim($top_line_comments));
          $bottom_line_comments=preg_replace("/^#/m", "", trim($bottom_line_comments));
         $bottom_line_comments=preg_replace("/^(.)/m", "#\\1", trim($bottom_line_comments));
    
         $new_tab_contents.=$top_line_comments."\r\n\r\n";
    
            while($line_number&lt; $max_line_number) {
    
                    if($ct_param[$line_number]) {
                        $parameters=implode(" ", $ct_param[$line_number]);
                        $new_tab_contents.=$parameters." ".$commands[$line_number];
                        if($side_line_comments[$line_number]) {
                          $side_line_comments[$line_number]=preg_replace("/^#/m", "", trim($side_line_comments[$line_number]));
                          $side_line_comments[$line_number]=preg_replace("/^(.)/m", "#\\1", trim($side_line_comments[$line_number]));   
                        $new_tab_contents.="  ".$side_line_comments[$line_number]."\r\n";
                        } else {
                        $new_tab_contents.="\r\n";
                        } 
                   }
    
              $line_number++;  
            }
          
            $new_tab_contents.="\r\n\r\n".$bottom_line_comments;
            
            return trim($new_tab_contents); //contents of file to be saved
            
           
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1CPPHPCRON">A.41.
          phpcron_admin/cpPhpcron</a></h1>
          <a name="ANCHORCPPHPCRON"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1565">A.41.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>cpPhpcron</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1570">A.41.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> void <strong>cpPhpcron</strong> ([string $phpcron_command]) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1574">A.41.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Displays control panel page controlling activity of <a
href="#ANCHORPHPCRON.PHP">phpcron.php</a></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1578">A.41.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $phpcron_command - option argument which determines which command
                           to pass to phpcron (see switch statement)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1581">A.41.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Echoes the control panel page to the screen</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1584">A.41.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000">      
    function <strong>cpPhpcron</strong> ($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 <a href=
"#ANCHORPAGETITLE">pageTitle</a>("PHPCRON Admin - Control Panel");
    
    
      switch ($phpcron_command) {
    
      case "VStop":
    
        /* Disable Virtual Daemon */
             
        if (file_exists($phpcron_venabled_file)) {
             
        
        <a href=
"#ANCHORDELETEFILE">deleteFile</a>($phpcron_venabled_file);
        
        <a href="#ANCHORAPPENDTOFILE">appendToFile</a>("
    ****************************************************************
    PHPCRON Virtual Daemon Stopped ".date("m/d/Y").":".date("h:i:s:A")."
    ****************************************************************
    ", $log_result_file);
    
     
        
        
        }
    
        break;
        
        case "DStop":
    
        /* Turn off Daemon */
        
        if(!<a href=
"#ANCHORSTOPOTHERPHPCRON">stopOtherPhpcron</a>()) {
         $error_messages.="
        Error: Cannot Stop Phpcron. Make sure the server process can write to ".dirname($phpron_off)."&lt;BR&gt;";
        
        }
      
        
        break;
    
      case "Start":
    
    
     
         $os_formatted_path=<a href=
"#ANCHORFORMATPATH">formatPath</a>($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=<a href=
"#ANCHORSAVEFILE">saveFile</a>("VIRTUAL DAEMON ENABLED", $phpcron_venabled_file);
                <a href="#ANCHORAPPENDTOFILE">appendToFile</a>("
    ****************************************************************
    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 ".<a
href=
"#ANCHORFORMATPATH">formatPath</a>($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.&lt;br&gt;\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(<a href=
"#ANCHORISOTHERPHPCROND">isOtherPhpcrond</a>() and $daemon_mode) { 
                $error_messages.="PHPCRON is already running in daemon mode - Cannot start more than one instance&lt;br&gt;";
    
         } 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 &gt; /dev/null &amp;";
                } 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.&lt;br&gt;\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.
                      &lt;br&gt;
                      ";
                }
    
    
    
    
      // } /* DCD Fix don't use this
        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=<a href=
"#ANCHORMAILATTACHMENT">mailAttachment</a>($log_email_address, $subject, $body, $attachment, $mimetype)) {
    
    
      $error_messages.="Error: Unable to Email Log File:&lt;br&gt;\r\n".$mailserver_error;
      } else {
      $error_messages.="Emailed Log File to $admin_email_address";
      }
    
      break;
      
      
      
    
     case "Delete_Log":
       $error_messages.=<a href=
"#ANCHORCLEARLOGFILE">clearLogFile</a>($log_result_file);
       break;
    
    
    
      case "Save_UC":
    
    
        list($uc_contents, $uc_contents_array)=<a href=
"#ANCHORPARSEUSERCONFIG">parseUserConfig</a>($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(<a href=
"#ANCHORREBUILDUSERCFG">rebuildUserCfg</a>($assignment_info, $uc_contents_array)))."&lt;br&gt;";
    
        */
    
        /* Rebuild User Configuration File, then Save it */
    
          $save_results=<a href="#ANCHORSAVEFILE">saveFile</a>(<a
href=
"#ANCHORREBUILDUSERCFG">rebuildUserCfg</a>($assignment_info, $uc_contents_array), $user_config_file);
    
            if($save_results[0]) { //this would be successful save
        
            $settings_state="
            &lt;em&gt;
            Options saved with the following settings:
            &lt;/em&gt;
            &lt;br&gt;
            ";
          } 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.&lt;br&gt;";
    
    
          }
    
         
    
      
        //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.=    "
        &lt;!--**********Begin JavaScript*******************--&gt;
        &lt;SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\"&gt;
         &lt;!--  
    
    
       function isNumber(theField) {
       string=theField.value;
        for (i = 0; i &lt; string.length; i++)   {   
              // Check that each character is number.
              var c = string.charAt(i);
      
              if (!((c &gt;= \"0\") &amp;&amp; (c &lt;= \"9\")))  {
            
            alert(\"This field requires a number.\");
            theField.focus();
            return false;
            }
          }
         return true;
       }
    
        --&gt;    
    
        &lt;/SCRIPT&gt;
        &lt;!--**********End JavaScript*******************--&gt;
    
      &lt;!--**********Begin Control Panel Table**************--&gt;
      &lt;table align=\"center\" border=\"0\" class=\"control_panel\" cellpadding=\"2\" cellspacing=\"0\" width=\"600px\" summary=\"Control Panel\"&gt;
            &lt;tr&gt;
            &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_title&gt;
                    &lt;strong&gt;PHPCRON CONTROL PANEL&lt;/strong&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;strong&gt;Status&lt;/strong&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
            &lt;td style=$cp_left_col&gt;
              Server OS:
            &lt;/td&gt;
            &lt;td style=$cp_right_col&gt;
                ".PHP_OS."
            &lt;/td&gt;
            &lt;/tr&gt;
            ";
    
      if (<a href="#ANCHORISOTHERPHPCROND">isOtherPhpcrond</a>()) {
    
      $daemon_running=true;
      }
      
      $output.="
            &lt;tr&gt;
              &lt;td style=$cp_left_col&gt;
                Mode:
              &lt;/td&gt;
              ";
      if ($daemon_mode) {
        $output.="
             &lt;td style=$cp_right_col&gt;
                Daemon
              &lt;/td&gt;
              &lt;/tr&gt;
              ";
        
      } else {
      
       $output.="&lt;td style=$cp_right_col&gt;
                Non-Daemon
              &lt;/td&gt;
              &lt;/tr&gt;
              ";  
        
      }
      
        $output.="
    
            &lt;tr&gt;
              &lt;td style=$cp_left_col&gt;
                Daemon Running ?
              &lt;/td&gt;
              ";
      
              
      if($daemon_running) {
      $output.="
              &lt;td style=$status_on&gt;
                Yes
              &lt;/td&gt;
            &lt;/tr&gt;";
            
    
      } else {
      
        $output.="
              &lt;td style=$status_off&gt;
                No
              &lt;/td&gt;
            &lt;/tr&gt;";
              
      
      
      }
    
    
      //Echo Process Info if in Unix
      if(!MS_WINDOWS and file_exists($phpcron_psinfo_file)) {
    
            $file_contents=file($phpcron_psinfo_file);
    
              $output.= "
                  &lt;tr&gt;
                  &lt;td style=$cp_left_col&gt;
                     Owner:
                   &lt;/td&gt;
                  &lt;td style=$cp_right_col&gt;
                      $file_contents[1]&lt;br&gt;
                  &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td style=$cp_left_col&gt;
                     Process Id:
                   &lt;/td&gt;
                  &lt;td style=$cp_right_col&gt;
                      $file_contents[2]
                      &lt;br&gt;
                      &lt;br&gt;
                  &lt;/td&gt;
                &lt;/tr&gt;
                ";
    
        }
    
      $output.="
        &lt;tr&gt;
            &lt;td valign=\"baseline\" style=$cp_left_col&gt;
              Start/Stop Controls:
            &lt;/td&gt;
              ";
      
      if (MS_WINDOWS){
      if (!$daemon_running) {
      $output.="
         &lt;td style=$cp_right_col&gt;
      Start Control Not Available in Windows
      &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;";
      }
      
         
      $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
      &lt;br&gt;
      ";
      }
    
      
    
      
     
      if (!MS_WINDOWS and $daemon_mode and !$daemon_running) {  
          $output.="
          &lt;td style=$cp_right_col&gt;
          &lt;form action=$PHP_SELF method=\"get\"&gt;
          &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Start\"&gt;
          &lt;input type=\"submit\" value=\"Start Daemon\"&gt;
            &lt;/form&gt;
            &lt;/td&gt;
          ";
          
      } elseif (!MS_WINDOWS and !$daemon_mode and !$daemon_running) {
      
      $output.="
      
          &lt;td style=$cp_right_col&gt;
          &lt;form action=$PHP_SELF method=\"get\"&gt;
            &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Start\"&gt;
            &lt;input type=\"submit\" value=\"Run PHPCRON Once\"&gt;
            &lt;/form&gt;
            &lt;/td&gt;
          ";
      
       
      }
    
      
     if ($daemon_running) {
    
     $output.="
             &lt;td style=$cp_right_col&gt;
            &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
            &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
            &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"DStop\"&gt;
            &lt;input type=\"submit\" value=\"Stop Daemon\"&gt;
            &lt;/form&gt;
            &lt;/td&gt;        
            ";
    
    }
    
    
      $output.="  
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;strong&gt;Virtual Daemon&lt;/strong&gt;
              &lt;/td&gt;
          &lt;/tr&gt;    
      
            &lt;tr&gt;
              &lt;td style=$cp_left_col&gt;
                Virtual Daemon:
              &lt;/td&gt;
              ";
      
      
      if (file_exists($phpcron_venabled_file)) {
          $output.="
              &lt;td style=$status_on &gt;
                Enabled
             &lt;/td&gt;
            &lt;/tr&gt;
            ";
       
      } else {
          $output.="
              &lt;td style=$status_off &gt;
                 Disabled
              &lt;/td&gt;
            &lt;/tr&gt;
            ";
      }
    
    
    
    if (file_exists($phpcron_venabled_file)) {
    
     
      $output.="
            &lt;tr&gt;
            &lt;td style=$cp_left_col&gt;
            &amp;nbsp;
            &lt;/td&gt;
            &lt;td style=$cp_right_col&gt;    
            &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
            &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
            &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"VStop\"&gt;
            &lt;input type=\"submit\" value=\"Disable\"&gt;
            &lt;/form&gt;
            &lt;/td&gt;
            
            ";
    
    } else {
    
        $output.="
          &lt;tr&gt;
          &lt;td style=$cp_left_col&gt;
            &amp;nbsp;
          &lt;/td&gt;
        
          &lt;td style=$cp_right_col&gt;    
          &lt;form action=$PHP_SELF method=\"get\"&gt;
          &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Start\"&gt;       
          &lt;input type=\"hidden\" name=\"enable_virtual_daemon\" value=\"true\"&gt;   
          &lt;input type=\"submit\" value=\"Enable\"&gt;
            &lt;/form&gt;
            &lt;/td&gt;
            
          ";
    
    
    }
    
    
    
      /* Save and Reset of Options */
    
    
        //allow to revert to original file
      $output.="
    
          &lt;/tr&gt;
                    &lt;tr&gt;
              &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;strong&gt;Update Status&lt;/strong&gt;
          &lt;/td&gt;
          &lt;/tr&gt;    
          &lt;tr&gt;
                    &lt;td style=$cp_left_col&gt;
                        &amp;nbsp;
                    &lt;/td&gt;
                    &lt;td style=$cp_right_col&gt;
                    &lt;form action=\"$PHP_SELF\" method=\"post\"&gt;
                    &lt;input type=\"submit\" value=\"Update\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;/form&gt;
    
                    &lt;!--************Begin Options Form************ --&gt;
    
    
                    &lt;/td&gt;
    
          &lt;/tr&gt;
    
    
          ";
    
         //Save Options
    
    
      /* Build Options Box */
    
         if($phpcron_command != "Save_UC") {
    
          $settings_state="
            &lt;em&gt;
            Current Settings:
            &lt;/em&gt;
            &lt;br&gt;";
         }
        /*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)=<a href=
"#ANCHORPARSEUSERCONFIG">parseUserConfig</a>($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=<a href=
"#ANCHORGETASSIGNMENTINFO">getAssignmentInfo</a>($uc_contents_array)){
    
            $options_output.="
            &lt;tr&gt;
              &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;form action=\"$PHP_SELF\" method=\"post\"&gt;
                  &lt;strong&gt;Options&lt;/strong&gt;
                  &lt;br&gt;
                  (Set in ".<a href=
"#ANCHORFORMATPATH">formatPath</a>($user_config_file).
          ")&lt;br&gt;
                  $settings_state
              &lt;/td&gt;
    
            ";
    
    
          $horiz_pos=0;
          while($horiz_pos&lt;$uc_contents_length) {
    
          $i=0;
            while($assignment_info[$horiz_pos][$i]["variable"]) {
                $cell_width="400px";
    
                $options_output.="
                &lt;/tr&gt;
                &lt;tr&gt;
                   &lt;td style=$cp_left_col width=\"$cell_width\"&gt;".
                    $assignment_info[$horiz_pos][$i]["variable"].
                    " (".$assignment_info[$horiz_pos][$i]["type"].
                    "):".
                  "&lt;/td&gt;
                  &lt;td style=$cp_right_col width=\"$cell_width\" valign=\"middle\"&gt;".
                    <a href=
"#ANCHORGETFORMELEMENT">getFormElement</a>($assignment_info[$horiz_pos][$i]["variable"], $assignment_info[$horiz_pos][$i]["value"], $assignment_info[$horiz_pos][$i]["type"], $horiz_pos, $i)."
                    &lt;input type=\"hidden\" name=\"assignment_info[$horiz_pos][$i][variable]\" value=\"".$assignment_info[$horiz_pos][$i][variable]."\"&gt;
                    
                      &lt;input type=\"hidden\" name=\"assignment_info[$horiz_pos][$i][type]\" value=\"".$assignment_info[$horiz_pos][$i]["type"]."\"&gt;
    
                  &lt;/td&gt;
                ";
                $i++;
    
            }
          $horiz_pos++;
          }
            $options_output.=
            "
    
               &lt;!--*****************Begin Submit Buttons *********************--&gt;
             &lt;tr&gt;
                  &lt;td style=$cp_left_col&gt;
                  &lt;HR&gt;
                  &lt;/td&gt;
                  &lt;td style=$cp_right_col&gt;
                  &lt;HR&gt;
                  &lt;/td&gt;
             &lt;/tr&gt;
    
    
             &lt;tr&gt;
              &lt;td style=$cp_left_col&gt;
              Save Changes To Options:
              &lt;/td&gt;
              &lt;td style=$cp_right_col&gt;
    
              &lt;input type=\"submit\" value=\"Save\"&gt;
              &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
              &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Save_UC\"&gt;
              &lt;/form&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
    
               &lt;tr&gt;
                    &lt;td style=$cp_left_col &gt;
                        Reset Options to Values in File:
                    &lt;/td&gt;
                    &lt;td style=$cp_right_col&gt;
                    &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
                    &lt;input type=\"submit\" value=\"Reset\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;/form&gt;
                    &lt;/td&gt;
    
               &lt;/tr&gt;
    
              &lt;!--*****************End Submit Buttons *********************--&gt;
    
    
    
             &lt;!--*************************BEGIN PHPCRONTAB DISPLAY IN TEXT AREA*********************--&gt;
            &lt;tr&gt;
    
                   &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;strong&gt;PHPCRONTAB SCHEDULE &lt;/strong&gt;
                  &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
    
    
                &lt;td style=$cp_right_col colspan=\"2\" &gt;
                    &lt;form name=\"po_form\"&gt;
                      &lt;input type=\"hidden\" name=\"focushere\"&gt;
                          &lt;textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\"&gt;";
    
                          //Read from phpcrontab file
                          $path_errors=isPathBad($phpcrontab_filename,true,true); 
                            if ($path_errors) {
    //                      $error_messages.="Error: Unable to read file ".<a
 href=
"#ANCHORFORMATPATH">formatPath</a>($phpcrontab_filename)."&lt;br&gt;";
    
                            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("&lt;br&gt;","ERROR: CANNOT DISPLAY PHPCRONTAB\n ");
                            if (is_readable($phpcrontab_filename)) {
                              $tab_output=file($phpcrontab_filename);
                           }
    
                          $options_output.=implode("",$tab_output)."
                        &lt;/textarea&gt;
                    &lt;/form&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
             &lt;!--*************************END PHPCRONTAB DISPLAY IN TEXT AREA*********************--&gt;
    
    
               &lt;!--*****************Begin Submit Buttons *********************--&gt;
             &lt;tr&gt;
    
                  &lt;td style=$cp_right_col colspan=\"2\"&gt;
                  &lt;HR&gt;
                  &lt;/td&gt;
             &lt;/tr&gt;
    
    
    
             &lt;tr&gt;
             &lt;!--
                    &lt;td style=$cp_left_col &gt;
                        Edit Schedule (Basic):
                    &lt;/td&gt;
            --&gt;
                    &lt;td style=$cp_right_col colspan=\"2\"&gt;
                    &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
                    &lt;input type=\"submit\" value=\"Edit Schedule (Basic)\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Edit_Tab_By_Form\"&gt;
                    &lt;/form&gt;
                    &lt;/td&gt;
    
               &lt;/tr&gt;
               &lt;tr&gt;
    
                  &lt;td style=$cp_right_col colspan=\"2\"&gt;
                  &lt;HR&gt;
                  &lt;/td&gt;
             &lt;/tr&gt;
    
    
              &lt;!--*****************End Submit Buttons *********************--&gt;
    
    
    
        &lt;!--*************************BEGIN PHPCRON OUTPUT DISPLAY IN TEXT AREA*********************--&gt;
            &lt;tr&gt;
    
                   &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;a name=\"Output_Display\"&gt;
                  &lt;strong&gt;PHPCRON OUTPUT &lt;/strong&gt;
                  &lt;/a&gt;
                  &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
    
    
                &lt;td style=$cp_right_col colspan=\"2\" &gt;
                    &lt;form name=\"po_form\"&gt;
                      &lt;input type=\"hidden\" name=\"focushere\"&gt;
                          &lt;textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\"&gt;";
    
                          //Read from phpcron_output file
                          if ($path_errors=isPathBad("$phpcron_output_file",true,true)) {
    
                           $error_messages.="Error: Unable to read output file ".<a
 href=
"#ANCHORFORMATPATH">formatPath</a>("$phpcron_output_file")."&lt;br&gt;";
    
                            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("&lt;br&gt;","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)."
                        &lt;/textarea&gt;
                    &lt;/form&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
             &lt;!--*************************END PHPCRON OUTPUT DISPLAY IN TEXT AREA*********************--&gt;
             &lt;!--*************************BEGIN SUBMIT BUTTONS ****************************--&gt;
             &lt;tr&gt;
                    &lt;td style=$cp_right_col colspan=\"2\"&gt;
                    &lt;form action=\"$PHP_SELF#Output_Display\" method=\"post\"&gt;
                    &lt;input type=\"submit\" value=\"Update Display\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;/form&gt;
                    &lt;/td&gt;
    
              &lt;/tr&gt;
              &lt;!--*************************END SUBMIT BUTTONS ****************************--&gt;
    
          &lt;!--*************************BEGIN PHPCRON LOG DISPLAY IN TEXT AREA*********************--&gt;
            &lt;tr&gt;
    
                   &lt;td align=\"center\" valign=\"middle\" colspan=\"2\" style=$cp_row_title&gt;
                  &lt;a name=\"log_display\"&gt;
                  &lt;strong&gt;PHPCRON COMMAND LOG &lt;/strong&gt;
                  &lt;/a&gt;
    
                  &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
    
    
    
                &lt;td style=$cp_right_col colspan=\"2\"&gt;
    
    
                    &lt;form name=\"log_form\" &gt;
    
                      &lt;input type=\"hidden\" name=\"focuslog\"&gt;
                          &lt;textarea readonly  onFocus=\"this.blur();\" wrap=\"off\" cols=\"80\" rows=\"20\" name=\"command_output_textarea\"&gt;";
    
                          //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 ".<a
 href=
"#ANCHORFORMATPATH">formatPath</a>($log_result_file)."&lt;br&gt;
                           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.&lt;br&gt;";
                           
    
                              $log_output=explode("&lt;br&gt;","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)."
                        &lt;/textarea&gt;
    
                    &lt;/form&gt;
    
                &lt;/td&gt;
    
    
            &lt;/tr&gt;
    
             &lt;!--*************************END PHPCRON LOG DISPLAY IN TEXT AREA*********************--&gt;
             &lt;!--*************************BEGIN SUBMIT BUTTONS ****************************--&gt;
             &lt;tr&gt;
                    &lt;td style=$cp_right_col colspan=\"2\"&gt;
                    &lt;form action=\"$PHP_SELF#log_display\" method=\"post\" onSubmit=\"document.log_form.scrollIntoView(false);\"&gt;
                    &lt;input type=\"submit\" value=\"Update Display\"&gt;
                    
                    &lt;/form&gt;
                    
                    &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
                    &lt;input type=\"submit\" value=\"Download Log File\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;input type=\"hidden\" name=\"download_log\" value=\"true\"&gt;
                    &lt;/form&gt;
    
                    &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
                    &lt;input type=\"submit\" value=\"Email Log File To:\"&gt;
                    &lt;input type=\"text\" name=\"log_email_address\" value=\"$admin_email_address\"&gt; 
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Email_Log\"&gt;
                    &lt;/form&gt;
                    
                    &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
                    &lt;input type=\"submit\" value=\"Permanently Clear Log File\"&gt;
                    &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"Control_Panel\"&gt;
                    &lt;input type=\"hidden\" name=\"phpcron_command\" value=\"Delete_Log\"&gt;
                    &lt;/form&gt;
    
                    &lt;/td&gt;
    
              &lt;/tr&gt;
              &lt;!--*************************END SUBMIT BUTTONS ****************************--&gt;
    
    
    
              &lt;tr&gt;
                &lt;td align=\"center\" colspan=\"2\" style=$cp_row_title&gt;
                       &amp;nbsp;
                &lt;/td&gt;
    
            &lt;/tr&gt;
    
            &lt;/table&gt;
    
           &lt;!--**********End Control Panel Table**************--&gt;
            ";
    
        } else {
          
            /* Syntax for user config file allows comments but is somewhat strict -stick to 
            assignments only! and no sinqle quoted strings */
            $output.="
            &lt;/table&gt;
            &lt;!--**********End Control Panel Table**************--&gt;
            ";
            $error_messages.= "
            &lt;br&gt;Error: Syntax error in user configuration file ".<a
 href=
"#ANCHORFORMATPATH">formatPath</a>($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 &amp;lt?php and ?&amp;gt 
        are supported). No other statements or html should be included. Please edit manually and try again.
            ";
        }
    
    
      /* Echo to Page */
    
      echo <a href="#ANCHORMENUBAR">menuBar</a>()."&lt;br&gt;";
        if ($error_messages) {
           echoErrorMessages($error_messages);
        }
      echo $output.
      $options_output;
        if($end_output){
        echo "
        &lt;span class=\"notes\"&gt;
           &lt;hr&gt;
            $end_output
          &lt;hr&gt;
        &lt;/span&gt;
        "; 
        }
      echo "
      &lt;br&gt;
      ".<a href="#ANCHORMENUBAR">menuBar</a>();
    
    
    }</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1EDITTABBYFORM">A.42.
          phpcron_admin/editTabByForm</a></h1>
          <a name="ANCHOREDITTABBYFORM"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1619">A.42.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>editTabByForm</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1624">A.42.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> void <strong>editTabByForm</strong> (string $phpcrontab_filename) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1628">A.42.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Displays form which edits the phpcrontab.conf file. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1631">A.42.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $phpcrontab_filename - string containing filename of phpcrontab.conf</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1634">A.42.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Echoes the phpcrontab.conf edit page</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1637">A.42.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>editTabByForm</strong>($phpcrontab_filename){
    global $PHP_SELF;
    global $new_tabfilename;
    global $edit_table_title;
    global $edit_table_title_no_border;
    global $edit_tab_by_form;
    global $tab_save_error;
    global $new_tab_contents;
    global $old_tabfilename;
    global $create_tab;
    global $secure;
    
    
    
    /*NOTE: Allow create file: if there is no phpcrontab file or no parameters then 
    substitute another array for $line and save new file. */
    
    if ($tab_save_error) {
      $new_tabfilename=""; //initialize
      $phpcrontab_filename=$old_tabfilename;
      /* Don't read from file - just use attempted saved contents if save failure */
      $phpcronconf_array=explode("\n",stripslashes($new_tab_contents));
    } elseif(!$path_errors=isPathBad($phpcrontab_filename,true,true)) {
     /* Read conf file into an array, with each line being an element in the array */
    
    $phpcronconf_array=file($phpcrontab_filename);
    } else {
    
    if (is_readable($phpcrontab_filename)) {
    $phpcronconf_array=file($phpcrontab_filename);
    }
    //If there are  path errors, report them
    
        while ( list($file_or_dir, $error_string) = each($path_errors)) {
    
          while (list($each_message)  = each($error_string)) {
            $error_messages.=$path_errors[$file_or_dir][$each_message];
    
          }
        }
    
        $error_messages="&lt;h3&gt;Cannot Edit $phpcrontab_filename because of file errors:&lt;/h3&gt;".$error_messages;
       
    }
    
    
    
    
    
        //Tests for existence of phpcrontab file - if does not exist, creates one
    
       if(!file_exists($phpcrontab_filename) or $create_tab) {
    
        if (!$create_tab) {
          $error_messages.="Creating new phpcrontab file - No existing file found for $phpcrontab_filename&lt;br&gt;";
        } else {
          $error_messages.="Creating new phpcrontab file&lt;br&gt;";
        }
        $create_tab=true;
        $create_tab_contents=
    "# comments: lines must begin with a #
    #  Phpcrontab.conf
    #The phpcontab.conf file contains a schedule of scripts/programs to
    # run in the traditional crontab format:
    # minute (0-59) hour (0-23) day of month (1-31) month(1-12) day of week(0-6)  command
    # Wild Cards are allowed. Each parameter is separated by one space.
    # Example:
    #
    # 59 3 * * 5  php sample_script.php   # every Friday at 3:59 a.m.
    #Ranges and multiple values will also work:
    # 0 0 1-15 * *   perl sample_script.pl   #executes on 1st through 15th of month
    # 0 0 1-3,15 * *   perl sample_script.pl   # executes on 1st-3rd and 15th of month
    #
    # MINUTES HOUR MONTHDAY MONTH WEEKDAYNUM
    ";
    
        $phpcronconf_array=explode("\n",$create_tab_contents);
    
        
       }
    
    $crontab_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($phpcrontab_filename); 
    
    
    $output.="
        &lt;!--**********Begin JavaScript*******************--&gt;
        &lt;SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\"&gt;
         &lt;!--  
    
               function isNumberBetween(string,low,high) {
                for (i = 0; i &lt; string.length; i++)
                {   
                    // Check that each character is number.
                    var c = string.charAt(i);
    
                    if (!((c &gt;= \"0\") &amp;&amp; (c &lt;= \"9\"))) return false;
                }
    
               var number = parseInt (string); //converts string to integer 
                return ((number &gt;= low) &amp;&amp; (number &lt;= high));
    
               }
    
            function trim(str)
            {
            var i = 0,j = str.length - 1;
    
                    while(str.charAt(i) == ' ') i++;
                    while(str.charAt(j) == ' ') j--;
            j++;
    
            return str.substring(i,j);
    
            }
    
    
    
    
            function validateField (field_string, textvalue, individual_parameter, theField, max_low, max_high) {
                   var warning_message=\"\";
    
                   if(!textvalue.match(/^(([0-9]{1,2}|[0-9]{1,2}-[0-9]{1,2}),?)+$/))
                     return warn(theField, textvalue + \" in the \" + field_string + \"  field is in an incorrect format.\");
    
    
    
                  for (i_array in individual_parameter)
                  {
    
                 /*warning_message=warning_message+\"i_array: \" + i_array + \"Being Evaluated:\" + individual_parameter[i_array] + \"\\r\\n\";
                 */
                   /* Check for Range */
                  if(individual_parameter[i_array].match(/^[0-9]*-[0-9]*,?$/)) {
    
                   var range=new Array();
                  range=individual_parameter[i_array].match(/[0-9]*-?/g) /* explode by hyphen*/
    
                      /*Just deletes , or - at end of string if it exists */
                     range[0]=range[0].replace(/[,-]/g,\"\");       
                     range[1]=range[1].replace(/[,-]/g,\"\");
                    /*warning_message=warning_message+ \"Low Value: \" + range[0] + \" High Value is: \" + range[1] + \"\\r\\n \";;
                    */
    
                    /*Make Sure High &gt; Low */
    
                    if (parseInt(range[0])&gt;=parseInt(range[1])) {
    
                    warning_message=warning_message + \"Low value of range \" + individual_parameter[i_array] + \" in \" + field_string + \" field is greater than or equal to high value.\\r\\n\";
    
    
                    }
                    for (i_range in range)
                    {
    
                      /*check each range to see if between correct values */
                       if (isNumberBetween(range[i_range],max_low,max_high)!=true)
                      {
                      if(range[i_range]==\"\") {
    
                      continue; //continue inner loop
    
                      }
                      warning_message=warning_message + range[i_range] + \" is in the \" + field_string + \" field which requires a number between \" + max_low + \" and \" + max_high +\".\\r\\n\";
    
                      }
    
    
                    }                     
    
    
                  continue; //continue outer loop
                  }
                    /*warning_message=warning_message+ \"Second Being Evaluated:\" + individual_parameter[i_array] + \"\\r\\n\";
                    */
                    /*Just deletes , or - at end of string if it exists */
                    individual_parameter[i_array]=individual_parameter[i_array].replace(/[,-]/g,\"\"); 
    
    
                       if (isNumberBetween(individual_parameter[i_array],max_low,max_high)!=true)
                      {
                      if(individual_parameter[i_array]==\"\") return true;
                      warning_message=warning_message + individual_parameter[i_array] + \" is in the \" + field_string + \" field which requires a number between \" + max_low + \" and \" + max_high +\".\\r\\n\";
                      }
                      i_array++;
                  }    
    
                  if(warning_message !=\"\") {
                  warning_message=\"Error(s):\\r\\n\" + warning_message;      
                  return warn(theField,warning_message);
                  } else {
                  return true;
                  }
    
    
            }
    
    
    
      function checkParameter(theField, parameter_type) {
      
        
          /*Textvalue is string hold all of values in field */
          textvalue=trim(theField.value);
          var i_array=0;
     
                
          if (textvalue == \"*\") return true;
          var individual_parameter=new Array();
          
          /*Fill Array Individual Parameter with Values Separated by , or hyphens*/
          individual_parameter=textvalue.match(/[0-9]+(-[0-9]+)?,?/g) /* took out hypen*/
      
              
          switch (parameter_type) {
          
                
          case 0:
          return validateField (\"Minutes\", textvalue, individual_parameter, theField, 0, 59);
    
          case 1:
          return validateField (\"Hour\", textvalue, individual_parameter, theField, 0, 23);
    
          case 2:
          return validateField (\"Day of Month\", textvalue, individual_parameter, theField, 0, 31);
    
          case 3:
          return validateField (\"Month\", textvalue, individual_parameter, theField, 1, 12);
    
          case 4:
          return validateField (\"Week Day\", textvalue, individual_parameter, theField, 0, 6);
          
          default:
          return warn(theField, \"Error in Code: Parameter Type is Invalid - Can't validate entry\");
          
           }
    
    
        }   
    
        
    
        function warn (theField, s){   
    
            alert(s);
    
            return false;
        }
    
    
        function NoEmpty(theField, s) {
        if(theField.value==\"\")
            alert(\"The \" + s + \" field requires an entry\");
        }
    
        --&gt;  
    
        &lt;/SCRIPT&gt;
        &lt;!--**********End *******************--&gt;
        
          
        &lt;form action=\"$PHP_SELF?admin_subpage=Save_Edtab\" STYLE=\"margin-bottom: 0\" method=\"post\"&gt;
          
        &lt;!--*************** Begin Schedule Programs Table (edit phpcrontab info ) *********--&gt;
        &lt;table align=\"center\" width=\"600px\" style=$edit_tab_by_form border=\"0\" cellspacing=\"0\" cellpadding=\"2\" summary=\"PHPCRONTAB Edit Form\"&gt;
    
         &lt;tr &gt;
          &lt;td colspan=\"7\" align=\"center\" style=$edit_table_title&gt;
          
            &lt;h2&gt;Schedule Programs&lt;/h2&gt;";
    
    if ($create_tab) {
      $output.= "
      &lt;h4&gt;New PHPCRONTAB File&lt;/h4&gt;";
    } else {
         $output.=
         "&lt;h4&gt;(edit ".chunk_split($crontab_stripped, 20, " ").")&lt;/h4&gt;";
    }
    
    $output.="
           &lt;/td&gt;
          &lt;/tr&gt;
          ";
    
              $line_number=0;
            
             /* Loop through the array containing the lines of the phpcrontab.conf file */
             while ($line=$phpcronconf_array[$line_number]) {   
     
    
                     $line=trim($line); //trim extra spaces
                     /* Get lines which contain mixed parameters and comments */
                     preg_match("/#.*$/",$line, $side_line_comments);
                     /* Gets rid of # as first character of each line - 
                     add this back later when save file. User does not have to enter */
                        $side_line_comments[0]=preg_replace("/^#/m", "", trim($side_line_comments[0]));  
    
                     preg_match("/^#.*$/",$line, $full_line_comments); 
                    
                     /* Get rid of # as first character of each line - add this back later when save file. 
                       User does not have to enter. Also move lines over preserve vertical whitespace. */
                     $full_line_comments[0]=trim(preg_replace("/^#(.)/m", "\\1", trim($full_line_comments[0])));
                       //  preserve vertial whitespace
                       $full_line_comments[0]=preg_replace("/^#/m", " ", $full_line_comments[0]);
      
      
                       if($full_line_comments[0]) {
                      $top_line_comments.=$full_line_comments[0]."\r\n";
                      $number_of_top_comments++;
                    }
      
                  
                       if($param_headings_printed  and $full_line_comments[0]) {
                      $bottom_line_comments.=$full_line_comments[0]."\r\n";
                      $number_of_bottom_comments++;
                    }
                     /* Delete commented out sections and lines */
                     $line=preg_replace("/#.*$/","",$line); 
    
                     /* If line is a blank line then ignore line, otherwise
                       process commands */
    
                           if(!preg_match ("/^\s*$/", $line)) {
    
                      /*Print out Top Comments into a Text Area if haven't printed*/
    
                       if (!$param_headings_printed) {              
    
                         $output.=<a href=
"#ANCHORTABTOPCOMMENTS">tabTopComments</a>($top_line_comments, $number_of_top_comments);  
                        $param_headings_printed=true; //print headings only once
                
                      }
    
                          /* Parse line into a 6 element array (0-5), 
                            5 time parameters (minute, hour, day of month, month, day of week)
                            + command string */
                                $line = explode(" ", $line,6);
              
                                $command_text=array_pop($line);  // pop off the command text 
                          $command_text=trim ($command_text); //trim extra spaces
            
                            /* Cycle through first five parameters horizontally and put in 
                          text boxes */
    
                                $parameter_no=0;       
                                      
                          while ($parameter_no&lt;5){
                  
                          $box_size=4;
                        
    
                          $output.= "
              
              &lt;td align=\"center\" &gt;        
                &lt;input class=\"color\" name=\"ct_param[$line_number][$parameter_no]\" type=\"text\"  size=\"$box_size\" value=\"$line[$parameter_no]\" onChange=\"checkParameter(this, $parameter_no)\" &gt;
              &lt;/td&gt;";
                        
                                                
                          $parameter_no++;
                          }    
          
                          /* Add Commands and Side Line Comment Boxes */
    
                          $output.="
                  &lt;td align=\"center\"&gt;
                    &lt;input class=\"color\" type=\"text\" name=\"commands[$line_number]\" value=\"$command_text\"  onChange=\"NoEmpty(this, 'Commands')\"&gt;
                  &lt;/td&gt;
                  &lt;td align=\"center\"&gt;
                     &lt;input class=\"color\" type=\"text\" name=\"side_line_comments[$line_number]\" value=\"$side_line_comments[0]\"&gt; 
                  &lt;/td&gt;
                  &lt;/tr&gt;";
                  
            
                    } // end of check for blank line
                        $line_number++;
            
          } //end of parse loop  
    
           if (!$param_headings_printed) {
    
             /* If no commands in file, print out Top Comments into a Text Area as would not have
              previously printed */
             
             $output.=<a href=
"#ANCHORTABTOPCOMMENTS">tabTopComments</a>($top_line_comments, $number_of_top_comments);  
            $param_headings_printed=true; //print headings only once
          }
    
          /* Add 5 additional lines for new commands. Can do 5 at a time. */
    
              $max_lines=$line_number+5; //defines line number of last additional command input
              $output.="    
              &lt;tr&gt;
                  &lt;td align=\"center\" style=$edit_table_title colspan=\"7\"&gt;
                    Add Commands (up to 5 at a time):
                  &lt;/td&gt;
              &lt;/tr&gt;
             &lt;tr&gt;
             ";
          
    
           while($line_number&lt;$max_lines) { 
    
                 $parameter_no=0;       
      
              while ($parameter_no&lt;5){
    
              $box_size=4;
          
    
              $output.= "
    &lt;td align=\"center\" &gt;        
    &lt;input class=\"color\" name=\"ct_param[$line_number][$parameter_no]\" type=\"text\"  size=\"$box_size\" value=\"$line[$parameter_no]\" onChange=\"checkParameter(this, $parameter_no)\" &gt;
    &lt;/td&gt;
    ";
            
                                    
              $parameter_no++;
              }    
    
             $output.="         
               &lt;td align=\"center\"&gt;
                 &lt;input class=\"color\" type=\"text\" name=\"commands[$line_number]\" onChange=\"NoEmpty(this, 'Commands')\"&gt; 
               &lt;/td&gt;
               &lt;td align=\"center\"&gt;
                 &lt;input class=\"color\" type=\"text\" name=\"side_line_comments[$line_number]\"&gt;
               &lt;/td&gt;
             &lt;/tr&gt;
            &lt;tr&gt;
             ";
    
              $line_number++; 
          }
            
          /* Bottom Comments */
          $output.="
            &lt;td align=\"center\" colspan=\"7\" style=$edit_table_title&gt;Bottom Comments:&lt;/td&gt;&lt;/tr&gt;
            &lt;tr&gt;
            &lt;td colspan=\"7\" align=\"center\"&gt;
                &lt;textarea name=\"bottom_line_comments\" cols=\"80\" rows=\"$number_of_bottom_comments\"&gt;$bottom_line_comments
              &lt;/textarea&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;!--*************** End Schedule Programs Section of Table (edit phpcrontab info ) *********--&gt;   
          
      &lt;tr&gt;
        &lt;td style=$edit_table_title_no_border colspan=7&gt;
      
      &lt;!--******* FORM SUBMITS*********--&gt;
       ";
       if ($create_tab) {
       if (!$secure) {
       $output.="
         File: &lt;em&gt;New PHPCRONTAB File &lt;/em&gt;&lt;br&gt; 
         &lt;input type=\"submit\" value=\"Save As:\"&gt;
    
          &lt;input class=\"color\" type=\"text\" name=\"new_tabfilename\"&gt;" ;
        }
        $output.="
          &lt;br&gt;
          Check to Save Over Existing File:
           &lt;input type=\"checkbox\" name=\"overwrite\" value=\"true\" class=\"title\"&gt;
            &lt;input type=\"hidden\"  name=\"max_line_number\" value=\"$line_number\"&gt; 
      
          &lt;input type=\"hidden\" name=\"current_tabfilename\" value=\"$phpcrontab_filename\"&gt;
          
          &lt;/form&gt;
        &lt;/td&gt;
        &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td style=$edit_table_title_no_border  colspan=7&gt;
          ";
    
       } else {
       $output.="
           &lt;HR&gt;
          &lt;input type=\"submit\" value=\"Save\"&gt;";
      if (!$secure) {
      $output.=  "
          &lt;input type=\"submit\" value=\"Save As:\"&gt;
          &lt;input class=\"color\" type=\"text\" name=\"new_tabfilename\"&gt;";
      }
      $output.="
          &lt;br&gt; 
          Check to Save Over Existing File:
          &lt;input type=\"checkbox\" name=\"overwrite\" value=\"true\" class=\"title\"&gt;  
            &lt;input type=\"hidden\" value=\"$line_number\" name=\"max_line_number\"&gt; 
          &lt;input type=\"hidden\" name=\"current_tabfilename\" value=\"$phpcrontab_filename\"&gt;
      
          
          &lt;/form&gt;
        &lt;/td&gt;
        &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td border=0  style=$edit_table_title_no_border colspan=7&gt;
          ";
    
          /* This allows another file to be opened - commenting this out because I changed my mind.
          Think its better for a crontab file to be opened by changing user configuration file. 
          But if you want to use this feature it is implemented, just uncomment.
             &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
            &lt;input type=\"submit\" value=\"Open:\"&gt;
          &lt;input class=\"color\" type=\"text\" name=\"new_tabfilename\"&gt; 
          &lt;input type=\"hidden\" value=\"Edit_Tab_By_Form\" name=\"admin_subpage\"&gt;
          &lt;/form&gt;
          */
    
      $output.="
          &lt;form action=\"$PHP_SELF\" method=\"get\"&gt;
            &lt;input type=\"submit\" value=\"Create New PHPCRONTAB File\"&gt;
          &lt;input type=\"hidden\" value=\"Edit_Tab_By_Form\" name=\"admin_subpage\"&gt;
          
          &lt;input type=\"hidden\" value=\"true\" name=\"create_tab\"&gt;
         &lt;/form&gt; 
        &lt;/td&gt;
        &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td border=0 style=$edit_table_title_no_border  colspan=7&gt; 
          ";
      } 
    
    $output.="
          &lt;HR&gt;
          File: &lt;em&gt;$crontab_stripped&lt;/em&gt;
          &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
       &lt;!--*******END FORM SUBMITS *********--&gt;";
    
      
                  if ($new_tabfilename) {
    
                if($path_errors=isPathBad($new_tabfilename, true)) {
    
                     while ( list($file_or_dir, $error_messages) = each($path_errors)) {
    
                      while (list($each_message)  = each($error_messages)) {
                        $error_messages.=$path_errors[$file_or_dir][$each_message]; 
                      }
                  }
    
                 }
    
    
                else {
                  $phpcrontab_filename=$new_tabfilename;
                  }
                }
    
      
      if($error_messages) {echoErrorMessages($error_messages);};
      echo $output;   
    
    
    
    } //end of function    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1FULLEDITBOX">A.43.
          phpcron_admin/fullEditBox</a></h1>
          <a name="ANCHORFULLEDITBOX"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1649">A.43.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>fullEditBox</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1654">A.43.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> void <strong>fullEditBox</strong> (string $file_name, string $box_title) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1658">A.43.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Allows you to edit,save,and save the text file $file_name in a text box</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1661">A.43.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $filename - string containing filename of phpcrontab.conf
 string $box_title - string containing title of the edit box</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1664">A.43.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Echoes a textbox containing the contents of $filename with controls to 
 save, etc.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1667">A.43.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>fullEditBox</strong>($file_name, $box_title){
         global $admin_subpage;
         global $PHP_SELF;
         global $modified_contents;
         global $mc_rows;
         global $fe_save_error;
         global $full_edit_title;
         global $secure;
    
    
    
        if($path_errors=<a href=
"#ANCHORISPATHBAD">isPathbad</a>($file_name, true, true)) {
    
          while ( list($file_or_dir, $error_string) = each($path_errors)) {
    
    
    
          while (list($each_message)  = each($error_string)) {
            $error_messages.=$path_errors[$file_or_dir][$each_message];  
        }
    
        }
    
        $error_messages="&lt;h3&gt;Cannot Edit $file_name because of file errors:&lt;br&gt;&lt;/h3&gt;".$error_messages;
        //if path errors, echo message and retur
        
        if (!is_readable($file_name)){
        echoErrorMessages($error_messages);
        echo $output;
        return;
        }
    
       }
        //Empty file into array
         $file_array=file($file_name);
    
        if ($fe_save_error) {   //if previously bad save, display modified contents that weren't saved
          $file_string=$modified_contents;
        } else {
    
          //Implode file_array to put string in text area element
           $file_string=addslashes(trim(implode("",$file_array)));
    
            //Set number of rows
           if ($file_array) {
               $total_lines=count($file_array);
            }
           $mc_rows=$total_lines+10;
    
        }
        //Build output
    
         $output="
        &lt;!--*********** Begin Full Edit Box For $file_name************--&gt;
        &lt;br&gt;
        &lt;table border=\"1\" cellpadding=\"2\" width=\"600px\" cellspacing=\"0\" align=\"center\"&gt;
        &lt;tr&gt;
          &lt;td align=center style=$full_edit_title colspan=7 &gt;
           &lt;h3&gt;
      
              $box_title
              &lt;br&gt;&lt;br&gt;
               (edit ".chunk_split(<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name), 20, " ").")
              &lt;br&gt;
        
          &lt;/h3&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td style=$full_edit_title&gt;
    
             &lt;form action=\"$PHP_SELF\" method=\"post\"&gt;
                &lt;div align=\"center\"&gt;
                 &lt;textarea name=\"modified_contents\"  wrap=\"off\" cols=\"80\" rows=\"$mc_rows\" 
                 class=\"fulledit\"&gt;".stripslashes($file_string)."
                 &lt;/textarea&gt;
              &lt;/div&gt;
               
               &lt;HR&gt;
               &lt;input type=\"submit\" value=\"Save\"&gt;";
    if (!$secure) {
    $output.= "&lt;input type=\"submit\" value=\"Save As:\"&gt;
               &lt;input type=\"text\" class=\"color\" name=\"new_filename\"&gt;";
    }
     $output.=" &lt;br&gt;
                Check to Save Over Existing File:
               &lt;input type=\"checkbox\" name=\"overwrite\" value=\"true\" class=\"title\"&gt;
            
                 &lt;input type=\"hidden\" class=\"color\" name=\"current_filename\" value=\"$file_name\"&gt;
               &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"$admin_subpage\"&gt;
               &lt;input type=\"hidden\" name=\"mc_rows\" value=\"$mc_rows\"&gt;
                   &lt;/form&gt;
    
            
          &lt;form action=\"$PHP_SELF\" method=\"post\"&gt;
            &lt;input type=\"submit\" value=\"Reload Current File\"&gt;
             &lt;input type=\"hidden\" name=\"admin_subpage\" value=\"$admin_subpage\"&gt;
    
          &lt;/form&gt;
          &lt;HR&gt;
          Current File: ".<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name)."
           &lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
         &lt;br&gt;
         &lt;!--*********** End Full Edit Box For $file_name*************--&gt;
         ";
         if($error_messages) {
            echoErrorMessages($error_messages);
         }
         echo $output;
    
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1GETASSIGNMENTINFO">A.44.
          phpcron_admin/getAssignmentInfo</a></h1>
          <a name="ANCHORGETASSIGNMENTINFO"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1679">A.44.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>getAssignmentInfo</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1684">A.44.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> array <strong>getAssignmentInfo</strong> (array $uc_contents_array) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1688">A.44.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Used in parsing phpcron_userconfig.php. Determines the variable,
 value and type of a quoted variable assignment,</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1691">A.44.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> array $uc_contents_array[$horiz_pos]["executable"]
 
 A 2 dimensional array which contains the variable assignment strings derived 
 from  the phpcron_userconfig.php</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1694">A.44.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns false if a string in the array is not a variable assignment or, if
 successful, a three dimensional array containing variable name, value, and
 type for  each assignment in the $uc_contents_array:
 $return_value[$horiz_pos][$i]["variable"], 
 $return_value[$horiz_pos],[$i]["type"],  
 $return_value[$horiz_pos],[$i]["type"]
 This information is assigned to $assignment_info in <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a>. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1698">A.44.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>getAssignmentInfo</strong> ($uc_contents_array){ 
    /*Returns variable, value and type of quoted assignment (i.e., when $assignment is a 
    variable assignment like "a=3;" */
    
      global $user_config_file;
      global $uc_contents_length;
      include("$user_config_file");
    
      $horiz_pos=0;
    
      
      while($horiz_pos&lt;$uc_contents_length) {
    
      if($uc_contents_array[$horiz_pos]["executable"]) {
      $executable_string.=  <a href=
"#ANCHORSTRIPPHP">stripPhp</a>($uc_contents_array[$horiz_pos]["executable"]);
      }
      $horiz_pos++;
      }
      /* Join Executable Strings and Test for syntax errors (if there are anything but 
      assignments, testedby comparing number of = with number of ; */
    
      if(preg_match_all("/;/", $executable_string, $semi_matches) &lt;&gt; preg_match_all("/=/",$executable_string,$equal_matches)) {
    
      return false; //syntax error in string - nunmber of assignments do not equal number of statements;
      }
    
      /* Cycle through array containing executable strings, explode and create 3 arrays containing
      variable, value and type */
    
      $horiz_pos=0;
      while($horiz_pos&lt;$uc_contents_length) {
        //if this element is empty then skip the loop 
        if(!$uc_contents_array[$horiz_pos]["executable"]) { 
        $horiz_pos++;
        continue;
        } //end of if
    
        //strip html tags
        $uc_contents_array[$horiz_pos]["executable"]=trim(strip_tags($uc_contents_array[$horiz_pos]["executable"]));
      
        /* Turn uc_contents_array element into separate assignment strings */
    
         //break assignment_string into an array of separate assignments
        if(!$assignment_array[$horiz_pos]=explode(";",$uc_contents_array[$horiz_pos]["executable"])) {    
      
          return false; // error if no semi-colon in string
        }
              /* Run through assignment array and break into variable, values, and type */
              $i=0;
               while($assignment_array[$horiz_pos][$i]) {
              
                //assign variable to 0 and $value to 1; return if  
                if(!$temp=explode("=",$assignment_array[$horiz_pos][$i])) {  
      
                  return false; //returns false if this string does not contain an assignment
                  
                }
      
              $return_value[$horiz_pos][$i]["variable"]=$temp[0];
              $return_value[$horiz_pos][$i]["value"]=$temp[1];
          
               //maintain quotes for type testing
              $test_string=trim(stripslashes($return_value[$horiz_pos][$i]["value"])); 
           //strip slashes, trim, and get rid of quotes
              $value=trim(preg_replace("/\"/","",stripslashes($return_value[$horiz_pos][$i]["value"]))); 
              /*Derive Types*/
              if(preg_match("/^[0-9]*$/", $test_string)) {
                   $return_value[$horiz_pos][$i]["type"]="integer";
              } elseif ($return_value[$horiz_pos][$i]["value"]=="true" or $value =="false") {
                  $return_value[$horiz_pos][$i]["type"]="boolean";
              }elseif (preg_match("/^\".*\"$/", $test_string)){
                    $return_value[$horiz_pos][$i]["type"]="string";
              }  else {
                  echoErrorMessages("Error: A type could not be determined for variable 
                  $return_value[$horiz_pos][$i][$variable] - Check Syntax in User Configuration File $user_config_file. Only variable 
                  assignments of type String (surrounded by double quotes only), Integers, and Booleans are 
                  supported in that file.");
              
                  return false;
                }
    
              $i++;
            
              } //end of inside while
      
        $horiz_pos++;
    
      } //end of outside while
    
      /*Returns 3 array string containing variable name, value, 
        and  type for each assignment statement */
      
      return $return_value; 
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1GETCOMMENTS">A.45.
          phpcron_admin/getComments</a></h1>
          <a name="ANCHORGETCOMMENTS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1708">A.45.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>getComments</font> 
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1713">A.45.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> array <strong>getComments</strong> (string $big_string, string $left_char, 
                    string $right_char, string $current_pos) 
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1717">A.45.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Starting with the $current_pos position in $big_string, extracts from
 $big_string,  a php comment that begins with $left_char and ends with
 $right_char or the beginning   of a php block. Used when parsing the
 phpcron_userconfig.php</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1720">A.45.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $big_string - string containing contents of phpcron_userconfig.php
 $left_char  - the beginning character of the comment
 $right_char - the ending character of the comment
  $current_pos - the current position of the parser in $big_string, <strong>getComments</strong>
                will search from this position forward</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1724">A.45.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns an array containing as the first element, the comment string, and the
 second  element the position after the comment in the $big_string.   contents
 are valid.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1727">A.45.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>getComments</strong>($bigstring, $left_char, $right_char, $current_pos) {
    
    //gets substring which is delimited by left_char and right_char, starting from $current_pos
    
    global $uc_contents_length;
    $end_of_string= substr($bigstring, $current_pos); //get rest of string from current position to end
    
      if(strstr($end_of_string, $right_char)) {
        if ($right_char=="\n") { //if this is a single line comment
            //position of ending comment not including ending character 
          $last_pos=strpos($bigstring, $right_char, $current_pos);
        } else {
          //position of ending comment including ending character
            $last_pos=strpos($bigstring, $right_char, $current_pos)+strlen($right_char); 
        }
        $substring= substr($bigstring, $current_pos, $last_pos-$current_pos); //get substring to end
      }  elseif (strstr($end_of_string, "?&gt;")) {
         // position of end of php block - but don't include end
        $last_pos=strpos($bigstring, "?&gt;", $current_pos)-1; 
        //get to end of php block
        $substring= substr($bigstring, $current_pos, $last_pos-$current_pos); 
      } else {  //otherwise, return end of string
        $last_pos=$uc_contents_length;
        $substring=$end_of_string;
      }
      $current_pos=$last_pos;
      $current_pos=$last_pos; //update current position
      $return_value = array ($substring, $current_pos);//return substring and current position
    
      return $return_value;
    
    }</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1GETFORMELEMENT">A.46.
          phpcron_admin/getFormElement</a></h1>
          <a name="ANCHORGETFORMELEMENT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1736">A.46.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>getFormElement</font> 
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1741">A.46.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>getFormElement</strong> (string $variable, string $value, string $type,
                   int horiz_pos, int $variable_index) 
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1745">A.46.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Constructs a string containing HTML comprising an appropriate form element
 to pass a value appropriate for $variable. For instance, if the
 variable is a boolean variable, a true/false radio button will
 be constructed, if a string, a text box. Used to construct the
 control panel.
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1748">A.46.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $variable - the string containing the name of the variable being analyzed 
             (extracted    from the phpuserconfig.php)
 $value    - a string containing the name of the value
 $type     -  a string conaining the name of the variable type (e.g., boolean,
              string, etc)   
 $horiz_pos  - the horizontal position where the parser is at in
                parsing the contents of phpuserconfig.php       
 $variable_index - a number used as the second index of the three dimensional 
                array which   holds the assignment info See <a
href="#ANCHORCPPHPCRON">cpPhpcron</a>
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1752">A.46.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a string containing an appropriate HTML form element for the 
 assignment type.    For instance, if the variable is a boolean variable, a 
 true/false radio button will   be constructed, if a string, a text box. Used 
  to construct the   control panel.
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1755">A.46.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1760">A.46.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>getFormElement</strong>($variable, $value, $type, $horiz_pos, $variable_index) {
    
       $value=trim(preg_replace("/\"/","",stripslashes($value))); //strip slashes, trim, and get rid of quotes    
    
      $box_size=strlen($value);
      if($box_size &gt; 40) {
       $box_size=40;     //size of text box
      }
    
      switch ($type) {
      case "integer":
        
        return "&lt;input type=\"text\" class=\"color\" name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"$value\" size=\"$box_size\" onChange=\"isNumber(this)\"&gt;";
        break;
    
      case "boolean":
    
    
        if($value=="true") {  
        return "
            &lt;input  type=\"radio\" checked name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"true\"&gt;On
            &lt;input type=\"radio\" name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"false\"&gt;Off";
        } else {
        return "
            &lt;input  type=\"radio\"  name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"true\"&gt;On
            &lt;input type=\"radio\" checked name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"false\"&gt;Off";
        }
    
        break;
    
      case "string":
    
        return "
              &lt;input type=\"text\" class=\"color\" name=\"assignment_info[$horiz_pos][$variable_index][value]\" value=\"$value\" size=\"$box_size\"&gt;";
        break;
      default:
        echoErrorMessages("Error: No Form Found for This Variable $variable- Check Syntax in User Configuration File. Only String, Integers, and
        Booleans are supported.");
        return false;
    
      }
    
    
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14UC3CONTENTS3ARRAY">A.47.
          phpcron_admin/$uc_contents_array</a></h1>
          <a name="ANCHOR4UC3CONTENTS3ARRAY"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1769">A.47.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$uc_contents_array</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1773">A.47.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> A 2 dimensional array constructed of the following:
 $uc_contents_array[$horiz_pos]["executable"] 
        - the non-comment portions of phpcron_userconfig.php    
 $uc_contents_array[$horiz_pos]["ml_comments"]
        - the multi-line comment portions of phpcron_userconfig.php
 $uc_contents_array[$horiz_pos]["sl_comments"] 
        - the single line comment portions of phpcron_userconfig.php</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1776">A.47.3.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a>, <a href=
"#ANCHORPARSEUSERCONFIG">parseUserConfig</a>, <a href=
"#ANCHORREBUILDUSERCFG">rebuildUserCfg</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN14ASSIGNMENT3INFO">A.48.
          phpcron_admin/$assignment_info</a></h1>
          <a name="ANCHOR4ASSIGNMENT3INFO"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1788">A.48.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$assignment_info</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1792">A.48.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> A three dimensional array containing variable name, value, and
 type for  each assignment in the $uc_contents_array:
 $assignment_info[$horiz_pos][$i]["variable"], 
 $assignment_info[$horiz_pos],[$i]["type"],  
 $assignment_info[$horiz_pos],[$i]["type"]
 <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a> assigns gets this information from a call
 to <a href="#ANCHORGETASSIGNMENTINFO">getAssignmentInfo</a> in <a
href="#ANCHORCPPHPCRON">cpPhpcron</a>.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1798">A.48.3.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a>, <a href=
"#ANCHORGETASSIGNMENTINFO">getAssignmentInfo</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1PARSEUSERCONFIG">A.49.
          phpcron_admin/parseUserConfig</a></h1>
          <a name="ANCHORPARSEUSERCONFIG"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1809">A.49.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>parseUserConfig</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1814">A.49.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> array <strong>parseUserConfig</strong>(string $user_config_file, string $left_mlc_ch, 
                     string $right_mlc_ch, string $sc_ch)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1818">A.49.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Parses the user configuration file $user_config_file, extracting single 
 line comments,multi-line comments, and command portions of
 $user_config_file</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1821">A.49.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $user_config_file - the filename of the phpcron_userconfig.php
 $left_mlc_ch - the characters which mark the beginning of a mult-line
               comment  
 $right_mlc_ch - the characters which mark the end of a mult-line
               comment               
 $sc_ch - the characters which mark the beginning of a single-line character</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1824">A.49.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns  an array containing as its first element $uc_contents, a string
 containing the  contents of $user_config_file file and, as its second
 element, $uc_contents_array, a 2 dimensional array which contains the contents
 of the phpcron_userconfig.php</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1827">A.49.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>       See $uc_contents_array, <a
href="#ANCHORCPPHPCRON">cpPhpcron</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1832">A.49.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>parseUserConfig</strong>($user_config_file, $left_mlc_ch, $right_mlc_ch, $sc_ch) {
    /* parse the userconfig file named in $file to separate out mult-line comments surrounded
    by $mlc_left_char and $mlc_right_char and single line comments begun with slc_ch */
    
    global $uc_contents;
    global $uc_contents_length;
    $current_pos=0;
    $horiz_pos=0;
    
        while ($current_pos&lt;$uc_contents_length){
    
           $current_char=substr($uc_contents,$current_pos,strlen($left_mlc_ch));
    
           //if character is a multi-line comment then find to end character of multi-line comment
            if ($current_char==$left_mlc_ch) {
    
            if($uc_contents_array[$horiz_pos]["executable"]) {$horiz_pos++;}
            list($uc_contents_array[$horiz_pos]["ml_comments"], $current_pos)=<a
 href=
"#ANCHORGETCOMMENTS">getComments</a>($uc_contents, $left_mlc_ch,$right_mlc_ch, $current_pos);
    
            $horiz_pos++;
    
          }  elseif($current_char==$sc_ch){
             //increment position for executable
            if($uc_contents_array[$horiz_pos]["executable"]) {$horiz_pos++;}
            list($uc_contents_array[$horiz_pos]["sl_comments"], $current_pos)=<a
 href=
"#ANCHORGETCOMMENTS">getComments</a>($uc_contents, $sc_ch,"\n", $current_pos);
    
            $horiz_pos++;
            
          } else {
            $uc_contents_array[$horiz_pos]["executable"]=<a href=
"#ANCHORSTRIPPHP">stripPhp</a>($uc_contents_array[$horiz_pos]["executable"].substr($current_char,0,1)); //after comments are stripped out, assign all else to this
            }
          $current_pos++;
        }
        $return_value=array ($uc_contents, $uc_contents_array);
        return $return_value;
     }    
    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1REBUILDUSERCFG">A.50.
          phpcron_admin/rebuildUserCfg</a></h1>
          <a name="ANCHORREBUILDUSERCFG"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1844">A.50.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>rebuildUserCfg</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1849">A.50.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>rebuildUserCfg</strong>(array $assignment_info, array $uc_contents_array)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1853">A.50.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Rebuilds the new phpcron_userconfig.php to be saved given the information 
 submitted by the control panel form.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1856">A.50.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $assignment_info - a three dimensional array containing the data submitted 
 by the control panel form
 $uc_contents_array - a 2 dimensional array containing the current contents of the
                     phpcron_userconfig.php such that:
                     $uc_contents_array
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1859">A.50.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> A string containing the new contents of the phpcron_userconfig.php after
 editing by the control panel form. This string is meant to be saved
 as the new phpcron_userconfig file.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1862">A.50.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHORCPPHPCRON">cpPhpcron</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1867">A.50.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>rebuildUserCfg</strong>($assignment_info, $uc_contents_array) { //Print out Contents of File in Order
      
      /* This function rebuilds the user_config_file using the new information from $assignment_info 
      submitted by the user. */
      global $uc_contents_length;
      $horiz_pos=0;
    
        while($horiz_pos&lt;$uc_contents_length) {
    
        $i=0;
    
    
        while($assignment_info[$horiz_pos][$i]["variable"] ) {
    
          if ($assignment_info[$horiz_pos][$i]["type"]=="string") { //add quotes for a string
              $assignment_info[$horiz_pos][$i]["value"]="\"".$assignment_info[$horiz_pos][$i]["value"]."\"";
          }
    
          if($i==0) {
          /* After first time add additional elements (don't replace - otherwise won't get
          additional assignments on same line) */
            $uc_contents_array[$horiz_pos]["executable"]=$assignment_info[$horiz_pos][$i]["variable"].
                                        "=".$assignment_info[$horiz_pos][$i]["value"].";";
    
          }else {
            $uc_contents_array[$horiz_pos]["executable"].=$assignment_info[$horiz_pos][$i]["variable"].
                                        "=".$assignment_info[$horiz_pos][$i]["value"].";";
          }
          /* For Debugging:
          echo "Horiz Pos: $horiz_pos Index: $i&lt;br&gt;";
          echo "Assignment Info Variable:".$assignment_info[$horiz_pos][$i]["variable"]."&lt;br&gt;";
          echo "Contents:".$uc_contents_array[$horiz_pos]["executable"]."&lt;br&gt;";
          echo "SL Comments:".$uc_contents_array[$horiz_pos]["sl_comments"]."&lt;br&gt;";
          echo "ML Comments:".$uc_contents_array[$horiz_pos]["ml_comments"]."&lt;br&gt;";
          */
    
          $i++;
        }
    
        if($uc_contents_array[$horiz_pos+1]["sl_comments"]) {
          $plus1=$horiz_pos+1;
          /*For Debugging
          echo "Exec Contents $horiz_pos:".$uc_contents_array[$horiz_pos]["executable"]."&lt;br&gt;";
          echo "Exec Contents:".$plus1.$uc_contents_array[$horiz_pos+1]["executable"]."&lt;br&gt;";
          echo "sl comments again:".$plus1.$uc_contents_array[$horiz_pos+1]["sl_comments"];
          */
    
          /*only add tab if there are commands on same line (the executable element 
          holds a word character)*/
          if (preg_match("/\w/",$uc_contents_array[$horiz_pos]["executable"])){ 
          
          $uc_contents_array[$horiz_pos+1]["sl_comments"]="\t".$uc_contents_array[$horiz_pos+1]["sl_comments"]."\n";
          } else {    
    
          $uc_contents_array[$horiz_pos+1]["sl_comments"]=$uc_contents_array[$horiz_pos+1]["sl_comments"]."\n";
          
          }
        }
      
        if($uc_contents_array[$horiz_pos]["ml_comments"]) {
          $uc_contents_array[$horiz_pos]["ml_comments"]=$uc_contents_array[$horiz_pos]["ml_comments"]."\n";
        }
        $new_file_contents.=$uc_contents_array[$horiz_pos]["sl_comments"].$uc_contents_array[$horiz_pos]["ml_comments"].$uc_contents_array[$horiz_pos]["executable"];
        $horiz_pos++;
      
        }
        $new_file_contents="\r\n&lt;?php\r\n\r\n".trim(stripslashes($new_file_contents))."\r\n\r\n?&gt;"; //add php tags
        return $new_file_contents;
      }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1STRIPPHP">A.51.
          phpcron_admin/stripPhp</a></h1>
          <a name="ANCHORSTRIPPHP"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1876">A.51.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>stripPhp</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1881">A.51.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>stripPhp</strong>(string $phpstring)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1885">A.51.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Strips $phpstring of the &lt;?php and the ?&gt; tags</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1888">A.51.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> A string containing a php script.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1891">A.51.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> The contents of the php script without the beginning and  ending php
 tags.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1894">A.51.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>stripPhp</strong>($phpstring) {
       $phpstring=preg_replace("/(&lt;\?php)|(\?&gt;)/","",$phpstring); 
      return $phpstring;
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3ADMIN1TABTOPCOMMENTS">A.52.
          phpcron_admin/tabTopComments</a></h1>
          <a name="ANCHORTABTOPCOMMENTS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1903">A.52.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>tabTopComments</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1908">A.52.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string <strong>tabTopComments</strong>(string $top_line_comments, int $number_of_top_comments)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1912">A.52.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Creates a row of a table containing a textarea containing the top comments of
 the phpcrontab.conf. Comprises a part of the form which edits the
 phpcrontab.conf file.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1915">A.52.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $top_line_comments - a string created in <a
href=
"#ANCHOREDITTABBYFORM">editTabByForm</a> containing  all of the
                      comments at the top of the phpcrontab.conf file 
 $number_of_top_comments - number of lines of top comments in phpcrontab.conf</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1919">A.52.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> A string containing the HTML for producing the table row containing the 
 textarea holding the top comments of phpcrontab.conf </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1922">A.52.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>See <a href=
"#ANCHOREDITTABBYFORM">editTabByForm</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1927">A.52.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>tabTopComments</strong>($top_line_comments, $number_of_top_comments) {
    global $edit_table_title;
     return " &lt;tr&gt;
                 &lt;td align=\"center\" colspan=\"7\"&gt;
                 &lt;textarea name=\"top_line_comments\" cols=\"80\" wrap=\"off\" rows=\"$number_of_top_comments\"&gt;$top_line_comments                      
                 &lt;/textarea&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr align=\"center\" style=$edit_table_title&gt;
           
                     &lt;td style=$edit_table_title&gt;
                          Min&lt;br&gt;(0-59)
                    &lt;/td&gt;
                     &lt;td style=$edit_table_title&gt;
                          Hour&lt;br&gt;(0-23)
                    &lt;/td&gt;
                     &lt;td style=$edit_table_title&gt;
                          Month&lt;br&gt;Day&lt;br&gt;(1-31)
                    &lt;/td&gt;
                     &lt;td style=$edit_table_title&gt;
                          Month&lt;br&gt;(1-12)
                    &lt;/td&gt;
                     &lt;td style=$edit_table_title&gt;
                          Week&lt;br&gt;Day&lt;br&gt;(0-6)
                    &lt;/td&gt;                                            
                    &lt;td style=$edit_table_title&gt;
                        Commands 
                    &lt;/td&gt;
                    &lt;td style=$edit_table_title&gt;
                      Comments
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                ";
    }    </font>
</pre>
                </td>
              </tr>
            </table>

            <p><a name="ANCHORPHPCRON3COMMONLIB.PHP"></a>Generated
            from phpcron_commonlib.php with ROBODoc v3.2.3 on Wed
            Oct 24 21:26:43 2001</p>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON1PHPCRON3COMMONLIB3README">A.53.
          PHPCRON/phpcron_commonlib_readme</a></h1>
          <a name="ANCHORPHPCRON3COMMONLIB3README"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1938">A.53.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong><a href=
"#ANCHORPHPCRON3COMMONLIB.PHP">phpcron_commonlib.php</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1943">A.53.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> This is a collection of functions used by both
 <a href="#ANCHORPHPCRON.PHP">phpcron.php</a> and <a href=
"#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a>.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1948">A.53.3.
            AUTHOR</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>David C. Druffner
 hide@address.com</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1952">A.53.4.
            COPYRIGHT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> COPYRIGHT 2001 (C) David C. Druffner
 hide@address.com
 This script is released under a modified BSD License.
 See php <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> -license and LICENSE.txt in download package 
 for full license details</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1956">A.53.5.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Bugs can be reported via the online manual:
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1961">A.53.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>This is a collection of functions used by both
 <a href="#ANCHORPHPCRON.PHP">phpcron.php</a> and <a href=
"#ANCHORPHPCRON3ADMIN.PHP">phpcron_admin.php</a>.

 The current manual for Phpcron and Phpcron Admin is located at 
 <a href=
"http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/"
target=
"_top">http://www.gemini1consulting.com/tekhelp/online_manuals/phpcron/</a>
 The Home Page is:
 <a href="http://phpcron.sourceforge.net/" target=
"_top">http://phpcron.sourceforge.net/</a>
 Download from the Source Forge Project Page:
 <a href="http://www.sourceforge.net/projects/phpcron/" target=
"_top">http://www.sourceforge.net/projects/phpcron/</a>
 In-Line Documentation:
 A slightly modified version of ROBODOC is used to
 generate documentation for   this code. I have modified the headers.c file in
 the Robodoc source code to  et  the variable header_markers to equal only
 /*ROBODOC* as the start of a  header  marker - this avoids confusion with other
 strings and comments in PHP  code.   Robodoc is available at
 <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html" target=
"_top">http://www.xs4all.nl/~rfsber/Robo/robodoc.html</a></strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14LICENSE">A.54.
          phpcron_commonlib/$license</a></h1>
          <a name="ANCHOR4LICENSE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1976">A.54.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$license</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1980">A.54.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Variable containing text of license 
/
license="
hpcron, Phpcron Admin, and all associated and packaged scripts carry the
ollowing license:
OPYRIGHT (C) 2001 David Druffner
hide@address.com
edistribution and use in source and binary forms, with or without
odification, are permitted provided that the following conditions are met: 
1.Redistributions of source code must retain the above copyright notice, this
ist of conditions and the following disclaimer.  
2.Redistributions in binary form must reproduce the above copyright notice,
his list of conditions and the following disclaimer in the documentation
nd/or other materials provided with the distribution. 
3.The name of the author may not be used to endorse or promote products
erived from this software without specific prior written permission.  
HIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
ARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
ERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
VENT SHALL THE AUTHOR, ANY DISTRIBUTOR, OR ANY DOWNLOAD HOSTING COMPANY BE
IABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
UBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
ONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
OSSIBILITY OF SUCH DAMAGE.   
;
ROBODOC_END*/</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14PHPCRON3FILE">A.55.
          phpcron_commonlib/$phpcron_file</a></h1>
          <a name="ANCHOR4PHPCRON3FILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1988">A.55.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$phpcron_file</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN1992">A.55.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Variable containing path to <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14PHPCRON3PSINFO3FILE">A.56.
          phpcron_commonlib/$phpcron_psinfo_file</a></h1>
          <a name="ANCHOR4PHPCRON3PSINFO3FILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2001">A.56.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>$phpcron_psinfo_file</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2005">A.56.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Variable containing path and filename of file
 containing information for the process
 running the <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> script.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14PHPCRON3VENABLED3FILE">A.57.
          phpcron_commonlib/$phpcron_venabled_file</a></h1>
          <a name="ANCHOR4PHPCRON3VENABLED3FILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2014">A.57.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$phpcron_venabled_file</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2018">A.57.2.
            DESCRIPTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> If this file exists, then <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> in non-daemon mode will run the
 scheduled commands in phpcrontab.conf </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14PHPCRON3OFF">A.58.
          phpcron_commonlib/$phpcron_off</a></h1>
          <a name="ANCHOR4PHPCRON3OFF"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2027">A.58.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$phpcron_psinfo_file - path and filename of file the existence of 
 which causes <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> to shut down
OBODOC_END*/
 
phpcron_off=$phpcron_directory."phpcron_off"; 
*ROBODOC*d phpcron_commonlib/MS_WINDOWS
</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2032">A.58.2.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>MS_WINDOWS - constant - true if OS is Windows, false if not</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2036">A.58.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Used to check if OS is Windows or Unix.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB14VIEWED3BY3BROWSER">A.59.
          phpcron_commonlib/$viewed_by_browser</a></h1>
          <a name="ANCHOR4VIEWED3BY3BROWSER"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2044">A.59.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>$viewed_by_browser - true if script is read by browser, false if console</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2048">A.59.2.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> True if script is read by browser, false if executed on the
 command line. Set automatically by script on each execution 
 by reading whether $SERVER_PROTOCOL or $HTTP_USER_AGENT is set.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2051">A.59.3.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>I'm sure this won't work in all cases, but was the best solution
 I could come up with. Some web servers might not give out these
 variables and the script would interpret that to mean that
 it was being executed on the command line. The main result of this
 in <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> is that the HTML tags would be stripped from all output
 (probably leading to a blank screen)and a built-in safeguard
 against going into daemon mode would be disabled (but there
 are other safeguards that should still prevent this).</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2056">A.59.4.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>If <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> is executed in a browser in daemon mode than an httpd
 process would be spawned that would only be able to be killed by 
 root (or by a self-kill if it detects a phpcron_off file in
 existence). This is a BAD THING as it could lead to server overload.
 Thus the daemon mode is shut off if a browser is detected. In addition,
 <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> has certain self-checks to kill itself if there
 is another <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> process running in daemon mode. See
 the function <a href=
"#ANCHORISOTHERPHPCROND">isOtherPhpcrond</a>.</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2064">A.59.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">     if ($SERVER_PROTOCOL or $HTTP_USER_AGENT) {    
    
     $viewed_by_browser=true;
      $slow_debug_scroll=0; 
      } else {
        $viewed_by_browser=false;
      }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1CHECKPHPVERSION">A.60.
          phpcron_commonlib/checkPhpVersion</a></h1>
          <a name="ANCHORCHECKPHPVERSION"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2072">A.60.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>checkPhpVersion</font> - formats string to conform to HTML/XML standards
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2077">A.60.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>checkPhpVersion</strong>(string $required_version, string $warning_string, 
 boolean $quit) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2081">A.60.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Verifies that the PHP version running on the Web Server is at least
 equal to the version required by the script.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2084">A.60.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $a, $b, $c   -strings containing minimum PHP version needed by the Script,
                e.g., 3.0.0. would be 3,0,0
 $warning_string    -optional parameter to be output to the user if fails 
                      version check
 $quit  - optional parameter which if true will force the 
          cript to end </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2087">A.60.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true if version of PHP is at least the minimum, false otherwise</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2090">A.60.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>checkPhpVersion</strong> ($version_required, $warning_string="/", $quit=false) {
    
    
    $version_installed=phpversion();
    /*Break Up $version_required string by decimal point*/
    $version_required=explode(".", $version_required);
    
    if (!ereg( "[[$version_required[0]-9]\.[$version_required[1]-9]\.[$version_required[2]-9].*", $version_installed )){
    
     if ($warning_string !="/") {
        <a href=
"#ANCHORSENDOUTPUT">sendOutput</a>($warning_string);
      }
      if ($quit) {
      
      exit;
      }
    
      return false;
    exit;
    } else {
    
    return true;
    }
    
    
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1SENDOUTPUT">A.61.
          phpcron_commonlib/sendOutput</a></h1>
          <a name="ANCHORSENDOUTPUT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2100">A.61.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>sendOutput</font> - handles output depending on environment and global variables
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2105">A.61.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> void <strong>sendOutput</strong>(string $output, boolean $suppress_override)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2109">A.61.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Handles all output for <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a>. If a command line suppression switch has
 been turned on,  then the output is not echoed, unless the $suppress_override
 parameter is set to true (default is false) - usually done for critical
 errors.  Also, if the $redirect_output flag is true, the output will not be
 echoed  to the screen, but to the $redirect_file.  If the output is being
 sent to the browser, the output is left alone,  but if is being printed to
 the console as the output from a command line  script, than all html is
 stripped.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2113">A.61.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $output   - string containing output being echoed
 $suppress_override - optional parameter, if set the echo will occur whether
 or not the global output suppression has been turned
 on (see $suppress_output)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2116">A.61.5.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Relies on values in global variables $viewed_by_browser, $suppress_output, 
 $redirect_output, and $redirect_file</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2120">A.61.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>sendOutput</strong>($output_message, $suppress_override=false) {
    
    global $suppress_output;
    
    global $viewed_by_browser;
    global $redirect_output;
    global $redirect_file;
    
          if(!$suppress_output or $suppress_override) {
    
    
              //display message
              if (!$viewed_by_browser) {
                $output_message=strip_tags($output_message);
              }
    
              if ($redirect_output) {
    
              $save_results=<a href=
"#ANCHORAPPENDTOFILE">appendToFile</a>($output_message, $redirect_file);
    
              if (!$save_results[0]) {
                  //echo error messages
                  echo "Error: Cannot Append to File $redirect_file.".
                                                     "Check filename and permissions.\r\n";
              }
    
              } else {
    
              echo $output_message;
    
              }
          }
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1GETPROCESSINFO78">A.62.
          phpcron_commonlib/getProcessInfo()</a></h1>
          <a name="ANCHORGETPROCESSINFO78"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2130">A.62.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>getProcessInfo()</font> - formats string to conform to HTML/XML standards
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2135">A.62.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $string getProcessInfo(void) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2138">A.62.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> When called returns information for the process running the PHP script
 (Unix only). Relies on a ps ef system call.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2141">A.62.4.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Returns a three element string array:
 $process_info["all"] - all the proces info returned by ps ef
 $process_info["id"] - gives the $pid of the process
 $process_info["owner"] - gives the owner of the process</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2144">A.62.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000">    function getProcessInfo () {
    //get process info of current process
      global $pid;
        //get owner of script process
        if (!MS_WINDOWS) { //show pid info if not in windows
        
          exec("ps hefp $pid u", $output, $return_value);
          $output=implode(" ", $output);
    
          // get owner of process and put in $matches[1];
    
    
          preg_match("/(^[A-z0-9A-Z]*\b).*$/",$output,$matches);
          $process_info["all"]=$matches[0];
          $process_info["owner"]=$matches[1];
          $process_info["id"]=$pid;
    
    
        return $process_info;
       }
       //return nothing if windows/dos
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIBP1ISPATHBAD">A.63.
          phpcron_commonlibp/isPathbad</a></h1>
          <a name="ANCHORISPATHBAD"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2152">A.63.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>isPathbad</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2157">A.63.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>isPathbad</strong>(string $path_name, 
 [boolean $check_filename, [$file_existing=false)]);  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2161">A.63.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Checks whether directory and/or filename exists and is readable/writeable 
 (filename checked only if $check_filename is true, the default is false).
 Can be used both for dos and unix paths.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2164">A.63.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $path_name - string containing path name.
 
 $check_filename -
 
 Optional boolean parameter. Default is false. If true,
 then  will do check on filename as well as directory and will return   an
 error message if no file name was include_onced in the path.       
 
 $file_existing         - 
 optional boolean parameter (requires $check_filname to be
 set) that tells whether or not the file is existing. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2167">A.63.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> If there are errors in testing the path, it returns a double array 
 containing error messges in the format of $file_errors["dir"] and
 $file_errors["file"]. If there are no errors, it returns false.
 
 The double array can be extracted using the list command like this: 
 
 if($path_errors=<strong>isPathbad</strong>($path_name)){
 
 while ( list($file_or_dir, $error_messages) = each($path_errors)) {
 
 while (list($each_message)  = each($error_messages)) {
 echo $path_errors[$file_or_dir][$each_message]."&lt;br&gt;";  
 }
 }
 }
 </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2171">A.63.6.
            EXAMPLE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $path_errors=isPathBad("/test/test.txt", true);  
 if ($path_errors["directory"] or $path_errors["file"]["write"]) { 
 $output="Error:  Cannot write to test/text.txt. The following errors were
 encountered.:&lt;br&gt;\r\n";  
 while ( list($file_or_dir, $error_messages) = each($path_errors)) 
 {  
 while (list($each_message)  = each($error_messages)) 
 {
 $output.= $path_errors[$file_or_dir][$each_message]."&lt;br&gt;\r\n";
 }
 }
 echo $output;
 
 
 } </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2174">A.63.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isPathbad</strong>($path_name, $check_filename=false, $file_existing=false) {                                                                                                                                                                                                           
                                                                                                                                                            
    
      $dir_name=dirname($path_name)."/";
      $base_file_name=basename($path_name);
      $basename_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($base_file_name);
      $dir_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($dir_name);
      $pathname_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($path_name);
    
    
        //Check Directory
    
       if(!file_exists($dir_name)){
         $path_errors["directory"]["exist"]="Error: Directory $dir_stripped does not exist. Please Create.&lt;br&gt;";
       }
    
         elseif(!is_writeable($dir_name)){
    
          $path_errors["directory"]["write"]="Error: Directory $dir_stripped cannot be written to. Check permissions.&lt;br&gt;";
       }
       elseif(!is_readable($dir_name)){
         $path_errors["directory"]["read"]="Error: Directory $dir_stripped cannot be read from. Check permissions.&lt;br&gt;";
       }
    
    
       //Check File Name
    
       if ($check_filename and !$base_file_name) { //if file name is required but not suppplied, print error
           $path_errors["file"]["empty"]="Error: $pathname_stripped is an invalid path. No file name was supplied.&lt;br&gt;";
          }
    
       if ($check_filename and $base_file_name) {
    
          //check filename format
    
          if((MS_WINDOWS and !preg_match("/^[-\.a-zA-Z0-9\s_\^\$~!#&amp;\}\{\(\)@'`]+?$/",$base_file_name))or (!MS_WINDOWS and !preg_match("/^.[^\*\?&amp;`'\"\/\&gt;\)\(\]\[\&lt;(\)]+?$/",$base_file_name))) { //check for proper characters in names
    
                  $path_errors["file"]["name"] ="\tError: File $pathname_stripped  contains invalid characters in file name.\r\n&lt;br&gt;";
    
           }
    
          if ($file_existing) {
    
             if(!file_exists($path_name)){
                   $path_errors["file"]["exist"]="Error: File $pathname_stripped does not exist.&lt;br&gt;";
             } elseif(!is_file($path_name)){
                   $path_errors["file"]["regular"]="Error: Invalid filename. $basename_stripped is a directory.&lt;br&gt;";
    
             }   elseif(!is_writeable($path_name)){
                      $path_errors["file"]["write"]="Error: File $pathname_stripped cannot be written to. Check permissions on file.&lt;br&gt;";
             }   elseif(!is_readable($path_name)){
                   $path_errors["file"]["read"]="Error: File $pathname_stripped is not readable. Check permissions.&lt;br&gt;";
             }
    
        }
    
    
    
    
      }
        return $path_errors;
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1FORMATPATH">A.64.
          phpcron_commonlib/formatPath</a></h1>
          <a name="ANCHORFORMATPATH"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2186">A.64.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>formatPath</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2191">A.64.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $string <strong>formatPath</strong>(string $path_name);  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2195">A.64.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Takes a string containing a path name and makes it conform to the operating
 specific  path format for readability, e.g, for dos "c:/test/test.txt" -&gt;  
 "c:\test\test.txt".    This is meant to be used as a filter before the string
 is   output to the screen so it becomes "human readable". This function 
 assumes that the   path name is in unix format to begin with, so if used
 under a unix OS the string   returned for "c/test/test.txt" would be the same
 as the input. In addition, this function also adds the current directory to
 any path that   lacks an absolutte directory, e.g,"test.txt" would become
 /home/httpd/html/test.txt   if the script was being executed in
 /home/httpd/html/. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2198">A.64.4.
            PURPOSE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Used as a cross-OS function to format the path name before it is echoed
 to the user. No matter what the Operating System, the path will be readable
 to the user when it is echoed to the screen.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2201">A.64.5.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $path_name - string containing path name. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2204">A.64.6.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a string containing the $path_name in os appropriate format. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2207">A.64.7.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong><a href=
"#ANCHORCURRENT3DIRECTORY">CURRENT_DIRECTORY</a> is a constant which must be defined in the 
 calling script as follows:
 define ("<a href=
"#ANCHORCURRENT3DIRECTORY">CURRENT_DIRECTORY</a>",realpath(dirname(__FILE__)));               </strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2213">A.64.8.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000">                
    function <strong>formatPath</strong>($path_name) {
    
    //Note for this to work you must define <a href=
"#ANCHORCURRENT3DIRECTORY">CURRENT_DIRECTORY</a> as follows in main script:
    //define ("<a href=
"#ANCHORCURRENT3DIRECTORY">CURRENT_DIRECTORY</a>",realpath(dirname(__FILE__)));
                                                                     
    
    /* Give a Directory Name if using same directory of script and none is otherwise specified*/
    if (dirname($path_name)==".") {
      $path_name=CURRENT_DIRECTORY."/".basename($path_name);
    
    }
                                     
    
      if(MS_WINDOWS) {
      $path_name=stripslashes($path_name);
    
      $path_name=preg_replace("/\//","\\",$path_name);  //get rid of any forward slashes
      }
                                     
       return $path_name;
      
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1IS3EMAIL">A.65.
          phpcron_commonlib/is_email</a></h1>
          <a name="ANCHORIS3EMAIL"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2224">A.65.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>is_email</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2229">A.65.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>is_email</strong>(string $email_address);  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2233">A.65.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Validates an email address</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2236">A.65.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $email_address                 - string containing an email address</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2239">A.65.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a true if email is in correct format, false if not </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2242">A.65.6.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>None known, but since domain formats are constantly changing, there
 may be some obscure domains that this function will see as incorrect
 emails and not accept.          </strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2246">A.65.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>is_email</strong>($email_address) {     
    
        if(!preg_match("/[\w\-][^@]+\@[\w\-][^@]+\.[\w\-][^@]+/",$email_address)) {
    
              return false;
        }  else {
            return true;
        }
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1APPENDTOFILE">A.66.
          phpcron_commonlib/appendToFile</a></h1>
          <a name="ANCHORAPPENDTOFILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2255">A.66.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>appendToFile</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2260">A.66.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string array <strong>appendToFile</strong>(string $new_file_contents, string $file_name);</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2264">A.66.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Appends $new_file_contents to file named by $file_name, if $file_name 
 does not exist, it will be created.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2267">A.66.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $new_file_contents  -  string containing text to be added to file
 $file_name          -  path and filename of file to be appended to</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2270">A.66.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a string array containing error messages; the first element of the
 array  contains a success message, if it was unsuccessful, the first element 
 is empty (false) and the remaining elements (1-last) contain error  messages.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2273">A.66.6.
            EXAMPLE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Example 1 - Short form:
 
 $append_results=<strong>appendToFile</strong>($clear_message,$log_result_file);
 $append_results[0]=""; //does not echo success message, but you could
 if(trim($append_results)) {
 $error_messages.=implode(" ",$append_results);
 echo $error_messages;
 }
 
 Example 2 - Long form:
 
 $append_results=<strong>appendToFile</strong>($contents, $filename);
 if($append_results[0]) { //this would be successful save        
 //this collects the success message 
 $error_messages.=$append_results[0]; 
 } else { //append so collect error messages in elements 1 - last
 $index=1;
 while($append_results[$index]) {
 $error_messages.=$append_results[$index];
 $index++;
 }
 }
 echo $error_messages;  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2278">A.66.7.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong>Relies on these other functions:
 /phpcron_commonlib/<a href=
"#ANCHORFORMATPATH">formatPath</a>                                   
 /phpcron_commonlib/<a href=
"#ANCHORISPATHBAD">isPathbad</a></strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2284">A.66.8.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>appendToFile</strong>($new_file_contents, $file_name)   {
    
    
    
      if(!trim($file_name)) {
    
          $save_results[1]="Error: No File Name Given";
          return $save_results;
      }
    
       $filename_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name);
    
    
           $path_errors=<a href=
"#ANCHORISPATHBAD">isPathbad</a>($file_name, true, true);
          //check if directory is valid and file name is legal
          if (!$path_errors["directory"] and !$path_errors["file"]["name"]) {
    
           /* Open for reading and writing, place file pointer at end of file (append)
            , if does not exist attempt to create it */
    
              $fp = fopen( $file_name,"a+");
    
              if (!$fp) {
                   $open_error="Error: File $filename_stripped Cannot Be opened. Check Permissions.&lt;br&gt;\n";
                 } else {
                 fwrite($fp,$new_file_contents);
                 fclose ($fp);
              $save_results[0]="&lt;strong&gt;File $filename_stripped has been successfully saved.&lt;strong&gt;&lt;br&gt;";
              }
    
           } else {
    
                   $i=1;
                  $save_results[1]="Error: Cannot save file $filename_stripped.&lt;br&gt;";
                     while ( list($file_or_dir, $error_messages) = each($path_errors)) {
    
                      while (list($each_message)  = each($error_messages)) {
    
                        $save_results[$i].= $path_errors[$file_or_dir][$each_message];
                        $i++;
                      }
                  }
    
    
    
    
        }
    
        if ($open_error) {
    
            $save_results[$i]=$open_error;
        }
    
        return $save_results;
     }     </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1SAVEFILE">A.67.
          phpcron_commonlib/saveFile</a></h1>
          <a name="ANCHORSAVEFILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2295">A.67.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>saveFile</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2300">A.67.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string array <strong>saveFile</strong>(string $file_contents, string $file_name);</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2304">A.67.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Saves $file_contents to file named by $file_name. If $file_name already
 exists it will be overwritten, if not, it will be created.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2307">A.67.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $file_contents  -  string containing text to be saved
 $file_name      -  path and filename of file to be saved</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2310">A.67.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns a string array containing error messages; the first element of the
 array  contains a success message (or false if it failed). If it was
 unsuccessful, the remaining elements (1-last) contain error  messages. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2313">A.67.6.
            EXAMPLE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> 
 Example 1 - Short form:
 
 $save_results=<strong>saveFile</strong>($clear_message,$log_result_file);
 $save_results[0]=""; //does not echo success message, but you could
 if(trim($save_results)) {
 $error_messages.=implode(" ",$save_results);
 echo $error_messages;
 }
 
 Example 2 - Long form:
 
 $save_results=<strong>saveFile</strong>($contents, $filename);
 
 if($save_results[0]) { //this would be successful save        
 //this collects the success message 
 $error_messages.=$save_results[0]; 
 } else { //save so collect error messages in elements 1 - last
 $index=1;
 while($save_results[$index]) {
 $error_messages.=$save_results[$index];
 $index++;
 }
 }
 echo $error_messages;  
 NOTES:
 This is essentially the same as the <a href=
"#ANCHORAPPENDTOFILE">appendToFile</a> function, but the pointer is
 at the beginning, not the end of the file. It relies on these other
 functions:
 
 <a href=
"#ANCHORFORMATPATH">formatPath</a>                                      
 <a href="#ANCHORISPATHBAD">isPathbad</a> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2321">A.67.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>saveFile</strong>($new_file_contents, $file_name)   {
    
       /* Save File over file_name (overwrites);
      returns an array of $save_results; $save_results[0] is true on success, false on failure
      and failure messages are in remaining elements of array */
    
          $new_file_contents=trim(stripslashes($new_file_contents));   //strip slashes from paths
          $filename_stripped=<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name);
          $path_errors=<a href=
"#ANCHORISPATHBAD">isPathbad</a>($file_name, true, false);
    
          if (!isset($path_errors)) { //check if directory is valid and file name is legal
              $fp = @fopen( $file_name,"w"); //open for writing, place file pointer at beginning of file, if does not exist attempt to create it
                 if (!$fp) {
                   $open_error="Error: File $filename_stripped Cannot Be opened. Check Permissions.&lt;br&gt;\n";
                 } else {
    
                 fwrite($fp,$new_file_contents);
                 fclose ($fp);
                 $save_results[0]="&lt;strong&gt;File $filename_stripped has been successfully saved.&lt;strong&gt;&lt;br&gt;";
            
                 }
          $i=1;   
      
          } else {
    
              $i=2;
             $save_results[1]="Error: Cannot save file $filename_stripped.&lt;br&gt;";
            
              while ( list($file_or_dir, $error_message) = each($path_errors)) {
    
                while (list($each_message)  = each($error_message)) {
    
                  $save_results[$i].= $path_errors[$file_or_dir][$each_message];
                  $i++;
                }
            }
    
    
        }
        
        if ($open_error) {
    
            $save_results[$i]=$open_error;
        }
        
        return $save_results;
     
     }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1DELETEFILE">A.68.
          phpcron_commonlib/deleteFile</a></h1>
          <a name="ANCHORDELETEFILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2332">A.68.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>deleteFile</font> - deletes file in unix and dos
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2337">A.68.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>deleteFile</strong>(string $file_name)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2341">A.68.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> Deletes file $filename in dos or unix</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2344">A.68.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> $file_name - name of file to be deleted</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2347">A.68.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true on success, false on failure</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2350">A.68.6.
            NOTES</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Must define MS_WINDOWS constant like so in the calling script:
 
 if(preg_match("/WIN/", PHP_OS)) {
 define("MS_WINDOWS",true);
 } else {
 define("MS_WINDOWS",false);
 }</strong></font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2354">A.68.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">     function <strong>deleteFile</strong>($file_name) {
    
    
     if (!file_exists($file_name)) {
      return true; //if file doesn't exist than don't worry about it
     }
     clearstatcache(); //clear cache since will be checking same file again
     $path_errors=isPathBad($file_name, true, true);
    
     if ( !$path_errors["directory"]["write"] and !$path_errors["file"])  {
    
       if(MS_WINDOWS) {
       $file_name=<a href=
"#ANCHORFORMATPATH">formatPath</a>($file_name);
    
       exec("del $file_name");
    
       } else {
    
        unlink($file_name);
    
       }
       return true;
     } else {
    
    
     return false;    //return false if errors - can't write to path
     }
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1ISINTEGER">A.69.
          phpcron_commonlib/isInteger</a></h1>
          <a name="ANCHORISINTEGER"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2364">A.69.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>isInteger</font> - tests whether a string contains integers only
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2369">A.69.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>isInteger</strong>(string $integer_string)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2373">A.69.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Checks whether $integer_string contains only integers</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2376">A.69.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $integer_string - string to be tested</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2379">A.69.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true on success, false on failure</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2382">A.69.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isInteger</strong> ($integer_string) {
      /* It's false if the string is null */
      if (!isset($integer_string)) {
        return false;
      }
      $i=0;
      $length=strlen($integer_string);
      while($i&lt;$length) {
      $ch=substr($integer_string,$i,1);
      if (ord($ch) &lt; 48 or ord($ch) &gt; 57) { //this tests 0 through 9
        return false;
      }
      $i++;
      }
      return true;
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1ISINTEGERINRANGE">A.70.
          phpcron_commonlib/isIntegerInRange</a></h1>
          <a name="ANCHORISINTEGERINRANGE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2391">A.70.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>isIntegerInRange</font> - tests whether an integer is within a named range
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2396">A.70.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>isIntegerInRange</strong>(string $integer_string, integer $low, integer
 $high)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2400">A.70.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Checks whether $integer_string contains an integer equal to or between the
 values  of $low and $high.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2403">A.70.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $integer_string - string to be tested
 $low           - integer at low end of range
 $high  - integer at high end of range</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2406">A.70.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true if tested string is outside of the $low and $high range, 
 false otherwise. Values that equal $low and $high will return true. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2409">A.70.6.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isIntegerInRange</strong> ($integer_string, $low, $high) {
    /* range is inclusive, so includes high and low values*/
    
        if  (!<a href=
"#ANCHORISINTEGER">isInteger</a>($integer_string)) {
    
        return false;
        }
    
        $myinteger=intval($integer_string);
        if (($myinteger &lt; $low) or ($myinteger &gt; $high)) {
        return false;
        } else {
        return true;
        }
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1MAILATTACHMENT">A.71.
          phpcron_commonlib/mailAttachment</a></h1>
          <a name="ANCHORMAILATTACHMENT"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2419">A.71.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>mailAttachment</font> - emails a file as a mime encoded attachment
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2424">A.71.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>mailAttachment</strong>( string $email_address, string $subject, 
 string $body, string $attachment, string $mimetype) </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2428">A.71.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Mime encodes a file and emails it as an attachment. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2431">A.71.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> $email_address - the "To" email address
 $subject - Subject of email
 $body  - message to be included in the body of the email
 $attachment  - name of file to be attached
 $mimetype - mimetype of file to be encoded, e.g, "text/english"</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2434">A.71.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns an error message on failure. See the example below.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2437">A.71.6.
            EXAMPLE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> if($mailserver_error=<strong>mailAttachment</strong>
 ($admin_email_address, $subject, $body, $attachment, $mimetype)) {
 $error_messages.="Error: Unable to Email Log File:&lt;br&gt;\r\n".
 $mailserver_error;
 } else {          //it succeeded
 $error_messages.="Emailed Log File to $admin_email_address";
 }
 echo $error_messages;</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2441">A.71.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>mailAttachment</strong>( $email_address, $subject, $body, $attachment, $mimetype)  {
    
    $boundary = md5(uniqid(time()));
    
    
    //MIME MUST be first character in headers - no spaces  or carriage returns
    $headers ="MIME-Version: 1.0
    Content-type: multipart/mixed;boundary=\"$boundary\"
    
    Multipart MIME message
    \r\n";
    
    $messagebody = "
    --$boundary
    Content-type: text/plain;charset=us-ascii
    Content-transfer-encoding: 8bit
    
    ".$body
    ."\r\n";
    
    $fp = fopen($attachment, "r");
    $attached_file = fread($fp, filesize($attachment));
    $attached_file = chunk_split(base64_encode($attached_file));
    $file_name = basename($attachment);
    
    $messagebody .= "
    --$boundary
    Content-type: ".$mimetype."; name=\"$file_name\"
    Content-transfer-encoding: base64
    Content-Disposition: attachment; filename=\"$file_name\"
    
    ".$attached_file
    ."
    
    ";
    
    
         // End of mail
         $messagebody .= "--$boundary--";
    
         $mail_result=@mail($email_address, $subject, $messagebody, $headers);
    
         if(!$mail_result) {
         $error_message="Mail message could not be sent.\r\n&lt;br&gt;
          Make sure you have a mail server installed and running.\r\n&lt;br&gt;";
          return $error_message; //returns true if unable to mail
         }
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1ISOTHERPHPCROND">A.72.
          phpcron_commonlib/isOtherPhpcrond</a></h1>
          <a name="ANCHORISOTHERPHPCROND"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2450">A.72.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong></strong>isOtherPhpcrond</font> - checks to see if another phpcrond deamon process is running
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2455">A.72.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean  <strong>isOtherPhpcrond</strong>(void)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2459">A.72.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Does a triple check (unix) or single check (dos) to see if another 
 phpcrond daemon is running. 
 
 In unix and dos it checks to see if the phpcron_psinfo_file exists in the 
 current directory of the script. 
 
 Under unix,the function will also 1) check the /tmp directory since  
 phpcrond will also generate a file there in unix if the directory exists  
 and is writeable, and 2) grep the ps command to see if it can detect an  
 instance of phpcron.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2462">A.72.4.
            PURPOSE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> It is vital that only one phpcrond daemon run at the same time - especially
 on a box  that is being used by many users (e.g., a virtual hosting box).
 This function  tries its best to detect whether such other instance is
 running. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2465">A.72.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Returns true if another instance of phpcrond is detected, false if not. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2468">A.72.6.
            BUGS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"><strong>Since it relies on a specific use of the ps, the ps check may not work under 
 some versions of Unix.</strong> </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2472">A.72.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isOtherPhpcrond</strong>() {
    
    /*Triple check done initially in <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> to see if there is another instance running */
    
    global $phpcron_psinfo_file;
    $other_instance=false;
    $temp_path="$TEMP_DIR/".basename($phpcron_psinfo_file);
    
    if(file_exists($phpcron_psinfo_file)) {
        //Check to see if another instance is running
    
          <a href=
"#ANCHORDELETEFILE">deleteFile</a>($phpcron_psinfo_file);
          sleep(1); //wait for phpcron to create again if there is another instance
          clearstatcache(); //clear cache since will be checking same file again
          if (file_exists($phpcron_psinfo_file)) {
          $other_instance=true;
    
    
          }
    
    }
    if(is_writeable("$TEMP_DIR/") and file_exists("$TEMP_DIR/".basename($phpcron_psinfo_file))) {
    
    
        //Check temp directory to see if a file ps info file is there
    
          <a href="#ANCHORDELETEFILE">deleteFile</a>($temp_path);
    
          
          sleep(1); //wait for phpcron to create again if there is another instance
          clearstatcache(); //clear cache since will be checking same file again
          if (file_exists("$TEMP_DIR/".basename($phpcron_psinfo_file))) {
          $other_instance=true;
    
          }
    
    }
    
    
    //check in the tmp directory
    
    exec("ps ef | grep '^*<a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a>*daemon.*$'",$output,$result_code);
    $number_of_instances=count($output);
    if($number_of_instances&gt;1) {
    
    $other_instance=true;
    
    }
    
    return $other_instance;
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1STOPOTHERPHPCRON">A.73.
          phpcron_commonlib/stopOtherPhpcron</a></h1>
          <a name="ANCHORSTOPOTHERPHPCRON"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2485">A.73.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>stopOtherPhpcron</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2490">A.73.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>stopOtherPhpcron</strong>(void)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2494">A.73.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Stops all Phpcron daemons that may be running. Does so by saving a  "stop"
 file ($phpcron_off) in the phpcron directory and in the $TEMP_DIR which when
 detected by <a href=
"#ANCHORPHPCRON.PHP">phpcron.php</a> will stop that process. </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2498">A.73.4.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> True on success, false on failure.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2501">A.73.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>stopOtherPhpcron</strong>(){
    
    /* Stops all phpcron daemons gracefully. */
    global $phpcron_off;
    
       
        $save_errors=<a href=
"#ANCHORSAVEFILE">saveFile</a>("PHPCRON Stopped",$phpcron_off);
        
        $save_errors=implode("&lt;br&gt;",$save_errors);
       // echo "&lt;br&gt;".$save_errors;
     
        <a href=
"#ANCHORSAVEFILE">saveFile</a>("PHPCRON Stopped","$TEMP_DIR/".basename($phpcron_off));
    
        sleep (1); //wait for it to stop
       
        return !<a href=
"#ANCHORISOTHERPHPCROND">isOtherPhpcrond</a>(); //checks to see if any other phpcrond is still running and returns true/false
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1PARSECRONTIMEPARAMS">A.74.
          phpcron_commonlib/parseCronTimeParams</a></h1>
          <a name="ANCHORPARSECRONTIMEPARAMS"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2513">A.74.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>parseCronTimeParams</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2518">A.74.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>parseCronTimeParams</strong>(string $time_param_string)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2522">A.74.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Parses phpcrontab parameter string (minute, hour, date of month, day of week
 in traditional unix crontab format) and returns true or false whether current
 time matches. Implements ranges and alternate values and you can mix and
 match. E.g., you can do this: 18,20-25,20 1-2 * * *  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2525">A.74.4.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> True if matches current time, false on failure.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2528">A.74.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>parseCronTimeParams</strong>($time_param_string) {
    
    /* Parses phpcrontab parameter string (minute, hour, date of month, day of
    week in traditional unix crontab format) and returns true or false whether
    current time matches. Implements ranges and alternate values and you can mix
    and match. E.g., you can do this: 18,20-25,20 1-2 * * *       */
    
    
    /*Separate string by spaces, if it does not equal 5 then can't parse */
    
    if (count($tparams=explode(" ",$time_param_string)) &lt;&gt; 5) {
    return false;
    }
    
    /* Get Current time in same format as $time_param_string */
    $timestamp= trim(date("i H d m w"));
    
    /*Put individual vales of time stamp into sequential array */
    $timestamp=explode(" ",$timestamp);
    
    /*Main Loop - Cycle through each time parameter and match
    to actual time */
    
    $i=0;
    while (isset($tparams[$i])) {
    
    
    /***********Check for Asterisk************/
    
    if (preg_match("/^\*$/",$tparams[$i])) {
    
    $i++;
    continue 1; /*Go to Next Value*/
    } elseif (preg_match("/^".$timestamp[$i]."$/",$tparams[$i])) {
    
    /***********Check for Exact Match***********/
    
    $i++;
    continue 1; /*Go to Next Value*/
                                //a #    or    a range        comma optional [repeat one or more times to end]
    } elseif (preg_match("/^(([0-9]{1,2}|[0-9]{1,2}-[0-9]{1,2}),?)+$/",$tparams[$i])) {
    
    /**********Check for Comma and Ranges (can be mixed)*************/
    
    
    /*Separate Out Values Separated by Commas*/
    $alternate_values=explode(",",$tparams[$i]);
    $i_av=0;
    
    /*Cycle through each value to compare with corresponding time unit*/
    
    while (isset($alternate_values[$i_av])) {
    
    /* Check for individual number match */
    if ($alternate_values[$i_av]==$timestamp[$i]) {
    
     /*Continue with outer while loop since we have a match
    and try next value */
    $i++;
    
    continue 2;
    
    }
    
    /*Check if this alternate value is also a range*/
    
    if (preg_match("/^([0-9]{1,2}-[0-9]{1,2})$/",$alternate_values[$i_av])) {
    
    /*If so, check the range */
    
    /*Separate Out Low and High of Range Separated by Hyphen*/
    $range=explode("-",$alternate_values[$i_av]);
    
    if (<a href=
"#ANCHORISINTEGERINRANGE">isIntegerInRange</a>($timestamp[$i], $range[0], $range[1])) {
    /* Continue with outer loop if it's within range */
    $i++;
    continue 2; 
    }
    
    } 
    
    
    $i_av++; /*Increment $alternate_values[$i_av] */
    }
    
    return false; //if it makes it this far there has been no matches
    
    } else {
    /* If doesn't match any of the patterns it's non-conforming */
    return false; 
    }
    
    $i++; /* Increment tparams[$i] value */
    }
    return true;
    
    }    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMONLIB1ISCRONTIMEPARAMSBAD">A.75.
          phpcron_commonlib/isCronTimeParamsBad</a></h1>
          <a name="ANCHORISCRONTIMEPARAMSBAD"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2538">A.75.1.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>isCronTimeParamsBad</strong>(string $time_param_string, int $command_number)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2542">A.75.2.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Validates phpcrontab parameter string (minute, hour, date of month, day of
 week in traditional unix crontab format) and returns error messages (true) if
 string is bad or false if ok.  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2545">A.75.3.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $time_param_string - a parameter string extracted from the 
                            phpcrontab.conf file (e.g., * 2-4,7,12 * * 3)
 int $command_number - line number in phpcrontrab.conf containing parameter 
                      string</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2548">A.75.4.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Error messages (true) if string is bad or false if ok.  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2551">A.75.5.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>isCronTimeParamsBad</strong>($time_param_string, $command_number) {
    
    
    /*Separate string by spaces, if it does not equal 5 then can't parse */
    
    if (count($tparams=explode(" ",trim($time_param_string))) &lt;&gt; 5) {
    $error_messages.="Error in Command #$command_number: Parameter String Must Have 5 Parameters.&lt;br&gt;";
    
    return $error_messages;
    }
    
    /* Set Correct high and low for each parameter */
    
     $correct_range[0]["low"] = 0;
     $correct_range[0]["high"] = 59;
     $correct_range[0]["unit"] = "Minutes";
     $correct_range[1]["low"] = 0;
     $correct_range[1]["high"] = 23;
     $correct_range[1]["unit"] = "Hour";
     $correct_range[2]["low"] = 1;
     $correct_range[2]["high"] = 31;
     $correct_range[2]["unit"] = "Day of Month";
     $correct_range[3]["low"] = 1;
     $correct_range[3]["high"] =12;
     $correct_range[3]["unit"] = "Month";
     $correct_range[4]["low"] = 0;
     $correct_range[4]["high"] = 6;
     $correct_range[4]["unit"] = "Day of Week";
      
     
    /*Main Loop - Cycle through each time parameter and validate*/
    
    $i=0;
    while (isset($tparams[$i])) {
    
    
    /***********Check for Asterisk************/
    
    if (preg_match("/^\*$/",$tparams[$i])) {
    
    $i++;
    continue 1; /*Go to Next Value*/
    } elseif (preg_match("/^[0-9]+$/",trim($tparams[$i]))) {
    
    /***********Check for Single Number***********/
    if (<a href=
"#ANCHORISINTEGERINRANGE">isIntegerInRange</a>($tparams[$i], $correct_range[$i]["low"], $correct_range[$i]["high"])) {
    /* Continue with loop if it's within range */
    $i++;
    continue 1; 
    } else {
    
    $error_messages.="Error in Command #$command_number: ".$tparams[$i]." is an incorrect value for ".$correct_range[$i]["unit"].", it must be between ".$correct_range[$i]["low"]." and ".$correct_range[$i]["high"].".&lt;br&gt;\r\n";
    
    }
    
    } elseif (preg_match("/^(([0-9]{1,2}|[0-9]{1,2}-[0-9]{1,2}),?)+$/",$tparams[$i])) {
    
    /**********Check for Comma and Ranges (can be mixed)*************/
    
    
    /*Separate Out Values Separated by Commas*/
    
    $tparams[$i]=str_replace(",", " ", $tparams[$i]);
    
    //$error_messages.="Parameter String: $tparams[$i]&lt;br&gt;";
    $alternate_values=explode(" ",$tparams[$i]);
    
    $i_av=0;
    
    /*Cycle through each value to compare with corresponding time unit*/
    
    while (isset($alternate_values[$i_av])) {
    
    /*Check if it is a range */
            
    if(preg_match("/^[0-9]{1,2}-[0-9]{1,2}$/",$alternate_values[$i_av])) {
    
            $range=explode("-",$alternate_values[$i_av]);
            
            /*Make Sure High &gt; Low */
            
            if ($range[0]&gt;=$range[1]) {
            $error_messages.="Error in Command #$command_number: Low value of range ".$alternate_values[$i_av]." in ".$correct_range[$i]["unit"]." field is greater than or equal to high value.&lt;br&gt;\r\n";
            }
            $i_range=0;
            while(isset($range[$i_range])){
            if (!<a href=
"#ANCHORISINTEGERINRANGE">isIntegerInRange</a>($range[$i_range], $correct_range[$i]["low"], $correct_range[$i]["high"])) {
    
            $error_messages.="Error in Command #$command_number: ".$range[$i_range]." is an incorrect value for ".$correct_range[$i]["unit"].", it must be between ".$correct_range[$i]["low"]." and ".$correct_range[$i]["high"].".&lt;br&gt;\r\n";
    
            }
            $i_range++;
            }
    
            $i_av++;
            continue; //continue with while loop
              
    }
    
    /*If not a range, check individual value*/
    
    //$error_messages.="Value: $alternate_values[$i_av]&lt;br&gt;";
    if (!<a href=
"#ANCHORISINTEGERINRANGE">isIntegerInRange</a>($alternate_values[$i_av], $correct_range[$i]["low"], $correct_range[$i]["high"])) {
    
    
    $error_messages.="Error in Command #$command_number: ".$alternate_values[$i_av]." is an incorrect value for ".$correct_range[$i]["unit"].", it must be between ".$correct_range[$i]["low"]." and ".$correct_range[$i]["high"].".&lt;br&gt;\r\n";
    
    }
    
    
    $i_av++; /*Increment $alternate_values[$i_av] */
    }
    
    } else {
    /* If doesn't match any of the patterns it's non-conforming */
    $error_messages.="Error in Command #$command_number: The time parameters are in incorrect format&lt;br&gt;\r\n";
    
    }
    
    $i++; /* Increment tparams[$i] value */
    }
    return $error_messages;
    
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h1 class="SECT1"><a name=
          "ANCHORPHPCRON3COMMANDLIB1DOWNLOADFILE">A.76.
          phpcron_commandlib/downloadFile</a></h1>
          <a name="ANCHORDOWNLOADFILE"></a>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2563">A.76.1.
            NAME</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"><strong></strong>downloadFile</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2568">A.76.2.
            SYNOPSIS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> boolean <strong>downloadFile</strong>(string $download_file_path, string $download_file_name)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2572">A.76.3.
            FUNCTION</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> Sends an octet stream header to browser forcing a download of the file  found
 at $download_file_path with the $download_file_name.  It needs to be called
 before headers are sent and should end before any output is sent or use
 output buffering.  </font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2575">A.76.4.
            INPUTS</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000"> string $download_file_path - path of the file to be downloaded
 string $download_file_name - file name which the download file will be
 saved as on the local computer (not the name
                             of the download file on the server)</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2578">A.76.5.
            RESULT</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> False on failure, true on success.</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2581">A.76.6.
            EXAMPLE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color="#000000"> if($download_log) {
 $download_file_name="phpcron_logfile".date("mdy_H_i").".txt";    
 <strong>downloadFile</strong>($log_result_file, $download_file_name);
 exit;  
 }</font>
</pre>
                </td>
              </tr>
            </table>
          </div>

          <div class="SECT2">
            <hr>

            <h2 class="SECT2"><a name="AEN2585">A.76.7.
            SOURCE</a></h2>

            <table border="0" bgcolor="#E0E0E0" width="100%">
              <tr>
                <td>
<pre class="LITERALLAYOUT">
<font color=
"#000000">    function <strong>downloadFile</strong>($download_file_path, $download_file_name) {
       
    if (!$download_file_path or !file_exists($download_file_path) or !is_readable($download_file_path)) {
    
    return false;
    }
    $data=file($download_file_path);
    
    $data=trim(implode("",$data));
    
    header ("Content-length: " . strlen($data)); 
    header ("Content-type: application/octetstream");
    header ("Content-disposition: inline; filename=$download_file_name");
    
    print($data);
      
    return true;        
    }    
    </font>
</pre>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

Return current item: Phpcron - a crond graphical alternative