public function display()
 {
     $strTag = utf8_strtolower($this->patharray[0]);
     if (!strlen($strTag)) {
         redirect($this->controller_path_plain . $this->SID);
     }
     $arrArticleIDs = $this->pdh->get('articles', 'articles_for_tag', array($strTag));
     $arrArticleIDs = $this->pdh->sort($arrArticleIDs, 'articles', 'date', 'desc');
     $intStart = $this->in->get('start', 0);
     $arrLimitedIDs = $this->pdh->limit($arrArticleIDs, $intStart, $this->user->data['user_nlimit']);
     //Articles to template
     foreach ($arrLimitedIDs as $intArticleID) {
         $userlink = '<a href="' . $this->routing->build('user', $this->pdh->geth('articles', 'user_id', array($intArticleID)), 'u' . $this->pdh->get('articles', 'user_id', array($intArticleID))) . '">' . $this->pdh->geth('articles', 'user_id', array($intArticleID)) . '</a>';
         //Content dependet from list_type
         //1 = until readmore
         //2 = Headlines only
         //3 = only first 600 characters
         $strText = $this->pdh->get('articles', 'text', array($intArticleID));
         $arrContent = preg_split('#<hr(.*)id="system-readmore"(.*)\\/>#iU', xhtml_entity_decode($strText));
         $strText = $this->bbcode->parse_shorttags($arrContent[0]);
         $strPath = $this->pdh->get('articles', 'path', array($intArticleID));
         $intCategoryID = $this->pdh->get('articles', 'category', array($intArticleID));
         //Replace Image Gallery
         $arrGalleryObjects = array();
         preg_match_all('#<p(.*)class="system-gallery"(.*) data-sort="(.*)" data-folder="(.*)">(.*)</p>#iU', $strText, $arrGalleryObjects, PREG_PATTERN_ORDER);
         if (count($arrGalleryObjects[0])) {
             include_once $this->root_path . 'core/gallery.class.php';
             foreach ($arrGalleryObjects[4] as $key => $val) {
                 $objGallery = registry::register('gallery');
                 $strGalleryContent = $objGallery->create($val, (int) $arrGalleryObjects[3][$key], $this->server_path . $strPath, 1);
                 $strText = str_replace($arrGalleryObjects[0][$key], $strGalleryContent, $strText);
             }
         }
         //Replace Raidloot
         $arrRaidlootObjects = array();
         preg_match_all('#<p(.*)class="system-raidloot"(.*) data-id="(.*)"(.*) data-chars="(.*)">(.*)</p>#iU', $strText, $arrRaidlootObjects, PREG_PATTERN_ORDER);
         if (count($arrRaidlootObjects[0])) {
             include_once $this->root_path . 'core/gallery.class.php';
             foreach ($arrRaidlootObjects[3] as $key => $val) {
                 $objGallery = registry::register('gallery');
                 $withChars = $arrRaidlootObjects[5][$key] == "true" ? true : false;
                 $strRaidlootContent = $objGallery->raidloot((int) $val, $withChars);
                 $strText = str_replace($arrRaidlootObjects[0][$key], $strRaidlootContent, $strText);
             }
         }
         $this->comments->SetVars(array('attach_id' => $intArticleID, 'page' => 'articles'));
         $intCommentsCount = $this->comments->Count();
         //Tags
         $arrTags = $this->pdh->get('articles', 'tags', array($intArticleID));
         $this->tpl->assign_block_vars('article_row', array('ARTICLE_CONTENT' => $strText, 'ARTICLE_TITLE' => $this->pdh->get('articles', 'title', array($intArticleID)), 'ARTICLE_SUBMITTED' => sprintf($this->user->lang('news_submitter'), $userlink, $this->time->user_date($this->pdh->get('articles', 'date', array($intArticleID)), false, true)), 'ARTICLE_DATE' => $this->time->user_date($this->pdh->get('articles', 'date', array($intArticleID)), false, false, true), 'ARTICLE_PATH' => $this->controller_path . $this->pdh->get('articles', 'path', array($intArticleID)), 'ARTICLE_SOCIAL_BUTTONS' => $arrCategory['social_share_buttons'] ? $this->social->createSocialButtons($this->env->link . $this->pdh->get('articles', 'path', array($intArticleID)), strip_tags($this->pdh->get('articles', 'title', array($intArticleID)))) : '', 'PERMALINK' => $this->pdh->get('articles', 'permalink', array($intArticleID)), 'S_TAGS' => count($arrTags) && $arrTags[0] != "" ? true : false, 'ARTICLE_CUTTED_CONTENT' => truncate($strText, 600, '...', false, true), 'S_READMORE' => isset($arrContent[1]) ? true : false, 'COMMENTS_COUNTER' => $intCommentsCount == 1 ? $intCommentsCount . ' ' . $this->user->lang('comment') : $intCommentsCount . ' ' . $this->user->lang('comments'), 'S_COMMENTS' => $this->pdh->get('articles', 'comments', array($intArticleID)) ? true : false, 'S_FEATURED' => $this->pdh->get('articles', 'featured', array($intArticleID))));
         if (count($arrTags) && $arrTags[0] != "") {
             foreach ($arrTags as $tag) {
                 $this->tpl->assign_block_vars('article_row.tag_row', array('TAG' => $tag, 'U_TAG' => $this->routing->build('tag', $tag)));
             }
         }
     }
     $this->tpl->assign_vars(array('TAG' => sanitize($strTag), 'PAGINATION' => generate_pagination($this->strPath . $this->SID, count($arrArticleIDs), $this->user->data['user_nlimit'], $intStart, 'start')));
     $this->tpl->add_meta('<link rel="canonical" href="' . $this->env->link . $this->routing->build('tag', $tag, false, false, true) . '" />');
     $this->core->set_vars(array('page_title' => $this->user->lang("tag") . ': ' . sanitize($strTag), 'template_file' => 'tag.html', 'display' => true));
 }
