1: <?php
2: 3: 4: 5:
6:
7: if (!defined('XOOPS_ROOT_PATH')) exit();
8:
9: require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractFilterForm.class.php";
10:
11: define('BANNER_SORT_KEY_BID', 1);
12: define('BANNER_SORT_KEY_CID', 2);
13: define('BANNER_SORT_KEY_IMPTOTAL', 3);
14: define('BANNER_SORT_KEY_IMPMADE', 4);
15: define('BANNER_SORT_KEY_CLICKS', 5);
16: define('BANNER_SORT_KEY_IMAGEURL', 6);
17: define('BANNER_SORT_KEY_CLICKURL', 7);
18: define('BANNER_SORT_KEY_DATE', 8);
19: define('BANNER_SORT_KEY_HTMLBANNER', 9);
20: define('BANNER_SORT_KEY_HTMLCODE', 10);
21: define('BANNER_SORT_KEY_MAXVALUE', 10);
22:
23: define('BANNER_SORT_KEY_DEFAULT', BANNER_SORT_KEY_BID);
24:
25: class LegacyRender_BannerFilterForm extends LegacyRender_AbstractFilterForm
26: {
27: var $mSortKeys = array(
28: BANNER_SORT_KEY_BID => 'bid',
29: BANNER_SORT_KEY_CID => 'cid',
30: BANNER_SORT_KEY_IMPTOTAL => 'imptotal',
31: BANNER_SORT_KEY_IMPMADE => 'impmade',
32: BANNER_SORT_KEY_CLICKS => 'clicks',
33: BANNER_SORT_KEY_IMAGEURL => 'imageurl',
34: BANNER_SORT_KEY_CLICKURL => 'clickurl',
35: BANNER_SORT_KEY_DATE => 'date',
36: BANNER_SORT_KEY_HTMLBANNER => 'htmlbanner',
37: BANNER_SORT_KEY_HTMLCODE => 'htmlcode'
38: );
39:
40: function getDefaultSortKey()
41: {
42: return BANNER_SORT_KEY_DEFAULT;
43: }
44:
45: function fetch()
46: {
47: parent::fetch();
48:
49: if (isset($_REQUEST['cid'])) {
50: $this->mNavi->addExtra('cid', xoops_getrequest('cid'));
51: $this->_mCriteria->add(new Criteria('cid', xoops_getrequest('cid')));
52: }
53:
54: if (isset($_REQUEST['htmlbanner'])) {
55: $this->mNavi->addExtra('htmlbanner', xoops_getrequest('htmlbanner'));
56: $this->_mCriteria->add(new Criteria('htmlbanner', xoops_getrequest('htmlbanner')));
57: }
58:
59: $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
60: }
61: }
62:
63: ?>
64: