Example #1
0
}
function checkRequest($idData, $emailDest)
{
    if (empty($idData)) {
        return 'No data sent.';
    }
    if (empty($emailDest)) {
        return 'No email sent.';
    }
    return False;
}
if (php_sapi_name() === 'cli') {
    return;
}
global $config;
if ($error = checkConfiguration()) {
    echo $error;
    exit;
}
$idData = $_REQUEST["data"];
$emailDest = $_REQUEST["email"];
if ($error = checkRequest($idData, $emailDest)) {
    echo $error;
    exit;
}
$book = Book::getBookByDataId($idData);
$data = $book->getDataById($idData);
if (filesize($data->getLocalPath()) > 10 * 1024 * 1024) {
    echo 'Attachment too big';
    exit;
}
Example #2
0
 * Login page with configuratin checking and authorization
 *
 * @package 	TestLink
 * @author 		Martin Havlat
 * @copyright 	2006, TestLink community 
 * @version    	CVS: $Id: login.php,v 1.56 2010/02/02 12:52:36 franciscom Exp $
 * @filesource	http://testlink.cvs.sourceforge.net/viewvc/testlink/testlink/login.php?view=markup
 * @link 		http://www.teamst.org/index.php
 * 
 * @internal Revisions
 * 20100202 - franciscom - BUGID 0003129: After login failure blank page is displayed
 * 20100127 - eloff - Send localized login form strings with response to ajaxcheck
 * 20100124 - eloff - Added login functionality via ajax
 **/
require_once 'lib/functions/configCheck.php';
checkConfiguration();
require_once 'config.inc.php';
require_once 'common.php';
require_once 'doAuthorize.php';
$templateCfg = templateConfiguration();
$doRender = false;
// BUGID 0003129
$op = doDBConnect($db);
if (!$op['status']) {
    $smarty = new TLSmarty();
    $smarty->assign('title', lang_get('fatal_page_title'));
    $smarty->assign('content', $op['dbms_msg']);
    $smarty->display('workAreaSimple.tpl');
    tLog('Connection fail page shown.', 'ERROR');
    exit;
}
Example #3
0
 public function testCheckConfigurationEmailEmpty()
 {
     global $config;
     $config['cops_mail_configuration']["address.from"] = "";
     $this->assertStringStartsWith("NOK", checkConfiguration());
 }