Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function addTag(i) {
- document.getElementById('PostTag').value = document.getElementById('PostTag').value + i.innerHTML + ' ';
- }
- </script>
- <style type="text/css">
- input[type=text], input[type=file],textarea {
- width: 60%;
- }
- </style>
- <div class="imagediv" id="addform">
- <?php echo $form->create('Post',array('url'=>array('controller'=>'front','action'=>'add'),'type'=>'file'));
- if(!$session->check('step2')):
- if($session->check('img') and !$session->check('step2')):
- ?>
- <img style="margin: 0 132px 30px;" src="<?php echo $dir; ?>pic/sess/<?php echo $session->read('img').'-1'.$session->read('hash').'.jpg'; ?>" />
- <?php elseif(!$session->check('img') and !$session->check('step2')): ?>
- <?php echo $form->input('Post.img',array('type'=>'file','label'=>'Obrazek','size'=>48)); ?>
- <?php endif; ?>
- <?php
- echo $form->input('Post.title',array('label'=>'Tytuł','onmouseover'=>'this.focus();'));
- echo $form->input('Post.body',array('type'=>'textarea','label'=>'Opis','onmouseover'=>'this.focus();'));
- ?>
- <div class="submit">
- <?php if($session->check('img') and !$session->check('step2')): ?><input type="submit" name="data[Post][cancel1]" value="Wyczyść" /><?php endif; ?><input type="submit" name="submit" value="Dalej »" />
- </div>
- </form>
- <?php
- else:
- ?>
- <img src="<?php $dir; ?>pic/sess/<?php echo $session->read('img').'-2'.$session->read('hash').'.jpg'; ?>" />
- <?php
- $tags = $this->requestAction('front/randomTagCloud');
- $tagCloud = $tag->create($tags);
- $tagCloud = $tag->shuffleTags($tagCloud);
- $cloud = null;
- foreach($tagCloud as $tagName=>$tagValue) {
- $cloud .=
- "<a href='#' onClick='addTag(this); return false;' style='font-size:".$tagValue['size']."%; cursor: pointer;' title='".$tagName."'>".$tagName."</a> ";
- }
- ($tags == false) ? $after = null: $after = '<br /><br />'.$cloud;
- echo $form->input('Post.tag',array('label'=>'Tagi','between'=>'(rozdzielaj spacjami)<br />','after'=>$after, 'onmouseover'=>'this.focus();'));
- ?>
- <div class="submit">
- <input type="submit" name="data[Post][cancel2]" value="« Popraw" /><input type="submit" name="submit" value="Dodaj »" />
- </div>
- </form>
- <?php
- endif;
- $cloud;
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment