本文整理汇总了PHP中ilUtil::stripSlashesArray方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::stripSlashesArray方法的具体用法?PHP ilUtil::stripSlashesArray怎么用?PHP ilUtil::stripSlashesArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::stripSlashesArray方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: copyItems
/**
* Copy items to clipboard
*/
function copyItems()
{
global $ilCtrl, $lng;
$items = ilUtil::stripSlashesArray($_POST["id"]);
if (!is_array($items)) {
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "chapters");
}
$todel = array();
// delete IDs < 0 (needed for non-js editing)
foreach ($items as $k => $item) {
if ($item < 0) {
$todel[] = $k;
}
}
foreach ($todel as $k) {
unset($items[$k]);
}
ilLMObject::clipboardCopy($this->object->getId(), $items);
ilEditClipboard::setAction("copy");
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
$ilCtrl->redirect($this, "chapters");
}
示例2: uploadMultiFeedbackObject
/**
* Upload multi feedback file
*/
function uploadMultiFeedbackObject()
{
$ass_id = (int) $_GET["ass_id"];
// #11983
$form = $this->initMultiFeedbackForm($ass_id);
if ($form->checkInput()) {
try {
$ass = new ilExAssignment($ass_id);
$ass->uploadMultiFeedbackFile(ilUtil::stripSlashesArray($_FILES["mfzip"]));
$this->ctrl->redirect($this, "showMultiFeedbackConfirmationTable");
} catch (ilExerciseException $e) {
ilUtil::sendFailure($e->getMessage(), true);
$this->ctrl->redirect($this, "showMultiFeedback");
}
}
$form->setValuesByPost();
$this->showMultiFeedbackObject($form);
}
示例3: saveAllTitles
/**
* Save all titles of chapters/pages
*/
function saveAllTitles()
{
global $ilCtrl;
ilLMObject::saveTitles($this->content_object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
$ilCtrl->redirect($this, "showHierarchy");
}
示例4: saveItemAssignment
/**
* Save material assignment
*/
public function saveItemAssignment()
{
global $ilCtrl;
$this->checkPermission("write");
include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
$item_group_items = new ilItemGroupItems($this->object->getRefId());
$items = is_array($_POST['items']) ? $_POST['items'] : array();
$items = ilUtil::stripSlashesArray($items);
$item_group_items->setItems($items);
$item_group_items->update();
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$ilCtrl->redirect($this, "listMaterials");
}
示例5: copyItems
/**
* Copy items to clipboard
*/
function copyItems()
{
global $ilCtrl, $lng;
if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
$this->redirectToParent();
}
include_once "./Services/Skill/classes/class.ilSkillTreeNode.php";
$items = ilUtil::stripSlashesArray($_POST["id"]);
$todel = array();
// delete IDs < 0 (needed for non-js editing)
foreach ($items as $k => $item) {
if ($item < 0) {
$todel[] = $k;
}
}
foreach ($todel as $k) {
unset($items[$k]);
}
if (!ilSkillTreeNode::uniqueTypesCheck($items)) {
ilUtil::sendInfo($lng->txt("skmg_insert_please_choose_one_type_only"), true);
$this->redirectToParent();
}
ilSkillTreeNode::clipboardCopy(1, $items);
// @todo: move this to a service since it can be used here, too
include_once "./Modules/LearningModule/classes/class.ilEditClipboard.php";
ilEditClipboard::setAction("copy");
ilUtil::sendInfo($lng->txt("skmg_selected_items_have_been_copied"), true);
$this->redirectToParent();
}
示例6: cutItems
/**
* Copy items to clipboard, then cut them from the current tree
*/
function cutItems($a_return = "showOrganization")
{
global $ilCtrl, $lng;
include_once "./Modules/Scorm2004/classes/class.ilSCORM2004Node.php";
$items = ilUtil::stripSlashesArray($_POST["id"]);
$todel = array();
// delete IDs < 0 (needed for non-js editing)
foreach ($items as $k => $item) {
if ($item < 0) {
$todel[] = $k;
}
}
foreach ($todel as $k) {
unset($items[$k]);
}
if (!ilSCORM2004Node::uniqueTypesCheck($items)) {
ilUtil::sendFailure($lng->txt("sahs_choose_pages_chap_scos_ass_only"), true);
$ilCtrl->redirect($this, $a_return);
}
ilSCORM2004Node::clipboardCut($this->object->getId(), $items);
include_once "./Modules/LearningModule/classes/class.ilEditClipboard.php";
ilEditClipboard::setAction("cut");
ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
$ilCtrl->redirect($this, $a_return);
}
示例7: saveTabs
/**
* Save tabs properties in db and return to page edit screen
*/
function saveTabs()
{
global $ilCtrl, $lng;
if (is_array($_POST["caption"])) {
$captions = ilUtil::stripSlashesArray($_POST["caption"]);
$this->content_obj->saveCaptions($captions);
}
if (is_array($_POST["position"])) {
$positions = ilUtil::stripSlashesArray($_POST["position"]);
$this->content_obj->savePositions($positions);
}
$this->updated = $this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}
示例8: saveSelection
/**
* Save selection per object
*
* @param
* @return
*/
function saveSelection()
{
$sel = ilUtil::stripSlashesArray($_POST["amet_use_rec"]);
include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
ilAdvancedMDRecord::saveObjRecSelection($this->obj_id, $this->sub_type, $sel);
}
示例9: savePopups
/**
* Save popups
*/
function savePopups()
{
global $ilCtrl, $lng;
if (is_array($_POST["title"])) {
$titles = ilUtil::stripSlashesArray($_POST["title"]);
$this->content_obj->savePopUps($titles);
$this->pg_obj->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "listContentPopups");
}
示例10: updateLevelOrder
/**
* Update level order
*/
function updateLevelOrder()
{
global $lng, $ilCtrl;
$order = ilUtil::stripSlashesArray($_POST["order"]);
$this->node_object->updateLevelOrder($order);
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "edit");
}
示例11: saveAccessKeys
/**
* Save access keys
*/
function saveAccessKeys()
{
global $ilCtrl, $lng, $ilAccess;
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
ilAccessKey::writeKeys(ilUtil::stripSlashesArray($_POST["acckey"]));
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
}
$ilCtrl->redirect($this, "editAccessKeys");
}