Location: PHPKode > projects > ZompLog > admin/newentry.php
<?php
ob_start();
include_once("functions.php");
include('config.php');
include("session.php");

// this setting activates tinyMCE for all textareas in the page
$set_mce = 1;
include("header.php");

$user = loadUser($_SESSION['login'],$link,$table_users);

if(!$_SESSION["loggedIn"]){
?>

You are not allowed to view this page, please log in first.
<?php
}
else
{


if($_POST['Submit']){

//  create startdate
$publishdate = $_POST[publishyear] . $_POST[publishmonth] . $_POST[publishday] . $_POST[publishhour] . $_POST[publishminute] . "00";
//  create expirydate
$expirydate = $_POST[expiryyear] . $_POST[expirymonth] . $_POST[expiryday] . $_POST[expiryhour] . $_POST[expiryminute];
if ( $expirydate
 AND ((!$_POST[expiryyear])
 OR  (!$_POST[expirymonth])
 OR  (!$_POST[expiryday])
 OR  (!$_POST[expiryhour])
 OR  (!$_POST[expiryminute]))) {
$messages[]="$lang_no_expirydate";
}
if (!$expirydate) {
	$expirydate = "99999999999999";
} else {
	$expirydate = $expirydate . "99";
}

// check dates for validity
if (!checkdate($_POST[publishmonth],$_POST[publishday],$_POST[publishyear]) ) {
	$messages[]="$lang_false_publishdate";
}
if (($_POST[expiryyear]) AND (!checkdate ($_POST[expirymonth],$_POST[expiryday],$_POST[expiryyear]))) {
	$messages[]="$lang_false_expirydate";
}

// expiry date must be later than startdate
if ($publishdate >= $expirydate) {
$messages[]="$lang_wrong_date_order";
}

if(!$_POST[title])
{
$messages[]="$lang_enter_title";
}

if($_POST[newcat]){
$query = "SELECT * FROM $table_cat WHERE name = '$_POST[newcat]'";
$result = mysql_query ($query, $link) or die("Died getting info from db.  Error returned if any: ".mysql_error());
$cat = mysql_fetch_array($result);
if($cat){
$messages[]="$lang_cat_exists";
}
}

// upload script
include("upload_files.php");



if(empty($messages)) {


$query="INSERT INTO $table (title, text, extended, image, align, mediafile, mediatype, catid, username, date, teaser, podcast, expirydate) VALUES ('$_POST[title]', '$_POST[text]', '$_POST[extended]', '$image', '$_POST[align]', '$_POST[mediafile]', '$_POST[mediatype]', '$_POST[catid]', '$_SESSION[login]', '$publishdate', '$_POST[teaser]', '$_POST[podcast]', '$expirydate')";
	$result=mysql_query($query, $link) or die("Died inserting info into db.  Error returned if any: ".mysql_error());
	

$latestentry = mysql_insert_id();	
	

foreach ($aBestanden as $sFilename => $sFiletype) 
{ 
// get image size
if($sFiletype == 'image/jpeg' || $sFiletype == 'image/pjpeg'  || $sFiletype == 'image/gif'){
$imgsize = getimagesize("../upload/$sFilename");
}

// insert files into db
$query = "INSERT INTO $table_files (entry_id, name, type, width, height) VALUES ('". $latestentry . "', '". $sFilename . "', '". $sFiletype . "', '". $imgsize[0] . "', '". $imgsize[1] . "')";  
$result=mysql_query($query, $link) or die("Died inserting login info into db.  Error returned if any: ".mysql_error());	
}


if($_POST[media_url]){
$query = "INSERT INTO $table_files (entry_id, name, type, full_url) VALUES ('". $latestentry . "', '". $_POST[media_url] . "', '". $_POST[type] . "', '1')";  
$result=mysql_query($query, $link) or die("Died inserting login info into db.  Error returned if any: ".mysql_error());	
}

if($_POST[embed]){
$query = "INSERT INTO $table_files (entry_id, full_url, type) VALUES ('". $latestentry . "', '". $_POST[embed] . "', 'embed')";  
$result=mysql_query($query, $link) or die("Died inserting login info into db.  Error returned if any: ".mysql_error());	
}

$hook = 'newentry-submit';
include("loadplugins.php");


	
header("Location: $_SERVER[php_self]?message=1");
ob_end_flush();

	}
}
}


  

?>

<div id="submenu"><a href="newentry.php" class="sub"><?php echo "$lang_newentry"; ?></a> | <a href="entry.php" class="sub"><?php echo "$lang_edit_delete"; ?></a><?php if($user[admin]){ ?> | <a href="comments.php" class="sub"><?php echo "$lang_manage_comments"; ?></a> | <a href="category.php" class="sub"><?php echo "$lang_manage_categories"; ?></a><?php } ?></div>