Exemple #2
0
 public function __construct($cache_type = false)
 {
     $this->global_prefix = $this->config->get('prefix', 'pdc') ? $this->config->get('prefix', 'pdc') : $this->table_prefix;
     $this->cache_folder = $this->pfh->FolderPath('data', 'cache');
     if ($this->config->get('dttl', 'pdc')) {
         $this->default_ttl = $this->config->get('dttl', 'pdc');
     }
     //make sure the folder is protected by a .htaccess file
     $this->pfh->secure_folder('data', 'cache');
     //read expiry date tab
     $result = @file_get_contents($this->cache_folder . 'expiry_dates.php');
     if ($result !== false) {
         $this->expiry_dates = unserialize($result);
     } else {
         $this->save_expiry_dates();
     }
     //create our cache object
     if (!$cache_type) {
         $cache_type = $this->config->get('mode', 'pdc') ? 'cache_' . $this->config->get('mode', 'pdc') : 'cache_none';
     }
     require_once $this->root_path . 'core/cache/cache.iface.php';
     require_once $this->root_path . 'core/cache/' . $cache_type . '.class.php';
     $this->cache = registry::register($cache_type);
     //pdl fun
     if (!$this->pdl->type_known("pdc_query")) {
         $this->pdl->register_type("pdc_query", null, array($this, 'pdl_html_format_pdc_query'), array(2, 3, 4));
     }
 }
 public function output()
 {
     include_once $this->root_path . 'portal/twitter/twittermodule.class.php';
     $rss_feeds = registry::register('twittermodule');
     $this->header = $this->user->lang('twitter');
     return $rss_feeds->output_left;
 }
 public function __get($name)
 {
     $deps = registry::get_const('short_' . get_class($this));
     if (isset($deps[$name])) {
         if (is_array($deps[$name])) {
             return registry::register($deps[$name][0], $deps[$name][1]);
         } else {
             return registry::register($deps[$name]);
         }
     }
     if (is_array($deps) && is_int(array_search($name, $deps))) {
         if (isset(registry::$aliases[$name])) {
             if (is_array(registry::$aliases[$name])) {
                 return registry::register(registry::$aliases[$name][0], registry::$aliases[$name][1]);
             } else {
                 return registry::register(registry::$aliases[$name]);
             }
         } elseif (registry::class_exists($name)) {
             return registry::register($name);
         }
     }
     if ($const = registry::get_const($name)) {
         return $const;
     }
     return null;
 }
 public function __get($name)
 {
     $shorts = static::__shortcuts();
     if (isset($shorts[$name])) {
         if (is_array($shorts[$name])) {
             return registry::register($shorts[$name][0], $shorts[$name][1]);
         } else {
             return registry::register($shorts[$name]);
         }
     }
     if (is_int(array_search($name, $shorts))) {
         if (isset(registry::$aliases[$name])) {
             if (is_array(registry::$aliases[$name])) {
                 return registry::register(registry::$aliases[$name][0], registry::$aliases[$name][1]);
             } else {
                 return registry::register(registry::$aliases[$name]);
             }
         } elseif (registry::class_exists($name)) {
             return registry::register($name);
         }
     }
     if ($const = registry::get_const($name)) {
         return $const;
     }
     return null;
 }
 public function output()
 {
     $strModule = $this->config('module');
     if (!strlen($strModule)) {
         $strModule = "ts3";
     }
     $arrSettingsArray = $this->get_settings('fetch_new');
     $arrOptions = array();
     foreach ($arrSettingsArray as $key => $value) {
         $arrOptions[$key] = $this->config($key);
     }
     $out = "";
     if ($strModule == "ts3") {
         include_once $this->root_path . 'portal/voice/modules/teamspeak3/teamspeak3_voice.class.php';
         $ts3 = registry::register('teamspeak3_voice', array($arrOptions));
         $out = $ts3->output();
     } elseif ($strModule == "ventrilo") {
         include_once $this->root_path . 'portal/voice/modules/ventrilo/ventrilo_voice.class.php';
         $ventrilo = new ventrilo_voice($arrOptions);
         $out = $ventrilo->output();
     } elseif ($strModule == "mumble") {
         include_once $this->root_path . 'portal/voice/modules/mumble/mumble_voice.class.php';
         $mumble = registry::register('mumble_voice', array($arrOptions));
         $out = $mumble->output();
     }
     $this->header = $this->user->lang($strModule);
     return $out;
 }
 public function parse_input()
 {
     //Delete yourself
     $pfh = registry::register('file_handler', array('installer'));
     $pfh->Delete($this->root_path . 'supporttool/');
     header('Location: ' . $this->root_path . 'index.php');
     exit;
 }
 public function output()
 {
     include_once $this->root_path . 'portal/mmo_news/mmo_news_rss.class.php';
     $class = registry::register('mmo_news_rss', array($this->position, $this->id));
     $output = $class->output_left;
     $this->header = sanitize($class->header);
     return $output;
 }
    function WoWMacroexport($raid_id, $raid_groups = 0)
    {
        $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id));
        $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id));
        $a_json = array();
        foreach ($attendees as $id_attendees => $d_attendees) {
            $char_server = registry::register('plus_datahandler')->get('member', 'profile_field', array($id_attendees, 'servername'));
            $servername = $char_server != registry::register('config')->get('servername') ? $char_server : false;
            $a_json[] = array('name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'guest' => false, 'group' => $d_attendees['raidgroup'], 'realm' => $servername);
        }
        foreach ($guests as $guestsdata) {
            $a_json[] = array('name' => unsanitize($guestsdata['name']), 'status' => false, 'guest' => true, 'group' => $guestsdata['raidgroup'], 'realm' => false);
        }
        $json = json_encode($a_json);
        unset($a_json);
        registry::register('template')->add_js('
			genOutput()
			$("input[type=\'checkbox\'], #raidgroup").change(function (){
				genOutput()
			});
		', "docready");
        registry::register('template')->add_js('
		function genOutput(){
			var attendee_data = ' . $json . ';
			output = "";

			cb_guests		= ($("#cb_guests").attr("checked")) ? true : false;
			cb_confirmed	= ($("#cb_confirmed").attr("checked")) ? true : false;
			cb_signedin		= ($("#cb_signedin").attr("checked")) ? true : false;
			cb_backup		= ($("#cb_backup").attr("checked")) ? true : false;

			$.each(attendee_data, function(i, item) {
				if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){
					if($("#raidgroup").length == 0 || $("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){
						realmdata	 = (item.realm) ? "-" + item.realm : "";
						output		+= "/inv " + item.name + realmdata + "\\n";
					}
				}
			});
			$("#attendeeout").html(output);
		}
			');
        if (is_array($raid_groups)) {
            $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t</dl><dl>";
        }
        $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0));
        $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests');
        $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1));
        $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3));
        $text .= "<br/>";
        $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>";
        $text .= "</textarea>";
        $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>";
        return $text;
    }
    public function output()
    {
        $this->tpl->add_css('.mmo_news_portal .ui-accordion .ui-accordion-content {
				padding: 4px;
			}');
        include_once $this->root_path . 'portal/mmo_news/mmo_news_rss.class.php';
        $class = registry::register('mmo_news_rss', array($this->wide_content, $this->config('count')));
        $output = $class->output;
        $this->header = sanitize($class->header);
        return $output;
    }
