| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/handjobcafe.com/public_html/lists/admin/ |
Upload File : |
<?php
require_once dirname(__FILE__).'/accesscheck.php';
## some kind of attempt to make a test suite for certain elements of phplist
print '<h3>'.$GLOBALS['I18N']->get('phplist test suite').'</h3>';
if (empty($GLOBALS['developer_email'])) {
print "Only available in developer mode";
return;
}
$tests = array();
# generic class that's extended by all tests
include_once dirname(__FILE__).'/defaulttest.php';
$testdir = dirname(__FILE__).'/tests';
if (is_dir($testdir)) {
if ($dh = opendir($testdir)) {
while (($file = readdir($dh)) !== false) {
if (preg_match("/\.php$/",$file) && is_file($testdir."/".$file)) {
require_once ($testdir.'/'.$file);
$class = basename($file,'.php');
eval("\$test = new \$class();");
if (method_exists($test,'runtest')) {
$tests[$class] = $test;
}
}
}
closedir($dh);
}
}
if (!empty($_GET['runtest']) && in_array($_GET['runtest'],array_keys($tests))) {
print "<h3>Running test: ".$tests[$_GET['runtest']]->name.'</h3>';
$testresult = $tests[$_GET['runtest']]->runtest();
if ($testresult) {
print $GLOBALS['I18N']->get('Test passed');
} else {
print $GLOBALS['I18N']->get('Test failed');
}
print '<br/><br/>';
}
$ls = new WebblerListing($GLOBALS['I18N']->get('Tests available'));
foreach ($tests as $testclassname => $testclass) {
$el = $GLOBALS['I18N']->get($testclass->name);
$ls->addElement($el,PageUrl2('tests&runtest='.$testclassname));
$ls->addColumn($el,$GLOBALS['I18N']->get('Purpose'),$GLOBALS['I18N']->get($testclass->purpose));
}
print $ls->display();