<div id="side">
<div class="title">&nbsp;</div>
<div class="box"><?php
if(!empty($messages)){
	displayErrors($messages);
}

elseif($_GET[message] && empty($messages)){
displayMessage($_GET[message]);
  }

else{
echo "$lang_message003";
}  
  
?>
</div>
<br />
<div class="title"><?php echo "$lang_your_latest_posts"; ?></div>
<div class="box">
<?php
$query = "SELECT * FROM $table WHERE username = '$_SESSION[login]' ORDER BY id desc LIMIT 10";
$result = mysql_query ($query, $link) or die("Died getting info from db.  Error returned if any: ".mysql_error());
$numrows = mysql_num_rows($result);
$entries = arrayMaker($result,MYSQL_ASSOC);

if($entries){
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='text'>";
foreach($entries as $entry){
// determine status: not yet published / expired
$rev_datetime  = date('YmdHis');
if ($entry[date] > $rev_datetime) {
	$status = "&nbsp;<img src='icons/hourglass.png' alt='$lang_not_published' title='$lang_not_published' align='absmiddle'>";
} else {
	if ($entry[expirydate] < $rev_datetime) {
		$status = "&nbsp;<img src='icons/delete.png' alt='$lang_expired' title='$lang_expired' align='absmiddle'>";
	} else {
		$status = "";
	}
}

echo "<tr valign='top'><td width='22px'>$status</td><td><a href='editor.php?id=$entry[id]' alt='$lang_edit' title='$lang_edit'>$entry[title]</a></td></tr>";
}
echo "</table>";
}
else
{
echo $lang_no_results;
}
?>

</div>

<br />
<div class="box">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="text">
<tr valign="top"><td width="22px"><img src="icons/hourglass.png" alt="<?php echo "$lang_not_published"; ?>" title="<?php echo "$lang_not_published"; ?>"width="16" height="16" align="absmiddle" /></td><td><?php echo "$lang_not_published"; ?></td></tr>
<tr valign="top"><td width="22px"><img src="icons/delete.png" alt="<?php echo "$lang_expired"; ?>" title="<?php echo "$lang_expired"; ?>" width="16" height="16" align="absmiddle" /></td><td><?php echo "$lang_expired"; ?></td></tr>
</table>
</div>

<br />
<div class="box">
<?php echo "<strong>$lang_publishdate</strong><br />
$lang_publishdate_text<br /><br />
<strong>$lang_expirydate</strong><br />
$lang_expirydate_text";?>
</div>
</div>


<div id="main">
<form method="POST" name="editform" enctype="multipart/form-data">
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text">
    
    <tr>
      <td width="460" class="title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><h1><?php echo "$lang_newentry"; ?></h1></td>
          <td><input type="submit" name="Submit" value="<?php echo "$lang_submit"; ?>" id="button" /></td>
        </tr>
      </table>      </td>
    </tr>
    <tr>
      <td valign="top"></td>
    </tr>
    <tr>
      <td valign="top"><fieldset id="titlediv">
        <legend><?php echo "$lang_title"; ?></legend>
        <input name="title" type="text" id="title2" value="<?php echo "$_POST[title]"; ?>" size="30" />
        <?php if($settings[teasers]){ ?>
        <input name="teaser" type="checkbox" value="1" />
        <?php echo "$lang_teaser"; ?>
        <?php } ?>
      </fieldset></td>
    </tr>


	<!--  START add tablecell for publication dates    FMH  -->
	<?php
    	$publishyear   = substr($date,0,4);
    	$publishmonth  = substr($date,4,2);
    	$publishday    = substr($date,6,2);
		$publishhour   = substr($date,8,2);
		$publishminute = substr($date,10,2);
	?>
    <tr>
      <td colspan="2" valign="top">
      <a name="dateoptions" id="dateoptions"></a>
          <div class="text" onclick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer">
            <div align="right"> <a href="#dateoptions"><span class="showstate"></span><?php echo "$lang_date_options"; ?></a></div>
          </div>
        <div id="sc1" class="switchcontent">
      <fieldset id="titlediv">
        <legend><? echo "$lang_publicationdates"; ?></legend>
