Exemple #1
0
			<button id="discord-verify" class="green typcn typcn-chevron-right">Show me the command</button>
		</section>
<?php   } ?>
		<section>
			<h2><?=$sameUser? Users::PROFILE_SECTION_PRIVACY_LEVEL['private']:''?>Unlink account</h2>
			<p>By unlinking your account you revoke this site's access to your account information. This will also log you out on every device where you're currently logged in. The next time you want to log in, you'll have to link your account again. This will not remove any of your <strong>public</strong> data from our site, it's still kept locally.</p>
	        <button id="unlink" class="orange typcn typcn-times">Unlink Account</button>
	    </section>
<?  } ?></div>
<?php
} ?>
</div>

<?php
if ($canEdit){
	$ROLES = array();
	if ($canEdit){
		$_Roles = Permission::ROLES_ASSOC;
		unset($_Roles['guest']);
		unset($_Roles['ban']);
		foreach ($_Roles as $name => $label){
			if (Permission::insufficient($name, $currentUser->role))
				continue;
			$ROLES[$name] = $label;
		}
	}
	echo CoreUtils::exportVars(array(
		'ROLES' => $ROLES,
	));
} ?>
use App\CoreUtils;
/** @var $heading string */
/** @var $Appearance array */
/** @var $Colors array */
/** @var $Map array */
/** @var $AllColors array */
/** @var $ColorGroups array */
?>
<div id="content">
	<h1>Sprite Color Checker</h1>
	<p><a href="/cg/v/<?php 
echo $Appearance['id'];
?>
"><span class="typcn typcn-arrow-back"></span> Back to appearrance page</a></p>

	<section class="checker">
		<div id="svg-cont"></div>
		<div id="input-cont"><h3>JavaScript is required to use the viewer</h3></div>
	</section>
	<section class="color-list">
		<ul id="colors" class="colors"><?php 
foreach ($ColorGroups as $cg) {
    echo ColorGroups::getHTML($cg, $AllColors, WRAP, NO_COLON, OUTPUT_COLOR_NAMES, FORCE_EXTRA_INFO);
}
?>
</ul>
	</section>
</div>
<?php 
echo CoreUtils::exportVars(array('AppearanceID' => $Appearance['id'], 'AppearanceColors' => $Colors, 'SpriteColorList' => $Map['colors']));
Exemple #3
0
					</tr>
				</tbody>
			</table>
			<input type="submit" class="hidden">
		</form>
		<span></span>
		<div class="result">
			<div class="preview"></div>
			<span class="hex" data-color="<?php 
echo $color;
?>
"></span>
			<span class="hexa" data-color="<?php 
echo $color;
?>
"></span>
			<span class="rgba" data-color="<?php 
echo $color;
?>
"></span>
			<span class="opacity" data-color="value"></span>
		</div>
	</div>
	<div class="hidden delta-warn">
		<?php 
echo CoreUtils::notice('warn', "<span class='typcn typcn-warning'></span> The result may not be accurate as the difference between the optimal {$color} and the closest match is too large", true);
?>
	</div>
</div>
<?  echo CoreUtils::exportVars(array('HEX_COLOR_PATTERN' => $HEX_COLOR_REGEX));
Exemple #4
0
    $client = CoreUtils::elasticClient();
    $client->ping();
    ?>
		<pre><code><strong>Indices</strong><br><?php 
    echo $client->cat()->indices(['v' => true]);
    ?>
</code></pre>
		<pre><code><strong>Nodes</strong><br><?php 
    echo $client->cat()->nodes(['v' => true]);
    ?>
</code></pre>
<?php 
} catch (\Elasticsearch\Common\Exceptions\NoNodesAvailableException $e) {
    echo "<pre><code><strong>Server is down.</strong></code></pre>";
}
?>
	</section>
<?  } ?>

	<section class="recent-posts">
		<h2><span class="typcn typcn-bell"></span>Most recent posts</h2>
		<div><?php 
echo Posts::getMostRecentList();
?>
</div>
	</section>
</div>

<?php 
echo CoreUtils::exportVars(array('ROLES_ASSOC' => Permission::ROLES_ASSOC, 'PRINTABLE_ASCII_PATTERN' => PRINTABLE_ASCII_PATTERN));
Exemple #5
0
echo !empty($_GET['q']) ? " value='" . CoreUtils::aposEncode($_GET['q']) . "'" : '';
?>
 title='Search'>
		<button type='submit'  class='blue'>Search</button>
		<button type='button' class='green typcn typcn-flash sanic-button' title="I'm feeling lucky"></button>
		<button type='reset' class='red typcn typcn-times' title='Clear'<?php 
echo empty($_GET['q']) ? ' disabled' : '';
?>
></button>
	</form>
<?  }
	else echo CoreUtils::notice('warn','<span class="typcn typcn-warning"></span> <strong>ElasticSearch server is down!</strong> Please <a class="send-feedback">let us know</a>, and in the meantime, use the <a class="btn darkblue typcn typcn-th-menu" href="/cg'.($EQG?'/eqg':'').'/full">Full List</a> to find appearances faster. Sorry for the inconvenience.',true); ?>
	<?php 
