Exemple #1
0
include_once "lib/WYApplication.php";
include_once "lib/WYTextField.php";
include_once "lib/WYHiddenField.php";
include_once "lib/WYEditor.php";
define("WY_QV_LOGON", "LOGON");
$bSuccess = false;
$oPageURL = od_nil;
$bDoLogon = $goApp->sFormFieldValue(WY_QK_ACTION) == WY_QV_LOGON;
$oHFPageURL = new WYHiddenField(WY_QK_LOGON_PAGE_URL);
if ($oHFPageURL->sValue()) {
    $oPageURL = new WYURL($oHFPageURL->sValue());
    $oPageURL->dQuery[WY_QK_EDITMODE] = "yes" . mt_rand(1000, 9999);
    unset($oPageURL->dQuery[WY_QK_LOGOUT]);
}
$oTFUsername = new WYTextField("USERNAME");
$oTFPassword = new WYTextField("PASSWORD");
$oTFPassword->makePasswordField();
if ($bDoLogon) {
    $bSuccess = $goApp->bAuthenticate($oTFUsername->sValue(), $oTFPassword->sValue());
    webyep_checkDataFolderIntegrity();
    if (webyep_bHasFilemanager()) {
        session_start();
        $_SESSION[WY_SV_IS_AUTH] = $bSuccess;
    }
}
if (!$bDoLogon) {
    $sOnLoadScript = 'document.forms[0].USERNAME.focus();';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/panels.dwt.php" codeOutsideHTMLIsLocked="false" -->
Exemple #2
0
<?php

// WebYep
// (C) Objective Development Software GmbH
// http://www.obdev.at
$webyep_bDocumentPage = false;
$webyep_sIncludePath = "..";
include_once "{$webyep_sIncludePath}/webyep.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYShortTextElement.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextField.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$bOK = false;
$sResponse = WYTS("ShortTextSaved");
$sHelpFile = "shorttext-element.php";
$oEditor = new WYEditor();
$oTF = new WYTextField("TEXT");
$oTF->setWidth($goApp->bIsiPhone ? 40 : 40);
$oTF->setAttribute("id", "inputTextField");
$oElement = new WYShortTextElement($oEditor->sFieldName, $oEditor->bGlobal);
if ($oEditor->bSave) {
    $oElement->setText($oTF->sValue());
    $oElement->save();
    $bOK = true;
} else {
    $oTF->setValue($oElement->sText());
    $sOnLoadScript = 'document.forms[0].TEXT.focus();';
}
$goApp->outputWarningPanels();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
Exemple #3
0
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYHiddenField.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextField.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$bOK = false;
$sHelpFile = "image-element.php";
$oEditor = new WYEditor();
$oHFDelete = new WYHiddenField("DELETE_IMAGE");
$oHFImageWidth = new WYHiddenField(WY_QK_IMAGE_WIDTH);
$oHFImageHeight = new WYHiddenField(WY_QK_IMAGE_HEIGHT);
$oHFIsThumb = new WYHiddenField(WY_QK_IS_THUMB);
$oHFThumbWidth = new WYHiddenField(WY_QK_THUMB_WIDTH);
$oHFThumbHeight = new WYHiddenField(WY_QK_THUMB_HEIGHT);
$oFU = new WYFileUpload("IMAGE_FILE");
$oTFURL = new WYTextField("LINK_URL");
$oTFURL->setWidth(40);
$oTFAltText = new WYTextField("ALT_TEXT");
$oTFAltText->setWidth(40);
$oElement = new WYImageElement($oEditor->sFieldName, $oEditor->bGlobal, "", "", "", (int) $oHFImageWidth->sValue(), (int) $oHFImageHeight->sValue(), (int) $oHFIsThumb->sValue() == 1 ? true : false, (int) $oHFThumbWidth->sValue(), (int) $oHFThumbHeight->sValue());
$oFP = od_nil;
$sMaxUpload = $goApp->sFormattedByteSizeString($goApp->iMaxUploadBytes());
if ((int) $oHFDelete->sValue() == 1) {
    $oElement->deleteThumbnail();
    $oElement->deleteImage();
    // implicit save
    $sResponse = WYTS("ImageDeleted");
    $bOK = true;
} else {
    if ($oEditor->bSave) {
        if ($oFU->bFileUploaded()) {
            if ($oFU->bUploadOK()) {
                $oFP =& $oFU->oFilePath();