<!--  PUBLISH DATE  -->
        <? echo "<strong>$lang_publishdate</strong>"; ?><br />
		<select name="publishday" type="text" id="publishday"> 
		<option value="<?php echo "$publishday"; ?>" selected="selected"><?php echo "$publishday"; ?></option>
		<option value="01">01</option>
		<option value="02">02</option>
		<option value="03">03</option>
		<option value="04">04</option>
		<option value="05">05</option>
		<option value="06">06</option>
		<option value="07">07</option>
		<option value="08">08</option>
		<option value="09">09</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		<option value="13">13</option>
		<option value="14">14</option>
		<option value="15">15</option>
		<option value="16">16</option>
		<option value="17">17</option>
		<option value="18">18</option>
		<option value="19">19</option>
		<option value="20">20</option>
		<option value="21">21</option>
		<option value="22">22</option>
		<option value="23">23</option>
		<option value="24">24</option>
		<option value="25">25</option>
		<option value="26">26</option>
		<option value="27">27</option>
		<option value="28">28</option>
		<option value="29">29</option>
		<option value="30">30</option>
		<option value="31">31</option>
		</select>
		<select name="publishmonth" type="text" id="publishmonth">
		<option value="<?php echo "$publishmonth"; ?>" selected="selected"><?php echo "$publishmonth"; ?></option>
		<option value="01">01</option>
		<option value="02">02</option>
		<option value="03">03</option>
		<option value="04">04</option>
		<option value="05">05</option>
		<option value="06">06</option>
		<option value="07">07</option>
		<option value="08">08</option>
		<option value="09">09</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		</select>
		<select name="publishyear" type="text" id="publishyear">
		<option value="<?php echo "$publishyear"; ?>" selected="selected"><?php echo "$publishyear"; ?></option>
		<option value="2008">2008</option>
		<option value="2009">2009</option>
		<option value="2010">2010</option>
		<option value="2011">2011</option>
		<option value="2012">2012</option>
		<option value="2013">2013</option>
		<option value="2014">2014</option>
		<option value="2015">2015</option>
		<option value="2016">2016</option>
		<option value="2017">2017</option>
		<option value="2018">2018</option>
		</select>
		<?php echo "&nbsp;&nbsp;"; ?>
        <select name="publishhour" type="text" id="publishhour">
        <option value="<?php echo "$publishhour"; ?>" selected="selected"><?php echo "$publishhour"; ?></option>
        <option value="00">00</option>
        <option value="01">01</option>
        <option value="02">02</option>
        <option value="03">03</option>
        <option value="04">04</option>
        <option value="05">05</option>
        <option value="06">06</option>
        <option value="07">07</option>
        <option value="08">08</option>
        <option value="09">09</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        </select>
        <?php echo "$lang_hour&nbsp;&nbsp;"; ?>
        <select name="publishminute" type="text" id="publishminute">
        <option value="<?php echo "$publishminute"; ?>" selected="selected"><?php echo "$publishminute"; ?></option>
        <option value="00">00</option>
        <option value="01">01</option>
        <option value="02">02</option>
        <option value="03">03</option>
        <option value="04">04</option>
        <option value="05">05</option>
        <option value="06">06</option>
        <option value="07">07</option>
        <option value="08">08</option>
        <option value="09">09</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        </select>
        <?php echo "$lang_minutes"; ?>
        <br /><br />
