Ejemplo n.º 1
0
function print_assessments($id)
{
    global $assessments, $id_pool, $all_assessments;
    if ($id_pool > 0) {
        //       print_r($assessments[$id]);
        printStatus($assessments[$id], $all_assessments);
        print " ";
    }
}
Ejemplo n.º 2
0
    exit(0);
}
if (isAjax()) {
    // action can be: 'START', 'CONTINUE' or 'STOP'
    if (isset($_GET['action'])) {
        switch ($_GET['action']) {
            case 'START':
                if (0 == initializeSuites()) {
                    printf('0');
                    // no tests to run
                }
                break;
            case 'CONTINUE':
                list($testClass, $testName, $testResult) = runCurrentTestCase();
                incrementSuite();
                printStatus($testClass, $testName, $testResult);
                break;
            case 'STOP':
                stopTestsAndDisplay();
                break;
        }
    }
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Suites</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<link href="css/container.css" rel="stylesheet" type="text/css" />
Ejemplo n.º 3
0
    <td>The game is visible, but ticks have not started</td>
   </tr>
   <tr>
    <?php 
printStatus('RUNNING');
?>
    <td>The game is running normally</td>
   </tr>
   <tr>
    <?php 
printStatus('VICTORY');
?>
    <td>The game is still running but someone reached victory</td>
   </tr>
   <tr>
    <?php 
printStatus('ENDING');
?>
    <td>The game is still available but is about to end.</td>
   </tr>
   <tr>
    <?php 
printStatus('FINISHED');
?>
    <td>The game is no longer running and only visible through the rankings page</td>
   </tr>
  </table>

 </body>
</html>
                            // Record paging happens inside the successful curl request block
                            // Outside, an unhandled error can cause faculty with > $countIncrement pubs
                            // to spin into an infinite loop requesting more and more
                            if ($totalResults - $countTotal > 0) {
                                $offset += $countIncrement;
                            } else {
                                $loopThrough = 0;
                            }
                        }
                    }
                    // End CURLRESPONSE structure
                }
                // End LOOPTHROUGH control structure
                curl_close($openCurl);
            }
            // End data_try while loop
        }
        // End SCOPUSID loop
        printFile($outputFile, "\tADDED " . $addedPubCount . " faculty publication record(s)\n");
    }
    // end if(count(scopusId)>0)
    printStatus($thisCount, $facultyCount);
}
// End FACULTYIDS loop
// Record end of process
$eventEnd = date("Y-m-d H:i:s");
$endProcess = "UPDATE events_master SET eventFinish = '{$eventEnd}' WHERE eventID = {$processNumber}";
runQuery($con, $endProcess);
closeDB($con);
printFile($outputFile, "All processes complete.\n");
printFile($outputFile, "Process end: " . $eventEnd . "\n");
    } else {
        echo "Warning: Cannot remove {$varName} from WikiFactory (The variable is used in some wikis).\n";
    }
    exit;
}
if (empty($wikiId)) {
    $wikiIds = getWikiIds($varData['cv_id'], $limit);
} else {
    if (isUsed($varData['cv_id'], $wikiId)) {
        $wikiIds = [$wikiId];
    } else {
        echo "SKIP: Cannot remove {$varName} from wikiId {$wikiId} (Variable is not used).\n";
        exit;
    }
}
$cnt = 0;
$failed = 0;
$total = count($wikiIds);
foreach ($wikiIds as $id) {
    $cnt++;
    if ($remove) {
        echo "\tWiki {$id} [{$cnt} of {$total}]: Remove {$varName} ";
        if ($dryRun) {
            $status = Status::newGood();
        } else {
            $status = removeVariableFromWiki($varData, $id);
        }
        printStatus($status);
    }
}
echo "\nTotal wikis: " . $total . ", Success: " . ($total - $failed) . ", Failed: {$failed}\n\n";
        }
    } else {
        if ($type === "fl") {
            $flPubCountSql = "SELECT COUNT(recordNumber) AS totalflPubCount FROM faculty_publications WHERE record_valid = 1 AND internetID = '{$internetId}' AND (authorPosition = 1 OR authorPosition = authorCount) LIMIT 1";
            $result = runQuery($con, $flPubCountSql);
            $obj = mysqli_fetch_object($result);
            $totalflPubCount = $obj->totalflPubCount;
            printFile($outputFile, $internetId . "\t" . $totalflPubCount . "\n");
            mysqli_free_result($result);
            // Update 'faculty' table with new total publication count
            $updateflPubCountSql = "UPDATE faculty_metrics SET flPubCount = {$totalflPubCount} WHERE internetID = '{$internetId}'";
            if (!runQuery($con, $updateflPubCountSql)) {
                printFile($errorLogFile, $internetId . "\n\tUpdate error: " . mysqli_error($con) . "\n");
                printFile($outputFile, "\tUpdate error: " . mysqli_error($con) . "\n");
            } else {
                printFile($outputFile, "\tPublication count updated.\n");
            }
        }
    }
    printStatus($counter, $total);
}
// Record end of process
$eventEnd = date("Y-m-d H:i:s");
$endProcess = "UPDATE events_master SET eventFinish = '{$eventEnd}' WHERE eventID = {$processNumber}";
if (!runQuery($con, $endProcess)) {
    printFile($errorLogFile, "MySQL Update Error: " . mysqli_error($con) . "\n");
    printFile($outputFile, "MySQL Update Error: " . mysqli_error($con) . "\n");
}
closeDB($con);
printFile($outputFile, "Process complete.\n");
printFile($outputFile, "Process end: " . $eventEnd . "\n");
Ejemplo n.º 7
0
</div>
<?

