- if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', "add");
- $sql = "";
- switch (REQUEST_GET('mode'))
- {
- case "add":
- // Check if banner is already added
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1",
- array(REQUEST_POST('url')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
- // Add banner
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refbanner` (url, alternate, visible)
+ if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', 'add');
+ $sql = '';
+ switch (getRequestElement('mode')) {
+ case 'add':
+ // Check if banner is already added
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1",
+ array(postRequestElement('url')), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 0) {
+ // Add banner
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible)