} } $defs = Model::factory('Definition')->where_raw("status = 0 {$sourceClause} and binary internalRep like '%{$search}%'")->order_by_asc('id')->limit($MAX_AFFECTED)->find_many(); $searchResults = SearchResult::mapDefinitionArray($defs); foreach ($defs as $def) { $def->internalRep = str_replace($search, $replace, $def->internalRep); $ambiguousMatches = array(); $def->internalRep = AdminStringUtil::internalizeDefinition($def->internalRep, $def->sourceId, $ambiguousMatches); $def->htmlRep = AdminStringUtil::htmlize($def->internalRep, $def->sourceId); // Complete or un-complete the abbreviation review if (!count($ambiguousMatches) && $def->abbrevReview == ABBREV_AMBIGUOUS) { $def->abbrevReview = ABBREV_REVIEW_COMPLETE; } else { if (count($ambiguousMatches) && $def->abbrevReview == ABBREV_REVIEW_COMPLETE) { $def->abbrevReview = ABBREV_AMBIGUOUS; } } if ($realRun) { $def->save(); } } if ($realRun) { util_redirect("index.php"); } smarty_assign('search', $search); smarty_assign('replace', $replace); smarty_assign('sourceId', $sourceId); smarty_assign('searchResults', $searchResults); smarty_assign('allStatuses', util_getAllStatuses()); smarty_assign('recentLinks', RecentLink::loadForUser()); smarty_displayWithoutSkin('admin/bulkReplace.ihtml');
$lexems = Model::factory('Lexem')->table_alias('l')->select('l.*')->join('LexemModel', 'lm.lexemId = l.id', 'lm')->where('lm.modelType', 'T')->where_like('l.reverse', "{$reverseSuffix}%")->order_by_asc('l.formNoAccent')->limit(20)->find_many(); // $lmMatrix[$i][$j] = lexem model (with inflected forms) for lexem $i and model $j $lmMatrix = array(); foreach ($lexems as $l) { $lm = $l->getFirstLexemModel(); $lmArray = array(); foreach ($models as $m) { // Force a reload $lm = LexemModel::get_by_id($lm->id); $lm->modelType = $m->modelType; $lm->modelNumber = $m->number; $lm->generateInflectedFormMap(); $lmArray[] = $lm; } $lmMatrix[] = $lmArray; } // Load the definitions for each lexem $searchResults = array(); foreach ($lexems as $l) { $definitions = Definition::loadByLexemId($l->id); $searchResults[] = SearchResult::mapDefinitionArray($definitions); } SmartyWrap::assign('suffix', $suffix); SmartyWrap::assign('lexems', $lexems); SmartyWrap::assign('models', $models); SmartyWrap::assign('modelTypes', $modelTypes); SmartyWrap::assign('searchResults', $searchResults); SmartyWrap::assign('lmMatrix', $lmMatrix); SmartyWrap::assign('recentLinks', RecentLink::loadForUser()); SmartyWrap::addCss('paradigm'); SmartyWrap::displayAdminPage('admin/bulkLabel.tpl');
<?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_WOTD); util_assertNotMirror(); RecentLink::createOrUpdate('Word of the Day - Imagini'); smarty_assign('sectionTitle', 'Imagini pentru cuvântul zilei'); smarty_displayWithoutSkin('admin/wotdImages.ihtml');
<?php require_once "../../phplib/util.php"; util_assertModerator(PRIV_VISUAL); util_assertNotMirror(); RecentLink::createOrUpdate('Adăugare imagini definiții'); SmartyWrap::assign('sectionTitle', 'Imagini pentru definiții'); SmartyWrap::addCss('elfinder', 'jqueryui'); SmartyWrap::addJs('jquery', 'jqueryui', 'elfinder', 'visual'); SmartyWrap::displayAdminPage('admin/visual.ihtml');
<?php require_once "../../phplib/util.php"; util_assertModerator(PRIV_WOTD); util_assertNotMirror(); RecentLink::createOrUpdate('Imaginea zilei'); SmartyWrap::addCss('elfinder', 'jqueryui'); SmartyWrap::addJs('jquery', 'jqueryui', 'elfinder'); SmartyWrap::displayAdminPage('admin/wotdImages.tpl');
<?php require_once "../../phplib/util.php"; util_assertModerator(PRIV_WOTD); util_assertNotMirror(); RecentLink::createOrUpdate('Cuvântul zilei'); SmartyWrap::assign('downloadYear', date("Y", strtotime("+1 month"))); SmartyWrap::assign('downloadMonth', date("m", strtotime("+1 month"))); SmartyWrap::addCss('jqgrid', 'jqueryui', 'select2'); SmartyWrap::addJs('jquery', 'jqgrid', 'jqueryui', 'wotd', 'select2'); SmartyWrap::displayAdminPage('admin/wotd.tpl');
<?php require_once "../../phplib/util.php"; util_assertModerator(PRIV_WOTD); util_assertNotMirror(); RecentLink::createOrUpdate('Word of the Day'); SmartyWrap::assign('sectionTitle', 'Word of the Day'); SmartyWrap::assign('allStatuses', util_getAllStatuses()); SmartyWrap::assign('downloadYear', date("Y", strtotime("+1 month"))); SmartyWrap::assign('downloadMonth', date("m", strtotime("+1 month"))); SmartyWrap::addCss('jqgrid', 'jqueryui', 'select2'); SmartyWrap::addJs('jquery', 'jqgrid', 'jqueryui', 'wotd', 'select2'); SmartyWrap::displayAdminPage('admin/wotd.ihtml');