コード例 #1
0
ファイル: list.php プロジェクト: PseudoAj/mfcs
<?php

include "../header.php";
try {
    if (($accordionList = listGenerator::generateAccordionFormList()) === FALSE) {
        throw new Exception("Error generating Form List");
    }
    localvars::add("accordionList", $accordionList);
} catch (Exception $e) {
    errorHandle::errorMsg($e->getMessage());
}
localVars::add("results", displayMessages());
log::insert("Form Creator: View Forms");
$engine->eTemplate("include", "header");
?>

<section>
	<header class="page-header">
		<h1>Select a Form</h1>
	</header>
	<nav id="breadcrumbs">
		<ul class="breadcrumb">
			<li><a href="{local var="siteRoot"}">Home</a></li>
			<li><a href="{local var="siteRoot"}/formCreator/list.php">List Forms</a></li>
		</ul>
	</nav>

	{local var="results"}

	<div class="container-fluid">
		{local var="accordionList"}
コード例 #2
0
ファイル: object.php プロジェクト: PseudoAj/mfcs
    }
    // build the files list for displaying
    if (isset($engine->cleanGet['MYSQL']['objectID'])) {
        if (($filesViewer = files::buildFilesPreview($engine->cleanGet['MYSQL']['objectID'])) === FALSE) {
            throw new Exception("Error building files preview.");
        }
        localvars::add("filesViewer", $filesViewer);
        //////////
        // Children Tab Stuff
        if (($formList = listGenerator::generateFormSelectList($engine->cleanGet['MYSQL']['objectID'])) === FALSE) {
            errorHandle::errorMsg("Error getting Forms Listing");
            throw new Exception('Error');
        } else {
            localvars::add("formList", $formList);
        }
        localVars::add("childrenList", listGenerator::generateChildList($engine->cleanGet['MYSQL']['objectID']));
        // Children Tab Stuff
        //////////
    }
} catch (Exception $e) {
    log::insert("Data Entry: Object: Error", 0, 0, $e->getMessage());
    errorHandle::errorMsg($e->getMessage());
    $error = TRUE;
}
// build the form for displaying
if (forms::validID()) {
    try {
        if (($builtForm = forms::build($engine->cleanGet['MYSQL']['formID'], $engine->cleanGet['MYSQL']['objectID'], $error)) === FALSE) {
            throw new Exception("Error building form.");
        }
        localvars::add("form", $builtForm);
コード例 #3
0
ファイル: selectForm.php プロジェクト: PseudoAj/mfcs
<?php

include "../header.php";
try {
    if (($formList = listGenerator::generateAccordionFormList(TRUE)) === FALSE) {
        throw new Exception("Error getting Forms Listing");
    } else {
        localvars::add("formList", $formList);
    }
} catch (Exception $e) {
    errorHandle::errorMsg($e->getMessage());
}
localVars::add("results", displayMessages());
log::insert("Data Entry: Form Select: View Page");
$engine->eTemplate("include", "header");
?>

<section>
	<header class="page-header">
		<h1>Select a Form</h1>
	</header>

	<nav id="breadcrumbs">
		<ul class="breadcrumb">
			<li><a href="{local var="siteRoot"}">Home</a></li>
			<li><a href="{local var="siteRoot"}/dataEntry/selectForm.php">Select a Form</a></li>
		</ul>
	</nav>

	{local var="results"}
コード例 #4
0
ファイル: list.php プロジェクト: PseudoAj/mfcs
        $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=form&formID=%s">%s</a>', $siteRoot, $form['ID'], $form['title']);
        break;
    case 'project':
        $list = listGenerator::createProjectObjectList($engine->cleanGet['MYSQL']['projectID']);
        $project = projects::get($engine->cleanGet['MYSQL']['projectID']);
        localvars::add('subTitle', ' - ' . $project['projectName']);
        $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=selectProject">Select Project</a>', $siteRoot);
        $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=project&projectID=%s">%s</a>', $siteRoot, $project['ID'], $project['projectName']);
        break;
    case 'all':
        $list = listGenerator::createAllObjectList();
        localvars::add('subTitle', ' - All Objects');
        $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=all">All Objects</a>', $siteRoot);
        break;
    default:
        $list = listGenerator::createInitialSelectList();
        break;
}
localvars::add("list", $list);
// Make breadcrumbs
$crumbs = '';
foreach ($breadCrumbs as $breadCrumb) {
    $crumbs .= "<li>{$breadCrumb}</li>";
}
localvars::add("breadcrumbs", $crumbs);
localVars::add("results", displayMessages());
$engine->eTemplate("include", "header");
?>

<section>
	<header class="page-header">
コード例 #5
0
ファイル: index.php プロジェクト: PseudoAj/mfcs
			});
		</script>');
}
if (is_empty(localVars::get("submitButton"))) {
    localVars::add("submitButton", "Submit");
}
if (is_empty(localVars::get("updateButton"))) {
    localVars::add("updateButton", "Update");
}
if (!isnull($formID)) {
    try {
        // Setup permissions stuff.
        if (($users = users::getUsers()) === FALSE) {
            throw new Exception("Error getting users");
        }
        if (($availableUsersList = listGenerator::availableUsersList($users)) === FALSE) {
            throw new Exception("Error getting users list.");
        }
        localvars::add("availableUsersList", $availableUsersList);
        // Setup Navigation stuff.
        $metadataForms = array();
        $metadataFormsEven = NULL;
        $metadataFormsOdd = NULL;
        $selectedMetadataForms = "";
        if (($metadataForms = forms::getObjectFormMetaForms($formID)) === FALSE) {
            throw new Exception("Error getting linked metadata forms.");
        }
        // Now loop through all the metadata forms building their HTML and putting it in the right place
        foreach ($metadataForms as $i => $form) {
            $targetVar = $i % 2 ? 'metadataFormsOdd' : 'metadataFormsEven';
            ${$targetVar} .= sprintf('<li data-type="metadataForm" data-formid="%s"><a href="#" class="btn btn-block">%s</a></li>', htmlSanitize($form['formID']), htmlSanitize($form['title']));
コード例 #6
0
ファイル: search.php プロジェクト: PseudoAj/mfcs
                $searchPOST = sessionGet('searchPOST');
                if ($searchPOST) {
                    $results = mfcsSearch::search($searchPOST);
                    if ($results === FALSE) {
                        throw new Exception("Error retrieving results");
                    }
                }
            } else {
                log::insert("Data View: Search: Delete post");
                sessionDelete('searchPOST');
            }
        }
    }
}
if (isset($results)) {
    localvars::add("objectTable", listGenerator::createAllObjectList(0, 50, NULL, $results));
}
// build the search interface, we do this regardless of
try {
    $interface = mfcsSearch::buildInterface();
    localvars::add("searchInterface", $interface);
} catch (Exception $e) {
    log::insert("Data View: Search: Error", 0, 0, $e->getMessage());
    errorHandle::errorMsg($e->getMessage());
}
// Make breadcrumbs
$crumbs = '';
foreach ($breadCrumbs as $breadCrumb) {
    $crumbs .= "<li>{$breadCrumb}</li>";
}
localvars::add("breadcrumbs", $crumbs);
コード例 #7
0
ファイル: object.php プロジェクト: PseudoAj/mfcs
    //////////
    //////////
    // Project Tab Stuff
    $selectedProjects = objects::getProjects($engine->cleanGet['MYSQL']['objectID']);
    localVars::add("projectOptions", projects::generateProjectChecklist($selectedProjects));
    // Project Tab Stuff
    //////////
    //////////
    // Children Tab Stuff
    if (($formList = listGenerator::generateFormSelectList($engine->cleanGet['MYSQL']['objectID'])) === FALSE) {
        errorHandle::errorMsg("Error getting Forms Listing");
        throw new Exception('Error');
    } else {
        localvars::add("formList", $formList);
    }
    $childList = listGenerator::generateChildList($engine->cleanGet['MYSQL']['objectID']);
    localVars::add("childrenList", is_empty($childList) ? 'No children available' : $childList);
    // Children Tab Stuff
    //////////
} catch (Exception $e) {
    log::insert("Data View: Object: Error", 0, 0, $e->getMessage());
    errorHandle::errorMsg($e->getMessage());
}
localvars::add("leftnav", navigation::buildProjectNavigation($engine->cleanGet['MYSQL']['formID']));
localVars::add("results", displayMessages());
$engine->eTemplate("include", "header");
?>

<section>
	<header class="page-header">
		<h1>View Object</h1>