Changeset 661

Show
Ignore:
Timestamp:
09/26/08 22:49:53 (5 years ago)
Author:
Tatzelwurm
Message:

New try, need help optimising/cleaning code.

Location:
de.inside.Gewinnspiel
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • de.inside.Gewinnspiel/files/lib/acp/action/GewinnspielDeleteAction.class.php

    r579 r661  
    1212 
    1313class GewinnspielDeleteAction extends AbstractAction { 
    14         public $gwsID = 0; 
     14        public $gwspID = 0; 
    1515         
    1616        /** 
     
    2020                parent::readParameters(); 
    2121                 
    22                 if (isset($_REQUEST['gwsID'])) $this->gwsID = intval($_REQUEST['gwsID']); 
     22                if (isset($_REQUEST['gwspID'])) $this->gwspID = intval($_REQUEST['gwspID']); 
    2323        } 
    2424         
     
    3131                // delete game 
    3232                $sql = "DELETE FROM     gwsp".GWSP_N."_game 
    33                         WHERE           gwsID = ".$this->gwsID; 
     33                        WHERE           gwsID = ".$this->gwspID; 
    3434                WCF::getDB()->sendQuery($sql); 
    3535                $sql = "DELETE FROM     gwsp".GWSP_N."_options 
    36                         WHERE           gwsID = ".$this->gwsID; 
     36                        WHERE           gwsID = ".$this->gwspID; 
    3737                WCF::getDB()->sendQuery($sql); 
    3838                $sql = "DELETE FROM     gwsp".GWSP_N."_spiel 
    39                         WHERE           gwsID = ".$this->gwsID; 
     39                        WHERE           gwsID = ".$this->gwspID; 
    4040                WCF::getDB()->sendQuery($sql); 
     41                // reset cache 
     42                GWSPACP::getCache()->clear(GWSP_DIR.'cache/', 'competition.games-'.PACKAGE_ID.'.php'); 
     43                GWSPACP::getCache()->clear(GWSP_DIR.'cache/', 'competition.user-'.PACKAGE_ID.'.php'); 
    4144                // forward to list page 
    42                 header('Location: index.php?page=GewinnspielList&deletedgwsID='.$this->gwsID.'&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED); 
     45                header('Location: index.php?page=GewinnspielList&deletedgwsID='.$this->gwspID.'&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED); 
    4346                exit; 
    4447        } 
  • de.inside.Gewinnspiel/files/lib/acp/form/GewinnspielAddForm.class.php

    r579 r661  
    5353        public function show() { 
    5454                // enable menu item 
    55                 WCFACP::getMenu()->setActiveMenuItem('gws.acp.menu.link.content.games'); 
     55                GWSPACP::getMenu()->setActiveMenuItem('gws.acp.menu.link.content.games'); 
    5656 
    5757                // check permission 
     
    193193                        } 
    194194                } 
     195                // reset cache 
     196                GWSPACP::getCache()->clear(GWSP_DIR.'cache/', 'competition.games-'.PACKAGE_ID.'.php'); 
    195197                // forward to list page 
    196198                header('Location: index.php?page=GewinnspielList&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED); 
  • de.inside.Gewinnspiel/files/lib/acp/form/GewinnspielEditForm.class.php

    r579 r661  
    4343                                        FROM            gwsp".GWSP_N."_game 
    4444                                        WHERE           gwsID = '".$this->gwsID."'"; 
    45                         $result = WCF::getDB()->sendQuery($sql); 
    46                         while ($row = WCF::getDB()->fetchArray($result)) { 
     45                        $result = GWSPACP::getDB()->sendQuery($sql); 
     46                        while ($row = GWSPACP::getDB()->fetchArray($result)) { 
    4747                                $games =array('gwsID'           => $row['gwsID'], 
    4848                                                          'gwsTitel'    => $row['gwsTitel'], 
     
    6464                                        WHERE           gwsID = ".$this->gwsID." 
    6565                                        ORDER BY        showOrder"; 
    66                         $result = WCF::getDB()->sendQuery($sql); 
    67                         while ($row = WCF::getDB()->fetchArray($result)) { 
     66                        $result = GWSPACP::getDB()->sendQuery($sql); 
     67                        while ($row = GWSPACP::getDB()->fetchArray($result)) { 
    6868                                $this->gwsOptionsArray[] .= "$row[gwsOption]"; 
    6969                        } 
     
    103103                parent::assignVariables(); 
    104104 
    105                 WCF::getTPL()->assign(array( 
     105                GWSPACP::getTPL()->assign(array( 
    106106                        'gwsID' => $this->gwsID, 
    107107                        'action' => 'edit', 
     
    128128                                WHERE           gwsID = ".$this->gwsID." 
    129129                                ORDER BY        showOrder"; 
    130                 $result = WCF::getDB()->sendQuery($sql); 
    131                 while ($row = WCF::getDB()->fetchArray($result)) { 
     130                $result = GWSPACP::getDB()->sendQuery($sql); 
     131                while ($row = GWSPACP::getDB()->fetchArray($result)) { 
    132132                        $this->gwsOldOptionsArray[] .= "$row[gwsOption]"; 
    133133                } 
     
    141141                                                                '".escapeString($this->gwsOptionsArray[$showOrder])."', 
    142142                                                                ".$showOrder.")"; 
    143                                 WCF::getDB()->registerShutdownUpdate($sql); 
     143                                GWSPACP::getDB()->registerShutdownUpdate($sql); 
    144144                        // wenn noch alt Optionen vorhanden sind dann lschen 
    145145                        } elseif(empty($this->gwsOptionsArray[$showOrder]) && $this->gwsOldOptionsArray[$showOrder]) { 
    146146                                $sql = "DELETE FROM     gwsp".GWSP_N."_options 
    147147                                                WHERE   gwsID = ".$this->gwsID." AND showOrder = ".$showOrder; 
    148                                 WCF::getDB()->registerShutdownUpdate($sql); 
     148                                GWSPACP::getDB()->registerShutdownUpdate($sql); 
    149149                        // wenn alte Optione nicht gleich der neuen dann UPDATE 
    150150                        } elseif ($this->gwsOptionsArray[$showOrder] != $this->gwsOldOptionsArray[$showOrder]){ 
     
    152152                                                SET     gwsOption = '".escapeString($this->gwsOptionsArray[$showOrder])."' 
    153153                                                WHERE   gwsID = ".$this->gwsID." AND showOrder = ".$showOrder; 
    154                                 WCF::getDB()->registerShutdownUpdate($sql); 
     154                                GWSPACP::getDB()->registerShutdownUpdate($sql); 
    155155                        } 
    156156                } 
     
    167167                                money           = '".intval($this->money)."' 
    168168                                WHERE   gwsID   = " .$this->gwsID; 
    169                         WCF::getDB()->registerShutdownUpdate($sql); 
     169                        GWSPACP::getDB()->registerShutdownUpdate($sql); 
     170                        // reset cache 
     171                        GWSPACP::getCache()->clear(GWSP_DIR.'cache/', 'competition.games-'.PACKAGE_ID.'.php'); 
    170172                        // forward to list page 
    171173                        header('Location: index.php?page=GewinnspielList&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED); 
  • de.inside.Gewinnspiel/files/lib/form/GewinnspielForm.class.php

    r579 r661  
    6161                if (!$this->gwsID){ 
    6262                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    63                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.wrongid')); 
     63                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.wrongid')); 
    6464                        exit; 
    6565                } 
     
    131131                //              parent::validate(); 
    132132                // Kontrolle ob Gast schon teilgenommen hat 
    133                 $id = WCF::getUser()->userID; 
     133                $id = GWSPCore::getUser()->userID; 
    134134                if (!$id){ 
    135135                        $sql = "SELECT  `ipaddress`, `email`, `realName` 
    136136                                        FROM    gwsp".GWSP_N."_spiel 
    137137                                        WHERE   `gwsID` = $this->gwsID AND `userID` = 0"; 
    138                         $result = WCF::getDB()->sendQuery($sql); 
    139                         while ($row = WCF::getDB()->fetchArray($result)) { 
     138                        $result = GWSPCore::getDB()->sendQuery($sql); 
     139                        while ($row = GWSPCore::getDB()->fetchArray($result)) { 
    140140                                        $ipArray[]              = "$row[ipaddress]"; 
    141141                                        $mailArray[]    = "$row[email]"; 
     
    146146                                        if (StringUtil::toLowerCase($mailArray[$key]) == StringUtil::toLowerCase($this->useremail) || StringUtil::toLowerCase($rnArray[$key]) == StringUtil::toLowerCase($this->userreal)){ 
    147147                                                require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    148                                                 throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.alreadyplayed')); 
     148                                                throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.alreadyplayed')); 
    149149                                                exit; 
    150150                                        } 
     
    166166                                        (gwsID, userID, ipaddress, email, realName) 
    167167                                        VALUES  (".intval($this->gwsID).", 
    168                                                         ".intval(WCF::getUser()->userID).", 
    169                                                         '".escapeString(WCF::getSession()->ipAddress)."', 
     168                                                        ".intval(GWSPCore::getUser()->userID).", 
     169                                                        '".escapeString(GWSPCore::getSession()->ipAddress)."', 
    170170                                                        '".$this->useremail."', 
    171171                                                        '".$this->userreal."')"; 
    172                         WCF::getDB()->sendQuery($sql); 
    173  
    174                         // E-Mail des Empfngers holen. 
     172                        GWSPCore::getDB()->sendQuery($sql); 
     173 
     174                        // Competition Mod E-Mail. 
    175175                        $sql = "SELECT  `recipient` 
    176176                                        FROM    gwsp".GWSP_N."_game 
    177177                                        WHERE   gwsID = $this->gwsID"; 
    178                         $result = WCF::getDB()->getFirstRow($sql); 
     178                        $result = GWSPCore::getDB()->getFirstRow($sql); 
    179179                        $this->empfnger = $result['recipient']; 
    180180                        // E-Mail vorbeiten und senden 
     
    185185                                        WHERE           gwsID = ".$this->gwsID." 
    186186                                        ORDER BY        showOrder"; 
    187                         $result = WCF::getDB()->sendQuery($sql); 
    188                         while ($row = WCF::getDB()->fetchArray($result)) { 
     187                        $result = GWSPCore::getDB()->sendQuery($sql); 
     188                        while ($row = GWSPCore::getDB()->fetchArray($result)) { 
    189189                                $this->gwsOptionsArray[] .= "$row[gwsOption]"; 
    190190                        } 
    191                         $frage = WCF::getLanguage()->get('gws.gewinnspiel.frage'); 
    192                         $antwort = WCF::getLanguage()->get('gws.gewinnspiel.antwort'); 
     191                        $frage = GWSPCore::getLanguage()->get('gws.gewinnspiel.frage'); 
     192                        $antwort = GWSPCore::getLanguage()->get('gws.gewinnspiel.antwort'); 
    193193                        foreach ($this->gwsOptionsArray as $key =>$option){ 
    194194                                $this->frageantwort .= $frage.": "."$option"."\n".$antwort.": ".$this->answer[$key]."\n"."\n"; 
    195195                        } 
    196                         $languages = array(0 => WCF::getLanguage(), WCF::getLanguage()->getLanguageID() => WCF::getLanguage()); 
     196                        $languages = array(0 => GWSPCore::getLanguage(), GWSPCore::getLanguage()->getLanguageID() => GWSPCore::getLanguage()); 
    197197                        require_once(WCF_DIR.'lib/data/mail/Mail.class.php'); 
    198198                        require_once(WCF_DIR.'lib/data/user/User.class.php'); 
    199199                        // get language 
    200200                        // enable language 
    201                         $languages[WCF::getLanguage()->getLanguageID()]->setLocale(); 
     201                        $languages[GWSPCore::getLanguage()->getLanguageID()]->setLocale(); 
    202202                         
    203203                        $subjectData = array('PAGE_TITLE' => PAGE_TITLE); 
     
    214214                        // Mail an den User 
    215215                        $mail = new Mail(       array($this->userreal => $this->useremail), 
    216                                                                 $languages[WCF::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.subject', $subjectData), 
    217                                                                 $languages[WCF::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.message', $messageData)); 
     216                                                                $languages[GWSPCore::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.subject', $subjectData), 
     217                                                                $languages[GWSPCore::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.message', $messageData)); 
    218218                        $mail->send(); 
    219219                        // Mail an den Veranstalter 
    220220                        $mail = new Mail(       $this->empfnger, 
    221                                                                 $languages[WCF::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.subject.recipient', $subjectData), 
    222                                                                 $languages[WCF::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.message.recipient', $messageData)); 
     221                                                                $languages[GWSPCore::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.subject.recipient', $subjectData), 
     222                                                                $languages[GWSPCore::getLanguage()->getLanguageID()]->get('gws.gewinnspiel.mail.message.recipient', $messageData)); 
    223223                        $mail->send(); 
    224224                         
    225225                        // enable user language 
    226                         WCF::getLanguage()->setLocale(); 
    227                          
     226                        GWSPCore::getLanguage()->setLocale(); 
     227                        // reset cache 
     228                        GWSPCore::getCache()->clear(GWSP_DIR.'cache/', 'competition.user-'.PACKAGE_ID.'.php'); 
    228229                        // forward to index page 
    229                         WCF::getTPL()->assign(array( 
    230                                 'url' => 'index.php?page=Gewinnspiel'.SID_ARG_1ST, 
    231                                 'message' => WCF::getLanguage()->get(WCF::getLanguage()->get('gws.gewinnspiel.ok_redirect'), array('$userreal' => $this->username, '$uemail' => $this->useremail)) 
     230                        GWSPCore::getTPL()->assign(array( 
     231                                'url' => 'index.php?page=Index'.SID_ARG_1ST, 
     232                                'message' => GWSPCore::getLanguage()->get(GWSPCore::getLanguage()->get('gws.gewinnspiel.ok_redirect'), array('$userreal' => $this->username, '$uemail' => $this->useremail)) 
    232233                        )); 
    233                         WCF::getTPL()->display('redirect'); 
     234                        GWSPCore::getTPL()->display('redirect'); 
    234235                        exit; 
    235236                } 
     
    241242        public function readData() { 
    242243                parent::readData(); 
    243                 if ((WCF::getUser()->userID) > 0){ 
    244                         $this->username         = WCF::getUser()->username; 
    245                         $this->useremail = $this->useremailconfirm      = WCF::getUser()->email; 
     244                if ((GWSPCore::getUser()->userID) > 0){ 
     245                        $this->username         = GWSPCore::getUser()->username; 
     246                        $this->useremail = $this->useremailconfirm      = GWSPCore::getUser()->email; 
    246247                }else{ 
    247248                        if (!count($_POST)) { 
    248                                 $this->username = WCF::getLanguage()->get('gws.gewinnspiel.username.gast'); 
     249                                $this->username = GWSPCore::getLanguage()->get('gws.gewinnspiel.username.gast'); 
    249250                                $this->useremail = $this->useremailconfirm = ''; 
    250251                        } 
     
    283284        public function show() { 
    284285                // get the default langauge id 
    285                 $this->languageID = WCF::getLanguage()->getLanguageID(); 
     286                $this->languageID = GWSPCore::getLanguage()->getLanguageID(); 
    286287                // show form 
    287288                parent::show(); 
     
    290291        protected function checkPermissions() { 
    291292                // Kontrolle ob User schon teilgenommen hat (nicht bei Gsten) 
    292                 $id = WCF::getUser()->userID; 
     293                $id = GWSPCore::getUser()->userID; 
    293294                if ($id){ 
    294295                        $sql = "SELECT  COUNT(userID) AS users 
    295296                                        FROM    gwsp".GWSP_N."_spiel 
    296297                                        WHERE   gwsID = '.$this->gwsID.'  AND userID = '.$id.'"; 
    297                         $row = WCF::getDB()->getFirstRow($sql); 
     298                        $row = GWSPCore::getDB()->getFirstRow($sql); 
    298299                        if ($row['users'])      {                
    299300                                require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    300                                 throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.alreadyplayed')); 
     301                                throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.alreadyplayed')); 
    301302                                exit; 
    302303                        } 
     
    306307                                FROM    gwsp".GWSP_N."_game 
    307308                                WHERE   gwsID = $this->gwsID"; 
    308                 $result = WCF::getDB()->sendQuery($sql); 
    309                 $row = WCF::getDB()->fetchArray($result); 
     309                $result = GWSPCore::getDB()->sendQuery($sql); 
     310                $row = GWSPCore::getDB()->fetchArray($result); 
    310311                // Keine gltige GameID angegeben ? 
    311312                if(empty($row)){ 
    312313                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    313                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.wrongid')); 
     314                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.wrongid')); 
    314315                        exit; 
    315316                } 
     
    323324                if (!$canplay) { 
    324325                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    325                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.nogroupe')); 
     326                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.nogroupe')); 
    326327                } 
    327328        } 
     
    332333                                FROM            gwsp".GWSP_N."_game gewinnspiel 
    333334                                WHERE           gwsID = ".$this->gwsID; 
    334                 $row = WCF::getDB()->getFirstRow($sql); 
     335                $row = GWSPCore::getDB()->getFirstRow($sql); 
    335336                $this->gwsID            = $row['gwsID']; 
    336337                $this->gwsTitel         = $row['gwsTitel']; 
     
    345346                 
    346347                if (defined('GUTHABEN_ENABLE_GLOBAL')){ 
    347                         if(WCF::getUser()->userID && $this->money >= 1) { 
     348                        if(GWSPCore::getUser()->userID && $this->money >= 1) { 
    348349                                require_once(WCF_DIR.'lib/data/user/UserGuthaben.class.php'); 
    349                                 $um = new UserGuthaben(WCF::getUser()->userID); 
     350                                $um = new UserGuthaben(GWSPCore::getUser()->userID); 
    350351                                if (!$um->subGuthaben($this->money,'gws.gewinnspiel.kosten')) { 
    351352                                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    352                                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.errormoney')); 
     353                                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.errormoney')); 
    353354                                } 
    354355                        } 
     
    357358                if ($this->gwsStart > TIME_NOW) { 
    358359                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    359                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.statustocome')); 
     360                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.statustocome')); 
    360361                        exit; 
    361362                } 
     
    363364                if ($this->gwsEnde < TIME_NOW) { 
    364365                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    365                         throw new NamedUserException(WCF::getLanguage()->get('gws.gewinnspiel.statusended')); 
     366                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.statusended')); 
    366367                        exit; 
    367368                } 
     
    371372                                WHERE           gwsID = ".$this->gwsID." 
    372373                                ORDER BY        showOrder"; 
    373                 $result = WCF::getDB()->sendQuery($sql); 
    374                 while ($row = WCF::getDB()->fetchArray($result)) { 
     374                $result = GWSPCore::getDB()->sendQuery($sql); 
     375                while ($row = GWSPCore::getDB()->fetchArray($result)) { 
    375376                        $titel = $this->getFormattedMessage($row['gwsOption'], true); 
    376377                        $this->gwsOptionsArray[] .= "$titel"; 
     
    385386                                FROM            gwsp".GWSP_N."_spiel 
    386387                                WHERE           gwsID = ".$this->gwsID; 
    387                 $row = WCF::getDB()->getFirstRow($sql); 
     388                $row = GWSPCore::getDB()->getFirstRow($sql); 
    388389                $this->usercount = $row['userID']; 
    389390        } 
  • de.inside.Gewinnspiel/files/lib/page/IndexPage.class.php

    r579 r661  
    1010 * denen man keine Berechtigung hat werden entsprechend gekennzeichnet. 
    1111 * @author              Robert "Tatzelwurm" Hempel 
    12  * @copyright   2007/2008 INSIDE das Hrspiel 
     12 * @copyright   2007/2008 INSIDE das Hörspiel 
    1313 * @license     GNU LGPL http://www.gnu.org/licenses/lgpl.txt 
    1414 * @package             de.inside.Gewinnspiel 
     
    2828        public $highlight = ''; 
    2929 
     30        private $gamesCache = array(); 
    3031        private $enableSmilies = true; 
    3132        private $enableBBCodes = true; 
     
    4445                if (isset($_REQUEST['action'])) $this->action = $_REQUEST['action']; 
    4546 
    46                 // Hier Code fÃŒr Action !!!! 
    47                 if ($this->action == 'go' && $this->gwsID) { 
    48                         $sql = "SELECT  `groupIDs` 
    49                                         FROM    gwsp".GWSP_N."_game 
    50                                         WHERE   gwsID = ".$this->gwsID.""; 
    51                         $result = GWSPCore::getDB()->sendQuery($sql); 
    52                         $row = GWSPCore::getDB()->fetchArray($result); 
    53                         $this->gwsGroupIDs = explode(',',$row['groupIDs']); 
    54                         require_once(WCF_DIR.'lib/data/user/group/Group.class.php'); 
    55                         $canplay = false; 
    56                         foreach ($this->gwsGroupIDs as $groupID){ 
    57                                 if (Group::isMember($groupID)) $canplay = true; 
    58                         } 
    59                         if (!$canplay) { 
    60                                 require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
    61                                 throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.nogroupe')); 
    62                         } 
     47                GWSPCore::getCache()->addResource('competition-games-'.PACKAGE_ID, 
     48                        GWSP_DIR.'cache/competition.games-'.PACKAGE_ID.'.php', 
     49                        GWSP_DIR.'lib/system/cache/CacheBuilderGWSPGames.class.php'); 
     50                GWSPCore::getCache()->addResource('competition-user-'.PACKAGE_ID, 
     51                        GWSP_DIR.'cache/competition.user-'.PACKAGE_ID.'.php', 
     52                        GWSP_DIR.'lib/system/cache/CacheBuilderGWSPUser.class.php'); 
    6353                         
    64                 } 
     54                // Action !!!! 
     55                if ($this->action == 'go' && $this->gwsID) $this->startGame(); 
    6556        } 
    6657 
    6758        public function readData() { 
    6859                parent::readData(); 
     60                $this->gamesCache = GWSPCore::getCache()->get('competition-games-'.PACKAGE_ID); 
     61                $this->userCache = GWSPCore::getCache()->get('competition-user-'.PACKAGE_ID); 
    6962                $this->readGewinnspiele(); 
    7063        } 
     
    113106         
    114107        protected function readGewinnspiele() { 
    115                 $sql = "SELECT          `gwsID`, `gwsTitel`, `starttime`, `timeout`, `groupIDs`, `money` 
    116                                 FROM            gwsp".GWSP_N."_game gewinnspiele 
    117                                 ORDER BY        timeout ASC 
    118                                 LIMIT           ".$this->itemsPerPage." 
    119                                 OFFSET          ".(($this->pageNo - 1) * $this->itemsPerPage); 
    120                 $result = GWSPCore::getDB()->sendQuery($sql); 
    121                 while ($row = GWSPCore::getDB()->fetchArray($result)) { 
    122                         $gewinnspiele =array( 
    123                                                         'gwsID'         => $row['gwsID'], 
    124                                                         'groupIDs'      => $row['groupIDs'], 
    125                                                         'permission' => '', 
    126                                                         'done'          => '', 
    127                                                         ); 
     108                foreach ($this->gamesCache as $gewinnspiel ) { 
     109                        // Check for Guthaben Plugin 
    128110                        if (!defined('GUTHABEN_ENABLE_GLOBAL')){ 
    129                                 $row['money'] = 0; 
     111                                $gewinnspiel['money'] = 0; 
    130112                        } 
    131                         // Kontrolle ob Gruppe berechtigt ist 
    132                         $row['permission'] = 'nein'; 
    133                         $IDs = explode(',',$row['groupIDs']); 
     113                        // Check gruppe permission 
     114                        $gewinnspiel['permission'] = 'nein'; 
     115                        $IDs = explode(',', $gewinnspiel['groupIDs']); 
    134116                        require_once(WCF_DIR.'lib/data/user/group/Group.class.php'); 
    135117                        foreach ($IDs as $gruppe) { 
    136                                 if (Group::isMember($gruppe)) $row['permission'] = 'ok'; 
     118                                $gewinnspiel['permission'] = false; 
     119                                if (Group::isMember($gruppe)) { 
     120                                        $gewinnspiel['permission'] = true; 
     121                                        break; 
     122                                }  
    137123                        } 
    138                         // Kontrolle ob User schon teilgenommen hat (nicht bei Gsten) 
     124                        // Kontrolle ob User schon teilgenommen hat (nicht bei GÀsten) 
    139125                        $id = GWSPCore::getUser()->userID; 
    140                         $row['done'] = 'notdone'; 
     126                        $gewinnspiel['done'] = 'notdone'; 
    141127                        if ($id){ 
    142                                 $sql1 = "SELECT COUNT(`userID`) AS users 
     128                                $sql = "SELECT  COUNT(`userID`) AS users 
    143129                                                FROM    gwsp".GWSP_N."_spiel 
    144                                                 WHERE   `gwsID` = ".$row['gwsID']." AND `userID`=".$id; 
    145                                 $row1 = GWSPCore::getDB()->getFirstRow($sql1); 
    146                                 if ($row1['users'])     {                
    147                                         $row['done'] = 'done'; 
     130                                                WHERE   `gwsID` = ".$gewinnspiel['gwsID']." AND `userID`=".$id; 
     131                                $row = GWSPCore::getDB()->getFirstRow($sql); 
     132                                if ($row['users'])      {                
     133                                        $gewinnspiel['done'] = 'done'; 
    148134                                } 
    149135                        } 
    150                         $this->gewinnspiele[] = $row; 
     136                        $this->gewinnspiele[] = $gewinnspiel; 
    151137                } 
    152138        } 
     
    156142                return $datumzeit; 
    157143        } 
     144 
     145        protected function startGame() { 
     146                $sql = "SELECT  `groupIDs` 
     147                                FROM    gwsp".GWSP_N."_game 
     148                                WHERE   gwsID = ".$this->gwsID.""; 
     149                $result = GWSPCore::getDB()->sendQuery($sql); 
     150                $row = GWSPCore::getDB()->fetchArray($result); 
     151                $this->gwsGroupIDs = explode(',',$row['groupIDs']); 
     152                require_once(WCF_DIR.'lib/data/user/group/Group.class.php'); 
     153                $canplay = false; 
     154                foreach ($this->gwsGroupIDs as $groupID){ 
     155                        if (Group::isMember($groupID)) $canplay = true; 
     156                } 
     157                if (!$canplay) { 
     158                        require_once(WCF_DIR.'lib/system/exception/NamedUserException.class.php'); 
     159                        throw new NamedUserException(GWSPCore::getLanguage()->get('gws.gewinnspiel.nogroupe')); 
     160                } 
     161        } 
    158162} 
    159163 
  • de.inside.Gewinnspiel/files/lib/system/cache/CacheBuilderGWSPGames.class.php

    r616 r661  
    1616        public function getData($cacheResource) { 
    1717                $data = array(); 
     18                $questions = array(); 
    1819                 
    1920                $sql = "SELECT  t1.gwsID AS gwsID, t1.gwsTitel AS gwsTitel, 
    2021                                                t1.starttime AS starttime, t1.timeout AS timeout, 
    21                                                 t1.recipient AS recipient, t1.regeln AS regeln, 
     22                                                t1.recipient AS recipient, t1.regeln AS rules, 
    2223                                                t1.discl AS disclaimer, t1.beschreib AS description, 
    2324                                                t1.groupIDs AS groupIDs, t1.money AS money, 
     
    2526                                                        FROM    gwsp".GWSP_N."_spiel as t2 
    2627                                                        WHERE   t2.gwsID = t1.`gwsID`) 
    27                                                 AS userCount, 
     28                                                AS userCount, 1 AS questions 
    2829                                FROM gwsp".GWSP_N."_game AS t1 
    2930                                ORDER BY t1.`gwsID` DESC"; 
    3031                $result = GWSPCore::getDB()->sendQuery($sql); 
    3132                while ($row = GWSPCore::getDB()->fetchArray($result)) { 
    32                         $data[] = $row; 
    3333                        $sql = "SELECT *  
    3434                                        FROM    gwsp".GWSP_N."_options 
    3535                                        WHERE   gwsID = ".$row['gwsID']." 
    36                                         ORDER   showOrder ASC"; 
     36                                        ORDER BY  showOrder ASC"; 
    3737                        $questions = GWSPCore::getDB()->sendQuery($sql); 
    38                         $data['questions'] = GWSPCore::getDB()->getFirstRow($questions); 
     38                        $row['questions'] = GWSPCore::getDB()->fetchArray($questions); 
     39                        $data[] = $row; 
    3940                } 
    4041                return $data; 
  • de.inside.Gewinnspiel/files/lib/system/cache/CacheBuilderGWSPUser.class.php

    r616 r661  
    1717                $data = array(); 
    1818                 
    19                 $sql = "SELECT  t1.gwsID, t1.userID, t2.username 
     19                $sql = "SELECT  t1.gwsID, t1.userID, t2.username, 
    2020                                                t1.ipaddress, t1.email, t1.realName 
    2121                                FROM gwsp".GWSP_N."_spiel AS t1 left join wcf".WCF_N."_user AS t2 ON t2.userID = t1.userID 
  • de.inside.Gewinnspiel/files/style/competition.css

    r563 r661  
    11 
    2 /* ### -- -- -- -- -- Special Burning Board 3 Styles -- -- -- -- -- ### */ 
     2/* ### -- -- -- -- -- Competition / Gewinnspiel Styles -- -- -- -- -- ### */ 
    33 
    44/*  
    55 
    6 File: burningBoard.css  
    7 Copyright 2006 by WoltLab GmbH.  
     6File: competition.css  
     7Copyright 2008 by INSIDE das Hörspiel.  
    88 
    99*/ 
    1010 
    11 /* ### -- -- -- -- -- Miscellaneous -- -- -- -- -- ### */ 
     11/* ### -- -- -- -- -- general -- -- -- -- -- ### */ 
    1212 
    13 .hot { 
    14         font-weight: bold; 
     13.gwspCopyHint { 
     14 
    1515} 
    1616 
    17 .interesting a { 
    18         font-style: italic; 
     17/* ### -- -- -- -- -- Index / Competition list -- -- -- -- -- ### */ 
     18 
     19/* Icons */ 
     20.tableList th.gwspColumnIcon {  
     21        white-space: nowrap; 
     22        width:1%; 
     23} 
     24.tableList td.gwspColumnIcon {  
     25        white-space: nowrap; 
     26        width:1%; 
    1927} 
    2028 
    21 .threadStarter { 
    22         font-style: italic; 
     29/* date & time */ 
     30.tableList th.gwspColumnDatum { 
     31        text-align: center; 
     32        white-space: nowrap;  
     33        min-width: 150px; 
    2334} 
    24  
    25 .topicQuickEdit { 
    26         display: none; 
    27         width: 50%; 
    28 } 
    29  
    30 .prefix strong { 
    31         font-weight: normal; 
    32 } 
    33  
    34 .headlineContainer h1 .prefix { 
    35         font-size: .7em; 
    36 } 
    37  
    38 .smallPages { 
    39         float: right; 
    40         height: 24px; 
    41 } 
    42  
    43 .goToNewPost { 
    44         margin-right: 3px; 
    45         float: left; 
    46 } 
    47  
    48 .topic input, .headlineContainer h1 input  { 
    49         width: 70%; 
    50 } 
    51  
    52 .threadSort:after { 
    53         content: ""; 
    54         height: 0; 
    55         display: block; 
    56         clear: both; 
    57 } 
    58  
    59 .breadCrumbs .prefix { 
    60         text-decoration: none; 
    61 } 
    62  
    63 /* ### -- -- -- -- -- Quick Jump -- -- -- -- -- ### */ 
    64  
    65 .quickJump { 
    66         white-space: nowrap; 
    67         width: auto; 
    68 } 
    69  
    70 .quickJump select { 
    71         width: auto; 
    72 } 
    73  
    74 /* ### -- -- -- -- -- Page Options -- -- -- -- -- ### */ 
    75  
    76 .pageOptions { 
    77         float: right; 
    78 } 
    79  
    80 .pageOptions form, .pageOptions div { 
    81         display: inline; 
    82 } 
    83  
    84 .pageOptions a, .pageOptions form { 
    85         text-decoration: none; 
    86         margin-left: 10px; 
    87 } 
    88  
    89 .pageOptions a span { 
    90         text-decoration: underline; 
    91 } 
    92  
    93 .pageOptions a:hover span { 
    94         text-decoration: none; 
    95 } 
    96  
    97 /* ### -- -- -- -- -- Board List -- -- -- -- -- ### */ 
    98  
    99 #boardlist, #boardlist ul { 
    100         list-style: none; 
    101         padding: 0; 
    102         margin: 0; 
    103 } 
    104  
    105 #boardlist { 
    106         margin-bottom: 20px; 
    107 } 
    108  
    109 #boardlist .boardlistInner { 
    110         min-height: 16px; 
    111 } 
    112  
    113 #boardlist .container-1, #boardlist .container-2  { 
    114         background-repeat: no-repeat; 
    115         background-position: center left; 
    116 } 
    117  
    118 #boardlist li ul .boardlistInner { 
    119         padding-left: 30px; 
    120 } 
    121  
    122 #boardlist li ul li ul .boardlistInner { 
    123         padding-left: 60px; 
    124 } 
    125  
    126 #boardlist li ul li ul li ul .boardlistInner { 
    127         padding-left: 90px; 
    128 } 
    129  
    130 #boardlist li { 
    131         min-height: 0; 
    132 } 
    133  
    134 #boardlist .containerContent:after { 
    135         content: ""; 
    136         height: 0; 
    137         display: block; 
    138         clear: both; 
    139 } 
    140  
    141 #boardlist .container-1, #boardlist .container-2 { 
    142         padding: 4px; 
    143 } 
    144  
    145 .boardlistLastPost { 
    146         margin: -1.5em 3em 0 3em; 
    147         float: right; 
    148         width: 40%; 
    149         overflow: hidden; 
    150 } 
    151  
    152 #boardlist .boardTitle { 
    153         width: 45%; 
    154 } 
    155  
    156 #boardlist .containerHead .boardTitle { 
    157         width: 99.5%; 
    158 } 
    159  
    160 #boardlist .boardlistSubboards { 
    161         margin: 3px 0 0 0; 
    162         padding: 0; 
    163         min-height: 0; 
    164 } 
    165  
    166 #boardlist .boardlistSubboards { 
    167         margin: 3px 0 0 0; 
    168 } 
    169  
    170 #boardlist .boardlistSubboards h4, #boardlist .boardlistSubboards h5, #boardlist .boardlistSubboards h6 { 
    171         display: inline; 
    172 } 
    173  
    174 .boardlistUserOnline, .moderators { 
    175         margin-top: 3px; 
    176 } 
    177  
    178 .boardlistDescription { 
    179         margin-bottom: 3px; 
    180 } 
    181  
    182 .boardlistCounter { 
    183         margin-bottom: 3px; 
    184 } 
    185  
    186 /* ### -- -- -- Thread List -- -- -- ###*/ 
    187  
    188 .tableList .columnLastPost { 
    189         width: 30%; 
    190 } 
    191  
    192 .tableList .columnLastPost p { 
     35.tableList td.gwspColumnDatum { 
     36        white-space: nowrap;  
     37        min-width: 150px; 
    19338        text-align: center; 
    19439} 
    19540 
    196 .tableList .columnLastPost .containerContentSmall p { 
     41/* competition description */ 
     42.tableList th.gwspColumnMarkContent {  
     43        text-align: center; 
     44} 
     45.tableList td.gwspColumnMarkContent {  
    19746        text-align: left; 
     47        padding-left: 5px; 
    19848} 
    19949 
    200 .tableList .columnTopic { 
    201         width: 70%; 
    202 } 
    20350 
    204 .tableList .columnTopic div.topic { 
    205         overflow: hidden; 
    206 } 
    207  
    208 .tableList .columnViews, .tableList .columnReplies { 
    209         text-align: center; 
    210 } 
    211  
    212 .tableList .columnRating, .tableList .columnLastActivity { 
    213         white-space: nowrap; 
    214 } 
    215  
    216 /* todo: find a better solution, because this makes problems, when more than  
    217 only one image is in that td, e.g. delete and enable action 
    218 -> maybe apply this via javascript, as it is only needed for drop down menus 
    219  */ 
    220 .tableList td.columnIcon img { 
     51.gwspContainerIcon { 
     52        padding-top:5px; 
    22153        display: block; 
    222 } 
    223  
    224 /* ### -- -- -- Similar Threads -- -- -- ###*/ 
    225  
    226 .similarThreads { 
    227         list-style: none; 
    228         margin-top: 10px; 
    229         padding: 0; 
    230 } 
    231  
    232 .similarThreads li { 
    233         min-height: 0; 
    234 } 
    235  
    236 .similarThreads .breadCrumbs { 
    237         margin: 0; 
    238 } 
    239  
    240 /* ### -- -- -- Moderation Overview -- -- -- ###*/ 
    241  
    242 .moderationOverview { 
    243         list-style: none; 
    244         margin: 15px 0 5px 0 !important; 
    245         padding: 0; 
    246 } 
    247  
    248 .moderationOverview:after { 
    249         content: ""; 
    250         height: 0; 
    251         display: block; 
    252         clear: both; 
    253 } 
    254  
    255 .moderationOverview ul { 
    256         list-style: none; 
    257         margin: 0; 
    258         padding: 0; 
    259 } 
    260  
    261 .moderationOverview img { 
    262         margin-right: 5px; 
    263         float: left; 
    264 } 
    265  
    266 .moderationOverview li { 
    267         margin: 0 5% 10px 0; 
    268         float: left; 
    269         width: 40%; 
    270         min-height: 48px; 
    271 } 
    272  
    273 .moderationOverview li ul li { 
    274         margin: 3px 0 3px 0; 
    275         float: none; 
    276         width: auto; 
    277         min-height: 0; 
    278 } 
    279  
    280 /* ### -- -- -- -- -- Delete Post -- -- -- -- -- ### */ 
    281  
    282 .deletePost input[type="submit"] { 
    283         float: right; 
    284 } 
    285  
    286 .deletePost .formField { 
    287         float: left; 
    288 } 
    289  
    290 .deletePost:after { 
    291         content: ""; 
    292         height: 0; 
    293         display: block; 
    294         clear: both; 
     54        float:left; 
     55        margin-left:8px; 
     56        text-align:center; 
     57        width:30px; 
    29558} 
    29659 
  • de.inside.Gewinnspiel/package.xml

    r603 r661  
    3434                <requiredpackage minversion="1.0.7">com.woltlab.wcf.page.user.profile</requiredpackage> 
    3535 
    36 <!-- Pakete unter Woltlab Lizenz 
    37                 <requiredpackage minversion="1.0.6">com.woltlab.wcf.data.message.pm</requiredpackage> 
    38                 <requiredpackage minversion="1.0.2">com.woltlab.wcf.data.user.messenger</requiredpackage> 
    39                 <requiredpackage minversion="1.0.3">com.woltlab.wcf.acp.user.avatar</requiredpackage> 
    40                 <requiredpackage minversion="1.0.2">com.woltlab.wcf.acp.user.rank</requiredpackage> 
    41                 <requiredpackage minversion="1.0.4">com.woltlab.wcf.acp.content.smiley</requiredpackage> 
    42                 <requiredpackage minversion="1.0.2">com.woltlab.wcf.acp.content.bbcode</requiredpackage> 
    43                 <requiredpackage minversion="1.0.5">com.woltlab.wcf.acp.user.option</requiredpackage> 
    44                 <requiredpackage minversion="1.0.3">com.woltlab.wcf.acp.display.language</requiredpackage> 
    45                 <requiredpackage minversion="1.0.3">com.woltlab.wcf.acp.system.db</requiredpackage> 
    46                 <requiredpackage minversion="1.0.4">com.woltlab.wcf.acp.display.template</requiredpackage> --> 
     36<!-- Pakete unter Woltlab Lizenz --> 
    4737                <requiredpackage minversion="1.0.6">com.woltlab.wcf.acp.display.style</requiredpackage> 
    4838                <requiredpackage minversion="1.0.5">com.woltlab.wcf.form.user.signature</requiredpackage> 
    49 <!--            <requiredpackage minversion="1.0.4">com.woltlab.wcf.form.user.group</requiredpackage> 
    50                 <requiredpackage minversion="1.0.3 pl 1">com.woltlab.wcf.page.user.membersList</requiredpackage> 
    51                 <requiredpackage minversion="1.0.4">com.woltlab.wcf.page.user.usersOnline</requiredpackage> 
    52                 <requiredpackage minversion="1.0.3">com.woltlab.wcf.page.user.membersList.team</requiredpackage> 
    53 --> 
    5439 
    5540        </requiredpackages> 
  • de.inside.Gewinnspiel/templates/footer.tpl

    r579 r661  
    1         <p class="copyright">{lang}gws.gewinnspiel.copyhint{/lang}</p> 
     1        <p class="copyright gwspCopyHint">{lang}gws.gewinnspiel.copyhint{/lang}</p> 
    22</div> 
  • de.inside.Gewinnspiel/templates/gewinnspiel.tpl

    r579 r661  
    1111<div id="main"> 
    1212        <ul class="breadCrumbs"> 
    13                 <li><a href="index.php?page=Gewinnspiel{@SID_ARG_2ND}"><img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielS.png" alt="" /> <span>{lang}gws.gewinnspiel.title{/lang}</span></a> &raquo;</li> 
     13                <li><a href="index.php?page=Index{@SID_ARG_2ND}"><img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielS.png" alt="" /> <span>{lang}gws.gewinnspiel.title{/lang}</span></a> &raquo;</li> 
    1414                <li><a href="index.php?form=Gewinnspiel&gwsID={$gwsID}{@SID_ARG_2ND}"><img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielS.png" alt="" /> <span>{@$gwsTitel}</span></a> &raquo;</li> 
    1515        </ul> 
     
    2323        </div> 
    2424        {if $errorField} 
    25                 <p class="error">{lang}gws.global.form.error{/lang}</p> 
     25                <p class="error">{lang}wcf.global.form.error{/lang}</p> 
    2626        {/if} 
    2727 
     
    176176                                {if $errorField == 'akzept'} 
    177177                                        <p class="innerError"> 
    178                                                 {if $errorType == 'empty'}{lang}gws.global.error.empty{/lang}{/if} 
     178                                                {if $errorType == 'empty'}{lang}wcf.global.error.empty{/lang}{/if} 
    179179                                        </p> 
    180180                                {/if} 
     
    182182                </div> 
    183183                <div class="formSubmit"> 
    184                         <input type="submit" name="send" accesskey="s" value="{lang}gws.global.button.submit{/lang}" /> 
    185                         <input type="reset" name="reset" accesskey="r" value="{lang}gws.global.button.reset{/lang}" /> 
     184                        <input type="submit" name="send" accesskey="s" value="{lang}wcf.global.button.submit{/lang}" /> 
     185                        <input type="reset" name="reset" accesskey="r" value="{lang}wcf.global.button.reset{/lang}" /> 
    186186                        <input type="hidden" name="gwsID" value="{@$gwsID}" /> 
    187187                </div> 
  • de.inside.Gewinnspiel/templates/index.tpl

    r579 r661  
    2424                <div class="container-1"> 
    2525                                <div class="contentHeader"> 
    26                                         {assign var=multiplePagesLink value="index.php?page=Gewinnspiel&pageNo=%d"} 
     26                                        {assign var=multiplePagesLink value="index.php?page=Index&pageNo=%d"} 
    2727                                        {pages print=true assign=pagesOutput link=$multiplePagesLink|concat:SID_ARG_2ND_NOT_ENCODED} 
    2828                                </div> 
     
    3232                                        <thead> 
    3333                                                <tr class="tableHead"> 
    34                                                         <th class="columnIcon"><div>{lang}gws.acp.gwsID{/lang}</div></th> 
    35                                                         <th class="columnBoxname"><div>{lang}gws.acp.titelname{/lang}</div></th> 
    36                                                         <th class="columnBoxname"><div>{lang}gws.gewinnspiel.start{/lang}</div></th> 
    37                                                         <th class="columnBoxname"><div>{lang}gws.gewinnspiel.timeout{/lang}</div></th> 
    38                                                         <th class="columnIcon"><div>{lang}gws.gewinnspiel.statusmain{/lang}</div></th> 
     34                                                        <th class="gwspColumnIcon"><div>{lang}gws.acp.gwsID{/lang}</div></th> 
     35                                                        <th class="gwspColumnMarkContent"><div>{lang}gws.acp.titelname{/lang}</div></th> 
     36                                                        <th class="gwspColumnDatum"><div>{lang}gws.gewinnspiel.start{/lang}</div></th> 
     37                                                        <th class="gwspColumnDatum"><div>{lang}gws.gewinnspiel.timeout{/lang}</div></th> 
     38                                                        <th class="gwspColumnIcon"><div>{lang}gws.gewinnspiel.statusmain{/lang}</div></th> 
    3939                                                </tr> 
    4040                                        </thead> 
    41                                         <tbody> 
    42                                                 {foreach from=$gewinnspiele item=gewinnspiel} 
    43                                                         <tr class="{cycle values="container-1,container-2" advance=false} id="{@$gewinnspiel.gwsID}""> 
    44                                                                 <td class="columnIcon"> 
     41                                        {foreach from=$gewinnspiele item=gewinnspiel} 
     42                                                <tbody> 
     43                                                        {cycle values='container-1,container-2' name='className' print=false advance=false} 
     44                                                        <tr class="{cycle name='className'}" id="gwsp{$gewinnspiel.gwsID}"> 
     45                                                                <td class="gwspColumnIcon"> 
    4546                                                                        <b>{@$gewinnspiel.gwsID}</b> 
    4647                                                                </td> 
    47                                                                 <td class="columnname columnText"> 
     48                                                                <td class="gwspColumnMarkContent"> 
    4849                                                                        <b>{@$gewinnspiel.gwsTitel}</b> 
    4950                                                                        {if $gewinnspiel.money} 
     
    5253                                                                        {/if} 
    5354                                                                </td> 
    54                                                                 <td class="columnMarkUsers" align="center"> 
     55                                                                <td class="gwspColumnDatum"> 
    5556                                                                        {@$gewinnspiel.starttime|shorttime} 
    5657                                                                </td> 
    57                                                                 <td class="columnMarkUsers" align="center"> 
     58                                                                <td class="gwspColumnDatum"> 
    5859                                                                        {@$gewinnspiel.timeout|shorttime} 
    5960                                                                </td> 
    60                                                                 <td class="columnIcon"> 
     61                                                                <td class="gwspColumnIcon"> 
    6162                                                                        {if $gewinnspiel.timeout < TIME_NOW} 
    6263                                                                                <img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielEndeS.png" alt="{lang}gws.gewinnspiel.statusended{/lang}" title="{lang}gws.gewinnspiel.statusended{/lang}" /> 
     
    6667                                                                        {/if} 
    6768                                                                        {if $gewinnspiel.starttime < TIME_NOW && $gewinnspiel.timeout > TIME_NOW} 
    68                                                                                 {if $gewinnspiel.permission == "ok" && $gewinnspiel.done == "notdone"} 
     69                                                                                {if $gewinnspiel.permission == true && $gewinnspiel.done == "notdone"} 
    6970                                                                                <a href="index.php?form=Gewinnspiel&amp;gwsID={@$gewinnspiel.gwsID}{@SID_ARG_2ND}" alt='{lang}gws.gewinnspiel.statusspielen{/lang}'><img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielGoS.png" alt="{lang}gws.gewinnspiel.statusspielen{/lang}" title="{lang}gws.gewinnspiel.statusspielen{/lang}" /></a> 
    7071                                                                                {/if} 
    71                                                                                 {if $gewinnspiel.permission == "ok" && $gewinnspiel.done == "done"} 
     72                                                                                {if $gewinnspiel.permission == true && $gewinnspiel.done == "done"} 
    7273                                                                                <img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielNotokS.png" alt="{lang}gws.gewinnspiel.statusgespielt{/lang}" title="{lang}gws.gewinnspiel.statusgespielt{/lang}" /> 
    7374                                                                                {/if} 
    74                                                                                 {if $gewinnspiel.permission == "nein" && $gewinnspiel.done == "notdone"} 
     75                                                                                {if !$gewinnspiel.permission && $gewinnspiel.done == "notdone"} 
    7576                                                                                <img src="{@RELATIVE_GWSP_DIR}icon/gewinnspielNotokS.png" alt="{lang}gws.gewinnspiel.statusnotok{/lang}" title="{lang}gws.gewinnspiel.statusnotok{/lang}" /> 
    7677                                                                                {/if} 
     
    8384                        </fieldset> 
    8485                        <div class="contentHeader"> 
    85                                 {assign var=multiplePagesLink value="index.php?page=Gewinnspiel&pageNo=%d"} 
     86                                {assign var=multiplePagesLink value="index.php?page=Index&pageNo=%d"} 
    8687                                {pages print=true assign=pagesOutput link=$multiplePagesLink|concat:SID_ARG_2ND_NOT_ENCODED} 
    8788                        </div>