Пример #1
0
			<h2 class="admin">Color groups</h2>
			<div class="admin">
				<button class="darkblue typcn typcn-arrow-unsorted reorder-cgs">Re-order groups</button>
				<button class="green typcn typcn-plus create-cg">Create group</button>
			</div>
<?  if ($placehold = Appearances::getPendingPlaceholderFor($Appearance))
		echo $placehold;
	else { ?>
			<ul id="colors" class="colors"><?php
		$CGs = ColorGroups::get($Appearance['id']);
		$AllColors = ColorGroups::getColorsForEach($CGs);
		foreach ($CGs as $cg)
			echo ColorGroups::getHTML($cg, $AllColors, WRAP, NO_COLON, OUTPUT_COLOR_NAMES);
			?></ul>
		</section>
		<?=Appearances::getRelatedHTML(Appearances::getRelated($Appearance['id']))?>
	</div>
<?  } ?>
</div>

<?  $export = array(
		'Color' => $Color,
		'color' => $color,
		'EQG' => $EQG,
		'AppearancePage' => true,
	);
	if (Permission::sufficient('staff'))
		$export = array_merge($export, array(
			'TAG_TYPES_ASSOC' => Tags::$TAG_TYPES_ASSOC,
			'MAX_SIZE' => CoreUtils::getMaxUploadSize(),
			'HEX_COLOR_PATTERN' => $HEX_COLOR_REGEX,
Пример #2
0
     }
     $CGDb->where('source', $Appearance['id'])->delete('appearance_relations');
     if (!empty($appearances)) {
         foreach ($appearances as $id => $_) {
             @$CGDb->insert('appearance_relations', array('source' => $Appearance['id'], 'target' => $id, 'mutual' => isset($mutuals[$id])));
         }
     }
     $CGDb->where('target', $Appearance['id'])->where('mutual', true)->delete('appearance_relations');
     if (!empty($mutuals)) {
         foreach ($MutualIDs as $id) {
             @$CGDb->insert('appearance_relations', array('source' => $id, 'target' => $Appearance['id'], 'mutual' => true));
         }
     }
     $out = [];
     if ($AppearancePage) {
         $out['section'] = Appearances::getRelatedHTML(Appearances::getRelated($Appearance['id']));
     }
     Response::done($out);
     break;
 case "clearrendercache":
     if (!CGUtils::clearRenderedImages($Appearance['id'])) {
         Response::fail('Cache could not be purged');
     }
     Response::success('Cached images have been removed, they will be re-generated on the next request');
     break;
 case "tag":
 case "untag":
     if ($Appearance['id'] === 0) {
         Response::fail("This appearance cannot be tagged");
     }
     switch ($action) {