本文整理汇总了PHP中Documents::updateAbschnitt方法的典型用法代码示例。如果您正苦于以下问题:PHP Documents::updateAbschnitt方法的具体用法?PHP Documents::updateAbschnitt怎么用?PHP Documents::updateAbschnitt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Documents
的用法示例。
在下文中一共展示了Documents::updateAbschnitt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* [__construct description]
* Stellt entsprechend der Anfrage das Dokument dar
*/
public function __construct()
{
$doc = new Documents();
// Neues Dokument erstellen
if (isset($_POST["operation"])) {
if ($_POST["operation"] == "create") {
$current_user = wp_get_current_user();
$doc->createNewDocument($this->saveInputs($_POST["project_name"]), $current_user->display_name, get_current_user_id(), $this->saveInputs($_POST["layout"]));
} else {
if ($_POST["operation"] == "delete") {
$doc->deleteDocument($this->saveInputs($_POST["id"]));
} else {
if ($_POST["operation"] == "selectGroup") {
$group = new Groups();
$group->selectGroup($this->saveInputs($_POST["selectedGroup"]), $this->saveInputs($_POST["document_id"]));
} else {
if ($_POST["operation"] == "addAbschnitt") {
$doc->addAbschnitt(esc_textarea($_POST["content"]), $this->saveInputs($_POST["document_id"]));
} else {
if ($_POST["operation"] == "setContentAbschnitt") {
$doc->updateAbschnitt($this->saveInputs($_POST["document_id"]), $this->saveInputs($_POST["abschnitt_id"]), esc_textarea($_POST["content"]));
} else {
if ($_POST["operation"] == "deleteAbschnitt") {
$doc->deleteAbschnitt($this->saveInputs($_POST["document_id"]), $this->saveInputs($_POST["abschnitt_id"]));
} else {
if ($_POST["operation"] == "selectLayout") {
$doc->selectLayout($this->saveInputs($_POST["document_id"]), $this->saveInputs($_POST["selectedLayout"]), $this->saveInputs($_POST["old_layout"]));
}
}
}
}
}
}
}
}
if (isset($_GET["id"])) {
$document = $doc->getDocument($this->saveInputs($_GET["id"]));
$document->abschnitte = array();
$document->abschnitte = $doc->getAbschnitte($document->id);
$downloadLinks = $doc->getDownloadLinks($document);
$document->downloadZip = $downloadLinks["zip"];
$document->downloadPdf = $downloadLinks["pdf"];
$this->viewDocument($document);
} else {
if (isset($_GET["create"])) {
$this->viewDocumentCreateForm($_GET["create"]);
} else {
$authDocs = $doc->getDocumentsCreatedByUser(get_current_user_id());
$this->viewShortDoc($authDocs);
$this->viewDocumentCreateForm();
}
}
}