Annotation of /trunk/admin.nokkaew.html.php
Parent Directory
|
Revision Log
Revision 38 - (view) (download)
| 1 : | andphe | 3 | <?php |
| 2 : | // NOKKAEW - is "Parrot" in thai name | ||
| 3 : | // Copyright (C) copyright 2006 MamboHub.com | ||
| 4 : | // All rights reserved. The NokKaew project is a extention hack and | ||
| 5 : | // component for the Mambo Open Server. It enables Mambo OS to handle multi | ||
| 6 : | // lingual sites especially in all dynamic contents which are stored in the | ||
| 7 : | // database. | ||
| 8 : | // | ||
| 9 : | // This program is free software; you can redistribute it and/or | ||
| 10 : | // modify it under the terms of the GNU General Public License | ||
| 11 : | // as published by the Free Software Foundation; either version 2 | ||
| 12 : | // of the License, or (at your option) any later version. | ||
| 13 : | // | ||
| 14 : | // This program is distributed in the hope that it will be useful, | ||
| 15 : | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 : | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 : | // GNU General Public License for more details. | ||
| 18 : | // | ||
| 19 : | // You should have received a copy of the GNU General Public License | ||
| 20 : | // along with this program; if not, write to the Free Software | ||
| 21 : | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. | ||
| 22 : | // | ||
| 23 : | // The "GNU General Public License" (GPL) is available at | ||
| 24 : | // http://www.gnu.org/copyleft/gpl.html | ||
| 25 : | // -------------------------------------------------------------------------------- | ||
| 26 : | // $Id: admin.nokkaew.html.php,v 1.5.3 2006/07/28 11:45:34 akede Exp $ | ||
| 27 : | // | ||
| 28 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 29 : | $adminPath = dirname( __FILE__); | ||
| 30 : | |||
| 31 : | global $mosConfig_locale; | ||
| 32 : | $short_loc = substr( $mosConfig_locale, 0, 2); | ||
| 33 : | if( file_exists( $adminPath . '/nokkaew.help.inc_' . $short_loc . '.php' ) ){ | ||
| 34 : | require_once( $adminPath . '/nokkaew.help.inc_' . $short_loc . '.php' ); | ||
| 35 : | }else require_once( "$adminPath/nokkaew.help.inc.php" ); | ||
| 36 : | |||
| 37 : | class HTML_nokkaew { | ||
| 38 : | |||
| 39 : | function showWelcome() { | ||
| 40 : | HTML_nokkaew_help::showWelcome(); | ||
| 41 : | } | ||
| 42 : | |||
| 43 : | |||
| 44 : | function showDinnermenu() { | ||
| 45 : | HTML_nokkaew_help::showDinnermenu(); | ||
| 46 : | } | ||
| 47 : | |||
| 48 : | function showPostInstall() { | ||
| 49 : | HTML_nokkaew_help::showPostInstall(); | ||
| 50 : | } | ||
| 51 : | |||
| 52 : | function showInformation( $fileCode='TN' ) { | ||
| 53 : | global $act, $task, $option, $mosConfig_absolute_path, $mosConfig_live_site; | ||
| 54 : | HTML_nokkaew::_header() | ||
| 55 : | ?> | ||
| 56 : | <style type="text/css"> | ||
| 57 : | <!-- | ||
| 58 : | .style1 {color: #FF9900} | ||
| 59 : | --> | ||
| 60 : | </style> | ||
| 61 : | supachai_c | 38 | ai <tr> |
| 62 : | andphe | 3 | <td align="left" valign="top"> |
| 63 : | <h2>PREAMBLE</h2> | ||
| 64 : | The NokKaew is a add on component for Mambo Open Source.<br /> | ||
| 65 : | Mambo Open Source is developed and licend by:<br /> | ||
| 66 : | Miro International Pty Ltd. 251 2000 - 2004 All rights reserved.<br /> | ||
| 67 : | <br /> | ||
| 68 : | Mambo Open Source is Free Software released under the GNU/GPL License.<br /> | ||
| 69 : | All trademarks and copyrights within this software are owned | ||
| 70 : | by their respective owners.<br /> | ||
| 71 : | <br /> | ||
| 72 : | Within this license the "product" refers to the name "NokKaew".<br /> | ||
| 73 : | Also the term "NokKaew- Nok Kaew" must not be used by any derived software. | ||
| 74 : | </td> | ||
| 75 : | <?php HTML_nokkaew::_sideMenu();?> | ||
| 76 : | </tr> | ||
| 77 : | <tr> | ||
| 78 : | <td align="left" valign="top"> | ||
| 79 : | <?php | ||
| 80 : | switch ( $fileCode ) { | ||
| 81 : | case "changelog": | ||
| 82 : | ?> | ||
| 83 : | <h2> </h2> | ||
| 84 : | <?php | ||
| 85 : | echo nl2br(file_get_contents(dirname( __FILE__) ."/documentation/ReadMe")); | ||
| 86 : | break; | ||
| 87 : | } | ||
| 88 : | ?> | ||
| 89 : | </td> | ||
| 90 : | <?php | ||
| 91 : | HTML_nokkaew::_footer($act, $option); | ||
| 92 : | } | ||
| 93 : | |||
| 94 : | |||
| 95 : | function showComponentConfiguration( $nokkaewManager, $languageList ) { | ||
| 96 : | global $act, $task, $option, $database, $mosConfig_lang, $mosConfig_live_site; | ||
| 97 : | HTML_nokkaew::_MamboHeader(); | ||
| 98 : | ?> <br /> | ||
| 99 : | <script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> | ||
| 100 : | <table cellpadding="4" cellspacing="0" border="0" width="100%"> | ||
| 101 : | <tr> | ||
| 102 : | supachai_c | 38 | ai <td width="100%" align="left" class="sectionname"> |
| 103 : | ai <?php HTML_nokkaew::_toolbar();?> </td> | ||
| 104 : | andphe | 3 | </table> |
| 105 : | |||
| 106 : | <table cellpadding="3" cellspacing="0" border="0" width="100%"> | ||
| 107 : | <tr> | ||
| 108 : | <td width="100%"> | ||
| 109 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform"> |
| 110 : | andphe | 3 | <tr> |
| 111 : | supachai_c | 38 | ai <th colspan="3"><?php echo _NOKKAEW_ADMIN_SHOWIF;?></th> |
| 112 : | andphe | 3 | </tr> |
| 113 : | <tr align="center" valign="middle"> | ||
| 114 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_NOTRANSLATION;?></strong></td> | ||
| 115 : | <td width="20%" align="left" valign="top"> | ||
| 116 : | <?php | ||
| 117 : | $options[] = mosHTML::makeOption( '0', _NOKKAEW_ADMIN_ORIGINAL_CONTENT ); | ||
| 118 : | $options[] = mosHTML::makeOption( '1', _NOKKAEW_ADMIN_PLACEHOLDER ); | ||
| 119 : | $options[] = mosHTML::makeOption( '2', _NOKKAEW_ADMIN_ORIGINAL_WITH_INFO ); // activated mic | ||
| 120 : | $frmField = mosHTML::selectList( $options, 'frmTranslationMode', 'class="inputbox" size="1"', 'value', 'text', $nokkaewManager->getCfg( 'noTranslation' ) ); | ||
| 121 : | echo $frmField; | ||
| 122 : | ?> | ||
| 123 : | supachai_c | 38 | ai </td> |
| 124 : | andphe | 3 | <td align="left" valign="top"><?php echo _NOKKAEW_ADMIN_NOTRANSLATION_HELP;?></td> |
| 125 : | </tr> | ||
| 126 : | <tr align="center" valign="middle"> | ||
| 127 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_PLACEHOLDER;?></strong></td> | ||
| 128 : | <td width="20%" align="left" valign="top"> | ||
| 129 : | <input type="text" name="frmTranslationDefaultText" size="75" value="<?php echo $nokkaewManager->getCfg('defaultText');?>" /> | ||
| 130 : | </td> | ||
| 131 : | <td align="left"> | ||
| 132 : | <?php | ||
| 133 : | $tip = _NOK_TT_TRANS_DEFAULT; | ||
| 134 : | echo mosToolTip( $tip ); | ||
| 135 : | ?> | ||
| 136 : | </td> | ||
| 137 : | </tr> | ||
| 138 : | <tr align="center" valign="middle"> | ||
| 139 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_FRONTEND_VIEW;?></strong></td> | ||
| 140 : | <td width="20%" align="left" valign="top"> | ||
| 141 : | <?php | ||
| 142 : | $options = array(); | ||
| 143 : | $options[] = mosHTML::makeOption( '', _NOKKAEW_ADMIN_FRONTEND_COMBO ); | ||
| 144 : | $options[] = mosHTML::makeOption( 'hlist', _NOKKAEW_ADMIN_FRONTEND_LIST ); | ||
| 145 : | $options[] = mosHTML::makeOption( 'vlist', _NOKKAEW_ADMIN_FRONTEND_VLIST ); // new mic | ||
| 146 : | $options[] = mosHTML::makeOption( 'himage', _NOKKAEW_ADMIN_FRONTEND_IMAGE ); | ||
| 147 : | $options[] = mosHTML::makeOption( 'vimage', _NOKKAEW_ADMIN_FRONTEND_VIMAGE ); // new mic | ||
| 148 : | $frmField = mosHTML::selectList( $options, 'frmFrontendMode', 'class="inputbox" size="1"', 'value', 'text', $nokkaewManager->getCfg( 'frontendMode' ) ); | ||
| 149 : | echo $frmField; | ||
| 150 : | ?> | ||
| 151 : | supachai_c | 38 | ai </td> |
| 152 : | andphe | 3 | <td align="left"> |
| 153 : | <?php | ||
| 154 : | $tip = _NOKKAEW_ADMIN_FRONTEND_HELP; | ||
| 155 : | echo mosToolTip( $tip ); | ||
| 156 : | ?> | ||
| 157 : | </td> | ||
| 158 : | </tr> | ||
| 159 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOK_SPACER; ?></strong></td> | ||
| 160 : | <td width="20%" align="left" valign="top"> | ||
| 161 : | <input type="text" name="frmTextSpacer" size="5" value="<?php echo $nokkaewManager->getCfg( 'textSpacer' );?>" /> | ||
| 162 : | </td> | ||
| 163 : | <td align="left"> | ||
| 164 : | <?php | ||
| 165 : | $tip = _NOK_TT_SPACER; | ||
| 166 : | echo mosToolTip( $tip ); | ||
| 167 : | ?> | ||
| 168 : | </td> | ||
| 169 : | </tr> | ||
| 170 : | </table> | ||
| 171 : | <br> | ||
| 172 : | |||
| 173 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform"> |
| 174 : | andphe | 3 | <tr> |
| 175 : | supachai_c | 38 | ai <th colspan="3"><?php echo _NOKKAEW_ADMIN_SHOWACTIVE;?></th> |
| 176 : | andphe | 3 | </tr> |
| 177 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_DEFAULT_LANGUAGE;?></strong></td> | ||
| 178 : | <td align="left" valign="top"><strong style="color: red;"><?php echo $mosConfig_lang . '</strong> ( ' . _NOKKAEW_ADMIN_DEFAULT_LANGUAGE_HELP . ' )'; ?></td> | ||
| 179 : | </tr> | ||
| 180 : | <tr> | ||
| 181 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_LANGUAGE;?></strong></td> | ||
| 182 : | <td><?php echo _NOKKAEW_ADMIN_LANGUAGE_HELP;?></td> | ||
| 183 : | <tr> | ||
| 184 : | <td align="center" valign="top" colspan="2"> | ||
| 185 : | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> | ||
| 186 : | <tr> | ||
| 187 : | <th class="title" width="20%" align="left"> | ||
| 188 : | <?php echo _NOKKAEW_ADMIN_TITLE_NAME;?> | ||
| 189 : | | ||
| 190 : | <?php | ||
| 191 : | $tip = _NOK_TT_TITLE_NAME; | ||
| 192 : | echo mosToolTip( $tip ); | ||
| 193 : | ?> | ||
| 194 : | </th> | ||
| 195 : | <th width="5%" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_ACTIVE;?></th> | ||
| 196 : | <th width="10%" nowrap="nowrap" align="left"> | ||
| 197 : | <?php echo _NOKKAEW_ADMIN_TITLE_ISO;?> | ||
| 198 : | | ||
| 199 : | <?php | ||
| 200 : | $tip = _NOK_TT_TITLE_ISO; | ||
| 201 : | echo mosToolTip( $tip ); | ||
| 202 : | ?> | ||
| 203 : | </th> | ||
| 204 : | <th width="15%" nowrap="nowrap" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_MAMBO;?></th> | ||
| 205 : | <th width="30%" nowrap="nowrap" align="left"> | ||
| 206 : | <?php echo _NOKKAEW_ADMIN_TITLE_IMAGE; ?> | ||
| 207 : | | ||
| 208 : | <?php | ||
| 209 : | $tip = _NOK_TT_IMAGES_DIR; | ||
| 210 : | echo mosToolTip( $tip ); | ||
| 211 : | ?> | ||
| 212 : | </th> | ||
| 213 : | <th nowrap="nowrap" align="left"> | ||
| 214 : | <?php echo _NOKKAEW_ADMIN_TITLE_ORDER;?> | ||
| 215 : | | ||
| 216 : | <?php | ||
| 217 : | $tip = _NOK_TT_TITLE_ORDER; | ||
| 218 : | echo mosToolTip( $tip ); | ||
| 219 : | ?> | ||
| 220 : | </th> | ||
| 221 : | </tr> | ||
| 222 : | <?php | ||
| 223 : | $k=0; | ||
| 224 : | $i=0; | ||
| 225 : | reset($languageList); | ||
| 226 : | foreach ($languageList as $language ) { ?> | ||
| 227 : | <tr class="<?php echo 'row' . $k; ?>"> | ||
| 228 : | <td> | ||
| 229 : | <input type="hidden" name="frmLanguageID[]" value="<?php echo $language->id; ?>" /> | ||
| 230 : | andphe | 14 | <input type="hidden" name="frmLanguageName[]" value="<?php echo $language->name; ?>" size="30" maxlength="100" /> |
| 231 : | <?php echo $language->name; ?> | ||
| 232 : | supachai_c | 38 | ai </td> |
| 233 : | andphe | 3 | <td align="center"><input type="checkbox" name="frmLanguageActive[]"<?php echo $language->active==1 ? ' checked' : ''; ?> value="<?php echo $language->id; ?>" /></td> |
| 234 : | andphe | 14 | <td><input type="hidden" name="frmLanguageISO[]" value="<?php echo $language->iso; ?>" size="10" maxlength="10" /> |
| 235 : | <?php echo $language->iso; ?></td> | ||
| 236 : | <td><input type="hidden" name="frmLanguageMambo[]" value="<?php echo $language->mambo; ?>" size="20" maxlength="20" /> | ||
| 237 : | <?php echo $language->mambo; ?></td> | ||
| 238 : | andphe | 3 | <td><input type="text" name="frmLanguageImage[]" value="<?php echo $language->image; ?>" size="50" maxlength="100" /></td> |
| 239 : | <td><input type="text" name="frmLanguageOrder[]" value="<?php echo $language->ordering; ?>" size="5" maxlength="5" /></td> | ||
| 240 : | <?php | ||
| 241 : | $k = 1 - $k; | ||
| 242 : | $i++; | ||
| 243 : | } | ||
| 244 : | ?> | ||
| 245 : | supachai_c | 38 | ai </tr> |
| 246 : | ai </table> | ||
| 247 : | ai </td> | ||
| 248 : | andphe | 3 | </tr> |
| 249 : | </table> | ||
| 250 : | |||
| 251 : | </td></tr> | ||
| 252 : | </table> | ||
| 253 : | <?php | ||
| 254 : | HTML_nokkaew::_MamboFooter($act, $option); | ||
| 255 : | } | ||
| 256 : | |||
| 257 : | function showElementOverview( $nokkaewManager, $option, $search, $pageNav ) { | ||
| 258 : | global $my, $act, $task, $database, $mosConfig_live_site; | ||
| 259 : | HTML_nokkaew::_MamboHeader(); | ||
| 260 : | ?> | ||
| 261 : | <table cellpadding="4" cellspacing="0" border="0" width="100%"> | ||
| 262 : | <tr> | ||
| 263 : | supachai_c | 38 | ai <td width="100%" align="left" class="sectionname"> |
| 264 : | ai <?php HTML_nokkaew::_Toolbar(); ?> </td> | ||
| 265 : | andphe | 3 | <td nowrap>Display #</td> |
| 266 : | <td> <?php echo $pageNav->writeLimitBox(); ?> </td> | ||
| 267 : | <td>Search:</td> | ||
| 268 : | <td> <input type="text" name="search" value="<?php echo $search;?>" class="inputbox" onChange="document.adminForm.submit();" /> | ||
| 269 : | </td> | ||
| 270 : | </tr> | ||
| 271 : | </table> | ||
| 272 : | |||
| 273 : | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> | ||
| 274 : | <tr> | ||
| 275 : | <th width="20" nowrap> </th> | ||
| 276 : | <th class="title" width="35%" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_NAME;?></th> | ||
| 277 : | <th width="15%" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_AUTHOR;?></th> | ||
| 278 : | <th width="15%" nowrap="nowrap" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_VERSION;?></th> | ||
| 279 : | <th nowrap="nowrap" align="left"><?php echo _NOKKAEW_ADMIN_TITLE_DESCRIPTION;?></th> | ||
| 280 : | </tr> | ||
| 281 : | <?php | ||
| 282 : | $elements = $nokkaewManager->getContentElements(); | ||
| 283 : | $k=0; | ||
| 284 : | $i=0; | ||
| 285 : | foreach (array_values($elements) as $element ) { | ||
| 286 : | $key = $element->referenceInformation['tablename']; | ||
| 287 : | ?> | ||
| 288 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 289 : | <td width="20"> | ||
| 290 : | <?php if ($element->checked_out && $element->checked_out != $my->id) { ?> | ||
| 291 : | | ||
| 292 : | <?php } else { ?> | ||
| 293 : | <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $key; ?>" onclick="isChecked(this.checked);" /> | ||
| 294 : | <?php } ?> | ||
| 295 : | </td> | ||
| 296 : | supachai_c | 38 | ai <td align="left"> |
| 297 : | ai <a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $element->Name; ?></a> </td> | ||
| 298 : | ai <td align="left"><?php echo $element->Author ? $element->Author : ' '; ?></td> | ||
| 299 : | ai <td align="left"><?php echo $element->Version ? $element->Version : ' '; ?></td> | ||
| 300 : | ai <td align="left"><?php echo $element->Description ? $element->Description : ' '; ?></td> | ||
| 301 : | andphe | 3 | <?php |
| 302 : | $k = 1 - $k; | ||
| 303 : | $i++; | ||
| 304 : | } | ||
| 305 : | ?> | ||
| 306 : | supachai_c | 38 | ai </tr> |
| 307 : | andphe | 3 | <tr> |
| 308 : | <th align="center" colspan="10"> <?php echo $pageNav->writePagesLinks(); ?></th> | ||
| 309 : | </tr> | ||
| 310 : | <tr> | ||
| 311 : | <td align="center" colspan="10"> <?php echo $pageNav->writePagesCounter(); ?></td> | ||
| 312 : | </tr> | ||
| 313 : | </table> | ||
| 314 : | <?php | ||
| 315 : | HTML_nokkaew::_MamboFooter($act, $option); | ||
| 316 : | } | ||
| 317 : | |||
| 318 : | function showElementConfiguration( $nokkaewManager, $id ) { | ||
| 319 : | global $my, $act, $task, $database, $option, $mosConfig_live_site; | ||
| 320 : | HTML_nokkaew::_MamboHeader(); | ||
| 321 : | $contentElement = $nokkaewManager->getContentElement( $id ); | ||
| 322 : | ?> | ||
| 323 : | <table cellpadding="4" cellspacing="0" border="0" width="100%"> | ||
| 324 : | <tr> | ||
| 325 : | supachai_c | 38 | ai <td width="100%" align="left" class="sectionname"> |
| 326 : | ai <?php HTML_nokkaew::_toolbar();?> </td> | ||
| 327 : | andphe | 3 | </table> |
| 328 : | <table cellpadding="3" cellspacing="0" border="0" width="100%"> | ||
| 329 : | <tr> | ||
| 330 : | <td width="100%"> | ||
| 331 : | <?php | ||
| 332 : | $tabs = new mosTabs(0); | ||
| 333 : | $tabs->startPane("contentelements"); | ||
| 334 : | $tabs->startTab(_NOKKAEW_ADMIN_ELEMENT_CONFIG,"ElementConfig-page"); | ||
| 335 : | ?> | ||
| 336 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform"> |
| 337 : | andphe | 3 | <tr> |
| 338 : | supachai_c | 38 | ai <th colspan="3"><?php echo _NOKKAEW_ADMIN_COMMONINFORMATION;?></th> |
| 339 : | andphe | 3 | </tr> |
| 340 : | <tr align="center" valign="middle"> | ||
| 341 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_TITLE_NAME;?></strong></td> | ||
| 342 : | <td width="20%" align="left" valign="top"><?php echo $contentElement->Name;?></td> | ||
| 343 : | <td align="left"></td> | ||
| 344 : | </tr> | ||
| 345 : | <tr align="center" valign="middle"> | ||
| 346 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_TITLE_AUTHOR;?></strong></td> | ||
| 347 : | <td width="20%" align="left" valign="top"><?php echo $contentElement->Author;?></td> | ||
| 348 : | <td align="left"></td> | ||
| 349 : | </tr> | ||
| 350 : | <tr align="center" valign="middle"> | ||
| 351 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_TITLE_VERSION;?></strong></td> | ||
| 352 : | <td width="20%" align="left" valign="top"><?php echo $contentElement->Version;?></td> | ||
| 353 : | <td align="left"></td> | ||
| 354 : | </tr> | ||
| 355 : | <tr align="center" valign="middle"> | ||
| 356 : | <td width="30%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_TITLE_DESCRIPTION;?></strong></td> | ||
| 357 : | <td width="20%" align="left" valign="top"><?php echo $contentElement->Description;?></td> | ||
| 358 : | <td align="left"></td> | ||
| 359 : | </tr> | ||
| 360 : | </table> | ||
| 361 : | <?php | ||
| 362 : | $tabs->endTab(); | ||
| 363 : | $tabs->startTab(_NOKKAEW_ADMIN_ELEMENT_REFERENCE,"ElementReference-page"); | ||
| 364 : | |||
| 365 : | $contentTable = $contentElement->getTable(); | ||
| 366 : | ?> | ||
| 367 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform"> |
| 368 : | andphe | 3 | <tr> |
| 369 : | supachai_c | 38 | ai <th colspan="2"><?php echo _NOKKAEW_ADMIN_DATABASEINFORMATION;?></th> |
| 370 : | andphe | 3 | </tr> |
| 371 : | <tr align="center" valign="middle"> | ||
| 372 : | <td width="15%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_DATABASETABLE;?></strong><br /><?php echo _NOKKAEW_ADMIN_DATABASETABLE_HELP;?></td> | ||
| 373 : | <td width="60%" align="left" valign="top"><?php echo $contentTable->Name;?></td> | ||
| 374 : | </tr> | ||
| 375 : | <tr align="center" valign="middle"> | ||
| 376 : | <td width="15%" align="left" valign="top"><strong><?php echo _NOKKAEW_ADMIN_DATABASEFIELDS;?></strong><br /><?php echo _NOKKAEW_ADMIN_DATABASEFIELDS_HELP;?></td> | ||
| 377 : | <td width="60%" align="left" valign="top"> | ||
| 378 : | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> | ||
| 379 : | <tr> | ||
| 380 : | <th><?php echo _NOKKAEW_ADMIN_DBFIELDNAME;?></th> | ||
| 381 : | <th><?php echo _NOKKAEW_ADMIN_DBFIELDTYPE;?></th> | ||
| 382 : | <th><?php echo _NOKKAEW_ADMIN_DBFIELDLABLE;?></th> | ||
| 383 : | <th><?php echo _NOKKAEW_ADMIN_TRANSLATE;?></th> | ||
| 384 : | </tr> | ||
| 385 : | <?php | ||
| 386 : | $k=0; | ||
| 387 : | foreach( $contentTable->Fields as $tableField ) { | ||
| 388 : | ?> | ||
| 389 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 390 : | <td><?php echo $tableField->Name ? $tableField->Name : " ";?></td> | ||
| 391 : | <td><?php echo $tableField->Type ? $tableField->Type : " ";?></td> | ||
| 392 : | <td><?php echo $tableField->Lable ? $tableField->Lable : " ";?></td> | ||
| 393 : | <td><?php echo $tableField->Translate ? _CMN_YES : _CMN_NO;?></td> | ||
| 394 : | </tr> | ||
| 395 : | <?php | ||
| 396 : | $k=1-$k; | ||
| 397 : | } | ||
| 398 : | ?> | ||
| 399 : | supachai_c | 38 | ai </table> |
| 400 : | andphe | 3 | <?php |
| 401 : | ?> | ||
| 402 : | supachai_c | 38 | ai </td> |
| 403 : | andphe | 3 | </tr> |
| 404 : | </table> | ||
| 405 : | <?php | ||
| 406 : | $tabs->endTab(); | ||
| 407 : | $tabs->startTab(_NOKKAEW_ADMIN_ELEMENT_SAMPLES,"ElementSamples-page"); | ||
| 408 : | $contentTable = $contentElement->getTable(); | ||
| 409 : | ?> | ||
| 410 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform"> |
| 411 : | andphe | 3 | <tr> |
| 412 : | supachai_c | 38 | ai <th><?php echo _NOKKAEW_ADMIN_ELEMENT_SAMPLES;?></th> |
| 413 : | andphe | 3 | </tr> |
| 414 : | <tr align="center" valign="middle"> | ||
| 415 : | <td width="100%" align="center" valign="top"> | ||
| 416 : | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> | ||
| 417 : | <tr> | ||
| 418 : | <?php | ||
| 419 : | $sqlFields = ""; | ||
| 420 : | foreach( $contentTable->Fields as $tableField ) { | ||
| 421 : | if( $sqlFields!='' ) $sqlFields .= ','; | ||
| 422 : | $sqlFields .= '`' .$tableField->Name. '`'; | ||
| 423 : | ?> | ||
| 424 : | <th nowrap><?php echo $tableField->Lable;?></th> | ||
| 425 : | <?php | ||
| 426 : | } | ||
| 427 : | ?> | ||
| 428 : | </tr> | ||
| 429 : | <?php | ||
| 430 : | $k=0; | ||
| 431 : | supachai_c | 35 | ai $id ='id'; |
| 432 : | andphe | 3 | $sql = "SELECT $sqlFields" |
| 433 : | . "\nFROM #__" .$contentTable->Name | ||
| 434 : | supachai_c | 35 | ai . "\nORDER BY $id limit 0,10"; |
| 435 : | supachai_c | 38 | ai $database->setQuery( $sql ); |
| 436 : | andphe | 3 | $rows = $database->loadObjectList(); |
| 437 : | supachai_c | 35 | ai if(count($rows)!=0) { |
| 438 : | andphe | 3 | foreach ($rows as $row) { |
| 439 : | ?> | ||
| 440 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 441 : | <?php | ||
| 442 : | foreach( $contentTable->Fields as $tableField ) { | ||
| 443 : | $fieldName = $tableField->Name; | ||
| 444 : | $fieldValue = $row->$fieldName; | ||
| 445 : | if( $tableField->Type='htmltext' ) { | ||
| 446 : | $fieldValue = htmlspecialchars( $fieldValue ); | ||
| 447 : | } | ||
| 448 : | |||
| 449 : | if( $fieldValue=='' ) $fieldValue=" "; | ||
| 450 : | if( strlen($fieldValue) > 97 ) { | ||
| 451 : | $fieldValue = substr( $fieldValue, 0, 100) . '...'; | ||
| 452 : | } | ||
| 453 : | |||
| 454 : | ?> | ||
| 455 : | <td valign="top"><?php echo $fieldValue;?></td> | ||
| 456 : | <?php | ||
| 457 : | } | ||
| 458 : | ?> | ||
| 459 : | </tr> | ||
| 460 : | <?php | ||
| 461 : | $k=1-$k; | ||
| 462 : | } | ||
| 463 : | supachai_c | 35 | ai } |
| 464 : | ai if (count($rows)=='') { | ||
| 465 : | ai $id ='cid'; | ||
| 466 : | ai $sql = "SELECT $sqlFields" | ||
| 467 : | ai . "\nFROM #__" .$contentTable->Name | ||
| 468 : | ai . "\nORDER BY $id limit 0,10"; | ||
| 469 : | ai $database->setQuery( $sql ); | ||
| 470 : | ai $rows = $database->loadObjectList(); | ||
| 471 : | ai foreach ($rows as $row) { | ||
| 472 : | ai ?> | ||
| 473 : | ai <tr class="<?php echo "row$k"; ?>"> | ||
| 474 : | ai <?php | ||
| 475 : | ai foreach( $contentTable->Fields as $tableField ) { | ||
| 476 : | ai $fieldName = $tableField->Name; | ||
| 477 : | ai $fieldValue = $row->$fieldName; | ||
| 478 : | ai if( $tableField->Type='htmltext' ) { | ||
| 479 : | ai $fieldValue = htmlspecialchars( $fieldValue ); | ||
| 480 : | ai } | ||
| 481 : | ai | ||
| 482 : | ai if( $fieldValue=='' ) $fieldValue=" "; | ||
| 483 : | ai if( strlen($fieldValue) > 97 ) { | ||
| 484 : | ai $fieldValue = substr( $fieldValue, 0, 100) . '...'; | ||
| 485 : | ai } | ||
| 486 : | ai | ||
| 487 : | ai ?> | ||
| 488 : | ai <td valign="top"><?php echo $fieldValue;?></td> | ||
| 489 : | ai <?php | ||
| 490 : | ai } | ||
| 491 : | andphe | 3 | ?> |
| 492 : | supachai_c | 35 | ai </tr> |
| 493 : | ai <?php | ||
| 494 : | ai $k=1-$k; | ||
| 495 : | ai } | ||
| 496 : | ai } | ||
| 497 : | ai ?> | ||
| 498 : | supachai_c | 38 | ai </table> |
| 499 : | andphe | 3 | <?php |
| 500 : | ?> | ||
| 501 : | supachai_c | 38 | ai </td> |
| 502 : | andphe | 3 | </tr> |
| 503 : | </table> | ||
| 504 : | <?php | ||
| 505 : | $tabs->endTab(); | ||
| 506 : | $tabs->endPane(); | ||
| 507 : | ?> | ||
| 508 : | </td></tr> | ||
| 509 : | </table> | ||
| 510 : | <?php | ||
| 511 : | HTML_nokkaew::_MamboFooter($act, $option); | ||
| 512 : | } | ||
| 513 : | |||
| 514 : | |||
| 515 : | andphe | 7 | //================ Updated by FreShyNice GiRL --> 24 Jun 2007 ===================== |
| 516 : | function showTranslationOverview( $rows, $search, $pageNav, $langlist, $clist, $catid , $filterlist=array()) { | ||
| 517 : | global $my, $act, $task, $database, $option, $mosConfig_live_site; | ||
| 518 : | |||
| 519 : | andphe | 3 | HTML_nokkaew::_MamboHeader(); |
| 520 : | ?> | ||
| 521 : | <table cellpadding="4" cellspacing="0" border="0" width="100%"> | ||
| 522 : | supachai_c | 38 | ai <tr> |
| 523 : | ai <td colspan="7" align="left" class="sectionname"><?php HTML_nokkaew::_toolbar();?> | ||
| 524 : | ai </td> | ||
| 525 : | ai </tr> | ||
| 526 : | andphe | 3 | <tr> |
| 527 : | supachai_c | 38 | ai <td width="100%"></td> |
| 528 : | andphe | 3 | <td nowrap><?php echo _NOKKAEW_ADMIN_TITLE_DISPLAY;?>:</td> |
| 529 : | <td> <?php echo $pageNav->writeLimitBox(); ?> </td> | ||
| 530 : | <td nowrap><?php echo _NOKKAEW_ADMIN_TITLE_LANGUAGE;?>:</td> | ||
| 531 : | <td width="right"><?php echo $langlist;?></td> | ||
| 532 : | <td nowrap><?php echo _NOKKAEW_ADMIN_TITLE_CONTENTELEMENTS;?>:</td> | ||
| 533 : | <td width="right"><?php echo $clist;?></td> | ||
| 534 : | andphe | 7 | </tr> |
| 535 : | <tr> | ||
| 536 : | <td colspan="7" align="right" valign="top"> | ||
| 537 : | <table><tr> | ||
| 538 : | <?php | ||
| 539 : | if (isset($filterlist) && count($filterlist)>0){ | ||
| 540 : | foreach ($filterlist as $fl){ | ||
| 541 : | if (is_array($fl)) { | ||
| 542 : | echo "<td nowrap align='center'>".$fl["title"].":<br/>".$fl["html"]."</td>"; | ||
| 543 : | } | ||
| 544 : | } | ||
| 545 : | } | ||
| 546 : | ?> | ||
| 547 : | </tr></table> | ||
| 548 : | </td> | ||
| 549 : | andphe | 3 | </tr> |
| 550 : | </table> | ||
| 551 : | |||
| 552 : | <?php | ||
| 553 : | if( !isset($catid) || $catid == "" ) { | ||
| 554 : | ?> | ||
| 555 : | <p><?php echo _NOKKAEW_NOELEMENT_SELECTED;?></p> | ||
| 556 : | <?php | ||
| 557 : | } | ||
| 558 : | else { | ||
| 559 : | ?> | ||
| 560 : | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> | ||
| 561 : | <tr> | ||
| 562 : | <th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th> | ||
| 563 : | <th class="title" width="20%" align="left" nowrap="nowrap"><?php echo _NOKKAEW_ADMIN_TITLE_TITLE;?></th> | ||
| 564 : | supachai_c | 38 | ai <th width="10%" align="center" nowrap="nowrap"><?php echo _NOKKAEW_ADMIN_TITLE_LANGUAGE;?></th> |
| 565 : | andphe | 3 | <th width="20%" align="left" nowrap="nowrap"><?php echo _NOKKAEW_ADMIN_TITLE_TRANSLATION;?></th> |
| 566 : | supachai_c | 38 | ai <th width="15%" align="center" nowrap="nowrap"><?php echo _NOKKAEW_ADMIN_TITLE_DATECHANGED;?></th> |
| 567 : | andphe | 3 | <th width="15%" nowrap="nowrap" align="center"><?php echo _NOKKAEW_ADMIN_TITLE_STATE;?></th> |
| 568 : | andphe | 7 | <th align="center" nowrap="nowrap"><?php echo _NOKKAEW_ADMIN_TITLE_PUBLISHED;?></th> |
| 569 : | andphe | 3 | </tr> |
| 570 : | <?php | ||
| 571 : | $k=0; | ||
| 572 : | $i=0; | ||
| 573 : | andphe | 11 | foreach ((array)$rows as $row ) { |
| 574 : | andphe | 3 | ?> |
| 575 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 576 : | <td width="20"> | ||
| 577 : | <?php if ($row->checked_out && $row->checked_out != $my->id) { ?> | ||
| 578 : | | ||
| 579 : | <?php } else { ?> | ||
| 580 : | <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->id; ?>|<?php echo $row->language_id; ?>" onclick="isChecked(this.checked);" /> | ||
| 581 : | <?php } ?> | ||
| 582 : | </td> | ||
| 583 : | supachai_c | 38 | ai <td align="left"> |
| 584 : | ai <a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')"><?php echo $row->title; ?></a> </td> | ||
| 585 : | andphe | 3 | <td nowrap><?php echo $row->language ? $row->language : _NOKKAEW_NOTRANSLATIONYET; ?></td> |
| 586 : | supachai_c | 38 | ai <td align="left"><?php echo $row->titleTranslation ? $row->titleTranslation : ' '; ?></td> |
| 587 : | andphe | 27 | <td><?php echo $row->lastchanged ? mosFormatDate($row->lastchanged) : ' '; ?></td> |
| 588 : | andphe | 3 | <?php |
| 589 : | switch( $row->state ) { | ||
| 590 : | case 1: | ||
| 591 : | $img = 'status_g.png'; | ||
| 592 : | break; | ||
| 593 : | case 0: | ||
| 594 : | $img = 'status_y.png'; | ||
| 595 : | break; | ||
| 596 : | case -1: | ||
| 597 : | default: | ||
| 598 : | $img = 'status_r.png'; | ||
| 599 : | break; | ||
| 600 : | } | ||
| 601 : | ?> | ||
| 602 : | <td align="center"><img src="components/com_nokkaew/images/<?php echo $img;?>" width="12" height="12" border="0" alt="" /></td> | ||
| 603 : | <?php | ||
| 604 : | if (isset($row->published) && $row->published) { | ||
| 605 : | $img = 'publish_g.png'; | ||
| 606 : | } else { | ||
| 607 : | $img = 'publish_x.png'; | ||
| 608 : | } | ||
| 609 : | |||
| 610 : | $href=''; | ||
| 611 : | if( $row->state>=0 ) { | ||
| 612 : | $href = '<a href="javascript: void(0);" '; | ||
| 613 : | $href .= 'onClick="return listItemTask(\'cb' .$i. '\',\'' .($row->published ? 'unpublish' : 'publish'). '\')">'; | ||
| 614 : | $href .= '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />'; | ||
| 615 : | $href .= '</a>'; | ||
| 616 : | } | ||
| 617 : | else { | ||
| 618 : | $href = '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />'; | ||
| 619 : | } | ||
| 620 : | ?> | ||
| 621 : | <td align="center"><?php echo $href;?></td> | ||
| 622 : | <?php | ||
| 623 : | $k = 1 - $k; | ||
| 624 : | $i++; | ||
| 625 : | } | ||
| 626 : | ?> | ||
| 627 : | <tr> | ||
| 628 : | <th align="center" colspan="10"> <?php echo $pageNav->writePagesLinks(); ?></th> | ||
| 629 : | </tr> | ||
| 630 : | <tr> | ||
| 631 : | <td align="center" colspan="10"> <?php echo $pageNav->writePagesCounter(); ?></td> | ||
| 632 : | </tr> | ||
| 633 : | </table> | ||
| 634 : | <br /> | ||
| 635 : | <table cellspacing="0" cellpadding="4" border="0" align="center"> | ||
| 636 : | <tr align="center"> | ||
| 637 : | <td> <img src="components/com_nokkaew/images/status_g.png" width="12" height="12" border=0 alt="<?php echo _NOKKAEW_STATE_OK;?>" /> | ||
| 638 : | </td> | ||
| 639 : | <td> <?php echo _NOKKAEW_TRANSLATION_UPTODATE;?> |</td> | ||
| 640 : | <td> <img src="components/com_nokkaew/images/status_y.png" width="12" height="12" border=0 alt="<?php echo _NOKKAEW_STATE_CHANGED;?>" /> | ||
| 641 : | </td> | ||
| 642 : | <td> <?php echo _NOKKAEW_TRANSLATION_INCOMPLETE;?> |</td> | ||
| 643 : | <td> <img src="components/com_nokkaew/images/status_r.png" width="12" height="12" border=0 alt="<?php echo _NOKKAEW_STATE_NOTEXISTING;?>" /> | ||
| 644 : | </td> | ||
| 645 : | <td> <?php echo _NOKKAEW_TRANSLATION_NOT_EXISTING;?></td> | ||
| 646 : | </tr> | ||
| 647 : | <tr align="center"> | ||
| 648 : | <td> <img src="images/publish_g.png" width="12" height="12" border=0 alt="Translation visible" /> | ||
| 649 : | </td> | ||
| 650 : | <td> <?php echo _NOKKAEW_TRANSLATION_PUBLISHED;?> |</td> | ||
| 651 : | <td> <img src="images/publish_x.png" width="12" height="12" border=0 alt="Finished" /> | ||
| 652 : | </td> | ||
| 653 : | <td> <?php echo _NOKKAEW_TRANSLATION_NOT_PUBLISHED;?> </td> | ||
| 654 : | <td> | ||
| 655 : | </td> | ||
| 656 : | <td> <?php echo _NOKKAEW_STATE_TOGGLE;?> </td> | ||
| 657 : | </tr> | ||
| 658 : | </table> | ||
| 659 : | <?php | ||
| 660 : | } | ||
| 661 : | HTML_nokkaew::_MamboFooter($act, $option); | ||
| 662 : | } | ||
| 663 : | |||
| 664 : | /** | ||
| 665 : | * @return void | ||
| 666 : | * @param object $actContentObject | ||
| 667 : | * @param array $langlist | ||
| 668 : | * @param string $catid | ||
| 669 : | * @desc Shows the dialog for the content translation | ||
| 670 : | */ | ||
| 671 : | andphe | 7 | function showTranslation( $actContentObject, $langlist, $catid , $select_id , $tranFilters) { |
| 672 : | andphe | 3 | global $my, $act, $task, $database, $option, $select_language_id, $mosConfig_live_site; |
| 673 : | $elementTable = $actContentObject->getTable(); | ||
| 674 : | |||
| 675 : | HTML_nokkaew::_MamboHeader(); | ||
| 676 : | |||
| 677 : | $editorFields=null; | ||
| 678 : | andphe | 7 | |
| 679 : | foreach ($tranFilters as $filter) { | ||
| 680 : | echo "<input type='hidden' name='".$filter->filterType."_filter_value' value='".$filter->filter_value."'/>"; | ||
| 681 : | } | ||
| 682 : | andphe | 3 | ?> |
| 683 : | andphe | 26 | <style type="text/css"> |
| 684 : | supachai_c | 38 | ai .informationForm { background-color: #F5F5F5; border: 1px solid #CCCCCC; } |
| 685 : | andphe | 26 | </style> |
| 686 : | andphe | 7 | <script language="javascript" type="text/javascript"> |
| 687 : | andphe | 19 | function getMosltyCEInstance(Id){ |
| 688 : | if (tinyMCE.getEditorId){ | ||
| 689 : | editor = tinyMCE.getEditorId(Id); | ||
| 690 : | }else{ | ||
| 691 : | editor = tinyMCE.get(Id); | ||
| 692 : | } | ||
| 693 : | return Id; | ||
| 694 : | } | ||
| 695 : | |||
| 696 : | andphe | 18 | function set_html(field){ |
| 697 : | andphe | 7 | innerHTML=""; |
| 698 : | andphe | 18 | eval ("innerHTML = document.adminForm.origValue_"+field+".value"); |
| 699 : | if (typeof tinyMCE != 'undefined'){ | ||
| 700 : | if (innerHTML != ""){ | ||
| 701 : | andphe | 19 | editor = getMosltyCEInstance("refField_"+field); |
| 702 : | andphe | 18 | tinyMCE.execCommand('mceInsertContent',false,innerHTML); |
| 703 : | } | ||
| 704 : | }else{ | ||
| 705 : | eval ("textfield = document.adminForm.refField_"+field); | ||
| 706 : | textfield.value = innerHTML; | ||
| 707 : | } | ||
| 708 : | } | ||
| 709 : | function clean_html(field){ | ||
| 710 : | if (typeof tinyMCE != 'undefined'){ | ||
| 711 : | andphe | 19 | editor = getMosltyCEInstance("refField_"+field); |
| 712 : | andphe | 18 | tinyMCE.execCommand('mceNewDocument',false); |
| 713 : | }else{ | ||
| 714 : | eval ("textfield = document.adminForm.refField_"+field); | ||
| 715 : | textfield.value = ' '; | ||
| 716 : | andphe | 7 | } |
| 717 : | } | ||
| 718 : | </script> | ||
| 719 : | andphe | 3 | <table cellpadding="4" cellspacing="0" border="0" width="100%"> |
| 720 : | <tr> | ||
| 721 : | supachai_c | 38 | ai <td align="left" class="sectionname"> |
| 722 : | ai <?php HTML_nokkaew::_toolbar();?> </td> | ||
| 723 : | ai <td width="310" align="left"> | ||
| 724 : | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="informationForm"> | ||
| 725 : | ai <tr> | ||
| 726 : | ai <td width="30%" align="right"><strong><?php echo _NOKKAEW_ADMIN_TITLE_STATE;?>:</strong></td> | ||
| 727 : | ai <td align="left"><?php echo $actContentObject->state > 0 ? _NOKKAEW_STATE_OK : ($actContentObject->state < 0 ? _NOKKAEW_STATE_NOTEXISTING : _NOKKAEW_STATE_CHANGED);?></td> | ||
| 728 : | ai </tr> | ||
| 729 : | ai <tr> | ||
| 730 : | ai <td align="right"><strong><?php echo _NOKKAEW_ADMIN_TITLE_LANGUAGE;?>:</strong></td> | ||
| 731 : | ai <td align="left"><?php echo $langlist;?></td> | ||
| 732 : | ai </tr> | ||
| 733 : | ai <tr> | ||
| 734 : | ai <td align="right"><strong><?php echo _NOKKAEW_ADMIN_TITLE_PUBLISHED;?>:</strong></td> | ||
| 735 : | ai <td align="left"><input type="checkbox" name="published" value="1" <?php echo $actContentObject->published&0x0001 ? 'checked="checked"' : ''; ?> /></td> | ||
| 736 : | ai </tr> | ||
| 737 : | ai <tr> | ||
| 738 : | ai <td align="right"><strong><?php echo _NOKKAEW_ADMIN_TITLE_DATECHANGED;?>:</strong></td> | ||
| 739 : | ai <td align="left"><?php echo $actContentObject->lastchanged ? mosFormatDate($actContentObject->lastchanged) : ' ' ;?></td> | ||
| 740 : | ai </tr> | ||
| 741 : | ai </table></td> | ||
| 742 : | andphe | 3 | </table> |
| 743 : | <table cellpadding="3" cellspacing="0" border="0" width="100%"> | ||
| 744 : | <tr> | ||
| 745 : | <td width="100%"> | ||
| 746 : | <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminForm"> | ||
| 747 : | <tr><td valign="top"> | ||
| 748 : | supachai_c | 38 | ai <br /> |
| 749 : | ai <table width="100%" border="0" cellpadding="4" cellspacing="2" class="adminform" align="center"> | ||
| 750 : | andphe | 3 | <?php |
| 751 : | $k=1; | ||
| 752 : | for( $i=0; $i<count($elementTable->Fields); $i++ ) { | ||
| 753 : | $field =& $elementTable->Fields[$i]; | ||
| 754 : | $originalValue = $field->originalValue; | ||
| 755 : | |||
| 756 : | if( $field->Translate ) { | ||
| 757 : | $translationContent = $field->translationContent; | ||
| 758 : | mosMakeHtmlSafe( $translationContent ); | ||
| 759 : | ?> | ||
| 760 : | <tr align="center" valign="middle" "class="<?php echo "row$k"; ?>"> | ||
| 761 : | andphe | 27 | <td align="left" valign="top" width="45%"><?php echo '<strong>'.$field->Lable.'</strong>('._NOKKAEW_ORIGINAL.')<br />'.$field->originalValue;?></td> |
| 762 : | <td align="left" valign="top" width="45%"><?php echo '<strong>'.$field->Lable.'</strong>('._NOKKAEW_TRANSLATION.')<br />';?> | ||
| 763 : | andphe | 3 | <input type="hidden" name="id_<?php echo $field->Name;?>" value="<?php echo $translationContent->id;?>" /> |
| 764 : | <?php | ||
| 765 : | if( strtolower($field->Type)=='text' || strtolower($field->Type)=='titletext' ) { | ||
| 766 : | ?> | ||
| 767 : | <input type="hidden" name="origValue_<?php echo $field->Name;?>" value="<?php echo htmlspecialchars($field->originalValue, ENT_QUOTES);?>" /> | ||
| 768 : | <input class="inputbox" type="text" name="refField_<?php echo $field->Name;?>" size="60" maxlength="100" value="<?php echo $translationContent->value; ?>" /> | ||
| 769 : | |||
| 770 : | <?php | ||
| 771 : | } else if( strtolower($field->Type)=='textarea' ) { | ||
| 772 : | ?> | ||
| 773 : | <input type="hidden" name="origValue_<?php echo $field->Name;?>" value="<?php echo htmlspecialchars($field->originalValue, ENT_QUOTES);?>" /> | ||
| 774 : | <textarea name="refField_<?php echo $field->Name;?>" rows="15" cols="30"><?php echo $translationContent->value; ?></textarea> | ||
| 775 : | <?php | ||
| 776 : | } else if( strtolower($field->Type)=='htmltext' ) { | ||
| 777 : | ?> | ||
| 778 : | <input type="hidden" name="origValue_<?php echo $field->Name;?>" value="<?php echo htmlspecialchars($field->originalValue, ENT_QUOTES);?>" /> | ||
| 779 : | <?php | ||
| 780 : | $editorFields[] = array( "editor_".$field->Name, "refField_".$field->Name ); | ||
| 781 : | editorArea( "editor_".$field->Name, $translationContent->value , "refField_".$field->Name, 500, 200, '70', '15' ) ; | ||
| 782 : | } | ||
| 783 : | ?> | ||
| 784 : | supachai_c | 38 | ai </td> |
| 785 : | andphe | 27 | <td valign="top" nowrap width="5%"> |
| 786 : | andphe | 3 | <?php if( strtolower($field->Type)!='htmltext' ) {?> |
| 787 : | <a class="toolbar" onclick="document.adminForm.refField_<?php echo $field->Name;?>.value = document.adminForm.origValue_<?php echo $field->Name;?>.value;" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('copy_<?php echo $field->Name;?>','','images/move_f2.png',1);"><img src="images/move.png" alt="<?php echo _NOKKAEW_COPY;?>" border="0" name="copy_<?php echo $field->Name;?>" align="middle" /></a> | ||
| 788 : | <a class="toolbar" onclick="document.adminForm.refField_<?php echo $field->Name;?>.value = '';" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('clear_<?php echo $field->Name;?>','','images/delete_f2.png',1);"><img src="images/delete.png" alt="<?php echo _NOKKAEW_CLEAR;?>" border="0" name="clear_<?php echo $field->Name;?>" align="middle" /></a> | ||
| 789 : | <?php } else {?> | ||
| 790 : | andphe | 18 | <a class="toolbar" onclick="set_html('<?php echo $field->Name;?>',false);" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('copy_<?php echo $field->Name;?>','','images/move_f2.png',1);"><img src="images/move.png" alt="<?php echo _NOKKAEW_COPY;?>" border="0" name="copy_<?php echo $field->Name;?>" align="middle" /></a> |
| 791 : | <a class="toolbar" onclick="clean_html('<?php echo $field->Name;?>', true);" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('clear_<?php echo $field->Name;?>','','images/delete_f2.png',1);"><img src="images/delete.png" alt="<?php echo _NOKKAEW_CLEAR;?>" border="0" name="clear_<?php echo $field->Name;?>" align="middle" /></a> | ||
| 792 : | andphe | 3 | <?php }?> |
| 793 : | supachai_c | 38 | ai </td> |
| 794 : | andphe | 3 | </tr> |
| 795 : | <?php | ||
| 796 : | } | ||
| 797 : | $k=1-$k; | ||
| 798 : | } | ||
| 799 : | ?> | ||
| 800 : | supachai_c | 38 | ai </table> |
| 801 : | andphe | 3 | </tr> |
| 802 : | </table> | ||
| 803 : | <input type="hidden" name="select_language_id" value="<?php echo $select_language_id;?>" /> | ||
| 804 : | <input type="hidden" name="reference_id" value="<?php echo $actContentObject->id;?>" /> | ||
| 805 : | andphe | 17 | <input type="hidden" name="reference_table" value="<?php echo $elementTable->Name;?>" /> |
| 806 : | andphe | 3 | <input type="hidden" name="catid" value="<?php echo $catid;?>" /> |
| 807 : | </td></tr> | ||
| 808 : | </table> | ||
| 809 : | <?php | ||
| 810 : | HTML_nokkaew::_MamboFooter($act, $option, $editorFields); | ||
| 811 : | } | ||
| 812 : | |||
| 813 : | |||
| 814 : | function _sideMenu() { | ||
| 815 : | global $mosConfig_live_site; | ||
| 816 : | ?> | ||
| 817 : | <td align="left" valign="top" nowrap><p><span class="contentheading">License:</span><br /> | ||
| 818 : | supachai_c | 38 | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /> <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License</a><br /> |
| 819 : | andphe | 3 | <br /> |
| 820 : | <span class="contentheading">Developer :</span> <br /> | ||
| 821 : | supachai_c | 38 | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /><span class="style1"> Akarawuth Tamrareang</span><br /> |
| 822 : | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /><span class="style1"> Pisan Chueachatchai </span><br /> | ||
| 823 : | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /><span class="style1"> Supachai Teasakul </span><br /> | ||
| 824 : | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /><span class="style1"> Andrés Felipe Vargas Valencia</span><br /> | ||
| 825 : | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /><span class="style1"> Sansanee Luangchabarat </span><br /> | ||
| 826 : | andphe | 3 | we are welcome all developer to join us in this projects. |
| 827 : | supachai_c | 38 | ai <br />if you need to help us.please email to : <a href="mailto:nokkaewdev@gmail.com" class="smallgrey"><span class="smallgrey">nokkaewdev [at] gmail.com</span></a></p> |
| 828 : | andphe | 3 | <p><span class="contentheading">Additional Sites:</span><br /> |
| 829 : | supachai_c | 38 | ai <img src="<?php echo $mosConfig_live_site;?>/images/M_images/arrow.png" alt="" width="9" height="9" border="0" /> <a href="http://www.nokkaew.net/" target="_blank">Nokkaew Projects Site</a><br /> |
| 830 : | andphe | 3 | </p> |
| 831 : | </td> | ||
| 832 : | <?php | ||
| 833 : | } | ||
| 834 : | |||
| 835 : | |||
| 836 : | function _header() { | ||
| 837 : | global $mosConfig_live_site; | ||
| 838 : | ?> | ||
| 839 : | <script language="javascript" type="text/javascript"> | ||
| 840 : | function submitbutton(pressbutton) { | ||
| 841 : | var form = document.adminForm; | ||
| 842 : | if (pressbutton == 'cancel') { | ||
| 843 : | submitform( pressbutton ); | ||
| 844 : | return; | ||
| 845 : | } else { | ||
| 846 : | submitform( pressbutton ); | ||
| 847 : | } | ||
| 848 : | } | ||
| 849 : | </script> | ||
| 850 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 851 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="2" cellspacing="2"> |
| 852 : | ai <tr><td width="100%" class="sectionname" align="left" colspan="2"> | ||
| 853 : | andphe | 15 | <?php HTML_nokkaew::_toolbar();?> |
| 854 : | supachai_c | 38 | ai </td></tr> |
| 855 : | andphe | 3 | </table> |
| 856 : | supachai_c | 38 | ai <table width="100%" border="0" cellpadding="2" cellspacing="2" class="adminform"> |
| 857 : | andphe | 3 | <?php |
| 858 : | } | ||
| 859 : | |||
| 860 : | function _footer($act, $option) { | ||
| 861 : | ?> | ||
| 862 : | supachai_c | 38 | ai <td align="left" valign="top"><br /><span class="smallgrey"><strong>Special Thank : Alex Kempkens </strong></span><br /> |
| 863 : | andphe | 3 | <br /> |
| 864 : | <span class="smallgrey"><strong>Contact:</strong></span><br /> | ||
| 865 : | <a href="mailto:nokkaewdev@gmail.com" class="smallgrey"><span class="smallgrey">nokkaewdev [at] gmail.com</span></a><br /> | ||
| 866 : | <br /> | ||
| 867 : | <span class="smallgrey"><strong>Version:</strong></span><br /> | ||
| 868 : | <span class="smallgrey"><?php echo NokKaewManager::getVersion();?></span><br /> | ||
| 869 : | <br /> | ||
| 870 : | supachai_c | 33 | ai <span class="smallgrey"><strong>Copyright:</strong><br /> © <a href="http://www.mambohub.com">MamboHub.com </a> |
| 871 : | ai under GNU/GPL</span></td> | ||
| 872 : | andphe | 3 | </tr> |
| 873 : | </table> | ||
| 874 : | |||
| 875 : | <input type="hidden" name="task" value="" /> | ||
| 876 : | <input type="hidden" name="act" value="<?php echo $act; ?>" /> | ||
| 877 : | <input type="hidden" name="option" value="<?php echo $option; ?>" /> | ||
| 878 : | </form> | ||
| 879 : | <?php | ||
| 880 : | } | ||
| 881 : | |||
| 882 : | function _MamboHeader() { | ||
| 883 : | ?> | ||
| 884 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 885 : | <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> | ||
| 886 : | <table width="100%" border="0"> | ||
| 887 : | <?php | ||
| 888 : | } | ||
| 889 : | |||
| 890 : | function _MamboFooter($act, $option, $editorFields=null) { | ||
| 891 : | andphe | 15 | global $mosConfig_live_site; |
| 892 : | andphe | 3 | ?> |
| 893 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 894 : | <input type="hidden" name="task" value="" /> | ||
| 895 : | <input type="hidden" name="act" value="<?php echo $act; ?>" /> | ||
| 896 : | <input type="hidden" name="option" value="<?php echo $option; ?>" /> | ||
| 897 : | </form> | ||
| 898 : | <script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> | ||
| 899 : | <script language="javascript" type="text/javascript"> | ||
| 900 : | function submitbutton(pressbutton) { | ||
| 901 : | var form = document.adminForm; | ||
| 902 : | <? | ||
| 903 : | if( isset($editorFields) && is_array($editorFields) ) { | ||
| 904 : | foreach ($editorFields as $editor) { | ||
| 905 : | // Where editor[0] = your areaname and editor[1] = the field name | ||
| 906 : | getEditorContents( $editor[0], $editor[1]) ; | ||
| 907 : | } | ||
| 908 : | } | ||
| 909 : | ?> | ||
| 910 : | if (pressbutton == 'cancel') { | ||
| 911 : | submitform( pressbutton ); | ||
| 912 : | return; | ||
| 913 : | } else { | ||
| 914 : | submitform( pressbutton ); | ||
| 915 : | } | ||
| 916 : | } | ||
| 917 : | </script> | ||
| 918 : | <table width="100%" border="0"> | ||
| 919 : | <tr> | ||
| 920 : | <td align="right" valign="top" width="33%"> | ||
| 921 : | <span class="smallgrey"><strong>Contact:</strong></span><br /> | ||
| 922 : | <a href="mailto:nokkaewdev@gmail.com" class="smallgrey"><span class="smallgrey">nokkaewdev [at] gmail.com</span></a> | ||
| 923 : | </td> | ||
| 924 : | <td align="center" valign="top" width="33%"> | ||
| 925 : | <span class="smallgrey"><strong>Version:</strong></span><br /> | ||
| 926 : | <span class="smallgrey"><?php echo NokKaewManager::getVersion();?></span><br /> | ||
| 927 : | </td> | ||
| 928 : | <td align="left" valign="top" width="33%"> | ||
| 929 : | supachai_c | 33 | ai <span class="smallgrey"><strong>Copyright:</strong><br /> © <a href="http://www.mambohub.com">MamboHub.com </a> |
| 930 : | ai under GNU/GPL</span></td> | ||
| 931 : | andphe | 3 | </tr> |
| 932 : | </table> | ||
| 933 : | </div> | ||
| 934 : | <?php | ||
| 935 : | } | ||
| 936 : | andphe | 15 | |
| 937 : | function _Toolbar(){ | ||
| 938 : | global $mosConfig_live_site; | ||
| 939 : | ?> | ||
| 940 : | supachai_c | 33 | ai <img src="<?php echo $mosConfig_live_site;?>/components/com_nokkaew/images/nokkaew.png" alt="" width="200" height="58" border="0" /><br /> |
| 941 : | supachai_c | 38 | ai <small><small>[<img src="../includes/js/ThemeOffice/config.png" alt="Language Configuration" width="16" height="16" border="0" align="middle" /> <a href="index2.php?option=com_nokkaew&act=config_component">Language Configuration</a>]</small></small> |
| 942 : | ai <small><small>[<img src="../includes/js/ThemeOffice/controlpanel.png" alt="Content Elements" width="16" height="16" border="0" align="middle" /> <a href="index2.php?option=com_nokkaew&act=config_elements">Content Elements</a>]</small></small> | ||
| 943 : | ai <small><small>[<img src="../includes/js/ThemeOffice/content.png" alt="Translations" width="16" height="16" border="0" align="middle" /> <a href="index2.php?option=com_nokkaew&act=translate">Translations</a>]</small></small> | ||
| 944 : | ai <small><small>[<img src="../includes/js/ThemeOffice/credits.png" alt="About" width="16" height="16" border="0" align="middle" /> <a href="index2.php?option=com_nokkaew&act=showInformation">About</a>]</small></small> | ||
| 945 : | andphe | 15 | <?php |
| 946 : | } | ||
| 947 : | andphe | 3 | } |
| 948 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

