Advertisement
calendars4u

Untitled

Jun 15th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.19 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link media="screen" title="CSS Stylesheet" rel="stylesheet" href="style.css" type="text/css"/>
  4. <!--
  5. MUST include pixenate's javascript library
  6. -->
  7.  
  8. <script type="text/javascript" src="../../javascript/pxn8_all.js"></script>
  9.  
  10. <!--
  11. CardMaker theme uses the Open-source jQuery javascript library.
  12. For more information on jQuery please go to http://www.jquery.com
  13. -->
  14. <script type="text/javascript" src="3rdparty/jquery-1.1.4.js"></script>
  15. <!--
  16. The database of card information
  17. -->
  18. <script type="text/javascript" src="card_db2.js"></script>
  19. <!--
  20. Theme-specific javascript
  21. -->
  22. <script type="text/javascript" src="cardmaker.js"></script>
  23. <script type="text/javascript">
  24. // ------------------------------------------------------------------------
  25. //
  26. // GLOBAL VARIABLES
  27. //
  28. // ------------------------------------------------------------------------
  29.  
  30. //
  31. // The path (relative to pixenate/ directory) where card images are stored.
  32. // (see fullsize property in card_db.js)
  33. //
  34. gPathToCards = "./themes/cardmaker/";
  35.  
  36. //
  37. // gActiveCard is the filename part of the chosen card thumbnail
  38. // in this theme, the assumption is made that each thumbnail url's
  39. // filename part (e.g. if url is /files/thumbs/x.jpg, the filename part is x.jpg)
  40. // has a matching entry in the gCardDB object (see card_db.js for details)
  41. //
  42.  
  43.  
  44.  
  45.  
  46.  
  47. gActiveCard = "<?php echo $_GET["gActiveCard"] ?>";
  48.  
  49. gPlaceholder = "<?php echo $_GET["gPlaceholder"] ?>";
  50.  
  51. gPlaceholdersFilled = "<?php echo $_GET["gPlaceholdersFilled"] ?>";
  52.  
  53. gCardPath = "<?php echo $_GET["gCardPath"] ?>";
  54.  
  55. gCardURL = "<?php echo $_GET["gCardURL"] ?>";
  56.  
  57. var photo = "<?php echo $_GET["photo"] ?>";
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. //
  69. // the placeholder color is the color of placeholders for cards that
  70. // have more than one photo to superimpose over them
  71. //
  72. gPlaceholderColor = "#CCCCCC";
  73. //
  74. // this variable is used to reduce the card (which can normally be big)
  75. // so it can be displayed in the page when the user is choosing a placeholder
  76. // for their photos (only applicable for cards that have 1+ placeholders).
  77. //
  78. gCardMaxHeight = 200;
  79.  
  80. //
  81. // the maximum display size (zoomed to) to use when in crop mode
  82. // (please note the photo won't actually be resized to this size -
  83. // it's display in the browser.
  84. //
  85. gCropModeMaxPhotoWidth = 340;
  86. gCropModeMaxPhotoHeight = 280;
  87.  
  88. gEditModeMaxPhotoWidth = 400;
  89. gEditModeMaxPhotoHeight = 300;
  90.  
  91. // ------------------------------------------------------------------------
  92. //
  93. // JAVASCRIPT STARTS HERE
  94. // ------------------------------------------------------------------------
  95.  
  96. start_cardmaker(photo,function(){
  97. var card = PXN8.server + PXN8.root + "/" + PXN8.getUncompressedImage();
  98. prompt ("Your card is ready for printing:", card);
  99. });
  100.  
  101. </script>
  102.  
  103.  
  104.  
  105.  
  106. </head>
  107. <body>
  108.  
  109. <br/>
  110. <div id="loading" class="panel">
  111. <h2>Loading. Please wait...</h2>
  112. </div>
  113.  
  114. <div id="products" class="panel" style="display: none;">
  115. <div class="trail"><em>Choose a Product</em> &raquo; Choose an Image &raquo; Edit your Image &raquo; Crop your Image &raquo; Add Text</div>
  116. <h2>Choose a Product</h2>
  117. <ul>
  118. <li><img src="products/calendar.jpg"/></li>
  119. <li><img src="products/mug.jpg"/></li>
  120. <li><img src="products/card.jpg"/></li>
  121. <li><img src="products/t-shirt.jpg"/></li>
  122. </ul>
  123. </div>
  124.  
  125. <div id="cards" class="panel" style="display: none;">
  126. <div class="trail"><em>Choose a Certificate</em> &raquo; Upload an Image &raquo; Edit your Image &raquo; Crop your Image &raquo; Add Text</div>
  127. <h2>Choose a Design for your Certificate</h2>
  128. <ul>
  129. <li><img src="http://www.award-certificates.com/pixenate/themes/cardmaker/cards/thumbnails/good-behavior-award1.jpg"/></li>
  130. <li><img src="http://www.award-certificates.com/pixenate/themes/cardmaker/cards/thumbnails/good-behavior-award2.jpg"/></li>
  131. <li><img src="http://www.award-certificates.com/pixenate/themes/cardmaker/cards/thumbnails/good-behavior-award3.jpg"/></li>
  132. <li><img src="http://www.award-certificates.com/pixenate/themes/cardmaker/cards/thumbnails/good-behavior-award4.jpg"/></li>
  133. <li><img src="http://www.award-certificates.com/pixenate/themes/cardmaker/cards/thumbnails/good-behavior-award5.jpg"/></li>
  134. </ul>
  135. <!-- following is required for overflow: auto to work in IE 6 -->
  136. <br style="clear: both;"/>&nbsp;
  137. </div>
  138.  
  139. <div id="placeholders" class="panel" style="display: none;">
  140. <div class="trail">Choose a Certificate &raquo; <em>Choose a Placeholder</em> &raquo; Upload an Image &raquo; Edit your Image &raquo; Crop your Image &raquo; Add Text</div>
  141. <h2>Choose a Placeholder</h2>
  142. <div id="placeholders_container"></div>
  143. </div>
  144.  
  145. <div id="photos" class="panel" style="display: none;">
  146. <div class="trail">Choose a Certificate &raquo; <em>Upload an Image</em> &raquo; Edit your Image &raquo; Crop your Image &raquo; Add Text</div>
  147. <h2>Upload an Image</h2>
  148. <!--
  149. This theme uses the 'upload.pl' script which is supplied with
  150. Pixenate . You can alternatively use your own upload.php,
  151. upload.asp, or upload.jsp.
  152. Upload.pl will redirect the user back to a page defined in the
  153. 'next_page' parameter.
  154. Any parameter passed into upload.pl with a prefix of _
  155. (underscore) will also be passed back to the redirected page (without the prefix)
  156. For example. the _gActiveCard parameter is passed to upload.pl (upload.pl
  157. does nothing with this parameter - it is only used by the url that
  158. the upload.pl script will redirect to. In the following example the
  159. '_gActiveCard' parameter is passed to the upload.pl - upload.pl removes the
  160. leading _ and passes a 'gActiveCard' parameter to the the redirected url
  161. (specified in the 'next_page' parameter).
  162. -->
  163.  
  164. <form action="/pixenate/upload.pl" method="POST"
  165. enctype="multipart/form-data" onsubmit="on_upload(this)">
  166. <input type="file" name="filename"/>
  167. <input type="hidden" name="next_page" value="/pixenate/themes/cardmaker/index.php"/>
  168. <input type="hidden" name="pxn8_root" value="/pixenate"/>
  169. <input type="hidden" name="image_param_name" value="photo"/>
  170.  
  171. <input type="hidden" name="_gActiveCard" value=""/>
  172. <input type="hidden" name="_gPlaceholder" value=""/>
  173. <input type="hidden" name="_gCardURL" value=""/>
  174. <input type="hidden" name="_gCardPath" value=""/>
  175. <input type="hidden" name="_gPlaceholdersFilled" value=""/>
  176. <input type="submit" value="Upload"/>
  177. </form>
  178. <!--
  179. You should replace the following code which simply shows a
  180. list of static thumbnails, with a list that displays the logged-in
  181. user's photo thumbnails
  182. -->
  183.  
  184. </div>
  185.  
  186. <div id="edit_and_crop" class="panel" style="display: none;">
  187.  
  188. <div id="editor" style="display: none;">
  189. <div class="trail">Choose a Certificate &raquo; Upload an Image &raquo; <em>Edit your Image</em> &raquo; Crop your Image &raquo; Add Text</div>
  190. <h2>Edit your Image</h2>
  191. <ul>
  192. <li><button onclick="PXN8.tools.rotate({angle:90});return false;">Rotate 90&deg;</button></li>
  193. <li><button onclick="PXN8.tools.normalize();return false;">Fix Colors</button></li>
  194. <li><button onclick="PXN8.tools.enhance();return false;">Enhance</button></li>
  195. <li><button onclick="PXN8.tools.sepia('#a28a65');return false;">Sepia</button></li>
  196. <li><button onclick="PXN8.tools.fill_flash();return false;">Fill Flash</button></li>
  197. <li><button onclick="PXN8.tools.undo();return false;">Undo</button></li>
  198. <li><button onclick="PXN8.tools.redo();return false;">Redo</button></li>
  199. <li><button class="next" onclick="mode_crop_photo(); return false;">Next &raquo;</button></li>
  200. </ul>
  201. </div>
  202. <div id="cropper" style="display: none;">
  203. <div class="trail">Choose a Certificate &raquo; Upload an Image &raquo; Edit your Image &raquo; <em>Crop your Image</em> &raquo; Add Text</div>
  204. <h2>Crop your Photo</h2>
  205. <ul>
  206. <li><button onclick="crop_and_overlay();return false;">Crop</button></li>
  207. <li><button onclick="crop_and_overlay();return false;">Next</button></li>
  208. </ul>
  209. </div>
  210. <div id="add_text" style="display: none;">
  211. <div class="trail">Choose a Certificate &raquo; Upload an Image &raquo; Edit your Image &raquo; Crop your Image &raquo; <em>Add Text</em></div>
  212. <h2>Add Text</h2>
  213. <h3>In Box #1 enter the recipient's name</h3>
  214. <h3>In Box #2 enter the name of the award or reason that the recipient is receiving the reward</h3>
  215. <h3>In Box #3 enter the date of presentation</h3>
  216. <h3>In Box #4 enter the presenter's name</h3>
  217. <h4>If you would like to leave any of the fields empty then erase the text in the text box. Once you have printed the certificate you can sign it if you want to add a signature. When you have added your own text click on "add text".</h4>
  218. <ul id="messages"></ul>
  219. <ul>
  220. <li><button onclick="add_message_to_card();return false;">Add Text</button></li>
  221. <li><button onclick="undo_add_message();return false;">Erase Text</button></li>
  222. <li><button onclick="PXN8.save.toDisk();return false;">Download/Save</button></li>
  223.  
  224. </ul>
  225. </div>
  226.  
  227. <div id="pxn8_canvas"></div>
  228.  
  229. <div id="crop_preview_container" style="display:none;">
  230. <div id="crop_preview">
  231. <div id="clipped"></div>
  232. </div>
  233. </div>
  234.  
  235. </div><!-- end of edit_and_crop -->
  236.  
  237. </body>
  238. <!--[if gte IE 5.5000]>
  239. <script type="text/javascript">
  240. gSpanIdToSrc = {};
  241. gGenId = 0;
  242.  
  243. // yuck.
  244. function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
  245. {
  246. for(var i=0; i<document.images.length; i++){
  247. var img = document.images[i];
  248. var imgName = img.src.toUpperCase();
  249. if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){
  250. var imgID = (img.id) ? "id='" + img.id + "' " : "";
  251. if (img.id){
  252. gSpanIdToSrc[img.id] = {src: img.src, width: img.width, height: img.height};
  253. }else{
  254. var id = 'pngHack_' + gGenId++;
  255. gSpanIdToSrc[id] = {src: img.src, width: img.width, height: img.height};
  256. imgID = "id=\"" + id + "\" ";
  257. }
  258.  
  259. var imgClass = (img.className) ? "class='" + img.className + "' " : "";
  260.  
  261. var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
  262. var imgStyle = "display: inline-block; " + img.style.cssText ;
  263. if (img.align == "left"){imgStyle = "float:left;" + imgStyle;}
  264. if (img.align == "right") {imgStyle = "float:right;" + imgStyle;}
  265. if (img.parentElement.href){imgStyle = "cursor:hand;" + imgStyle;}
  266. var strNewHTML = "<span " + imgID + imgClass + imgTitle
  267. + " style=\"width: " + img.width + "px; height: " + img.height + "px; " + imgStyle + ";"
  268. + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
  269. + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" ;
  270. img.outerHTML = strNewHTML;
  271. i = i-1;
  272. }
  273. }
  274. }
  275. window.onload = correctPNG;
  276.  
  277.  
  278. </script>
  279. <![endif]-->
  280. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement