Пример #1
0
             $note = "";
             break 2;
         } else {
             $note = $arrayNote[0];
             $filename = $filePath . $note . ".txt";
         }
     }
     break;
 case 'a':
     if ($bLogged && $value != "") {
         add($filename, $value);
     }
     break;
 case 'd':
     if ($bLogged && $value != "") {
         $page_content .= deleteLine($filename, $value);
     }
     break;
 case 'o':
     if ($bLogged && $value != "") {
         $position = $value;
         if ($contentInsert) {
             $page_content .= insertLine($filename, $position, $contentInsert);
         }
     }
     break;
 case 'i':
     if ($bLogged && $value != "") {
         $contentInsert = $value;
         if ($position) {
             $page_content .= insertLine($filename, $position, $contentInsert);
Пример #2
0
$success = false;
initializeList();
if (isset($_SESSION['listId']) && (bool) $_SESSION['listId']) {
    if (isset($_SESSION['listRoleId']) && $_SESSION['listRoleId'] > 0) {
        if ($_SESSION['listRoleId'] > 1) {
            //List roles edit or greater.
            if (MODE == 'addComment') {
                addComment();
            } elseif (MODE == 'addLine') {
                addLine();
            } elseif (MODE == 'createNewCharacter') {
                createNewCharacter();
            } elseif (MODE == 'buildCharactersList') {
                buildCharactersList();
            } elseif (MODE == 'deleteLine') {
                deleteLine();
            } elseif (MODE == 'deleteCharacter') {
                deleteCharacter();
            } elseif (MODE == 'deleteComment') {
                deleteComment();
            } elseif (MODE == 'editCharacterPart1') {
                editCharacterPart1();
            } elseif (MODE == 'editCharacterPart2') {
                editCharacterPart2();
            } elseif (MODE == 'editLinePart1') {
                editLinePart1();
            } elseif (MODE == 'editLinePart2') {
                editLinePart2();
            } elseif (MODE == 'markCompleted') {
                markCompleted();
            } elseif (MODE == 'markUncompleted') {