示例#1
0
            }
            $newURL = '';
            $oPage->addItem(new EaseJQueryDialog('NewUrlSuccess', _('Zkratka byla vytvořena'), $encoder->getDataValue('title'), 'ui-icon-circle-check', new \Ease\HtmlATag($encoder->getCode(), 'http://' . LQEncoder::getDomain() . $encoder->getShortCutURL())));
        }
    } else {
        $oUser->addStatusMessage(_('This is not an web address!') . ': ' . $newURL, 'warning');
    }
}
//Hlavička stránek
$oPage->addItem(new PageTop(_('LinkQuick: Your URL shortener')));
$domains = Encoder::getDomainList();
$actualDomain = Encoder::getDomain();
if (!in_array($actualDomain, $domains)) {
    $domains[] = $actualDomain;
}
$domainTabs = new \Ease\TWB\Tabs('DomainTabs');
foreach ($domains as $domain) {
    $nextCode = Encoder::getNextCode($domain);
    $addNewForm = new \Ease\TWB\Form('AddNewURL' . $domain);
    $addNewForm->addInput(new \Ease\Html\InputTextTag('NewURL', $newURL, ['size' => 80, 'style' => 'font-size: 30px; height: 40px; width: 100%;']), _('URL to short'));
    $mailTo = '';
    if ($oUser->getSettingValue('SendMail')) {
        $mailTo = $oUser->getUserEmail();
    }
    //    $AddNewFrame->addItem(new LQLabeledDateTimeSelector('ExpireDate'.  str_replace('/','_',$Domain), $OPage->getRequestValue('ExpireDate'), _('Datum expirace')));
    $addNewForm->addInput(new \Ease\Html\InputTextTag('Notify', $mailTo), _('Send email confirmation to'), $notify);
    $addNewForm->addItem(new \Ease\TWB\SubmitButton(_('OK')));
    $addNewForm->addItem(new \Ease\Html\InputHiddenTag('Domain', $domain));
    $addNewFrame = new \Ease\TWB\Panel(_('New shortcut') . ' ' . $domain, 'success', $addNewForm);
    $domainTabs->addTab($domain . $nextCode, $addNewFrame);
}
示例#2
0
 * @package    SkeliCZ
 * @author     Vitex <*****@*****.**>
 * @copyright  2009-2016 info@vitexsoftware.cz (G)
 */
namespace SkeliCZ;

require_once 'includes/SkeliInit.php';
$oPage->onlyForAdmin();
$gallerist = new Gallery();
if ($oPage->isPosted()) {
    $gallerist->setDataValue($gallerist->nameColumn, $oPage->getRequsetValue('title'));
    if ($gallerist->getDataValue('title')) {
        $imgId = $gallerist->save();
    }
    $uploaddir = 'images/gallery';
    $uploadfile = $uploaddir . basename($_FILES['picture']['name']);
    if (move_uploaded_file($_FILES['picture']['tmp_name'], $uploadfile)) {
        echo "File is valid, and was successfully uploaded.\n";
    }
}
$oPage->addItem(new PageTop(_('Editor')));
$gtabs = new \Ease\TWB\Tabs('Gtabs');
$gtabs->addTab(_('Gallery'));
$newPicForm = new \Ease\TWB\Form('NewPic');
$newPicForm->addInput(new \Ease\Html\InputTextTag('title'), _('Title'));
$newPicForm->addInput(new \Ease\Html\InputFileTag('picture'), _('Picture'));
$newPicForm->addInput(new \Ease\Html\InputTextTag('note'), _('Note'));
$gtabs->addTab(_('New Picture'), new \Ease\TWB\Panel(_('New Picture'), 'success', $newPicForm));
$oPage->container->addItem($gtabs);
$oPage->addItem(new PageBottom());
$oPage->draw();