Changeset 10599
- Timestamp:
- 05/25/09 00:00:45 (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 18 edited
-
admin/templates/base/design_box_1.html (modified) (1 diff)
-
admin/templates/base/page_9.html (added)
-
inc/admin_design.inc.php (modified) (1 diff)
-
inc/classes/BxDolModule.php (modified) (2 diffs)
-
modules/boonex/feedback/admin.php (modified) (2 diffs)
-
modules/boonex/feedback/install/langs/en.php (modified) (1 diff)
-
modules/boonex/feedback/install/sql/install.sql (modified) (1 diff)
-
modules/boonex/feedback/install/sql/uninstall.sql (modified) (1 diff)
-
modules/boonex/news/admin.php (modified) (2 diffs)
-
modules/boonex/news/classes/BxNewsModule.php (modified) (2 diffs)
-
modules/boonex/news/install/langs/en.php (modified) (1 diff)
-
modules/boonex/news/install/sql/install.sql (modified) (1 diff)
-
modules/boonex/news/install/sql/uninstall.sql (modified) (1 diff)
-
modules/boonex/payment/admin.php (modified) (1 diff)
-
modules/boonex/payment/classes/BxPmtModule.php (modified) (2 diffs)
-
modules/boonex/payment/install/langs/en.php (modified) (1 diff)
-
modules/boonex/payment/install/sql/install.sql (modified) (2 diffs)
-
modules/boonex/payment/install/sql/uninstall.sql (modified) (1 diff)
-
modules/boonex/payment/templates/base/css/orders.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/templates/base/design_box_1.html
r10490 r10599 1 1 <!-- Design Box [ Start ] here --> 2 2 <div class="adm-design-box"> 3 <div class="adm-db-head">__title____top_items__</div> 3 <div class="adm-db-head">__title__ 4 <div class="dbTopMenu"> 5 <bx_repeat:actions> 6 <div id="__id__-act" class="active" <bx_if:hide_active>style="display:none"</bx_if:hide_active>> 7 __icon__ 8 <span __class__>__title__</span> 9 </div> 10 <div id="__id__-pas" class="notActive" <bx_if:hide_inactive>style="display:none"</bx_if:hide_inactive>> 11 __icon__ 12 <a id="__id__" __class__ __href__ __target__ __on_click__>__title__</a> 13 </div> 14 </bx_repeat:actions> 15 </div> 16 </div> 4 17 <div class="adm-db-content">__content__</div> 5 18 __bottom_items__ -
trunk/inc/admin_design.inc.php
r10542 r10599 56 56 } 57 57 58 function DesignBoxAdmin($sTitle, $sContent, $sTopItems = '', $sBottomItems = '', $iIndex = 1) { 58 function DesignBoxAdmin($sTitle, $sContent, $mixedTopItems = '', $sBottomItems = '', $iIndex = 1) { 59 if(is_array($mixedTopItems)) { 60 $mixedButtons = array(); 61 foreach($mixedTopItems as $sId => $aAction) 62 $mixedButtons[] = array( 63 'id' => $sId, 64 'title' => htmlspecialchars_adv(_t($aAction['title'])), 65 'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '', 66 'icon' => isset($aAction['icon']) ? '<img' . $sClass . ' src="' . $aAction['icon'] . '" />' : '', 67 'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '', 68 'target' => isset($aAction['target']) ? ' target="' . $aAction['target'] . '"' : '', 69 'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '', 70 'bx_if:hide_active' => array( 71 'condition' => !isset($aAction['active']) || $aAction['active'] != 1, 72 'content' => array() 73 ), 74 'bx_if:hide_inactive' => array( 75 'condition' => isset($aAction['active']) && $aAction['active'] == 1, 76 'content' => array() 77 ) 78 ); 79 } 80 else 81 $mixedButtons = $mixedTopItems; 82 59 83 return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_' . (int)$iIndex . '.html', array( 60 84 'title' => $sTitle, 61 ' top_items' => $sTopItems,85 'bx_repeat:actions' => $mixedButtons, 62 86 'content' => $sContent, 63 87 'bottom_items' => $sBottomItems -
trunk/inc/classes/BxDolModule.php
r10460 r10599 88 88 */ 89 89 function isLogged() { 90 /*if(isset($_COOKIE['memberID']) && !empty($_COOKIE['memberID'])) 91 return true; 92 93 return false;*/ 94 95 // VY CHTO, EBANULIS'? Dark. 96 97 98 return $GLOBALS['logged']['member']; 90 return isMember(); 99 91 } 100 92 /** … … 104 96 */ 105 97 function getUserId() { 106 /*else if(isset($_COOKIE['memberID']) && !empty($_COOKIE['memberID'])) 107 return (int)$_COOKIE['memberID']; 108 109 return 0;*/ 110 111 return $GLOBALS['logged']['member'] ? (int)$_COOKIE['memberID'] : 0; 98 return isMember() ? (int)$_COOKIE['memberID'] : 0; 112 99 } 113 100 /** -
trunk/modules/boonex/feedback/admin.php
r9408 r10599 25 25 global $logged; 26 26 27 $logged['admin'] = member_auth( 1, true, true);27 check_logged(); 28 28 29 $ sCaption = _t('_feedback_pcaption_admin');30 $_page[' header'] = $sCaption;31 $_page['header _text'] = $sCaption;32 $_page['css_name'] = '';29 $iIndex = 9; 30 $_page['name_index'] = $iIndex; 31 $_page['header'] = _t('_feedback_pcaption_admin'); 32 $_page['css_name'] = array('forms_adv.css'); 33 33 34 34 $oFeedback = new BxFdbModule($aModule); … … 46 46 if(isset($_GET['feedback-filter'])) 47 47 $sFilterValue = $_GET['feedback-filter']; 48 49 $_page_cont[$iIndex]['page_main_code'] = DesignBoxAdmin(_t('_feedback_bcaption_view_admin'), $oFeedback->serviceAdminBlock(0, 0, $sFilterValue)); 48 50 49 TopCodeAdmin(); 50 ContentBlockHead(''); 51 echo $oFeedback->serviceAdminBlock(0, 0, $sFilterValue); 52 ContentBlockFoot(); 53 BottomCode(); 51 PageCodeAdmin(); 54 52 ?> -
trunk/modules/boonex/feedback/install/langs/en.php
r9522 r10599 27 27 '_feedback_bcaption_view_my' => 'My Feedback', 28 28 '_feedback_bcaption_view_all' => 'Feedback', 29 '_feedback_bcaption_view_admin' => 'Feedback', 29 30 '_feedback_bcaption_index' => 'Feedback', 30 31 '_feedback_pcaption_view_main' => 'Feedback', 31 32 '_feedback_pcaption_view_comment' => 'Comments', 32 33 '_feedback_pcaption_view_vote' => 'Rating', 34 '_feedback_admin_menu_sitem' => 'Feedback', 33 35 '_feedback_top_menu_sitem' => 'Feedback', 34 36 '_feedback_ext_menu_item' => 'Feedback', -
trunk/modules/boonex/feedback/install/sql/install.sql
r10167 r10599 82 82 ('_feedback_ext_menu_item', 'Feedback', '', 'modules/?r=feedback/', '', '', 4, '1', 0, 0, '', 'bottom', 'link'); 83 83 84 SE T @iOrder = (SELECT `Order` FROM `sys_menu_admin` WHERE `Categ`='4' ORDER BY `Order` DESC LIMIT 1) + 1;85 INSERT INTO `sys_menu_admin` (`Title`, `Url`, `Desc`, `Check`, `Order`, `Categ`, `Icon`) VALUES86 ( 'Feedback', '../modules/?r=feedback/admin/', 'For managing member\'s feedback', '', @iOrder, 4, 'modules/boonex/feedback/|feedback.gif');84 SELECT @iOrder:=MAX(`order`) FROM `sys_menu_admin` WHERE `parent_id`='2'; 85 INSERT INTO `sys_menu_admin`(`parent_id`, `name`, `title`, `url`, `description`, `icon`, `icon_large`, `check`, `order`) VALUES 86 (2, 'bx_feedback', '_feedback_admin_menu_sitem', '../modules/?r=feedback/admin/', 'For managing member\'s feedback', 'modules/boonex/feedback/|feedback.gif', '', '', @iOrder+1); 87 87 88 88 -
trunk/modules/boonex/feedback/install/sql/uninstall.sql
r10079 r10599 7 7 DELETE FROM `sys_menu_top` WHERE `Name`='Feedback'; 8 8 DELETE FROM `sys_menu_member` WHERE `Name`='Feedback'; 9 DELETE FROM `sys_menu_admin` WHERE ` Title`='Feedback';9 DELETE FROM `sys_menu_admin` WHERE `name`='bx_feedback'; 10 10 11 11 DELETE FROM `sys_permalinks` WHERE `check`='permalinks_module_feedback'; -
trunk/modules/boonex/news/admin.php
r9408 r10599 25 25 global $logged; 26 26 27 $logged['admin'] = member_auth(1, true, true);27 check_logged(); 28 28 29 $ sCaption = _t('_news_pcaption_admin');30 $_page[' header'] = $sCaption;31 $_page['header _text'] = $sCaption;32 $_page['css_name'] = '';29 $iIndex = 9; 30 $_page['name_index'] = $iIndex; 31 $_page['header'] = _t('_news_pcaption_admin'); 32 $_page['css_name'] = array('forms_adv.css'); 33 33 34 34 $oNews = new BxNewsModule($aModule); … … 61 61 $sFilterValue = $_GET['news-filter']; 62 62 63 TopCodeAdmin(); 64 ContentBlockHead(_t('_news_bcaption_post')); 65 echo $sPostForm; 66 ContentBlockFoot(); 67 68 ContentBlockHead(_t('_news_bcaption_all')); 69 echo $oNews->serviceAdminBlock(0, 0, $sFilterValue); 70 ContentBlockFoot(); 71 BottomCode(); 63 $_page_cont[$iIndex]['page_main_code'] = DesignBoxAdmin(_t('_news_bcaption_post'), $sPostForm); 64 $_page_cont[$iIndex]['page_main_code'] .= DesignBoxAdmin(_t('_news_bcaption_all'), $oNews->serviceAdminBlock(0, 0, $sFilterValue)) ; 65 66 PageCodeAdmin(); 72 67 ?> -
trunk/modules/boonex/news/classes/BxNewsModule.php
r10042 r10599 56 56 * Service methods 57 57 */ 58 function servicePostBlock() { 58 function servicePostBlock() { 59 59 60 $aVariables = array( 60 'include_css' => $this->_oTemplate->addCss(array(' forms_adv.css', 'post.css'), true),61 'include_css' => $this->_oTemplate->addCss(array('post.css'), true), 61 62 'post_form' => $this->_oTextData->getPostForm(array('status' => BX_NEWS_STATUS_INACTIVE)) 62 63 ); … … 70 71 71 72 $aVariables = array( 72 'include_css' => $this->_oTemplate->addCss(array(' forms_adv.css'), true),73 'include_css' => $this->_oTemplate->addCss(array('post.css'), true), 73 74 'post_form' => $this->_oTextData->getEditForm($aNews, array('status' => BX_NEWS_STATUS_INACTIVE)) 74 75 ); -
trunk/modules/boonex/news/install/langs/en.php
r10181 r10599 56 56 '_news_calendar_top_menu_sitem' => 'Calendar', 57 57 '_news_search_top_menu_sitem' => 'Search', 58 '_news_admin_menu_sitem' => 'News', 58 59 '_news_ext_menu_item' => 'News', 59 60 '_news_status_0' => 'active', -
trunk/modules/boonex/news/install/sql/install.sql
r10172 r10599 110 110 ('_news_ext_menu_item', 'News', '', 'modules/?r=news/', '', '', 6, '1', 0, 0, '', 'bottom', 'link'); 111 111 112 SET @iOrder = (SELECT `Order` FROM `sys_menu_admin` WHERE `Categ`='4' ORDER BY `Order` DESC LIMIT 1) + 1; 113 INSERT INTO `sys_menu_admin` (`Title`, `Url`, `Desc`, `Check`, `Order`, `Categ`, `Icon`) VALUES 114 ('News', '../modules/?r=news/admin/', 'For managing news', '', @iOrder, 4, 'modules/boonex/news/|site_news.gif'); 112 SELECT @iOrder:=MAX(`order`) FROM `sys_menu_admin` WHERE `parent_id`='2'; 113 INSERT INTO `sys_menu_admin`(`parent_id`, `name`, `title`, `url`, `description`, `icon`, `icon_large`, `check`, `order`) VALUES 114 (2, 'bx_news', '_news_admin_menu_sitem', '../modules/?r=news/admin/', 'For managing news', 'modules/boonex/news/|site_news.gif', '', '', @iOrder+1); 115 115 116 116 117 INSERT INTO `sys_permalinks`(`standard`, `permalink`, `check`) VALUES('modules/?r=news/', 'm/news/', 'permalinks_module_news'); -
trunk/modules/boonex/news/install/sql/uninstall.sql
r10079 r10599 9 9 DELETE FROM `sys_menu_top` WHERE `Name`='News' OR `Parent`=@iTMParentId; 10 10 DELETE FROM `sys_menu_member` WHERE `Name`='News'; 11 DELETE FROM `sys_menu_admin` WHERE ` Title`='News';11 DELETE FROM `sys_menu_admin` WHERE `name`='bx_news'; 12 12 13 13 DELETE FROM `sys_permalinks` WHERE `check`='permalinks_module_news'; -
trunk/modules/boonex/payment/admin.php
r10072 r10599 25 25 global $logged; 26 26 27 $logged['admin'] = member_auth(1, true, true);27 check_logged(); 28 28 29 $ sCaption = _t('_payment_pcaption_admin');30 $_page[' header'] = $sCaption;31 $_page['header _text'] = $sCaption;32 $_page['css_name'] = 'forms_adv.css';29 $iIndex = 9; 30 $_page['name_index'] = $iIndex; 31 $_page['header'] = _t('_payment_pcaption_admin'); 32 $_page['css_name'] = array('forms_adv.css', 'modules/boonex/payment/|orders.css'); 33 33 34 34 $oPayments = new BxPmtModule($aModule); 35 $sContentDetails = $oPayments->getDetailsForm(); 35 $aDetailsBox = $oPayments->getDetailsForm(); 36 $aPendingOrdersBox = $oPayments->getOrdersBlock('pending'); 37 $aProcessedOrdersBox = $oPayments->getOrdersBlock('processed'); 36 38 37 TopCodeAdmin(); 38 ContentBlockHead(_t('_payment_bcaption_details')); 39 echo $sContentDetails; 40 ContentBlockFoot(); 41 42 ContentBlockHead(_t('_payment_bcaption_settings')); 43 echo 'Under Development'; 44 ContentBlockFoot(); 45 BottomCode(); 39 $mixedResultSettings = ''; 40 if(isset($_POST['save']) && isset($_POST['cat'])) { 41 $mixedResultSettings = $oPayments->setSettings($_POST); 42 } 43 44 $_page_cont[$iIndex]['page_main_code'] = $oPayments->_oTemplate->addCss(array('orders.css'), true) . $oPayments->_oTemplate->addJs(array('orders.js'), true) . $oPayments->getExtraJs('orders'); 45 $_page_cont[$iIndex]['page_main_code'] .= DesignBoxAdmin(_t('_payment_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oPayments->getSettingsForm($mixedResultSettings)))); 46 $_page_cont[$iIndex]['page_main_code'] .= DesignBoxAdmin(_t('_payment_bcaption_details'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $aDetailsBox[0]))); 47 $_page_cont[$iIndex]['page_main_code'] .= DesignBoxAdmin(_t('_payment_bcaption_pending_orders'), $aPendingOrdersBox[0]); 48 $_page_cont[$iIndex]['page_main_code'] .= DesignBoxAdmin(_t('_payment_bcaption_processed_orders'), $aProcessedOrdersBox[0]); 49 $_page_cont[$iIndex]['page_main_code'] .= $oPayments->getMoreWindow(); 50 $_page_cont[$iIndex]['page_main_code'] .= $oPayments->getManualOrderWindow(); 51 PageCodeAdmin(); 46 52 ?> -
trunk/modules/boonex/payment/classes/BxPmtModule.php
r10239 r10599 21 21 22 22 bx_import('BxDolModule'); 23 bx_import('BxDolAdminSettings'); 23 24 24 25 require_once( BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php' ); … … 241 242 242 243 244 /** 245 * 246 * Admin Settings Methods 247 * 248 */ 249 function getSettingsForm($mixedResult) { 250 $iId = (int)$this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='Payment'"); 251 if(empty($iId)) 252 return MsgBox('_payment_msg_no_results'); 253 254 $oSettings = new BxDolAdminSettings($iId); 255 $sResult = $oSettings->getForm(); 256 257 if($mixedResult !== true && !empty($mixedResult)) 258 $sResult = $mixedResult . $sResult; 259 260 return $sResult; 261 } 262 function setSettings($aData) { 263 $iId = (int)$this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='Payment'"); 264 if(empty($iId)) 265 return MsgBox(_t('_payment_err_wrong_data')); 266 267 $oSettings = new BxDolAdminSettings($iId); 268 return $oSettings->saveChanges($_POST); 269 } 270 243 271 244 272 /** -
trunk/modules/boonex/payment/install/langs/en.php
r10232 r10599 109 109 '_payment_tmenu_payments' => 'Payments', 110 110 '_payment_tmenu_cart' => 'Cart', 111 '_payment_amenu_payment' => 'Payment', 111 112 '_payment_txt_admin_username' => 'Administrator', 112 113 '_payment_txt_shopping_cart' => '\'s cart', -
trunk/modules/boonex/payment/install/sql/install.sql
r10232 r10599 103 103 104 104 INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES 105 ('pmt_default_currency_code', 'USD', @iCategoryId, 'Currency code', ' combobox', 'return strlen($arg0) > 0;', 'Cannot be empty.', 0, 'USD,EURO'),105 ('pmt_default_currency_code', 'USD', @iCategoryId, 'Currency code', 'select', 'return strlen($arg0) > 0;', 'Cannot be empty.', 0, 'USD,EURO'), 106 106 ('pmt_default_currency_sign', '$', @iCategoryId, 'Currency sign', 'text', 'return strlen($arg0) > 0;', 'Cannot be empty.', 1, ''), 107 ('pmt_date_format_orders', '%d.%m.%y', @iCategoryId, 'Date format in orders administration', 'text', '', '', 1, ''),107 ('pmt_date_format_orders', '%d.%m.%y', @iCategoryId, 'Date format in orders administration', 'text', '', '', 2, ''), 108 108 ('permalinks_module_payment', 'on', 26, 'Enable friendly payment permalink', 'checkbox', '', '', 0, ''); 109 109 … … 133 133 (118, 'Cart', '_payment_tmenu_cart', 'modules/?r=payment/cart/|modules/?r=payment/history/', @iTMOrder+2, 'memb', '', '', '', 1, 1, 1, 'custom', 0, 'modules/boonex/payment/|tmenu_icon_cart.png', 0, ''); 134 134 135 SE T @iOrder = (SELECT `Order` FROM `sys_menu_admin` WHERE `Categ`='4' ORDER BY `Order` DESC LIMIT 1) + 1;136 INSERT INTO `sys_menu_admin` (`Title`, `Url`, `Desc`, `Check`, `Order`, `Categ`, `Icon`) VALUES137 ( 'Payment', '../modules/?r=payment/admin/', 'For managing payment module', '', @iOrder, 4, 'modules/boonex/payment/|amenu_item.gif');135 SELECT @iOrder:=MAX(`order`) FROM `sys_menu_admin` WHERE `parent_id`='2'; 136 INSERT INTO `sys_menu_admin`(`parent_id`, `name`, `title`, `url`, `description`, `icon`, `icon_large`, `check`, `order`) VALUES 137 (2, 'bx_payment', '_payment_amenu_payment', '../modules/?r=payment/admin/', 'For managing payment module', 'modules/boonex/payment/|amenu_item.gif', '', '', @iOrder+1); 138 138 139 139 -
trunk/modules/boonex/payment/install/sql/uninstall.sql
r10181 r10599 21 21 22 22 DELETE FROM `sys_menu_top` WHERE `Name` IN ('Payments', 'Cart'); 23 24 DELETE FROM `sys_menu_admin` WHERE `Title`='Payment'; 23 DELETE FROM `sys_menu_admin` WHERE `name`='bx_payment'; -
trunk/modules/boonex/payment/templates/base/css/orders.css
r10208 r10599 105 105 } 106 106 107 div.adm-db-content div#pmt-orders-pending { 108 width: 929px; 109 } 107 110 108 111 /*--- Table Styles ---*/
Note: See TracChangeset
for help on using the changeset viewer.