<?PHP /* New Forum */ ?>
<script language="JavaScript" type="text/javascript">
  function dropforum(url, folder){
    if(folder){
      ans=window.confirm("You are about to drop this folder.  All sub folders and sub forums of this folder will be dropped also.  Do you want to continue?");
    }
    else{
      ans=window.confirm("You are about to drop this forum.  Do you want to continue?");
    }
    if(ans){
      window.location.replace(url);
    }
  }
</script>
<table border="1" ><tr><td bgcolor="<?PHP echo $color1; ?>" >
<form action="<?PHP echo $myname; ?>?connexion=<?PHP echo $connexion; ?>" method="POST">
<input type="Hidden" name="num" value="<?PHP echo $num; ?>">
<input type="Hidden" name="action" value="props">
<input type="Hidden" name="frompage" value="props">
<input type="Hidden" name="page" value="managemenu">
<input type="Hidden" name="table" value="<?PHP echo $ForumTableName; ?>">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
  <td colspan="2" align="center" valign="middle" bgcolor="<?PHP echo $color2; ?>"><font face="Arial,Helvetica" color="<?PHP echo $color1; ?>"><b>Edit <?PHP $folder ? $word="Folder" : $word="Forum"; echo "$word: $ForumName"; ?></b></font></td>
</tr>
<tr>
  <td valign="middle" >Name:</td>
  <td valign="middle" ><input type="Text" name="name" value="<?PHP echo $ForumName; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Description:</td>
  <td valign="middle" ><textarea name="description" cols="60" rows="3" wrap="VIRTUAL" style="width: 300px;"><?PHP echo $ForumDescription; ?></textarea></td>
</tr>
<tr>
  <td valign="middle" >Config Suffix:</td>
  <td valign="middle" ><input type="Text" name="config_suffix" value="<?PHP echo $ForumConfigSuffix; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" ><font face="Arial,Helvetica">Folder:</td>
  <td valign="middle" ><select name="parent">
<option value="0">Top Level</option>
<?PHP
  $sSQL="Select id, name from ".$pho_main." where folder='1' and id<>$ForumId order by name";
  $q->query($DB, $sSQL);
  $rec=(object)$q->getrow();
  While(isset($rec->id)){
    echo "<option value=\"$rec->id\"";
    if($ForumParent==$rec->id) echo ' selected';
    echo ">$rec->name</option>\n";
    $rec=(object)$q->getrow();
  }
?>
</select></td>
</tr>
<tr>
  <td valign="middle" >Language File:</td>
  <td valign="middle" ><select name="lang">
<?php
$aryLangs = array();
$strLangDir = "lang/";
$dirCurrent = dir($strLangDir);
while($strFile=$dirCurrent->read()) {
  if (is_file($strLangDir.$strFile)) {
    $aryLangs[] = $strLangDir.$strFile;
  }
}
$dirCurrent->close();

if (count($aryLangs) > 1) { sort ($aryLangs); }

