2 <form name="frm_upload" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
4 <div class="input-form">
5 <div class="row"><?php echo _AT("upload_module"); ?></div>
8 <input type="hidden" name="MAX_FILE_SIZE" value="52428800" />
9 <input type="file" name="modulefile" size="50" />
12 <div class="row buttons">
13 <input type="submit" name="install_upload" value="<?php echo _AT('install'); ?>" onclick="javascript: return validate_filename(); " class="submit" />
14 <input type="hidden" name="uploading" value="1" />
21 if (count($this->keys) > 0)
24 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="installform">
25 <table class="data" summary="" rules="cols">
28 <th scope="col"> </th>
29 <th scope="col"><?php echo _AT('module_name'); ?></th>
30 <th scope="col"><?php echo _AT('directory_name'); ?></th>
31 <th scope="col"><?php echo _AT('description'); ?></th>
38 <input type="submit" name="install_manually" value="<?php echo _AT('install'); ?>" />
44 <?php if (!empty($this->keys)): ?>
45 <?php foreach($this->keys as $dir_name) : $module =& $this->module_list[$dir_name]; ?>
46 <tr onmousedown="document.installform['m_<?php echo $dir_name; ?>'].checked = true; rowselect(this);" id="r_<?php echo $dir_name; ?>">
47 <td valign="top"><input type="radio" id="m_<?php echo $dir_name; ?>" name="mod" value="<?php echo $dir_name; ?>" /></td>
48 <td valign="top"><label for="m_<?php echo $row['dir_name']; ?>"><?php echo $module->getName(); ?></label></td>
49 <td valign="top"><code><?php echo $dir_name; ?>/</code></td>
50 <td valign="top"><?php echo $module->getDescription($_SESSION['lang']); ?></td>
55 <td colspan="4"><?php echo _AT('none_found'); ?></td>
66 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
69 <table class="data" summary="" rules="cols">
72 <th scope="col"> </th>
73 <th scope="col"><?php echo _AT('module_name');?></th>
74 <th scope="col"><?php echo _AT('description');?></th>
75 <th scope="col"><?php echo _AT('version');?></th>
76 <th scope="col"><?php echo _AT('atutor_version_tested_with');?></th>
77 <th scope="col"><?php echo _AT('maintainers');?></th>
78 <th scope="col"><?php echo _AT('installed').'?';?></th>
85 <input type="submit" name="install" value="<?php echo _AT('install'); ?>" />
86 <input type="submit" name="download" value="<?php echo _AT('download'); ?>" />
87 <input type="submit" name="version_history" value="<?php echo _AT('version_history'); ?>" />
94 $num_of_modules = count($this->module_list_array);
96 if ($num_of_modules == 0)
101 <td colspan="7"><?php echo _AT('none_found'); ?></td>
109 if(is_array($this->module_list_array))
111 for ($i=0; $i < $num_of_modules; $i++)
113 // check if the module has been installed
114 //$sql = "SELECT * FROM ".TABLE_PREFIX."modules WHERE dir_name = '" . $this->module_list_array[$i]["history"][0]["install_folder"] . "'";
115 //$result = mysql_query($sql, $db) or die(mysql_error());
117 if (mysql_num_rows($this->result) == 0) $installed = false;
118 else $installed = true;
121 <tr onmousedown="document.form['m<?php echo $i; ?>'].checked = true; rowselect(this);" id="r_<?php echo $i; ?>">
122 <td><input type="radio" name="id" value="<?php echo $i; ?>" id="m<?php echo $i; ?>" <?php if ($installed) echo 'disabled="disabled"'; ?> /></td>
123 <td><label for="m<?php echo $i; ?>"><?php echo $this->module_list_array[$i]["name"]; ?></label></td>
124 <td><?php echo $this->module_list_array[$i]["description"]; ?></td>
125 <td><?php echo $this->module_list_array[$i]["history"][0]["version"]; ?></td>
126 <td><?php echo $this->module_list_array[$i]["atutor_version"]; ?></td>
127 <td><?php echo $this->module_list_array[$i]["history"][0]["maintainer"]; ?></td>
128 <td><?php if ($installed) echo _AT("installed"); else echo _AT("not_installed"); ?></td>