Exemplo n.º 1
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $containers = array();
     $containerClassFiles = scandir(\base_config::$baseDir . '/inc/dashcontainers/');
     foreach ($containerClassFiles as $containerClassFile) {
         if (strpos($containerClassFile, '.php') === false) {
             continue;
         }
         $containerClassFile = str_replace('.php', '', $containerClassFile);
         $containerObject = new $containerClassFile($this);
         if (is_a($containerObject, '\\interfaces\\dashcontainer')) {
             $containerPosition = $containerObject->getPosition();
             if (isset($containers[$containerPosition])) {
                 $containerPosition++;
             }
             $containers[$containerPosition] = new \model\dashboard_container($containerObject->getBoxName(), $containerObject->getBoxHeadline(), $containerObject->getBoxContent(), $containerObject->getSize(), $containerObject->getHeight());
         } else {
             $message = \language::replaceLanguageConstant(\language::returnLanguageConstant('DASH_CONTAINER_INSTANCE'), array('{{dashcontainer}}' => $containerClassFile));
             \messages::registerError($message);
         }
     }
     if (count($containers) >= 1) {
         ksort($containers);
     }
     $view = new \model\view_acp('dashboard');
     $view->assign('statsContainers', $containers);
     $view->render();
 }
Exemplo n.º 2
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     if (!is_null($this->getRequestVar('submupload'))) {
         $newFile = new \model\file();
         $newFile->uploadFile(\base_config::$bannerDir);
     }
     if (!is_null($this->getRequestVar('fileDelList'))) {
         $deleted = false;
         $files = $this->getRequestVar('fileDelList');
         foreach ($files as $fileName) {
             $file = new \model\file($fileName, \base_config::$bannerDir);
             if ($file->delete()) {
                 $deleted = true;
             }
         }
         if ($deleted) {
             \messages::registerMessage(\language::returnLanguageConstant('DELETE_SUCCESS_FILES'));
         }
     }
     $fileList = new \model\file_list(\base_config::$bannerDir);
     $view = new \model\view_acp('banner_list');
     $view->assign('fileList', $fileList->getFileList());
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->render();
 }
Exemplo n.º 3
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     if (!is_null($this->getRequestVar('affiliateDelList'))) {
         $affiliateIds = $this->getRequestVar('affiliateDelList');
         foreach ($affiliateIds as $affiliateId) {
             $affiliate = new \model\affiliate($this->getDbconnection(), $this->filterRequest($affiliateId, array(1, 4, 7)));
             $affiliate->delete();
         }
         $this->redirect('affiliate/list', array('affiliatedeleted=yes'));
     }
     $affiliateList = new \model\affiliate_list($this->getDbconnection());
     $affiliateList->setGroupByCategory(true);
     if (!is_null($this->getRequestVar('affiliateadded'))) {
         \messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_ADDAFFILIATE'));
     }
     if (!is_null($this->getRequestVar('affiliateedited'))) {
         \messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_EDITAFFILIATE'));
     }
     if (!is_null($this->getRequestVar('affiliatedeleted'))) {
         \messages::registerMessage(\language::returnLanguageConstant('DELETE_SUCCESS_AFFILIATES'));
     }
     $view = new \model\view_acp('affiliate_list');
     $view->assign('theList', $affiliateList->getAffiliates());
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->render();
 }
Exemplo n.º 4
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $category = new \model\category($this->getDbconnection());
     if (!is_null($this->getRequestVar('submupload'))) {
         $newFile = new \model\file();
         $icon = $newFile->uploadFile();
         $category->setIconPath($icon);
     }
     if (!is_null($this->getRequestVar('category'))) {
         $data = $this->getRequestVar('category');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $category->setName($data['name']);
         $category->setIconPath($data['iconPath']);
         $category->setIsPrivate($data['isPrivate']);
         if ($category->save()) {
             $this->redirect('category/list', array('categoryadded=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_CATEGORY'));
         }
     } else {
         $category->setIsPrivate(0);
     }
     $view = new \model\view_acp('category_editor');
     $view->assign('category', $category);
     $view->assign('editormode', 0);
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_CATEGORIES_ADD'));
     $view->render();
 }
