api.workicons.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <?php
  2. /**
  3. * Returns standard deletion icon
  4. *
  5. * @param string $title
  6. * @return string
  7. */
  8. function web_delete_icon($title = 'Delete') {
  9. $icon = wf_img('skins/icon_del.gif', __($title));
  10. return ($icon);
  11. }
  12. /**
  13. * Returns addition/insert icon with some title
  14. *
  15. * @param string $title
  16. * @return string
  17. */
  18. function web_add_icon($title = 'Add') {
  19. $icon = wf_img('skins/icon_add.gif', __($title));
  20. return ($icon);
  21. }
  22. /**
  23. * Returns standard edit icon
  24. *
  25. * @param string $title
  26. * @return string
  27. */
  28. function web_edit_icon($title = 'Edit') {
  29. $icon = wf_img('skins/icon_edit.gif', __($title));
  30. return ($icon);
  31. }
  32. /**
  33. * Returns standard password/key icon
  34. *
  35. * @param string $title
  36. * @return string
  37. */
  38. function web_key_icon($title = 'Password') {
  39. $icon = wf_img('skins/icon_key.gif', __($title));
  40. return ($icon);
  41. }
  42. /**
  43. * Returns standard street icon
  44. *
  45. * @param string $title
  46. * @return string
  47. */
  48. function web_street_icon($title = 'Street') {
  49. $icon = wf_img('skins/icon_street.gif', __($title));
  50. return ($icon);
  51. }
  52. /**
  53. * Returns standard city icon
  54. *
  55. * @param string $title
  56. * @return string
  57. */
  58. function web_city_icon($title = 'City') {
  59. $icon = wf_img('skins/icon_city.gif', __($title));
  60. return ($icon);
  61. }
  62. /**
  63. * Returns standard build icon
  64. *
  65. * @param string $title
  66. * @return string
  67. */
  68. function web_build_icon($title = 'Builds') {
  69. $icon = wf_img('skins/icon_build.gif', __($title));
  70. return ($icon);
  71. }
  72. /**
  73. * Returns standard "good" icon
  74. *
  75. * @param string $title
  76. * @return string
  77. */
  78. function web_ok_icon($title = 'Ok') {
  79. $icon = wf_img('skins/icon_ok.gif', __($title));
  80. return ($icon);
  81. }
  82. /**
  83. * Returns standard profile icon
  84. *
  85. * @param string $title
  86. * @return string
  87. */
  88. function web_profile_icon($title = 'Profile') {
  89. $icon = wf_img('skins/icon_user.gif', __($title));
  90. return ($icon);
  91. }
  92. /**
  93. * Returns standard stats/graph icon
  94. *
  95. * @param string $title
  96. * @return string
  97. */
  98. function web_stats_icon($title = 'Stats') {
  99. $icon = wf_img('skins/icon_stats.gif', __($title));
  100. return ($icon);
  101. }
  102. /**
  103. * Returns standard charts icon small
  104. *
  105. * @param string $title
  106. * @return string
  107. */
  108. function web_icon_charts($title = 'Stats') {
  109. $icon = wf_img('skins/icon_charts.png', __($title));
  110. return ($icon);
  111. }
  112. /**
  113. * Returns standard corporate icon
  114. *
  115. * @param string $title
  116. * @return string
  117. */
  118. function web_corporate_icon($title = 'Corporate') {
  119. $icon = wf_img('skins/corporate_small.gif', __($title));
  120. return ($icon);
  121. }
  122. /**
  123. * Returns standard green led icon
  124. *
  125. * @param string $title
  126. * @return string
  127. */
  128. function web_green_led($title = '') {
  129. $icon = wf_img('skins/icon_active.gif', __($title));
  130. return ($icon);
  131. }
  132. /**
  133. * Returns standard yellow led icon
  134. *
  135. * @param string $title
  136. * @return string
  137. */
  138. function web_yellow_led($title = '') {
  139. $icon = wf_img('skins/yellow_led.png', __($title));
  140. return ($icon);
  141. }
  142. /**
  143. * Returns standard red led icon
  144. *
  145. * @param string $title
  146. * @return string
  147. */
  148. function web_red_led($title = '') {
  149. $icon = wf_img('skins/icon_inactive.gif', __($title));
  150. return ($icon);
  151. }
  152. /**
  153. * Returns standard star/online icon
  154. *
  155. * @param string $title
  156. * @return string
  157. */
  158. function web_star($title = NULL) {
  159. $icon = wf_img('skins/icon_star.gif', __($title));
  160. return ($icon);
  161. }
  162. /**
  163. * Returns standard black star/online icon
  164. *
  165. * @param string $title
  166. * @return string
  167. */
  168. function web_star_black() {
  169. $icon = wf_img('skins/icon_nostar.gif');
  170. return ($icon);
  171. }
  172. /**
  173. * Returns extended configuration icon
  174. *
  175. * @param string $title
  176. * @return string
  177. */
  178. function web_icon_extended($title = NULL) {
  179. $icon = wf_img('skins/icon_extended.png', __($title));
  180. return $icon;
  181. }
  182. /**
  183. * Returns new item creation icon
  184. *
  185. * @param string $title
  186. * @return string
  187. */
  188. function web_icon_create($title = NULL) {
  189. $icon = wf_img('skins/add_icon.png', __($title));
  190. return $icon;
  191. }
  192. /**
  193. * Returns default settings icon
  194. *
  195. * @param string $title
  196. * @return string
  197. */
  198. function web_icon_settings($title = 'Settings') {
  199. $icon = wf_img('skins/settings.png', __($title));
  200. return $icon;
  201. }
  202. /**
  203. * Returns default search icon
  204. *
  205. * @param string $title
  206. * @return string
  207. */
  208. function web_icon_search($title = 'Search') {
  209. $icon = wf_img('skins/icon_search_small.gif', __($title));
  210. return $icon;
  211. }
  212. /**
  213. * Returns default download icon
  214. *
  215. * @param string $title
  216. * @return string
  217. */
  218. function web_icon_download($title = 'Download') {
  219. $icon = wf_img('skins/icon_download.png', __($title));
  220. return ($icon);
  221. }
  222. /**
  223. * Returns default printing icon
  224. *
  225. * @param string $title
  226. * @return string
  227. */
  228. function web_icon_print($title = 'Print') {
  229. $icon = wf_img('skins/icon_print.png', __($title));
  230. return $icon;
  231. }
  232. /**
  233. * Returns FreeRADIUS icon:
  234. *
  235. * @param string $title
  236. * @return string
  237. */
  238. function web_icon_freeradius($title = NULL) {
  239. $icon = wf_img('skins/icon_freeradius_small.png', __($title));
  240. return $icon;
  241. }
  242. /**
  243. * Returns default dollar icon
  244. *
  245. * @param string $title
  246. * @return string
  247. */
  248. function web_cash_icon($title = 'Cash') {
  249. $icon = wf_img('skins/icon_dollar.gif', __($title));
  250. return $icon;
  251. }
  252. /**
  253. * Returns boolean led indicator
  254. *
  255. * @param bool/string $flag
  256. * @param bool $text
  257. * @return string
  258. */
  259. function web_bool_led($flag, $text = false) {
  260. if ($text) {
  261. $no = ' ' . __('No') . ' ';
  262. $yes = __('Yes') . ' ';
  263. } else {
  264. $no = '';
  265. $yes = '';
  266. }
  267. $led = $no . web_red_led();
  268. if ($flag) {
  269. $led = $yes . web_green_led();
  270. }
  271. return ($led);
  272. }
  273. /**
  274. * Returns boolean star indicator
  275. *
  276. * @param bool/string $flag
  277. * @param bool $text
  278. * @return string
  279. */
  280. function web_bool_star($flag, $text = false) {
  281. if ($text) {
  282. $no = ' ' . __('No') . ' ';
  283. $yes = __('Yes') . ' ';
  284. } else {
  285. $no = '';
  286. $yes = '';
  287. }
  288. $led = $no . web_star_black();
  289. if ($flag) {
  290. $led = $yes . web_star();
  291. }
  292. return ($led);
  293. }
  294. /**
  295. * Returns standard edit icon
  296. *
  297. * @param string $title
  298. * @return string
  299. */
  300. function web_clone_icon($title = 'Clone') {
  301. $icon = wf_img('skins/duplicate_icon.gif', __($title));
  302. return ($icon);
  303. }
  304. /**
  305. * Returns standard calendar icon
  306. *
  307. * @param string $title
  308. * @return string
  309. */
  310. function web_icon_calendar($title = 'Calendar') {
  311. $icon = wf_img('skins/icon_calendar.gif', __($title));
  312. return ($icon);
  313. }