if ($todojs) $todojs .= ");\n";



// Print the volumes

print "<h1>Collections</h1>";
$ch = $xrai_db->query("SELECT collection, title FROM $db_files WHERE parent is null ORDER BY title");
if (DB::isError($ch)) non_fatal_error("Could not retrieve collections",$ch->getUserInfo());
else {
   while ($row = $ch->fetchRow(DB_FETCHMODE_ASSOC)) {
      print "<div>";
      printStatus($a[$row["collection"]], $total);
      print " <a id='$row[collection]' href=\"collections/$row[collection]?id_pool=$id_pool\">" . htmlspecialchars($row["title"]) . "</a>";
      print "</div>";
   }
}


?>
<script language="javascript">
 id_pool=<?php 
echo $id_pool;
?>
;
 <?php 
echo $todojs;
?>
Ejemplo n.º 8
0
$cfg["ip"] = '127.0.0.1';
// client-handler-"interfaces"
include_once "ClientHandler.php";
include_once "AliasFile.php";
include_once "RunningTorrent.php";
// -----------------------------------------------------------------------------
// Main
// -----------------------------------------------------------------------------
$action = @$argv[1];
if (isset($action) && $action != "") {
    switch ($action) {
        case "torrents":
            printTorrents();
            break;
        case "status":
            printStatus();
            break;
        case "netstat":
            printNetStat();
            break;
        case "start":
            cliStartTorrent(@$argv[2]);
            break;
        case "stop":
            cliStopTorrent(@$argv[2]);
            break;
        case "start-all":
            cliStartTorrents();
            break;
        case "resume-all":
            cliResumeTorrents();
            if ($file == $file_name) {
                continue;
            }
        } else {
            $ophs = array_diff($diff, array($file_name));
            foreach ($ophs as $file) {
                $orphans[$assetid][] = $data_path . '/' . $file;
                $count++;
            }
        }
    }
    printAssetid($assetid);
    if (isset($orphans[$assetid])) {
        printStatus('FOUND');
    } else {
        printStatus('OK');
    }
    $GLOBALS['SQ_SYSTEM']->am->forgetAsset($asset, TRUE);
}
//end foreach $children
// if there is any orphan files, print them
if (!empty($orphans)) {
    echo "\n[Total {$count} orphan files found]\n\n";
    foreach ($orphans as $assetid => $files) {
        echo "[ #{$assetid} ]\n";
        echo implode("\n", $files) . "\n\n";
    }
} else {
    echo "No orphan files found\nBye\n";
    exit;
}
Ejemplo n.º 10
0
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ----------------------------------------------------------------------------
require_once "/usr/share/oralux/main/Constants.php";
require_once "/usr/share/oralux/text2speechinstaller/dtkInstaller.php";
function printStatus($theStatus, $theFoundPath, $theLanguage)
{
    $fd = fopen("/tmp/phpstatus", "w");
    fwrite($fd, "{$theStatus}\n{$theFoundPath}\n{$theLanguage}\n");
    fclose($fd);
}
$aTextToSpeechLanguage = ENGLISH_TTS;
$aTextToSpeech = GENERIC_TTS;
if (FALSE == LookForDirectory("dtk", $aFoundPath)) {
    // For DOS
    if (LookForDirectory("DTK", $aFoundPath)) {
        // For DOS
        system("mv {$aFoundPath}/DTK {$aFoundPath}/dtk");
    } else {
        printStatus(DTK_DIRECTORY_NOT_FOUND, $aFoundPath);
    }
    return;
}
$anInstaller = new DECtalkInstaller1("{$aFoundPath}/dtk");
if ($anInstaller->myStatus == OK) {
    $anInstaller->placeInRamdisk();
}
// Today, we may install two languages.
// The last one in the attribute is the optional language (e.g french)
$aLanguage = $anInstaller->myTextToSpeechLanguage[count($anInstaller->myTextToSpeechLanguage) - 1];
printStatus($anInstaller->myStatus, $aFoundPath, $aLanguage);
Ejemplo n.º 11
0
</div>
<?