Exemplo n.º 5
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $categoryId = $this->getRequestVar('categoryid', array(1, 4, 7));
     if (is_null($categoryId)) {
         $this->redirect('category/list');
     }
     $category = new \model\category($this->getDbconnection(), $categoryId);
     if (!is_null($this->getRequestVar('category'))) {
         $data = $this->getRequestVar('category');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $category->setName($data['name']);
         $category->setIconPath($data['iconPath']);
         $category->setIsPrivate($data['isPrivate']);
         if ($category->update()) {
             $this->redirect('category/list', array('categoryedited=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_CATEGORY'));
         }
     }
     $view = new \model\view_acp('category_editor');
     $view->assign('category', $category);
     $view->assign('editormode', 1);
     $view->assign('systemmode', $this->getSysconfig()->getSystemMode());
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_CATEGORIES_EDIT'));
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->render();
 }
Exemplo n.º 6
0
 public function runUpdate($fileList = array())
 {
     $view = new \model\view_installer('updater');
     $view->assign('version', $this->sysconfig->getSysVersion());
     include \base_config::$baseDir . '/version.php';
     $this->updateConfigKey('sysVersion', $afltrVersion);
     if (file_exists(\base_config::$updateCache)) {
         @unlink(\base_config::$updateCache);
     }
     $fileDeleteList = array('/inc/model/model_base.php', '/inc/model/dashcontainerbox.php', '/inc/lib/jquery/jquery-1.10.2.min.js');
     foreach ($fileDeleteList as $fileDelete) {
         if (file_exists(\base_config::$baseDir . $fileDelete)) {
             @unlink(\base_config::$baseDir . $fileDelete);
         }
     }
     $file = new \model\file();
     if (is_dir(base_config::$baseDir . '/inc/lib/lightbox')) {
         $file->deleteRecursive(base_config::$baseDir . '/inc/lib/lightbox');
     }
     if (is_dir(base_config::$baseDir . '/inc/lib/jquery_ui')) {
         $file->deleteRecursive(base_config::$baseDir . '/inc/lib/jquery_ui');
     }
     if (!file_exists(base_config::$uploadDir . '/banners')) {
         mkdir(base_config::$uploadDir . '/banners');
     }
     $this->createConfigKey('timeZone', 'Europe/Berlin');
     $newVersion = $this->dbconnection->select("config", "config_value", "config_key LIKE 'sysVersion'");
     \messages::registerMessage(\language::returnLanguageConstant('UPDATE_SUCCESS'), true);
     $view->assign('newVersion', $newVersion[0]['config_value']);
     $view->assign('fileList', $fileList);
     $view->render();
 }
Exemplo n.º 7
0
 public function process()
 {
     $affiliate = new \model\affiliate($this->getDbconnection());
     if (!is_null($this->getRequestVar('submsave')) && !is_null($this->getRequestVar('antiSpamAnswer'))) {
         if ($this->getRequestVar('antiSpamAnswer') === $this->getSysconfig()->getAntispamAnswer()) {
             $data = $this->getRequestVar('affiliate');
             foreach ($data as $key => $value) {
                 $data[$key] = $this->filterRequest($value, array(1, 4, 7));
             }
             $affiliate->setPageName($data['pageName']);
             $affiliate->setPageUrl($data['pageUrl']);
             $affiliate->setPageAdminName($data['pageAdminName']);
             $affiliate->setPageAdminEmail($data['pageAdminEmail']);
             $affiliate->setPageButton($data['pageButton']);
             $affiliate->setAffiliateCategory($data['affiliateCategory']);
             $affiliate->setAffiliateAddedTime(time());
             $affiliate->setAffiliateEditedTime(0);
             $affiliate->setAffiliateIsMarked(0);
             $affiliate->setAffiliateIsAccpted(0);
             if ($affiliate->save()) {
                 \messages::registerNotice(\language::returnLanguageConstant('APPLY_OK'));
                 $catgory = new \model\category($this->dbconnection, $affiliate->getAffiliateCategory());
                 $mailData = array('mailTo' => $this->getSysconfig()->getAdminMail(), 'mailSubject' => \language::replaceLanguageConstant(\language::returnLanguageConstant('APPLY_MAIL_SUBJECT'), array('{{affiliateKategory}}' => $catgory->getName())), 'mailText' => \language::replaceLanguageConstant(\language::returnLanguageConstant('APPLY_MAIL_TEXT'), array('{{name}}' => $affiliate->getPageAdminName(), '{{page}}' => $affiliate->getPageUrl(), '{{affiliateKategory}}' => $catgory->getName(), '{{acpLink}}' => \base_config::$rootPath)), 'mailFrom' => $affiliate->getPageAdminEmail());
                 \messages::sendEMail($mailData);
             } else {
                 \messages::registerError(\language::returnLanguageConstant('APPLY_FAILED'));
             }
             $affiliate = new \model\affiliate($this->getDbconnection());
         } else {
             \messages::registerError(\language::returnLanguageConstant('APPLY_FAILED_SPAM'));
         }
     }
     $categoryList = new \model\category_list($this->getDbconnection(), false);
     $categories = array();
     foreach ($categoryList->getCategories() as $category) {
         $categories[$category->getName()] = $category->getId();
     }
     $view = new \model\view_public('apply_form');
     $view->assign('affiliate', $affiliate);
     $view->assign('categories', $categories);
     $view->assign('antiSpamQuestion', $this->getSysconfig()->getAntispamQuestion());
     $view->assign('isNotUtf8', $this->isNotUtf8);
     $view->assign('systemVersion', $this->getSysconfig()->getSysVersion());
     $view->setReturnRender($this->returnRender);
     if ($this->returnRender) {
         $data = $view->render();
         return $data;
     }
     $view->render();
 }
