XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
functions.legacy.php
Go to the documentation of this file.
1 <?php
19 defined('XOOPS_ROOT_PATH') or die('Restricted access');
20 
25 // Backward compat for 2.2*
26 function xoops_load_lang_file($name, $module = '', $default = 'english')
27 {
28  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use xoops_loadLanguage() instead");
29  return xoops_loadLanguage($name, $module);
30 }
31 
32 function xoops_refcheck($docheck = 1)
33 {
34  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use xoopsSecurity::checkReferer instead");
35  return $GLOBALS['xoopsSecurity']->checkReferer($docheck);
36 }
37 
38 function xoops_getLinkedUnameFromId($userid)
39 {
40  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use XoopsUserUtility::getUnameFromId() instead");
41  xoops_load("XoopsUserUtility");
42  return XoopsUserUtility::getUnameFromId($userid, false, true);
43 }
44 
45 /*
46  * Function to display banners in all pages
47  */
48 function showbanner()
49 {
50  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use xoops_getbanner instead");
51  echo xoops_getbanner();
52 }
53 
54 /*
55  * This function is deprecated. Do not use!
56  */
57 function getTheme()
58 {
59  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use \$xoopsConfig['theme_set'] directly");
60  return $GLOBALS['xoopsConfig']['theme_set'];
61 }
62 
63 /*
64  * Function to get css file for a certain theme
65  * This function will be deprecated.
66  */
67 function getcss($theme = '')
68 {
69  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use xoops_getcss instead");
70  return xoops_getcss($theme);
71 }
72 
73 function &getMailer()
74 {
75  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated, use xoops_getMailer instead");
76  $mailer =& xoops_getMailer();
77  return $mailer;
78 }
79 
80 /*
81  * Functions to display dhtml loading image box
82  */
83 function OpenWaitBox()
84 {
85  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated");
86  echo "<div id='waitDiv' style='position:absolute;left:40%;top:50%;visibility:hidden;text-align: center;'>
87  <table cellpadding='6' border='2' class='bg2'>
88  <tr>
89  <td align='center'><strong><big>" . _FETCHING . "</big></strong><br /><img src='" . XOOPS_URL . "/images/await.gif' alt='' /><br />" . _PLEASEWAIT . "</td>
90  </tr>
91  </table>
92  </div>
93  <script type='text/javascript'>
94  <!--//
95  var DHTML = (document.getElementById || document.all || document.layers);
96  function ap_getObj(name) {
97  if (document.getElementById) {
98  return document.getElementById(name).style;
99  } else if (document.all) {
100  return document.all[name].style;
101  } else if (document.layers) {
102  return document.layers[name];
103  }
104  }
105  function ap_showWaitMessage(div,flag) {
106  if (!DHTML) {
107  return;
108  }
109  var x = ap_getObj(div);
110  x.visibility = (flag) ? 'visible' : 'hidden';
111  if (!document.getElementById) {
112  if (document.layers) {
113  x.left=280/2;
114  }
115  }
116  return true;
117  }
118  ap_showWaitMessage('waitDiv', 1);
119  //-->
120  </script>";
121 }
122 
123 function CloseWaitBox()
124 {
125  $GLOBALS['xoopsLogger']->addDeprecated("Function " . __FUNCTION__ . "() is deprecated");
126  echo "<script type='text/javascript'>
127  <!--//
128  ap_showWaitMessage('waitDiv', 0);
129  //-->
130  </script>
131  ";
132 }
133 
134 ?>