if ($todojs) $todojs .= ");\n";



// Print the volumes

print "<h1>Collections</h1>";
$ch = $xrai_db->query("SELECT collection, title FROM $db_files WHERE parent is null ORDER BY title");
if (DB::isError($ch)) non_fatal_error("Could not retrieve collections",$ch->getUserInfo());
else {
   while ($row = $ch->fetchRow(DB_FETCHMODE_ASSOC)) {
      print "<div>";
      printStatus($a[$row["collection"]]);
      print " <a id='$row[collection]' href=\"collections/$row[collection]?id_pool=$id_pool\">" . htmlspecialchars($row["title"]) . "</a>";
      print "</div>";
   }
}


?>
<script language="javascript">
 id_pool=<?php 
echo $id_pool;
?>
;
 <?php 
echo $todojs;
?>
Ejemplo n.º 12
0
            ?>
"
						 <?php 
            if (strpos($selectedIds, "'" . $row["id"] . "'") !== false) {
                echo "checked";
            }
            ?>
/>
				</td><?php 
        }
        ?>
					<td class="centered"><?php 
        echo $row["id"];
        ?>
 <?php 
        printStatus($row['status']);
        ?>
</td>
					<td><a id="ICON_<?php 
        echo $row["id"];
        ?>
" class="fa fa-info"  href='#'
						onclick="javascript:toggle('OPTIONS_<?php 
        echo $row["id"];
        ?>
', 'selectedIds');"></a>
						<div id="OPTIONS_<?php 
        echo $row["id"];
        ?>
"
							style="display: none" class="popupstyle">							
Ejemplo n.º 13
0
     $import_action_outputs = unserialize(file_get_contents(TEMP_FILE));
 }
 // check if there is hard coded assetid reference which doesn't exist in the target system
 if (!checkAssetExists($action, 'parentid') || !checkAssetExists($action, 'assetid') || !checkAssetExists($action, 'asset')) {
     trigger_error('Action ID "' . $action['action_id'][0] . '" contains non-exist assetid reference. Action skipped.', E_USER_WARNING);
     _disconnectFromMatrixDatabase();
     exit(0);
     break;
 }
 // Execute the action
 printActionId($action['action_id'][0]);
 if (!execute_import_action($action, $import_action_outputs)) {
     trigger_error('Action ID "' . $action['action_id'][0] . '" could not be executed', E_USER_WARNING);
 } else {
     $count = $index + 1;
     printStatus($count . '/' . $total_number);
 }
 // blank out old value and new value returned from set attribute action.
 // recording the attribute value content will flood our temp data file and memory
 $new_entry = array_slice($import_action_outputs, -1, 1, TRUE);
 $new_entry_key = key($new_entry);
 if (isset($new_entry[$new_entry_key]['old_value'])) {
     unset($new_entry[$new_entry_key]['old_value']);
 }
 if (isset($new_entry[$new_entry_key]['new_value'])) {
     unset($new_entry[$new_entry_key]['new_value']);
 }
 $import_action_outputs = array_merge($import_action_outputs, $new_entry);
 // save global temp data to file
 $temp_string = serialize($import_action_outputs);
 string_to_file($temp_string, TEMP_FILE);