Exemple #11
0
    function CSVexport($raid_id, $raid_groups)
    {
        $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id));
        $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id));
        $a_json = array();
        foreach ($attendees as $id_attendees => $d_attendees) {
            $a_json[] = array('name' => registry::register('plus_datahandler')->get('member', 'name', array($id_attendees)), 'status' => $d_attendees['signup_status'], 'guest' => false, 'group' => $d_attendees['raidgroup']);
        }
        foreach ($guests as $guestsdata) {
            $a_json[] = array('name' => $guestsdata['name'], 'status' => false, 'guest' => true, 'group' => $guestsdata['raidgroup']);
        }
        $json = json_encode($a_json);
        unset($a_json);
        registry::register('template')->add_js('
			genOutput()
			$("input[type=\'checkbox\'], #ip_seperator, #raidgroup").change(function (){
				genOutput()
			});
			
		', "docready");
        registry::register('template')->add_js('
		function genOutput(){
			var attendee_data = ' . $json . ';
			var data = [];

			ip_seperator	= ($("#ip_seperator").val() != "") ? $("#ip_seperator").val() : ",";
			cb_guests		= ($("#cb_guests").attr("checked")) ? true : false;
			cb_confirmed	= ($("#cb_confirmed").attr("checked")) ? true : false;
			cb_signedin		= ($("#cb_signedin").attr("checked")) ? true : false;
			cb_backup		= ($("#cb_backup").attr("checked")) ? true : false;

			$.each(attendee_data, function(i, item) {
				if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){
					if($("#raidgroup").val() == "0" || (item.group > 0 && item.group == $("#raidgroup").val())){
						data.push(item.name);
					}
				}
			});
			$("#attendeeout").html(data.join(ip_seperator));
		}
			');
        $text = "<dt><label>" . registry::fetch('user')->lang('raidevent_export_seperator') . "</label></dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<input type='text' name='seperator' id='ip_seperator' value=',' size='4' />\n\t\t\t\t\t</dd>\n\t\t\t\t</dl><dl>";
        $text .= "<dt><label>" . registry::fetch('user')->lang('raidevent_export_raidgroup') . "</label></dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t" . new hdropdown('raidgroup', array('options' => $raid_groups, 'value' => 0, 'id' => 'raidgroup')) . "\n\t\t\t\t\t</dd>\n\t\t\t\t</dl><dl>";
        $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0));
        $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests');
        $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1));
        $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3));
        $text .= "<br/>";
        $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>";
        $text .= "</textarea>";
        $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>";
        return $text;
    }
 public function __get($name)
 {
     if (class_exists('registry')) {
         if ($name == 'pfh') {
             return registry::register('file_handler');
         }
         if ($name == 'puf') {
             return registry::register('urlfetcher');
         }
     }
     return null;
 }
 /**
  * output
  * Get the portal output
  *
  * @returns string
  */
 public function output()
 {
     // initialize output
     $output = '';
     // check if shoutbox is installed
     if ($this->pm->check('shoutbox', PLUGIN_INSTALLED)) {
         if (!class_exists('ShoutboxClass')) {
             include_once $this->root_path . 'plugins/shoutbox/includes/shoutbox.class.php';
         }
         // create shoutbox
         $shoutbox = registry::register('ShoutboxClass', array($this->id));
         // do requirements check
         $requirementscheck = $shoutbox->checkRequirements();
         if ($requirementscheck !== true) {
             $output = $requirementscheck;
         } elseif (!$this->user->check_auth('u_shoutbox_view', false)) {
             $output = $this->user->lang('sb_no_view_permission');
         } else {
             // output depending on position
             $orientation = '';
             switch ($this->position) {
                 case 'left':
                 case 'right':
                     $orientation = 'vertical';
                     break;
                 case 'middle':
                 case 'bottom':
                     $orientation = 'horizontal';
                     break;
                 default:
                     $orientation = 'vertical';
                     break;
             }
             // return the output for module
             $output = $shoutbox->showShoutbox($orientation);
             //Calculate Max Width
             if ($this->user->style['column_left_width'] != "") {
                 if (strpos($this->user->style['column_left_width'], 'px') !== false) {
                     $max_width = intval($this->user->style['column_left_width']) - 30 . 'px';
                 } else {
                     $max_width = '97%';
                 }
             } else {
                 $max_width = "180px";
             }
             $this->tpl->add_css(".sb_vertical .sb_text_margin {\n\t\t\t\t\tmargin-left: 38px;\n\t\t\t\t}\n\n\t\t\t\t.sb_vertical p {\n\t\t\t\t\tmax-width: " . $max_width . ";\n\t\t\t\t\tword-wrap:break-word;\n\t\t\t\t}\n\n\t\t\t\t.sb_horizontal .sb_content_container{\n\t\t\t\t\tpadding: 2px 5px 2px 5px;\n\t\t\t\t\tbackground: #FFFFFF;\n\t\t\t\t\tborder: #ccc solid 1px;\n\t\t\t\t\t-webkit-border-radius: 4px;\n\t\t\t\t\t-moz-border-radius: 4px;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\n\t\t\t\t.sb_with_avatar.sb_content_container {\n\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t}\n\n\t\t\t\t.sb_horizontal .sb_with_avatar.sb_content_container:after{\n\t\t\t\t\tcontent: \"\";\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 10px;\n\t\t\t\t\tleft: -15px;\n\t\t\t\t\tborder-style: solid;\n\t\t\t\t\tborder-width: 11px 15px 11px 0;\n\t\t\t\t\tborder-color: transparent #FFFFFF;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\twidth: 0;\n\t\t\t\t\tz-index: 1;\n\t\t\t\t}\n\n\t\t\t\t.sb_horizontal .sb_with_avatar.sb_content_container:before{\n\t\t\t\t\tcontent: \"\";\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 10px;\n\t\t\t\t\tleft: -16px;\n\t\t\t\t\tborder-style: solid;\n\t\t\t\t\tborder-width: 11px 15px 11px 0;\n\t\t\t\t\tborder-color: transparent #ccc;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\twidth: 0;\n\t\t\t\t\tz-index: 0;\n\t\t\t\t}");
         }
     } else {
         $output = $this->user->lang('sb_plugin_not_installed');
     }
     return $output;
 }
    function WildstarMacroexport($raid_id)
    {
        $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id));
        $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id));
        $a_json = array();
        foreach ($attendees as $id_attendees => $d_attendees) {
            $a_json[] = array('name' => unsanitize(registry::register('plus_datahandler')->get('member', 'name', array($id_attendees))), 'status' => $d_attendees['signup_status'], 'guest' => false);
        }
        foreach ($guests as $guestsdata) {
            $a_json[] = array('name' => unsanitize($guestsdata['name']), 'status' => false, 'guest' => true);
        }
        $json = json_encode($a_json);
        unset($a_json);
        registry::register('template')->add_js('
			$("#gamelanguage").change(function (){
				genOutput()
			}).trigger("change");
			$("input[type=\'checkbox\']").change(function (){
				genOutput()
			});
		', "docready");
        registry::register('template')->add_js('
		function genOutput(){
			var attendee_data = ' . $json . ';
			output = "";

			cb_guests		= ($("#cb_guests").attr("checked")) ? true : false;
			cb_confirmed	= ($("#cb_confirmed").attr("checked")) ? true : false;
			cb_signedin		= ($("#cb_signedin").attr("checked")) ? true : false;
			cb_backup		= ($("#cb_backup").attr("checked")) ? true : false;
			chat_command	= ($("#gamelanguage").val() == "german") ? "/einladen" : "/invite";

			$.each(attendee_data, function(i, item) {
				if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){
					output += chat_command+" " + item.name + "\\n";
				}
			});
			$("#attendeeout").html(output);
		}
			');
        $text = registry::fetch('game')->glang('game_language') . ': ' . new hdropdown('language', array('options' => array('german' => 'Deutsch', 'english' => 'English'), 'value' => registry::fetch('config')->get('game_language'), 'id' => 'gamelanguage'));
        $text .= "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0));
        $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests');
        $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1));
        $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3));
        $text .= "<br/>";
        $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>";
        $text .= "</textarea>";
        $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>";
        return $text;
    }