Exemplo n.º 8
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $file = new \model\file();
     if (!unlink(\base_config::$updateCache)) {
         \messages::logSystem('Unable to clear cache!');
         \messages::registerError(\language::returnLanguageConstant('CACHE_CLEARED_FAILED'));
     } else {
         \messages::registerMessage(\language::returnLanguageConstant('CACHE_CLEARED_OK'));
     }
     \messages::showMessages();
     die;
 }
Exemplo n.º 9
0
 function process()
 {
     if (!is_null($this->getRequestVar('nologin'))) {
         \messages::registerError(\language::returnLanguageConstant('NO_LOGIN'));
     }
     $sessionCookieValue = $this->getSessionCookieValue();
     if (!is_null($sessionCookieValue)) {
         $session = new \model\session($this->getDbconnection(), $sessionCookieValue);
         if ($session->exists()) {
             $session->setLogout(time());
             $session->update();
             setcookie('afltrsid', '', 0, '/', $_SERVER["SERVER_NAME"], false, true);
             header('Location: index.php');
         }
     }
 }
Exemplo n.º 10
0
 public function process()
 {
     if (!is_null($this->getRequestVar('nologin'))) {
         \messages::registerError(\language::returnLanguageConstant('NO_LOGIN'));
     }
     if (!is_null($this->getRequestVar('nopassreset'))) {
         \messages::registerError(\language::returnLanguageConstant('LOGIN_PASSWORD_RESET_FAILED'));
     }
     if (!is_null($this->getRequestVar('resetpass'))) {
         $newPass = uniqid();
         $mailData = array('mailTo' => $this->getSysconfig()->getAdminMail(), 'mailSubject' => \language::returnLanguageConstant('LOGIN_PASSWORD_RESET'), 'mailText' => $newPass, 'mailFrom' => 'affiliat_r_no_reply@' . $_SERVER['HTTP_HOST']);
         if (\messages::sendEMail($mailData)) {
             $this->getSysconfig()->setLoginPasswort($newPass);
             $this->getSysconfig()->update();
             $this->redirect();
         } else {
             $this->redirect('', array('nopassreset'));
         }
     }
     $sessionCookieValue = $this->getSessionCookieValue();
     if (!is_null($sessionCookieValue)) {
         $session = new \model\session($this->getDbconnection(), $sessionCookieValue);
         if ($session->exists()) {
             $this->redirect('system/dash');
         }
     }
     if (!is_null($this->getRequestVar('passwd', array(1, 4, 7)))) {
         $passwort = \tools::createPasswordHash($this->getRequestVar('passwd'), $this->getSysconfig()->getLoginPasswortSalt());
         if ($passwort == $this->getSysconfig()->getLoginPasswort()) {
             $ip = $_SERVER["REMOTE_ADDR"];
             $sessionId = sha1(uniqid($ip, true));
             $expire = time() + $this->getSysconfig()->getSessionLength();
             $session = new \model\session($this->getDbconnection());
             $session->setLogin(time());
             $session->setLogout(0);
             $session->setSessionId($sessionId);
             $session->setIp($ip);
             $session->save();
             setcookie('afltrsid', $sessionId, $expire, '/', $_SERVER["SERVER_NAME"], false, true);
             $this->redirect('system/dash');
         }
         \messages::registerError(\language::returnLanguageConstant('WRONG_PASSWORD'));
     }
     $view = new \model\view_acp('login');
     $view->assign('defaultPW', '');
     $view->render();
 }
