Example #1
0
*	 GPL v3 or above
*/
//minor change to test github emails - test
//stop browsing to files directly - all viewing to be handled by index.php
//if browse not defined then the page will exit
define("BROWSE", "browse");
/*
* The include configs and requirements stuff section - start
*/
/*
* Load stuff required before init.php
*/
require_once "./include/init_pre.php";
$module = isset($_GET['module']) ? filenameEscape($_GET['module']) : null;
$view = isset($_GET['view']) ? filenameEscape($_GET['view']) : null;
$action = isset($_GET['case']) ? filenameEscape($_GET['case']) : null;
require_once "./include/init.php";
/*
	GetCustomPath: override template or module with custom one if it exists, else return default path if it exists
	---------------------------------------------
	@name: name or dir/name of the module or template (without extension)
	@mode: template or module
*/
function GetCustomPath($name, $mode = 'template')
{
    $my_custom_path = "./custom/";
    $use_custom = 1;
    if ($mode == 'template') {
        if ($use_custom and file_exists("{$my_custom_path}default_template/{$name}.tpl")) {
            $out = ".{$my_custom_path}default_template/{$name}.tpl";
        } elseif (file_exists("./templates/default/{$name}.tpl")) {
Example #2
0
// John will need to fix this in the swf file.
foreach ($_POST as $key => $value) {
    $_POST[str_replace('_', ' ', $key)] = $value;
}
// Let's sanitize some header fields before it gets us in any trouble.
foreach (array('eM', '_ALT_EMAIL', 'subject') as $key) {
    if (isset($_POST[$key])) {
        $_POST[$key] = headerEscape($_POST[$key]);
    }
}
// Let's make sure no one is trying to do anything funky with filenames.
if (isset($_POST['Uploaded_File'])) {
    $_POST['Uploaded_File'] = filenameEscape($_POST['Uploaded_File']);
}
if (isset($_FILES['Filedata']['name'])) {
    $_FILES['Filedata']['name'] = filenameEscape($_FILES['Filedata']['name']);
}
// If the '$_FILES['Filedata']' is populated, process the
// file upload.
if (isset($_FILES['Filedata'])) {
    processFileUpload();
} elseif (is_array($_POST) && count($_POST) > 0) {
    processMailForm();
}
// If all else fails, print out a blank page with version
// numbers and release dates.
printMessage();
/**
 * Process the mail form results.
 *
 * This method is in charge of processing the mail form which
Example #3
0
$include_dir = dirname(APPLICATION_PATH) . '/';
$smarty_embed_path = dirname(APPLICATION_PATH) . '/';
//PDF configs
define('CACHE_DIR', APPLICATION_PATH . '/tmp/cache/');
define('OUTPUT_FILE_DIRECTORY', APPLICATION_PATH . '/tmp/cache/');
define('WRITER_TEMPDIR', APPLICATION_PATH . '/tmp/cache');
/*
* Load stuff required before init.php
*/
require_once "sys/include/init_pre.php";
global $cust_language;
$module = isset($_GET['module']) ? filenameEscape($_GET['module']) : null;
$view = isset($_GET['view']) ? filenameEscape($_GET['view']) : null;
$action = isset($_GET['case']) ? filenameEscape($_GET['case']) : null;
if (!isset($cust_language)) {
    $cust_language = isset($_GET['lang']) ? filenameEscape($_GET['lang']) : null;
}
require_once "sys/include/init.php";
/*
* The include configs and requirements stuff section - end
*/
$smarty->assign("config", $config);
// to toggle the login / logout button visibility in the menu
$smarty->assign("module", $module);
$smarty->assign("view", $view);
$smarty->assign("siUrl", $siUrl);
//used for template css
$smarty->assign("smarty_embed_path", $smarty_embed_path);
$smarty->assign("include_dir", $include_dir);
$smarty->assign("auth_session", $auth_session);
$smarty->assign("si_version", SI_VERSION);