Advertisement
Guest User

myphpheader

a guest
Jul 28th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.20 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.  
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" debug="true">
  5. <head profile="http://gmpg.org/xfn/11">
  6.  
  7.  
  8. <title>
  9.  
  10. <?php
  11. //wp_deregister_script( 'jquery' );
  12. if($_REQUEST['ptype'] !=''){
  13. bloginfo('name'); ?>&nbsp;|&nbsp
  14. <?php echo $_REQUEST['ptype'];
  15. }
  16. ?>
  17.  
  18. <?php if ( is_home() && $_REQUEST['ptype']=='') {?>
  19. <?php wp_title(''); ?>
  20. <?php bloginfo('name'); ?>
  21. <?php }else if ( is_search() ) { ?>
  22. Search Results&nbsp;|&nbsp;
  23. <?php bloginfo('name'); ?>
  24. <?php }else if ( is_author() ) { ?>
  25. Author Archives&nbsp;|&nbsp;
  26. <?php bloginfo('name'); ?>
  27. <?php }else if ( is_single() ) { ?>
  28. <?php wp_title(''); ?>
  29. <?php }else if ( is_page() ) { ?>
  30. <?php wp_title(''); ?>
  31. <?php }else if ( is_category() ) { ?>
  32. <?php single_cat_title(); ?>
  33. &nbsp;|&nbsp;
  34. <?php bloginfo('name'); ?>
  35. <?php }else if ( is_tax() ) { ?>
  36. <?php single_cat_title(); ?>
  37. &nbsp;|&nbsp;
  38. <?php bloginfo('name'); ?>
  39. <?php }else if ( is_month() ) { ?>
  40. <?php the_time('F'); ?>
  41. &nbsp;|&nbsp;
  42. <?php bloginfo('name'); ?>
  43. <?php }else if ( is_tag() ) {?>
  44. <?php bloginfo('name'); ?>
  45. &nbsp;|&nbsp;Tag Archive&nbsp;|&nbsp;
  46. <?php single_tag_title("", true);
  47. }else {
  48. _e("Shop","templatic");
  49. }
  50. ?>
  51. </title>
  52.  
  53. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>;
  54.  
  55. charset=<?php bloginfo('charset'); ?>" />
  56. <?php if (is_home()) { ?>
  57. <?php if ( get_option('ptthemes_meta_description') <> "" ) { ?>
  58. <meta name="description" content="<?php echo
  59.  
  60. stripslashes(get_option('ptthemes_meta_description')); ?>" />
  61. <?php } ?>
  62. <?php if ( get_option('ptthemes_meta_keywords') <> "" ) { ?>
  63. <meta name="keywords" content="<?php echo
  64.  
  65. stripslashes(get_option('ptthemes_meta_keywords')); ?>" />
  66. <?php } ?>
  67. <?php if ( get_option('ptthemes_meta_author') <> "" ) { ?>
  68. <meta name="author" content="<?php echo
  69.  
  70. stripslashes(get_option('ptthemes_meta_author')); ?>" />
  71. <?php } ?>
  72. <?php } ?>
  73. <META HTTP-EQUIV="Expires" CONTENT="0">
  74. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  75. <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
  76.  
  77. <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/library/css/print.css" media="print" />
  78.  
  79. <link rel="stylesheet" type="text/css" href="http://www.mrcpromotions.com/wp-content/themes/framework/fonts1/stylesheet.css"/>
  80. <?php
  81. if(is_enable_woocommerce() &&
  82.  
  83. is_plugin_active('woocommerce/woocommerce.php')){?>
  84. <link href="<?php bloginfo('stylesheet_directory');
  85.  
  86. ?>/woocommerce.css" rel="stylesheet" type="text/css" />
  87. <?php }else{
  88. ?><link rel="stylesheet" type="text/css" href="<?php
  89.  
  90. bloginfo('template_directory'); ?>/library/js/zoom/jquery.fancybox-1.2.6.css" />
  91. <?php } if(!is_enable_woocommerce()){ ?>
  92. <script type="text/javascript" src="<?php bloginfo('template_directory');
  93.  
  94. ?>/library/js/modernizr.js"></script>
  95. <script type="text/javascript" src="<?php bloginfo('template_directory');
  96.  
  97. ?>/library/js/jquery-1.3.2.min.js"></script>
  98. <?php } ?>
  99. <link href="<?php bloginfo('template_directory'); ?>/library/css/common.css"
  100.  
  101. rel="stylesheet" type="text/css" />
  102.  
  103. <?php if ( get_option('ptthemes_favicon') <> "" ) { ?>
  104. <link rel="icon" type="image/png" href="<?php echo get_option('ptthemes_favicon');
  105.  
  106. ?>" />
  107. <?php } ?>
  108. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if (
  109.  
  110. get_option('ptthemes_feed_url') <> "" ) { echo get_option('ptthemes_feed_url'); }
  111.  
  112. else { echo get_bloginfo_rss('rss2_url'); } ?>" />
  113. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  114.  
  115.  
  116. <!--[if lt IE 7]>
  117. <script type="text/javascript" src="<?php bloginfo('template_directory');
  118.  
  119. ?>/library/js/pngfix.js"></script>
  120. <![endif]-->
  121. <?php if ( get_option('ptthemes_scripts_header') <> "" ) { echo
  122.  
  123. stripslashes(get_option('ptthemes_scripts_header')); } ?>
  124. <!-- For Menu -->
  125. <?php if(function_exists('wp_enable_cufon_font')){wp_enable_cufon_font();}?>
  126.  
  127. <?php
  128. if ( is_singular() && get_option( 'thread_comments' ) )
  129. wp_enqueue_script( 'comment-reply' );
  130. ?>
  131. <?php do_action('templ_head_css');?>
  132. <?php wp_head(); ?>
  133.  
  134. <?php if ( get_option('ptthemes_customcss') ) { ?>
  135. <?php if(CHILDTEMPLATEPATH && file_exists(CHILDTEMPLATEPATH . '/custom.css')) {
  136.  
  137. ?>
  138. <link href="<?php bloginfo('stylesheet_directory'); ?>/custom.css"
  139.  
  140. rel="stylesheet" type="text/css" />
  141. <?php } else { ?>
  142. <link href="<?php bloginfo('template_directory'); ?>/custom.css"
  143.  
  144. rel="stylesheet" type="text/css" />
  145. <?php }?>
  146. <?php }
  147. $image_width = get_option('ptthemes_image_width');
  148. $image_height = get_option('ptthemes_image_height');
  149. global $thumb_style;
  150. if($thumb_style=='')
  151. {
  152. $li_height = $image_height+50;
  153.  
  154. if(get_option('ptthemes_prdlsthomeimage_border')
  155.  
  156. == true){ $is_image_border = 1;
  157. echo $thumb_style = '<style
  158.  
  159. type="text/css">#content ul.thumb_view li { height:'.$li_height.'px;
  160.  
  161. width:'.($image_width+2).'px;}</style>';
  162. }else{
  163. echo $thumb_style = '<style
  164.  
  165. type="text/css">#content ul.thumb_view li { height:'.$li_height.'px;
  166.  
  167. width:'.($image_width).'px;}</style>';
  168. }
  169. }
  170. if($_REQUEST['checkout_as_guest']==1 && !is_enable_woocommerce()){
  171. ?>
  172. <script type="text/javascript">
  173. function setCost(pMethod,tamount){
  174.  
  175. if(document.getElementById('copybilladd').checked == true &&
  176.  
  177. document.getElementById('user_country').value ==
  178.  
  179. document.getElementById('buser_country').value){
  180. var bucountry = document.getElementById('user_country').value;
  181. var bstate = document.getElementById('user_state').value;
  182. var buser_postalcode = document.getElementById('user_postalcode').value;
  183. }else if(document.getElementById('copybilladd').checked == true && bucountry !=
  184.  
  185. document.getElementById('buser_country').value){
  186. var bucountry = document.getElementById('buser_country').value;
  187. var bstate = document.getElementById('buser_state').value;
  188. var buser_postalcode = document.getElementById('buser_postalcode').value;
  189. }else{
  190. var bucountry = document.getElementById('buser_country').value;
  191. var bstate = document.getElementById('buser_state').value;
  192. var buser_postalcode = document.getElementById('buser_postalcode').value;
  193. xmlhttp=new XMLHttpRequest();
  194. }
  195. if(document.getElementById('user_country').value == '' || bstate == ''){
  196. //alert('Please eneter billing details');
  197. }else{
  198.  
  199. if (window.XMLHttpRequest)
  200. {// code for IE7+, Firefox, Chrome, Opera, Safari
  201. xmlhttp=new XMLHttpRequest();
  202. }else
  203. {// code for IE6, IE5
  204. xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  205. }
  206. xmlhttp.onreadystatechange=function()
  207. {
  208. if (xmlhttp.readyState==4 && xmlhttp.status==200)
  209. {
  210. var response_text =xmlhttp.responseText;
  211. var results = response_text.split(';');
  212. var cur_pos = "<?php echo get_option('currencysym_pos'); ?>";
  213. if(results[0] >0){
  214. if(document.getElementById('tprice')){
  215. var total_price =
  216.  
  217. parseFloat(tamount)+parseFloat(results[0]);
  218. var cur_pos = "<?php echo get_option('currencysym_pos');
  219.  
  220. ?>";
  221. if(cur_pos == 'before'){
  222. document.getElementById('tprice').innerHTML = "<strong
  223.  
  224. ><?php echo get_option('currencysym'); ?>"+results[0]+"</strong>";
  225. document.getElementById('total_price').innerHTML
  226.  
  227. ="<strong id='final_amount1'><?php echo get_option('currencysym');
  228.  
  229. ?>"+results[2]+"</strong>";
  230. }else if(cur_pos == none){
  231. document.getElementById('tprice').innerHTML =
  232.  
  233. "<strong>"+results[0]+"</strong>";
  234. document.getElementById('total_price').innerHTML
  235.  
  236. ="<strong id='final_amount1'>"+results[2]+"</strong>";
  237. }else{
  238. document.getElementById('tprice').innerHTML =
  239.  
  240. "<strong>"+results[0]+"<?php echo get_option('currencysym'); ?></strong>";
  241. document.getElementById('total_price').innerHTML
  242.  
  243. ="<strong id='final_amount1'>"+results[2]+"<?php echo get_option('currencysym');
  244.  
  245. ?></strong>";
  246. }
  247. /* var input = document.createElement("input");
  248. input.setAttribute("type", "hidden");
  249. input.setAttribute("name", "weight_price");
  250. input.setAttribute("value", results[0]);
  251.  
  252.  
  253. document.getElementById("checkout_frm").appendChild(input); */
  254. }else{
  255. var table = document.getElementById('tmpl_order_info');
  256. var rowCount = table.rows.length;
  257. var row = table.insertRow(rowCount-1);
  258. var cell1 = row.insertCell(0);
  259. cell1.colSpan = "4";
  260. cell1.align = "right";
  261. cell1.setAttribute("class", 'row1');
  262. cell1.innerHTML = "Shipping cost :";
  263. var cell2 = row.insertCell(1);
  264. cell2.setAttribute('id','tprice');
  265. cell2.setAttribute("class", 'row1 tprice');
  266. cell2.innerHTML = "&nbsp;<?php echo
  267.  
  268. get_option('currencysym'); ?>"+results[0];
  269.  
  270. var total_price = results[2];
  271. var cur_pos = "<?php echo get_option('currencysym_pos');
  272.  
  273. ?>";
  274. if(cur_pos == 'before'){
  275. //document.getElementById('total_price').innerHTML
  276.  
  277. ="<strong><?php echo get_option('currencysym'); ?>"+total_price+"</strong>";
  278. }else if(cur_pos == none){
  279.  
  280. document.getElementById('total_price').innerHTML
  281.  
  282. ="<strong id='final_amount1'>"+total_price+"</strong>";
  283. }else{
  284.  
  285. document.getElementById('total_price').innerHTML
  286.  
  287. ="<strong id='final_amount1'>"+total_price+"<?php echo get_option('currencysym');
  288.  
  289. ?></strong>";
  290. }
  291. }
  292. }else{
  293. var total_price2 = results[2];
  294. if(document.getElementById('tprice')){
  295. var table =
  296.  
  297. document.getElementById('tmpl_order_info');
  298. var rowCount = table.rows.length;
  299. if(document.getElementById('tax_price')){
  300. var row = table.deleteRow(rowCount-3);
  301. }else{
  302. var row = table.deleteRow(rowCount-2);
  303. }
  304. }
  305. if(cur_pos == 'before'){
  306.  
  307. document.getElementById('total_price').innerHTML
  308.  
  309. ="<strong id='final_amount1'><?php echo get_option('currencysym');
  310.  
  311. ?>"+total_price2+"</strong>";
  312. }else if(cur_pos == none){
  313.  
  314. document.getElementById('total_price').innerHTML
  315.  
  316. ="<strong id='final_amount1'>"+total_pric2+"</strong>";
  317. }else{
  318.  
  319. document.getElementById('total_price').innerHTML
  320.  
  321. ="<strong id='final_amount1'>"+total_price2+"<?php echo get_option('currencysym');
  322.  
  323. ?></strong>";
  324. }
  325. }
  326.  
  327. if(results[1] >0){
  328. if(document.getElementById('tax_price')){
  329. var total_price = results[2];
  330. var cur_pos = "<?php echo get_option('currencysym_pos');
  331.  
  332. ?>";
  333. if(cur_pos == 'before'){
  334. document.getElementById('tax_price').innerHTML =
  335.  
  336. "<strong><?php echo get_option('currencysym'); ?>"+results[1]+"</strong>";
  337. document.getElementById('total_price').innerHTML
  338.  
  339. ="<strong id='final_amount1'><?php echo get_option('currencysym');
  340.  
  341. ?>"+total_price+"</strong>";
  342. }else if(cur_pos == none){
  343. document.getElementById('tax_price').innerHTML =
  344.  
  345. "<strong>"+results[1]+"</strong>";
  346. document.getElementById('total_price').innerHTML
  347.  
  348. ="<strong id='final_amount1'>"+total_price+"</strong>";
  349. }else{
  350. document.getElementById('tax_price').innerHTML =
  351.  
  352. "<strong>"+results[1]+"<?php echo get_option('currencysym'); ?></strong>";
  353. document.getElementById('total_price').innerHTML
  354.  
  355. ="<strong id='final_amount1'>"+total_price+"<?php echo get_option('currencysym');
  356.  
  357. ?></strong>";
  358. }
  359. }else{
  360. var table = document.getElementById('tmpl_order_info');
  361. var rowCount = table.rows.length;
  362. var row = table.insertRow(rowCount-1);
  363. var cell1 = row.insertCell(0);
  364. cell1.setAttribute("class", 'row1');
  365. cell1.colSpan = "4";
  366. cell1.align = "right";
  367.  
  368.  
  369. if(isNaN(results[1]))
  370. {
  371. var tax_html = results[1].split(':');
  372. cell1.innerHTML = tax_html[0] +":";
  373. }
  374. else
  375. {
  376. cell1.innerHTML = "Tax amount :";
  377. }
  378. var cell2 = row.insertCell(1);
  379. cell2.setAttribute('id','tax_price');
  380. cell2.setAttribute("class", 'row1 tprice');
  381. if(isNaN(results[1]))
  382. {
  383. var tax_html = results[1].split(':');
  384. cell2.innerHTML = "<?php echo
  385.  
  386. get_option('currencysym'); ?>"+tax_html[1];
  387. }
  388. else
  389. {
  390. cell2.innerHTML = "<?php echo
  391.  
  392. get_option('currencysym'); ?>"+results[1];
  393. }
  394.  
  395. var total_price = results[2];
  396.  
  397. if(cur_pos == 'before'){
  398.  
  399. document.getElementById('total_price').innerHTML
  400.  
  401. ="<strong id='final_amount1'><?php echo get_option('currencysym');
  402.  
  403. ?>"+total_price+"</strong>";
  404. }else if(cur_pos == none){
  405.  
  406. document.getElementById('total_price').innerHTML
  407.  
  408. ="<strong id='final_amount1'>"+total_price+"</strong>";
  409. }else{
  410.  
  411. document.getElementById('total_price').innerHTML
  412.  
  413. ="<strong id='final_amount1'>"+total_price+"<?php echo get_option('currencysym');
  414.  
  415. ?></strong>";
  416. }
  417. }
  418. }else{
  419. var total_price1 = results[2];
  420. if(document.getElementById('tax_price')){
  421. var table = document.getElementById('tmpl_order_info');
  422. var rowCount = table.rows.length;
  423. var row = table.deleteRow(rowCount-2);
  424. }
  425. if(cur_pos == 'before'){
  426.  
  427. document.getElementById('total_price').innerHTML
  428.  
  429. ="<strong id='final_amount1'><?php echo get_option('currencysym');
  430.  
  431. ?>"+total_price1+"</strong>";
  432. }else if(cur_pos == none){
  433.  
  434. document.getElementById('total_price').innerHTML
  435.  
  436. ="<strong id='final_amount1'>"+total_price1+"</strong>";
  437. }else{
  438.  
  439. document.getElementById('total_price').innerHTML
  440.  
  441. ="<strong id='final_amount1'>"+total_price1+"<?php echo get_option('currencysym');
  442.  
  443. ?></strong>";
  444. }
  445. }
  446. if(results[3]!= ''){
  447. jQuery('#guest_checout_user').append(results[3]);
  448. }
  449. }
  450. }
  451. }
  452. url = "<?php echo get_template_directory_uri();
  453.  
  454. ?>/library/includes/ajax_guest_cart_calculation.php?country="+bucountry+"&bstate="
  455.  
  456. +bstate+"&buser_postalcode="+buser_postalcode;
  457. xmlhttp.open("GET",url,true);
  458. xmlhttp.send();
  459. }
  460.  
  461. </script>
  462. <?php } ?>
  463. <?php
  464. if (is_singular() && !is_page())
  465. {
  466. facebook_meta_tags($post);
  467. }
  468. ?>
  469. </head>
  470. <body>
  471. <?php
  472.  
  473. global $General,$Cart,$Product,$themeUI;
  474. $userInfo = $General->getLoginUserInfo();
  475.  
  476. if(CHILDTEMPLATEPATH && file_exists(CHILDTEMPLATEPATH . '/header_page.php'))
  477. {
  478. include(CHILDTEMPLATEPATH . '/header_page.php');
  479. }else
  480. {
  481. include(TEMPLATEPATH . '/library/includes/header.php');
  482. }
  483. ?>
  484. <div id="wrapper">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement