2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
13 //include(TR_INCLUDE_PATH.'header.inc.php');
\r
14 global $dependent_patches;
\r
16 if (isset($this->javascript_run_now)) echo $this->javascript_run_now;
\r
19 <div class="input-form">
\r
20 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
\r
21 <fieldset class="group_form"><legend class="group_form"><?php echo _AT("updates"); ?></legend>
\r
23 <table class="data" rules="rows">
\r
26 <th scope="col"> </th>
\r
27 <th scope="col"><?php echo _AT('system_update_id');?></th>
\r
28 <th scope="col"><?php echo _AT('description');?></th>
\r
29 <th scope="col"><?php echo _AT('status');?></th>
\r
30 <th scope="col"><?php echo _AT('available_to');?></th>
\r
31 <th scope="col"><?php echo _AT('author');?></th>
\r
32 <th scope="col"><?php echo _AT('installed_date');?></th>
\r
33 <th scope="col"><?php echo _AT('view_message');?></th>
\r
37 <?php if ($this->num_of_patches == 0){?>
\r
41 <?php echo _AT('none_found'); ?>
\r
50 <input type="submit" name="install" value="<?php echo _AT('install'); ?>" />
\r
55 <?php if (is_array($this->patches_in_db))
\r
56 foreach ($this->patches_in_db as $row)
\r
57 print_patch_row($row, $row['patches_id'], false);
\r
60 // display un-installed patches
\r
61 if(is_array($this->patch_list_array))
\r
63 foreach ($this->patch_list_array as $row_num => $new_patch)
\r
65 if (!is_patch_installed($new_patch['system_patch_id']))
\r
67 $dependent_patches_installed = true;
\r
68 $dependent_patches = "";
\r
70 // check if the dependent patches are installed
\r
71 if (is_array($new_patch["dependent_patches"]))
\r
74 foreach ($new_patch["dependent_patches"] as $num => $dependent_patch)
\r
76 if (!is_patch_installed($dependent_patch))
\r
78 $dependent_patches_installed = false;
\r
79 $dependent_patches .= $dependent_patch. ", ";
\r
83 // remove the last comma in the string
\r
84 if ($dependent_patches <> "") $dependent_patches = substr($dependent_patches, 0, -2);
\r
87 // display patch row
\r
88 if ($dependent_patches_installed)
\r
89 print_patch_row($new_patch, $array_id++, true);
\r
92 print_patch_row($new_patch, $array_id++, false);
\r
93 $dependent_patches_installed = true;
\r
110 <div class="input-form">
\r
111 <form name="frm_upload" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
\r
112 <fieldset class="group_form"><legend class="group_form"><?php echo _AT("upload"); ?></legend>
\r
114 <div class="row"><label for="patchfile"><?php echo _AT("upload_update"); ?></label></div>
\r
117 <input type="hidden" name="MAX_FILE_SIZE" value="52428800" />
\r
118 <input type="file" name="patchfile" id="patchfile" size="50" />
\r
121 <div class="row buttons">
\r
122 <input type="submit" name="install_upload" value="Install" onclick="javascript: return validate_filename(); " class="submit" />
\r
123 <input type="hidden" name="uploading" value="1" />
\r
129 <script language="JavaScript" type="text/javascript">
\r
132 String.prototype.trim = function() {
\r
133 return this.replace(/^\s+|\s+$/g,"");
\r
136 // This function validates if and only if a zip file is given
\r
137 function validate_filename() {
\r
139 var file = document.frm_upload.patchfile.value;
\r
140 if (!file || file.trim()=='') {
\r
141 alert('Please give a zip file!');
\r
145 if(file.slice(file.lastIndexOf(".")).toLowerCase() != '.zip') {
\r
146 alert('Please upload ZIP file only!');
\r
155 <?php require (TR_INCLUDE_PATH.'footer.inc.php'); ?>
\r