<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page common.inc.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<script src="../media/lib/classTree.js"></script>
<script language="javascript" type="text/javascript">
var imgPlus = new Image();
var imgMinus = new Image();
imgPlus.src = "../media/images/plus.png";
imgMinus.src = "../media/images/minus.png";
function showNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgMinus.src;
oTable.style.display = "block";
}
function hideNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgPlus.src;
oTable.style.display = "none";
}
function nodeIsVisible(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
break;
}
return (oTable && oTable.style.display == "block");
}
function toggleNodeVisibility(Node){
if (nodeIsVisible(Node)){
hideNode(Node);
}else{
showNode(Node);
}
}
</script>
</head>
<body>
<div class="page-body">
<h2 class="file-name"><img src="../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/cms/include/common.inc.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-functions">Functions</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">filesource:</span> <a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html">Source Code for this file</a></li>
</ul>
</div>
</div>
<a name="sec-functions"></a>
<div class="info-box">
<div class="info-box-title">Functions</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Functions</span>
</div>
<div class="info-box-body">
<a name="functiondebugger" id="functiondebugger"><!-- --></a>
<div class="oddrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">debugger</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a148">148</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Print debug message.</p>
<p class="description"><p>This function is called at strategic places in the code. Uncommenting the the print command will activate the 'debugger' mode.</p></p>
<ul class="tags">
<li><span class="field">return:</span> Prints to HTML</li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functionupdateGmcache">updateGmcache()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_target_inc_php.html#functiondeletetarget">deletetarget()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondeleteTemplate">deleteTemplate()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondeletePatternElement">deletePatternElement()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_common_inc_php.html#functionfindmainnode">findmainnode()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondelete_category">delete_category()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_common_inc_php.html#functionfindbotid">findbotid()</a> - Retrieves the bot's ID, from the bots table.
WARNING: This is expected NOT to work in a multi-bot environment.</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
debugger
</span>
(<span class="var-type">string</span> <span class="var-name">$msg</span>, <span class="var-type">interger</span> <span class="var-name">$val</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$msg</span><span class="var-description">: The message you'd like to have printed.</span> </li>
<li>
<span class="var-type">interger</span>
<span class="var-name">$val</span><span class="var-description">: Not used for anything.</span> </li>
</ul>
</div>
<a name="functionfindbotid" id="functionfindbotid"><!-- --></a>
<div class="evenrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">findbotid</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a166">166</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the first bot ID from the table.</p>
<ul class="tags">
<li><span class="field">return:</span> The bot's ID.</li>
<li><span class="field">uses:</span> <a href="../application/_cms_include_common_inc_php.html#functiondebugger">debugger()</a> - Retrieves the bot's ID, from the bots table.
WARNING: This is expected NOT to work in a multi-bot environment.</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
findbotid
</span>
()
</div>
</div>
<a name="functionfindmainnode" id="functionfindmainnode"><!-- --></a>
<div class="oddrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">findmainnode</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a201">201</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieve the Main Node ID.</p>
<p class="description"><p>The main node is the start-node of the AIML tree, the trunk if you will. This node often contains the word <input> and the parent reference is always the bot's ID, only negative. Thus, making sure that it doesn't conflict with parent ID's of AIML categories.</p></p>
<ul class="tags">
<li><span class="field">return:</span> The pattern ID of the main node.</li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_retrieve_inc_php.html#functionfindCategoryPattern">findCategoryPattern()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondelete_category">delete_category()</a></li>
<li><span class="field">uses:</span> <a href="../application/_cms_include_common_inc_php.html#functiondebugger">debugger()</a></li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
findmainnode
</span>
(<span class="var-type">integer</span> <span class="var-name">$botid</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">integer</span>
<span class="var-name">$botid</span><span class="var-description">: The bot's ID.</span> </li>
</ul>
</div>
<a name="functionfindParent" id="functionfindParent"><!-- --></a>
<div class="evenrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">findParent</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a232">232</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the parent ID.</p>
<p class="description"><p>Retrieve the corresponding parent ID (i.e. the next word's pattern ID) for this pattern ID.</p></p>
<ul class="tags">
<li><span class="field">return:</span> The corresponding Parent ID.</li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_retrieve_inc_php.html#functionfindCategoryPattern">findCategoryPattern()</a></li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondelete_category">delete_category()</a></li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
findParent
</span>
(<span class="var-type">integer</span> <span class="var-name">$patternID</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">integer</span>
<span class="var-name">$patternID</span><span class="var-description">: The word's pattern ID.</span> </li>
</ul>
</div>
<a name="functiongetbotnames" id="functiongetbotnames"><!-- --></a>
<div class="oddrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">getbotnames</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a106">106</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the chatterbots names from table</p>
<p class="description"><p>Retrieve an array with the botnames and their ID's from the bots table</p></p>
<ul class="tags">
<li><span class="field">return:</span> Array-key is the botid, Array-value the botname</li>
<li><span class="field">usedby:</span> <a href="../addition/_cms_addition_php.html">addition.php</a></li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getbotnames
</span>
()
</div>
</div>
<a name="functiongetRequest" id="functiongetRequest"><!-- --></a>
<div class="evenrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">getRequest</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a37">37</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Make REQUEST variables in to regular variables.</p>
<p class="description"><p>Retrieves REQUEST variables (POST/GET) and turns them into regular variables If the REQUEST variable doesn't exist, it creates the variables with the default value that's also passed with it.</p></p>
<ul class="tags">
<li><span class="field">return:</span> It creates a set of variables.</li>
<li><span class="field">usedby:</span> <a href="../addition/_cms_addition_php.html">addition.php</a></li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
getRequest
</span>
(<span class="var-type">string</span> <span class="var-name">$param</span>, <span class="var-type">string</span> <span class="var-name">$default</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$param</span><span class="var-description">: REQUEST variable name</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$default</span><span class="var-description">: default value in case variable doesn't exist</span> </li>
</ul>
</div>
<a name="functiongetTemplate" id="functiongetTemplate"><!-- --></a>
<div class="oddrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">getTemplate</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a64">64</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Load template file from template folder.</p>
<p class="description"><p>Template function. Retrieves the template from the templates folder.</p></p>
<ul class="tags">
<li><span class="field">return:</span> Template file contents for the to be retuned page.</li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_common_inc_php.html#functionuseTemplate">useTemplate()</a></li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getTemplate
</span>
(<span class="var-type">string</span> <span class="var-name">$TPL</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$TPL</span><span class="var-description">: Name of the HTML template file.</span> </li>
</ul>
</div>
<a name="functiontemplateCheck" id="functiontemplateCheck"><!-- --></a>
<div class="evenrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">templateCheck</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a262">262</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if template ID exists.</p>
<p class="description"><p>Check to see if a specific template ID is found in the templates tables.</p></p>
<ul class="tags">
<li><span class="field">return:</span> TRUE/FALSE.</li>
<li><span class="field">usedby:</span> <a href="../application/_cms_include_delete_inc_php.html#functiondelete_category">delete_category()</a></li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
templateCheck
</span>
(<span class="var-type">integer</span> <span class="var-name">$templateID</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">integer</span>
<span class="var-name">$templateID</span><span class="var-description">: The category's ID.</span> </li>
</ul>
</div>
<a name="functionuseTemplate" id="functionuseTemplate"><!-- --></a>
<div class="oddrow">
<div>
<img src="../media/images/Function.png" />
<span class="method-title">useTemplate</span> (line <span class="line-number"><a href="..//__filesource/fsource_application__cmsincludecommon.inc.php.html#a91">91</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Replace placeholders in template file with array elements.</p>
<p class="description"><p>Template function. Takes an array of values, and the name of the template and replaces the placeholders with their array equivilent values.</p></p>
<ul class="tags">
<li><span class="field">return:</span> The HTML code for the to be retuned page.</li>
<li><span class="field">usedby:</span> <a href="../addition/_cms_addition_php.html">addition.php</a></li>
<li><span class="field">uses:</span> <a href="../application/_cms_include_common_inc_php.html#functiongetTemplate">getTemplate()</a></li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
useTemplate
</span>
(<span class="var-type">string</span> <span class="var-name">$TPL</span>, <span class="var-type">array</span> <span class="var-name">$ARRAY</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$TPL</span><span class="var-description">: Name of the HTML template file.</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$ARRAY</span><span class="var-description">: The array where the key is the placeholder name and the value what it needs to be replaced with.</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 11 Jan 2005 18:41:02 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
</p>
</div></body>
</html>