Exemplo n.º 11
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $affiliate = new \model\affiliate($this->getDbconnection());
     if (!is_null($this->getRequestVar('submupload'))) {
         $newFile = new \model\file();
         $pageButton = $newFile->uploadFile();
         $affiliate->setPageButton($pageButton);
     }
     if (!is_null($this->getRequestVar('affiliate'))) {
         $data = $this->getRequestVar('affiliate');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $affiliate->setPageName($data['pageName']);
         $affiliate->setPageUrl($data['pageUrl']);
         $affiliate->setPageAdminName($data['pageAdminName']);
         $affiliate->setPageAdminEmail($data['pageAdminEmail']);
         $affiliate->setPageButton($data['pageButton']);
         $affiliate->setAffiliateCategory($data['affiliateCategory']);
         $affiliate->setAffiliateAddedTime(time());
         $affiliate->setAffiliateEditedTime(0);
         $affiliate->setAffiliateIsMarked(0);
         $affiliate->setAffiliateIsAccpted($data['affiliateIsAccpted']);
         if ($affiliate->save()) {
             $this->redirect('affiliate/list', array('affiliateadded=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_AFFILIATE'));
         }
     } else {
         $affiliate->setAffiliateIsAccpted(0);
     }
     $categoryList = new \model\category_list($this->getDbconnection());
     $categories = array();
     foreach ($categoryList->getCategories() as $category) {
         $categories[$category->getName() . ' (' . \language::returnLanguageConstant('ID') . ': ' . $category->getId() . ')'] = $category->getId();
     }
     $view = new \model\view_acp('affiliate_editor');
     $view->assign('affiliate', $affiliate);
     $view->assign('categories', $categories);
     $view->assign('editormode', 0);
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_AFFILIATE_ADD'));
     $view->assign('fileList', new \model\file_list());
     $view->render();
 }
Exemplo n.º 12
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $affiliateId = $this->getRequestVar('affiliateid', array(1, 4, 7));
     if (is_null($affiliateId)) {
         $this->redirect('affiliate/list');
     }
     $affiliate = new \model\affiliate($this->getDbconnection(), $affiliateId);
     if (!is_null($this->getRequestVar('affiliate'))) {
         $data = $this->getRequestVar('affiliate');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $affiliate->setPageName($data['pageName']);
         $affiliate->setPageUrl($data['pageUrl']);
         $affiliate->setPageAdminName($data['pageAdminName']);
         $affiliate->setPageAdminEmail($data['pageAdminEmail']);
         $affiliate->setPageButton($data['pageButton']);
         $affiliate->setAffiliateCategory($data['affiliateCategory']);
         $affiliate->setAffiliateEditedTime(time());
         $affiliate->setAffiliateIsMarked($data['affiliateIsMarked']);
         $affiliate->setAffiliateIsAccpted($data['affiliateIsAccpted']);
         if ($affiliate->update()) {
             $this->redirect('affiliate/list', array('affiliateedited=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_AFFILIATE'));
         }
     }
     $categoryList = new \model\category_list($this->getDbconnection());
     $categories = array();
     foreach ($categoryList->getCategories() as $category) {
         $categories[$category->getName() . ' (' . \language::returnLanguageConstant('ID') . ': ' . $category->getId() . ')'] = $category->getId();
     }
     $view = new \model\view_acp('affiliate_editor');
     $view->assign('affiliate', $affiliate);
     $view->assign('categories', $categories);
     $view->assign('editormode', 1);
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_AFFILIATE_EDIT'));
     $view->assign('markedstatus', array(\language::returnLanguageConstant('NO_VALUE') => 0, \language::returnLanguageConstant('YES_VALUE') => 1));
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->assign('fileList', new \model\file_list());
     $view->render();
 }
