20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
22 if (!defined('XOOPS_LISTS_INCLUDED')) {
23 define(
'XOOPS_LISTS_INCLUDED', 1);
36 static function getTimeZoneList()
40 $time_zone_list = array(
72 return $time_zone_list;
78 static function getThemesList()
86 static function getModulesList()
88 return XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH .
'/modules/');
94 static function getEditorList()
96 return XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH .
'/class/xoopseditor/');
102 static function getDirListAsArray(
$dirname)
113 if (substr(
$file, 0, 1) ==
'.' || in_array(strtolower(
$file), $ignored))
129 static function getFileListAsArray(
$dirname, $prefix =
'')
138 $file = $prefix .
$file;
152 static function getImgListAsArray(
$dirname, $prefix =
'')
157 if (preg_match(
'/(\.gif|\.jpg|\.png)$/i',
$file)) {
172 static function getHtmlListAsArray(
$dirname, $prefix =
'')
177 if ((preg_match(
'/(\.htm|\.html|\.xhtml)$/i',
$file) && ! is_dir(
$file))) {
193 static function getAvatarsList($avatar_dir =
'')
196 if ($avatar_dir !=
'') {
197 $avatars = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH .
'/images/avatar/' . $avatar_dir .
'/', $avatar_dir .
'/');
199 $avatars = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH .
'/images/avatar/');
207 static function getAllAvatarsList()
211 $dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH .
'/images/avatar/');
214 $avatars[
$dir] = &XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH .
'/images/avatar/' . $dir .
'/', $dir .
'/');
226 static function getSubjectsList($sub_dir =
'')
229 if ($sub_dir !=
'') {
230 $subjects = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH .
'/images/subject/' . $sub_dir, $sub_dir .
'/');
232 $subjects = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH .
'/images/subject/');
240 static function getLangList()
242 $lang_list = array();
243 $lang_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH .
'/language/');
252 static function getCountryList()
255 $country_list = array (
511 asort($country_list);
512 reset($country_list);
513 return $country_list;
523 static function getHtmlList()
527 'abbr' =>
'<abbr>',
528 'acronym' =>
'<acronym>',
529 'address' =>
'<address>',
531 'bdo' =>
'<bdo>',
532 'big' =>
'<big>',
533 'blockquote' =>
'<blockquote>',
534 'br' =>
'<br>',
535 'caption' =>
'<caption>',
536 'cite' =>
'<cite>',
537 'code' =>
'<code>',
538 'col' =>
'<col>',
539 'colgroup' =>
'<colgroup>',
540 'dd' =>
'<dd>',
541 'del' =>
'<del>',
542 'dfn' =>
'<dfn>',
543 'div' =>
'<div>',
544 'dl' =>
'<dl>',
545 'dt' =>
'<dt>',
546 'em' =>
'<em>',
547 'font' =>
'<font>',
548 'h1' =>
'<h1>',
549 'h2' =>
'<h2>',
550 'h3' =>
'<h3>',
551 'h4' =>
'<h4>',
552 'h5' =>
'<h5>',
553 'h6' =>
'<h6>',
554 'hr' =>
'<hr>',
556 'img' =>
'<img>',
557 'ins' =>
'<ins>',
558 'kbd' =>
'<kbd>',
559 'li' =>
'<li>',
560 'map' =>
'<map>',
561 'object' =>
'<object>',
562 'ol' =>
'<ol>',
564 'pre' =>
'<pre>',
566 'samp' =>
'<samp>',
567 'small' =>
'<small>',
568 'span' =>
'<span>',
569 'strike' =>
'<strike>',
570 'strong' =>
'<strong>',
571 'sub' =>
'<sub>',
572 'sup' =>
'<sup>',
573 'table' =>
'<table>',
574 'tbody' =>
'<tbody>',
575 'td' =>
'<td>',
576 'tfoot' =>
'<tfoot>',
577 'th' =>
'<th>',
578 'thead' =>
'<thead>',
579 'tr' =>
'<tr>',
580 'tt' =>
'<tt>',
582 'ul' =>
'<ul>',
583 'var' =>
'<var>');
594 static function getUserRankList()
598 $sql = sprintf(
'SELECT rank_id, rank_title FROM ' .
$db->prefix(
'ranks') .
' WHERE rank_special = %u', 1);
602 $ret[$myrow[
'rank_id']] =
$myts->htmlspecialchars($myrow[
'rank_title']);