<?php
/*
* CLN Admin Interface
*
* Copyright (c) 2003-4 St. Christopher House
*
* Developed by The Working Group Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @version $Id: ChooseModType.html,v 1.19 2004/08/24 04:53:59 darcy Exp $
*
*/
// set title
// should support multiple languages
$GLOBALS['CLN_PAGE_TITLE'] = 'Add a block - Choose Module Type';
?>
<form name="pageEdit" action="<?php echo appendToURL(cleanURL($GLOBALS['path']), 'editKoId=' . $this->_super->koId . '&editProcess=Content&subprocess=ChooseModType'); ?>" method="post">
<?php echo ADMIN_PAGE_CHOOSE_MODID_INSTRUCTIONS; ?>
<?php
$sql = sprintf("SELECT modId, modName, variables, description FROM `%s` WHERE modId > 2 AND visible = 1 ORDER BY modName",
MODULE_TABLE);
$db = &Cln_Db::singleton(MAIN_CLN_DSN);
$result = $db->query($sql);
if (PEAR::isError($result)) {
PEAR::raiseError("Couldn't get modules info", E_WARNING);
return FALSE;
}
else {
while ($module = $result->fetchRow(DB_FETCHMODE_OBJECT)) {
echo '<div class="modType"><input type="radio" id="selectedModule' . $module->modId . '" name="selectedModule" value="' . $module->modId;
if (!empty($module->variables)) { echo ' ' . $module->variables; }
echo '"/>';
//print '<a href="javascript:void(0);" onmouseover="return overlib(\''.$module->description.'\');" onmouseout="nd();">'
print '<label for="selectedModule' . $module->modId . '"><b>' . $module->modName . '</b></label>';
print '<div class="modTypeDescription">' . $module->description . '</div>';
//print '</a>';
print "</div>\n";
}
}
?>
<br class="anchor"/>
<span class="clnFormLine">
<label class="clnFormLabel" for="ChooseModType"></label>
<input class="clnFormInput" type="submit" id="ChooseModType" name="ChooseModType" value="<?php echo ADMIN_BTN_ADD_BLOCK_THIS_TYPE; ?>" />
<input class="clnFormInput" type="submit" name="ReturnToPanel" value="<?php echo ADMIN_BTN_CANCEL_RETURN; ?>" />
</span>
</form>