Annotation of /mambo/trunk/administrator/components/com_languages/admin.languages.html.php
Parent Directory
|
Revision Log
Revision 1 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: admin.languages.html.php,v 1.1 2005/07/22 01:52:34 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Languages | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | /** | ||
| 15 : | * @package Mambo | ||
| 16 : | * @subpackage Languages | ||
| 17 : | */ | ||
| 18 : | class HTML_languages { | ||
| 19 : | |||
| 20 : | function showLanguages( $cur_lang, &$rows, &$pageNav, $option ) { | ||
| 21 : | global $my; | ||
| 22 : | ?> | ||
| 23 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 24 : | <table class="adminheading"> | ||
| 25 : | <tr> | ||
| 26 : | <th class="langmanager"> | ||
| 27 : | Language Manager <small><small>[ Site ]</small></small> | ||
| 28 : | </th> | ||
| 29 : | </tr> | ||
| 30 : | </table> | ||
| 31 : | |||
| 32 : | <table class="adminlist"> | ||
| 33 : | <tr> | ||
| 34 : | <th width="20"> | ||
| 35 : | # | ||
| 36 : | </th> | ||
| 37 : | <th width="30"> | ||
| 38 : | | ||
| 39 : | </th> | ||
| 40 : | <th width="25%" class="title"> | ||
| 41 : | Language | ||
| 42 : | </th> | ||
| 43 : | <th width="5%"> | ||
| 44 : | Published | ||
| 45 : | </th> | ||
| 46 : | <th width="10%"> | ||
| 47 : | Version | ||
| 48 : | </th> | ||
| 49 : | <th width="10%"> | ||
| 50 : | Date | ||
| 51 : | </th> | ||
| 52 : | <th width="20%"> | ||
| 53 : | Author | ||
| 54 : | </th> | ||
| 55 : | <th width="25%"> | ||
| 56 : | Author Email | ||
| 57 : | </th> | ||
| 58 : | </tr> | ||
| 59 : | <?php | ||
| 60 : | $k = 0; | ||
| 61 : | for ($i=0, $n=count( $rows ); $i < $n; $i++) { | ||
| 62 : | $row = &$rows[$i]; | ||
| 63 : | ?> | ||
| 64 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 65 : | <td width="20"><?php echo $pageNav->rowNumber( $i ); ?></td> | ||
| 66 : | <td width="20"> | ||
| 67 : | <input type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->language; ?>" onClick="isChecked(this.checked);" /> | ||
| 68 : | </td> | ||
| 69 : | <td width="25%"> | ||
| 70 : | <a href="#edit" onclick="hideMainMenu();return listItemTask('cb<?php echo $i;?>','edit_source')"><?php echo $row->name;?></a></td> | ||
| 71 : | <td width="5%" align="center"> | ||
| 72 : | <?php | ||
| 73 : | if ($row->published == 1) { ?> | ||
| 74 : | <img src="images/tick.png" alt="Published"/> | ||
| 75 : | <?php | ||
| 76 : | } else { | ||
| 77 : | ?> | ||
| 78 : | | ||
| 79 : | <?php | ||
| 80 : | } | ||
| 81 : | ?> | ||
| 82 : | </td> | ||
| 83 : | <td align=center> | ||
| 84 : | <?php echo $row->version; ?> | ||
| 85 : | </td> | ||
| 86 : | <td align=center> | ||
| 87 : | <?php echo $row->creationdate; ?> | ||
| 88 : | </td> | ||
| 89 : | <td align=center> | ||
| 90 : | <?php echo $row->author; ?> | ||
| 91 : | </td> | ||
| 92 : | <td align=center> | ||
| 93 : | <?php echo $row->authorEmail; ?> | ||
| 94 : | </td> | ||
| 95 : | </tr> | ||
| 96 : | <?php | ||
| 97 : | } | ||
| 98 : | ?> | ||
| 99 : | </table> | ||
| 100 : | <?php echo $pageNav->getListFooter(); ?> | ||
| 101 : | |||
| 102 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 103 : | <input type="hidden" name="task" value="" /> | ||
| 104 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 105 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 106 : | </form> | ||
| 107 : | <?php | ||
| 108 : | } | ||
| 109 : | |||
| 110 : | function editLanguageSource( $language, &$content, $option ) { | ||
| 111 : | global $mosConfig_absolute_path; | ||
| 112 : | $language_path = $mosConfig_absolute_path . "/language/" . $language . ".php"; | ||
| 113 : | ?> | ||
| 114 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 115 : | <table cellpadding="1" cellspacing="1" border="0" width="100%"> | ||
| 116 : | <tr> | ||
| 117 : | <td width="270"><table class="adminheading"><tr><th class="langmanager">Language Editor</th></tr></table></td> | ||
| 118 : | <td width="240"> | ||
| 119 : | <span class="componentheading"><?php echo $language; ?>.php is : | ||
| 120 : | <b><?php echo is_writable($language_path) ? '<font color="green"> Writeable</font>' : '<font color="red"> Unwriteable</font>' ?></b> | ||
| 121 : | </span> | ||
| 122 : | </td> | ||
| 123 : | <?php | ||
| 124 : | if (mosIsChmodable($language_path)) { | ||
| 125 : | if (is_writable($language_path)) { | ||
| 126 : | ?> | ||
| 127 : | <td> | ||
| 128 : | <input type="checkbox" id="disable_write" name="disable_write" value="1"/> | ||
| 129 : | <label for="disable_write">Make unwriteable after saving</label> | ||
| 130 : | </td> | ||
| 131 : | <?php | ||
| 132 : | } else { | ||
| 133 : | ?> | ||
| 134 : | <td> | ||
| 135 : | <input type="checkbox" id="enable_write" name="enable_write" value="1"/> | ||
| 136 : | <label for="enable_write">Override write protection while saving</label> | ||
| 137 : | </td> | ||
| 138 : | <?php | ||
| 139 : | } // if | ||
| 140 : | } // if | ||
| 141 : | ?> | ||
| 142 : | </tr> | ||
| 143 : | </table> | ||
| 144 : | <table class="adminform"> | ||
| 145 : | <tr><th><?php echo $language_path; ?></th></tr> | ||
| 146 : | <tr><td><textarea style="width:100%" cols="110" rows="25" name="filecontent" class="inputbox"><?php echo $content; ?></textarea></td></tr> | ||
| 147 : | </table> | ||
| 148 : | <input type="hidden" name="language" value="<?php echo $language; ?>" /> | ||
| 149 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 150 : | <input type="hidden" name="task" value="" /> | ||
| 151 : | </form> | ||
| 152 : | <?php | ||
| 153 : | } | ||
| 154 : | |||
| 155 : | } | ||
| 156 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