Exemplo n.º 13
0
 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     if (!is_null($this->getRequestVar('options'))) {
         $data = $this->getRequestVar('options');
         $sysConfigObj = $this->getSysconfig();
         if (!empty($data['loginPasswort']) && !$sysConfigObj->isPasswordSecure($data['loginPasswort'])) {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_PASSWORD'));
             unset($data['loginPasswort']);
         }
         foreach ($data as $key => $value) {
             if ($value == '') {
                 continue;
             }
             $fn = 'set' . $key;
             $sysConfigObj->{$fn}($this->filterRequest($value, array(1, 4, 7)));
         }
         $sysConfigObj->update();
         \messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_OPTIONS'));
     }
     $fields = array('adminMail' => $this->getSysconfig()->getAdminMail(), 'iframecss' => $this->getSysconfig()->getIframecss(), 'sessionLength' => $this->getSysconfig()->getSessionLength(), 'timeZone' => $this->getSysconfig()->getTimeZone(), 'dateTimeMask' => $this->getSysconfig()->getDateTimeMask(), 'antispamQuestion' => $this->getSysconfig()->getAntispamQuestion(), 'antispamAnswer' => $this->getSysconfig()->getAntispamAnswer());
     $dtMasksArray = array('d.m.Y', 'd. M Y', 'd.n.Y', 'j.m.Y', 'j. M Y', 'j.n.Y', 'M dS Y', 'm/d/Y', 'n/d/Y');
     $dtMasks = array();
     foreach ($dtMasksArray as $dtMask) {
         $dtMasks[] = array('label' => $dtMask . ' (' . date($dtMask) . ')', 'value' => $dtMask);
     }
     $timeZones = timezone_identifiers_list();
     $timeZones = array_combine(array_values($timeZones), array_values($timeZones));
     unset($timeZones['UTC']);
     $view = new \model\view_acp('options');
     $view->assign('languages', \language::getLanguages());
     $view->assign('modes', array('iframe' => 1, 'phpcinlude' => 2));
     $view->assign('timeZones', array_unique($timeZones));
     $view->assign('syslang', $this->getSysconfig()->getSysLanguage());
     $view->assign('sysmode', $this->getSysconfig()->getSystemMode());
     $view->assign('dtMasks', json_encode($dtMasks));
     $view->assign('fields', $fields);
     $view->render();
 }
Exemplo n.º 14
0
 /**
  * Lädt Datei, fügt View-Element, Header & Footer zusammen und erstellt Variablen für View
  * @see view
  * @return void
  */
 public function render()
 {
     $this->setViewFile($this->getViewPath() . $this->getViewName());
     $this->setDefaultCssFiles();
     $this->setDefaultJsFiles();
     if (!file_exists($this->getViewFile())) {
         $notFoundMessage = str_replace('{{viewname}}', $this->viewName, \language::returnLanguageConstant('VIEW_NOT_FOUND'));
         \messages::logError($notFoundMessage);
         die($notFoundMessage);
         return;
     }
     include \base_config::$baseDir . '/version.php';
     $systemVersion = $afltrVersion;
     $relroot = defined('INSTALL_MODE') ? str_replace('install', '', \base_config::$rootPath) : '';
     $title = defined('INSTALL_MODE') ? \language::returnLanguageConstant('INSTALLER') : \language::returnLanguageConstant('UPDATER');
     include_once \base_config::$baseDir . '/style/header.php';
     foreach ($this->getViewVars() as $key => $value) {
         ${$key} = $value;
     }
     include_once $this->getViewFile();
     include_once \base_config::$baseDir . '/style/footer.php';
 }
Exemplo n.º 15
0
<?php

if (!defined('VIEW')) {
    die;
}
?>
<form method="post" action="">
    <div class="afltr-acp-top-buttons">
        <a href="#" class="buttons show-upload-dialog"><?php 
language::printLanguageConstant('FILES_UPLOAD');
?>
</a>
        <?php 
viewHelper::submitButton('submdelete', language::returnLanguageConstant('DELETE_BTN'), 'submdelete');
?>
    </div>
    <h2><?php 
language::printLanguageConstant('HL_LINKBUTTONS');
?>
</h2>
    <div class="afltr-acp-list">
            <table class="afltr-acp-table">
                <tr>
                    <th class="afltr-padding-left afltr-align-left"><?php 
language::printLanguageConstant('FILES_NAME');
?>
</th>
                    <th class="afltr-acp-td-w4 afltr-align-left"><?php 
language::printLanguageConstant('FILES_METAINFOS');
?>
</th>
Exemplo n.º 16
0
 /**
  * Prüft ob Update verfügbar sind
  * @return string|null
  */
 public function checkForUpdates()
 {
     $data = array('version' => $this->getSysVersion(), 'language' => $this->getSysLanguage(), 'phpvers' => PHP_VERSION, 'isauto' => (int) \base_config::canConnect());
     $url = \base_config::$updateServer . 'noauto.php?data=' . base64_encode(json_encode($data));
     if (!\base_config::canConnect()) {
         return $url;
     }
     if (file_exists(\base_config::$updateCache)) {
         $updateCache = json_decode(file_get_contents(\base_config::$updateCache), true);
         if ($updateCache['expire'] >= time()) {
             if (!empty($updateCache['message'])) {
                 \messages::registerNotice($updateCache['message'], true);
             }
             return;
         }
     }
     try {
         $url = \base_config::$updateServer . 'newver.php?data=' . base64_encode(json_encode($data));
         $updateData = fopen($url, 'r');
         $updateData = fgets($updateData);
         $updateData = json_decode(base64_decode($updateData), true);
         $updateMessage = '';
         if (version_compare($updateData['newversion'], $this->getSysVersion(), '>')) {
             if (isset($updateData['forceupdate']) && $updateData['forceupdate']) {
                 header("Location: ?module=system/update&file=" . $updateData['updatefile']);
             }
             $updateMessage = \language::replaceLanguageConstant(\language::returnLanguageConstant('UPDATE_NEWVERSION'), array('{{versionlink}}' => '?module=system/update&file=' . $updateData['updatefile']));
             \messages::registerNotice($updateMessage, true);
         }
         $cacheTmp = array('expire' => time() + 43200, 'message' => $updateMessage);
         file_put_contents(\base_config::$updateCache, json_encode($cacheTmp));
     } catch (\Exception $ex) {
         \messages::registerError($ex->getMessage(), true);
     }
     return null;
 }
