[ Index ]

PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10)

title

Body

[close]

/include/inc_module/mod_calendar/ -> backend.editform.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2010 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
   6   
   7     This script is part of PHPWCMS. The PHPWCMS web content management system is
   8     free software; you can redistribute it and/or modify it under the terms of
   9     the GNU General Public License as published by the Free Software Foundation;
  10     either version 2 of the License, or (at your option) any later version.
  11    
  12     The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13     A copy is found in the textfile GPL.txt and important notices to the license 
  14     from the author is found in LICENSE.txt distributed with these scripts.
  15    
  16     This script is distributed in the hope that it will be useful, but WITHOUT ANY 
  17     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18     PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19   
  20     This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  // ----------------------------------------------------------------
  24  // obligate check for phpwcms constants
  25  if (!defined('PHPWCMS_ROOT')) {
  26     die("You Cannot Access This Script Directly, Have a Nice Day.");
  27  }
  28  // ----------------------------------------------------------------
  29  
  30  initJsCalendar();
  31  initMootoolsAutocompleter();
  32  
  33  ?>
  34  <h1 class="title" style="margin-bottom:10px"><?php echo $BLM['listing_title'] ?></h1>
  35  
  36  <form action="<?php echo MODULE_HREF ?>&amp;edit=<?php echo $plugin['data']['calendar_id'] ?>" method="post" id="calendar_form">
  37  <input type="hidden" name="calendar_id" value="<?php echo $plugin['data']['calendar_id'] ?>" />
  38  <table border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
  39  
  40      <tr> 
  41          <td align="right" class="chatlist" nowrap="nowrap"><?php echo $BL['be_cnt_last_edited']  ?>:&nbsp;</td>
  42          <td class="v10"><?php echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['calendar_changed']))) ?></td>
  43      </tr>
  44      
  45      <?php if(!empty($plugin['data']['calendar_created'])) { ?>
  46      
  47      <tr> 
  48          <td align="right" class="chatlist" nowrap="nowrap"><?php echo $BL['be_fprivedit_created']  ?>:&nbsp;</td>
  49          <td class="v10"><?php echo html_specialchars(date($BL['be_fprivedit_dateformat'], strtotime($plugin['data']['calendar_created']))) ?></td>
  50      </tr>
  51      
  52      <?php } ?>
  53      
  54      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td></tr>
  55  
  56      <tr> 
  57          <td align="right" class="chatlist"><?php echo $BLM['calendar_title'] ?>:&nbsp;</td>
  58          <td><input name="calendar_title" type="text" id="calendar_title" class="v12 width375<?php 
  59          
  60          //error class
  61          if(!empty($plugin['error']['calendar_title'])) echo ' errorInputText';
  62          
  63          ?>" value="<?php echo html_specialchars($plugin['data']['calendar_title']) ?>" size="30" maxlength="250" /></td>
  64      </tr>
  65      
  66      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
  67  
  68  
  69      <tr> 
  70          <td align="right" class="chatlist" valign="top" style="padding-top:17px"><?php echo $BLM['calendar_start'] ?>:&nbsp;</td>
  71          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
  72          
  73              <tr>
  74                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
  75                  <td class="chatlist" id="endDate0">&nbsp;</td>
  76                  <td class="chatlist" id="endDate1" style="padding-bottom:2px"><?php echo $BLM['time_format'] ?></td>
  77                  <td colspan="2">&nbsp;</td>
  78              </tr>
  79          
  80              <tr>
  81                  <td><input name="calendar_start_date" type="text" id="calendar_start_date" class="v12<?php 
  82          
  83          //error class
  84          if(!empty($plugin['error']['calendar_start'])) echo ' errorInputText';
  85          
  86          ?>" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['calendar_start_date']) ?>" size="30" /></td>
  87          <td><script type="text/javascript">
  88  		function aStart(date, month, year) {
  89              getFieldById('calendar_start_date').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
  90          }
  91          calStart = new dynCalendar('calStart', 'aStart', 'img/dynCal/');
  92          calStart.setMonthCombo(false);
  93          calStart.setYearCombo(false);
  94          </script>&nbsp;</td>
  95          <td id="endDate2"><input name="calendar_start_time" type="text" id="calendar_start_time" class="v12" style="width:80px;" value="<?php echo html_specialchars($plugin['data']['calendar_start_time']) ?>" size="30" /></td>
  96          
  97          <td id="endDate3">&nbsp;</td>
  98          <td><input type="checkbox" name="calendar_allday" id="calendar_allday" value="1"<?php is_checked(1, $plugin['data']['calendar_allday']) ?> onchange="setCalendarAllDay();" /></td>
  99          <td><label for="calendar_allday" onclick="setCalendarAllDay()"><?php echo $BLM['all_day'] ?></label></td>
 100          
 101              </tr>
 102          </table></td>
 103          
 104      </tr>    
 105      
 106      <tr id="endDate4"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr>
 107      
 108      <tr id="endDate5"> 
 109          <td align="right" class="chatlist" valign="top" style="padding-top:17px"><?php echo $BLM['calendar_end'] ?>:&nbsp;</td>
 110          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 111          
 112              <tr>
 113                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
 114                  <td class="chatlist">&nbsp;</td>
 115                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['time_format'] ?></td>
 116              </tr>
 117          
 118              <tr>
 119                  <td><input name="calendar_end_date" type="text" id="calendar_end_date" class="v12<?php 
 120          
 121          //error class
 122          if(!empty($plugin['error']['calendar_end'])) echo ' errorInputText';
 123          
 124          ?>" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['calendar_end_date']) ?>" size="30" /></td>
 125          <td><script type="text/javascript">
 126  		function aEnd(date, month, year) {
 127              getFieldById('calendar_end_date').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
 128          }
 129          calEnd = new dynCalendar('calEnd', 'aEnd', 'img/dynCal/');
 130          calEnd.setMonthCombo(false);
 131          calEnd.setYearCombo(false);
 132          </script>&nbsp;</td>
 133          <td><input name="calendar_end_time" type="text" id="calendar_end_time" class="v12" style="width:80px;" value="<?php echo html_specialchars($plugin['data']['calendar_end_time']) ?>" size="30" /></td>
 134          
 135              </tr>
 136          </table></td>
 137          
 138      </tr>    
 139      
 140      <tr id="endDate0"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 141      
 142      
 143      <tr> 
 144          <td align="right" class="chatlist"><?php echo $BLM['repeat'] ?>:&nbsp;</td>
 145          <td><select name="calendar_range" id="calendar_range" class="v12" onchange="setRangeDates(this.options[this.selectedIndex].value)">
 146          
 147              <option value="0"<?php is_selected(0, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_0'] ?></option>
 148              <option value="1"<?php is_selected(1, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_1'] ?></option>
 149              <option value="2"<?php is_selected(2, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_2'] ?></option>
 150              <option value="3"<?php is_selected(3, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_3'] ?></option>
 151              <option value="4"<?php is_selected(4, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_4'] ?></option>
 152              <option value="5"<?php is_selected(5, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_5'] ?></option>
 153              <option value="6"<?php is_selected(6, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_6'] ?></option>
 154              <option value="7"<?php is_selected(7, $plugin['data']['calendar_range']) ?>><?php echo $BLM['repeat_7'] ?></option>
 155          
 156          </select></td>
 157      </tr>
 158      
 159      <tr id="rDate0"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 160      
 161      <tr id="rDate1"> 
 162          <td align="right" class="chatlist" valign="top" style="padding-top:17px"><?php echo $BLM['repeat_till'] ?>:&nbsp;</td>
 163          <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 164          
 165              <tr>
 166                  <td class="chatlist" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
 167                  <td class="chatlist" colspan="2">&nbsp;</td>
 168                  <td class="chatlist" colspan="2" style="padding-bottom:2px"><?php echo $BLM['date_format'] ?></td>
 169              </tr>
 170          
 171              <tr>
 172                  <td><input name="calendar_range_start" type="text" id="calendar_range_start" class="v12" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['calendar_rangestart']) ?>" size="30" /></td>
 173                  <td><script type="text/javascript">
 174  					function rStart(date, month, year) {
 175                          getFieldById('calendar_range_start').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
 176                      }
 177                      rangeStart = new dynCalendar('rangeStart', 'rStart', 'img/dynCal/');
 178                      rangeStart.setMonthCombo(false);
 179                      rangeStart.setYearCombo(false);
 180                      </script>&nbsp;</td>
 181                  <td class="chatlist">&nbsp;<?php echo $BLM['till'] ?>:&nbsp;</td>
 182                  <td><input name="calendar_range_end" type="text" id="calendar_range_end" class="v12" style="width:100px;" value="<?php echo html_specialchars($plugin['data']['calendar_rangeend']) ?>" size="30" /></td>
 183                  <td><script type="text/javascript">
 184  					function rEnd(date, month, year) {
 185                          getFieldById('calendar_range_end').value = subrstr('00' + date, 2) + '<?php echo $BLM['date_delimiter'] ?>' + subrstr('00' + month, 2) + '<?php echo $BLM['date_delimiter'] ?>' + year;
 186                      }
 187                      rangeEnd = new dynCalendar('rangeEnd', 'rEnd', 'img/dynCal/');
 188                      rangeEnd.setMonthCombo(false);
 189                      rangeEnd.setYearCombo(false);
 190                      </script>&nbsp;</td>
 191      
 192              </tr>
 193                      
 194          </table></td>
 195      </tr>
 196      
 197      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td></tr>
 198      
 199      <tr> 
 200          <td align="right" class="chatlist"><?php echo $BLM['where'] ?>:&nbsp;</td>
 201          <td><input name="calendar_where" type="text" id="calendar_where" class="v12" style="width:375px;" value="<?php echo html_specialchars($plugin['data']['calendar_where']) ?>" size="30" maxlength="220" /></td>
 202      </tr>
 203      
 204      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 205      
 206      <tr> 
 207          <td align="right" class="chatlist"><?php echo $BLM['calendar_token'] ?>:&nbsp;</td>
 208          <td><input name="calendar_tag" type="text" id="calendar_tag" class="v12" style="width:375px;" value="<?php echo html_specialchars(trim($plugin['data']['calendar_tag'])) ?>" size="30" maxlength="255" /></td>
 209      </tr>
 210  
 211      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 212      
 213      <tr> 
 214          <td align="right" class="chatlist"><?php echo $BL['be_profile_label_lang'] ?>:&nbsp;</td>
 215          <td><input name="calendar_lang" type="text" id="calendar_lang" class="v12" style="width:100px;" value="<?php echo html_specialchars(trim($plugin['data']['calendar_lang'])) ?>" size="30" maxlength="50" /></td>
 216      </tr>
 217  
 218      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 219      
 220      <tr> 
 221          <td align="right" class="chatlist"><?php echo $BLM['article_link'] ?>:&nbsp;</td>
 222          <td class="chatlist"><?php echo $BLM['more_info'] ?></td>
 223      </tr>
 224      <tr>
 225          <td>&nbsp;</td>
 226          <td><input name="calendar_refid" type="text" id="calendar_refid" class="v12" style="width:375px;margin-top:3px;" value="<?php echo empty($plugin['data']['calendar_refid']) ? '' : html_specialchars($plugin['data']['calendar_refid']) ?>" size="30" maxlength="255" /></td>
 227      </tr>
 228      
 229      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 230      
 231      <tr> 
 232          <td align="right" class="chatlist tdtop4"><?php echo $BLM['calendar_teasertext'] ?>:&nbsp;</td>
 233          <td><textarea name="calendar_teaser" id="calendar_teaser" class="v12 width375" rows="5"><?php echo html_specialchars($plugin['data']['calendar_teaser']) ?></textarea></td>
 234      </tr>
 235      
 236      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="15" /></td></tr>
 237      
 238      <tr> 
 239          <td class="chatlist" colspan="2" style="padding-bottom:4px"><?php echo $BLM['calendar_text'] ?>:&nbsp;</td>
 240      </tr>
 241      
 242      <tr> 
 243          <td colspan="2" align="center"><?php
 244  
 245          $wysiwyg_editor = array(
 246              'value'        => $plugin['data']['calendar_text'],
 247              'field'        => 'calendar_text',
 248              'height'    => '400px',
 249              'width'        => '524px',
 250              'rows'        => '15',
 251              'editor'    => $_SESSION["WYSIWYG_EDITOR"],
 252              'lang'        => 'en'
 253          );
 254          
 255          include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php');
 256  
 257  
 258          ?></td>
 259      </tr>
 260      
 261      <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 262      
 263      
 264      <tr>
 265          <td align="right" class="chatlist"><?php echo $BL['be_cnt_image'] ?>:&nbsp;</td>
 266          <td>
 267          <table cellpadding="0" cellspacing="0" border="0" summary="">
 268              <tr>
 269                  <td><input type="text" name="cnt_image_name" id="cnt_image_name" value="<?php echo html_specialchars($plugin['data']['calendar_image']['name']) ?>" class="v12 width300" maxlength="250" /></td>
 270                  <td style="padding:2px 0 0 5px" width="100">
 271                      <a href="#" title="<?php echo $BL['be_cnt_openimagebrowser'] ?>" onclick="openFileBrowser('filebrowser.php?opt=7');return false;"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0" /></a>
 272                      <a href="#" title="<?php echo $BL['be_cnt_delimage'] ?>" onclick="setImgIdName();return false;"><img src="img/button/del_image_button.gif" alt="" width="15" height="15" border="0" /></a>
 273                      <input name="cnt_image_id" id="cnt_image_id" type="hidden" value="<?php echo $plugin['data']['calendar_image']['id'] ?>" />
 274                  </td>
 275              </tr>
 276          </table>
 277          </td>
 278      </tr>
 279      
 280      
 281      <tr>
 282          <td>&nbsp;</td>
 283          <td class="tdtop5 tdbottom5">
 284          <table border="0" cellpadding="0" cellspacing="0" summary="">
 285          <tr>
 286        <td><input name="cnt_image_zoom" type="checkbox" id="cnt_image_zoom" value="1" <?php is_checked(1, $plugin['data']['calendar_image']['zoom']); ?> /></td>
 287            <td><label for="cnt_image_zoom" class="checkbox"><?php echo $BL['be_cnt_enlarge'] ?></label></td>
 288  
 289            <td><input name="cnt_image_lightbox" type="checkbox" id="cnt_image_lightbox" value="1" <?php is_checked(1, $plugin['data']['calendar_image']['lightbox']); ?> onchange="if(this.checked){getObjectById('cnt_image_zoom').checked=true;}" /></td>
 290            <td><label for="cnt_image_lightbox" class="checkbox"><?php echo $BL['be_cnt_lightbox'] ?></label></td>        
 291          </tr>
 292          </table>
 293          
 294          <div id="cnt_image" style="padding-top:3px;"></div>
 295          
 296          </td>
 297      </tr>
 298      
 299      
 300      <tr>
 301          <td align="right" class="chatlist tdtop4"><?php echo $BL['be_cnt_caption'] ?>:&nbsp;</td>
 302          <td class="tdbottom4">
 303          <textarea name="cnt_image_caption" id="cnt_image_caption" class="v12 width350" rows="2"><?php echo html_specialchars($plugin['data']['calendar_image']['caption']) ?></textarea>                
 304          </td>
 305      </tr>
 306      
 307      
 308      <tr>
 309          <td align="right" class="chatlist"><?php echo $BL['be_profile_label_website'] ?>:&nbsp;</td>
 310          <td><input type="text" name="cnt_image_link" id="cnt_image_link" class="v12 width350" maxlength="500" value="<?php echo html_specialchars($plugin['data']['calendar_image']['link']) ?>" /></td>
 311      </tr>
 312  
 313      <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
 314      
 315      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>    
 316      
 317  
 318      
 319      <tr>
 320          <td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
 321          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 322              <tr>
 323                  <td><input type="checkbox" name="calendar_status" id="calendar_status" value="1"<?php is_checked($plugin['data']['calendar_status'], 1) ?> /></td>
 324                  <td><label for="calendar_status"><?php echo $BL['be_cnt_activated'] ?></label></td>
 325              </tr>
 326          </table></td>
 327      </tr>
 328      <tr>
 329          <td align="right" class="chatlist">&nbsp;</td>
 330          <td><table border="0" cellpadding="0" cellspacing="0" summary="">        
 331              <tr>
 332                  <td><input type="checkbox" name="calendar_duplicate" id="calendar_duplicate" value="1"<?php is_checked(empty($plugin['data']['calendar_duplicate'])?0:1, 1) ?> /></td>
 333                  <td><label for="calendar_duplicate"><?php echo $BLM['save_copy'] ?></label></td>
 334              </tr>
 335          </table></td>
 336      </tr>
 337      
 338      <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td>
 339      </tr>
 340      <tr> 
 341          <td>&nbsp;</td>
 342          <td>
 343              <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['calendar_id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" />
 344              <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" />
 345              &nbsp;&nbsp;&nbsp;&nbsp;
 346              <input name="new" type="button" class="button10" value="<?php echo ucfirst($BL['be_msg_new']) ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>&edit=0';return false;" />
 347              <input name="close" type="button" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" onclick="location.href='<?php echo decode_entities(MODULE_HREF) ?>';return false;" />
 348          </td>
 349      </tr>
 350  
 351  </table>
 352  </form>
 353  <script type="text/javascript">
 354  window.addEvent('domready', function(){
 355  
 356      /* Autocompleter for categories/tags */
 357      var searchCategory = $('calendar_tag');
 358      var indicator2 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(searchCategory);
 359      var completer2 = new Autocompleter.Ajax.Json(searchCategory, 'include/inc_act/ajax_connector.php', {
 360          multi: true,
 361          maxChoices: 30,
 362          autotrim: true,
 363          minLength: 0,
 364          allowDupes: false,
 365          postData: {action: 'category', method: 'json'},
 366          onRequest: function(el) {
 367              indicator2.setStyle('display', '');
 368          },
 369          onComplete: function(el) {
 370              indicator2.setStyle('display', 'none');
 371          }
 372      });
 373      
 374      var selectLang = $('calendar_lang');
 375      var indicator1 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(selectLang);
 376      var completer1 = new Autocompleter.Ajax.Json(selectLang, 'include/inc_act/ajax_connector.php', {
 377          multi: false,
 378          allowDupes: false,
 379          autotrim: true,
 380          minLength: 0,
 381          maxChoices: 20,
 382          postData: {action: 'lang', method: 'json'},
 383          onRequest: function(el) {
 384              indicator1.setStyle('display', '');
 385          },
 386          onComplete: function(el) {
 387              indicator1.setStyle('display', 'none');
 388          }
 389      });
 390      
 391      selectLang.addEvent('keyup', function(){
 392          this.value = this.value.replace(/[^a-z\-]/g, '');
 393      });
 394      
 395      
 396      setCalendarAllDay();
 397      setRangeDates(<?php echo $plugin['data']['calendar_range'] ?>);
 398      
 399      $('calendar_form').addEvent('submit', function(r) {
 400          var calendar_title = $('calendar_title');
 401          calendar_title.value = calendar_title.value.clean();
 402          if( calendar_title.value == '' ) {
 403              var r = new Event(r).stop();
 404              alert('<?php echo $BLM['alert_empty_title'] ?>');
 405          }
 406      });
 407      
 408      
 409      showImage();
 410  
 411  });
 412  
 413  
 414  function setCalendarAllDay() {
 415  
 416      var calendarAllDay = $('calendar_allday');
 417      if(calendarAllDay.checked == true) {
 418          toggleDisplayById('endDate0', 'none');
 419          toggleDisplayById('endDate1', 'none');
 420          toggleDisplayById('endDate2', 'none');
 421          toggleDisplayById('endDate3', 'none');
 422          toggleDisplayById('endDate4', 'none');
 423          toggleDisplayById('endDate5', 'none');
 424      } else {
 425          toggleDisplayById('endDate0', '');
 426          toggleDisplayById('endDate1', '');
 427          toggleDisplayById('endDate2', '');
 428          toggleDisplayById('endDate3', '');
 429          toggleDisplayById('endDate4', '');
 430          toggleDisplayById('endDate5', '');
 431      }
 432  
 433  }
 434  
 435  function setRangeDates(value) {
 436      value = parseInt(value);
 437      if(!value) {
 438          toggleDisplayById('rDate0', 'none');
 439          toggleDisplayById('rDate1', 'none');
 440      } else {
 441          toggleDisplayById('rDate0', '');
 442          toggleDisplayById('rDate1', '');
 443      }
 444      
 445  }
 446  
 447  function setImgIdName(file_id, file_name) {
 448      if(file_id == null) file_id=0;
 449      if(file_name == null) file_name='';
 450      getObjectById('cnt_image_id').value = file_id;
 451      getObjectById('cnt_image_name').value = file_name;
 452      
 453      showImage();
 454  }
 455  
 456  function showImage() {
 457      id    = parseInt(getObjectById('cnt_image_id').value);
 458      img    = getObjectById('cnt_image');
 459      if(id > 0) {
 460          img.innerHTML = '<img src="<?php echo PHPWCMS_URL.'img/cmsimage.php/'.$phpwcms['img_list_width'].'x'.$phpwcms['img_list_height'] ?>/'+id+'" alt="" border="0" />';
 461          img.style.display = '';
 462      } else {
 463          img.style.display = 'none';
 464      }
 465  }
 466  
 467  </script>


Generated: Tue Nov 16 22:51:00 2010 Cross-referenced by PHPXref 0.7