[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/list_new/ -> admin_list_config.php (source)

   1  <?php
   2  /*
   3  +---------------------------------------------------------------+
   4  |       e107 website system
   5  |
   6  |       ©Steve Dunstan 2001-2002
   7  |       http://e107.org
   8  |       jalist@e107.org
   9  |
  10  |       Released under the terms and conditions of the
  11  |       GNU General Public License (http://gnu.org).
  12  |
  13  |        $Source: /cvsroot/e107/e107_0.7/e107_plugins/list_new/admin_list_config.php,v $
  14  |        $Revision: 1.7 $
  15  |        $Date: 2006/10/28 09:02:43 $
  16  |        $Author: lisa_ $
  17  +---------------------------------------------------------------+
  18  */
  19  
  20  //include and require several classes
  21  require_once ("../../class2.php");
  22  if(!getperms("1")){ header("location:".e_BASE."index.php"); exit ;}
  23  require_once(e_ADMIN."auth.php");
  24  require_once(e_HANDLER."form_handler.php");
  25  $rs = new form;
  26  require_once(e_HANDLER."file_class.php");
  27  $fl = new e_file;
  28  $listplugindir = e_PLUGIN."list_new/";
  29  require_once ($listplugindir."list_class.php");
  30  $rc = new listclass;
  31  
  32  //get language file
  33  $lan_file = $listplugindir."languages/".e_LANGUAGE.".php";
  34  include(file_exists($lan_file) ? $lan_file : $listplugindir."languages/English.php");
  35  
  36  //get all sections to use (and reload if new e_list.php files are added)
  37  $rc -> getSections();
  38  
  39  //update preferences in database
  40  if(isset($_POST['update_menu'])){
  41      while(list($key, $value) = each($_POST)){
  42          if($value != LIST_ADMIN_2){ $list_pref[$tp->toDB($key)] = $tp->toDB($value); }
  43      }
  44  
  45      $tmp = $eArrayStorage->WriteArray($list_pref);
  46      $sql -> db_Update("core", "e107_value='$tmp' WHERE e107_name='list' ");
  47  
  48      $message = LIST_ADMIN_3;
  49  }
  50  
  51  //check preferences from database
  52  $list_pref    = $rc -> getListPrefs();
  53  
  54  
  55  $rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
  56  $iconlist = $fl->get_files($listplugindir."images/", "", $rejectlist);
  57  
  58  //render message if set
  59  if(isset($message)){
  60      $ns -> tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
  61  }
  62  
  63  
  64  //define some variables
  65  $stylespacer = "style='border:0; height:20px;'";
  66  $styletable = "style='width:90%; border:1px solid #444; border-collapse:collapse;' cellpadding='0' cellspacing='0' ";
  67  
  68  //template for non expanding row
  69  $TOPIC_ROW_NOEXPAND = "
  70  <tr>
  71      <td class='forumheader3' style='width:20%; white-space:nowrap; vertical-align:top;'>{TOPIC_TOPIC}</td>
  72      <td class='forumheader3'>{TOPIC_FIELD}</td>
  73  </tr>
  74  ";
  75  
  76  //template for expanding row
  77  $TOPIC_ROW = "
  78  <tr>
  79      <td class='forumheader3' style='width:20%; white-space:nowrap; vertical-align:top;'>{TOPIC_TOPIC}</td>
  80      <td class='forumheader3'>
  81          <a style='cursor: pointer; cursor: hand' onclick='expandit(this);'>{TOPIC_HEADING}</a>
  82          <div style='display: none;'>
  83              <div class='smalltext'>{TOPIC_HELP}</div><br />
  84              {TOPIC_FIELD}
  85          </div>
  86      </td>
  87  </tr>
  88  ";
  89  
  90  //template for spacer row
  91  $TOPIC_ROW_SPACER = "<tr><td $stylespacer colspan='2'></td></tr>";
  92  
  93  $TOPIC_TABLE_START = "
  94  <div style='text-align:center;'>
  95  ".$rs -> form_open("post", e_SELF, "menu_conf_form", "", "enctype='multipart/form-data'")."
  96  <table style='".ADMIN_WIDTH."' class='fborder'>";
  97  
  98  //$TOPIC_TABLE_END = "
  99  //</table>
 100  //</form>
 101  //</div>";
 102  $TOPIC_TABLE_END = pref_submit()."</table></div>";
 103  
 104  
 105  $text = "
 106  <script type=\"text/javascript\">
 107  <!--
 108  var hideid=\"recent_page\";
 109  function showhideit(showid){
 110      if (hideid!=showid){
 111          show=document.getElementById(showid).style;
 112          hide=document.getElementById(hideid).style;
 113          show.display=\"\";
 114          hide.display=\"none\";
 115          hideid = showid;
 116      }
 117  }
 118  //-->
 119  </script>";
 120  
 121  $text .= "
 122  <div style='text-align:center'>
 123  ".$rs -> form_open("post", e_SELF, "menu_conf_form", "", "enctype='multipart/form-data'")."\n";
 124  
 125  $text .= parse_menu_options("recent_menu");
 126  $text .= parse_menu_options("new_menu");
 127  $text .= parse_page_options("recent_page");
 128  $text .= parse_page_options("new_page");
 129  
 130  $text .= "
 131  </form>
 132  </div>";
 133  
 134  $ns -> tablerender(LIST_ADMIN_1, $text);
 135  
 136  
 137  function parse_global_options($type){
 138      global $rc, $list_pref, $rs, $tp, $sections, $titles, $iconlist, $TOPIC_ROW, $TOPIC_ROW_SPACER, $TOPIC_TABLE_END;
 139  
 140      //show sections
 141      $TOPIC_TOPIC = LIST_ADMIN_SECT_1;
 142      $TOPIC_HEADING = LIST_ADMIN_SECT_2;
 143      $TOPIC_HELP = LIST_ADMIN_SECT_3;
 144      $TOPIC_FIELD = "";
 145      for($i=0;$i<count($sections);$i++){
 146          $TOPIC_FIELD .= $rs -> form_checkbox($sections[$i]."_".$type."_display", 1, ($list_pref[$sections[$i]."_".$type."_display"]) ? "1" : "0")." ".$titles[$i]."<br />";
 147      }
 148      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 149  
 150      //open or closed
 151      $TOPIC_TOPIC = LIST_ADMIN_SECT_4;
 152      $TOPIC_HEADING = LIST_ADMIN_SECT_5;
 153      $TOPIC_HELP = LIST_ADMIN_SECT_6;
 154      $TOPIC_FIELD = "";
 155      for($i=0;$i<count($sections);$i++){
 156          $TOPIC_FIELD .= $rs -> form_checkbox($sections[$i]."_".$type."_open", 1, (isset($list_pref[$sections[$i]."_".$type."_open"]) ? "1" : "0"))." ".$titles[$i]."<br />";
 157      }
 158      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 159  
 160      //author
 161      $TOPIC_TOPIC = LIST_ADMIN_SECT_7;
 162      $TOPIC_HEADING = LIST_ADMIN_SECT_8;
 163      $TOPIC_HELP = LIST_ADMIN_SECT_9;
 164      $TOPIC_FIELD = "";
 165      for($i=0;$i<count($sections);$i++){
 166          $TOPIC_FIELD .= $rs -> form_checkbox($sections[$i]."_".$type."_author", 1, (isset($list_pref[$sections[$i]."_".$type."_author"]) ? "1" : "0"))." ".$titles[$i]."<br />";
 167      }
 168      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 169  
 170      //category
 171      $TOPIC_TOPIC = LIST_ADMIN_SECT_10;
 172      $TOPIC_HEADING = LIST_ADMIN_SECT_11;
 173      $TOPIC_HELP = LIST_ADMIN_SECT_12;
 174      $TOPIC_FIELD = "";
 175      for($i=0;$i<count($sections);$i++){
 176          $TOPIC_FIELD .= $rs -> form_checkbox($sections[$i]."_".$type."_category", 1, (isset($list_pref[$sections[$i]."_".$type."_category"]) ? "1" : "0"))." ".$titles[$i]."<br />";
 177      }
 178      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 179  
 180      //date
 181      $TOPIC_TOPIC = LIST_ADMIN_SECT_13;
 182      $TOPIC_HEADING = LIST_ADMIN_SECT_14;
 183      $TOPIC_HELP = LIST_ADMIN_SECT_15;
 184      $TOPIC_FIELD = "";
 185      for($i=0;$i<count($sections);$i++){
 186          $TOPIC_FIELD .= $rs -> form_checkbox($sections[$i]."_".$type."_date", 1, (isset($list_pref[$sections[$i]."_".$type."_date"]) ? "1" : "0"))." ".$titles[$i]."<br />";
 187      }
 188      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 189  
 190      //icon
 191      $TOPIC_TOPIC = LIST_ADMIN_SECT_22;
 192      $TOPIC_HEADING = LIST_ADMIN_SECT_23;
 193      $TOPIC_HELP = LIST_ADMIN_SECT_24;
 194      $TOPIC_FIELD = "<table $styletable>";
 195      for($i=0;$i<count($sections);$i++){
 196          $TOPIC_FIELD .= "
 197          <tr>
 198          <td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$titles[$i]."</td>
 199          <td class='forumheader3'>
 200              ".$rs -> form_text($sections[$i]."_".$type."_icon", 15, $list_pref[$sections[$i]."_".$type."_icon"], 100)."
 201              <input class='button' type='button' style='cursor:hand' size='30' value='".LIST_ADMIN_12."' onClick=\"expandit('div_".$sections[$i]."_".$type."_icon')\" />
 202              <div id='div_".$sections[$i]."_".$type."_icon' style='display:none;'>";
 203              foreach($iconlist as $icon){
 204                  $TOPIC_FIELD .= "<a href=\"javascript:insertext('".$icon['fname']."','".$sections[$i]."_".$type."_icon','div_".$sections[$i]."_".$type."_icon')\"><img src='".$icon['path'].$icon['fname']."' style='border:0' alt='' /></a> ";
 205              }
 206              $TOPIC_FIELD .= "</div>
 207          </td>
 208          </tr>";
 209      }
 210      $TOPIC_FIELD .= "</table>";
 211      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 212  
 213      //amount
 214      $maxitems_amount = "50";
 215      $TOPIC_TOPIC = LIST_ADMIN_SECT_16;
 216      $TOPIC_HEADING = LIST_ADMIN_SECT_17;
 217      $TOPIC_HELP = LIST_ADMIN_SECT_18;
 218      $TOPIC_FIELD = "<table $styletable>";
 219      for($i=0;$i<count($sections);$i++){
 220          $TOPIC_FIELD .= "
 221          <tr>
 222          <td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$titles[$i]."</td>
 223          <td class='forumheader3'>
 224              ".$rs -> form_select_open($sections[$i]."_".$type."_amount");
 225              for($a=1; $a<=$maxitems_amount; $a++){
 226                  $TOPIC_FIELD .= ($list_pref[$sections[$i]."_".$type."_amount"] == $a ? $rs -> form_option($a, 1, $a) : $rs -> form_option($a, 0, $a));
 227              }
 228              $TOPIC_FIELD .= $rs -> form_select_close()."
 229          </td>
 230          </tr>";
 231      }
 232      $TOPIC_FIELD .= "</table>";
 233      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 234  
 235      //order
 236      $max = count($sections);
 237      $TOPIC_TOPIC = LIST_ADMIN_SECT_19;
 238      $TOPIC_HEADING = LIST_ADMIN_SECT_20;
 239      $TOPIC_HELP = LIST_ADMIN_SECT_21;
 240      $TOPIC_FIELD = "<table $styletable>";
 241      for($i=0;$i<count($sections);$i++){
 242          $TOPIC_FIELD .= "
 243          <tr>
 244          <td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$titles[$i]."</td>
 245          <td class='forumheader3'>
 246          ".$rs -> form_select_open($sections[$i]."_".$type."_order");
 247          for($a=1; $a<=$max; $a++){
 248              $TOPIC_FIELD .= ($list_pref[$sections[$i]."_".$type."_order"] == $a ? $rs -> form_option($a, 1, $a) : $rs -> form_option($a, 0, $a));
 249          }
 250          $TOPIC_FIELD .= $rs -> form_select_close()."
 251          </td>
 252          </tr>";
 253      }
 254      $TOPIC_FIELD .= "</table>";
 255      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 256  
 257      //caption
 258      $TOPIC_TOPIC = LIST_ADMIN_SECT_25;
 259      $TOPIC_HEADING = LIST_ADMIN_SECT_26;
 260      $TOPIC_HELP = LIST_ADMIN_SECT_27;
 261      $TOPIC_FIELD = "<table $styletable>";
 262      for($i=0;$i<count($sections);$i++){
 263          $TOPIC_FIELD .= "
 264          <tr>
 265          <td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$titles[$i]."</td>
 266          <td class='forumheader3'>
 267              ".$rs -> form_text($sections[$i]."_".$type."_caption", 30, $tp->toHTML($list_pref[$sections[$i]."_".$type."_caption"],"","defs"), "50", "tbox")."
 268          </td>
 269          </tr>";
 270      }
 271      $TOPIC_FIELD .= "</table>";
 272      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 273  
 274      $text .= $TOPIC_ROW_SPACER;
 275  
 276      return $text;
 277  }
 278  
 279  
 280  //---------------------------------------------------------------------------------------------------
 281  function parse_menu_options($type){
 282      global $rc, $list_pref, $rs, $tp, $sections, $titles, $iconlist, $TOPIC_ROW, $TOPIC_ROW_SPACER, $TOPIC_TABLE_END;
 283  
 284      $text = "
 285      <div id='".$type."' style='display:none; text-align:center'>
 286      <table style='".ADMIN_WIDTH."' class='fborder'>";
 287  
 288      if($type == "new_menu"){
 289          $text .= $rc -> parse_headerrow_title(LIST_ADMIN_OPT_5);
 290      }else{
 291          $text .= $rc -> parse_headerrow_title(LIST_ADMIN_OPT_3);
 292      }
 293  
 294      $text .= parse_global_options($type);
 295  
 296      //menu preference : caption
 297      $TOPIC_TOPIC = LIST_ADMIN_LAN_2;
 298      $TOPIC_HEADING = LIST_ADMIN_LAN_3;
 299      $TOPIC_HELP = LIST_ADMIN_LAN_4;
 300      $TOPIC_FIELD = $rs -> form_text($type."_caption", "30", $tp->toHTML($list_pref[$type."_caption"],"","defs"), "50", "tbox");
 301      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 302  
 303      //menu preference : icon : use
 304      $TOPIC_TOPIC = LIST_ADMIN_LAN_5;
 305      $TOPIC_HEADING = LIST_ADMIN_LAN_6;
 306      $TOPIC_HELP = LIST_ADMIN_LAN_7;
 307      $TOPIC_FIELD = "
 308          ".$rs -> form_radio($type."_icon_use", "1", ($list_pref[$type."_icon_use"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 309          ".$rs -> form_radio($type."_icon_use", "0", ($list_pref[$type."_icon_use"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 310      ";
 311      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 312  
 313      //menu preference : icon : show default theme bullet
 314      $TOPIC_TOPIC = LIST_ADMIN_MENU_2;
 315      $TOPIC_HEADING = LIST_ADMIN_MENU_3;
 316      $TOPIC_HELP = LIST_ADMIN_MENU_4;
 317      $TOPIC_FIELD = "
 318          ".$rs -> form_radio($type."_icon_default", "1", ($list_pref[$type."_icon_default"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 319          ".$rs -> form_radio($type."_icon_default", "0", ($list_pref[$type."_icon_default"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 320      ";
 321      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 322  
 323      //menu preference : amount chars
 324      $TOPIC_TOPIC = LIST_ADMIN_LAN_8;
 325      $TOPIC_HEADING = LIST_ADMIN_LAN_9;
 326      $TOPIC_HELP = LIST_ADMIN_LAN_10;
 327      $TOPIC_FIELD = $rs -> form_text($type."_char_heading", "30", $list_pref[$type."_char_heading"], "50", "tbox");
 328      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 329  
 330      //menu preference : postfix
 331      $TOPIC_TOPIC = LIST_ADMIN_LAN_11;
 332      $TOPIC_HEADING = LIST_ADMIN_LAN_12;
 333      $TOPIC_HELP = LIST_ADMIN_LAN_13;
 334      $TOPIC_FIELD = $rs -> form_text($type."_char_postfix", "30", $list_pref[$type."_char_postfix"], "50", "tbox");
 335      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 336  
 337      //menu preference : date
 338      $TOPIC_TOPIC = LIST_ADMIN_LAN_14;
 339      $TOPIC_HEADING = LIST_ADMIN_LAN_15;
 340      $TOPIC_HELP = LIST_ADMIN_LAN_16;
 341      $TOPIC_FIELD = $rs -> form_text($type."_datestyle", "30", $list_pref[$type."_datestyle"], "50", "tbox");
 342      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 343  
 344      //menu preference : date today
 345      $TOPIC_TOPIC = LIST_ADMIN_LAN_17;
 346      $TOPIC_HEADING = LIST_ADMIN_LAN_18;
 347      $TOPIC_HELP = LIST_ADMIN_LAN_19;
 348      $TOPIC_FIELD = $rs -> form_text($type."_datestyletoday", "30", $list_pref[$type."_datestyletoday"], "50", "tbox");
 349      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 350  
 351      //menu preference : show empty
 352      $TOPIC_TOPIC = LIST_ADMIN_LAN_26;
 353      $TOPIC_HEADING = LIST_ADMIN_LAN_27;
 354      $TOPIC_HELP = LIST_ADMIN_LAN_28;
 355      $TOPIC_FIELD = "
 356          ".$rs -> form_radio($type."_showempty", "1", ($list_pref[$type."_showempty"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 357          ".$rs -> form_radio($type."_showempty", "0", ($list_pref[$type."_showempty"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 358      ";
 359      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 360  
 361      //menu preference : open section if content exists? this will override the individual setting of the section
 362      $TOPIC_TOPIC = LIST_ADMIN_LAN_39;
 363      $TOPIC_HEADING = LIST_ADMIN_LAN_40;
 364      $TOPIC_HELP = LIST_ADMIN_LAN_41;
 365      $TOPIC_FIELD = "
 366          ".$rs -> form_radio($type."_openifrecords", "1", ($list_pref[$type."_openifrecords"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 367          ".$rs -> form_radio($type."_openifrecords", "0", ($list_pref[$type."_openifrecords"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 368      ";
 369      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 370  
 371      $text .= $TOPIC_ROW_SPACER;
 372      $text .= $TOPIC_TABLE_END;
 373  
 374      return $text;
 375  }
 376  //---------------------------------------------------------------------------------------------------
 377  
 378  
 379  //---------------------------------------------------------------------------------------------------
 380  function parse_page_options($type){
 381      global $rc, $list_pref, $rs, $tp, $sections, $TOPIC_ROW, $TOPIC_ROW_SPACER, $TOPIC_TABLE_END;
 382  
 383      if($type == "recent_page"){
 384          $display = "display:;";
 385      }else{
 386          $display = "display:none;";
 387      }
 388  
 389      $text = "
 390      <div id='".$type."' style='".$display." text-align:center'>
 391      <table style='".ADMIN_WIDTH."' class='fborder'>";
 392  
 393      if($type == "new_page"){
 394          $text .= $rc -> parse_headerrow_title(LIST_ADMIN_OPT_4);
 395      }else{
 396          $text .= $rc -> parse_headerrow_title(LIST_ADMIN_OPT_2);
 397      }
 398  
 399      $text .= parse_global_options($type);
 400  
 401      //page preference : caption
 402      $TOPIC_TOPIC = LIST_ADMIN_LAN_2;
 403      $TOPIC_HEADING = LIST_ADMIN_LAN_3;
 404      $TOPIC_HELP = LIST_ADMIN_LAN_4;
 405      $TOPIC_FIELD = $rs -> form_text($type."_caption", "30", $tp->toHTML($list_pref[$type."_caption"],"","defs"), "50", "tbox");
 406      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 407  
 408      //page preference : icon : use
 409      $TOPIC_TOPIC = LIST_ADMIN_LAN_5;
 410      $TOPIC_HEADING = LIST_ADMIN_LAN_6;
 411      $TOPIC_HELP = LIST_ADMIN_LAN_7;
 412      $TOPIC_FIELD = "
 413          ".$rs -> form_radio($type."_icon_use", "1", ($list_pref[$type."_icon_use"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 414          ".$rs -> form_radio($type."_icon_use", "0", ($list_pref[$type."_icon_use"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 415      ";
 416      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 417  
 418      //page preference : icon : show default theme bullet
 419      $TOPIC_TOPIC = LIST_ADMIN_LAN_29;
 420      $TOPIC_HEADING = LIST_ADMIN_LAN_30;
 421      $TOPIC_HELP = LIST_ADMIN_LAN_31;
 422      $TOPIC_FIELD = "
 423          ".$rs -> form_radio($type."_icon_default", "1", ($list_pref[$type."_icon_default"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 424          ".$rs -> form_radio($type."_icon_default", "0", ($list_pref[$type."_icon_default"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 425      ";
 426      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 427  
 428      //page preference : amount chars
 429      $TOPIC_TOPIC = LIST_ADMIN_LAN_8;
 430      $TOPIC_HEADING = LIST_ADMIN_LAN_9;
 431      $TOPIC_HELP = LIST_ADMIN_LAN_10;
 432      $TOPIC_FIELD = $rs -> form_text($type."_char_heading", "30", $list_pref[$type."_char_heading"], "50", "tbox");
 433      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 434  
 435      //page preference : postfix
 436      $TOPIC_TOPIC = LIST_ADMIN_LAN_11;
 437      $TOPIC_HEADING = LIST_ADMIN_LAN_12;
 438      $TOPIC_HELP = LIST_ADMIN_LAN_13;
 439      $TOPIC_FIELD = $rs -> form_text($type."_char_postfix", "30", $list_pref[$type."_char_postfix"], "50", "tbox");
 440      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 441  
 442      //page preference : date
 443      $TOPIC_TOPIC = LIST_ADMIN_LAN_14;
 444      $TOPIC_HEADING = LIST_ADMIN_LAN_15;
 445      $TOPIC_HELP = LIST_ADMIN_LAN_16;
 446      $TOPIC_FIELD = $rs -> form_text($type."_datestyle", "30", $list_pref[$type."_datestyle"], "50", "tbox");
 447      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 448  
 449      //page preference : date today
 450      $TOPIC_TOPIC = LIST_ADMIN_LAN_17;
 451      $TOPIC_HEADING = LIST_ADMIN_LAN_18;
 452      $TOPIC_HELP = LIST_ADMIN_LAN_19;
 453      $TOPIC_FIELD = $rs -> form_text($type."_datestyletoday", "30", $list_pref[$type."_datestyletoday"], "50", "tbox");
 454      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 455  
 456      //page preference : show empty
 457      $TOPIC_TOPIC = LIST_ADMIN_LAN_26;
 458      $TOPIC_HEADING = LIST_ADMIN_LAN_27;
 459      $TOPIC_HELP = LIST_ADMIN_LAN_28;
 460      $TOPIC_FIELD = "
 461          ".$rs -> form_radio($type."_showempty", "1", ($list_pref[$type."_showempty"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 462          ".$rs -> form_radio($type."_showempty", "0", ($list_pref[$type."_showempty"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 463      ";
 464      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 465  
 466      //page preference : colomn
 467      $TOPIC_TOPIC = LIST_ADMIN_LAN_20;
 468      $TOPIC_HEADING = LIST_ADMIN_LAN_21;
 469      $TOPIC_HELP = LIST_ADMIN_LAN_22;
 470      $TOPIC_FIELD = $rs -> form_select_open($type."_colomn");
 471          for($a=1; $a<=count($sections); $a++){
 472              $TOPIC_FIELD .= ($list_pref[$type."_colomn"] == $a ? $rs -> form_option($a, 1, $a) : $rs -> form_option($a, 0, $a));
 473          }
 474          $TOPIC_FIELD .= $rs -> form_select_close();
 475      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 476  
 477      //page preference : welcome text
 478      $TOPIC_TOPIC = LIST_ADMIN_LAN_23;
 479      $TOPIC_HEADING = LIST_ADMIN_LAN_24;
 480      $TOPIC_HELP = LIST_ADMIN_LAN_25;
 481      $TOPIC_FIELD = $rs -> form_textarea($type."_welcometext", "50", "5", $tp->toHTML($list_pref[$type."_welcometext"],"","defs"), "", "tbox");
 482      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 483  
 484      if($type == "new_page"){
 485          //timelapse:show
 486          $TOPIC_TOPIC = LIST_ADMIN_LAN_36;
 487          $TOPIC_HEADING = LIST_ADMIN_LAN_37;
 488          $TOPIC_HELP = LIST_ADMIN_LAN_38;
 489          $TOPIC_FIELD = "
 490              ".$rs -> form_radio($type."_timelapse", "1", ($list_pref[$type."_timelapse"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 491              ".$rs -> form_radio($type."_timelapse", "0", ($list_pref[$type."_timelapse"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 492          ";
 493          $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 494  
 495          //timelapse day number maximum
 496          $TOPIC_TOPIC = LIST_ADMIN_LAN_32;
 497          $TOPIC_HEADING = LIST_ADMIN_LAN_33;
 498          $TOPIC_HELP = LIST_ADMIN_LAN_34;
 499          $TOPIC_FIELD = $rs -> form_text($type."_timelapse_days", "3", $list_pref[$type."_timelapse_days"], "3", "tbox")." ".LIST_ADMIN_LAN_35;
 500          $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 501      }
 502  
 503      //page preference : open section if content exists? this will override the individual setting of the section
 504      $TOPIC_TOPIC = LIST_ADMIN_LAN_39;
 505      $TOPIC_HEADING = LIST_ADMIN_LAN_40;
 506      $TOPIC_HELP = LIST_ADMIN_LAN_41;
 507      $TOPIC_FIELD = "
 508          ".$rs -> form_radio($type."_openifrecords", "1", ($list_pref[$type."_openifrecords"] ? "1" : "0"), "", "").LIST_ADMIN_7."
 509          ".$rs -> form_radio($type."_openifrecords", "0", ($list_pref[$type."_openifrecords"] ? "0" : "1"), "", "").LIST_ADMIN_8."
 510      ";
 511      $text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW);
 512  
 513      $text .= $TOPIC_ROW_SPACER;
 514      $text .= $TOPIC_TABLE_END;
 515  
 516      return $text;
 517  }
 518  //---------------------------------------------------------------------------------------------------
 519  
 520  
 521  
 522  function pref_submit() {
 523      global $rs, $TOPIC_ROW_NOEXPAND;
 524  
 525      $TOPIC_TOPIC = LIST_ADMIN_11;
 526      $TOPIC_FIELD = $rs -> form_button("submit", update_menu, LIST_ADMIN_2);
 527      return (preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND));
 528  }
 529  
 530  
 531  // ##### Display options --------------------------------------------------------------------------
 532  function admin_list_config_adminmenu(){
 533  
 534                  $act = "";
 535                  unset($var);
 536                  $var=array();
 537                  //$var['general']['text']            = LIST_ADMIN_OPT_1;
 538                  $var['recent_page']['text']        = LIST_ADMIN_OPT_2;
 539                  $var['recent_menu']['text']        = LIST_ADMIN_OPT_3;
 540                  $var['new_page']['text']        = LIST_ADMIN_OPT_4;
 541                  $var['new_menu']['text']        = LIST_ADMIN_OPT_5;
 542  
 543                  show_admin_menu(LIST_ADMIN_OPT_6, $act, $var, TRUE);
 544  
 545  }
 546  // ##### End --------------------------------------------------------------------------------------
 547  
 548  require_once(e_ADMIN."footer.php");
 549  
 550  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7