like.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: like.php 25510 2011-11-14 02:22:26Z yexinhao $
  7. */
  8. define('IN_API', true);
  9. define('CURSCRIPT', 'api');
  10. require_once '../../source/class/class_core.php';
  11. $cachelist = array();
  12. $discuz = C::app();
  13. $discuz->init_setting = true;
  14. $discuz->init();
  15. $body = '';
  16. $style = 'body { background: transparent; color: '.$_G['style']['tabletext'].'; font: '.$_G['style']['fontsize'].' '.$_G['style']['font'].'; margin:0; }'.
  17. 'a { color: '.$_G['style']['link'].'; text-decoration: none; } a:hover { text-decoration: underline; }';
  18. if($_G['setting']['connect']['like_allow'] && $_G['setting']['connect']['like_url']) {
  19. $style .= '#txQZ { border: medium none; float: left; height:21px; margin-top: 4px; overflow: hidden; width: 110px; }'.
  20. '.vm { vertical-align: middle; }';
  21. $body .= '<iframe id="txQZ" src="'.$_G['setting']['connect']['like_url'].'" class="vm" allowtransparency="true" scrolling="no" border="0" frameborder="0"></iframe>';
  22. }
  23. if($_G['setting']['connect']['turl_allow'] && $_G['setting']['connect']['turl_code']) {
  24. $style .= '#txWB_W1 { background: url("../../static/image/common/weibo.png") no-repeat scroll 0 50% transparent; float: left; line-height: 28px; padding: 0 5px 0 20px; }'.
  25. '#txWB_W1 img { display: none; }'.
  26. '#txWB_W1 b { font-weight: 400; }'.
  27. '#txWB_W1 a { color: '.$_G['style']['highlightlink'].'; }';
  28. $body .= $_G['setting']['connect']['turl_code'];
  29. }
  30. if($style && $body) {
  31. echo '<style>'.$style.'</style><body>'.$body.'</body>';
  32. }