<?php

/**
 *
 * @copyright  2010-2015 izend.org
 * @version    17
 * @link       http://www.izend.org
 */
?>
<?php extract($errors); ?>
<form class="compact" action="" method="post">
<input name="clang" type="hidden" value="<?php echo $clang; ?>" />
<p>
<?php echo $inlanguages; ?>
<span id="node_hidy" class="hidy">+</span>
</p>
<div id="node">
<p>
<input id="node_title" name="node_title" type="text" size="40" maxlength="100" value="<?php echo htmlspecialchars($node_title, ENT_COMPAT, 'UTF-8'); ?>" title="Title" onkeypress="return submitonenter(event, 'node_edit')"/>
<label>URL:</label>
<input id="node_name" name="node_name" type="text" size="40" maxlength="100" value="<?php echo $node_name; ?>" onkeypress="return focusonenter(event, 'node_title')"/>
</p>
<p><label>Abstract:</label></p>
<p>
<textarea name="node_abstract" cols="80" rows="3"><?php echo htmlspecialchars($node_abstract, ENT_COMPAT, 'UTF-8'); ?></textarea>
<br/><span class="grippie btn_edit btn_grippie">===</span>
</p>
<p><label>Cloud:</label></p>
<p>
<textarea name="node_cloud" cols="80" rows="2" ><?php echo htmlspecialchars($node_cloud, ENT_COMPAT, 'UTF-8'); ?></textarea>
<br/><span class="grippie btn_edit btn_grippie">===</span>
</p>
<p><label>Image:</label></p>
<p>
<input name="node_image" type="text" size="40" maxlength="200" value="<?php echo htmlspecialchars($node_image, ENT_COMPAT, 'UTF-8'); ?>" title="File" />
</p>
<fieldset id="node_options">
<legend>Options</legend>
<span class="nowrap"><input id="node_visits" name="node_visits" type="checkbox"<?php if ($node_visits): ?> checked="checked"<?php endif; ?> /><label for="node_visits"><span class="btn_edit btn_visits">visits</span></label></span>
<span class="nowrap"><input id="node_comment" name="node_comment" type="checkbox"<?php if ($node_comment): ?> checked="checked"<?php endif; ?> /><label for="node_comment"><span class="btn_edit btn_comment">comment</span></label></span>
<span class="nowrap"><input id="node_morecomment" name="node_morecomment" type="checkbox"<?php if ($node_morecomment): ?> checked="checked"<?php endif; ?> /><label for="node_morecomment"><span class="btn_edit btn_morecomment">comment+</span></label></span>
<span class="nowrap"><input id="node_vote" name="node_vote" type="checkbox"<?php if ($node_vote): ?> checked="checked"<?php endif; ?> /><label for="node_vote"><span class="btn_edit btn_vote">vote</span></label></span>
<span class="nowrap"><input id="node_morevote" name="node_morevote" type="checkbox"<?php if ($node_morevote): ?> checked="checked"<?php endif; ?> /><label for="node_morevote"><span class="btn_edit btn_morevote">vote+</span></label></span>
<span class="nowrap"><input id="node_ilike" name="node_ilike" type="checkbox"<?php if ($node_ilike): ?> checked="checked"<?php endif; ?> /><label for="node_ilike"><span class="btn_edit btn_ilike">facebook</span></label></span>
<span class="nowrap"><input id="node_tweet" name="node_tweet" type="checkbox"<?php if ($node_tweet): ?> checked="checked"<?php endif; ?> /><label for="node_tweet"><span class="btn_edit btn_tweet">twitter</span></label></span>
<span class="nowrap"><input id="node_plusone" name="node_plusone" type="checkbox"<?php if ($node_plusone): ?> checked="checked"<?php endif; ?> /><label for="node_plusone"><span class="btn_edit btn_plusone">google+</span></label></span>
<span class="nowrap"><input id="node_linkedin" name="node_linkedin" type="checkbox"<?php if ($node_linkedin): ?> checked="checked"<?php endif; ?> /><label for="node_linkedin"><span class="btn_edit btn_linkedin">linkedin</span></label></span>
<span class="nowrap"><input id="node_pinit" name="node_pinit" type="checkbox"<?php if ($node_pinit): ?> checked="checked"<?php endif; ?> /><label for="node_pinit"><span class="btn_edit btn_pinit">pinit</span></label></span>
</fieldset>
<p>
<input class="submit submit_edit" id="node_edit" name="node_edit" type="submit" value="Edit" />
</p>
</div>
</form>
<?php head('javascript', 'jquery.cookie'); ?>
<script type="text/javascript">
if ($.cookie('hidenode') == 1) {
	$('#node').hide();
}
$('#node_hidy').click(function() {
	$('#node').toggle();
	$.cookie('hidenode', $('#node').is(':hidden') ? 1 : 0, { path: '/' });
});
</script>
<?php
$focus=false;
if ($missing_node_name or $bad_node_name) {
	 $focus='#node_name';
}
?>
<?php if ($focus): ?>
<script type="text/javascript">
$(function() {$('<?php echo $focus; ?>').focus();});
</script>
<?php endif; ?>
<?php if ($content_editor): ?>
<h4>Contents</h4>
<?php echo $content_editor; ?>
<?php endif; ?>
