當前位置: 首頁>>代碼示例>>PHP>>正文


PHP http::setGet方法代碼示例

本文整理匯總了PHP中http::setGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP http::setGet方法的具體用法?PHP http::setGet怎麽用?PHP http::setGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在http的用法示例。


在下文中一共展示了http::setGet方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: validID

 function validID()
 {
     $engine = EngineAPI::singleton();
     if (!isset($engine->cleanGet['MYSQL']['formID']) || is_empty($engine->cleanGet['MYSQL']['formID']) || !validate::integer($engine->cleanGet['MYSQL']['formID'])) {
         if (objects::validID($engine->cleanGet['MYSQL']['objectID'])) {
             $object = objects::get($engine->cleanGet['MYSQL']['objectID']);
             if ($object === FALSE) {
                 return FALSE;
             }
             http::setGet('formID', $object['formID']);
         } else {
             return FALSE;
         }
     }
     return TRUE;
 }
開發者ID:PseudoAj,項目名稱:mfcs,代碼行數:16,代碼來源:forms.php

示例2: Exception

 }
 //////////
 // Project Tab Stuff
 $selectedProjects = objects::getProjects($engine->cleanGet['MYSQL']['objectID']);
 localVars::add("projectOptions", projects::generateProjectChecklist($selectedProjects));
 // Project Tab Stuff
 //////////
 localvars::add("formName", $form['title']);
 localvars::add("formID", $form['ID']);
 log::insert("Data Entry: Object: View Page", 0, $form['ID']);
 // handle submission
 if (isset($engine->cleanPost['MYSQL']['submitForm'])) {
     if (forms::submit($engine->cleanGet['MYSQL']['formID']) === FALSE) {
         throw new Exception("Error Submitting Form.");
     }
     http::setGet("objectID", localvars::get("newObjectID"));
     log::insert("Data Entry: Object: Successful Submission", localvars::get("newObjectID"), $form['ID']);
 } else {
     if (isset($engine->cleanPost['MYSQL']['updateForm'])) {
         if (forms::submit($engine->cleanGet['MYSQL']['formID'], $engine->cleanGet['MYSQL']['objectID']) === FALSE) {
             throw new Exception("Error Updating Form.");
         }
         log::insert("Data Entry: Object: Successful update", $engine->cleanGet['MYSQL']['objectID'], $form['ID']);
     } else {
         if (isset($engine->cleanPost['MYSQL']['projectForm'])) {
             $engine->cleanPost['MYSQL']['projects'] = isset($engine->cleanPost['MYSQL']['projects']) ? $engine->cleanPost['MYSQL']['projects'] : array();
             // Add All the new ones
             if (objects::addProjects($engine->cleanGet['MYSQL']['objectID'], $engine->cleanPost['MYSQL']['projects']) === FALSE) {
                 throw new Exception("Error adding projects to Object.");
             }
             log::insert("Data Entry: Object: Successful Project Update", $engine->cleanGet['MYSQL']['objectID'], $form['ID']);
開發者ID:PseudoAj,項目名稱:mfcs,代碼行數:31,代碼來源:object.php

示例3: ob_end_clean

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'])) {
        $files = array();
        foreach ($object['data']['digitalFiles']['files']['archive'] as $file) {
開發者ID:PseudoAj,項目名稱:mfcs,代碼行數:31,代碼來源:allfiles.php

示例4: Exception

<?php

include "../header.php";
$permissions = TRUE;
try {
    if (!isset($engine->cleanGet['MYSQL']['objectID']) && isset($engine->cleanPost['MYSQL']['objectID'])) {
        http::setGet("objectID", $engine->cleanPost['MYSQL']['objectID']);
    }
    if (objects::validID() === FALSE) {
        throw new Exception("ObjectID Provided is invalid.");
    }
    if (($object = objects::get($engine->cleanGet['MYSQL']['objectID'])) === FALSE) {
        throw new Exception("Error retrieving Object");
    }
    if (($form = forms::get($object['formID'])) === FALSE) {
        throw new Exception("Error retrieving form.");
    }
    if (mfcsPerms::isAdmin($object['formID']) === FALSE) {
        $permissions = FALSE;
        throw new Exception("Permission Denied to view objects created with this form.");
    }
    if (forms::isMetadataForm($object['formID']) === FALSE) {
        throw new Exception("Object provided (Only Metadata can be moved).");
    }
    // handle submission
    $return = NULL;
    if (isset($engine->cleanPost['MYSQL']['moveMetadata'])) {
    }
    if (($compatibleForms = forms::compatibleForms($form['ID'])) === FALSE) {
        throw new Exception("Error getting compatible forms");
    }
開發者ID:PseudoAj,項目名稱:mfcs,代碼行數:31,代碼來源:move.php


注:本文中的http::setGet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。