Example #1
0
		public function post($field = false) {
			// the only post that matters is the one for this attribute's name space
			$req = ($this->requestArray == false) ? $_POST : $this->requestArray;
			if (is_object($this->attributeKey) && is_array($req['akID'])) {
				$p = $req['akID'][$this->attributeKey->getAttributeKeyID()];
				if ($field) {
					return $p[$field];
				}
				return $p;
			}			
			return parent::post($field);
		}
Example #2
0
 /**
  * 获取并分析$_POST数组某参数值
  */
 public function post($string, $a = 0)
 {
     return Controller::post($string, $a);
 }
 public function post($field = false, $defaultValue = null)
 {
     // the only post that matters is the one for this attribute's name space
     $req = $this->requestArray == false ? $_POST : $this->requestArray;
     if (is_array($req['_bf'])) {
         $identifier = $this->identifier;
         $b = $this->getBlockObject();
         if (is_object($b)) {
             $xc = $b->getBlockCollectionObject();
             if (is_object($xc)) {
                 $identifier .= '_' . $xc->getCollectionID();
             }
         }
         $p = $req['_bf'][$identifier];
         if ($field) {
             return $p[$field];
         }
         return $p;
     }
     return parent::post($field, $defaultValue);
 }
 public function post($field = false, $defaultValue = null)
 {
     // the only post that matters is the one for this attribute's name space
     $req = $this->requestArray == false ? $_POST : $this->requestArray;
     if (is_array($req['_bf'])) {
         $p = $req['_bf'][$this->identifier];
         if ($field) {
             return $p[$field];
         }
         return $p;
     }
     return parent::post($field, $defaultValue);
 }
Example #5
0
} elseif (!empty($_SERVER['PATH_INFO'])) {
    $parts = array_values(array_filter(explode('/', $_SERVER['PATH_INFO'])));
    if (count($parts) >= 1) {
        switch ($parts[0]) {
            case 'about':
                $controller->about();
                break;
            case 'ncrypt':
                $controller->ncrypt_script();
                break;
            case 'p':
                // "safe" urls working with all paste ids
                $controller->show(count($parts) >= 2 ? $parts[1] : '', $password);
                break;
            default:
                // paste ids that are not "special"
                $controller->show($parts[0], $password);
                break;
        }
    } elseif (!empty($_POST)) {
        // new post submission
        $controller->post(POST('data'), POST('syn'), POST('ttl'), POST('p'), POST('cipher', 'AES-256-OFB'));
    } else {
        $controller->index();
    }
} elseif (!empty($_POST)) {
    // new post submission
    $controller->post(POST('data'), POST('syn'), POST('ttl'), POST('p'), POST('cipher', 'AES-256-OFB'));
} else {
    $controller->index();
}