示例#1
0
            $page->SuccessBox('The mask file <b>' . $sett['maskname'] . '</b> exists and is readable');
            // The mask is checked for few things
            $maskContent = $mask->GetMask($sett['maskname'], false);
            // Get if ANY keyword is found in the mask
            $counts = $mask->GetReplaceKeywordCount($maskContent);
            if (is_array($counts) && count($counts) > 0) {
                $str = '';
                foreach ($counts as $word => $count) {
                    $str .= "\n" . '<br /><tt><b>' . $keywords['open_bracket'] . $word . $keywords['close_bracket'] . '</b></tt> = <b>' . $count . '</b>';
                }
                $page->SuccessBox('The mask file contains the following keywords:' . $str);
            } else {
                $page->InfoBox('This mask file does not contain any keywords to replace.');
            }
            // Check if there is SEPARATOR KEYWORD in the sql file
            $ext = $mask->GetMaskExtension($sett['maskname'], true);
            if ($ext == 'sql') {
                $counts = $mask->GetSqlSeparatorCount($maskContent);
                if ($counts > 0) {
                    $page->SuccessBox('The SQL mask has <b>' . $counts . '</b> occurences of the <i>SQL Query Separator</i>');
                } else {
                    $page->WarningBox('There is no occurence of the <i>SQL Query Separator</i>! If your "Installation SQL Script" contains ' . 'more than one query, <b>the installation will fail!</b>  <br />&nbsp;<br />' . 'PHP does not support multiple queries, unless <tt>mysqli</tt> is used. Because we cannot be certain ' . 'that <tt>mysqli</tt> will be installed, the Installer does not support that extension, but rather ' . 'requires that the <tt>' . $keywords['next_query'] . '</tt> separator is placed in between all queries.');
                }
            }
        } else {
            $page->WarningBox('The mask file <b>' . $sett['maskname'] . '</b> does not exists, make sure filenames are correct!');
        }
    }
}
// Create a new array with the configuration overview as first element
// and copy the rest of the $steps array into the new array
示例#2
0
	/* ===================================================[ SHOWING MASK CONTENTS ]=================================================== */

	// If the name of the mask matches the settings for the selected step
	if ( isset($_GET['showmask']) && (isset($sett['configs']) || (isset($sett['maskname']) && $_GET['showmask'] == $sett['maskname'])))		 
	{
?><!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>Configuration Overview: Mask content</title>
<link rel="stylesheet" type="text/css" href="<?php echo INST_RUNFOLDER ?>css/style.css" />
</head><body>
<div style="clear:both;"><a href="?step=<?php echo $step; ?>">&lt;&lt; Go back</a></div>
<?php

		// SQL masks are rendered differently
		$ext = $mask->GetMaskExtension($_GET['showmask'], true);
		if($ext == 'sql')
		{		
			$queries = $mask->GetSqlMaskParsed($_GET['showmask'], false);
			if(count($queries) > 0)
			{
				$words = $mask->GetMergedKeywords();
				foreach($queries as $query)
				{
					// Replace keywords OUTSIDE the mask class in order to
					// highlight the keywords in the queries with bold
					foreach($words as $key=>$word)
					{
						$keyword = $keywords['open_bracket'].$key.$keywords['close_bracket'];
						$query = str_replace($keyword, '<b>'.$keyword.'</b>', $query);
					}