Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class public_game_test_test extends ipsCommand
- {
- public function doExecute( ipsRegistry $registry )
- {
- if(!$this->memberData['member_id'])
- {
- $this->registry->output->showError('nie jesteś zalogowany.',0);
- }
- switch( $this->request['do'] )
- {
- case 'przyklad':
- $success = $this->wykonajPrzyklad($success);
- break;
- }
- $template = $this->registry->output->getTemplate('game')->test($success);
- $this->registry->output->addContent($template);
- $this->registry->output->setTitle('Konto premium');
- $this->registry->output->addNavigation('Konto Premium', 'app=panel&module=test§ion=test', 'false', 'test', 'public');
- $this->registry->output->sendOutput();
- }
- public function wykonajPrzyklad($execution)
- {
- if(!$this->memberData['member_id'])
- {
- $this->registry->output->showError('nie jestes zalogowany.',0);
- }
- if($this->memberData['points'] < 100)
- {
- $execution = 1;
- }
- else
- {
- //Twój kod, zwracamy $return
- $this->registry->output->redirectScreen('Operacja przebiegła pomyślnie.', $this->settings['base_url'] . 'index.php');
- }
- $return $execution;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment