本文整理汇总了PHP中CView::post方法的典型用法代码示例。如果您正苦于以下问题:PHP CView::post方法的具体用法?PHP CView::post怎么用?PHP CView::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CView
的用法示例。
在下文中一共展示了CView::post方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* $Id$
*
* @category Modèles
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$owner_guid = CView::post("owner_guid", "str");
CView::checkin();
$owner = CMbObject::loadFromGuid($owner_guid);
if (!$owner || !$owner->_id) {
CAppUI::stepMessage(UI_MSG_WARNING, "Le propriétaire souhaité n'existe pas.");
}
$user_id = "";
$function_id = "";
$group_id = "";
switch ($owner->_class) {
case "CMediusers":
default:
$user_id = $owner->_id;
break;
case "CFunctions":
$function_id = $owner->_id;
break;
case "CGroups":
示例2: explode
<?php
/**
* $Id$
*
* @category Modèles
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$modeles_ids = CView::post("modeles_ids", "str");
$object_class = CView::post("object_class", "str");
$owner = CView::post("owner", "str");
CView::checkin();
$modeles_ids = explode("-", $modeles_ids);
CMbArray::removeValue(array(), $modeles_ids);
if (!count($modeles_ids)) {
CAppUI::stepMessage("Aucun modèle à exporter");
CApp::rip();
}
$doc = new CMbXMLDocument(null);
$root = $doc->createElement("modeles");
$doc->appendChild($root);
$where = array("compte_rendu_id" => CSQLDataSource::prepareIn($modeles_ids));
// Récupération des header_id, footer_id, preface_id et ending_id
$ds = CSQLDataSource::get("std");
$request = new CRequest();
$request->addTable("compte_rendu");