<?php 
recurseInsert('codeSnippets/engineViews.php', 'php');
?>


                    <?php 
recurseInsert('codeSnippets/templateCall.php', 'php');
?>

                </div>

                <h4> Templating EngineAPI </h4>
                <div class="video-container">
                    <iframe src="https://www.youtube.com/embed/04MiAf7-jBY?list=PLTBgNwvH0GyxEgi9_BOOa-38ZSGqoAaaS"  frameborder="0" allowfullscreen></iframe>
                </div>

            </div>
        </div>
    </div>
</section>

<section id="survey" class="survey wrapper">
    <div class="container">
             <?php 
recurseInsert('survey/index.php', 'php');
?>
    </div>
</section>

<?php 
templates::display('footer');
Example #2
0
mfcs::singleton();
// Quick and dirty Checks check
// @TODO this needs to be more formalized in a class to easily include other checks as well
if (!isCLI()) {
    $sql_check = sprintf("SELECT `value` FROM `checks` WHERE `name`='uniqueIDCheck'");
    $sqlResult_check = mfcs::$engine->openDB->query($sql_check);
    if (!$sqlResult_check['result']) {
        errorHandle::newError(__METHOD__ . "() - : " . $sqlResult['error'], errorHandle::DEBUG);
        print "<p>Error checking MFCS sanity. Aborting.</p>";
        exit;
    }
    $row_check = mysql_fetch_array($sqlResult_check['result'], MYSQL_ASSOC);
    if ($row_check['value'] == "0") {
        // notify systems via email
        print "<h1>ERROR!</h1>";
        print "<p>MFCS Failed idno sanity check. Please contact systems Immediately.</p>";
        print "<p>Please jot down the steps you took getting to this point. Be as specific as possible.</p>";
        print "<p>Aborting.</p>";
        exit;
    }
}
// End Checks
$mfcsSearch = new mfcsSearch();
// Load the user's current projects
sessionSet('currentProject', users::loadProjects());
recurseInsert("includes/functions.php", "php");
recurseInsert("includes/validator.php", "php");
$engine->eTemplate("load", "distribution");
localVars::add("siteRoot", mfcs::config("siteRoot"));
localVars::add('pageTitle', mfcs::config("pageTitle"));
localVars::add('pageHeader', mfcs::config("pageHeader"));
    <meta name="HandheldFriendly" content="True">

    <!-- Author, Description, Favicon, and Keywords -->
    <meta name="author" content="{local var="meta_authors"}">
    <meta name="description" content="{local var="meta_description"}">
    <meta name="keywords" content="{local var="meta_keywords"}">

    <!-- Project Specific Head Includes -->
    <?php 
recurseInsert("includes/headerIncludes.php", "php");
?>
</head>

<body>

<header>
    <div class="container">
        <div class="siteTitle col-xs-12 col-sm-4">
            <h1> {local var="appName"} </h1>
            <blockquote>
                Tracking your time, <br> enabling your productivity.
            </blockquote>
        </div>
        <nav class="actions col-xs-12 col-sm-8 null-padding">
            <?php 
recurseInsert("includes/nav.php", "php");
?>
        </nav>
    </div>
