Exemplo n.º 1
0
        <div class="js_job_filter_wrapper">
            <form action="<?php 
            echo JRoute::_($link);
            ?>
" method="post" id="adminForm" name="adminForm">
                <?php 
            require_once 'job_filters.php';
            ?>
            </form>
        </div>
<?php 
            if (isset($this->jobs)) {
                $noofjobs = 1;
                foreach ($this->jobs as $job) {
                    $comma = "";
                    print_job($job, $this, $isnew, 1);
                    if ($showgoogleadds == 1) {
                        if ($noofjobs % $afterjobs == 0) {
                            ?>
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" style="<?php 
                            echo $googleaddcss;
                            ?>
">
                            <tr>
                                    <td>
                                            <script type="text/javascript">
                                                    google_ad_client = "<?php 
                            echo $googleclient;
                            ?>
";
                                                    google_ad_slot = "<?php 
Exemplo n.º 2
0
function PDQ_Report()
{
    global $model, $version;
    // extern char[];
    global $fname, $s1, $s2, $s3, $s4;
    // extern char[];
    global $streams, $nodes, $DEBUG;
    // extern int
    global $job;
    // extern JOB_TYPE *
    global $syshdr, $jobhdr, $nodhdr, $devhdr;
    $c = 0;
    // int
    $prevclass = 0;
    // int
    $clock = "";
    // time_t
    $comment = "";
    // char[BUFSIZ];
    $pc = "";
    // char *
    $tstamp = "";
    // char *
    $fillbase = 24;
    // int
    $fill = 0;
    // int
    $pad = "                       ";
    // char *
    $fp = NULL;
    // FILE *
    $allusers = 0.0;
    // double
    $p = "PDQ_Report()";
    // char *
    if ($DEBUG == 1) {
        /*debug(p, "Entering");*/
        printf("Entering PDQ_Report()\n");
    }
    $s1 = "";
    $s2 = "";
    $s3 = "";
    $s4 = "";
    $syshdr = FALSE;
    $jobhdr = FALSE;
    $nodhdr = FALSE;
    $devhdr = FALSE;
    $clock = time();
    if ($clock == -1) {
        errmsg($p, "Failed to get date");
    }
    $tstamp = strftime("%a %b %d %H:%M:%S %Y", $clock);
    //(char *) ctime(&clock);	/* 24 chars + \n\0  */
    $s1 = $tstamp;
    $fill = $fillbase - strlen($model);
    $s2 = $model;
    for ($c = 0; $c < $fill; $c++) {
        $s2 .= " ";
    }
    $fill = $fillbase - strlen($version);
    $s3 = $version;
    for ($c = 0; $c < $fill; $c++) {
        $s3 .= " ";
    }
    printf("\n\n");
    banner_stars();
    banner_chars(" Pretty Damn Quick REPORT");
    banner_stars();
    printf("\t\t***  of : %s  ***\n", $s1);
    printf("\t\t***  for: %s  ***\n", $s2);
    printf("\t\t***  Ver: %s  ***\n", $s3);
    banner_stars();
    banner_stars();
    printf("\n");
    $s1 = "";
    $s2 = "";
    $s3 = "";
    /****   append comments file ****/
    $fname = "comments.pdq";
    if (file_exists($fname)) {
        $fp = fopen($fname, "r");
        if ($fp != NULL) {
            printf("\n\n");
            banner_stars();
            banner_chars("        Comments");
            banner_stars();
            printf("\n\n");
            $comment = fgets($fp, MAXBUF);
            while ($comment != FALSE) {
                printf("%s", $comment);
                $comment = fgets($fp, MAXBUF);
            }
            fclose($fp);
        }
    }
    /* else {
       		printf("\n\n");
            banner_stars();
         		banner_chars("        Comments");
      			banner_stars();
       		printf("\nNo comments.pdq file found in the default directory!\n");
       };*/
    /* Show INPUT Parameters */
    printf("\n\n");
    banner_stars();
    banner_chars("    PDQ Model INPUTS");
    banner_stars();
    printf("\n\n");
    print_nodes();
    /* OUTPUT Statistics */
    for ($c = 0; $c < $streams; $c++) {
        switch ($job[$c]->should_be_class) {
            case TERM:
                $allusers += $job[$c]->term->pop;
                break;
            case BATCH:
                $allusers += $job[$c]->batch->pop;
                break;
            case TRANS:
                $allusers = 0.0;
                break;
            default:
                $s2 = "";
                $s2 = sprintf("Unknown job should_be_class: %d", $job[$c]->should_be_class);
                errmsg($p, $s2);
                break;
        }
    }
    /* loop over c */
    printf("\nQueueing Circuit Totals:\n\n");
    for ($c = 0; $c < $streams; $c++) {
        switch ($job[$c]->should_be_class) {
            case TERM:
                printf("\tClients:    %3.2f\n", $job[$c]->term->pop);
                break;
            case BATCH:
                printf("\tJobs:       %3.2f\n", $job[$c]->batch->pop);
                break;
            default:
                break;
        }
    }
    printf("\tStreams:    %3d\n", $streams);
    printf("\tNodes:      %3d\n", $nodes);
    printf("\n");
    printf("\n\nWORKLOAD Parameters\n\n");
    for ($c = 0; $c < $streams; $c++) {
        switch ($job[$c]->should_be_class) {
            case TERM:
                print_job($c, TERM);
                break;
            case BATCH:
                print_job($c, BATCH);
                break;
            case TRANS:
                print_job($c, TRANS);
                break;
            default:
                typetostr($s1, $job[$c]->should_be_class);
                $s2 = sprintf("Unknown job should_be_class: %s", $s1);
                errmsg($p, $s2);
                break;
        }
    }
    /* loop over $c */
    printf("\n");
    for ($c = 0; $c < $streams; $c++) {
        switch ($job[$c]->should_be_class) {
            case TERM:
                print_system_stats($c, TERM);
                break;
            case BATCH:
                print_system_stats($c, BATCH);
                break;
            case TRANS:
                print_system_stats($c, TRANS);
                break;
            default:
                typetostr($s1, $job[$c]->should_be_class);
                $s2 = sprintf("Unknown job should_be_class: %s", $s1);
                errmsg($p, $s2);
                break;
        }
    }
    /* loop over $c */
    printf("\n");
    for ($c = 0; $c < $streams; $c++) {
        switch ($job[$c]->should_be_class) {
            case TERM:
                print_node_stats($c, TERM);
                break;
            case BATCH:
                print_node_stats($c, BATCH);
                break;
            case TRANS:
                print_node_stats($c, TRANS);
                break;
            default:
                typetostr($s1, $job[$c]->should_be_class);
                $s2 = sprintf("Unknown job should_be_class: %s", $s1);
                errmsg($p, $s2);
                break;
        }
    }
    /* over $c */
    printf("\n");
    if ($DEBUG) {
        debug($p, "Exiting");
    }
}