The index.php in the template directory only protects you if someone enters the root of a particular directory.仅在模板目录中的index.php保护你,如果有人进入一个特定目录的根。 However if they know the exact file name they are looking for, it is very possible that the contents of the file will be output into the browser.但是,如果他们知道他们正在寻找准确的文件名,它是非常有可能的文件的内容将输出到浏览器中。 Particularly for Smarty .tpl files.特别是对于Smarty的TPL文件。
I only thought about this [More...]我只是想[更多...]
First find the header.tpl file in your templates folder.首先找到header.tpl的文件在您的模板文件夹。
Now go down to the clientarealinks paragraph and find the line that looks like :现在下井的clientarealinks段找到线,看起来像:
Code:代码:
<a href=”affiliates.php”><img src=”images/affiliates.gif” border=”0″ hspace=”5″ alt=”" />{$LANG.affiliatestitle}</a> <a href="affiliates.php"> <img src="images/affiliates.gif" border="0" hspace="5" alt="" /> {$ LANG.affiliatestitle} </ a>的
Now replace that line with the following code现在用下面的代码替换该行
Code:代码:
{* Check for active affiliate *} {*检查活动联盟*}
{php} {PHP}
extract($this->_tpl_vars);提取($> _tpl_vars);
$query = 'SELECT count(*) as count FROM tblaffiliates WHERE clientid = '.$clientsdetails['userid']; $查询=“SELECT COUNT(*)作为计数的clientid ='$ clientsdetails从tblaffiliates ['用户ID'];
$result = mysql_query ($query); $结果= mysql_query($查询);
$data [More...] $数据[更多...]
Here is an example of how to setup your MySQL queries so that they can easily be passed into and parsed by Smarty.下面是一个例子,如何设置你的MySQL查询,让他们可以很容易地被传递到Smarty的解析。
The result set will be a multidimensional array.结果集将是一个多维数组。 The first dimension of the array is numeric and represents each row of your result set.数组的第一个维度是数字和结果集的每一行。 The second dimension of the array is an associative [More...]第二个维度的数组是一个关联[更多...]
Here is a simple example to demonstrate an easily maintainable way of setting page loading based on the current URL.下面是一个简单的例子来演示一个易于维护的方式,根据当前的URL设置页面加载。 It holds all of your available pages in an associative array ..它拥有所有可用的网页在一个关联数组.. This could easily be pulled from a database.这可以很容易地从数据库中提取。
I have also included template code to generate a simple menu for you..我也包括模板代码生成一个简单的菜单供您.. You could of [More...]你可以[更多...]
I have just started using the overlib/popup plugin to add some basic help text on my site..我刚开始使用overlib /弹出插件在我的网站上添加一些基本的帮助文本.. With my current system, templates are not aware of each other, and as a result I need to use the popup_init in multiple places to ensure that the overlib.js is included.我目前的系统,模板是对方不知道,作为一个结果我需要使用popup_init,在多个地方,以确保包括overlib.js。
Unfortunately with the current init plugin, this results [More...]不幸的是,与当前的init插件,这将导致[更多...]