echo $Pagination->HTML . Appearances::getHTML($Ponies) . $Pagination->HTML;
?>
</div>

<?  $export = array(
		'Color' => $Color,
		'color' => $color,
		'EQG' => $EQG,
		'AppearancePage' => false,
	);
	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,
		));
	echo CoreUtils::exportVars($export); ?>
Exemple #6
0
 function testExportVars()
 {
     $result = CoreUtils::exportVars(['a' => 1, 'reg' => new \App\RegExp('^ab?c$', 'gui'), 'b' => true, 's' => 'string']);
     /** @noinspection all */
     self::assertEquals('<script>var a=1,reg=/^ab?c$/gi,b=true,s="string"</script>', $result);
 }
use App\Tags;
/** @var $heading string */
/** @var $Changes array */
?>
<div id="content">
	<h1><?php 
echo $heading;
?>
</h1>
	<p>Displaying <?php 
echo $Pagination->itemsPerPage;
?>
 items/page</p>
	<p class='align-center links'>
		<a class='btn darkblue typcn typcn-arrow-back' href="/cg">Back to <?php 
echo $Color;
?>
 Guide</a>
		<a class='btn darkblue typcn typcn-tags' href="/cg/tags">List of tags</a>
	</p>
	<?php 
echo $Pagination->HTML . CGUtils::getChangesHTML($Changes, WRAP, SHOW_APPEARANCE_NAMES) . $Pagination->HTML;
?>
</div>

<?  echo CoreUtils::exportVars(array(
		'Color' => $Color,
		'color' => $color,
		'TAG_TYPES_ASSOC' => Tags::$TAG_TYPES_ASSOC,
	));
Exemple #8
0
use App\Episodes;
use App\Permission;
?>
<div id="content">
	<h1><?php 
echo empty($Episodes) ? 'No episodes found' : 'Episode list';
?>
</h1>
<?  if (empty($Episodes)){ ?>
	<p>There are no episodes stored in the database</p>
<?  }
	if (Permission::sufficient('staff')) { ?>
	<div class="actions">
		<button id="add-episode" class="green typcn typcn-plus">Add Episode</button>
	</div>
<?      echo CoreUtils::exportVars(array('EP_TITLE_REGEX' => $EP_TITLE_REGEX));
	}
	echo $Pagination;
	if (!empty($Episodes) || (empty($Episodes) && Permission::sufficient('staff'))){ ?>
	<table id="episodes">
		<thead>
			<tr>
				<th>S<span class="mobile-hide">eason</span></th>
				<th>E<span class="mobile-hide">pisode</span></th>
				<th>Title & Air Date</th>
			</tr>
		</thead>
		<tbody><?php 
echo Episodes::getTableTbody($Episodes);
?>
</tbody>
Exemple #9
0
<?php 
switch ($errcause) {
    case "db":
        ?>
	<h1>Database connection error</h1>
	<p>Could not connect to database on <?php 
        echo DB_HOST;
        ?>
</p>
<?php 
        echo CoreUtils::notice('info', '<span class="typcn typcn-info-large"></span> The database of our website cannot be reached. Hopefully this is just a temporary issue and everything will be back to normal soon. Sorry for the inconvenience. <a class="send-feedback">Notify the developer</a>', true);
        echo CoreUtils::notice('warn', '<strong>Probable cause / debug information:</strong><pre><code>' . $e->getMessage() . '</code></pre>', true);
        break;
    case "libmiss":
        ?>
	<h1>Configuration problem</h1>
	<p>A required extension/setting is missng</p>
<?php 
        echo CoreUtils::notice('info', '<span class="typcn typcn-info-large"></span> One of the site\'s core modules have not been installed yet. This usually happens after a software upgrade/reinstall and is just a temporary issue, no data has been lost and everything will be back to normal very soon. Sorry for the inconvenience. <a class="send-feedback">Notify the developer</a>', true);
        echo CoreUtils::notice('warn', '<strong>Probable cause / debug information:</strong><pre><code>' . $e->getMessage() . '</code></pre>', true);
        break;
}
?>
</div>
<?php 
echo CoreUtils::exportVars(array('ServiceUnavailableError' => true));
$customJS = array("/js/min/global.js", "/js/min/moment.js", "/js/min/dialog.js");
foreach ($customJS as $k => $el) {
    $customJS[$k] .= '?' . filemtime(APPATH . CoreUtils::substring($el, 1));
}
require "footer.php";
Exemple #10
0
<?php

use App\CoreUtils;
?>
	</div>

	<footer><?php 
echo CoreUtils::getFooter();
?>
</footer>

<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
<script>if(!window.jQuery)document.write('\x3Cscript src="/js/min/jquery-3.1.0.js">\x3C/script>');</script>
<?php 
echo CoreUtils::exportVars(array('PRINTABLE_ASCII_PATTERN' => PRINTABLE_ASCII_PATTERN, 'DocReady' => array(), 'signedIn' => $signedIn));
if (isset($customJS)) {
    foreach ($customJS as $js) {
        echo "<script src='{$js}'></script>\n";
    }
}
?>
</body>
</html>