Guest User

Untitled

a guest
Feb 26th, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. <script type="text/javascript">
  2. function addTag(i) {
  3. document.getElementById('PostTag').value = document.getElementById('PostTag').value + i.innerHTML + ' ';
  4. }
  5. </script>
  6. <style type="text/css">
  7. input[type=text], input[type=file],textarea {
  8. width: 60%;
  9. }
  10. </style>
  11.  
  12. <div class="imagediv" id="addform">
  13. <?php echo $form->create('Post',array('url'=>array('controller'=>'front','action'=>'add'),'type'=>'file'));
  14. if(!$session->check('step2')):
  15. if($session->check('img') and !$session->check('step2')):
  16. ?>
  17. <img style="margin: 0 132px 30px;" src="<?php echo $dir; ?>pic/sess/<?php echo $session->read('img').'-1'.$session->read('hash').'.jpg'; ?>" />
  18. <?php elseif(!$session->check('img') and !$session->check('step2')): ?>
  19. <?php echo $form->input('Post.img',array('type'=>'file','label'=>'Obrazek','size'=>48)); ?>
  20. <?php endif; ?>
  21. <?php
  22. echo $form->input('Post.title',array('label'=>'Tytuł','onmouseover'=>'this.focus();'));
  23. echo $form->input('Post.body',array('type'=>'textarea','label'=>'Opis','onmouseover'=>'this.focus();'));
  24. ?>
  25. <div class="submit">
  26. <?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 »" />
  27. </div>
  28. </form>
  29. <?php
  30. else:
  31. ?>
  32. <img src="<?php $dir; ?>pic/sess/<?php echo $session->read('img').'-2'.$session->read('hash').'.jpg'; ?>" />
  33. <?php
  34. $tags = $this->requestAction('front/randomTagCloud');
  35. $tagCloud = $tag->create($tags);
  36. $tagCloud = $tag->shuffleTags($tagCloud);
  37. $cloud = null;
  38.  
  39. foreach($tagCloud as $tagName=>$tagValue) {
  40. $cloud .=
  41. "<a href='#' onClick='addTag(this); return false;' style='font-size:".$tagValue['size']."%; cursor: pointer;' title='".$tagName."'>".$tagName."</a> ";
  42. }
  43. ($tags == false) ? $after = null: $after = '<br /><br />'.$cloud;
  44. echo $form->input('Post.tag',array('label'=>'Tagi','between'=>'(rozdzielaj spacjami)<br />','after'=>$after, 'onmouseover'=>'this.focus();'));
  45. ?>
  46. <div class="submit">
  47. <input type="submit" name="data[Post][cancel2]" value="« Popraw" /><input type="submit" name="submit" value="Dodaj »" />
  48. </div>
  49. </form>
  50. <?php
  51. endif;
  52. $cloud;
  53. ?>
  54.  
  55. </div>
Advertisement
Add Comment
Please, Sign In to add comment