$file = current($aryLangs);
while ($file) {
  if($file!="$strLangDir"."blank".$ext){
    $intStartLang = strpos($file, '/') + 1;
    $intLengthLang = strpos($file, '.') - $intStartLang;
    $text=ucwords(substr($file,$intStartLang,$intLengthLang));
    echo "<option value=\"$file\"";
    if($file==$ForumLang) echo ' selected';
    echo ">$text</option>\n";
  }
  $file = next($aryLangs);
}
?></select></td>
</tr>
<?php if(!$ForumFolder){ ?>
<tr>
  <td valign="middle" >Moderator Host:</td>
  <td valign="middle" ><input type="Text" name="staff_host" value="<?PHP echo $ForumStaffHost; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Allow uploads?</td>
  <td valign="middle" ><font face="Arial,Helvetica">
  <?PHP
    if ($ForumAllowUploads == 'Y') {
      print '<INPUT TYPE="radio" NAME="allow_uploads" VALUE="Y" CHECKED>yes';
      print '<INPUT TYPE="radio" NAME="allow_uploads" VALUE="N">no';
    } else {
      print '<INPUT TYPE="radio" NAME="allow_uploads" VALUE="Y">yes';
      print '<INPUT TYPE="radio" NAME="allow_uploads" VALUE="N" CHECKED>no';
    }
  ?>
  </td>
</tr>
<tr>
  <td valign="middle" >Moderation:</td>
  <td valign="middle" ><select name="moderation" >
  <option value="none" <?PHP if($ForumModeration=='n') echo 'selected'; ?>>None</option>
  <option value="all" <?PHP if($ForumModeration=='a') echo 'selected'; ?>>All Messages Before Posted</option>
  <option value="react" <?PHP if($ForumModeration=='r') echo 'selected'; ?>>All Messages After Posted</option>
</select></td>
</tr>
<tr>
  <td valign="middle" >Moderator Email:</td>
  <td valign="middle" ><input type="Text" name="mod_email" value="<?PHP echo $ForumModEmail; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Moderator Password:<br>(enter to change)</td>
  <td valign="middle" ><input type="password" name="mod_pass" size="10" ><br><input type="password" name="mod_pass_2" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Mailing List Address:</td>
  <td valign="middle" ><input type="Text" name="email_list" value="<?PHP echo $ForumEmailList; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Mailing List Return:</td>
  <td valign="middle" ><input type="Text" name="email_return" value="<?PHP echo $ForumEmailReturnList; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Mailing List Tag:</td>
  <td valign="middle" ><input type="Text" name="email_tag" value="<?PHP echo $ForumEmailTag; ?>" size="25" ></td>
</tr>
<tr>
  <td valign="middle" >Duplicate Posts:</td>
  <td valign="middle" ><select name="check_dup" >
<option value="0" <?PHP if($ForumCheckDup==0) echo "selected"; ?>>Do Not Check For Duplicates</option>
<option value="1" <?PHP if($ForumCheckDup==1) echo "selected"; ?>>Check For Duplicates</option>
</select></td>
</tr>
<tr>
  <td valign="middle" >Messages Per Page:</td>
  <td valign="middle" ><input type="Text" name="display" value="<?PHP echo $ForumDisplay; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Thread Type:</td>
  <td valign="middle" ><select name="multi_level">
<option value="0" <?PHP if($ForumMultiLevel==0) echo "selected"; ?>>Single Level</option>
<option value="1" <?PHP if($ForumMultiLevel==1) echo "selected"; ?>>Multiple Levels</option>
</select></td>
</tr>
<b></b><br>
<tr>
  <td valign="middle" >Thread Display:</td>
  <td valign="middle" ><select name="collapsed">
<option value="0" <?PHP if($ForumCollapse==0) echo "selected"; ?>>Expanded</option>
<option value="1" <?PHP if($ForumCollapse==1) echo "selected"; ?>>Collapsed</option>
</select></td>
</tr>
<tr>
  <td valign="middle" >Read Messages:</td>
  <td valign="middle" ><select name="rflat" >
<option value="0" <?PHP if($ForumFlat==0) echo "selected"; ?>>One At A Time</option>
<option value="1" <?PHP if($ForumFlat==1) echo "selected"; ?>>Entire Thread At Once</option>
</select></td>
</tr>
<tr>
  <td valign="middle" >HTML Settings:</td>
  <td valign="middle" >
<?PHP
  if($ForumAllowHTML=="Y"){
    $html_all=1;
    $html_style=0;
    $html_font=0;
    $html_li=0;
    $html_img=0;
    $html_a=0;
  }
  else{
    strstr($ForumAllowHTML, "|i|")   ? $html_style=1 : $html_style=0;
    strstr($ForumAllowHTML, "font")  ? $html_font=1  : $html_font=0;
    strstr($ForumAllowHTML, "ul")  ? $html_li=1    : $html_li=0;
    strstr($ForumAllowHTML, "img") ? $html_img=1   : $html_img=0;
    strstr($ForumAllowHTML, "a")    ? $html_a=1     : $html_a=0;
  }
?>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
    <td><input type="checkbox" name="html_all" value="1" <?PHP if($html_all==1) echo "checked"; ?>> Allow All</td>
    <td><input type="checkbox" name="html_style" value="1" <?PHP if($html_style==1) echo "checked"; ?>> Bold, Italic, Underline</td>
</tr>
<tr>
    <td><input type="checkbox" name="html_font" value="1" <?PHP if($html_font==1) echo "checked"; ?>> Fonts</td>
    <td><input type="checkbox" name="html_li" value="1" <?PHP if($html_li==1) echo "checked"; ?>> Lists (ul,ol,li)</td>
</tr>
<tr>
    <td><input type="checkbox" name="html_img" value="1" <?PHP if($html_img==1) echo "checked"; ?>> Images</td>
    <td><input type="checkbox" name="html_a" value="1" <?PHP if($html_a==1) echo "checked"; ?>> Anchors (Links)</td>
</tr>
</table>
</td>
</tr>
<?PHP } ?>
<tr>
  <td valign="middle" >Table Width:</td>
  <td valign="middle" ><input type="Text" name="table_width" value="<?PHP echo $ForumTableWidth; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Table Header Color:</td>
  <td valign="middle" ><input type="Text" name="table_header_color" value="<?PHP echo $ForumTableHeaderColor; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Table Header Font Color:</td>
  <td valign="middle" ><input type="Text" name="table_header_font_color" value="<?PHP echo $ForumTableHeaderFontColor; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Main Table Body Color:</td>
  <td valign="middle" ><input type="Text" name="table_body_color_1" value="<?PHP echo $ForumTableBodyColor1; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Main Table Body Font Color:</td>
  <td valign="middle" ><input type="Text" name="table_body_font_color_1" value="<?PHP echo $ForumTableBodyFontColor1; ?>" size="10" ></td>
</tr>
<?PHP if(!$ForumFolder){ ?>
<tr>
  <td valign="middle" >Alt. Table Body Color:</td>
  <td valign="middle" ><input type="Text" name="table_body_color_2" value="<?PHP echo $ForumTableBodyColor2; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Alt. Table Body Font Color:</td>
  <td valign="middle" ><input type="Text" name="table_body_font_color_2" value="<?PHP echo $ForumTableBodyFontColor2; ?>" size="10" ></td>
</tr>
<?PHP } ?>
<tr>
  <td valign="middle" >Navigation Background Color:</td>
  <td valign="middle" ><input type="Text" name="nav_color" value="<?PHP echo $ForumNavColor; ?>" size="10" ></td>
</tr>
<tr>
  <td valign="middle" >Navigation Font Color:</td>
  <td valign="middle" ><input type="Text" name="nav_font_color" value="<?PHP echo $ForumNavFontColor; ?>" size="10" ></td>
</tr>
</td>
</tr>
</table>
<p>
<center><input type="Submit" name="submit" value="valider" ></center>
</form>
</td></tr></table>
<BR>