Пример #1
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objLyricsTable = $this->getConfigKey(new S('lyrics_table'));
     self::$objLyricsTableFId = $this->getConfigKey(new S('lyrics_table_field_id'));
     self::$objLyricsTableFSEO = $this->getConfigKey(new S('lyrics_table_field_seo'));
     self::$objLyricsTableFTitle = $this->getConfigKey(new S('lyrics_table_field_title'));
     self::$objLyricsTableFArtist = $this->getConfigKey(new S('lyrics_table_field_artist'));
     self::$objLyricsTableFAlbum = $this->getConfigKey(new S('lyrics_table_field_album'));
     self::$objLyricsTableFLyrics = $this->getConfigKey(new S('lyrics_table_field_lyrics'));
     self::$objLyricsTableFDateAdded = $this->getConfigKey(new S('lyrics_table_field_date_added'));
     self::$objItemsPerPage = new S('10');
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
 }
Пример #2
0
<?php

/**
 * SkeliCZ - Enter new addrese into database
 *
 * @package    SkeliCZ
 * @author     Vitex <*****@*****.**>
 * @copyright  2009-2016 info@vitexsoftware.cz (G)
 */
namespace SkeliCZ;

require_once 'includes/SkeliInit.php';
$oPage->addItem(new PageTop(_('MC Skeli\'s lyrics')));
$oPage->addCss('body { background-image: url("images/skelilbackstudio.png"); background-position: left top;  background-repeat: no-repeat; }');
$lyricser = new Lyrics();
$lyrics = new \Ease\TWB\Row();
$lyrics->addColumn(2);
foreach ($lyricser->getAllFromSQL() as $songtext) {
    $articletext = new \Ease\Html\Div(new \Ease\Html\H4Tag($songtext['name']));
    $articletext->addItem(new \Ease\Html\Div($songtext['text']));
    $lyrics->addColumn(4, $articletext)->addTagClass('smokeback');
}
$oPage->container->addItem($lyrics);
$oPage->addItem(new PageBottom());
$oPage->draw();
Пример #3
0
<?php

/**
 * SkeliCZ - Title page
 *
 * @package    SkeliCZ
 * @author     Vitex <*****@*****.**>
 * @copyright  2009-2016 info@vitexsoftware.cz (G)
 */
namespace SkeliCZ;

require_once 'includes/SkeliInit.php';
$oPage->onlyForAdmin();
$id = $oPage->getRequestValue('id', 'int');
$news = new Lyrics($id);
if ($oPage->isPosted()) {
    $news->takeData($_POST);
    if (!is_null($news->saveToSQL())) {
        $news->addStatusMessage(_('Lyrics was saved'), 'success');
    } else {
        $news->addStatusMessage(_('Lyrics was not saved'), 'warning');
    }
} else {
    $id = $oPage->getRequestValue('delete', 'int');
    if (!is_null($id)) {
        if ($news->deleteFromSQL($id)) {
            $news->addStatusMessage(_('Article was deleted'), 'success');
        } else {
            $news->addStatusMessage(_('Article was not deleted'), 'warning');
        }
    }