Example #1
0
		function delimage(pid) {
			if(confirm("<?php 
_e('Are you sure you want to delete this screenshot?');
?>
")){
			   window.location.href = "view.php?id=<?php 
echo $request_id;
?>
&action=del&image=" + pid;
			}
		}
	</script>
	<link rel="stylesheet" href="./plugins/kindeditor/themes/default/default.css" />
	<script charset="utf-8" src="./plugins/kindeditor/kindeditor.min.js"></script>
	<script charset="utf-8" src="./plugins/kindeditor/lang/<?php 
echo $kdlang = check_languages(array($locale), true);
?>
.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor = K.editor({
				allowFileManager : true,
				langType : '<?php 
echo $kdlang;
?>
'
			});
			K('#image1').click(function() {
				editor.loadPlugin('image', function() {
					editor.plugin.imageDialog({
						imageUrl : K('#url1').val(),
Example #2
0
")){
				post('view.php?id=<?php 
echo $request_id;
?>
&action=del', {image: pid});
				//window.location.href = "view.php?id=<?php 
echo $request_id;
?>
&action=del&image=" + pid;
			}
		}
	</script>
	<link rel="stylesheet" href="./plugins/kindeditor/themes/default/default.css" />
	<script charset="utf-8" src="./plugins/kindeditor/kindeditor.min.js"></script>
	<script charset="utf-8" src="./plugins/kindeditor/lang/<?php 
echo $kdlang = check_languages(array($locale), 'kind');
?>
.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor = K.editor({
				allowFileManager : true,
				langType : '<?php 
echo $kdlang;
?>
',
				imageSizeLimit: '20MB'
			});
			K('#image1').click(function() {
				editor.loadPlugin('image', function() {
					editor.plugin.imageDialog({
Example #3
0
/**
 * Load Localization System
 * 多语言系统初始化
 *
 * @param string $setlang Pre-set language.
 * @return string Locale text for link.
 */
function localization_load($setlang = null)
{
    global $locale, $localetype;
    $language = '';
    if ($setlang != null) {
        $language = $setlang;
    } elseif (!empty($_GET['language'])) {
        $language = preg_replace('/[^a-zA-Z_]/', '', $_GET['language']);
    } elseif (isset($_SESSION['language'])) {
        $language = preg_replace('/[^a-zA-Z_]/', '', $_SESSION['language']);
    } else {
        $language = get_locale();
    }
    if ($language == 'Detect') {
        $language = get_locale();
    }
    if (!empty($language)) {
        $locale = check_languages(array($language));
        $link_text = 'language=' . $locale;
    } else {
        $link_text = '';
    }
    load_default_textdomain($locale);
    return $link_text;
}