本文整理汇总了PHP中History::getNumRestorable方法的典型用法代码示例。如果您正苦于以下问题:PHP History::getNumRestorable方法的具体用法?PHP History::getNumRestorable怎么用?PHP History::getNumRestorable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类History
的用法示例。
在下文中一共展示了History::getNumRestorable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
';
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: Image
} 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: removeTrailingSlash
<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) {