[ Index ]

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

title

Body

[close]

/include/inc_tmpl/content/ -> cnt18.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  //guestbook/comments
  32  
  33  ?>
  34  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
  35  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
  36  
  37  
  38  <tr>
  39      <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>:&nbsp;</td>
  40      <td><select name="cguestbook_template" id="cguestbook_template" class="f11b">
  41  <?php
  42  // templates for article listing
  43  $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/guestbook');
  44  if(is_array($tmpllist) && count($tmpllist)) {
  45      foreach($tmpllist as $val) {
  46          $vals = '';
  47          if(isset($content["guestbook"]['template']) && $val == $content["guestbook"]['template']) $vals= ' selected="selected"';
  48          $val = htmlspecialchars($val);
  49          echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n";
  50      }
  51  }
  52                    
  53  ?>                  
  54          </select></td>
  55  </tr>
  56  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
  57  <tr>
  58    <td align="right" class="chatlist"><?php echo $BL['be_alias_ID'] ?>:&nbsp;</td>
  59    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
  60    
  61        <tr>
  62            <td><input name="cguestbook_aliasID" type="text" class="f11b" id="cguestbook_aliasID" style="width: 50px;" size="10"
  63              maxlength="10" onkeyup="if(!parseInt(this.value*1))this.value='';" 
  64              value="<?php echo  isset($content["guestbook"]["aliasID"]) ? $content["guestbook"]["aliasID"] : '' ?>" /></td>
  65              
  66          <td>&nbsp;</td>
  67  <?php
  68  
  69      $_aliasID_Query     = 'SELECT acontent_id,  acontent_visible, article_title, acontent_form FROM '.DB_PREPEND.'phpwcms_articlecontent';
  70      $_aliasID_Query    .= ' LEFT JOIN '.DB_PREPEND.'phpwcms_article ON ';
  71      $_aliasID_Query    .= ' ('.DB_PREPEND.'phpwcms_articlecontent.acontent_aid = '.DB_PREPEND.'phpwcms_article.article_id)';
  72      $_aliasID_Query    .= ' WHERE '.DB_PREPEND.'phpwcms_articlecontent.acontent_id != '.$content["id"];
  73      $_aliasID_Query    .= ' AND '.DB_PREPEND.'phpwcms_articlecontent.acontent_type=18';
  74      $_aliasID_Query    .= ' AND '.DB_PREPEND.'phpwcms_articlecontent.acontent_trash=0';
  75  
  76      $_available_aliasID = _dbQuery($_aliasID_Query);
  77      
  78      if(count($_available_aliasID)) {
  79          echo '<td><select name="cguestbook_aliasID_select" id="cguestbook_aliasID_select" class="v10">'.LF;
  80      
  81          foreach($_available_aliasID as $_aliasValue) {
  82          
  83              $_temp_gb_data = unserialize($_aliasValue['acontent_form']);
  84              
  85              if(empty($_temp_gb_data['aliasID'])) {
  86                  echo '    <option value="'.$_aliasValue['acontent_id'].'">['.$_aliasValue['acontent_id'].'] ';
  87                  echo html_specialchars(getCleanSubString($_aliasValue['article_title'], 6, '&#8230;', 'word'));
  88                  echo '</option>'.LF;
  89              }
  90      
  91          }
  92          echo LF.'</select></td>';
  93      }
  94  ?>
  95        </tr>
  96    </table></td>
  97  </tr>
  98  
  99  
 100  
 101  
 102  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 103  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 104  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>
 105  
 106  
 107  <tr>
 108    <td align="right" class="chatlist"><?php echo $BL['be_cnt_guestbook_listing'] ?>:&nbsp;</td>
 109    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 110        <tr>
 111        <?php
 112        
 113        if(!isset($content["guestbook"]["listing"])) {
 114            $content["guestbook"]["listing"] = 0;
 115        }
 116        
 117        ?>
 118          <td bgcolor="#E7E8EB"><input name="cguestbook_listing" id="cguestbook_listing0" type="radio" value="0" <?php is_checked(0, $content["guestbook"]["listing"]); ?> /></td>
 119          <td class="v10" bgcolor="#E7E8EB"><label for="cguestbook_listing0"><?php echo $BL['be_cnt_guestbook_listing_all'] ?></label>&nbsp;&nbsp;</td>
 120          <td bgcolor="#E7E8EB"><input name="cguestbook_listing" id="cguestbook_listing1" type="radio" value="1" <?php is_checked(1, $content["guestbook"]["listing"]); ?> /></td>
 121          <td class="v10" bgcolor="#E7E8EB"><label for="cguestbook_listing1"><?php echo $BL['be_cnt_guestbook_list'] ?>&nbsp;</label></td>
 122          <td bgcolor="#E7E8EB"><input name="cguestbook_listcount" type="text" class="f11b" id="cguestbook_listcount" style="width: 40px;" size="10" maxlength="10" onkeyup="if(!parseInt(this.value*1))this.value='';" value="<?php echo  isset($content["guestbook"]["listcount"]) ? $content["guestbook"]["listcount"] : '' ?>" /></td>
 123          <td class="v10" bgcolor="#E7E8EB">&nbsp;<?php echo $BL['be_cnt_guestbook_perpage'] ?>&nbsp;</td>
 124          <td><img src="img/leer.gif" alt="" width="1" height="22" /></td>        
 125        </tr>
 126      </table></td>
 127  </tr>
 128  
 129  
 130  
 131  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 132  
 133  
 134  
 135  
 136  <tr>
 137    <td align="right" class="chatlist">&nbsp;</td>
 138    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 139        <tr bgcolor="#E7E8EB">
 140        <?php  
 141        
 142        if(empty($content["guestbook"]["gb_login_post"])) {
 143            $content["guestbook"]["gb_login_post"] = 0;
 144        }
 145        
 146        if(empty($content["guestbook"]["gb_login_show"])) {
 147            $content["guestbook"]["gb_login_show"] = 0;
 148        }
 149        
 150        ?>      
 151         <td><input name="cguestbook_login_show" id="cguestbook_login_show" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["gb_login_show"]); ?> /></td>
 152         <td class="v10"><label for="cguestbook_login_show">&nbsp;<?php echo $BL['be_gb_show_login'] ?>&nbsp;&nbsp;</label></td>
 153       </tr>
 154       
 155       <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr>
 156       
 157       <tr bgcolor="#E7E8EB">
 158         <td><input name="cguestbook_login_post" id="cguestbook_login_post" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["gb_login_post"]); ?> /></td>
 159         <td class="v10"><label for="cguestbook_login_post">&nbsp;<?php echo $BL['be_gb_post_login'] ?>&nbsp;&nbsp;</label></td>
 160        </tr>
 161        </table></td>
 162  </tr>
 163  
 164  
 165  
 166  
 167  
 168  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 169  
 170  <tr>
 171    <td align="right" class="chatlist"><?php echo $BL['be_cnt_imgupload'] ?>:&nbsp;</td>
 172    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 173        <tr>
 174        <?php  
 175        
 176        if(!isset($content["guestbook"]["image_upload"])) {
 177            $content["guestbook"]["image_upload"] = 0;
 178        }
 179        
 180        if(empty($content["guestbook"]["max_image_filesize"])) {
 181            $content["guestbook"]["max_image_filesize"] = $phpwcms['file_maxsize'];
 182        }
 183       
 184        $content["guestbook"]["max_image_filesize"] = return_bytes_shorten($content["guestbook"]["max_image_filesize"]);
 185        
 186        if(return_bytes($content["guestbook"]["max_image_filesize"]) > $phpwcms['file_maxsize']) {
 187            $content["guestbook"]["max_image_filesize"] = return_bytes_shorten($phpwcms['file_maxsize']);
 188        }
 189        
 190        ?>      
 191         <td bgcolor="#E7E8EB"><input name="cguestbook_imgupload" id="cguestbook_imgupload" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["image_upload"]); ?> /></td>
 192         <td class="v10" bgcolor="#E7E8EB"><label for="cguestbook_imgupload">&nbsp;<?php echo $BL['be_on'] ?></label>&nbsp;&nbsp;</td>
 193         <td>&nbsp;&nbsp;</td>
 194         <td class="chatlist">&nbsp;&nbsp;<?php echo $BL['be_cnt_filesize'] ?>:&nbsp;</td>
 195         <td ><input name="cguestbook_maximgsize" type="text" class="f11b" id="cguestbook_maximgsize" style="width: 100px;" size="20" maxlength="20" value="<?php echo $content["guestbook"]["max_image_filesize"] ?>" /></td>
 196         <td class="chatlist">&nbsp;(<?php echo return_bytes($content["guestbook"]["max_image_filesize"]) ?> Byte)</td>
 197         <td><img src="img/leer.gif" alt="" width="1" height="22" /></td>    
 198        </tr>
 199        </table></td>
 200  </tr>
 201  
 202  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 203  
 204  <tr>
 205    <td align="right" class="chatlist"><?php echo $BL['be_cnt_sorting'] ?>:&nbsp;</td>
 206    <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
 207        <tr>
 208        <?php
 209        
 210        if(!isset($content["guestbook"]["sorting"])) {
 211            $content["guestbook"]["sorting"] = 0;
 212        }
 213        
 214        ?>
 215          <td><input name="cguestbook_sorting" id="cguestbook_sorting0" type="radio" value="0" <?php is_checked(0, $content["guestbook"]["sorting"]); ?> /></td>
 216          <td class="v10"><label for="cguestbook_sorting0"><?php echo $BL['be_msg_date'].' '.$BL['be_admin_struct_orderdesc'] ?></label>&nbsp;</td>
 217          <td><input name="cguestbook_sorting" id="cguestbook_sorting1" type="radio" value="1" <?php is_checked(1, $content["guestbook"]["sorting"]); ?> /></td>
 218          <td class="v10"><label for="cguestbook_sorting1"><?php echo $BL['be_msg_date'].' '.$BL['be_admin_struct_orderasc'] ?></label>&nbsp;</td>
 219          <td><img src="img/leer.gif" alt="" width="1" height="22" /></td>
 220        </tr>
 221      </table></td>
 222  </tr>
 223  
 224  
 225  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 226  
 227  
 228  <tr>
 229    <td align="right" class="chatlist"><?php echo 'Captcha' ?>:&nbsp;</td>
 230    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 231        <tr>
 232        <?php  
 233        
 234        if(!isset($content["guestbook"]["captcha"])) {
 235            $content["guestbook"]["captcha"] = 1;
 236        }
 237        
 238        if(empty($content["guestbook"]["captcha_maxchar"])) {
 239            $content["guestbook"]["captcha_maxchar"] = 5;
 240        }
 241        
 242        ?>      
 243         <td bgcolor="#E7E8EB"><input name="cguestbook_captcha" id="cguestbook_captcha" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["captcha"]); ?> /></td>
 244         <td class="v10" bgcolor="#E7E8EB"><label for="cguestbook_captcha">&nbsp;<?php echo $BL['be_admin_usr_verify'] ?></label>&nbsp;&nbsp;</td>
 245         <td>&nbsp;&nbsp;</td>
 246         <td class="chatlist">&nbsp;&nbsp;<?php echo $BL['be_cnt_captchalength'] ?>:&nbsp;</td>
 247         <td><input name="cguestbook_captchamaxchar" type="text" class="f11b" id="cguestbook_captchamaxchar" style="width: 25px;" size="3" maxlength="2" value="<?php echo $content["guestbook"]["captcha_maxchar"] ?>" /></td>
 248         <td class="chatlist">&nbsp;<?php echo $BL['be_cnt_chars'] ?></td>
 249         <td><img src="img/leer.gif" alt="" width="1" height="22" /></td>    
 250        </tr>
 251        </table></td>
 252  </tr>
 253  
 254  
 255  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 256  
 257  
 258  <tr>
 259    <td align="right" class="chatlist"><?php echo $BL['be_profile_label_website'] ?>:&nbsp;</td>
 260    <td><table border="0" cellpadding="0" cellspacing="0" summary="">
 261        <tr>
 262        <?php  
 263        
 264        if(empty($content["guestbook"]["gb_urlcheck"])) {
 265            $content["guestbook"]["gb_urlcheck"] = 0;
 266        }
 267        
 268        ?>      
 269         <td bgcolor="#E7E8EB"><input name="cguestbook_urlcheck" id="cguestbook_urlcheck" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["gb_urlcheck"]); ?> /></td>
 270         <td class="v10" bgcolor="#E7E8EB"><label for="cguestbook_urlcheck">&nbsp;<?php echo $BL['be_gb_urlcheck'] ?>&nbsp;&nbsp;</label></td>
 271        </tr>
 272        </table></td>
 273  </tr>
 274  
 275  
 276  
 277  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>
 278  
 279  
 280  
 281  <tr>
 282    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13" /><?php echo $BL['be_cnt_guestbook_banned'] ?>:&nbsp;</td>
 283    <td valign="top"><textarea name="cguestbook_banned" cols="40" rows="3" class="f11" style="width:440px"><?php echo  isset($content["guestbook"]["banned"]) ? html_specialchars($content["guestbook"]["banned"]) : '' ?></textarea></td>
 284  </tr>
 285  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td>
 286  </tr>
 287  <tr>
 288    <td align="right" class="chatlist"><?php echo $BL['be_cnt_guestbook_flooding'] ?>:&nbsp;</td>
 289    <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
 290        <tr>
 291          <td><input name="cguestbook_cookie" type="checkbox" value="1"<?php 
 292          
 293          if(!isset($content["guestbook"]["cookie"])) $content["guestbook"]["cookie"] = 1;
 294          is_checked(1, intval($content["guestbook"]["cookie"])) 
 295          
 296          ?> /></td>
 297          <td class="v10"><?php echo $BL['be_cnt_guestbook_setcookie'] ?>&nbsp;&nbsp;&nbsp;</td>
 298          <td class="v10"><?php echo$BL['be_cnt_guestbook_allowed'] ?>&nbsp;</td>
 299          <td><input name="cguestbook_time" type="text" class="f11" id="cguestbook_time" style="width: 65px;" size="10" maxlength="10" value="<?php 
 300          
 301          if(!isset($content["guestbook"]["time"])) {
 302              $content["guestbook"]["time"] = 86400;
 303          }
 304          echo intval($content["guestbook"]["time"]); 
 305          
 306          ?>" /></td>
 307          <td class="v10">&nbsp;<?php echo $BL['be_cnt_guestbook_seconds'] ?></td>
 308          <td><img src="img/leer.gif" alt="" width="10" height="22" /></td>
 309        </tr>
 310      </table></td>
 311  </tr>
 312  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
 313  <?php
 314  
 315  if(!isset($content["guestbook"]["notify"])) {
 316      $content["guestbook"]["notify"] = 0;
 317  }
 318  if(!isset($content["guestbook"]["notify_email"])) {
 319      $content["guestbook"]["notify_email"] = '';
 320  }
 321  
 322  ?>
 323  <tr>
 324       <td align="right" class="chatlist"><?php echo $BL['be_cnt_email_notify'] ?>:&nbsp;</td>
 325       <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
 326       
 327       <tr>
 328           <td><input name="cguestbook_notify" id="cguestbook_notify" type="checkbox" value="1" <?php is_checked(1, $content["guestbook"]["notify"]); ?> /></td>
 329           <td class="v10"><label for="cguestbook_notify"><?php echo $BL['be_cnt_notify_by_email'] ?></label>&nbsp;</td>
 330          <td><input name="cguestbook_notify_email" type="text" class="f11" id="cguestbook_notify_email" style="width: 200px;" size="10" value="<?php echo html_specialchars($content["guestbook"]["notify_email"]) ?>" /></td>
 331       </tr>
 332       
 333       </table></td>
 334  </tr>
 335  
 336  <?php 
 337  // show possibility to edit guestbook entries
 338  // if content part is created
 339  if($content["id"]) {
 340  ?>
 341  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr>
 342  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 343  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
 344  <tr>
 345    <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="15" /><?php echo $BL['be_cnt_guestbook_edit'] ?>:&nbsp;</td>
 346    <td><iframe height="350" width="440" frameborder="0" scrolling="Auto" src="include/inc_act/act_guestbook.php?cid=<?php echo empty($content["guestbook"]["aliasID"]) ? $content["id"] : $content["guestbook"]["aliasID"]; ?>"></iframe></td>
 347  </tr>
 348  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
 349  <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
 350  <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
 351  
 352  <?php
 353  }
 354  ?>


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