Exemplo n.º 17
0
        <table class="afltr-acp-table">
        <?php 
if ($editormode == 1) {
    ?>
            <tr>
                <td class="afltr-align-center small-text" colspan="2">
                    <?php 
    print "<span class=\"afltr-td-label\">" . language::returnLanguageConstant('ID') . ":</span> " . $affiliate->getId();
    ?>
 &bull;
                    <?php 
    print "<span class=\"afltr-td-label\">" . language::returnLanguageConstant('AFFILIATE_AFFILIATEADDEDTIME') . ":</span> " . date($dtMask, $affiliate->getAffiliateAddedTime());
    ?>
 &bull;
                    <?php 
    print "<span class=\"afltr-td-label\">" . language::returnLanguageConstant('AFFILIATE_AFFILIATEEDITEDTIME') . ":</span> " . date($dtMask, $affiliate->getAffiliateEditedTime());
    ?>
                </td>
            </tr>   
        <?php 
}
?>
  
        <?php 
foreach ($fields as $key => $value) {
    ?>
            <tr>
                <td class="afltr-td-label afltr-align-right">
                    <?php 
    language::printLanguageConstant('AFFILIATE_' . strtoupper($key));
    ?>
Exemplo n.º 18
0
 /**
  * Update check
  * @return string
  */
 private function checkUpdates()
 {
     $updateValue = $this->sysconfig->checkForUpdates();
     if (!is_null($updateValue)) {
         $updateMessage = \language::replaceLanguageConstant(\language::returnLanguageConstant('UPDATE_NOTAUTOCHECK'), array('{{versionlink}}' => $updateValue));
         \messages::registerError($updateMessage, true);
         \messages::registerMessage("<iframe src=\"{$updateValue}\" class=\"update-check-iframe\" scrolling=\"no\" seamless></iframe>", true);
     }
 }
Exemplo n.º 19
0
 private function boolToText($value)
 {
     $output = $value == 1 || $value == true ? '<span class="afltr-bool-to-text-icon ui-icon ui-icon-check" title="' . language::returnLanguageConstant('YES_VALUE', null) . '"></span>' : '<span class="afltr-bool-to-text-icon ui-icon ui-icon-closethick" title="' . language::returnLanguageConstant('NO_VALUE', null) . '"></span>';
     return $output;
 }
Exemplo n.º 20
0
 /**
  * Versendet E-Mail über php-Funktion mail()
  * @param array $mailData Array mit Daten der Email
  * Struktur:
  *      'mailTo'       => Empfänger (optional)
  *      'mailFrom'     => Ansender (optional)
  *      'mailSubject'  => Betreff
  *      'mailText'     => Text der E-Mail
  */
 public static function sendEMail($mailData)
 {
     if (!isset($mailData["mailFrom"])) {
         $mailData["mailFrom"] = "affiliatr@" . $_SERVER["HTTP_HOST"];
     }
     if (!isset($mailData["mailTo"])) {
         self::registerError(language::returnLanguageConstant('MSG_EMAIL_NO_TO'));
     }
     $mret = mail($mailData["mailTo"], $mailData["mailSubject"], $mailData["mailText"], "From: " . $mailData["mailFrom"]);
     if ($mret) {
         self::logSystem("An e-mail was send to " . $mailData["mailTo"] . " width subject " . $mailData["mailSubject"]);
         return true;
     }
     self::logSystem("The e-Mail to " . $mailData["mailTo"] . " width subject " . $mailData["mailSubject"] . " cannot be send.");
     return false;
 }
Exemplo n.º 21
0
<form method="post" action="index.php?step=2&amp;lang=<?php 
print $lang;
?>
">
    <div class="afltr-acp-top-buttons">
        <?php 
viewHelper::submitButton('submsavesyscfg', language::returnLanguageConstant('NEXT_BTN'));
?>
    </div>
    <h2><?php 
language::printLanguageConstant('HL_INSTALL_DBCONNECT');
?>
</h2>
    <div class="afltr-acp-form afltr-align-center">     
        <table class="afltr-acp-table">
            <tr>
                <td class="afltr-td-label afltr-align-right">
                    <?php 
language::printLanguageConstant('INSTALL_DBTYPE');
?>
:
                </td>
                <td class="afltr-padding-left">
                <?php 
viewHelper::select('dbconfig[DBTYPE]', $dbtypes, null, false, false);
?>
                </td>                
            </tr>            
            <?php 
foreach ($fields as $key => $value) {
    ?>
Exemplo n.º 22
0
<?php

if (!defined('VIEW')) {
    die;
}
?>
<div class="afltr-login-form">
    <form method="post" action="">            
        <?php 
language::printLanguageConstant('LOGIN_PASSWORT');
?>
<br>
        <input type="password" class="input-text ui-state-default ui-corner-all" name="passwd" size="50" maxlength="255" value="<?php 
print $defaultPW;
?>
">
        <?php 
viewHelper::submitButton('submpass', language::returnLanguageConstant('LOGIN_BTN'));
?>
<br>
        <div class="afltr-align-center afltr-padding-top small-text"><?php 
language::printLanguageConstant('LOGIN_RESET_PASSWORD');
?>
</div>
    </form>      
</div>
Exemplo n.º 23
0
<form method="post" action="index.php?step=1">
    <div class="afltr-acp-top-buttons">
        <?php 
viewHelper::submitButton('continue', language::returnLanguageConstant('NEXT_BTN'));
?>
    </div>
    <h2>Choose your language</h2>
    <div class="afltr-acp-form afltr-align-center"><?php 
viewHelper::select('lang', $languages);
?>
</div>
</form>
Exemplo n.º 24
0
 private function runInstall()
 {
     $this->checkRequirements();
     $step = $this->getRequestVar('step');
     define('INSTALL_MODE', 0);
     if (is_null($step)) {
         \language::init('de');
         $view = new \model\view_installer('start');
         $view->assign('languages', \language::getLanguages());
         $view->assign('lang', '');
         $view->render();
     } else {
         $setupLang = $this->getRequestVar('lang');
         if (empty($setupLang)) {
             header('Location: index.php');
         }
         \language::init($setupLang);
         $install = new \installclass();
         if (!is_null($this->getRequestVar('pins'))) {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_PASSWORD'), true);
         }
         if (!is_null($this->getRequestVar('dbconfig'))) {
             $install->createConfigFile($this->getRequestVar('dbconfig'));
         }
         if ($step > 1) {
             $this->dbconnection = new \database();
             $install->setDbconnection($this->dbconnection);
         }
         if (!is_null($this->getRequestVar('submsave'))) {
             if (!$install->createConfigKey($this->getRequestVar('options'))) {
                 header('Location: index.php?step=2&lang=' . $setupLang . '&pins=yes');
             }
         }
         if ($step == 1) {
             if (!isset($_GET['lang'])) {
                 header('Location: index.php?step=1&lang=' . $setupLang);
             }
             $view = new \model\view_installer('dbconfig');
             $view->assign('fields', array('DBHOST' => 'localhost', 'DBNAME' => '', 'DBUSER' => '', 'DBPASS' => '', 'DBPREF' => 'afltr'));
             $view->assign('lang', $setupLang);
             $view->assign('dbtypes', array('MySQL' => 'mysql'));
             $view->render();
         }
         if ($step == 2) {
             $tables = array('affiliates', 'categories', 'config', 'logins');
             foreach ($tables as $table) {
                 $install->createTable($table);
             }
             $install->createStdCategory();
             $fields = array('adminMail' => '*****@*****.**', 'iframecss' => '', 'sessionLength' => '3600', 'timeZone' => 'Europe/London', 'dateTimeMask' => 'd.m.Y H:i', 'antispamQuestion' => '', 'antispamAnswer' => '');
             $timeZones = timezone_identifiers_list();
             $timeZones = array_combine(array_values($timeZones), array_values($timeZones));
             $view = new \model\view_installer('config');
             $view->assign('fields', $fields);
             $view->assign('modes', array('iframe' => 1, 'phpcinlude' => 2));
             $view->assign('timeZones', $timeZones);
             $view->assign('sysmode', 1);
             $view->assign('languages', \language::getLanguages());
             $view->assign('lang', $setupLang);
             $view->render();
         }
         if ($step == 3) {
             $view = new \model\view_installer('end');
             $view->render();
             $file = new \model\file();
             $file->deleteRecursive(\base_config::$baseDir . '/install/');
         }
     }
 }
Exemplo n.º 25
0
<?php

if (!defined('VIEW')) {
    die;
}
?>
<form method="post" action="">
    <div class="afltr-acp-top-buttons">
        <?php 
viewHelper::submitButton('submdelete', language::returnLanguageConstant('OPTIONS_CLEAR_LOG'));
?>
    </div>
    <h2><?php 
language::printLanguageConstant('HL_LOGS_SYSTEM');
?>
</h2>    
    <div class="afltr-acp-list">
        <div class="tabs">
                <ul>
                    <li><a href="#tabs-log-php"><?php 
language::printLanguageConstant('HL_LOGS_ERROR');
?>
</a></li>
                    <li><a href="#tabs-log-system"><?php 
language::printLanguageConstant('HL_LOGS_SYSTEM');
?>
</a></li>                   
                </ul>            
            
            <div id="tabs-log-php" class="small-text">
            <?php 
Exemplo n.º 26
0
 /**
  * Prüft, ob View-Datei vorhanden ist und lädt diese
  * @return bool
  */
 public function render()
 {
     if (!defined('VIEW')) {
         define('VIEW', '1');
     }
     $this->viewFile = $this->viewPath . $this->viewName;
     if (!file_exists($this->viewFile)) {
         $notFoundMessage = str_replace('{{viewname}}', $this->viewName, \language::returnLanguageConstant('VIEW_NOT_FOUND'));
         \messages::registerError($notFoundMessage);
         \messages::logError($notFoundMessage);
         return false;
     }
     return true;
 }
Exemplo n.º 27
0
print utf8_decode($antiSpamQuestion);
?>
                    </td>
                </tr>    
                <tr>
                    <td class="afltr-public-label"></td>
                    <td class="afltr-public-content">
                        <input type="text" class="afltr-public-input-text" name="antiSpamAnswer" size="25" maxlength="255" value="<?php 
print $value;
?>
">
                    </td>
                </tr>                   
                <tr>
                    <td colspan="2" class="afltr-public-button-line">
                        <?php 
viewHelper::submitButton('submsave', language::returnLanguageConstant('AFFILIATE_PUB_SUBMIT'), $isNotUtf8);
?>
                        <?php 
viewHelper::resetButton('subreset', $isNotUtf8);
?>
                    </td>
                </tr>
            </table>
    </div>
</form>

<!-- Powered by Affiliat*r <?php 
print $systemVersion;
?>
 - http://nobody-knows.org/download/affiliatr/ -->
Exemplo n.º 28
0
 public function getBoxHeadline()
 {
     return \language::returnLanguageConstant('HL_DASHBOARD_STATS');
 }
Exemplo n.º 29
0
 /**
  * Erzeugt Ja/nein Select-Menü
  * @param string $name
  * @param array $selected
  * @return string
  */
 public static function boolSelect($name, $selected, $isNotUtf8 = false)
 {
     $options = array(language::returnLanguageConstant('YES_VALUE', null, $isNotUtf8) => 1, language::returnLanguageConstant('NO_VALUE', null, $isNotUtf8) => 0);
     return self::select($name, $options, $selected, false, false);
 }
Exemplo n.º 30
0
<?php

if (!defined('VIEW')) {
    die;
}
?>
<form method="post" action="">
    <div class="afltr-acp-top-buttons">
        <?php 
viewHelper::submitButton('submmail', language::returnLanguageConstant('SENDMAIL_BTN'));
?>
        <?php 
viewHelper::resetButton('subreset');
?>
    </div>
    <h2><?php 
language::printLanguageConstant('HL_CONTACT');
?>
</h2>
    <div class="afltr-acp-form">
        <table class="afltr-acp-table">
            <tr>
                <td class="afltr-td-label afltr-align-right afltr-acp-td-w2">
                    <?php 
language::printLanguageConstant('CONTACT_RECIPIENT');
?>
:
                </td>
                <td class="afltr-padding-left">                    
                    <input type="text" class="input-text ui-state-default ui-corner-all" name="mailData[mailRecipients]" size="50" maxlength="255" value="<?php 
print $recipients;