<?php require_once "../../config.inc.php"; $auth = new auth("CHANNEL_ADMIN"); $page = new Page("Channel Administration"); $filter = new Filter("channels", "CHID"); $filter->addRule($lang->get("name"), "NAME", "NAME"); $filter->type_name = $lang->get("channels", "Channels"); $filter->icon = "li_channel.gif"; $filtermenu = new Filtermenu("", $filter); $filtermenu->tipp = $lang->get("help_channel", "Topic categories defining the contents of articles created by N/X. i.e. News, Persons "); require_once $c["path"] . "modules/channels/menu.inc.php"; if (strtoupper(value("deletion")) == "DELETE" && strtoupper(value("commit")) == strtoupper($lang->get("YES"))) { deleteChannel(value("oid", "NUMERIC")); } if ($page_action == "INSERT") { $oid = 0; } if ($oid == 0) { $addtext = ""; } else { $addtext = ": " . getDBCell("channels", "NAME", "CHID = " . $oid); } $form = new stdEDForm($lang->get("channel", "Channel") . $addtext); $cond = $form->setExPK("channels", "CHID"); // Add a Toolbar for showing the launch button if ($auth->checkAccessToFunction("CHANNEL_LAUNCH")) { $form->buttonbar->add("action", $lang->get("launch")); $form->add(new Hidden("action", "")); if (value("action") == $lang->get("launch")) { launchChannel($oid);
* @apiVersion 1.0.0 * * @apiParam {Number} id Id of Channel to delete * @apiParamExample {json} Request-Example: * { * "id": "42", * } * * @apiPermission Author of the Parent Channel * @apiUse NotPermitted * @apiUse MissingParameter * */ $app->delete('/channel', function () use($app) { include_once 'libs/channel.php'; deleteChannel($app->request->getBody()); }); /** * * @api {PUT} /channel/sorting Sort the Channel * @apiName sortChannel * @apiGroup Channel * @apiVersion 1.0.0 * @apiDescription Sort the order of Units and Subchannels of a Channel. * You put in a whole channel and the Server will iterate over all Subchannels and Units and will set their view_index to the according index in the given array. * * * @apiPermission Author of the Channel * @apiUse NotPermitted * @apiUse MissingParameter *
} if (isOK($response)) { printResult($response, "CONNECTING APPLICATION TO CVS DB FAILED", " Application {$appId} has been connected to the database {$dbName}." . PHP_EOL . " ---- CONNECTING APPLICATION TO CVS DB SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } break; case "deleteApplication": $msg = "Deleting Application ..." . PHP_EOL; echo PHP_EOL . "{$msg}"; $email = getEMail(); $password = getPassword(); $dbName = getDbName(); $appId = getAppId(); if (is_numeric($appId)) { $response = deleteChannel($email, $password, $dbName, $appId); } else { $response = deleteApplication($email, $password, $dbName, $appId); } if (isOK($response)) { printResult($response, "DELETING APPLICATION FROM CVS FAILED", " Application {$appId} has been deleted from the database {$dbName}." . PHP_EOL . " ---- DELETING APPLICATION FROM CVS SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } break; case "addItem": echo "Adding item..." . PHP_EOL; $email = getEMail(); $password = getPassword(); $dbName = getDbName(); $filePath = getItemPath();