<!-- EXPIRY DATE -->
        <? echo "<strong>$lang_expirydate</strong>"; ?><br />
		<select name="expiryday" type="text" id="expiryday"> 
		<option value=""></option>
		<option value="01">01</option>
		<option value="02">02</option>
		<option value="03">03</option>
		<option value="04">04</option>
		<option value="05">05</option>
		<option value="06">06</option>
		<option value="07">07</option>
		<option value="08">08</option>
		<option value="09">09</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		<option value="13">13</option>
		<option value="14">14</option>
		<option value="15">15</option>
		<option value="16">16</option>
		<option value="17">17</option>
		<option value="18">18</option>
		<option value="19">19</option>
		<option value="20">20</option>
		<option value="21">21</option>
		<option value="22">22</option>
		<option value="23">23</option>
		<option value="24">24</option>
		<option value="25">25</option>
		<option value="26">26</option>
		<option value="27">27</option>
		<option value="28">28</option>
		<option value="29">29</option>
		<option value="30">30</option>
		<option value="31">31</option>
		</select>
		<select name="expirymonth" type="text" id="expirymonth">
		<option value=""></option>
		<option value="01">01</option>
		<option value="02">02</option>
		<option value="03">03</option>
		<option value="04">04</option>
		<option value="05">05</option>
		<option value="06">06</option>
		<option value="07">07</option>
		<option value="08">08</option>
		<option value="09">09</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		</select>
		<select name="expiryyear" type="text" id="expiryyear">
		<option value=""></option>
		<option value="2008">2008</option>
		<option value="2009">2009</option>
		<option value="2010">2010</option>
		<option value="2011">2011</option>
		<option value="2012">2012</option>
		<option value="2013">2013</option>
		<option value="2014">2014</option>
		<option value="2015">2015</option>
		<option value="2016">2016</option>
		<option value="2017">2017</option>
		<option value="2018">2018</option>
		</select>
		<?php echo "&nbsp;&nbsp;"; ?>
        <select name="expiryhour" type="text" id="expiryhour">
		<option value=""></option>
        <option value="00">00</option>
        <option value="01">01</option>
        <option value="02">02</option>
        <option value="03">03</option>
        <option value="04">04</option>
        <option value="05">05</option>
        <option value="06">06</option>
        <option value="07">07</option>
        <option value="08">08</option>
        <option value="09">09</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        </select>
        <?php echo "$lang_hour&nbsp;&nbsp;"; ?>
        <select name="expiryminute" type="text" id="expiryminute">
		<option value=""></option>
        <option value="00">00</option>
        <option value="01">01</option>
        <option value="02">02</option>
        <option value="03">03</option>
        <option value="04">04</option>
        <option value="05">05</option>
        <option value="06">06</option>
        <option value="07">07</option>
        <option value="08">08</option>
        <option value="09">09</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        </select>
        <?php echo "$lang_minutes"; ?>
        <br />
      </fieldset>
      </div></td>
    </tr>
	<!--  END add tablecell for publication dates    FMH  -->





    <tr>
      <td valign="top" class="title">&nbsp;</td>
    </tr>
    <tr>
      <td valign="top"><fieldset id="titlediv">
        <legend><?php echo "$lang_text"; ?></legend>
        <?php
		  // present safari users with a different editor or if tiny_mce has been disabled in the settings-panel
		  $a_browser_data = browser_detection('full');
if ( $a_browser_data[0] == 'saf' || !$settings[use_tinymce])
{
?>
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="34%" class="title">&nbsp;</td>
            <td width="66%"><input type="button" class="button" value="<?php echo "$lang_bold"; ?>" name="bold2" onmousedown="javascript:tag_construct('bold','text'); return false;"/>
                <input type="button" class="button" value="<?php echo "$lang_italic"; ?>" name="italic2" onmousedown="javascript:tag_construct('italic','text'); return false;"/>
                <input type="button" class="button" value="<?php echo "$lang_underline"; ?>" name="underline2" onmousedown="javascript:tag_construct('underline','text'); return false;"/>
                <input type="button" class="button" value="<?php echo "$lang_url"; ?>" name="url2" onmousedown="javascript:tag_construct('link','text'); return false;"/>
              <input type="button" class="button" value="<?php echo "$lang_img"; ?>" name="img2" onmousedown="javascript:tag_construct('image','text'); return false;"/>     
			  <input type="button" class="button" value="<?php echo "$lang_email"; ?>" name="email2" onmousedown="javascript:tag_construct('email','text'); return false;"/>
	          </td>
          </tr>
        </table>
        <?			  
}

?>
        <textarea rows="20" cols="75" name="text"><?php echo "$_POST[text]"; ?></textarea>
      </fieldset></td>
    </tr>
    <tr>
      <td><a name="extended" id="extended"></a>
          <div class="text" onclick="expandcontent(this, 'sc2')" style="cursor:hand; cursor:pointer">
            <div align="right"> <a href="#extended"><span class="showstate"></span><?php echo "$lang_options"; ?></a></div>
          </div>
        <div id="sc2" class="switchcontent">
            <fieldset id="titlediv">
            <legend><?php echo "$lang_extended"; ?></legend>
              <?php
		  // present safari users with a different editor
		  $a_browser_data = browser_detection('full');
if ( $a_browser_data[0] == 'saf' || !$settings[use_tinymce])
{
?>
            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="34%" class="title">&nbsp;</td>
                <td width="66%"><input type="button" class="button" value="<?php echo "$lang_bold"; ?>" name="bold" onmousedown="javascript:tag_construct('bold','extended'); return false;"/>
                    <input type="button" class="button" value="<?php echo "$lang_italic"; ?>" name="italic" onmousedown="javascript:tag_construct('italic','extended'); return false;"/>
                    <input type="button" class="button" value="<?php echo "$lang_underline"; ?>" name="underline" onmousedown="javascript:tag_construct('underline','extended'); return false;"/>
                    <input type="button" class="button" value="<?php echo "$lang_url"; ?>" name="url" onmousedown="javascript:tag_construct('link','extended'); return false;"/>
                    <input type="button" class="button" value="<?php echo "$lang_img"; ?>" name="img" onmousedown="javascript:tag_construct('image','extended'); return false;"/>        
					<input type="button" class="button" value="<?php echo "$lang_email"; ?>" name="email" onmousedown="javascript:tag_construct('email','text'); return false;"/>
		        </td>
              </tr>
            </table>
              <?			  
}