exec('find ' . SQ_CACHE_PATH . "  -type d -name '[0-9]*'", $current_dirs);
$count = 0;
$total = 0;
// loop through each directory, to make it less memory intensive
foreach ($current_dirs as $dir) {
    $current_files = array();
    // remove the file if there isnt a corresponding entry in the sq_cache table
    exec("find {$dir} -type f -name '[a-z0-9]*'", $current_files);
    foreach ($current_files as $file) {
        $file_name = substr($file, $cache_path_len);
        if (!in_array($file_name, $valid_files)) {
            $total++;
            printFileName($file_name);
            $status = @unlink(SQ_CACHE_PATH . '/' . $file_name);
            $ok = $status ? 'OK' : 'FAILED';
            printStatus($ok);
            if ($status) {
                $count++;
            }
        }
    }
}
echo "\nSummary: {$count}/{$total} cache file(s) removed.\n";
if ($count != $total) {
    $problematic = $total - $count;
    trigger_error("{$problematic} file(s) cannot be removed, please check file permission.", E_USER_WARNING);
}
/**
* Prints the file path to be removed
*
* @param string	$file_name	the name of the cache file
            printFile($outputFile, "PubMed record duplicate: MPID " . $mpid . "\n");
            $data = mysqli_fetch_array($select_pubmed_dup_result);
            $migrate_mpid = $data["mpid"];
            $remove_pubmed_record_sql = "DELETE FROM publication_data WHERE mpid = '{$mpid}' AND pmid = '{$pmid}'";
            if (!runQuery($con, $remove_pubmed_record_sql)) {
                printFile($outputFile, "\tPubMed record error: " . mysqli_error($con) . "\n");
                printFile($errorLogFile, "\tPubMed record error: " . mysqli_error($con) . "\n\t" . $remove_pubmed_record_sql . "\n");
            } else {
                printFile($outputFile, "\tPubMed record removed.\n");
            }
            // Now remove faculty_publications record
            $remove_faculty_pubmed_sql = "DELETE FROM faculty_publications WHERE mpid = '{$mpid}'";
            if (!runQuery($con, $remove_faculty_pubmed_sql)) {
                printFile($outputFile, "\tPubMed record error: " . mysqli_error($con) . "\n");
                printFile($errorLogFile, "\tPubMed record error: " . mysqli_error($con) . "\n\t" . $remove_faculty_pubmed_sql . "\n");
            } else {
                printFile($outputFile, "\tFaculty PubMed record removed.\n");
            }
        }
    }
}
// Record end of process
$eventEnd = date("Y-m-d H:i:s");
printFile($outputFile, "Process end: " . $eventEnd . "\n");
$endProcess = "UPDATE events_master SET eventFinish = '{$eventEnd}' WHERE eventID = {$processNumber}";
runQuery($con, $endProcess);
closeDB($con);
printFile($outputFile, "All processes complete.\n");
printFile($outputFile, "Process end: " . $eventEnd . "\n");
printStatus(1, 1);
Ejemplo n.º 16
0
function print_assessments(&$a)
{
    global $id_pool, $all_assessments;
    if ($id_pool > 0) {
        //       print "Assessments: " . print_r($assessments[$id], true ) . " for '$id'. ";
        printStatus($a, $all_assessments);
        printStatistics($a);
        print " ";
    }
}