} // ----- only run from command line ----- if (!env_is_cli()) { die; } // ----- params ----- set_time_limit(0); error_reporting(E_ALL); define('CAPTURE', 'onepercent'); // ----- includes ----- include "../../config.php"; // load base config file include "../../common/functions.php"; // load base functions file include "../common/functions.php"; // load capture function file require BASE_FILE . 'capture/common/tmhOAuth/tmhOAuth.php'; $thislockfp = script_lock(CAPTURE); if (!is_resource($thislockfp)) { logit(CAPTURE . ".error.log", "script invoked but will not continue because a process is already holding the lock file."); die; // avoid double execution of script } if (dbserver_has_utf8mb4_support() == false) { logit(CAPTURE . ".error.log", "DMI-TCAT requires at least MySQL version 5.5.3 - please upgrade your server"); exit; } // ----- connection ----- dbconnect(); // connect to database @todo, rewrite mysql calls with pdo tracker_run();
</head> <body> <div id="if_fullpage"> <h1 id="if_title">DMI-TCAT query manager</h1> <div id="if_links"> <a href="https://github.com/digitalmethodsinitiative/dmi-tcat" target="_blank" class="if_toplinks">github</a> <a href="https://github.com/digitalmethodsinitiative/dmi-tcat/issues?state=open" target="_blank" class="if_toplinks">issues</a> <a href="https://github.com/digitalmethodsinitiative/dmi-tcat/wiki" target="_blank" class="if_toplinks">FAQ</a> <a href="../analysis/index.php" class="if_toplinks">analysis</a> </div> <div style="clear:both;"></div> </div> <?php if (!dbserver_has_utf8mb4_support()) { print "<br /><font color='red'>Your MySQL version is too old, please upgrade to at least MySQL 5.5.3 to use DMI-TCAT.</font><br>"; } print "You currently have " . count($querybins) . " query bins and are tracking "; $trackWhat = array(); if (array_search("track", $captureroles) !== false && $activePhrases) { $trackWhat[] = $activePhrases . " out of 400 possible phrases"; } if (array_search("track", $captureroles) !== false && $activeGeoboxes) { $trackWhat[] = $activeGeoboxes . " out of 25 possible geolocations"; } if (array_search("follow", $captureroles) !== false) { $trackWhat[] = $activeUsers . " out of 5000 possible user ids"; } if (array_search("onepercent", $captureroles) !== false) { $trackWhat[] = "a one percent sample";