当前位置: 首页>>代码示例>>PHP>>正文


PHP registry::fetch方法代码示例

本文整理汇总了PHP中registry::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP registry::fetch方法的具体用法?PHP registry::fetch怎么用?PHP registry::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在registry的用法示例。


在下文中一共展示了registry::fetch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: WoWMacroexport

    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;
    }
开发者ID:Bloodsoul,项目名称:game-wow,代码行数:55,代码来源:wow_macro.class.php

示例2: CSVexport

    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;
    }
开发者ID:rswiders,项目名称:core,代码行数:53,代码来源:csv.class.php

示例3: init_lang

 public function init_lang($module_path)
 {
     $lang_inc = $module_path . '/language/' . registry::fetch('user')->data['user_lang'] . '.php';
     if (!is_file($lang_inc)) {
         $lang_inc = $module_path . '/language/' . $this->default_lang . '.php';
     }
     if (is_file($lang_inc)) {
         include $lang_inc;
         $this->module_lang = isset($module_lang) ? $module_lang : array();
         $this->preset_lang = isset($preset_lang) ? $preset_lang : array();
     }
 }
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:12,代码来源:pdh_r_generic.class.php

示例4: WildstarMacroexport

    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;
    }
开发者ID:ZerGabriel,项目名称:game-wildstar,代码行数:51,代码来源:wildstar_macro.class.php

示例5: WoWMacroexport

    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;
    }
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:49,代码来源:wow_macro.class.php

