Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.89 KB | None | 0 0
  1. <?php echo anchor('admin/packages','Register'); ?>
  2.  
  3. <script type="text/javascript">
  4. $(document).ready(function() {
  5.     <?php
  6.     foreach($templates as $template2): ?>
  7.         $("#various_<?php echo $template2->id; ?>").fancybox({
  8.             'width'             : '75',
  9.             'height'            : '75',
  10.             'autoScale'         : false,
  11.             'transitionIn'      : 'none',
  12.             'transitionOut'     : 'none',
  13.             'type'              : 'ajax'
  14.         });
  15. <?php endforeach; ?>
  16. });
  17. </script>
  18.  
  19. <!-- HTML Codes by Quackit.com -->
  20. <div style="height:400px;width:750px;font:16px/26px Georgia, Garamond, Serif;overflow:scroll;">
  21. <table width="100%">
  22. <?php
  23. $count = 1;
  24. ?>
  25. <?php foreach($templates as $template): ?>
  26. <?php
  27. if($count == 1):
  28.     echo '<tr>';
  29.     endif
  30. ?>
  31.  
  32. <td><?php echo anchor('sign_up/themes/'.$template->id.'','<img src="'.base_url().'assets/images/templates/'.$this->x_template->get_template_default_t_image($template->id).'" border="0" class="classname" record="'.$template->id.'">','id="various_'.$template->id.'" border="0"'); ?><br />
  33. <?php foreach($this->x_template->get_templates_colors($template->id) as $theme): ?>
  34. <?php echo anchor($this->uri->uri_string().'#',$theme->color_theme,'class="classname_'.$theme->id.'" record="'.$theme->id.'"'); ?>
  35. <?php endforeach; ?>
  36. <?php //endforeach; ?>
  37. </td>
  38. <?php
  39. if($count == 3):
  40.     echo '</tr>';
  41.     $count = 1;
  42.     endif;
  43.     $count++;
  44. ?>
  45. <?php endforeach; ?>
  46. </table>
  47. </div>
  48.  
  49. <?php echo form_open('sign_up/step2'); ?>
  50. <input type="text" name="template" id="template" value="" />
  51. <?php echo form_submit('submit', 'Next Step'); ?>
  52. <?php echo form_close(); ?>
  53.  
  54. <script type="text/javascript">
  55. function get_template()
  56. {
  57.    $(".classname_"+record).click(function() {
  58.      var record = $(this).attr("record");
  59.      $("#template").attr('value', record);
  60.      $(this).css("border", "1px solid red");
  61.      alert("theme_"+record);
  62.     // alert(record);
  63.    });
  64. }
  65. $(document).ready(function() {
  66.     get_template();
  67.  });
  68. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement