mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-24 16:16:14 +00:00
293 lines
15 KiB
HTML
293 lines
15 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<title>Ryzom Account Management System: Helpers Class Reference</title>
|
||
|
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div! -->
|
||
|
|
||
|
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
|
||
|
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
|
||
|
|
||
|
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Ryzom Account Management System
|
||
|
 <span id="projectnumber">1.0</span>
|
||
|
</div>
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<!-- Generated by Doxygen 1.7.6.1 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Helpers Class Reference</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<!-- doxytag: class="Helpers" -->
|
||
|
<p>Helper class for more site specific functions.
|
||
|
<a href="classHelpers.html#details">More...</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
|
||
|
Static Public Member Functions</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#a78997ab39ba0237dc7a5441b58601211">loadTemplate</a> ($template, $vars=array(), $returnHTML=false)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">workhorse of the website, it loads the template and shows it or returns th html. <a href="#a78997ab39ba0237dc7a5441b58601211"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#add8ef9ce82106c505f6f04c2a8e3b2b4">create_folders</a> ()</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">creates the folders that are needed for smarty. <a href="#add8ef9ce82106c505f6f04c2a8e3b2b4"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#a4e3e5309a66456d81a1effdabcc9cd79">check_if_game_client</a> ()</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">check if the http request is sent ingame or not. <a href="#a4e3e5309a66456d81a1effdabcc9cd79"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#a334920d0652c160c6145d3bd7be31a22">handle_language</a> ()</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Handles the language specific aspect. <a href="#a334920d0652c160c6145d3bd7be31a22"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#a4370c805a72fe32c03b178b03ad2e393">outputTime</a> ($time, $str=1)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Time output function for handling the time display. <a href="#a4370c805a72fe32c03b178b03ad2e393"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classHelpers.html#abd01528a1145831a4fc98eae7ffaca36">check_login_ingame</a> ()</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Auto login function for ingame use. <a href="#abd01528a1145831a4fc98eae7ffaca36"></a><br/></td></tr>
|
||
|
</table>
|
||
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||
|
<div class="textblock"><p>Helper class for more site specific functions. </p>
|
||
|
<dl class="author"><dt><b>Author:</b></dt><dd>Daan Janssens, mentored by Matthew Lagoe </dd></dl>
|
||
|
</div><hr/><h2>Member Function Documentation</h2>
|
||
|
<a class="anchor" id="a4e3e5309a66456d81a1effdabcc9cd79"></a><!-- doxytag: member="Helpers::check_if_game_client" ref="a4e3e5309a66456d81a1effdabcc9cd79" args="()" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#a4e3e5309a66456d81a1effdabcc9cd79">check_if_game_client</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>check if the http request is sent ingame or not. </p>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>returns true in case it's sent ingame, else false is returned. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="abd01528a1145831a4fc98eae7ffaca36"></a><!-- doxytag: member="Helpers::check_login_ingame" ref="abd01528a1145831a4fc98eae7ffaca36" args="()" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#abd01528a1145831a4fc98eae7ffaca36">check_login_ingame</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Auto login function for ingame use. </p>
|
||
|
<p>This function will allow users who access the website ingame, to log in without entering the username and password. It uses the COOKIE entry in the open_ring db. it checks if the cookie sent by the http request matches the one in the db. This cookie in the db is changed everytime the user relogs. </p>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="add8ef9ce82106c505f6f04c2a8e3b2b4"></a><!-- doxytag: member="Helpers::create_folders" ref="add8ef9ce82106c505f6f04c2a8e3b2b4" args="()" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#add8ef9ce82106c505f6f04c2a8e3b2b4">create_folders</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>creates the folders that are needed for smarty. </p>
|
||
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the <a class="el" href="install_8php.html">install.php</a> instead. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a334920d0652c160c6145d3bd7be31a22"></a><!-- doxytag: member="Helpers::handle_language" ref="a334920d0652c160c6145d3bd7be31a22" args="()" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#a334920d0652c160c6145d3bd7be31a22">handle_language</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Handles the language specific aspect. </p>
|
||
|
<p>The language can be changed by setting the $_GET['Language'] & $_GET['setLang'] together. This will also change the language entry of the user in the db. Cookies are also being used in case the user isn't logged in. </p>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>returns the parsed content of the language .ini file related to the users language setting. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a78997ab39ba0237dc7a5441b58601211"></a><!-- doxytag: member="Helpers::loadTemplate" ref="a78997ab39ba0237dc7a5441b58601211" args="($template, $vars=array(), $returnHTML=false)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#a78997ab39ba0237dc7a5441b58601211">loadTemplate</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>template</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>vars</em> = <code>array ()</code>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>returnHTML</em> = <code>false</code> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>workhorse of the website, it loads the template and shows it or returns th html. </p>
|
||
|
<p>it uses smarty to load the $template, but before displaying the template it will pass the $vars to smarty. Also based on your language settings a matching array of words & sentences for that page will be loaded. In case the $returnHTML parameter is set to true, it will return the html instead of displaying the template. </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$template</td><td>the name of the template(page) that we want to load. </td></tr>
|
||
|
<tr><td class="paramname">$vars</td><td>an array of variables that should be loaded by smarty before displaying or returning the html. </td></tr>
|
||
|
<tr><td class="paramname">$returnHTML</td><td>(default=false) if set to true, the html that should have been displayed, will be returned. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>in case $returnHTML=true, it returns the html of the template being loaded. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a4370c805a72fe32c03b178b03ad2e393"></a><!-- doxytag: member="Helpers::outputTime" ref="a4370c805a72fe32c03b178b03ad2e393" args="($time, $str=1)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classHelpers.html#a4370c805a72fe32c03b178b03ad2e393">outputTime</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>time</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>str</em> = <code>1</code> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td><code> [static]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Time output function for handling the time display. </p>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>returns the time in the format specified in the $TIME_FORMAT global variable. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||
|
<li>/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/<a class="el" href="helpers_8php.html">helpers.php</a></li>
|
||
|
</ul>
|
||
|
</div><!-- contents -->
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated on Sun Sep 15 2013 17:49:37 for Ryzom Account Management System by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.7.6.1
|
||
|
</small></address>
|
||
|
|
||
|
</body>
|
||
|
</html>
|