Beispiel #1
0
<?php

require_once "../../phplib/util.php";
util_assertModerator(PRIV_EDIT | PRIV_STRUCT);
util_assertNotMirror();
handleLexemActions();
// Lexem parameters
$lexemId = util_getRequestParameter('lexemId');
$lexemForm = util_getRequestParameter('lexemForm');
$lexemNumber = util_getRequestParameter('lexemNumber');
$lexemDescription = util_getRequestParameter('lexemDescription');
$lexemComment = util_getRequestParameter('lexemComment');
$needsAccent = util_getBoolean('needsAccent');
$hyphenations = util_getRequestParameter('hyphenations');
$pronunciations = util_getRequestParameter('pronunciations');
$variantIds = util_getRequestCsv('variantIds');
$variantOfId = util_getRequestParameter('variantOfId');
$structStatus = util_getRequestIntParameter('structStatus');
$jsonMeanings = util_getRequestParameter('jsonMeanings');
// LexemModel parameters (arrays)
$modelType = util_getRequestParameter('modelType');
$modelNumber = util_getRequestParameter('modelNumber');
$restriction = util_getRequestParameter('restriction');
$sourceIds = util_getRequestParameter('lexemSourceIds');
$lmTags = util_getRequestParameter('lmTags');
$isLoc = util_getRequestParameter('isLoc');
// Button parameters
$refreshLexem = util_getRequestParameter('refreshLexem');
$saveLexem = util_getRequestParameter('saveLexem');
$lexem = Lexem::get_by_id($lexemId);
$original = Lexem::get_by_id($lexemId);
Beispiel #2
0
<?php

require_once '../../phplib/util.php';
util_assertModerator(PRIV_VISUAL);
util_assertNotMirror();
RecentLink::createOrUpdate('Etichetare Imagini Definiții');
$fileName = util_getRequestParameter('fileName');
$id = util_getRequestParameter('id');
$lexemId = util_getRequestParameter('lexemId');
$revised = util_getBoolean('revised');
$saveButton = util_getRequestParameter('saveButton');
$tagLexemId = util_getRequestParameter('tagLexemId');
$tagLabel = util_getRequestParameter('tagLabel');
$textXCoord = util_getRequestParameter('textXCoord');
$textYCoord = util_getRequestParameter('textYCoord');
$imgXCoord = util_getRequestParameter('imgXCoord');
$imgYCoord = util_getRequestParameter('imgYCoord');
$addTagButton = util_getRequestParameter('addTagButton');
// Tag the image specified by $fileName. Create a Visual object if one doesn't exist, then redirect to it.
if ($fileName) {
    $v = Visual::get_by_path($fileName);
    if (!$v) {
        $v = Visual::createFromFile($fileName);
    }
    util_redirect("?id={$v->id}");
}
$v = Visual::get_by_id($id);
if ($saveButton) {
    $v->lexemeId = $lexemId;
    $v->revised = $revised;
    $v->save();
<?php

require_once "../../phplib/util.php";
util_assertModerator(PRIV_EDIT);
$id = util_getRequestParameter('id');
$value = util_getBoolean('value');
$def = Definition::get_by_id($id);
$def->structured = $value;
$def->save();