?>
              <textarea name="extended" cols="75" rows="20" id="extended"><?php echo "$_POST[extended]"; ?></textarea>
            </fieldset>
        </div></td>
    </tr>
	 </table>
     
     
<?php include("file_manager_include.php"); ?>
          

      
</td>
  </tr>
</table>
    
  </fieldset>
    </div>

  <?php
	$hook = 'newentry-field-extended';
	include("loadplugins.php");
	?>
 
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text"> 
    <tr>
      
    
    <?php if($settings[use_upload]){ ?>
	<tr>
      <td>
      
      <fieldset id="titlediv">
        <legend><?php echo "$lang_upload_img_file"; ?></legend>
        
        	<?php
   			if (!is_writable("../upload/")){
			echo "$lang_set_permissions";
			}
			else
			{
			
			?>
        	<input id="my_file_element" type="file" value="1" name="file_1" \ />
       	  <div id="files_list"></div>
<script>
	<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
	var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 20 );
	<!-- Pass in the file element -->
	multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>

<?php } ?>
      </fieldset></td>
    </tr>
	
	
    <tr>
      <td>
      <div class="text" onclick="expandcontent(this, 'sc3')" style="cursor:hand; cursor:pointer">
          <div align="right"><a name="upload" id="upload"></a><a href="#upload"><span class="showstate"></span><?php echo "$lang_options"; ?></a></div>
      </div>
          <div id="sc3" class="switchcontent">
            <p>
	        <table width="100%" style='border: #CCCCCC solid; border-width: 5px 1px 1px 1px; padding: 5px 5px 5px 5px;'>
              <tr>
                <td width="18%">
			<?php echo "$lang_jpeg_gif"; ?></td>
                <td width="27%"><input name="thumbnail" type="checkbox" value="1" checked="checked" /> 
        <?php echo "$lang_thumbnails"; ?></td>
			<td width="55%"><?php echo "$lang_mediafile"; ?></td>
              </tr>
              <tr>
                <td><?php echo "$lang_mp3_mov"; ?></td>
                <td><input name="podcast" type="checkbox" id="podcast" value="1" checked="checked" />
                    <?php echo "$lang_podcast"; ?></td>
                <td><input name="media_url" type="text" size="25" />
                    <select name="type">
                      <option value="audio/mp3" selected="selected">Mp3</option>
                      <option value="video/quicktime">Quicktime</option>
                      <option value="video/x-ms-wmv">Windows media</option>
                      <option value="video/youtube">YouTube Movie</option>
                  </select></td>
              </tr>
		      <tr>
		        <td colspan="3"><?php echo "$lang_embed_code"; ?></td>
	          </tr>
		      <tr>
		        <td colspan="3">
  <input name="embed" type="text" size="70" /></td>
	          </tr>
	        </table>
            </p>
        </div></td>
    </tr>
	 </table>

  <?php
	$hook = 'newentry-field-upload';
	include("loadplugins.php");
	?>
 
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text"> 
    <tr>
      <td>&nbsp;</td>
    </tr>
	
    <?php
}
  if($settings[categories]){
  ?>
    <tr>
      <td><fieldset id="titlediv">
        <legend><?php echo "$lang_category"; ?></legend>
        <select name="catid" size="1"
 onchange="setOptions(document.myform.catid.options[document.myform.catid.selectedIndex].value);">
          <option value="0" selected="selected"><?php echo "$lang_choosemaincat"; ?></option>
          <?php
$categories = loadCat($link,$table_cat);
foreach ($categories as $cat){

echo '<option value="'.$cat["id"].'">'.$cat["name"].'</option>';
}
?>
        </select>


      </fieldset></td>
    </tr>
<?php
}
?>
    <tr>
      <td>&nbsp;</td>
    </tr>
	<tr>
	<td>
	<?php
	$hook = 'newentry-field';
	include("loadplugins.php");
	?>
	</td>
	</tr>
    <tr>
      <td><input type="submit" name="Submit" value="<?php echo "$lang_submit"; ?>" id="button" /></td>
    </tr>
  </table>
  </form>
</div>




<?php
include ("footer.php");
?>
Return current item: ZompLog