mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
new module creation
This commit is contained in:
64
e107_plugins/featurebox/featurebox.php
Normal file
64
e107_plugins/featurebox/featurebox.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/featurebox.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:10 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
if($sql -> db_Select("featurebox", "*", "fb_mode=1 AND fb_class IN (".USERCLASS_LIST.") ORDER BY fb_class ASC"))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
{
|
||||
if($row['fb_class'] > 0 && $row['fb_class'] < 251)
|
||||
{
|
||||
extract($row);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$xentry = $row;
|
||||
}
|
||||
}
|
||||
if(!isset($fb_title))
|
||||
{
|
||||
extract($xentry);
|
||||
}
|
||||
}
|
||||
else if($sql -> db_Select("featurebox", "*", "fb_mode!=1 AND fb_class IN (".USERCLASS_LIST.")"))
|
||||
{
|
||||
$nfArray = $sql -> db_getList();
|
||||
$entry = $nfArray[array_rand($nfArray)];
|
||||
extract($entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$fbcc = $fb_title;
|
||||
$fb_title = $tp -> toHTML($fb_title, TRUE);
|
||||
$fb_text = $tp -> toHTML($fb_text, TRUE);
|
||||
if(!$fb_rendertype)
|
||||
{
|
||||
$ns -> tablerender($fb_title, $fb_text, 'featurebox');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(e_PLUGIN."featurebox/templates/".$fb_template.".php");
|
||||
echo $FB_TEMPLATE;
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user