PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1_5_0/squirrelmail/plugins/administrator/defines.php

#
PHP | 349 lines | 327 code | 6 blank | 16 comment | 2 complexity | d63ac8aee647802e4f3a4dc4017500e9 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. <?PHP
  2. /**
  3. * defines.php
  4. *
  5. * Copyright (c) 1999-2003 The SquirrelMail Project Team
  6. * Licensed under the GNU GPL. For full terms see the file COPYING.
  7. *
  8. * Philippe Mingo
  9. *
  10. * $Id: defines.php 6323 2003-12-26 09:13:37Z tokul $
  11. * @package plugins
  12. * @subpackage administrator
  13. */
  14. /** */
  15. require_once( SM_PATH . 'functions/constants.php' );
  16. /* Define constants for the various option types. */
  17. define('SMOPT_TYPE_UNDEFINED', -1);
  18. define('SMOPT_TYPE_STRING', 0);
  19. define('SMOPT_TYPE_STRLIST', 1);
  20. define('SMOPT_TYPE_TEXTAREA', 2);
  21. define('SMOPT_TYPE_INTEGER', 3);
  22. define('SMOPT_TYPE_FLOAT', 4);
  23. define('SMOPT_TYPE_BOOLEAN', 5);
  24. define('SMOPT_TYPE_HIDDEN', 6);
  25. define('SMOPT_TYPE_COMMENT', 7);
  26. define('SMOPT_TYPE_NUMLIST', 8);
  27. define('SMOPT_TYPE_TITLE', 9);
  28. define('SMOPT_TYPE_THEME', 10);
  29. define('SMOPT_TYPE_PLUGINS', 11);
  30. define('SMOPT_TYPE_LDAP', 12);
  31. define('SMOPT_TYPE_EXTERNAL', 32);
  32. define('SMOPT_TYPE_PATH',33);
  33. global $languages;
  34. $language_values = array( );
  35. foreach ($languages as $lang_key => $lang_attributes) {
  36. if (isset($lang_attributes['NAME'])) {
  37. $language_values[$lang_key] = $lang_attributes['NAME'];
  38. }
  39. }
  40. asort( $language_values );
  41. $language_values = array_merge(array('' => _("Default")), $language_values);
  42. $left_size_values = array();
  43. for ($lsv = 100; $lsv <= 300; $lsv += 10) {
  44. $left_size_values[$lsv] = "$lsv " . _("pixels");
  45. }
  46. $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
  47. 'type' => SMOPT_TYPE_COMMENT,
  48. 'size' => 7 ),
  49. 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
  50. 'type' => SMOPT_TYPE_EXTERNAL,
  51. 'value' => "$version" ),
  52. 'PHP_ver' => array( 'name' => _("PHP Version"),
  53. 'type' => SMOPT_TYPE_EXTERNAL,
  54. 'value' => phpversion() ),
  55. /* --------------------------------------------------------*/
  56. 'Group1' => array( 'name' => _("Organization Preferences"),
  57. 'type' => SMOPT_TYPE_TITLE ),
  58. '$org_name' => array( 'name' => _("Organization Name"),
  59. 'type' => SMOPT_TYPE_STRING,
  60. 'size' => 40 ),
  61. '$org_logo' => array( 'name' => _("Organization Logo"),
  62. 'type' => SMOPT_TYPE_PATH,
  63. 'size' => 40,
  64. 'default' => '../images/sm_logo.png'),
  65. '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
  66. 'type' => SMOPT_TYPE_INTEGER,
  67. 'size' => 5,
  68. 'default' => 0),
  69. '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
  70. 'type' => SMOPT_TYPE_INTEGER,
  71. 'size' => 5,
  72. 'default' => 0),
  73. '$org_title' => array( 'name' => _("Organization Title"),
  74. 'type' => SMOPT_TYPE_STRING,
  75. 'size' => 40 ),
  76. '$signout_page' => array( 'name' => _("Signout Page"),
  77. 'type' => SMOPT_TYPE_PATH,
  78. 'size' => 40 ),
  79. '$provider_uri' => array( 'name' => _("Provider Link URI"),
  80. 'type' => SMOPT_TYPE_STRING ),
  81. '$provider_name' => array( 'name' => _("Provider Name"),
  82. 'type' => SMOPT_TYPE_STRING ),
  83. '$frame_top' => array( 'name' => _("Top Frame"),
  84. 'type' => SMOPT_TYPE_STRING,
  85. 'size' => 40,
  86. 'default' => '_top' ),
  87. /* --------------------------------------------------------*/
  88. 'Group2' => array( 'name' => _("Server Settings"),
  89. 'type' => SMOPT_TYPE_TITLE ),
  90. '$domain' => array( 'name' => _("Mail Domain"),
  91. 'type' => SMOPT_TYPE_STRING,
  92. 'size' => 40 ),
  93. '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
  94. 'type' => SMOPT_TYPE_STRING,
  95. 'size' => 40 ),
  96. '$imapPort' => array( 'name' => _("IMAP Server Port"),
  97. 'type' => SMOPT_TYPE_INTEGER ),
  98. '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
  99. 'type' => SMOPT_TYPE_STRLIST,
  100. 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
  101. 'uw' => _("University of Washington's IMAP server"),
  102. 'exchange' => _("Microsoft Exchange IMAP server"),
  103. 'courier' => _("Courier IMAP server"),
  104. 'other' => _("Not one of the above servers") ) ),
  105. '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
  106. 'type' => SMOPT_TYPE_STRING,
  107. 'comment' => _("Use \"detect\" to auto-detect."),
  108. 'size' => 10,
  109. 'default' => 'detect' ),
  110. '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
  111. 'type' => SMOPT_TYPE_BOOLEAN,
  112. 'comment' => _("Requires PHP 4.3.x! Experimental."),
  113. 'default' => false ),
  114. '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
  115. 'type' => SMOPT_TYPE_STRLIST,
  116. 'posvals' => array('login' => 'IMAP LOGIN',
  117. 'cram-md5' => 'CRAM-MD5',
  118. 'digest-md5' => 'DIGEST-MD5'),
  119. 'default' => 'login' ),
  120. '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
  121. 'type' => SMOPT_TYPE_BOOLEAN,
  122. 'comment' => "Say 'no' for SMTP" ),
  123. '$sendmail_path' => array( 'name' => _("Sendmail Path"),
  124. 'type' => SMOPT_TYPE_STRING,
  125. 'size' => 40 ),
  126. '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
  127. 'type' => SMOPT_TYPE_STRING,
  128. 'size' => 40 ),
  129. '$smtpPort' => array( 'name' => _("SMTP Server Port"),
  130. 'type' => SMOPT_TYPE_INTEGER ),
  131. '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
  132. 'type' => SMOPT_TYPE_BOOLEAN,
  133. 'comment' => _("Requires PHP 4.3.x! Experimental."),
  134. 'default' => false ),
  135. '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
  136. 'type' => SMOPT_TYPE_STRLIST,
  137. 'posvals' => array('none' => 'No SMTP auth',
  138. 'login' => 'Login (Plaintext)',
  139. 'cram-md5' => 'CRAM-MD5',
  140. 'digest-md5' => 'DIGEST-MD5'),
  141. 'default' => 'none'),
  142. '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
  143. 'type' => SMOPT_TYPE_BOOLEAN,
  144. 'default' => false ),
  145. '$invert_time' => array( 'name' => _("Invert Time"),
  146. 'type' => SMOPT_TYPE_BOOLEAN ),
  147. '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
  148. 'type' => SMOPT_TYPE_BOOLEAN ),
  149. /* --------------------------------------------------------*/
  150. 'Group3' => array( 'name' => _("Folders Defaults"),
  151. 'type' => SMOPT_TYPE_TITLE ),
  152. '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
  153. 'type' => SMOPT_TYPE_STRING,
  154. 'size' => 40 ),
  155. '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
  156. 'type' => SMOPT_TYPE_BOOLEAN ),
  157. '$trash_folder' => array( 'name' => _("Trash Folder"),
  158. 'type' => SMOPT_TYPE_STRING,
  159. 'size' => 40 ),
  160. '$sent_folder' => array( 'name' => _("Sent Folder"),
  161. 'type' => SMOPT_TYPE_STRING,
  162. 'size' => 40 ),
  163. '$draft_folder' => array( 'name' => _("Draft Folder"),
  164. 'type' => SMOPT_TYPE_STRING,
  165. 'size' => 40 ),
  166. '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
  167. 'type' => SMOPT_TYPE_BOOLEAN ),
  168. '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
  169. 'type' => SMOPT_TYPE_BOOLEAN ),
  170. '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
  171. 'type' => SMOPT_TYPE_BOOLEAN ),
  172. '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
  173. 'type' => SMOPT_TYPE_BOOLEAN ),
  174. '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
  175. 'type' => SMOPT_TYPE_BOOLEAN ),
  176. '$auto_expunge' => array( 'name' => _("Auto Expunge"),
  177. 'type' => SMOPT_TYPE_BOOLEAN ),
  178. '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
  179. 'type' => SMOPT_TYPE_BOOLEAN ),
  180. '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
  181. 'type' => SMOPT_TYPE_BOOLEAN ),
  182. '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
  183. 'type' => SMOPT_TYPE_NUMLIST,
  184. 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
  185. SMPREF_UNSEEN_INBOX => _("Only INBOX"),
  186. SMPREF_UNSEEN_ALL => _("All Folders")) ),
  187. '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
  188. 'type' => SMOPT_TYPE_NUMLIST ,
  189. 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
  190. SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
  191. '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
  192. 'type' => SMOPT_TYPE_BOOLEAN ),
  193. '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
  194. 'type' => SMOPT_TYPE_BOOLEAN ),
  195. '$delete_folder' => array( 'name' => _("Auto delete folders"),
  196. 'type' => SMOPT_TYPE_BOOLEAN ),
  197. '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
  198. 'type' => SMOPT_TYPE_BOOLEAN,
  199. 'default' => false),
  200. /* --------------------------------------------------------*/
  201. 'Group4' => array( 'name' => _("General Options"),
  202. 'type' => SMOPT_TYPE_TITLE ),
  203. '$data_dir' => array( 'name' => _("Data Directory"),
  204. 'type' => SMOPT_TYPE_PATH,
  205. 'size' => 40 ),
  206. '$attachment_dir' => array( 'name' => _("Temp Directory"),
  207. 'type' => SMOPT_TYPE_PATH,
  208. 'size' => 40 ),
  209. '$dir_hash_level' => array( 'name' => _("Hash Level"),
  210. 'type' => SMOPT_TYPE_NUMLIST,
  211. 'posvals' => array( 0 => _("Hash Disabled"),
  212. 1 => _("Low"),
  213. 2 => _("Moderate"),
  214. 3 => _("Medium"),
  215. 4 => _("High") ) ),
  216. '$default_left_size' => array( 'name' => _("Default Left Size"),
  217. 'type' => SMOPT_TYPE_NUMLIST,
  218. 'posvals' => $left_size_values ),
  219. '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
  220. 'type' => SMOPT_TYPE_BOOLEAN ),
  221. '$default_use_priority' => array( 'name' => _("Allow use of priority"),
  222. 'type' => SMOPT_TYPE_BOOLEAN ),
  223. '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
  224. 'type' => SMOPT_TYPE_BOOLEAN ),
  225. 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
  226. 'type' => SMOPT_TYPE_BOOLEAN ),
  227. '$edit_identity' => array( 'name' => _("Allow editing of identities"),
  228. 'type' => SMOPT_TYPE_BOOLEAN ),
  229. '$edit_name' => array( 'name' => _("Allow editing of full name"),
  230. 'type' => SMOPT_TYPE_BOOLEAN ),
  231. '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
  232. 'type' => SMOPT_TYPE_BOOLEAN,
  233. 'default' => false ),
  234. '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
  235. 'type' => SMOPT_TYPE_BOOLEAN,
  236. 'default' => false ),
  237. '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
  238. 'type' => SMOPT_TYPE_BOOLEAN,
  239. 'default' => false ),
  240. '$session_name' => array( 'name' => _("PHP session name"),
  241. 'type' => SMOPT_TYPE_HIDDEN ),
  242. /* --------------------------------------------------------*/
  243. 'Group5' => array( 'name' => _("Message of the Day"),
  244. 'type' => SMOPT_TYPE_TITLE ),
  245. '$motd' => array( 'name' => _("Message of the Day"),
  246. 'type' => SMOPT_TYPE_TEXTAREA,
  247. 'size' => 40 ),
  248. /* --------------------------------------------------------*/
  249. 'Group6' => array( 'name' => _("Database"),
  250. 'type' => SMOPT_TYPE_TITLE ),
  251. '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
  252. 'type' => SMOPT_TYPE_STRING,
  253. 'size' => 40 ),
  254. '$addrbook_table' => array( 'name' => _("Address book table"),
  255. 'type' => SMOPT_TYPE_STRING,
  256. 'size' => 40,
  257. 'default' => 'address' ),
  258. '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
  259. 'type' => SMOPT_TYPE_STRING,
  260. 'size' => 40 ),
  261. '$prefs_table' => array( 'name' => _("Preferences table"),
  262. 'type' => SMOPT_TYPE_STRING,
  263. 'size' => 40,
  264. 'default' => 'userprefs' ),
  265. '$prefs_user_field' => array('name' => _("Preferences username field"),
  266. 'type' => SMOPT_TYPE_STRING,
  267. 'size' => 40,
  268. 'default' => 'user' ),
  269. '$prefs_key_field' => array('name' => _("Preferences key field"),
  270. 'type' => SMOPT_TYPE_STRING,
  271. 'size' => 40,
  272. 'default' => 'prefkey' ),
  273. '$prefs_val_field' => array('name' => _("Preferences value field"),
  274. 'type' => SMOPT_TYPE_STRING,
  275. 'size' => 40,
  276. 'default' => 'prefval' ),
  277. '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
  278. 'type' => SMOPT_TYPE_STRING,
  279. 'size' => 40 ),
  280. '$addrbook_global_table' => array( 'name' => _("Global address book table"),
  281. 'type' => SMOPT_TYPE_STRING,
  282. 'size' => 40,
  283. 'default' => 'global_abook' ),
  284. '$addrbook_global_writable' => array( 'name' => _("Allow writing into global address book"),
  285. 'type' => SMOPT_TYPE_BOOLEAN ),
  286. '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
  287. 'type' => SMOPT_TYPE_BOOLEAN ),
  288. 'Group9' => array( 'name' => _("Language settings"),
  289. 'type' => SMOPT_TYPE_TITLE ),
  290. '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
  291. 'type' => SMOPT_TYPE_STRLIST,
  292. 'size' => 7,
  293. 'posvals' => $language_values ),
  294. '$default_charset' => array( 'name' => _("Default Charset"),
  295. 'type' => SMOPT_TYPE_STRLIST,
  296. 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
  297. 'iso-8859-2' => 'iso-8859-2',
  298. 'iso-8859-7' => 'iso-8859-7',
  299. 'iso-8859-15' => 'iso-8859-15',
  300. 'iso-8859-15' => 'iso-8859-15',
  301. 'ns_4551_1' => 'ns_4551_1',
  302. 'koi8-r' => 'koi8-r',
  303. 'euc-KR' => 'euc-KR',
  304. 'windows-1251' => 'windows-1251',
  305. 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
  306. '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
  307. 'type' => SMOPT_TYPE_BOOLEAN ),
  308. '$available_languages' => array( 'name' => _("Available languages"),
  309. 'type' => SMOPT_TYPE_STRING,
  310. 'size' => 40 ),
  311. '$agresive_decoding' => array( 'name' => _("Use agresive decoding"),
  312. 'type' => SMOPT_TYPE_BOOLEAN ),
  313. 'Group10' => array( 'name' => _("Tweaks"),
  314. 'type' => SMOPT_TYPE_TITLE ),
  315. '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
  316. 'type' => SMOPT_TYPE_BOOLEAN ),
  317. '$oldway' => array( 'name' => _("Use old folder listing functions"),
  318. 'type' => SMOPT_TYPE_BOOLEAN ),
  319. '$use_php_recode' => array( 'name' => _("Use php recode functions"),
  320. 'type' => SMOPT_TYPE_BOOLEAN ),
  321. '$use_php_iconv' => array( 'name' => _("Use php iconv functions"),
  322. 'type' => SMOPT_TYPE_BOOLEAN ),
  323. /* --------------------------------------------------------*/
  324. 'Group7' => array( 'name' => _("Themes"),
  325. 'type' => SMOPT_TYPE_TITLE ),
  326. '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
  327. 'type' => SMOPT_TYPE_PATH,
  328. 'size' => 40 ),
  329. '$theme_default' => array( 'name' => _("Default theme"),
  330. 'type' => SMOPT_TYPE_INTEGER,
  331. 'default' => 0,
  332. 'comment' => _("Use index number of theme") ),
  333. /* --------------------------------------------------------*/
  334. '$config_use_color' => array( 'name' => '',
  335. 'type' => SMOPT_TYPE_HIDDEN ),
  336. '$no_list_for_subscribe' => array( 'name' => '',
  337. 'type' => SMOPT_TYPE_HIDDEN ),
  338. /* --------------------------------------------------------*/
  339. );
  340. ?>