DIR : /home/kozerus/public_html/dgs/dgs/forum/tags.php

/home/kozerus/public_html/dgs/dgs/forum

<?php
/*
Dragon Go Server
Copyright (C) 2001-  Jens-Uwe Gaspar

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

$TranslateGroups[] = "Forum";

chdir('..');
require_once 'include/std_functions.php';
require_once 'include/table_columns.php';
require_once 'forum/forum_functions.php';

$GLOBALS['ThePage'] = new Page('TagList');


{
   connect2mysql();

   $logged_in = who_is_logged( $player_row );
   if ( !$logged_in )
      error('login_if_not_logged_in', 'tags');
   if ( !ENABLE_FORUM_TAGS )
      error('feature_disabled', 'tags');
   $my_id = $player_row['ID'];
   if ( $my_id <= GUESTS_ID_MAX )
      error('not_allowed_for_guest', 'tags');

   $page = 'tags.php';

   $tform = new Form( 'tag_form', "tags.php", FORM_GET, false );
   $ttable = new Table( 'tags', $page, null, '', TABLE_NO_SIZE|TABLE_ROWS_NAVI );
   $tform->set_config( FEC_EXTERNAL_FORM, true );
   $ttable->set_externalform( $tform );
   $ttable->add_or_del_column();

   // add_tablehead($nr, $descr, $attbs=null, $mode=TABLE_NO_HIDE|TABLE_NO_SORT, $sortx='')
   $ttable->add_tablehead( 6, T_('Actions#header'));
   $ttable->add_tablehead( 1, T_('Look#header'), 'Center ForumTagsBG');
   $ttable->add_tablehead( 2, T_('Look#header'), 'Center SearchTagsBG');
   $ttable->add_tablehead( 3, T_('Name#header'));
   $ttable->add_tablehead( 4, T_('Background color'), 'Monospace');
   $ttable->add_tablehead( 5, T_('Text color'), 'Monospace');

   $ttable->set_default_sort( 2); // on Name

   // load tags
   $arr_tags = Tag::load_cache_tags( $my_id );
   $ttable->set_found_rows( count($arr_tags) );


   $title = T_('Forum tags');
   start_page( $title, true, $logged_in, $player_row );

   echo "<h3 class=Header>$title</h3>\n";

   foreach ( $arr_tags as $tag )
   {
      $id = $tag->ID;
      $row_str = array();

      if ( $ttable->Is_Column_Displayed[1] )
         $row_str[1] = $tag->render_tag();
      if ( $ttable->Is_Column_Displayed[2] )
         $row_str[2] = $tag->render_tag();
      if ( $ttable->Is_Column_Displayed[3] )
         $row_str[3] = $tag->Name;
      if ( $ttable->Is_Column_Displayed[4] )
         $row_str[4] = '#' . $tag->ColorBG;
      if ( $ttable->Is_Column_Displayed[5] )
         $row_str[5] = '#' . $tag->ColorFG;
      if ( $ttable->Is_Column_Displayed[6] )
      {
         $links = anchor( $base_path."forum/search.php?tag_$id=1".URI_AMP."sf_init=1",
               image( $base_path.'images/search.gif', 'S', '', 'class="Action"' ), T_('Search forum posts with this tag'));
         $links .= MED_SPACING .
            anchor( "edit_tag.php?tag=$id",
                  image( $base_path.'images/edit.gif', 'E', '', 'class="Action"' ), T_('Edit tag'));
         $links .= MED_SPACING .
            anchor( "edit_tag.php?tag=$id".URI_AMP."delete=1",
                  image( $base_path.'images/trashcan.gif', 'X', '', 'class="Action"' ), T_('Remove tag'));
         $row_str[6] = $links;
      }

      $ttable->add_row( $row_str );
   }

   $ttable->echo_table();

   // end of table

   $menu_array = array();
   $menu_array[T_('Tags')] = "forum/tags.php";
   $menu_array[T_('Add new tag')] = "forum/edit_tag.php";

   end_page(@$menu_array);
}//main
?>
//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer