コード例 #1
0
?>
';
	var warningUndoImage = '<?php 
echo IMG_WARNING_UNDO;
?>
';
	var warningFlipHorizotal = '<?php 
echo IMG_WARING_FLIP_H;
?>
';
	var warningFlipVertical = '<?php 
echo IMG_WARING_FLIP_V;
?>
';
	var numSessionHistory = <?php 
echo $history->getNumRestorable();
?>
;
	var noChangeMadeBeforeSave = '<?php 
echo IMG_WARNING_NO_CHANGE_BEFORE_SAVE;
?>
';
	var warningInvalidNewName = '<?php 
echo IMG_SAVE_AS_ERR_NAME_INVALID;
?>
';
	var wordCloseWindow = '<?php 
echo LBL_ACTION_CLOSE;
?>
';
	var warningNoFolderSelected = '<?php 
コード例 #2
0
     } else {
         $originalImage = $_POST['file_path'];
     }
     include_once CLASS_IMAGE;
     $image = new Image();
     if ($image->loadImage($sessionImage)) {
         $imageInfo = $image->getOriginalImageInfo();
         if (!@copy($sessionImage, $originalImage)) {
             $error = IMG_UNDO_COPY_FAILED;
         } else {
             //remove the session image
             if (@unlink($sessionImage)) {
                 $history->restore();
             }
             //only one left, remove the session original if demo
             if ($history->getNumRestorable() == 0 && CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo)) {
                 @unlink($session->getSessionDir() . $originalSessionImageInfo['info']['name']);
                 $originalImage = $_POST['file_path'];
             }
         }
         $imagePath = $originalImage;
     } else {
         $error = IMG_SAVE_IMG_OPEN_FAILED;
     }
     if (isset($imageInfo)) {
         $info .= ",width:" . $imageInfo['width'] . "\n";
         $info .= ",height:" . $imageInfo['height'] . "\n";
         $info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
         $info .= ",path:'" . backslashToSlash($imagePath) . "'\n";
     }
 }
コード例 #3
0
ファイル: ajax_image_editor.php プロジェクト: hungnv0789/vhtm




<script type="text/javascript">
	var imageHistory = false;
	var currentFolder =  '<?php echo removeTrailingSlash(backslashToSlash(dirname($path))); ?>';
	var warningLostChanges = '<?php echo IMG_WARNING_LOST_CHANAGES; ?>';
	var warningReset = '<?php echo IMG_WARNING_REST; ?>';
	var warningResetEmpty = '<?php echo IMG_WARNING_EMPTY_RESET; ?>';
	var warningEditorClose = '<?php echo IMG_WARING_WIN_CLOSE; ?>';
	var warningUndoImage = '<?php echo IMG_WARNING_UNDO; ?>';
	var warningFlipHorizotal = '<?php echo IMG_WARING_FLIP_H; ?>';
	var warningFlipVertical = '<?php echo IMG_WARING_FLIP_V; ?>';
	var numSessionHistory = <?php echo $history->getNumRestorable(); ?>;
	var noChangeMadeBeforeSave = '<?php echo IMG_WARNING_NO_CHANGE_BEFORE_SAVE; ?>';
	var warningInvalidNewName = '<?php echo IMG_SAVE_AS_ERR_NAME_INVALID; ?>';
	var wordCloseWindow = '<?php echo LBL_ACTION_CLOSE; ?>';
	var warningNoFolderSelected = '<?php echo IMG_SAVE_AS_NOT_FOLDER_SELECTED; ?>';
	var urlGetFolderList = '<?php echo appendQueryString(CONFIG_URL_GET_FOLDER_LIST, makeQueryString(array('path'))); ?>';
	$(document).ready(
		function()
		{
			$('#windowSaveAs').jqm();
			$('#image_mode').val('');
			$('#angle').val(0);
			$(getImageElement()).clone().appendTo("#hiddenImage");
			changeMode();
			initDisabledButtons(true);
			$("#formImageInfo").bind("keypress", function(e) {