[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/content/ -> cnt53.inc.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2009 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  
  31  // Forum
  32  
  33  ?><!--
  34  <link href="../../inc_css/phpwcms.css" rel="stylesheet" type="text/css">
  35  <table cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF"m width="440">
  36    //-->
  37  
  38  
  39  <tr>
  40      <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>:&nbsp;</td>
  41      <td><select name="cforum_template" id="cforum_template" class="f11b">
  42  <?php
  43  // templates for forum
  44  $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/forum');
  45  if(is_array($tmpllist) && count($tmpllist)) {
  46      foreach($tmpllist as $val) {
  47          $vals = '';
  48          if($val == $content["forum"]['template']) $vals= ' selected="selected"';
  49          $val = htmlspecialchars($val);
  50          echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n";
  51      }
  52  }
  53                    
  54  ?>                  
  55          </select></td>
  56  </tr>
  57  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
  58  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr>
  59  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  60  <tr>
  61      <td align="right" class="chatlist" valign="top"><?php echo $BL['be_subnav_msg_forum'] ?>:&nbsp;</td>
  62      <td><table border="0" cellpadding="0" cellspacing="0" summary="">
  63      <tr>
  64        <td valign="top" class="v10"><?php echo $BL['be_cnt_activated']    ?></td>
  65        <td class="chatlist" style="width:30px;">&nbsp;</td>
  66        <td valign="top" class="v10"><?php echo $BL['be_cnt_available']    ?></td>
  67      </tr>
  68      <tr>
  69        <td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td>
  70      </tr>
  71      <tr>
  72      <td valign="top"><select name="cforum_selection[]" size="8" multiple class="f11b" id="cforum_selection" style="width:205px;" onDblClick="moveSelectedOptions(document.articlecontent.cforum_selection,document.articlecontent.cforum_available,false);">
  73  <?php
  74  $content["forum"]['available'] = '';
  75  
  76  if(!isset($content["forum"]['selection']) || !is_array($content["forum"]['selection'])) {
  77      $content["forum"]['selection'] = array();
  78  }
  79  $content["forum"]['selected'] = array();
  80  foreach($content["forum"]['selection'] as $selected_value) {
  81      $content["forum"]['selected'][intval($selected_value)] = '';
  82  }
  83  
  84  $sqlf = "SELECT * FROM ".DB_PREPEND."phpwcms_forum WHERE forum_entry=0 AND forum_deleted=0 ORDER BY forum_title;";
  85  if($result = mysql_query($sqlf, $db) or die("error while listing forums")) {
  86      while($row = mysql_fetch_assoc($result)) {
  87          if(isset($content["forum"]['selected'][$row["forum_id"]])) {
  88              $content["forum"]['selected'][$row["forum_id"]] = '<option value="'.$row["forum_id"].'">'.html_specialchars($row["forum_title"])."</option>\n";
  89          } else {
  90              $content["forum"]['available'] .= '<option value="'.$row["forum_id"].'">'.html_specialchars($row["forum_title"])."</option>\n";
  91          }
  92      }
  93      mysql_free_result($result);
  94  } // end listing
  95  
  96  echo implode("\n", $content["forum"]['selected']);
  97  
  98  ?>    
  99      </select></td>
 100      <td valign="top" align="center" width="30"><a href="javascript:;" onclick="moveSelectedOptions(document.articlecontent.cforum_available,document.articlecontent.cforum_selection,false);"><img src="img/button/list_move_left.gif" border="0" alt="" width="20" height="15" border="0"></a><br><img src="img/leer.gif" alt="" width="1" height="3"><br><a href="javascript:;" onclick="moveSelectedOptions(document.articlecontent.cforum_selection,document.articlecontent.cforum_available,false);"><img src="img/button/list_move_right.gif" alt="" width="20" height="15" border="0"></a><br><img src="img/leer.gif" alt="" width="1" height="6"><br><a href="javascript:;" 
 101                    title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(document.articlecontent.cforum_selection);return false;"><img src="img/button/image_pos_up.gif" alt="" width="10" height="9" border="0"></a><a href="javascript:;" 
 102                    title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(document.articlecontent.cforum_selection);return false;"><img src="img/button/image_pos_down.gif" alt="" width="10" height="9" border="0"></a></td>
 103      <td valign="top"><select name="cforum_available" size="8" class="f11" id="cforum_available" style="width:205px;" onDblClick="moveSelectedOptions(document.articlecontent.cforum_available,document.articlecontent.cforum_selection,false);">
 104  <?php echo $content["forum"]['available'] ?>
 105      </select></td>
 106      </tr>
 107      </table></td>
 108  </tr>
 109  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
 110  <tr>
 111  <td align="right" class="chatlist" valign="top"><?php echo  $BL['be_cnt_access'] ?>:&nbsp;</td>
 112  <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary="">
 113  <?php
 114  if(!isset($content['forum']['permissions'])) {
 115  
 116      $content['forum']['permissions'] = array(    
 117          'read'        => array('admin' => 1, 'user' => 1, 'guest' => 0),
 118          'write'        => array('admin' => 1, 'user' => 0, 'guest' => 0),
 119          'delete'    => array('admin' => 1, 'user' => 0, 'guest' => 0)
 120      );
 121  }
 122  
 123  ?>
 124      <tr>
 125          <td>&nbsp;</td>
 126          <td class="chatlist" align="center">&nbsp;<?php echo $BL['be_cnt_admin'] ?>&nbsp;</td>
 127          <td class="chatlist" align="center">&nbsp;<?php echo $BL["login_username"] ?>&nbsp;</td>
 128          <td class="chatlist" align="center">&nbsp;<?php echo $BL['be_cnt_guests'] ?>&nbsp;</td>
 129      </tr>
 130      <tr>
 131          <td align="right" class="v10"><?php echo $BL['be_cnt_read'] ?>:</td>
 132          <td align="center"><input type="checkbox" name="cforum_permission_admin_read" value="1"<?php echo is_checked('1', $content['forum']['permissions']['read']['admin'],0,0)?>></td>
 133          <td align="center"><input type="checkbox" name="cforum_permission_user_read" value="1"<?php echo is_checked('1', $content['forum']['permissions']['read']['user'],0,0)?>></td>
 134          <td align="center"><input type="checkbox" name="cforum_permission_guest_read" value="1"<?php echo is_checked('1', $content['forum']['permissions']['read']['guest'],0,0)?>></td>
 135      </tr>
 136      <tr>
 137          <td align="right" class="v10"><?php echo $BL['be_cnt_write'] ?>:</td>
 138          <td align="center"><input type="checkbox" name="cforum_permission_admin_write" value="1"<?php echo is_checked('1', $content['forum']['permissions']['write']['admin'],0,0)?>></td>
 139          <td align="center"><input type="checkbox" name="cforum_permission_user_write" value="1"<?php echo is_checked('1', $content['forum']['permissions']['write']['user'],0,0)?>></td>
 140          <td align="center"><input type="checkbox" name="cforum_permission_guest_write" value="1"<?php echo is_checked('1', $content['forum']['permissions']['write']['guest'],0,0)?>></td>
 141      </tr>
 142      <tr>
 143          <td align="right" class="v10"><?php echo $BL['be_cnt_delete'] ?>:</td>
 144          <td align="center"><input type="checkbox" name="cforum_permission_admin_delete" value="1"<?php echo is_checked('1', $content['forum']['permissions']['delete']['admin'],0,0)?>></td>
 145          <td align="center"><input type="checkbox" name="cforum_permission_user_delete" value="1"<?php echo is_checked('1', $content['forum']['permissions']['delete']['user'],0,0)?>></td>
 146          <td align="center"><input type="checkbox" name="cforum_permission_guest_delete" value="1"<?php echo is_checked('1', $content['forum']['permissions']['delete']['guest'],0,0)?>></td>
 147      </tr>
 148  </table></td>
 149  </tr>
 150  
 151  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr>
 152  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr>
 153  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
 154  
 155  <!--  
 156  </table>//-->


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7