Exemple #15
0
 /**
  * Include the Bridge file
  * 
  * @return boolean
  */
 private function init()
 {
     //Dont include if there is no connection
     if (!$this->status) {
         return false;
     }
     include_once $this->root_path . "core/bridges/bridge_generic.class.php";
     if (is_file($this->root_path . "core/bridges/" . $this->type . ".bridge.class.php")) {
         include_once $this->root_path . "core/bridges/" . $this->type . ".bridge.class.php";
         $this->objBridge = registry::register($this->type . '_bridge', array($this->bridgedb, $this->prefix));
         return true;
     }
     return false;
 }
    function WoWMacroexport($raid_id)
    {
        $attendees = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($raid_id));
        $guests = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($raid_id));
        $a_json = array();
        foreach ($attendees as $id_attendees => $d_attendees) {
            $a_json[] = array('name' => registry::register('plus_datahandler')->get('member', 'name', array($id_attendees)), 'status' => $d_attendees['signup_status'], 'guest' => false);
        }
        foreach ($guests as $guestsdata) {
            $a_json[] = array('name' => $guestsdata['name'], 'status' => false, 'guest' => true);
        }
        $json = json_encode($a_json);
        unset($a_json);
        registry::register('template')->add_js('
			genOutput()
			$("input[type=\'checkbox\']").change(function (){
				if ($(this).is(":checked")){
					genOutput()
				}
			});
		', "docready");
        registry::register('template')->add_js('
		function genOutput(){
			var attendee_data = ' . $json . ';
			output = "";

			cb_guests		= ($("#cb_guests").attr("checked")) ? true : false;
			cb_confirmed	= ($("#cb_confirmed").attr("checked")) ? true : false;
			cb_signedin		= ($("#cb_signedin").attr("checked")) ? true : false;
			cb_backup		= ($("#cb_backup").attr("checked")) ? true : false;

			$.each(attendee_data, function(i, item) {
				if((cb_guests && item.guest == true) || (cb_confirmed && !item.guest && item.status == 0) || (cb_signedin && item.status == 1) || (cb_backup && item.status == 3)){
					output += "/inv " + item.name + "\\n";
				}
			});
			$("#attendeeout").html(output);
		}
			');
        $text = "<input type='checkbox' checked='checked' name='confirmed' id='cb_confirmed' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 0));
        $text .= "<input type='checkbox' checked='checked' name='guests' id='cb_guests' value='true'> " . registry::fetch('user')->lang('raidevent_raid_guests');
        $text .= "<input type='checkbox' checked='checked' name='signedin' id='cb_signedin' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 1));
        $text .= "<input type='checkbox' name='backup' id='cb_backup' value='true'> " . registry::fetch('user')->lang(array('raidevent_raid_status', 3));
        $text .= "<br/>";
        $text .= "<textarea name='group" . rand() . "' id='attendeeout' cols='60' rows='10' onfocus='this.select()' readonly='readonly'>";
        $text .= "</textarea>";
        $text .= '<br/>' . registry::fetch('user')->lang('rp_copypaste_ig') . "</b>";
        return $text;
    }
 public function parse_input()
 {
     if (strlen($this->in->get('datafolder'))) {
         //Rename Data Folder
         $this->pfh->Delete($this->root_path . 'data/' . md5($this->table_prefix . $this->dbname));
         $a = $this->pfh->rename($this->root_path . 'data/' . $this->in->get('datafolder') . '/', $this->root_path . 'data/' . md5($this->table_prefix . $this->dbname) . '/');
         //Set server_path in config
         $path = str_replace('supporttool/', '', registry::register('environment')->server_path);
         registry::register('config')->set('server_path', $path);
     } elseif (!$this->in->exists('foundsamefolder')) {
         $this->pdl->log('install_error', $this->lang['datafolder_missing']);
         return false;
     }
     return true;
 }
Exemple #18
0
    public function __construct()
    {
        //Check the auth
        $this->core->check_auth();
        $this->core->page_header();
        $task_list = $this->mmt->get_task_list(true);
        if ($this->in->exists('task')) {
            $task = $this->in->get('task');
        } else {
            $this->core->message_die($this->user->lang('unknown_task_warning'));
        }
        if (!in_array($task, array_keys($task_list))) {
            $this->core->message_die($this->user->lang('unknown_task_warning'));
        } else {
            $timer_start = microtime(true);
            if (!$this->pdl->type_known('maintenance')) {
                $this->pdl->register_type('maintenance');
            }
            require_once $task_list[$task];
            $task_obj = registry::register($task);
            if (!$task_obj->is_applicable()) {
                $this->core->message_die($this->user->lang('application_warning'));
            }
            $task_obj->init_lang();
            if (!empty($task_obj->dependencies)) {
                //check which dependencies are not fullfilled
                $form = '<table width="100%" border="1">';
                $form .= '<tr><th>' . $this->user->lang('dependency_warning') . '</th></tr>';
                foreach ($task_obj->task_dependencies as $dependency) {
                    require_once $task_list[$dependency];
                    $dep_obj = registry::register($dependency);
                    $dep_obj->init_lang();
                    $form .= '<tr><td>' . $dep_obj->get_description() . '</td></tr>';
                }
                $form .= '</table>
					<a href="./task.php' . $this->SID . '&amp;task=' . $task_obj->dependencies[0] . '"><button>' . $this->user->lang('start_here') . '</button></a>
						';
                $this->tpl->assign_vars(array('FORM_METHOD' => 'GET', 'TASK_NAME' => $task_obj->name, 'TASK_DESC' => $task_obj->lang[$task], 'TASK_OUTPUT' => $form));
            } else {
                $this->tpl->assign_vars(array('FORM_METHOD' => $task_obj->form_method, 'TASK_NAME' => $task, 'TASK_DESC' => $task_obj->lang[$task], 'TASK_OUTPUT' => $task_obj->a_get_form_content()));
            }
            $timer_end = microtime(true);
            $this->core->create_breadcrump($this->user->lang($task_obj->type), $this->SID . '&amp;type=' . $task_obj->type);
            $this->core->create_breadcrump($task_obj->lang[$task]);
            $this->tpl->assign_vars(array('TIMER_OUT' => substr($timer_end - $timer_start, 0, 5), 'L_APPLICABLE_WARNING' => $this->user->lang('applicable_warning'), 'S_APPLICABLE_WARNING' => ($task_obj->type == 'update' || $task_obj->type == 'plugin_update') && !$task_obj->a_is_necessary() && $this->in->get('single_update_code') == '' && $this->in->get('update_all') == '', 'L_STEPEND_INFO' => $this->user->lang('stepend_info')));
        }
        $this->core->page_tail();
    }
        public function run()
        {
            require_once $this->root_path . 'core/feed.class.php';
            $this->pfh->secure_folder('rss', 'eqdkp');
            $rssfile = $this->pfh->FilePath('rss/last_news.xml', 'eqdkp', 'relative');
            $feed = registry::register('feed');
            $feed->feedfile = $this->pfh->FileLink('rss/last_news.xml', 'eqdkp', 'absolute');
            $feed->link = $this->env->link;
            $feed->title = "Last News";
            $feed->description = $this->config->get('main_title') . " EQdkp-Plus - Last News";
            $feed->published = time();
            $feed->language = 'EN-EN';
            $previous_date = null;
            $sql = 'SELECT n.*, u.username
					FROM __news n, __users u
					WHERE (n.user_id = u.user_id)
					ORDER BY news_date DESC LIMIT 10';
            $result = $this->db->query($sql);
            if ($this->db->num_rows($result) == 0) {
                $sql = 'SELECT n.news_id, n.news_date, n.news_headline, n.news_message, n.news_flags, u.username
						FROM __news n, __users u
						WHERE (n.user_id = u.user_id)
						ORDER BY news_date DESC LIMIT 10';
                $result = $this->db->query($sql);
                if ($this->db->num_rows($result) == 0) {
                    return;
                }
            }
            $i = 0;
            while ($news = $this->db->fetch_record($result)) {
                //Create RSS
                if ($i < 10) {
                    $rssitem = registry::register('feeditems', array($i));
                    $rssitem->title = stripslashes(sanitize($news['news_headline']));
                    $rssitem->description = $this->bbcode->remove_embeddedMedia($this->bbcode->remove_shorttags(html_entity_decode($news['news_message'])));
                    $rssitem->link = $this->env->link . 'viewnews.php?id=' . $news['news_id'];
                    $rssitem->published = $news['news_date'];
                    $rssitem->author = $news['username'];
                    $rssitem->source = $feed->link;
                    $feed->addItem($rssitem);
                    $i++;
                }
            }
            $feed->save($rssfile);
        }
 /**
  * comments_save
  * Do the hook 'comments_save'
  *
  * @return array
  */
 public function comments_save($data)
 {
     //Return if there are no relevant comments
     if ($data['page'] != 'guildrequest') {
         return $data;
     }
     if (!$data['user_id']) {
         if (registry::register('input')->exists('key')) {
             register('pm');
             $row = registry::register('plus_datahandler')->get('guildrequest_requests', 'id', array($data['attach_id']));
             if ($row['auth_key'] == registry::register('input')->get('key')) {
                 $GRUserID = $this->pdh->get('user', 'userid', array('GuildRequest'));
                 $data['user_id'] = $GRUserID;
                 if ($GRUserID) {
                     $data['permission'] = true;
                 }
                 //Comment from Applicant
                 $arrUsers = $this->pdh->get('user', 'users_with_permission', array('u_guildrequest_view'));
                 $strFromUsername = $row['username'];
                 $this->ntfy->add('guildrequest_new_update', $data['attach_id'], $strFromUsername, $this->routing->build('ListApplications'), $arrUsers, $strFromUsername);
             }
         }
     } elseif ($data['permission']) {
         //Email comment email to applicant
         register('pm');
         $row = $this->pdh->get('guildrequest_requests', 'id', array($data['attach_id']));
         if ($row) {
             $server_url = $this->env->link . $this->routing->build('ViewApplication', $row['username'], $row['id'], false, true);
             $bodyvars = array('USERNAME' => $row['username'], 'U_ACTIVATE' => $server_url . '?key=' . $row['auth_key'], 'USER' => $this->pdh->get('user', 'name', array($data['user_id'])), 'COMMENT' => $data['comment']);
             $this->email->SendMailFromAdmin(register('encrypt')->decrypt($row['email']), $this->user->lang('gr_newcomment_subject'), $this->root_path . 'plugins/guildrequest/language/' . $this->user->data['user_lang'] . '/email/request_newcomment.html', $bodyvars);
             //Comment from other User
             $arrUsers = $this->pdh->get('user', 'users_with_permission', array('u_guildrequest_view'));
             $strFromUsername = $this->pdh->get('user', 'name', array($data['user_id']));
             $this->ntfy->add('guildrequest_new_update', $data['attach_id'], $strFromUsername, $this->routing->build('ListApplications'), $arrUsers, $row['username']);
             //Notify applicant
             if ($row['user_id'] > 0) {
                 $this->ntfy->add('guildrequest_new_update_own', $data['attach_id'], $strFromUsername, $this->routing->build('ViewApplication', $row['username'], $row['id']), $row['user_id']);
             }
         }
     }
     return $data;
 }
 public function run()
 {
     $arrAchIDs = $this->pdh->get('awards_achievements', 'id_list');
     foreach ($arrAchIDs as $intAchID) {
         if ($this->pdh->get('awards_achievements', 'active', array($intAchID))) {
             $arrMemberIDs = $this->pdh->get('member', 'id_list');
             $arrAchModule = unserialize($this->pdh->get('awards_achievements', 'module', array($intAchID)));
             $arrAchModuleConditions = $arrAchModule['conditions'];
             $arrAchModule = array_slice($arrAchModule, 1);
             if ($arrAchModuleConditions == 'all') {
                 foreach ($arrAchModule as $strAchModule) {
                     if (!class_exists($strAchModule . '_cronmodule')) {
                         if ((include $this->root_path . 'plugins/awards/cronjob/module/' . $strAchModule . '_cronmodule.class.php') == false) {
                             continue;
                         }
                     }
                     $module = registry::register($strAchModule . '_cronmodule');
                     $arrMemberIDs = $module->run($intAchID, $arrMemberIDs);
                     if ($arrMemberIDs) {
                         $arrMemberIDs = array_unique($arrMemberIDs);
                     }
                 }
                 $this->awards->add_assignment($intAchID, $arrMemberIDs);
             } elseif ($arrAchModuleConditions == 'any') {
                 foreach ($arrAchModule as $strAchModule) {
                     if (!class_exists($strAchModule . '_cronmodule')) {
                         if ((include $this->root_path . 'plugins/awards/cronjob/module/' . $strAchModule . '_cronmodule.class.php') == false) {
                             continue;
                         }
                     }
                     $module = registry::register($strAchModule . '_cronmodule');
                     $arrMemberIDs = $module->run($intAchID, $arrMemberIDs);
                     if ($arrMemberIDs) {
                         $this->awards->add_assignment($intAchID, $arrMemberIDs);
                     }
                 }
             } else {
                 continue;
             }
         }
     }
 }
 /**
  * get_realmstatus
  * GET Request for realmstatus entries
  *
  * @param   array   $params   Parameters array
  * @param   string  $body     XML body of request
  *
  * @returns array
  */
 public function get_realmstatus($params, $body)
 {
     // set default response
     $response = array('realms' => array());
     // try to load the status file for this game
     $game_name = strtolower($this->game->get_game());
     $status_file = $this->root_path . 'portal/realmstatus/' . $game_name . '/status.class.php';
     if (file_exists($status_file)) {
         include_once $status_file;
         $class_name = $game_name . '_realmstatus';
         $status = registry::register($class_name, array($this->moduleID));
         if ($status) {
             $response['realms'] = $status->getExchangeOutput();
         } else {
             return $this->pex->error($this->user->lang('rs_game_not_supported'));
         }
     } else {
         return $this->pex->error($this->user->lang('rs_game_not_supported'));
     }
     return $response;
 }
Exemple #23
0
 /**
  * save
  * Save the configuration
  */
 public function save()
 {
     // is use_user change?
     if ($this->in->get('sb_use_users', 0) != $this->config->get('sb_use_users', 'shoutbox')) {
         $shoutbox = registry::register('ShoutboxClass');
         // convert to member?
         if ($this->in->get('sb_use_users', '0') == '1') {
             $shoutbox->convertFromMemberToUser();
             $messages[] = $this->user->lang('sb_convert_member_user_success');
         } else {
             $shoutbox->deleteAllEntries();
             $messages[] = $this->user->lang('sb_convert_user_member_success');
         }
     }
     // take over new values
     $savearray = array('sb_use_users' => $this->in->get('sb_use_users', 0));
     // update configuration
     $this->config->set($savearray, '', 'shoutbox');
     // Success message
     $messages[] = $this->user->lang('sb_config_saved');
     $this->display($messages);
 }
 /**
  * output
  * Returns the portal output
  *
  * @return string
  */
 public function output()
 {
     // empty output as default
     $realmstatus = '';
     // try to load the status file for this game
     $game_name = strtolower($this->game->get_game());
     $status_file = $this->root_path . 'portal/realmstatus/' . $game_name . '/status.class.php';
     if (file_exists($status_file)) {
         include_once $status_file;
         $class_name = $game_name . '_realmstatus';
         $status = registry::register($class_name);
         if ($status) {
             $realmstatus .= $status->getPortalOutput();
         } else {
             $realmstatus .= '<div class="center">' . $this->user->lang('rs_game_not_supported') . '</div>';
         }
     } else {
         $realmstatus .= '<div class="center">' . $this->user->lang('rs_game_not_supported') . '</div>';
     }
     // return the output for module manager
     return $realmstatus;
 }
Exemple #25
0
 public function __get($name)
 {
     if (isset($this->_class_index[$name])) {
         $obj = registry::grab($this->_class_index[$name][0], $this->_class_index[$name][1]);
         if ($obj) {
             return $obj;
         }
     }
     if (!$this->_shorts_loaded) {
         $this->_shorts = static::__shortcuts();
         $this->_shorts_loaded = true;
     }
     $obj = false;
     if (isset($this->_shorts[$name])) {
         if (is_array($this->_shorts[$name])) {
             $obj = registry::register($this->_shorts[$name][0], $this->_shorts[$name][1]);
         } else {
             $obj = registry::register($this->_shorts[$name]);
         }
     } elseif (isset(registry::$aliases[$name])) {
         if (is_array(registry::$aliases[$name])) {
             $obj = registry::register(registry::$aliases[$name][0], registry::$aliases[$name][1]);
         } else {
             $obj = registry::register(registry::$aliases[$name]);
         }
     } elseif (registry::class_exists($name)) {
         $obj = registry::register($name);
     }
     if ($obj) {
         $this->_class_index[$name] = array(get_class($obj), $obj->class_hash);
         return $obj;
     }
     if ($const = registry::get_const($name)) {
         return $const;
     }
     return null;
 }
 public function output()
 {
     $cachetime = $this->config('ts3_cache') ? $this->config('ts3_cache') : '30';
     //default cachetime = 30 seconds
     $this->tpl->css_file($this->root_path . 'portal/voice/modules/teamspeak3/ts3view.css');
     $htmlout = $this->pdc->get('portal.module.voice.ts3.outputdata', false, true);
     if (!$htmlout or $cachetime == '0') {
         include_once $this->root_path . 'portal/voice/modules/teamspeak3/Ts3Viewer.php';
         $ts3v = registry::register("Ts3Viewer", array($this->config));
         if ($ts3v->connect()) {
             $ts3v->query();
             $ts3v->disconnect();
         }
         $htmlout = $ts3v->gethtml();
         unset($ts3v);
         if ($cachetime >= '1') {
             $this->pdc->put('portal.module.voice.ts3.outputdata', $htmlout, $cachetime, false, true);
         }
     }
     $out = '<div>';
     $out .= $htmlout;
     $out .= '</div>';
     return $out;
 }
Exemple #27
0
                } else {
                    $this->config->set('eqdkp_layout', "normal");
                }
            }
            // Save the settings array
            $this->config->set($save_array);
            // Since ChangeGame alters Config it has to be executed after config-save
            if ($game_changed) {
                $this->game->installGame($this->in->get('default_game'), $this->in->get('game_language'));
                $this->pdc->flush();
                $this->form->reset_fields();
                $this->settings_saved = true;
                $this->display();
                #redirect('admin/manage_settings.php'.$this->SID);		// we need to reload cause of the per-game settings
            }
            //clear cache now
            $this->pdc->flush();
            // The Saved-Message
            $this->core->message($this->user->lang('pk_succ_saved'), $this->user->lang('pk_save_title'), 'green');
        }
        //Hint for ReCaptcha
        if ($this->config->get('enable_captcha') == 1 && !strlen($this->config->get('lib_recaptcha_pkey'))) {
            $this->core->message($this->user->lang('recaptcha_nokeys_hint'), "ReCaptcha", 'red');
        }
        // Output the form, pass values in
        $this->form->output($this->config->get_config());
        $this->core->set_vars(array('page_title' => $this->user->lang('config_title'), 'template_file' => 'admin/manage_settings.html', 'display' => true));
    }
}
registry::register('mmocms_settings');
Exemple #28
0
                    $status = $this->mail->SendMail($this->pdh->get('user', 'email', array($user_id)), $this->user->data['user_email'], $this->in->get('subject'), $this->in->get('body'));
                    if ($status) {
                        $this->core->message($this->user->lang('adduser_send_mail_suc'), $this->user->lang('success'), 'green', true);
                        $this->tpl->add_js("jQuery.FrameDialog.closeDialog();");
                    } else {
                        $this->core->message($this->user->lang('error_email_send'), $this->user->lang('error'), 'red');
                    }
                } else {
                    $this->core->message($this->user->lang('fv_invalid_email'), $this->user->lang('error'), 'red');
                }
            } else {
                message_die($this->user->lang('noauth'), $this->user->lang('noauth_default_title'), 'access_denied');
            }
        }
    }
    public function display()
    {
        $user_id = $this->in->get('user', 0);
        if ($user_id < 1) {
            $this->core->message($this->user->lang('error_user_not_found'), $this->user->lang('error'), 'red');
        } else {
            $this->tpl->assign_vars(array('USER_ID' => $user_id, 'USERNAME' => $this->pdh->get('user', 'name', array($user_id)), 'BODY' => $this->in->get('body', ''), 'SUBJECT' => $this->in->get('subject', '')));
        }
        $this->core->set_vars(array('page_title' => $this->user->lang('adduser_send_mail'), 'template_file' => 'email.html', 'header_format' => 'simple', 'display' => true));
    }
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    registry::add_const('short_email', email::__shortcuts());
}
registry::register('email');
        if (isset($arrValues['master_key'])) {
            $arrValues['master_key'] = $this->encrypt->decrypt($arrValues['master_key']);
        }
        if (isset($arrValues['db_host'])) {
            $arrValues['db_host'] = $this->encrypt->decrypt($arrValues['db_host']);
        }
        if (isset($arrValues['db_user'])) {
            $arrValues['db_user'] = $this->encrypt->decrypt($arrValues['db_user']);
        }
        if (isset($arrValues['db_password'])) {
            $arrValues['db_password'] = $this->encrypt->decrypt($arrValues['db_password']);
        }
        if (isset($arrValues['db_database'])) {
            $arrValues['db_database'] = $this->encrypt->decrypt($arrValues['db_database']);
        }
        if (isset($arrValues['db_prefix'])) {
            $arrValues['db_prefix'] = $this->encrypt->decrypt($arrValues['db_prefix']);
        }
        $form->output($arrValues);
        $arrIDList = $this->pdh->get('eqdkp_sso', 'id_list');
        foreach ($arrIDList as $intID) {
            $data = $this->pdh->get('eqdkp_sso', 'data', array($intID));
            $this->tpl->assign_block_vars('field_row', array('ID' => $intID, 'NAME' => $data['name'], 'DOMAIN' => $data['domain'], 'UNIQUEID' => $data['uniqueid'], 'COOKIE_NAME' => $data['cookie_name'], 'DEL_HASH' => $this->CSRFGetToken('del')));
        }
        $this->jquery->Dialog('editSlave', $this->user->lang('es_edit_slave'), array('url' => 'slaves.php' . $this->SID . "&slaveid='+id+'", 'withid' => 'id', 'width' => 920, 'height' => 740, 'onclose' => 'settings.php' . $this->SID));
        $this->tpl->assign_vars(array('S_INSERT_MASTER' => $this->blnMasterTest));
        $this->core->set_vars(array('page_title' => $this->user->lang('settings'), 'template_path' => $this->pm->get_data('eqdkp_sso', 'template_path'), 'template_file' => 'admin/settings.html', 'display' => true));
    }
}
registry::register('EQdkpSSOAdminSettings');
 */
