<?php
$file = __FILE__;
include ("inc/inc_common.php");
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
include ("inc/inc_getdate.php");
include ("inc/inc_forumname.php");
$page = "New Topic in Group $name3";
$pagelink = $file."?groupid=".$groupid;
include("inc/inc_setonline.php");
$title = "$name3 - New Topic";
include ("inc/inc_head.php");
include ("inc/inc_body.php");
$title = "New Topic";
include ("inc/inc_title.php");

print "</centeR><table border=0 width=\"100%\" cellpadding=1 cellspacing=0><tr><td  width=\"20%\">
<table border=0 cellpadding=1 cellspacing=0><tr><td>
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"index.php\">$name1&nbsp;Home</a>
</td></tr>
<tr><td><image src=\"images/folder_line.gif\">
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"forums.php\">$name2</a></td></tr>
<tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
<image src=\"images/folder_icon.gif\">&nbsp;<a href=\"topics.php?groupid=$groupid\">$name3</a></td></tr>
</table>
</td><td><center>";

include ("inc/inc_navigation.php");
include ("inc/inc_newmailsdisplay.php");
print "</td></tr></table><br><center>";


//end of include files...

print "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"60%\"\" bgcolor=\"$fgcolour\"><tr><td width=\"100%\">
<p align=\"center\"><br><b><font face=\"$font\">&nbsp;&nbsp;&nbsp;Create New Gallery</b>";

print "</p>
<form method=\"POST\" action=\"add_new_gallery.php\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"$bordercolor\" width=\"100%\">
<tr><td width=\"40%\"><br><br><br>";


include("inc_smilies.php");

print "<td width=\"40%\">
&nbsp;&nbsp;<input type=\"text\" onfocus=\"document.onkeypress=function(){};\" name=\"topicname\" size=\"45\" style=\"background-image: url('images/text_subject_background.gif')\"><br><br>";
?>


<script language=javascript>
<!--

function markSelection ( txtObj ) {
 if ( txtObj.createTextRange ) {
   txtObj.caretPos = document.selection.createRange().duplicate();
   isSelected = true;
 }
}

function insertTag ( txtName, tag, enclose ) {
 var closeTag = tag;
 if ( enclose ) {
   var attribSplit = tag.indexOf ( ' ' );
   if ( tag.indexOf ( ' ' ) > -1 )
     closeTag = tag.substring ( 0, attribSplit );
 }
 if ( isSelected ) {
   var txtObj = eval ( "document.forms[0]." + txtName );
   if (txtObj.createTextRange && txtObj.caretPos) {
     var caretPos = txtObj.caretPos;
     caretPos.text = ( ( enclose ) ? "["+tag+"]"+caretPos.text+"[/"+closeTag+"]" : ""+tag+""+caretPos.text );
     markSelection ( txtObj );
     if ( txtObj.caretPos.text=='' ) {
       isSelected=false;
    txtObj.focus();
     }
   }
 } else {
   // placeholder for loss of focus handler
 }
}

//-->
</script>

<form>
<textarea onfocus="document.onkeypress=function(){};" rows="11" cols="36" style="background-image: url('images/big_area_background.gif')" name="tsttxt" ONSELECT="markSelection(this);" ONCLICK="markSelection(this);" ONKEYUP="markSelection(this);"></textarea><br>

<?php
include ("inc_buttons.php");

print "<br><center>";



// Add the priority setter if the admin level is high enough...

if ($cAdminLevel >= 3)
{
    print "<select size=1 name=\"priority\">
    <option selected value=\"0\">Normal Priority</option>
    <option value=\"1\">High Priority</option>
    </select>&nbsp;";
}
print "<input type=\"hidden\" name=\"groupid\" value=\"$groupid\">
<font size=3>

<input type=\"submit\" value=\"Create This Gallery!\">


</td><td width=\"20%\">&nbsp;</td></tr></table>
</form>&nbsp;</td></tr></table>
<br><br>";

include("inc/inc_footer.php");
?>