</header>
Example #4
0
<?php 
include "../header.php";
// Turn off and kill engine's output buffer
$engine->obCallback = FALSE;
ob_end_clean();
recurseInsert("acl.php", "php");
$permissions = TRUE;
$type = "zip";
try {
    $error = FALSE;
    if (!isset($engine->cleanGet['MYSQL']['objectID'])) {
        throw new Exception("No ObjectID Provided.");
    }
    // If we have an objectID and no formID, lookup the formID from the object and set it back into the GET
    if (isset($engine->cleanGet['MYSQL']['objectID']) and !isset($engine->cleanGet['MYSQL']['formID'])) {
        $object = objects::get($engine->cleanGet['MYSQL']['objectID']);
        http::setGet('formID', $object['formID']);
    }
    // Object ID Validation
    if (objects::validID(TRUE, $engine->cleanGet['MYSQL']['objectID']) === FALSE) {
        throw new Exception("ObjectID Provided is invalid.");
    }
    if (mfcsPerms::isViewer($engine->cleanGet['MYSQL']['formID']) === FALSE) {
        $permissions = FALSE;
        throw new Exception("Permission Denied to view objects created with this form.");
    }
    if (isset($engine->cleanGet['MYSQL']['type']) && $engine->cleanGet['MYSQL']['type'] == "tar") {
        $type = "tar";
    }
    if (is_array($object['data']['digitalFiles'])) {
<?php

// path to my engineAPI install
require_once '/home/timeTracker/phpincludes/engine/engineAPI/4.0/engine.php';
$engine = EngineAPI::singleton();
// Setup Error Rorting
errorHandle::errorReporting(errorHandle::E_ALL);
// Setup Database Information for Vagrant
$databaseOptions = array('username' => 'username', 'password' => 'password', 'dbName' => 'test');
$db = db::create('mysql', $databaseOptions, 'appDB');
// Set localVars and engineVars variables
$localvars = localvars::getInstance();
$enginevars = enginevars::getInstance();
if (EngineAPI::VERSION >= "4.0") {
    $localvars = localvars::getInstance();
    $localvarsFunction = array($localvars, 'set');
} else {
    $localvarsFunction = array("localvars", "add");
}
// include base variables
recurseInsert("includes/vars.php", "php");
// load a template to use
templates::load('timeTemplate');
</div>
<footer class="footer">
    <div class="container">
        <p> Copyright <?php 
print Date('Y');
?>
 - David J. Davis  - MFA Thesis Project </p>
    </div>
</footer>

<!-- Template wide -->
<?php 
recurseInsert("includes/footerIncludes.php", "php");
?>
<!-- Page specific -->
<?php 
recurseInsert("footerIncludes.php", "php");
?>
</body>
</html>
<?php

require_once "../includes/engine.php";
templates::display('header');
?>
<section class="wrapper">
    <div class="container">
        <?php 
recurseInsert('includes/nav.php', 'php');
?>
    </div>
</section>

<?php 
templates::display('footer');
?>


<?php

// path to my engineAPI install
require_once '/home/www/phpincludes/engine/engineAPI/4.0/engine.php';
$engine = EngineAPI::singleton();
// Setup Error Rorting
errorHandle::errorReporting(errorHandle::E_ALL);
// Setup Database Information for Vagrant
$databaseOptions = array('username' => 'username', 'password' => 'password', 'dbName' => 'learningApp');
$db = db::create('mysql', $databaseOptions, 'appDB');
// Set localVars and engineVars variables
$localvars = localvars::getInstance();
$enginevars = enginevars::getInstance();
if (EngineAPI::VERSION >= "4.0") {
    $localvars = localvars::getInstance();
    $localvarsFunction = array($localvars, 'set');
} else {
    $localvarsFunction = array("localvars", "add");
}
// include base variables
recurseInsert("includes/vars.php", "php");
recurseInsert("includes/classes/index.php", "php");
recurseInsert("includes/functions/index.php", "php");
// load a template to use
templates::load('default');
	</style>
	<link rel="stylesheet" type="text/css" href="/javascript/distribution/bootstrap/css/bootstrap-responsive.min.css">
	<script type="text/javascript" src="/javascript/distribution/jquery-1.9.1.min.js"></script>
	<?php 
recurseInsert("headerIncludes.php", "php");
?>
</head>

<body>

	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container-fluid">
				<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="brand" href="{local var="siteRoot"}">{local var="pageHeader"}</a>
				<div class="nav-collapse collapse">
					<?php 
recurseInsert("topnav.php", "php");
?>
				</div>
			</div>
		</div>
	</div>

	<div class="container-fluid">
		<div class="row-fluid">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="HandheldFriendly" content="True">

    <!-- Author, Description, Favicon, and Keywords -->
    <meta name="author" content="{local var="meta_authors"}">
    <meta name="description" content="{local var="meta_description"}">
    <meta name="keywords" content="{local var="meta_keywords"}">

    <!-- Project Specific Head Includes -->
    <?php 
recurseInsert("includes/headerIncludes.php", "php");
?>
    <!-- Page Specific -->
    <?php 
recurseInsert("headerIncludes.php", "php");
?>
</head>

<body>

<header>
    <div class="container">
        <div class="siteTitle col-xs-12 col-sm-6">
            <h1> {local var="appName"} </h1>
            <p>
                Teaching designers to program through the use of frameworks.
            </p>
        </div>

        <div class="siteTitle col-xs-12 col-sm-6 text-right">
Example #11
0
<?php

require "../engineInclude.php";
require "../header.php";
define('UPLOAD_PATH', files::getBaseUploadPath());
define('PERMISSONS', 0777);
// Include the uploader class
recurseInsert("includes/class.fineUploader.php", "php");
$uploader = new qqFileUploader();
// Specify the list of valid extensions, ex. array("jpeg", "xml", "bmp")
$uploader->allowedExtensions = array();
// Specify the input name set in the javascript.
$uploader->inputName = 'qqfile';
// Preserve the file's extention for Mime-Type stuff
$filename = $uploader->getName();
$fileExt = "." . pathinfo($filename, PATHINFO_EXTENSION);
// To save the upload with a specified name, set the second parameter.
$uploadPath = UPLOAD_PATH . DIRECTORY_SEPARATOR . $engine->cleanPost['MYSQL']['uploadID'];
// Make sure the upload temp dir exits
if (!is_dir($uploadPath)) {
    mkdir($uploadPath, PERMISSONS, TRUE);
} else {
    if (!$engine->cleanPost['MYSQL']['multiple']) {
        $files = glob($uploadPath . DIRECTORY_SEPARATOR . '*');
        // get all existing file names
        foreach ($files as $file) {
            if (is_file($file)) {
                unlink($file);
            }
        }
    }
Example #12
0
<?php

// path to my engineAPI install
require_once '/home/www/phpincludes/engine/engineAPI/4.0/engine.php';
$engine = EngineAPI::singleton();
// Setup Error Rorting
errorHandle::errorReporting(errorHandle::E_ALL);
// Setup Database Information for Vagrant
$databaseOptions = array('username' => 'username', 'password' => 'password', 'dbName' => 'learningApp');
$db = db::create('mysql', $databaseOptions, 'appDB');
// Set localVars and engineVars variables
$localvars = localvars::getInstance();
$enginevars = enginevars::getInstance();
if (EngineAPI::VERSION >= "4.0") {
    $localvars = localvars::getInstance();
    $localvarsFunction = array($localvars, 'set');
} else {
    $localvarsFunction = array("localvars", "add");
}
// include base variables
recurseInsert("includes/vars.php", "php");
// require classes
recurseInsert("includes/functions/index.php", "php");
recurseInsert("includes/classes/index.php", "php");
// check auth for page views
recurseInsert("includes/checkAuthorization.php", "php");
// load a template to use
templates::load('default');