Removed double <div> from Picasa2 album render
[tip.git] / Defs.php
blob4b71c4e354cdb5ec1475b63156904d7381f891e5
1 <?php
2 /* vim: set expandtab shiftwidth=4 softtabstop=4 tabstop=4: */
4 /**
5 * TiP constants
7 * LICENSE: This source file is subject to the New BSD license that is
8 * available through the world-wide-web at the following URI:
9 * http://www.opensource.org/licenses/bsd-license.php
10 * If you did not receive a copy of the New BSD License and are unable to
11 * obtain it through the web, please send a note to license@php.net so we
12 * can mail you a copy immediately.
14 * @author Nicola Fontana <ntd@entidi.it>
15 * @copyright Copyright &copy; 2006-2008 Nicola Fontana
16 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
17 * @package TIP
18 * @since 0.0.1
21 /**
22 * The TIP prefix
24 * This is the prefix used by the TIP objects. It is used in various place,
25 * such as to get the type name from the class by stripping this prefix
26 * (avoiding tedious prefix repetitions).
28 define('TIP_PREFIX', 'TIP_');
30 /**
31 * The TiP branch version, to be used to roughly identify the TiP used
33 define('TIP_VERSION_BRANCH', '0.2');
35 /**
36 * The name of the main module
38 * The name of the global variable holding the reference to the main module.
39 * It be accessed throught <code>$GLOBALS[TIP_MAIN]</code>.
41 define('TIP_MAIN', '_tip_main_');
43 /**#@+ Privileges */
44 define('TIP_PRIVILEGE_INVALID', 0);
45 define('TIP_PRIVILEGE_NONE', 1);
46 define('TIP_PRIVILEGE_UNTRUSTED', 2);
47 define('TIP_PRIVILEGE_TRUSTED', 3);
48 define('TIP_PRIVILEGE_ADMIN', 4);
49 define('TIP_PRIVILEGE_MANAGER', 5);
50 /**#@-*/
52 /**#@+ Severity levels */
53 define('TIP_SEVERITY_INFO', 'info');
54 define('TIP_SEVERITY_WARNING', 'warning');
55 define('TIP_SEVERITY_ERROR', 'error');
56 /**#@-*/
58 /**#@+ Sorting orders, used by TIP_Data::order() */
59 define('TIP_ORDER_ASCENDING', false);
60 define('TIP_ORDER_DESCENDING', true);
61 /**#@-*/
63 /**#@+ Transaction actions, used by TIP_Data_Engine */
64 define('TIP_TRANSACTION_START', 1);
65 define('TIP_TRANSACTION_COMMIT', 2);
66 define('TIP_TRANSACTION_ROLLBACK',3);
67 /**#@-*/
70 /**#@+ Form related constants */
72 /**#@+ Form method */
73 define('TIP_FORM_METHOD_GET', 'get');
74 define('TIP_FORM_METHOD_POST', 'post');
75 /**#@-*/
77 /**#@+ Form action */
78 define('TIP_FORM_ACTION_ADD', 'add');
79 define('TIP_FORM_ACTION_EDIT', 'edit');
80 define('TIP_FORM_ACTION_VIEW', 'view');
81 define('TIP_FORM_ACTION_DELETE', 'delete');
82 define('TIP_FORM_ACTION_CUSTOM', 'custom');
83 /**#@-*/
85 /**#@+ Form button */
86 define('TIP_FORM_BUTTON_SUBMIT', 1);
87 define('TIP_FORM_BUTTON_RESET', 2);
88 define('TIP_FORM_BUTTON_DELETE', 4);
89 define('TIP_FORM_BUTTON_CANCEL', 8);
90 define('TIP_FORM_BUTTON_CLOSE', 16);
91 define('TIP_FORM_BUTTON_OK', 32);
92 /**#@-*/
94 /**#@+ Form rendering */
95 define('TIP_FORM_RENDER_HERE', 1);
96 define('TIP_FORM_RENDER_IN_PAGE', 2);
97 define('TIP_FORM_RENDER_NOTHING', 3);
98 define('TIP_FORM_RENDER_REDIRECT',4);
99 /**#@-*/
101 /**#@-*/
104 * If set to true, this flag will avoid postConstructor calls
106 * I think the following approach is apache specific.
109 define('TIP_AHAH', strcasecmp(@$_SERVER["HTTP_X_REQUESTED_WITH"], 'XMLHttpRequest') == 0);