コード例 #1
0
ファイル: myFinalization.php プロジェクト: rodionbykov/zCMS
<?php

// saving objects to session to pick up next time
$_SESSION['oUser'] = $oUser;
// saving global 'sticky' attributes values to session
setStickyAttributes($ogFuseaction->getName(), $ogFuseaction->getStickyAttributes());
// saving 'sticky' attributes values to session
setStickyAttributes($oFuseaction->getName(), $oFuseaction->getStickyAttributes());
// assigning variables before display
_assign_by_ref("application", $application);
_assign_by_ref("fusebox", $fusebox);
_assign_by_ref("attributes", $attributes);
// relocating if exit fuseaction exists and no error or warning to show... messages appended to XFA URL
if (_gotxfa() && !_gotErrors() && !_gotWarnings()) {
    // appending messages to URL to allow processing messages on 'landing' page
    $xfa = _getxfa();
    // saving XFAs to session to pick up next time
    $_SESSION['globalXFA'] = $XFA;
    if (_gotMessages()) {
        $tmparrMsgs = _getMessages();
        $tmparrMsgs = array_keys($tmparrMsgs);
        $xfa .= "&messages=" . join(",", $tmparrMsgs);
    }
    // moving to exit
    Location($xfa, 0);
    // 0 means no PHPSESSID
} else {
    // saving XFAs to session to pick up next time
    $_SESSION['globalXFA'] = $XFA;
}
コード例 #2
0
ファイル: actStoreImage.php プロジェクト: rodionbykov/zCMS
            $strDescription = html_entity_decode($attributes[$tmpFormFieldName], ENT_COMPAT, $l->getEncoding());
            if (!$ogGalleryManager->setImageContent($attributes['gallery'], $attributes['image'], $strDescription, $l->getID())) {
                _warning("WDescriptionNotStored", "Something happened while storing description");
            }
        }
    }
    $ogGalleryManager->setImageUpdatedDate($attributes['gallery'], $attributes['image']);
    $ogGalleryManager->setImageEditorID($attributes['gallery'], $attributes['image'], $l->getID(), $oUser->getID());
}
/*
 * delete old image was updated and delete new image 
 * if we have errors or warnings 
 */
if (isset($_FILES['imagefile'])) {
    if (!_gotErrors() && !_gotWarnings()) {
        if (isset($oldImageName)) {
            @unlink($galleryPath . $oldImageName);
            @unlink($thumbsPath . $oldImageName);
        }
    } else {
        if (!empty($oImage)) {
            $oImageManager->deleteFile($oImage);
        }
        if (!empty($oThumbImage)) {
            $oImageManager->deleteFile($oThumbImage);
        }
    }
}
if (!_gotErrors() && !_gotWarnings()) {
    _message("MGalleryImageStored", "Gallery image stored");
}
コード例 #3
0
<?php

$formvars = $attributes;
if (isset($attributes['id']) && !_gotWarnings() && !_gotErrors()) {
    if ($arrItem = $oSitemap->getItemByID($attributes['id'])) {
        $formvars = $arrItem;
    } else {
        _warning("WSitemapItemNotFound", "Sitemap Item not found, probably deleted");
    }
}
if (empty($formvars['url'])) {
    $formvars['url'] = 'http://';
}
if (!isset($formvars['priority']) || strlen($formvars['priority']) == 0) {
    $formvars['priority'] = 0.5;
}
_assign("formvars", $formvars);
_display("admin/dspSitemapItemForm.tpl");