示例6: _construct

    public function _construct()
    {
        $out = '<input type="' . self::$type . '" name="' . $this->name . '" ';
        if (empty($this->id)) {
            $this->id = $this->cleanid($this->name);
        }
        $out .= 'id="' . $this->id . '" ';
        if (isset($this->value)) {
            $out .= 'value="' . $this->value . '" ';
        }
        if (!empty($this->class)) {
            $out .= 'class="' . $this->class . '" ';
        }
        if (!empty($this->size)) {
            $out .= 'size="' . $this->size . '" ';
        }
        if ($this->readonly) {
            $out .= 'readonly="readonly" ';
        }
        if (!empty($this->js)) {
            $out .= $this->js . ' ';
        }
        if ($this->preview) {
            $out .= 'onchange="previewImage_' . $this->name . '(this);"';
        }
        $out .= ' />';
        if ($this->required) {
            $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>';
        }
        if ($this->preview) {
            $out = '<img src="' . (isset($this->value) && $this->value ? $this->value : registry::get_const('server_path') . 'images/global/default-image.svg') . '" class="uploadPreview" style="max-height: 60px;"/>' . $out;
            register('tpl')->add_js('
			function previewImage_' . $this->name . '(object) {
				if (object.files[0].type == "image/jpeg" || object.files[0].type == "image/png" || object.files[0].type == "image/gif"){
					var oFReader = new FileReader();
					oFReader.readAsDataURL(object.files[0]);
			
					oFReader.onload = function (oFREvent) {
						$(object).parent().find(\'.uploadPreview\').attr(\'src\', oFREvent.target.result);
					};
				}
			};');
        }
        $this->out = $out;
    }
开发者ID:rswiders,项目名称:core,代码行数:45,代码来源:hfile.class.php

示例7: _construct

 public function _construct()
 {
     if (empty($this->id)) {
         $this->id = $this->cleanid($this->name);
     }
     $out = '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->time->date("H:i", $this->value) . '"';
     if (!empty($this->class)) {
         $out .= ' class="' . $this->class . '"';
     }
     if ($this->required) {
         $out .= ' required="required"';
     }
     $this->jquery->timePicker($this->id, $this->name, $this->value, $this->enablesecs, $this->hourf);
     $out .= ' />';
     if ($this->required) {
         $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>';
     }
     $this->out = $out;
 }
开发者ID:ZerGabriel,项目名称:core,代码行数:19,代码来源:htimepicker.class.php

示例8: _construct

 public function _construct()
 {
     $out = '<textarea name="' . $this->name . '" rows="' . $this->rows . '" cols="' . $this->cols . '" ';
     if (empty($this->id)) {
         $this->id = $this->cleanid($this->name);
     }
     $out .= 'id="' . $this->id . '" ';
     if ($this->bbcodeeditor) {
         $this->class = empty($this->class) ? 'mceEditor_bbcode' : $this->class . ' mceEditor_bbcode';
         $this->tinyMCE->editor_bbcode();
     }
     if (!empty($this->class)) {
         $out .= 'class="' . $this->class . '" ';
     }
     if (!empty($this->style)) {
         $out .= 'style="' . $this->style . '" ';
     }
     if ($this->disabled) {
         $out .= 'disabled="disabled" ';
     }
     if ($this->readonly) {
         $out .= 'readonly="readonly" ';
     }
     if (!empty($this->js)) {
         $out .= $this->js . ' ';
     }
     if ($this->required) {
         $out .= 'required="required" ';
     }
     if (!empty($this->placeholder)) {
         $out .= 'placeholder="' . $this->placeholder . '" ';
     }
     $out .= '>' . $this->value . '</textarea>';
     if ($this->required) {
         $out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>';
     }
     $this->out = $out;
 }
开发者ID:rswiders,项目名称:core,代码行数:38,代码来源:htextarea.class.php

示例9: resolve_eqdkp_page

 /**
  * Resolve the EQDKP Page the user is surfing on..
  *
  * @param string $member
  * @return string
  */
 function resolve_eqdkp_page($strPage)
 {
     $matches = explode('&', $strPage);
     $strPath = $matches[0];
     if (strlen($strPath)) {
         $strQuery = isset($matches[1]) ? $matches[1] : "";
         $arrQuery = array();
         parse_str($strQuery, $arrQuery);
         $arrFolder = explode('/', $strPath);
         $strOut = "";
         //Prefixes for Admin, Plugins, Maintenance
         switch ($arrFolder[0]) {
             case 'admin':
                 $strPrefix = registry::fetch('user')->lang('menu_admin_panel') . ': ';
                 break;
             case 'plugins':
                 $strPrefix = registry::fetch('user')->lang('pi_title') . ': ';
                 $strOut = registry::fetch('user')->lang($arrFolder[1]) ? registry::fetch('user')->lang($arrFolder[1]) : ucfirst($arrFolder[1]);
                 break;
             case 'maintenance':
                 $strPrefix = registry::fetch('user')->lang('maintenance');
                 $strOut = " ";
                 break;
             case 'portal':
                 $strPrefix = registry::fetch('user')->lang('portal') . ': ';
                 $strOut = registry::fetch('user')->lang($arrFolder[1]) ? registry::fetch('user')->lang($arrFolder[1]) : ucfirst($arrFolder[1]);
                 break;
             default:
                 $strPrefix = '';
         }
         //Resolve Admin Pages
         if ($arrFolder[0] == "admin") {
             //First, some admin pages without menu entry
             switch ($strPath) {
                 case 'admin/info_php':
                     $strOut = '<a href="' . $this->root_path . 'admin/info_php.php' . $this->SID . '">PHP-Info</a>';
                     break;
                 case 'admin/manage_articles':
                     $strOut = '<a href="' . $this->root_path . 'admin/manage_articles.php' . $this->SID . '&amp;' . $strQuery . '">' . $this->user->lang('manage_articles') . '</a>';
                     break;
                 case 'admin/manage_styles':
                     $strOut = '<a href="' . $this->root_path . 'admin/manage_styles.php' . $this->SID . '&amp;' . $strQuery . '">' . $this->user->lang('styles_title') . '</a>';
                     break;
                 case 'admin':
                 case 'admin/index':
                     $strOut = registry::fetch('user')->lang('menu_admin_panel');
                     $strPrefix = "";
                     break;
             }
             //Now check if there is an menu entry
             if ($strOut == "") {
                 $admin_menu = $this->adminmenu(false);
                 $result = search_in_array($strPath . ".php" . $this->SID, $admin_menu);
                 if ($result) {
                     $arrMenuEntry = arraykey_for_array($result, $admin_menu);
                     if ($arrMenuEntry) {
                         $strOut = '<a href="' . $this->root_path . $arrMenuEntry['link'] . '">' . $arrMenuEntry['text'] . '</a>';
                     }
                 }
             }
         }
         //Resolve Frontend Page
         if ($strOut == "" && $strPrefix == "") {
             $intArticleID = $intCategoryID = 0;
             $arrPath = array_reverse($arrFolder);
             //Suche Alias in Artikeln
             $intArticleID = $this->pdh->get('articles', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[0]))));
             if (!$intArticleID) {
                 //Suche Alias in Kategorien
                 $intCategoryID = $this->pdh->get('article_categories', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[0]))));
                 //Suche in Artikeln mit nächstem Index, denn könnte ein dynamischer Systemartikel sein
                 if (!$intCategoryID && isset($arrPath[1])) {
                     $intArticleID = $this->pdh->get('articles', 'resolve_alias', array(str_replace(".html", "", utf8_strtolower($arrPath[1]))));
                 }
             }
             if ($intArticleID) {
                 $strOut = $this->user->lang('article') . ': <a href="' . $this->controller_path . $this->pdh->get('articles', 'path', array($intArticleID)) . '">' . $this->pdh->get('articles', 'title', array($intArticleID)) . '</a>';
             } elseif ($intCategoryID) {
                 $strOut = $this->user->lang('category') . ': <a href="' . $this->server_path . $this->pdh->get('article_categories', 'path', array($intCategoryID)) . '">' . $this->pdh->get('article_categories', 'name', array($intCategoryID)) . '</a>';
             } elseif (register('routing')->staticRoute($arrPath[0]) || register('routing')->staticRoute($arrPath[1])) {
                 $strPageObject = register('routing')->staticRoute($arrPath[0]);
                 if (!$strPageObject) {
                     $strPageObject = register('routing')->staticRoute($arrPath[1]);
                 }
                 if ($strPageObject) {
                     $strID = str_replace("-", "", strrchr(str_replace(".html", "", $arrPath[0]), "-"));
                     $arrMatches = array();
                     $myVar = false;
                     preg_match_all('/[a-z]+|[0-9]+/', $strID, $arrMatches, PREG_PATTERN_ORDER);
                     if (isset($arrMatches[0]) && count($arrMatches[0])) {
                         if (count($arrMatches[0]) == 2) {
                             $myVar = $arrMatches[0][1];
                         }
                     }
//.........这里部分代码省略.........
开发者ID:ZerGabriel,项目名称:core,代码行数:101,代码来源:admin_functions.class.php

示例10: __construct

 public function __construct()
 {
     $user = registry::fetch('user');
     $this->admin_user = isset($user->data['user_id']) && $user->data['user_id'] != ANONYMOUS ? $user->data['username'] : '';
     $this->current_time = $this->time->time;
 }
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:6,代码来源:pdh_w_generic.class.php

示例11: _construct

    public function _construct()
    {
        $arrLanguages = $this->user->getAvailableLanguages();
        $strDefaultLanguage = $this->config->get('default_lang');
        $this->jquery->init_multilang();
        if (is_serialized($this->value)) {
            $this->value = @unserialize($this->value);
        } elseif (!is_array($this->value) && $this->value != "") {
            $strValue = $this->value;
            $this->value = array();
            $this->value[$strDefaultLanguage] = $strValue;
        }
        $this->out = '<div class="input-multilang textarea">
			<div class="multilang-switcher-container hand"><div class="multilang-switcher"><span>' . $arrLanguages[$strDefaultLanguage] . '</span> <i class="fa fa-caret-down fa-lg"></i></div>
			<div class="multilang-dropdown"><ul>
		';
        foreach ($arrLanguages as $strKey => $strLang) {
            $this->out .= '<li data-lang="' . $strLang . '" data-key="' . $strKey . '" class="' . ($strKey == $strDefaultLanguage ? 'active' : '') . '">' . $strLang . '</li>';
        }
        $this->out .= '</ul></div><br />';
        foreach ($arrLanguages as $strKey => $strLang) {
            $out = '<textarea name="' . $this->name . '[' . $strKey . ']" rows="' . $this->rows . '" cols="' . $this->cols . '" ';
            if (empty($this->id)) {
                $this->id = $this->cleanid($this->name);
            }
            $out .= 'id="' . $this->id . '" ';
            $class = "taml_" . $this->cleanid($this->name) . " " . $strKey;
            if (!empty($this->class)) {
                $class .= ' ' . $this->class;
            }
            $out .= 'class="' . $class . '" ';
            if ($this->disabled) {
                $out .= 'disabled="disabled" ';
            }
            if (!empty($this->js)) {
                $out .= $this->js . ' ';
            }
            if ($this->required && $strKey == $strDefaultLanguage) {
                $out .= 'required="required" ';
            }
            if (!empty($this->placeholder)) {
                $out .= 'placeholder="' . $this->placeholder . '" ';
            }
            if ($strKey != $strDefaultLanguage) {
                $out .= ' style="display:none;"';
            }
            $out .= '>';
            if (isset($this->value) && isset($this->value[$strKey])) {
                $out .= $this->value[$strKey];
            }
            $out .= '</textarea>';
            $this->out .= $out;
        }
        $this->out .= '</div>';
        if ($this->required) {
            $this->out .= '<span class="fv_msg" data-errormessage="' . registry::fetch('user')->lang('fv_required') . '"></span>';
        }
    }
开发者ID:rswiders,项目名称:core,代码行数:58,代码来源:htextareamultilang.class.php

示例12: pattern

 protected function pattern($pattern)
 {
     $w = '[\\w_-]';
     switch ($pattern) {
         case 'email':
             if (empty($this->placeholder)) {
                 $this->placeholder = 'email@example.com';
             }
             return $w . '+(\\.' . $w . '+)*@' . $w . '+(\\.' . $w . '+)+';
         case 'url':
             if (empty($this->placeholder)) {
                 $this->placeholder = 'http(s)://example.com';
             }
             return 'http(s){0,1}://' . $w . '+(\\.' . $w . '+)+';
         case 'password':
             $minlength = 6;
             if (empty($this->placeholder)) {
                 $this->placeholder = sprintf(registry::fetch('user')->lang('fv_password_placeholder'), $minlength - 1);
             }
             return '.{' . $minlength . ',}';
         default:
             return $pattern;
     }
 }
开发者ID:ZerGabriel,项目名称:misc-repohelper,代码行数:24,代码来源:html.aclass.php

示例13: header

<?php

/*
 * Project:     EQdkp Shoutbox
 * License:     Creative Commons - Attribution-Noncommercial-Share Alike 3.0 Unported
 * Link:        http://creativecommons.org/licenses/by-nc-sa/3.0/
 * -----------------------------------------------------------------------
 * Began:       2008
 * Date:        $Date: 2012-06-22 20:20:07 +0200 (Fr, 22. Jun 2012) $
 * -----------------------------------------------------------------------
 * @author      $Author: godmod $
 * @copyright   2009-2011 Aderyn
 * @link        http://eqdkp-plus.com
 * @package     shoutbox
 * @version     $Rev: 11830 $
 *
 * $Id: shoutbox.esys.php 11830 2012-06-22 18:20:07Z godmod $
 */
if (!defined('EQDKP_INC')) {
    header('HTTP/1.0 404 Not Found');
    exit;
}
$systems_shoutbox = array('pages' => array('manage' => array('name' => 'hptt_shoutbox_manage', 'table_main_sub' => '%shoutbox_id%', 'table_sort_dir' => 'desc', 'page_ref' => 'manage.php', 'show_select_boxes' => registry::fetch('user')->check_auth('a_shoutbox_delete', false), 'table_presets' => array(array('name' => 'sbdate', 'sort' => true, 'th_add' => 'align="center" width="120px"', 'td_add' => 'align="center" nowrap="nowrap"'), array('name' => 'sbname', 'sort' => true, 'th_add' => 'align="center" width="20%"', 'td_add' => 'nowrap="nowrap"'), array('name' => 'sbtext', 'sort' => false, 'th_add' => 'align="center"', 'td_add' => '')), 'super_row' => array(array('colspan' => '1', 'align' => 'center', 'text' => '<input type="checkbox" name="sb_delete_all" id="sb_delete_all"/>'), array('colspan' => '3', 'align' => 'left', 'text' => '')))));
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:23,代码来源:shoutbox.esys.php

示例14: generate_ical

 public function generate_ical()
 {
     $eventdata = $this->pdh->get('calendar_events', 'data', array($this->url_id));
     require $this->root_path . 'libraries/icalcreator/iCalcreator.class.php';
     $v = new vcalendar();
     $v->setConfig('unique_id', $this->config->get('server_name'));
     $v->setProperty('x-wr-calname', sprintf(registry::fetch('user')->lang('icalfeed_name'), registry::register('config')->get('guildtag')));
     $v->setProperty('X-WR-CALDESC', registry::fetch('user')->lang('icalfeed_description'));
     // set the timezone - required by some clients
     $timezone = registry::register('config')->get('timezone');
     $v->setProperty("X-WR-TIMEZONE", $timezone);
     iCalUtilityFunctions::createTimezone($v, $timezone, array("X-LIC-LOCATION" => $timezone));
     // Generate the vevents...
     $e = new vevent();
     $e->setProperty('dtstart', array("timestamp" => $eventdata['timestamp_start'] . 'Z'));
     $e->setProperty('dtend', array("timestamp" => $eventdata['timestamp_end'] . 'Z'));
     $e->setProperty('dtstamp', array("timestamp" => $this->time->time));
     $e->setProperty('summary', $this->pdh->get('event', 'name', array($eventdata['extension']['raid_eventid'])));
     $e->setProperty('description', $eventdata['notes']);
     $e->setProperty('class', 'PUBLIC');
     $e->setProperty('categories', 'PERSONAL');
     $v->setComponent($e);
     // Save or Output the ICS File..
     if ($icsfile == true) {
         $v->setConfig('filename', $icsfile);
         $v->saveCalendar();
     } else {
         header('Content-type: text/calendar; charset=utf-8;');
         header('Content-Disposition: filename=raidevent-' . $eventdata['timestamp_start'] . '.ics');
         echo $v->createCalendar();
         exit;
     }
 }
开发者ID:rswiders,项目名称:core,代码行数:33,代码来源:calendarevent_pageobject.class.php

示例15: array

         $eventsfilter = false;
         break;
     case 'appointments':
         $eventsfilter = 'appointments';
         break;
 }
 $caleventids = registry::register('plus_datahandler')->get('calendar_events', 'id_list', array($eventsfilter, registry::register('time')->createRepeatableEvents(registry::register('time')->time, -30)));
 if (is_array($caleventids) && count($caleventids) > 0) {
     foreach ($caleventids as $calid) {
         // the attendee stuff
         $raidcal_status = unserialize(registry::register('config')->get('calendar_raid_status'));
         $raidstatus = array();
         if (is_array($raidcal_status)) {
             foreach ($raidcal_status as $raidcalstat_id) {
                 if ($raidcalstat_id != 4) {
                     $raidstatus[$raidcalstat_id] = registry::fetch('user')->lang(array('raidevent_raid_status', $raidcalstat_id));
                 }
             }
         }
         // Build the Attendee Array
         $attendees = array();
         $attendees_raw = registry::register('plus_datahandler')->get('calendar_raids_attendees', 'attendees', array($calid));
         if (is_array($attendees_raw)) {
             foreach ($attendees_raw as $attendeeid => $attendeerow) {
                 $attendees[$attendeerow['signup_status']][$attendeeid] = registry::register('plus_datahandler')->get('member', 'name', array($attendeeid));
             }
         }
         // Build the guest array
         if (registry::register('config')->get('calendar_raid_guests') == 1) {
             $guestarray = registry::register('plus_datahandler')->get('calendar_raids_guests', 'members', array($calid));
             if (is_array($guestarray)) {
开发者ID:ZerGabriel,项目名称:core,代码行数:31,代码来源:exchange.php


注:本文中的registry::fetch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。