<?php
/*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to hide@address.com so we can mail you a copy immediately.
*
* @category Troubleticket
* @package QuickTicket
* @author Philippe Vandenberghe <hide@address.com>
* @copyright 2008-2012 The PHP Group
* @license http://www.php.net/license PHP License 3.0
* @version 1.9.0.3 build:20081001
* @link http://www.qt-cute.org/doc/package/qti
* @since File available since Release 1.0.0
* @deprecated File deprecated in Release 2.0.0
*
*/
session_start();
require_once('bin/qti_init.php');
include(Translate('qti_lang_adm.inc'));
if ( $oVIP->role!='A' ) die($L['E_admin']);
// INITIALISE
$strAction = 'add';
if ( isset($_GET['a']) ) $strAction = strip_tags($_GET['a']);
$oVIP->selfurl = 'qti_adm_module.php';
$oVIP->selfname = $L['Adm_modules'];
// --------
// SUBMITTED
// --------
if ( isset($_POST['ok']) )
{
$strAction = 'add';
if ( isset($_POST['action']) ) $strAction = $_POST['action'];
// check form
$strName = strtolower(strip_tags(trim($_POST['name']))); if ( get_magic_quotes_gpc() ) $strName = stripslashes($strName);
$strName = str_replace(' ','_',$strName);
$strFile = 'qtim_'.$strName.'_'.($strAction=='rem' ? 'un' : '').'install.php';
if ( file_exists($strFile) )
{
// exit
$oVIP->exiturl = $strFile;
$oVIP->exitname = $L['Module_'.$strAction];
$oVIP->EndMessage(NULL,$L['Module_name'].': '.$strName,'admin',0);
}
else
{
$qti_error = 'Module not found... ('.$strFile.')<br/><br/>Possible cause: components of this module are not uploaded.';
}
}
// --------
// HTML START
// --------
$arrJava = array('com'=>false);
include('qti_adm_p_header.php');
include('qti_adm_p_title.php');
echo '<form method="post" action="',$oVIP->selfurl,'">
<table class="ta" cellspacing="0">
';
echo '<tr class="tr tr_o">
<th class="th_o th_o_first" style="width:200px;"><label for="name">',$L['Module_'.$strAction],'</label></th>
<td class="td_o"><input id="name" name="name" size="12" maxlength="24" value=""/> <span class="help">',$L['Module_name'],'</span></td>
</tr>
';
echo '<tr class="tr tr_o">
<th class="th_o th_o_first"> </th>
<td class="td_o"><input type="hidden" name="action" value="',$strAction,'"/><input type="submit" id="ok" name="ok" value="',$L['Search'],'"/></td>
</tr>
';
echo '</table>
</form><br/>
';
// HTML END
echo '
<script type="text/javascript">
<!--
document.getElementById("name").focus();
-->
</script>
';
include('qti_adm_p_footer.php');
?>