define('EQDKP_INC', true);
$eqdkp_root_path = './../';
$noinit = true;
include $eqdkp_root_path . '/common.php';
registry::add_const('root_path', $eqdkp_root_path);
//init our db-class
registry::load_config();
require $eqdkp_root_path . 'core/dbal/dbal.php';
require_once $eqdkp_root_path . 'core/dbal/' . registry::get_const('dbtype') . '.php';
registry::$aliases['db'] = array('dbal_' . registry::get_const('dbtype'), array(array('open' => true)));
error_reporting(E_ALL);
header('content-type: text/html; charset=UTF-8');
include $eqdkp_root_path . 'infotooltip/infotooltip.class.php';
$itt = registry::register('infotooltip');
$in = registry::register('input');
registry::$aliases['bridge'] = 'bridge_generic';
/* Itemfetching
 * Parameters accepted:
 * 	- name => item_name OR item_ID if game_id = true
 *	- lang => language of item (short version, e.g. 'en', 'de')
 *	- game_id => see name
 */
if ($in->exists('data')) {
    $direct = $in->exists('direct') ? $in->get('direct', 0) : substr($in->get('data'), 0, 1);
    $data = unserialize(base64_decode(substr($in->get('data'), 1)));
} else {
    $direct = $in->get('direct', 0);
    $data['lang'] = substr($in->get('lang'), 0, 2);
    $data['onlyicon'] = $in->get('onlyicon', 0);
    $data['game_id'] = $in->get('game_id');