HomeHelpTrac

Changeset 15211 for trunk/administration


Ignore:
Timestamp:
06/07/11 23:41:51 (12 months ago)
Author:
Alexander Trofimov
Message:

Code cleaning:

  • converting new lines to \n
  • deleting spaces at the end of every line
  • converting all tabs to 4 spaces
  • automated script for future cleaning was added
Location:
trunk/administration
Files:
94 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/admin_tools.php

    r15201 r15211  
    1313$oAdmTools = new BxDolAdminTools(); 
    1414function PageCompAdmTools($oAdmTools) { 
    15     $sRetHtml = $oAdmTools->GenCommonCode(); 
     15    $sRetHtml = $oAdmTools->GenCommonCode(); 
    1616 
    17     switch (bx_get('action')) { 
    18         case 'perm_table': 
    19             $sRetHtml .= $oAdmTools->GenPermTable(); 
    20             break; 
    21         case 'main_params': 
    22             $sRetHtml .= $oAdmTools->GenMainParamsTable(); 
    23             break; 
    24         case 'main_page': 
    25             $sRetHtml .= $oAdmTools->GenTabbedPage(); 
    26             break; 
    27         default: 
    28             $sRetHtml .= $oAdmTools->GenTabbedPage(); 
    29             break; 
    30     } 
     17    switch (bx_get('action')) { 
     18        case 'perm_table': 
     19            $sRetHtml .= $oAdmTools->GenPermTable(); 
     20            break; 
     21        case 'main_params': 
     22            $sRetHtml .= $oAdmTools->GenMainParamsTable(); 
     23            break; 
     24        case 'main_page': 
     25            $sRetHtml .= $oAdmTools->GenTabbedPage(); 
     26            break; 
     27        default: 
     28            $sRetHtml .= $oAdmTools->GenTabbedPage(); 
     29            break; 
     30    } 
    3131 
    32     return $sRetHtml; 
     32    return $sRetHtml; 
    3333} 
    3434 
  • trunk/administration/advanced_settings.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3333$logged['admin'] = member_auth( 1, true, true ); 
    3434 
    35 $oSettings = new BxDolAdminSettings(0);  
     35$oSettings = new BxDolAdminSettings(0); 
    3636 
    3737//--- Process submit ---// 
  • trunk/administration/antispam.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4141            'action' => BX_DOL_URL_ADMIN . 'antispam.php?action=dnsbl_add&mode='.$sDefaultMode, 
    4242            'method' => 'post', 
    43             ),       
     43            ), 
    4444 
    4545            'params' => array ( 
     
    5050                ), 
    5151            ), 
    52                    
    53             'inputs' => array(                 
     52 
     53            'inputs' => array( 
    5454 
    5555                'chain' => array( 
     
    6565                    ), 
    6666                    'db' => array ( 
    67                         'pass' => 'Xss',  
    68                     ), 
    69                 ),             
     67                        'pass' => 'Xss', 
     68                    ), 
     69                ), 
    7070 
    7171                'zonedomain' => array( 
     
    7979                    ), 
    8080                    'db' => array ( 
    81                         'pass' => 'Xss',  
     81                        'pass' => 'Xss', 
    8282                    ), 
    8383                ), 
     
    9393                    ), 
    9494                    'db' => array ( 
    95                         'pass' => 'Xss',  
     95                        'pass' => 'Xss', 
    9696                    ), 
    9797                ), 
     
    102102                    'caption' => _t('_sys_adm_fld_dnsbl_url'), 
    103103                    'db' => array ( 
    104                         'pass' => 'Xss',  
     104                        'pass' => 'Xss', 
    105105                    ), 
    106106                ), 
     
    111111                    'caption' => _t('_sys_adm_fld_dnsbl_recheck_url'), 
    112112                    'db' => array ( 
    113                         'pass' => 'Xss',  
     113                        'pass' => 'Xss', 
    114114                    ), 
    115115                ), 
     
    120120                    'caption' => _t('_sys_adm_fld_dnsbl_comment'), 
    121121                    'db' => array ( 
    122                         'pass' => 'Xss',  
     122                        'pass' => 'Xss', 
    123123                    ), 
    124124                ), 
     
    131131                    'value' => '1', 
    132132                    'db' => array ( 
    133                         'pass' => 'Int',  
    134                     ), 
    135                 ),             
     133                        'pass' => 'Int', 
     134                    ), 
     135                ), 
    136136 
    137137                'Submit' => array ( 
     
    141141                    'colspan' => true, 
    142142                ), 
    143             ),             
     143            ), 
    144144        ); 
    145145 
     
    147147    } 
    148148} 
    149      
     149 
    150150 
    151151 
     
    161161                'onsubmit' => "return bs_sys_adm_dbsbl_recheck($('#$sId').val());", 
    162162                'method' => 'post', 
    163             ),       
    164                    
     163            ), 
     164 
    165165            'inputs' => array( 
    166166 
     
    179179                    'colspan' => true, 
    180180                ), 
    181             ),             
     181            ), 
    182182        ); 
    183183 
     
    196196 
    197197        case 'dnsbl_log': 
    198             $sPopupTitle = _t('_sys_adm_title_dnsbl_log');   
     198            $sPopupTitle = _t('_sys_adm_title_dnsbl_log'); 
    199199            $sPopupContent = PageCodeLog ('dnsbl'); 
    200200            break; 
    201201 
    202202        case 'dnsbluri_log': 
    203             $sPopupTitle = _t('_sys_adm_title_dnsbluri_log');   
     203            $sPopupTitle = _t('_sys_adm_title_dnsbluri_log'); 
    204204            $sPopupContent = PageCodeLog ('dnsbluri'); 
    205205            break; 
    206206 
    207207        case 'akismet_log': 
    208             $sPopupTitle = _t('_sys_adm_title_akismet_log');   
     208            $sPopupTitle = _t('_sys_adm_title_akismet_log'); 
    209209            $sPopupContent = PageCodeLog ('akismet'); 
    210210            break; 
     
    245245        'title' => $sPopupTitle, 
    246246        'content' => $sPopupContent, 
    247     );         
     247    ); 
    248248    echo $GLOBALS['oFunctions']->transBox($GLOBALS['oSysTemplate']->parseHtmlByName('popup.html', $aVarsPopup), true); 
    249249    exit; 
     
    262262        $o = bx_instance('BxDolDNSBlacklists'); 
    263263        $aChain = $GLOBALS['MySQL']->getAll("SELECT `zonedomain`, `postvresp` FROM `sys_dnsbl_rules` WHERE `id` = '".(int)$_POST['id']."' AND `active` = 1"); 
    264          
     264 
    265265        $iRet = BX_DOL_DNSBL_FAILURE; 
    266266        if ($aChain) { 
     
    271271                $sUrl = preg_replace('/^www\./', '', $sUrl); 
    272272                $oBxDolDNSURIBlacklists = bx_instance('BxDolDNSURIBlacklists'); 
    273                 $aUrls = $oBxDolDNSURIBlacklists->validateUrls(array($sUrl));  
     273                $aUrls = $oBxDolDNSURIBlacklists->validateUrls(array($sUrl)); 
    274274                if ($aUrls) 
    275275                    $iRet = $o->dnsbl_lookup_uri($aUrls[0], $aChain); 
     
    292292    case (isset($_POST['adm-dnsbl-activate'])): 
    293293        foreach($_POST['rules'] as $iRuleId) 
    294             db_res("UPDATE `sys_dnsbl_rules` SET `active` = 1 WHERE `id` = " . (int)$iRuleId);         
     294            db_res("UPDATE `sys_dnsbl_rules` SET `active` = 1 WHERE `id` = " . (int)$iRuleId); 
    295295        $oBxDolDNSBlacklists->clearCache(); 
    296296        break; 
     
    310310    case (isset($_GET['action']) && 'dnsbl_add' == $_GET['action'] && $_POST['dnsbl_add']): 
    311311        $oForm = new BxDolAdmFormDnsblAdd (); 
    312         $oForm->initChecker();         
     312        $oForm->initChecker(); 
    313313        if ($oForm->isSubmittedAndValid () && $oForm->insert ()) 
    314314            $sGlMsg = MsgBox(_t('_sys_sucess_result')); 
     
    354354$sActions = '<div class="dbTopMenu">'; 
    355355foreach ($aPages as $k => $r) 
    356     $sActions .= ' 
     356    $sActions .= ' 
    357357    <div class="' . ($k == $sMode ? 'active' : 'notActive') . '" id="dbmenu_' . $k . '"> 
    358358        <span> 
     
    366366 
    367367$_page = array( 
    368     'name_index' => $iNameIndex,     
     368    'name_index' => $iNameIndex, 
    369369    'header' => $sPageTitle, 
    370370    'header_text' => $sPageTitle, 
     
    387387        'adm-dnsbl-deactivate' => _t('_sys_adm_btn_dnsbl_deactivate'), 
    388388    ), 'rules'); 
    389      
     389 
    390390    $sChains = "'" . implode("','", $aChains) . "'"; 
    391391 
     
    408408        $s = MsgBox(_t('_Empty')); 
    409409    } 
    410      
     410 
    411411    return DesignBoxContent ($GLOBALS['sPageTitle'], $s, 1, $GLOBALS['sActions']); 
    412412} 
     
    443443 
    444444function PageCodeRecheckPopup ($aChains, $sFieldTitle, $sId, $sAction) { 
    445              
     445 
    446446    $sChains = "'" . implode("','", $aChains) . "'"; 
    447     $aRules = $GLOBALS['MySQL']->getAll("SELECT * FROM `sys_dnsbl_rules` WHERE `chain` IN($sChains) AND `active` = 1 ORDER BY `chain`, `added` ");             
     447    $aRules = $GLOBALS['MySQL']->getAll("SELECT * FROM `sys_dnsbl_rules` WHERE `chain` IN($sChains) AND `active` = 1 ORDER BY `chain`, `added` "); 
    448448    $oForm = new BxDolAdmFormDnsblRecheck($sFieldTitle, $sId); 
    449449    return $GLOBALS['oAdmTemplate']->parseHtmlByName('antispam_dnsbl_recheck.html', array( 
     
    458458} 
    459459 
    460 function PageCodeLog ($sMode) {  
    461      
     460function PageCodeLog ($sMode) { 
     461 
    462462    switch ($sMode) { 
    463463        case 'dnsbl': 
     
    469469    } 
    470470 
    471     $iPage = isset($_GET['page']) && (int)$_GET['page'] > 0 ? (int)$_GET['page'] : 1;  
     471    $iPage = isset($_GET['page']) && (int)$_GET['page'] > 0 ? (int)$_GET['page'] : 1; 
    472472    $iPerPage = 12; 
    473473    $iStart = ($iPage-1) * $iPerPage; 
    474      
     474 
    475475    $aLog = $GLOBALS['MySQL']->getAll("SELECT SQL_CALC_FOUND_ROWS * FROM `sys_antispam_block_log` WHERE `type` = '$sMode' ORDER BY `added` DESC LIMIT $iStart, $iPerPage"); 
    476476    $iCount = $GLOBALS['MySQL']->getOne("SELECT FOUND_ROWS()"); 
  • trunk/administration/basic_settings.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4343$mixedResultPromo = ''; 
    4444 
    45 $oSettings = new BxDolAdminSettings(7);  
     45$oSettings = new BxDolAdminSettings(7); 
    4646 
    4747//--- Logo uploading ---// 
    4848if(isset($_POST['upload']) && isset($_FILES['new_file'])) 
    4949    $mixedResultLogo = setLogo($_POST, $_FILES); 
    50      
     50 
    5151//--- Promo image uploading ---// 
    5252if(isset($_POST['save_image']) && isset($_FILES['browse_image'])) { 
     
    5757//--- Promo image deleting ---// 
    5858if (!empty($_GET['delete'])) { 
    59     $sFile = process_pass_data( $_GET['delete'] ); 
    60  
    61     $sFile = str_replace('\\', '', $sFile); 
    62     $sFile = str_replace('/', '', $sFile); 
    63  
    64     $bResult = @unlink($dir['imagesPromo'] . $sFile) && @unlink($dir['imagesPromo'] . 'original/' . $sFile); 
    65  
    66     if(!$bResult) 
    67        $mixedResultPromo = '_adm_txt_settings_file_cannot_delete'; 
     59    $sFile = process_pass_data( $_GET['delete'] ); 
     60 
     61    $sFile = str_replace('\\', '', $sFile); 
     62    $sFile = str_replace('/', '', $sFile); 
     63 
     64    $bResult = @unlink($dir['imagesPromo'] . $sFile) && @unlink($dir['imagesPromo'] . 'original/' . $sFile); 
     65 
     66    if(!$bResult) 
     67       $mixedResultPromo = '_adm_txt_settings_file_cannot_delete'; 
    6868} 
    6969 
     
    117117                'name' => 'browse_image', 
    118118                'caption' => _t('_adm_txt_settings_promo_browse'), 
    119                 'value' => '',                 
     119                'value' => '', 
    120120            ), 
    121121            'save_image' => array( 
     
    127127    ); 
    128128    $oFormImage = new BxTemplFormView($aFormImage); 
    129      
     129 
    130130    $aFormText = array( 
    131131        'form_attrs' => array( 
     
    151151                'html' => 2, 
    152152                'db' => array ( 
    153                     'pass' => 'XssHtml',  
     153                    'pass' => 'XssHtml', 
    154154                ), 
    155155            ), 
     
    162162    ); 
    163163    $oFormText = new BxTemplFormView($aFormText); 
    164      
     164 
    165165    $bPromoImage = getParam('enable_flash_promo') == 'on'; 
    166166    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('promo.html', array( 
     
    172172        'content_text' => $oFormText->getCode() 
    173173    )); 
    174      
     174 
    175175    return DesignBoxAdmin(_t('_adm_box_cpt_promo'), $sResult); 
    176176} 
     
    239239        ) 
    240240    ); 
    241      
     241 
    242242    $oForm = new BxTemplFormView($aForm); 
    243243    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode())); 
    244      
     244 
    245245    if($mixedResultLogo !== true && !empty($mixedResultLogo)) 
    246246        $sResult = MsgBox(_t($mixedResultLogo), 3) . $sResult; 
     
    252252    global $dir; 
    253253 
    254     $aFileInfo = getimagesize($aFile['new_file']['tmp_name']); 
    255     if(empty($aFileInfo)) 
    256         return '_adm_txt_settings_file_not_image'; 
    257  
    258     $sExt = ''; 
    259     switch( $aFileInfo['mime'] ) { 
    260         case 'image/jpeg': $sExt = 'jpg'; break; 
    261         case 'image/gif':  $sExt = 'gif'; break; 
    262         case 'image/png':  $sExt = 'png'; break; 
    263     } 
    264     if(empty($sExt)) 
    265         return '_adm_txt_settings_file_wrong_format'; 
     254    $aFileInfo = getimagesize($aFile['new_file']['tmp_name']); 
     255    if(empty($aFileInfo)) 
     256        return '_adm_txt_settings_file_not_image'; 
     257 
     258    $sExt = ''; 
     259    switch( $aFileInfo['mime'] ) { 
     260        case 'image/jpeg': $sExt = 'jpg'; break; 
     261        case 'image/gif':  $sExt = 'gif'; break; 
     262        case 'image/png':  $sExt = 'png'; break; 
     263    } 
     264    if(empty($sExt)) 
     265        return '_adm_txt_settings_file_wrong_format'; 
    266266 
    267267    $sFileName = mktime() . '.' . $sExt; 
    268     $sFilePath = $dir['mediaImages'] . $sFileName; 
    269     if(!move_uploaded_file($aFile['new_file']['tmp_name'], $sFilePath)) 
    270         return '_adm_txt_settings_file_cannot_move'; 
    271  
    272     if(!empty($aData['resize'])) { 
    273         $iWidth = (int)$aData['new_width']; 
    274         $iHeight = (int)$aData['new_height']; 
    275         if($iWidth <= 0 || $iHeight <= 0) 
    276             return '_adm_txt_settings_logo_wrong_size'; 
    277          
    278         if(imageResize($sFilePath, $sFilePath, $iWidth, $iHeight) != IMAGE_ERROR_SUCCESS) 
    279             return '_adm_txt_settings_image_cannot_resize'; 
    280     } 
    281      
    282     @unlink($dir['mediaImages'] . getParam('sys_main_logo')); 
    283     setParam('sys_main_logo', $sFileName); 
    284  
    285     return true; 
     268    $sFilePath = $dir['mediaImages'] . $sFileName; 
     269    if(!move_uploaded_file($aFile['new_file']['tmp_name'], $sFilePath)) 
     270        return '_adm_txt_settings_file_cannot_move'; 
     271 
     272    if(!empty($aData['resize'])) { 
     273        $iWidth = (int)$aData['new_width']; 
     274        $iHeight = (int)$aData['new_height']; 
     275        if($iWidth <= 0 || $iHeight <= 0) 
     276            return '_adm_txt_settings_logo_wrong_size'; 
     277 
     278        if(imageResize($sFilePath, $sFilePath, $iWidth, $iHeight) != IMAGE_ERROR_SUCCESS) 
     279            return '_adm_txt_settings_image_cannot_resize'; 
     280    } 
     281 
     282    @unlink($dir['mediaImages'] . getParam('sys_main_logo')); 
     283    setParam('sys_main_logo', $sFileName); 
     284 
     285    return true; 
    286286} 
    287287function getPromoImages() { 
    288     global $site; 
    289      
    290     $aFiles = getPromoImagesArray(); 
    291     if(empty($aFiles)) 
    292        return MsgBox(_t('_Empty')); 
    293      
    294     $aResult = array();  
    295     foreach($aFiles as $sFile) { 
    296         $aResult[] = array( 
     288    global $site; 
     289 
     290    $aFiles = getPromoImagesArray(); 
     291    if(empty($aFiles)) 
     292       return MsgBox(_t('_Empty')); 
     293 
     294    $aResult = array(); 
     295    foreach($aFiles as $sFile) { 
     296        $aResult[] = array( 
    297297            'delete_url' => $GLOBALS['site']['url_admin'] . 'basic_settings.php?delete=' . urlencode($sFile), 
    298298            'title' => $sFile 
    299         ); 
    300     } 
    301     return $GLOBALS['oAdmTemplate']->parseHtmlByName('promo_images.html', array( 
     299        ); 
     300    } 
     301    return $GLOBALS['oAdmTemplate']->parseHtmlByName('promo_images.html', array( 
    302302        'bx_repeat:images' => $aResult, 
    303303        'images_url' => $site['imagesPromo'] 
     
    307307    global $dir; 
    308308 
    309     $aFileInfo = getimagesize($aFile['browse_image']['tmp_name']); 
    310     if(empty($aFileInfo)) 
    311         return '_adm_txt_settings_file_not_image'; 
    312  
    313     $sExt = ''; 
    314     switch( $aFileInfo['mime'] ) { 
    315         case 'image/jpeg': $sExt = 'jpg'; break; 
    316         case 'image/gif':  $sExt = 'gif'; break; 
    317         case 'image/png':  $sExt = 'png'; break; 
    318     } 
    319     if(empty($sExt)) 
    320         return '_adm_txt_settings_file_wrong_format'; 
     309    $aFileInfo = getimagesize($aFile['browse_image']['tmp_name']); 
     310    if(empty($aFileInfo)) 
     311        return '_adm_txt_settings_file_not_image'; 
     312 
     313    $sExt = ''; 
     314    switch( $aFileInfo['mime'] ) { 
     315        case 'image/jpeg': $sExt = 'jpg'; break; 
     316        case 'image/gif':  $sExt = 'gif'; break; 
     317        case 'image/png':  $sExt = 'png'; break; 
     318    } 
     319    if(empty($sExt)) 
     320        return '_adm_txt_settings_file_wrong_format'; 
    321321 
    322322    $sFileName = $aFile['browse_image']['name']; 
    323     $sFilePath = $dir['imagesPromo'] . 'original/' . $sFileName; 
    324     if(!move_uploaded_file($aFile['browse_image']['tmp_name'], $sFilePath)) 
    325         return '_adm_txt_settings_file_cannot_move'; 
     323    $sFilePath = $dir['imagesPromo'] . 'original/' . $sFileName; 
     324    if(!move_uploaded_file($aFile['browse_image']['tmp_name'], $sFilePath)) 
     325        return '_adm_txt_settings_file_cannot_move'; 
    326326 
    327327    ResizeAllPromos(); 
    328     return true; 
     328    return true; 
    329329} 
    330330?> 
  • trunk/administration/cache.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3232switch($_POST['type']) { 
    3333    case 'all': 
    34         //member menu 
    35         bx_import('BxDolMemberMenu'); 
     34        //member menu 
     35        bx_import('BxDolMemberMenu'); 
    3636        $oMemberMenu = new BxDolMemberMenu(); 
    3737        $oMemberMenu -> deleteMemberMenuCaches(); 
    3838 
    3939        // page blocks 
    40         bx_import('BxDolPageViewAdmin');  
     40        bx_import('BxDolPageViewAdmin'); 
    4141        $oPageViewCacher = new BxDolPageViewCacher ('', ''); 
    4242        $oCachePb = $oPageViewCacher->getBlocksCacheObject (); 
    4343        $aResult = clearCacheObject ($oCachePb, 'pb_'); 
    44         if($aResult['code'] != 0)  
     44        if($aResult['code'] != 0) 
    4545            break; 
    4646 
    4747        // users 
    4848        $aResult = clearCache('user', BX_DIRECTORY_PATH_CACHE); 
    49         if($aResult['code'] != 0)  
     49        if($aResult['code'] != 0) 
    5050            break; 
    5151 
     
    5454        $oCacheDb = $GLOBALS['MySQL']->getDbCacheObject(); 
    5555        $aResult = clearCacheObject ($oCacheDb, 'db_'); 
    56         if($aResult['code'] != 0)  
     56        if($aResult['code'] != 0) 
    5757            break; 
    5858 
     
    6060        $oCacheTemplates = $GLOBALS['oSysTemplate']->getTemplatesCacheObject(); 
    6161        $aResult = clearCacheObject($oCacheTemplates, $GLOBALS['oSysTemplate']->_sCacheFilePrefix); 
    62         if($aResult['code'] != 0)  
     62        if($aResult['code'] != 0) 
    6363            break; 
    64              
     64 
    6565        // CSS 
    6666        $aResult = clearCache($GLOBALS['oSysTemplate']->_sCssCachePrefix, BX_DIRECTORY_PATH_CACHE_PUBLIC); 
    67         if($aResult['code'] != 0)  
     67        if($aResult['code'] != 0) 
    6868            break; 
    69                      
     69 
    7070        // JS 
    7171        $aResult = clearCache($GLOBALS['oSysTemplate']->_sJsCachePrefix, BX_DIRECTORY_PATH_CACHE_PUBLIC); 
     
    7373 
    7474    case 'pb': 
    75         bx_import('BxDolPageViewAdmin');  
     75        bx_import('BxDolPageViewAdmin'); 
    7676        $oPageViewCacher = new BxDolPageViewCacher ('', ''); 
    7777        $oCachePb = $oPageViewCacher->getBlocksCacheObject (); 
     
    8080 
    8181    case 'users': 
    82         //member menu 
    83         bx_import('BxDolMemberMenu'); 
     82        //member menu 
     83        bx_import('BxDolMemberMenu'); 
    8484        $oMemberMenu = new BxDolMemberMenu(); 
    8585        $oMemberMenu -> deleteMemberMenuCaches(); 
     
    101101    case 'js_css': 
    102102        $aResult = clearCache($GLOBALS['oSysTemplate']->_sCssCachePrefix, BX_DIRECTORY_PATH_CACHE_PUBLIC); 
    103         if($aResult['code'] == 0)             
     103        if($aResult['code'] == 0) 
    104104            $aResult = clearCache($GLOBALS['oSysTemplate']->_sJsCachePrefix, BX_DIRECTORY_PATH_CACHE_PUBLIC); 
    105105        break; 
    106106} 
    107107 
    108 $oJson = new Services_JSON();    
     108$oJson = new Services_JSON(); 
    109109echo $oJson->encode($aResult); 
    110110exit; 
     
    126126                @unlink($sPath . $sFile); 
    127127    } 
    128     else  
     128    else 
    129129        $aResult = array('code' => 1, 'message' => _t('_adm_txt_dashboard_cache_clean_failed')); 
    130130 
  • trunk/administration/categories.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3535$aBxSecurityExceptions = array (); 
    3636if (bx_get('pathes') !== false) { 
    37     $aPathes = bx_get('pathes'); 
    38  
    39     if(is_array($aPathes)) 
    40         for ($i=0; $i<count($aPathes); ++$i) { 
    41             $aBxSecurityExceptions[] = 'POST.pathes.'.$i; 
    42             $aBxSecurityExceptions[] = 'REQUEST.pathes.'.$i; 
    43         } 
     37    $aPathes = bx_get('pathes'); 
     38 
     39    if(is_array($aPathes)) 
     40        for ($i=0; $i<count($aPathes); ++$i) { 
     41            $aBxSecurityExceptions[] = 'POST.pathes.'.$i; 
     42            $aBxSecurityExceptions[] = 'REQUEST.pathes.'.$i; 
     43        } 
    4444} 
    4545 
     
    4848function actionAllCategories() { 
    4949    $oDb = new BxDolDb(); 
    50      
     50 
    5151    // check actions 
    5252    if(bx_get('pathes') !== false) { 
    53         $aPathes = bx_get('pathes'); 
    54          
    55         if(is_array($aPathes) && !empty($aPathes)) 
    56             foreach($_POST['pathes'] as $sValue) { 
    57                 list($sCategory, $sId, $sType) = split('%%', $sValue); 
    58                  
    59                 if (bx_get('action_disable') !== flase) 
    60                     $oDb->query("UPDATE `sys_categories` SET `Status` = 'passive' WHERE  
    61                         `Category` = '$sCategory' AND `ID` = $sId AND `Type` = '$sType'"); 
    62                 else if(bx_get('action_delete') !== false) 
    63                     $oDb->query("DELETE FROM `sys_categories` WHERE  
    64                         `Category` = '$sCategory' AND `ID` = $sId AND `Type` = '$sType'"); 
    65             } 
    66     } 
    67      
     53        $aPathes = bx_get('pathes'); 
     54 
     55        if(is_array($aPathes) && !empty($aPathes)) 
     56            foreach($_POST['pathes'] as $sValue) { 
     57                list($sCategory, $sId, $sType) = split('%%', $sValue); 
     58 
     59                if (bx_get('action_disable') !== flase) 
     60                    $oDb->query("UPDATE `sys_categories` SET `Status` = 'passive' WHERE 
     61                        `Category` = '$sCategory' AND `ID` = $sId AND `Type` = '$sType'"); 
     62                else if(bx_get('action_delete') !== false) 
     63                    $oDb->query("DELETE FROM `sys_categories` WHERE 
     64                        `Category` = '$sCategory' AND `ID` = $sId AND `Type` = '$sType'"); 
     65            } 
     66    } 
     67 
    6868    $sContent = MsgBox(_t('_Empty')); 
    6969    $aModules = array(); 
    7070    $oCategories = new BxDolCategories(); 
    7171    $oCategories->getTagObjectConfig(); 
    72      
     72 
    7373    if (!empty($oCategories->aTagObjects)) 
    7474    { 
     
    7878            if (!$sModule) 
    7979                $sModule = $sKey; 
    80                  
     80 
    8181            $aModules[] = array( 
    8282                'value' => $sKey, 
     
    8585            ); 
    8686        } 
    87          
     87 
    8888        $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('top_block_select.html', array( 
    8989            'name' => _t('_categ_modules'), 
     
    9191            'location_href' => BX_DOL_URL_ADMIN . 'categories.php?action=all&module=' 
    9292        )); 
    93          
     93 
    9494        $aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'active' AND `Owner` = 0 AND `Type` = '$sModule'"); 
    95          
     95 
    9696        if (!empty($aCategories)) 
    9797        { 
    9898            $aItems = array(); 
    9999            $sFormName = 'categories_form'; 
    100              
    101             foreach($aCategories as $aCategory)  
     100 
     101            foreach($aCategories as $aCategory) 
    102102            { 
    103103                $aItems[] = array( 
     
    107107                ); 
    108108            } 
    109              
     109 
    110110            $sControls = $sControls = BxTemplSearchResult::showAdminActionsPanel($sFormName, array( 
    111111                'action_disable' => _t('_categ_btn_disable'), 
    112112                'action_delete' => _t('_categ_btn_delete') 
    113113            ), 'pathes'); 
    114              
     114 
    115115            $sContent .= $GLOBALS['oAdmTemplate']->parseHtmlByName('categories_list.html', array( 
    116116                'form_name' => $sFormName, 
     
    122122            $sContent .= MsgBox(_t('_Empty')); 
    123123    } 
    124      
     124 
    125125    return $sContent; 
    126126} 
     
    131131    $sFormName = 'categories_aprove_form'; 
    132132    $aItems = array(); 
    133      
     133 
    134134    if(is_array($_POST['pathes']) && !empty($_POST['pathes'])) 
    135135    { 
     
    137137        { 
    138138            list($sCategory, $sId, $sType) = split('%%', $sValue); 
    139             $oDb->query("UPDATE `sys_categories` SET `Status` = 'active' WHERE  
     139            $oDb->query("UPDATE `sys_categories` SET `Status` = 'active' WHERE 
    140140                `Category` = '$sCategory' AND `ID` = $sId AND `Type` = '$sType'"); 
    141141        } 
    142142    } 
    143      
     143 
    144144    $aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'passive'"); 
    145      
     145 
    146146    if (!empty($aCategories)) 
    147147    { 
    148         foreach($aCategories as $aCategory)  
     148        foreach($aCategories as $aCategory) 
    149149        { 
    150150            $aItems[] = array( 
     
    154154            ); 
    155155        } 
    156          
     156 
    157157        $aButtons = array( 
    158158            'action_activate' => _t('_categ_btn_activate'), 
    159         );         
     159        ); 
    160160        $sControls = BxTemplSearchResult::showAdminActionsPanel($sFormName, $aButtons, 'pathes'); 
    161          
     161 
    162162        return $GLOBALS['oAdmTemplate']->parseHtmlByName('categories_list.html', array( 
    163163            'form_name' => $sFormName, 
     
    178178    { 
    179179        $oSettings = new BxDolAdminSettings($iId); 
    180          
     180 
    181181        $mixedResult = ''; 
    182182        if(isset($_POST['save']) && isset($_POST['cat'])) 
    183183            $mixedResult = $oSettings->saveChanges($_POST); 
    184          
     184 
    185185        $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oSettings->getForm())); 
    186          
     186 
    187187        if($mixedResult !== true && !empty($mixedResult)) 
    188188            $sResult = $mixedResult . $sResult; 
    189          
     189 
    190190        return $sResult; 
    191191    } 
     
    199199    $aTypes = array(); 
    200200    $oCateg->getTagObjectConfig(); 
    201      
     201 
    202202    foreach ($oCateg->aTagObjects as $sKey => $aValue) 
    203203        $aTypes[$sKey] = _t($aValue[$oCateg->aObjFields['lang_key']]); 
    204      
     204 
    205205    $aForm = array( 
    206      
     206 
    207207        'form_attrs' => array( 
    208208            'name'     => 'category_form', 
     
    210210            'method'   => 'post', 
    211211            'enctype' => 'multipart/form-data', 
    212         ),       
     212        ), 
    213213 
    214214        'params' => array ( 
     
    218218            ), 
    219219        ), 
    220                
     220 
    221221        'inputs' => array( 
    222              
     222 
    223223            'name' => array( 
    224224                'type' => 'text', 
     
    251251                    'pass' => 'Xss' 
    252252                ), 
    253             ),  
     253            ), 
    254254            'submit' => array ( 
    255255                'type' => 'submit', 
     
    257257                'value' => _t('_Submit'), 
    258258                'colspan' => false, 
    259             ),             
    260         )                 
     259            ), 
     260        ) 
    261261    ); 
    262      
     262 
    263263    return new BxTemplFormView($aForm); 
    264264} 
     
    269269    $oForm->initChecker(); 
    270270    $sResult = ''; 
    271      
     271 
    272272    if ($oForm->isSubmittedAndValid()) 
    273273    { 
    274274        $oDb = new BxDolDb(); 
    275         if ($oDb->getOne("SELECT COUNT(*) FROM `sys_categories` WHERE `Category` = '" .  
    276             $oForm->getCleanValue('Category') . "' AND `ID` = 0 AND `Type` = '" .  
     275        if ($oDb->getOne("SELECT COUNT(*) FROM `sys_categories` WHERE `Category` = '" . 
     276            $oForm->getCleanValue('Category') . "' AND `ID` = 0 AND `Type` = '" . 
    277277            $oForm->getCleanValue('Type') . "'") == 0) 
    278278        { 
     
    282282                'Status' => 'active', 
    283283            ); 
    284              
     284 
    285285            $oForm->insert($aValsAdd); 
    286286            header('Location:' . BX_DOL_URL_ADMIN . 'categories.php?action=all&module=' . $oForm->getCleanValue('Type')); 
     
    289289            $sResult = sprintf(_t('_categ_exist_err'), $oForm->getCleanValue('Category')); 
    290290    } 
    291      
     291 
    292292    return (strlen($sResult) > 0 ? MsgBox($sResult) : '') . 
    293293        $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode())); 
     
    297297$aMenu = array( 
    298298    'all' => array( 
    299         'title' => _t('_categ_all'),  
    300         'href' => $GLOBALS['site']['url_admin'] . 'categories.php?action=all',  
     299        'title' => _t('_categ_all'), 
     300        'href' => $GLOBALS['site']['url_admin'] . 'categories.php?action=all', 
    301301        '_func' => array ('name' => 'actionAllCategories', 'params' => array()), 
    302302    ), 
    303303    'pending' => array( 
    304         'title' => _t('_categ_admin_pending'),  
    305         'href' => $GLOBALS['site']['url_admin'] . 'categories.php?action=pending',  
     304        'title' => _t('_categ_admin_pending'), 
     305        'href' => $GLOBALS['site']['url_admin'] . 'categories.php?action=pending', 
    306306        '_func' => array ('name' => 'actionPending', 'params' => array()), 
    307307    ), 
    308308    'settings' => array( 
    309         'title' => _t('_categ_admin_settings'),  
     309        'title' => _t('_categ_admin_settings'), 
    310310        'href' => $GLOBALS['site']['url_admin'] . 'categories.php?action=settings', 
    311311        '_func' => array ('name' => 'actionSettings', 'params' => array()), 
     
    323323); 
    324324 
    325 $_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_categ_form_add'), getAddCategoryForm()) .  
     325$_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_categ_form_add'), getAddCategoryForm()) . 
    326326    DesignBoxAdmin($aMenu[$sAction]['title'], $sContent, $aMenu); 
    327327 
  • trunk/administration/css_file.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4444$_page_cont[$iNameIndex]['page_main_code'] = PageCodeEdit(); 
    4545define('BX_PROMO_CODE', 'on' == getParam('feeds_enable') ? DesignBoxAdmin (_t('_adm_box_cpt_design_templates'), ' 
    46     <div class="RSSAggrCont" rssid="boonex_unity_market_templates" rssnum="5" member="0"> 
    47         <div class="loading_rss"> 
    48             <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> 
    49         </div> 
    50     </div>') : '');  
     46    <div class="RSSAggrCont" rssid="boonex_unity_market_templates" rssnum="5" member="0"> 
     47        <div class="loading_rss"> 
     48            <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> 
     49        </div> 
     50    </div>') : ''); 
    5151 
    5252PageCodeAdmin(); 
     
    7070            ), 
    7171        ), 
    72         'inputs' => array (             
     72        'inputs' => array ( 
    7373            'css_file' => array( 
    7474                'type' => 'select', 
     
    9494                'name' => 'adm-css-save', 
    9595                'value' => _t('_adm_btn_css_save'), 
    96             ),                 
     96            ), 
    9797        ) 
    9898    ); 
    99      
     99 
    100100    //--- Get CSS files ---// 
    101101    $aItems = array(); 
     
    103103 
    104104    $rHandle = opendir($sBasePath); 
    105     while(($sFile = readdir($rHandle)) !== false) 
    106         if(is_file($sBasePath . $sFile) && substr($sFile, -3) == 'css') 
    107             $aItems[] = array('key' => $sFile, 'value' => $sFile); 
    108     closedir($rHandle); 
     105    while(($sFile = readdir($rHandle)) !== false) 
     106        if(is_file($sBasePath . $sFile) && substr($sFile, -3) == 'css') 
     107            $aItems[] = array('key' => $sFile, 'value' => $sFile); 
     108    closedir($rHandle); 
    109109 
    110     $sCurrentFile = isset($_POST['css_file']) && preg_match("/^\w+\.css$/", $_POST['css_file']) ? $_POST['css_file'] : $aItems[0]['key']; 
    111     $aForm['inputs']['css_file']['value'] = $sCurrentFile; 
     110    $sCurrentFile = isset($_POST['css_file']) && preg_match("/^\w+\.css$/", $_POST['css_file']) ? $_POST['css_file'] : $aItems[0]['key']; 
     111    $aForm['inputs']['css_file']['value'] = $sCurrentFile; 
    112112    $aForm['inputs']['css_file']['values'] = $aItems; 
    113113 
    114     //--- Get CSS file's content ---// 
    115     $sContent = ''; 
    116     $sAbsolutePath = $sBasePath . $sCurrentFile; 
    117     if(strlen($sCurrentFile) > 0 && is_file($sAbsolutePath) ) { 
    118        $rHandle = fopen($sAbsolutePath, 'r');            
    119         while(!feof($rHandle)) 
    120             $sContent .= fgets($rHandle, 4096); 
    121         fclose($rHandle); 
    122     } 
    123     //$aForm['inputs']['content']['value'] = isset($_POST['content']) ? $_POST['content'] : $sContent; 
    124     $aForm['inputs']['content']['value'] = $sContent; 
    125      
     114    //--- Get CSS file's content ---// 
     115    $sContent = ''; 
     116    $sAbsolutePath = $sBasePath . $sCurrentFile; 
     117    if(strlen($sCurrentFile) > 0 && is_file($sAbsolutePath) ) { 
     118       $rHandle = fopen($sAbsolutePath, 'r'); 
     119        while(!feof($rHandle)) 
     120            $sContent .= fgets($rHandle, 4096); 
     121        fclose($rHandle); 
     122    } 
     123    //$aForm['inputs']['content']['value'] = isset($_POST['content']) ? $_POST['content'] : $sContent; 
     124    $aForm['inputs']['content']['value'] = $sContent; 
     125 
    126126    $oForm = new BxTemplFormView($aForm); 
    127127    $oForm->initChecker(); 
     
    131131            $rHandle = fopen($sAbsolutePath, 'w'); 
    132132            if($rHandle) { 
    133                 fwrite($rHandle, clear_xss($_POST['content'])); 
    134                 fclose($rHandle); 
     133                fwrite($rHandle, clear_xss($_POST['content'])); 
     134                fclose($rHandle); 
    135135 
    136                 $mixedResult = '_adm_txt_css_success_save'; 
     136                $mixedResult = '_adm_txt_css_success_save'; 
    137137            } else 
    138                 $mixedResult = '_adm_txt_css_failed_save'; 
     138                $mixedResult = '_adm_txt_css_failed_save'; 
    139139        } else 
    140140            $mixedResult = '_adm_txt_css_cannot_write'; 
  • trunk/administration/db.php

    r15201 r15211  
    22 
    33// TODO: remake according to new design and principles, site setup part leave in admin and remake other functionality move to user part 
    4          
     4 
    55/*************************************************************************** 
    66*                            Dolphin Smart Community Builder 
     
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4242$sBoxContent = <<<EOF 
    4343<style> 
    44     div.hidden { 
    45         display:none; 
    46     } 
     44    div.hidden { 
     45        display:none; 
     46    } 
    4747</style> 
    4848<script type="text/javascript"> 
    49     <!-- 
    50     function switchAdmPage(iPageID) { 
    51         //make all tabs - inactive 
    52         //mace selected tab - active 
    53         //hide all pages 
    54         //show selected page 
    55  
    56         $(".dbTopMenu").children().removeClass().toggleClass("notActive"); 
    57         $("#main_menu" + iPageID).removeClass().toggleClass("active"); 
    58  
    59         $("#adm_pages").children().removeClass().toggleClass("hidden"); 
    60         $("#adm_pages #page" + iPageID).removeClass().toggleClass("visible"); 
    61  
    62         return false; 
    63     } 
    64     --> 
     49    <!-- 
     50    function switchAdmPage(iPageID) { 
     51        //make all tabs - inactive 
     52        //mace selected tab - active 
     53        //hide all pages 
     54        //show selected page 
     55 
     56        $(".dbTopMenu").children().removeClass().toggleClass("notActive"); 
     57        $("#main_menu" + iPageID).removeClass().toggleClass("active"); 
     58 
     59        $("#adm_pages").children().removeClass().toggleClass("hidden"); 
     60        $("#adm_pages #page" + iPageID).removeClass().toggleClass("visible"); 
     61 
     62        return false; 
     63    } 
     64    --> 
    6565</script> 
    6666 
    6767<div class="boxContent" id="adm_pages"> 
    68     <div id="page1" class="visible">{$sTablesBackupToolsBlock}</div> 
    69     <div id="page2" class="hidden">{$sDatabaseBackupToolsBlock}</div> 
     68    <div id="page1" class="visible">{$sTablesBackupToolsBlock}</div> 
     69    <div id="page2" class="hidden">{$sDatabaseBackupToolsBlock}</div> 
    7070</div> 
    7171EOF; 
     
    7373$sActions = <<<EOF 
    7474<div class="dbTopMenu"> 
    75     <div class="active" id="main_menu1"><span><a href="#" class="top_members_menu" onclick="switchAdmPage(1); return false;">{$sTablesC}</a></span></div> 
    76     <div class="notActive" id="main_menu2"><span><a href="#" class="top_members_menu" onclick="switchAdmPage(2); return false;">{$sDatabaseC}</a></span></div> 
     75    <div class="active" id="main_menu1"><span><a href="#" class="top_members_menu" onclick="switchAdmPage(1); return false;">{$sTablesC}</a></span></div> 
     76    <div class="notActive" id="main_menu2"><span><a href="#" class="top_members_menu" onclick="switchAdmPage(2); return false;">{$sDatabaseC}</a></span></div> 
    7777</div> 
    7878EOF; 
     
    9696// Functions 
    9797function getActionResultBlock() { 
    98     $sSuccDumpedIntoFileC = _t('_adm_dbtools_succ_dumped_into_file'); 
    99     $sDumpFileSuccDeletedC = _t('_adm_dbtools_Dump_file_succefully_deleted'); 
    100     $sPleaseSelectDumpFileC = _t('_adm_dbtools_Please_select_dump_file'); 
    101     $sDateRestoredFromDumpC = _t('_adm_dbtools_Data_succefully_restored_from_dump'); 
    102     $sPleaseSelectCorrectDumpFileC = _t('_adm_dbtools_Please_select_correct_dump_file'); 
    103     $sDateRestoredFromPcC = _t('_adm_dbtools_Data_succefully_restored_from_PC'); 
     98    $sSuccDumpedIntoFileC = _t('_adm_dbtools_succ_dumped_into_file'); 
     99    $sDumpFileSuccDeletedC = _t('_adm_dbtools_Dump_file_succefully_deleted'); 
     100    $sPleaseSelectDumpFileC = _t('_adm_dbtools_Please_select_dump_file'); 
     101    $sDateRestoredFromDumpC = _t('_adm_dbtools_Data_succefully_restored_from_dump'); 
     102    $sPleaseSelectCorrectDumpFileC = _t('_adm_dbtools_Please_select_correct_dump_file'); 
     103    $sDateRestoredFromPcC = _t('_adm_dbtools_Data_succefully_restored_from_PC'); 
    104104 
    105105    $status_text = $status_text_restore = ''; 
    106106 
    107     if (isset($_POST['TablesBackup'])) { ##Block of table backup create 
    108         //echo "For: Tables Tools". $_POST['tbl_op'] . ' Table - ' . $_POST['tbl'] . ' Show param - ' . $_POST['savetype'] ;  
    109  
    110         $OutPutType  = preg_replace("/[^0-9]/", '', $_POST['tbl_op']); 
    111         $oNewBackup = new BxDolDatabaseBackup(); 
    112         $oNewBackup -> _getTableStruct($_POST['tbl'],  $OutPutType);  
    113  
    114         if ($_POST['savetype'] == 'client') { 
    115             $sqlfile = date("Y-m-d_H:i:s").'_'.$_POST['tbl'].'.sql'; 
    116             header("Content-Type: text/plain"); 
    117             header("Content-Disposition: attachment;filename=\"".$sqlfile."\""); 
    118             echo $oNewBackup -> sInputs; 
    119             exit(); 
    120         } 
    121         if ($_POST['savetype'] == 'server') { 
    122             $sqlfile = BX_DIRECTORY_PATH_ROOT . 'backup/'.date("Y-m-d_H-i-s").'_'.$_POST['tbl'].'.sql'; 
    123             $file = fopen($sqlfile, 'w'); 
    124             fputs($file, $oNewBackup -> sInputs); 
    125             $status_text .= "<hr size=1 /><font color='green'><center>{$sSuccDumpedIntoFileC} <b>{$sqlfile}</b></center></font>\n"; 
    126             fclose($file); 
    127         } 
    128         if ($_POST['savetype'] == 'show') { 
    129             $status_text = "<center><textarea cols='100' rows='30' name='content' style='font-family: Arial; font-size: 11px' readonly='readonly'>" . $oNewBackup -> sInputs ."</textarea></center>"; 
    130         } 
    131     } 
    132  
    133     if (isset($_POST['DatabasesBackup'])) { 
    134         $OutPutType  = preg_replace("/[^0-9]/", '', $_POST['db_op']);  
    135         $oNewBackup = new BxDolDatabaseBackup(); 
    136         $oNewBackup ->  _getAllTables($OutPutType);  
    137  
    138         if ($_POST['savetype'] == 'show') { 
    139             $status_text = "<center><textarea cols='100' rows='30' name='content' style='font-family: Arial; font-size: 11px' readonly='readonly'>" . $oNewBackup -> sInputs ."</textarea></center>"; 
    140         } 
    141         if ($_POST['savetype'] == 'server') { 
    142             $sqlfile = BX_DIRECTORY_PATH_ROOT . 'backup/'.date("Y-m-d_H-i-s").'_all.sql'; 
    143             $file = fopen($sqlfile, 'w'); 
    144             fputs($file, $oNewBackup -> sInputs); 
    145             $status_text .= "<hr size=1 /><font color='green'><center>{$sSuccDumpedIntoFileC} <b>{$sqlfile}</b></center></font>\n"; 
    146             fclose($file); 
    147         }    
    148         if ($_POST['savetype'] == 'client') { 
    149             $sqlfile = date("Y-m-d_H:i:s").'_all.sql'; 
    150             header("Content-Type: text/plain"); 
    151             header("Content-Disposition: attachment;filename=\"".$sqlfile."\""); 
    152             echo $oNewBackup -> sInputs; 
    153             exit(); 
    154         } 
    155     } 
    156  
    157     if (isset($_POST['DatabasesRestore'])) { 
    158         if ($_POST['savetype'] == 'delete') { 
    159             if(is_file(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file'])) { 
    160                 @unlink(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file']); 
    161                 $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDumpFileSuccDeletedC} <b>{$sqlfile}</b></center></font>\n"; 
    162             } else 
    163                 $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectDumpFileC} <b>{$sqlfile}</b></center></font>\n";  
    164         } 
    165         if ($_POST['savetype'] == 'restore') { 
    166             if(is_file(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file'])) { 
    167                 $oNewBackup = new BxDolDatabaseBackup(); 
    168                 $oNewBackup ->  _restoreFromDumpFile(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file']);  
    169                 $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDateRestoredFromDumpC}</center></font>\n"; 
    170             } else 
    171                 $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectDumpFileC} <b>{$sqlfile}</b></center></font>\n"; 
    172         } 
    173     } 
    174  
    175     if (isset($_FILES['sqlfile'])) { 
    176         if (preg_match("/.sql/", $_FILES['sqlfile']['name'])) { #it is correct 
    177             $oNewBackup = new BxDolDatabaseBackup(); 
    178             $oNewBackup ->  _restoreFromDumpFile($_FILES['sqlfile']['tmp_name'] );  
    179             @unlink($_FILES['sqlfile']['tmp_name']); 
    180             $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDateRestoredFromPcC} </center></font>\n"; 
    181         } else 
    182             $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectCorrectDumpFileC}</center></font>\n"; 
    183     } 
    184  
    185     return array($status_text, $status_text_restore); 
     107    if (isset($_POST['TablesBackup'])) { ##Block of table backup create 
     108        //echo "For: Tables Tools". $_POST['tbl_op'] . ' Table - ' . $_POST['tbl'] . ' Show param - ' . $_POST['savetype'] ; 
     109 
     110        $OutPutType  = preg_replace("/[^0-9]/", '', $_POST['tbl_op']); 
     111        $oNewBackup = new BxDolDatabaseBackup(); 
     112        $oNewBackup -> _getTableStruct($_POST['tbl'],  $OutPutType); 
     113 
     114        if ($_POST['savetype'] == 'client') { 
     115            $sqlfile = date("Y-m-d_H:i:s").'_'.$_POST['tbl'].'.sql'; 
     116            header("Content-Type: text/plain"); 
     117            header("Content-Disposition: attachment;filename=\"".$sqlfile."\""); 
     118            echo $oNewBackup -> sInputs; 
     119            exit(); 
     120        } 
     121        if ($_POST['savetype'] == 'server') { 
     122            $sqlfile = BX_DIRECTORY_PATH_ROOT . 'backup/'.date("Y-m-d_H-i-s").'_'.$_POST['tbl'].'.sql'; 
     123            $file = fopen($sqlfile, 'w'); 
     124            fputs($file, $oNewBackup -> sInputs); 
     125            $status_text .= "<hr size=1 /><font color='green'><center>{$sSuccDumpedIntoFileC} <b>{$sqlfile}</b></center></font>\n"; 
     126            fclose($file); 
     127        } 
     128        if ($_POST['savetype'] == 'show') { 
     129            $status_text = "<center><textarea cols='100' rows='30' name='content' style='font-family: Arial; font-size: 11px' readonly='readonly'>" . $oNewBackup -> sInputs ."</textarea></center>"; 
     130        } 
     131    } 
     132 
     133    if (isset($_POST['DatabasesBackup'])) { 
     134        $OutPutType  = preg_replace("/[^0-9]/", '', $_POST['db_op']); 
     135        $oNewBackup = new BxDolDatabaseBackup(); 
     136        $oNewBackup ->  _getAllTables($OutPutType); 
     137 
     138        if ($_POST['savetype'] == 'show') { 
     139            $status_text = "<center><textarea cols='100' rows='30' name='content' style='font-family: Arial; font-size: 11px' readonly='readonly'>" . $oNewBackup -> sInputs ."</textarea></center>"; 
     140        } 
     141        if ($_POST['savetype'] == 'server') { 
     142            $sqlfile = BX_DIRECTORY_PATH_ROOT . 'backup/'.date("Y-m-d_H-i-s").'_all.sql'; 
     143            $file = fopen($sqlfile, 'w'); 
     144            fputs($file, $oNewBackup -> sInputs); 
     145            $status_text .= "<hr size=1 /><font color='green'><center>{$sSuccDumpedIntoFileC} <b>{$sqlfile}</b></center></font>\n"; 
     146            fclose($file); 
     147        } 
     148        if ($_POST['savetype'] == 'client') { 
     149            $sqlfile = date("Y-m-d_H:i:s").'_all.sql'; 
     150            header("Content-Type: text/plain"); 
     151            header("Content-Disposition: attachment;filename=\"".$sqlfile."\""); 
     152            echo $oNewBackup -> sInputs; 
     153            exit(); 
     154        } 
     155    } 
     156 
     157    if (isset($_POST['DatabasesRestore'])) { 
     158        if ($_POST['savetype'] == 'delete') { 
     159            if(is_file(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file'])) { 
     160                @unlink(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file']); 
     161                $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDumpFileSuccDeletedC} <b>{$sqlfile}</b></center></font>\n"; 
     162            } else 
     163                $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectDumpFileC} <b>{$sqlfile}</b></center></font>\n"; 
     164        } 
     165        if ($_POST['savetype'] == 'restore') { 
     166            if(is_file(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file'])) { 
     167                $oNewBackup = new BxDolDatabaseBackup(); 
     168                $oNewBackup ->    _restoreFromDumpFile(BX_DIRECTORY_PATH_ROOT.'backup/'.$_POST['dump_file']); 
     169                $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDateRestoredFromDumpC}</center></font>\n"; 
     170            } else 
     171                $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectDumpFileC} <b>{$sqlfile}</b></center></font>\n"; 
     172        } 
     173    } 
     174 
     175    if (isset($_FILES['sqlfile'])) { 
     176        if (preg_match("/.sql/", $_FILES['sqlfile']['name'])) { #it is correct 
     177            $oNewBackup = new BxDolDatabaseBackup(); 
     178            $oNewBackup ->    _restoreFromDumpFile($_FILES['sqlfile']['tmp_name'] ); 
     179            @unlink($_FILES['sqlfile']['tmp_name']); 
     180            $status_text_restore .= "<hr size=1 /><font color='green'><center>{$sDateRestoredFromPcC} </center></font>\n"; 
     181        } else 
     182            $status_text_restore .= "<hr size=1 /><font color='red'><center>{$sPleaseSelectCorrectDumpFileC}</center></font>\n"; 
     183    } 
     184 
     185    return array($status_text, $status_text_restore); 
    186186} 
    187187 
    188188function getTablesBackupTools($status_text) { 
    189     $sChooseOperationC = _t('_adm_dbtools_Choose_operation_and_table'); 
    190     $sBackup1C = _t('_adm_dbtools_Backup_structure_content'); 
    191     $sBackup2C = _t('_adm_dbtools_Backup_structure'); 
    192     $sBackup3C = _t('_adm_dbtools_Backup_content'); 
    193     $sSaveOption1C = _t('_adm_dbtools_Save_to_server'); 
    194     $sSaveOption2C = _t('_adm_dbtools_Save_to_your_PC'); 
    195     $sSaveOption3C = _t('_adm_dbtools_Show_on_the_screen'); 
    196     $sBackupTableC = _t('_adm_dbtools_Backup_table'); 
    197     $sActionC = _t('_Action'); 
    198  
    199     // All tables of Database 
    200     $aTablesOptions = array(); 
    201     $tbls = db_list_tables(); 
    202     while ($tbl = mysql_fetch_array($tbls))  { 
    203         $aTablesOptions[$tbl['0']] = $tbl['0']; 
    204     } 
    205  
    206     $sStatusText = ($status_text and isset($_POST['TablesBackup'])) ? $status_text : ''; 
    207  
    208     $aForm = array( 
    209         'form_attrs' => array( 
    210             'name' => 'TablesBackupTools_form', 
    211             'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
    212             'method' => 'post', 
    213         ), 
    214         'inputs' => array( 
    215             'TablesBackup' => array( 
    216                 'type' => 'hidden', 
    217                 'name' => 'TablesBackup', 
    218                 'value' => 'YES', 
    219             ), 
    220             'tbl_op' => array( 
    221                 'type' => 'select', 
    222                 'name' => 'tbl_op', 
    223                 'caption' => $sChooseOperationC, 
    224                 'values' => array ( 
    225                     2 => $sBackup1C, 
    226                     0 => $sBackup2C, 
    227                     1 => $sBackup3C, 
    228                 ), 
    229             ), 
    230             'tbl' => array( 
    231                 'type' => 'select', 
    232                 'name' => 'tbl', 
    233                 'caption' => '', 
    234                 'values' => $aTablesOptions, 
    235             ), 
    236             'savetype' => array( 
    237                 'type' => 'radio_set', 
    238                 'name' => 'savetype', 
    239                 'caption' => $sActionC, 
    240                 'values' => array ( 
    241                     'server' => $sSaveOption1C, 
    242                     'client' => $sSaveOption2C, 
    243                     'show' => $sSaveOption3C, 
    244                 ), 
    245             ), 
    246             'tables_backup_tool' => array( 
    247                 'type' => 'submit', 
    248                 'name' => 'tables_backup_tool', 
    249                 'caption' => '', 
    250                 'value' => $sBackupTableC, 
    251             ), 
    252         ), 
    253     ); 
    254  
    255     $oForm = new BxTemplFormView($aForm); 
    256     return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . $sStatusText)); 
    257     //return DesignBoxContent(_t('_adm_dbtools_Tables_backup_tools'), '<div style="margin:9px;">' . $oForm->getCode() . '</div>' . $sStatusText, 1); 
     189    $sChooseOperationC = _t('_adm_dbtools_Choose_operation_and_table'); 
     190    $sBackup1C = _t('_adm_dbtools_Backup_structure_content'); 
     191    $sBackup2C = _t('_adm_dbtools_Backup_structure'); 
     192    $sBackup3C = _t('_adm_dbtools_Backup_content'); 
     193    $sSaveOption1C = _t('_adm_dbtools_Save_to_server'); 
     194    $sSaveOption2C = _t('_adm_dbtools_Save_to_your_PC'); 
     195    $sSaveOption3C = _t('_adm_dbtools_Show_on_the_screen'); 
     196    $sBackupTableC = _t('_adm_dbtools_Backup_table'); 
     197    $sActionC = _t('_Action'); 
     198 
     199    // All tables of Database 
     200    $aTablesOptions = array(); 
     201    $tbls = db_list_tables(); 
     202    while ($tbl = mysql_fetch_array($tbls))  { 
     203        $aTablesOptions[$tbl['0']] = $tbl['0']; 
     204    } 
     205 
     206    $sStatusText = ($status_text and isset($_POST['TablesBackup'])) ? $status_text : ''; 
     207 
     208    $aForm = array( 
     209        'form_attrs' => array( 
     210            'name' => 'TablesBackupTools_form', 
     211            'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
     212            'method' => 'post', 
     213        ), 
     214        'inputs' => array( 
     215            'TablesBackup' => array( 
     216                'type' => 'hidden', 
     217                'name' => 'TablesBackup', 
     218                'value' => 'YES', 
     219            ), 
     220            'tbl_op' => array( 
     221                'type' => 'select', 
     222                'name' => 'tbl_op', 
     223                'caption' => $sChooseOperationC, 
     224                'values' => array ( 
     225                    2 => $sBackup1C, 
     226                    0 => $sBackup2C, 
     227                    1 => $sBackup3C, 
     228                ), 
     229            ), 
     230            'tbl' => array( 
     231                'type' => 'select', 
     232                'name' => 'tbl', 
     233                'caption' => '', 
     234                'values' => $aTablesOptions, 
     235            ), 
     236            'savetype' => array( 
     237                'type' => 'radio_set', 
     238                'name' => 'savetype', 
     239                'caption' => $sActionC, 
     240                'values' => array ( 
     241                    'server' => $sSaveOption1C, 
     242                    'client' => $sSaveOption2C, 
     243                    'show' => $sSaveOption3C, 
     244                ), 
     245            ), 
     246            'tables_backup_tool' => array( 
     247                'type' => 'submit', 
     248                'name' => 'tables_backup_tool', 
     249                'caption' => '', 
     250                'value' => $sBackupTableC, 
     251            ), 
     252        ), 
     253    ); 
     254 
     255    $oForm = new BxTemplFormView($aForm); 
     256    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . $sStatusText)); 
     257    //return DesignBoxContent(_t('_adm_dbtools_Tables_backup_tools'), '<div style="margin:9px;">' . $oForm->getCode() . '</div>' . $sStatusText, 1); 
    258258} 
    259259 
    260260function DatabaseBackupTools($status_text) { 
    261     $sChooseOperationC = _t('_adm_dbtools_Choose_operation'); 
    262     $sBackup1C = _t('_adm_dbtools_Backup_structure_content'); 
    263     $sBackup2C = _t('_adm_dbtools_Backup_structure'); 
    264     $sSaveOption1C = _t('_adm_dbtools_Save_to_server'); 
    265     $sSaveOption2C = _t('_adm_dbtools_Save_to_your_PC'); 
    266     $sSaveOption3C = _t('_adm_dbtools_Show_on_the_screen'); 
    267     $sBackupDatabaseC = _t('_adm_dbtools_Backup_database'); 
    268     $sActionC = _t('_Action'); 
    269  
    270     $sStatusText = ($status_text and isset($_POST['DatabasesBackup'])) ? $status_text : ''; 
    271  
    272     $aForm = array( 
    273         'form_attrs' => array( 
    274             'name' => 'DatabaseBackupTools_form', 
    275             'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
    276             'method' => 'post', 
    277         ), 
    278         'inputs' => array( 
    279             'DatabasesBackup' => array( 
    280                 'type' => 'hidden', 
    281                 'name' => 'DatabasesBackup', 
    282                 'value' => 'YES', 
    283             ), 
    284             'db_op' => array( 
    285                 'type' => 'select', 
    286                 'name' => 'db_op', 
    287                 'caption' => $sChooseOperationC, 
    288                 'values' => array ( 
    289                     2 => $sBackup1C, 
    290                     0 => $sBackup2C, 
    291                 ), 
    292             ), 
    293             'savetype' => array( 
    294                 'type' => 'radio_set', 
    295                 'name' => 'savetype', 
    296                 'caption' => $sActionC, 
    297                 'values' => array ( 
    298                     'server' => $sSaveOption1C, 
    299                     'client' => $sSaveOption2C, 
    300                     'show' => $sSaveOption3C, 
    301                 ), 
    302             ), 
    303             'database_backup_tool' => array( 
    304                 'type' => 'submit', 
    305                 'name' => 'database_backup_tool', 
    306                 'caption' => '', 
    307                 'value' => $sBackupDatabaseC, 
    308             ), 
    309         ), 
    310     ); 
    311  
    312     $oForm = new BxTemplFormView($aForm); 
    313     return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . $sStatusText)); 
    314     //return DesignBoxContent(_t('_adm_dbtools_Database_backup_tools'), '<div style="margin:9px;">' . $oForm->getCode() . '</div>' . $sStatusText, 1); 
     261    $sChooseOperationC = _t('_adm_dbtools_Choose_operation'); 
     262    $sBackup1C = _t('_adm_dbtools_Backup_structure_content'); 
     263    $sBackup2C = _t('_adm_dbtools_Backup_structure'); 
     264    $sSaveOption1C = _t('_adm_dbtools_Save_to_server'); 
     265    $sSaveOption2C = _t('_adm_dbtools_Save_to_your_PC'); 
     266    $sSaveOption3C = _t('_adm_dbtools_Show_on_the_screen'); 
     267    $sBackupDatabaseC = _t('_adm_dbtools_Backup_database'); 
     268    $sActionC = _t('_Action'); 
     269 
     270    $sStatusText = ($status_text and isset($_POST['DatabasesBackup'])) ? $status_text : ''; 
     271 
     272    $aForm = array( 
     273        'form_attrs' => array( 
     274            'name' => 'DatabaseBackupTools_form', 
     275            'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
     276            'method' => 'post', 
     277        ), 
     278        'inputs' => array( 
     279            'DatabasesBackup' => array( 
     280                'type' => 'hidden', 
     281                'name' => 'DatabasesBackup', 
     282                'value' => 'YES', 
     283            ), 
     284            'db_op' => array( 
     285                'type' => 'select', 
     286                'name' => 'db_op', 
     287                'caption' => $sChooseOperationC, 
     288                'values' => array ( 
     289                    2 => $sBackup1C, 
     290                    0 => $sBackup2C, 
     291                ), 
     292            ), 
     293            'savetype' => array( 
     294                'type' => 'radio_set', 
     295                'name' => 'savetype', 
     296                'caption' => $sActionC, 
     297                'values' => array ( 
     298                    'server' => $sSaveOption1C, 
     299                    'client' => $sSaveOption2C, 
     300                    'show' => $sSaveOption3C, 
     301                ), 
     302            ), 
     303            'database_backup_tool' => array( 
     304                'type' => 'submit', 
     305                'name' => 'database_backup_tool', 
     306                'caption' => '', 
     307                'value' => $sBackupDatabaseC, 
     308            ), 
     309        ), 
     310    ); 
     311 
     312    $oForm = new BxTemplFormView($aForm); 
     313    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . $sStatusText)); 
     314    //return DesignBoxContent(_t('_adm_dbtools_Database_backup_tools'), '<div style="margin:9px;">' . $oForm->getCode() . '</div>' . $sStatusText, 1); 
    315315} 
    316316 
    317317function getDatabaseRestoreBlock($status_text) { 
    318     $sPleaseSelectDumpFileC = _t('_adm_dbtools_Please_select_dump_file'); 
    319     $sRestoreDataFromDumpC = _t('_adm_dbtools_Restore_data_from_dump'); 
    320     $sDeleteDumpFromServerC = _t('_adm_dbtools_Delete_dump_from_server'); 
    321     $sDatabaseRestoreFromPCC = _t('_adm_dbtools_Database_restore_from_your_PC'); 
    322     $sSendC = _t('_Send'); 
    323     $sSubmitC = _t('_Submit'); 
    324     $sActionC = _t('_Action'); 
    325  
    326     $aExistedFilesOptions = array(); 
    327     if ( $handle = @opendir(BX_DIRECTORY_PATH_ROOT.'backup/') ) { 
    328         while ( $file = readdir($handle) ) {  
    329             if ( preg_match("/.sql/", $file) ) 
    330                 $aExistedFilesOptions[$file] = $file; 
    331         } 
    332     } 
    333  
    334     $sStatusText = ($status_text and isset($_POST['DatabasesRestore']) or isset($_FILES['sqlfile']) ) ? $status_text : ''; 
    335  
    336     $aForm = array( 
    337         'form_attrs' => array( 
    338             'name' => 'DatabaseRestore1_form', 
    339             'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
    340             'method' => 'post', 
    341         ), 
    342         'inputs' => array( 
    343             'DatabasesRestore' => array( 
    344                 'type' => 'hidden', 
    345                 'name' => 'DatabasesRestore', 
    346                 'value' => 'YES', 
    347             ), 
    348             'dump_file' => array( 
    349                 'type' => 'select', 
    350                 'name' => 'dump_file', 
    351                 'caption' => $sPleaseSelectDumpFileC, 
    352                 'values' => $aExistedFilesOptions, 
    353             ), 
    354             'savetype' => array( 
    355                 'type' => 'radio_set', 
    356                 'name' => 'savetype', 
    357                 'caption' => $sActionC, 
    358                 'values' => array ( 
    359                     'restore' => $sRestoreDataFromDumpC, 
    360                     'delete' => $sDeleteDumpFromServerC, 
    361                 ), 
    362                 'value' => 'restore', 
    363             ), 
    364             'DatabaseRestore1' => array( 
    365                 'type' => 'submit', 
    366                 'name' => 'DatabaseRestore1', 
    367                 'caption' => '', 
    368                 'value' => $sSubmitC, 
    369             ), 
    370         ), 
    371     ); 
    372     $oForm = new BxTemplFormView($aForm); 
    373  
    374     $aForm2 = array( 
    375         'form_attrs' => array( 
    376             'name' => 'DatabaseRestore1_form', 
    377             'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
    378             'method' => 'post', 
    379             'enctype' => 'multipart/form-data', 
    380         ), 
    381         'inputs' => array( 
    382             'header1' => array( 
    383                 'type' => 'block_header', 
    384                 'caption' => $sDatabaseRestoreFromPCC, 
    385             ), 
    386             'sqlfile' => array( 
    387                 'type' => 'file', 
    388                 'name' => 'sqlfile', 
    389                 'caption' => $sPleaseSelectDumpFileC, 
    390                 'required' => true, 
    391             ), 
    392             'DatabaseRestore2' => array( 
    393                 'type' => 'submit', 
    394                 'name' => 'DatabaseRestore2', 
    395                 'caption' => '', 
    396                 'value' => $sSendC, 
    397             ), 
    398         ), 
    399     ); 
    400     $oForm2 = new BxTemplFormView($aForm2); 
    401  
    402     return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . '<br />' . $oForm2->getCode() . $sStatusText));   
     318    $sPleaseSelectDumpFileC = _t('_adm_dbtools_Please_select_dump_file'); 
     319    $sRestoreDataFromDumpC = _t('_adm_dbtools_Restore_data_from_dump'); 
     320    $sDeleteDumpFromServerC = _t('_adm_dbtools_Delete_dump_from_server'); 
     321    $sDatabaseRestoreFromPCC = _t('_adm_dbtools_Database_restore_from_your_PC'); 
     322    $sSendC = _t('_Send'); 
     323    $sSubmitC = _t('_Submit'); 
     324    $sActionC = _t('_Action'); 
     325 
     326    $aExistedFilesOptions = array(); 
     327    if ( $handle = @opendir(BX_DIRECTORY_PATH_ROOT.'backup/') ) { 
     328        while ( $file = readdir($handle) ) { 
     329            if ( preg_match("/.sql/", $file) ) 
     330                $aExistedFilesOptions[$file] = $file; 
     331        } 
     332    } 
     333 
     334    $sStatusText = ($status_text and isset($_POST['DatabasesRestore']) or isset($_FILES['sqlfile']) ) ? $status_text : ''; 
     335 
     336    $aForm = array( 
     337        'form_attrs' => array( 
     338            'name' => 'DatabaseRestore1_form', 
     339            'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
     340            'method' => 'post', 
     341        ), 
     342        'inputs' => array( 
     343            'DatabasesRestore' => array( 
     344                'type' => 'hidden', 
     345                'name' => 'DatabasesRestore', 
     346                'value' => 'YES', 
     347            ), 
     348            'dump_file' => array( 
     349                'type' => 'select', 
     350                'name' => 'dump_file', 
     351                'caption' => $sPleaseSelectDumpFileC, 
     352                'values' => $aExistedFilesOptions, 
     353            ), 
     354            'savetype' => array( 
     355                'type' => 'radio_set', 
     356                'name' => 'savetype', 
     357                'caption' => $sActionC, 
     358                'values' => array ( 
     359                    'restore' => $sRestoreDataFromDumpC, 
     360                    'delete' => $sDeleteDumpFromServerC, 
     361                ), 
     362                'value' => 'restore', 
     363            ), 
     364            'DatabaseRestore1' => array( 
     365                'type' => 'submit', 
     366                'name' => 'DatabaseRestore1', 
     367                'caption' => '', 
     368                'value' => $sSubmitC, 
     369            ), 
     370        ), 
     371    ); 
     372    $oForm = new BxTemplFormView($aForm); 
     373 
     374    $aForm2 = array( 
     375        'form_attrs' => array( 
     376            'name' => 'DatabaseRestore1_form', 
     377            'action' => $GLOBALS['site']['url_admin'] . 'db.php', 
     378            'method' => 'post', 
     379            'enctype' => 'multipart/form-data', 
     380        ), 
     381        'inputs' => array( 
     382            'header1' => array( 
     383                'type' => 'block_header', 
     384                'caption' => $sDatabaseRestoreFromPCC, 
     385            ), 
     386            'sqlfile' => array( 
     387                'type' => 'file', 
     388                'name' => 'sqlfile', 
     389                'caption' => $sPleaseSelectDumpFileC, 
     390                'required' => true, 
     391            ), 
     392            'DatabaseRestore2' => array( 
     393                'type' => 'submit', 
     394                'name' => 'DatabaseRestore2', 
     395                'caption' => '', 
     396                'value' => $sSendC, 
     397            ), 
     398        ), 
     399    ); 
     400    $oForm2 = new BxTemplFormView($aForm2); 
     401 
     402    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . '<br />' . $oForm2->getCode() . $sStatusText)); 
    403403} 
    404404 
  • trunk/administration/email_templates.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3636$logged['admin'] = member_auth( 1, true, true ); 
    3737 
    38 $oSettings = new BxDolAdminSettings(4);  
     38$oSettings = new BxDolAdminSettings(4); 
    3939 
    4040//--- Process submit ---// 
     
    4747    if(empty($aTranslation)) 
    4848        $aTranslation = $GLOBALS['MySQL']->getRow("SELECT `Subject` AS `subject`, `Body` AS `body` FROM `sys_email_templates` WHERE `Name`='" . process_db_input($_POST['templ_name']) . "' AND `LangID`='0' LIMIT 1"); 
    49          
    50     $oJson = new Services_JSON();    
     49 
     50    $oJson = new Services_JSON(); 
    5151    echo $oJson->encode(array('subject' => $aTranslation['subject'], 'body' => $aTranslation['body'])); 
    5252    exit; 
     
    5858    'css_name' => array('forms_adv.css', 'settings.css'), 
    5959    'js_name' => array('email_templates.js'), 
    60     'header' => _t('_adm_page_cpt_email_templates'),     
     60    'header' => _t('_adm_page_cpt_email_templates'), 
    6161); 
    6262$_page_cont[$iNameIndex] = array( 
     
    6969function PageCodeSettings($mixedResult) { 
    7070 
    71     $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $GLOBALS['oSettings']->getForm()));     
     71    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $GLOBALS['oSettings']->getForm())); 
    7272    if($mixedResult !== true && !empty($mixedResult)) 
    7373        $sResult = $mixedResult . $sResult; 
    74      
     74 
    7575    return DesignBoxAdmin(_t('_adm_box_cpt_email_settings'), $sResult); 
    7676} 
     
    9797 
    9898    $aLanguages = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Title` AS `title` FROM `sys_localization_languages`"); 
    99      
     99 
    100100    $aLanguageChooser = array(array('key' => 0, 'value' => 'default')); 
    101101    foreach($aLanguages as $aLanguage) 
    102102        $aLanguageChooser[] = array('key' => $aLanguage['id'], 'value' => $aLanguage['title']); 
    103      
     103 
    104104    $sLanguageCpt = _t('_adm_txt_email_language'); 
    105105    $sSubjectCpt = _t('_adm_txt_email_subject'); 
     
    151151        )); 
    152152    } 
    153      
     153 
    154154    $aForm['inputs']['adm-emial-templates-save'] = array( 
    155155        'type' => 'submit', 
     
    171171                $iResult += (int)$GLOBALS['MySQL']->query("INSERT INTO `sys_email_templates` SET `Name`='" . process_db_input($aEmail['name']) . "', `Subject`='" . process_db_input($_POST[$aEmail['name'] . '_Subject']) . "', `Body`='" . process_db_input($_POST[$aEmail['name'] . '_Body']) . "', `LangID`='" . (int)$_POST[$aEmail['name'] . '_Language'] . "'"); 
    172172        } 
    173          
     173 
    174174        $sResult .= MsgBox(_t($iResult > 0 ? "_adm_txt_email_success_save" : "_adm_txt_email_nothing_changed"), 3); 
    175175    } 
  • trunk/administration/fields.parse.php

    r15201 r15211  
    2222 
    2323switch(bx_get('action')) { 
    24     case 'getArea': 
    25         genAreaJSON((int)bx_get('id')); 
    26         break; 
    27     case 'createNewBlock': 
    28         createNewBlock(); 
    29         break; 
    30     case 'createNewItem': 
    31         createNewItem(); 
    32         break; 
    33     case 'savePositions': 
    34         savePositions((int)bx_get('id')); 
    35         break; 
    36     case 'loadEditForm': 
    37         showEditForm((int)bx_get('id'), (int)bx_get('area')); 
    38         break; 
    39     case 'dummy': 
    40         echo 'Dummy!'; 
    41         break; 
    42     case 'Save'://save item 
    43         saveItem((int)bx_get('area'), $_POST); 
    44         break; 
    45     case 'Delete'://delete item 
    46         deleteItem((int)bx_get('id'), (int)bx_get('area')); 
    47         break; 
     24    case 'getArea': 
     25        genAreaJSON((int)bx_get('id')); 
     26        break; 
     27    case 'createNewBlock': 
     28        createNewBlock(); 
     29        break; 
     30    case 'createNewItem': 
     31        createNewItem(); 
     32        break; 
     33    case 'savePositions': 
     34        savePositions((int)bx_get('id')); 
     35        break; 
     36    case 'loadEditForm': 
     37        showEditForm((int)bx_get('id'), (int)bx_get('area')); 
     38        break; 
     39    case 'dummy': 
     40        echo 'Dummy!'; 
     41        break; 
     42    case 'Save'://save item 
     43        saveItem((int)bx_get('area'), $_POST); 
     44        break; 
     45    case 'Delete'://delete item 
     46        deleteItem((int)bx_get('id'), (int)bx_get('area')); 
     47        break; 
    4848} 
    4949 
    5050function createNewBlock() { 
    51     $oFields = new BxDolPFM( 1 ); 
    52     $iNewID = $oFields -> createNewBlock(); 
    53     header('Content-Type:text/javascript'); 
    54     echo '{id:' . $iNewID . '}'; 
     51    $oFields = new BxDolPFM( 1 ); 
     52    $iNewID = $oFields -> createNewBlock(); 
     53    header('Content-Type:text/javascript'); 
     54    echo '{id:' . $iNewID . '}'; 
    5555} 
    5656 
    5757function createNewItem() { 
    58     $oFields = new BxDolPFM( 1 ); 
    59     $iNewID = $oFields -> createNewField(); 
     58    $oFields = new BxDolPFM( 1 ); 
     59    $iNewID = $oFields -> createNewField(); 
    6060 
    61     bx_import('BxDolInstallerUtils'); 
    62     $oInstallerUtils = new BxDolInstallerUtils(); 
    63     $oInstallerUtils->updateProfileFieldsHtml(); 
    64      
    65     header('Content-Type:text/javascript'); 
    66     echo '{id:' . $iNewID . '}'; 
     61    bx_import('BxDolInstallerUtils'); 
     62    $oInstallerUtils = new BxDolInstallerUtils(); 
     63    $oInstallerUtils->updateProfileFieldsHtml(); 
     64 
     65    header('Content-Type:text/javascript'); 
     66    echo '{id:' . $iNewID . '}'; 
    6767} 
    6868 
    6969function genAreaJSON( $iAreaID ) { 
    70     $oFields = new BxDolPFM( $iAreaID ); 
    71      
    72     header( 'Content-Type:text/javascript' ); 
    73     echo $oFields -> genJSON(); 
     70    $oFields = new BxDolPFM( $iAreaID ); 
     71 
     72    header( 'Content-Type:text/javascript' ); 
     73    echo $oFields -> genJSON(); 
    7474} 
    7575 
    7676function savePositions( $iAreaID ) { 
    77     $oFields = new BxDolPFM( $iAreaID ); 
    78      
    79     header( 'Content-Type:text/javascript' ); 
    80     $oFields -> savePositions( $_POST ); 
     77    $oFields = new BxDolPFM( $iAreaID ); 
    8178 
    82     $oCacher = new BxDolPFMCacher(); 
    83     $oCacher -> createCache(); 
     79    header( 'Content-Type:text/javascript' ); 
     80    $oFields -> savePositions( $_POST ); 
     81 
     82    $oCacher = new BxDolPFMCacher(); 
     83    $oCacher -> createCache(); 
    8484} 
    8585 
    8686function saveItem( $iAreaID, $aData ) { 
    87     $oFields = new BxDolPFM( $iAreaID ); 
    88     $oFields -> saveItem( $_POST ); 
     87    $oFields = new BxDolPFM( $iAreaID ); 
     88    $oFields -> saveItem( $_POST ); 
    8989 
    90     bx_import('BxDolInstallerUtils'); 
    91     $oInstallerUtils = new BxDolInstallerUtils(); 
    92     $oInstallerUtils->updateProfileFieldsHtml(); 
     90    bx_import('BxDolInstallerUtils'); 
     91    $oInstallerUtils = new BxDolInstallerUtils(); 
     92    $oInstallerUtils->updateProfileFieldsHtml(); 
    9393 
    94     $oCacher = new BxDolPFMCacher(); 
    95     $oCacher -> createCache(); 
     94    $oCacher = new BxDolPFMCacher(); 
     95    $oCacher -> createCache(); 
    9696} 
    9797 
    9898function deleteItem( $iItemID, $iAreaID ) { 
    99     $oFields = new BxDolPFM( $iAreaID ); 
    100     $oFields -> deleteItem( $iItemID ); 
     99    $oFields = new BxDolPFM( $iAreaID ); 
     100    $oFields -> deleteItem( $iItemID ); 
    101101 
    102     bx_import('BxDolInstallerUtils'); 
    103     $oInstallerUtils = new BxDolInstallerUtils(); 
    104     $oInstallerUtils->updateProfileFieldsHtml(); 
     102    bx_import('BxDolInstallerUtils'); 
     103    $oInstallerUtils = new BxDolInstallerUtils(); 
     104    $oInstallerUtils->updateProfileFieldsHtml(); 
    105105 
    106     $oCacher = new BxDolPFMCacher(); 
    107     $oCacher -> createCache(); 
     106    $oCacher = new BxDolPFMCacher(); 
     107    $oCacher -> createCache(); 
    108108} 
    109109 
    110110function showEditForm( $iItemID, $iAreaID ) { 
    111     $oFields = new BxDolPFM( $iAreaID ); 
    112      
    113     ob_start(); 
    114     ?> 
    115     <form name="fieldEditForm" method="post" action="<?=$GLOBALS['site']['url_admin'] . 'fields.parse.php'; ?>" target="fieldFormSubmit" onsubmit="clearFormErrors( this )"> 
     111    $oFields = new BxDolPFM( $iAreaID ); 
     112 
     113    ob_start(); 
     114    ?> 
     115    <form name="fieldEditForm" method="post" action="<?=$GLOBALS['site']['url_admin'] . 'fields.parse.php'; ?>" target="fieldFormSubmit" onsubmit="clearFormErrors( this )"> 
    116116        <div class="edit_item_table_cont"> 
    117117            <?=$oFields -> genFieldEditForm( $iItemID ); ?> 
    118118        </div> 
    119     </form> 
     119    </form> 
    120120 
    121     <iframe name="fieldFormSubmit" style="display:none;"></iframe> 
    122     <? 
    123     $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => ob_get_clean())); 
     121    <iframe name="fieldFormSubmit" style="display:none;"></iframe> 
     122    <? 
     123    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => ob_get_clean())); 
    124124 
    125     echo PopupBox('pf_edit_popup', _t('_adm_fields_box_cpt_field'), $sResult); 
     125    echo PopupBox('pf_edit_popup', _t('_adm_fields_box_cpt_field'), $sResult); 
    126126} 
    127127 
  • trunk/administration/fields.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4242    'css_name' => array('fields.css'), 
    4343    'js_name' => array('ui.core.js', 'ui.tabs.js', 'ui.sortable.js', 'fields.js'), 
    44     'header' => _t('_adm_fields_title')     
     44    'header' => _t('_adm_fields_title') 
    4545); 
    4646$_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin( 
     
    4949    array( 
    5050        'adm-fb-ctl-m1' => array( 
    51             'title' => _t('_adm_fields_join_form'),             
     51            'title' => _t('_adm_fields_join_form'), 
    5252            'href' => 'javascript:void(0)', 
    5353            'onclick' => 'javascript:changeType(this)', 
     
    7676 
    7777$GLOBALS['oAdmTemplate']->addJsTranslation(array( 
    78     '_adm_mbuilder_active_items', 
    79     '_adm_txt_pb_inactive_blocks', 
    80     '_adm_mbuilder_inactive_items' 
     78    '_adm_mbuilder_active_items', 
     79    '_adm_txt_pb_inactive_blocks', 
     80    '_adm_mbuilder_inactive_items' 
    8181)); 
    8282 
  • trunk/administration/flash.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
  • trunk/administration/help.html

    r15201 r15211  
    66 
    77    .spec 
    8     { 
    9         float:left; 
    10         width:80px; 
    11         height:20px; 
    12         position:relative; 
    13         border: 1px solid silver; 
    14         text-align : center; 
    15     } 
     8    { 
     9        float:left; 
     10        width:80px; 
     11        height:20px; 
     12        position:relative; 
     13        border: 1px solid silver; 
     14        text-align : center; 
     15    } 
    1616 
    1717    .desc 
    18     { 
    19         float:left; 
    20         width:360px; 
    21         height:20px; 
    22         position:relative; 
    23         border: 1px solid silver; 
    24     } 
     18    { 
     19        float:left; 
     20        width:360px; 
     21        height:20px; 
     22        position:relative; 
     23        border: 1px solid silver; 
     24    } 
    2525 
    2626</style> 
     
    4545<table border=1> 
    4646<tr > 
    47     <td ><b>Separator</b></td> 
    48     <td><b>Format</b></td> 
    49     <td><b>Result</b></td> 
     47    <td ><b>Separator</b></td> 
     48    <td><b>Format</b></td> 
     49    <td><b>Result</b></td> 
    5050</tr> 
    5151<tr align=center> 
    52     <td>.</td> 
    53     <td>Day.Month.YYYY</td> 
    54     <td>%d.%m.%Y</td> 
     52    <td>.</td> 
     53    <td>Day.Month.YYYY</td> 
     54    <td>%d.%m.%Y</td> 
    5555 
    5656</tr> 
    5757 
    5858<tr align=center> 
    59     <td>/</td> 
    60     <td>Month/Day/Year</td> 
    61     <td>%m/%d/%Y</td> 
     59    <td>/</td> 
     60    <td>Month/Day/Year</td> 
     61    <td>%m/%d/%Y</td> 
    6262 
    6363</tr> 
    6464<tr align=center> 
    65     <td>*</td> 
    66     <td>Month*Day*Year</td> 
    67     <td>%m*%d*%Y</td> 
     65    <td>*</td> 
     66    <td>Month*Day*Year</td> 
     67    <td>%m*%d*%Y</td> 
    6868 
    6969</tr> 
    7070 
    7171<tr align=center> 
    72     <td colspan=3 >some other separators:   -    :    ;    -- </b></td> 
     72    <td colspan=3 >some other separators:   -    :    ;    -- </b></td> 
    7373 
    7474</tr> 
  • trunk/administration/host_tools.php

    r15201 r15211  
    2020 
    2121switch(bx_get('action')) { 
    22     case 'cache_engines': 
    23         $sResult .= $oAdmTools->GenCacheEnginesTable(); 
    24         break; 
    25     case 'perm_table': 
    26         $sResult .= $oAdmTools->GenPermTable(); 
    27         break; 
    28     case 'main_params': 
    29         $sResult .= $oAdmTools->GenMainParamsTable(); 
    30         break; 
    31     case 'main_page': 
    32         $sResult .= $oAdmTools->GenTabbedPage(); 
    33         break; 
    34     default: 
    35         $sResult .= $oAdmTools->GenTabbedPage(); 
    36         break; 
     22    case 'cache_engines': 
     23        $sResult .= $oAdmTools->GenCacheEnginesTable(); 
     24        break; 
     25    case 'perm_table': 
     26        $sResult .= $oAdmTools->GenPermTable(); 
     27        break; 
     28    case 'main_params': 
     29        $sResult .= $oAdmTools->GenMainParamsTable(); 
     30        break; 
     31    case 'main_page': 
     32        $sResult .= $oAdmTools->GenTabbedPage(); 
     33        break; 
     34    default: 
     35        $sResult .= $oAdmTools->GenTabbedPage(); 
     36        break; 
    3737} 
    3838 
  • trunk/administration/index.php

    r15201 r15211  
    2222    $iId = getID($_POST['ID']); 
    2323    $sPassword = bx_process_input($_POST['Password']); 
    24      
     24 
    2525    $oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $iId, 'password' => $sPassword, 'ip' => getVisitorIP())); 
    2626    $oZ->alert(); 
     
    3939            db_res("insert into `sys_options` (`Name`, `VALUE`, `desc`, `Type`) values ('enable_dolphin_footer', 'on', 'enable boonex footers', 'checkbox')"); 
    4040 
    41         if ((isset($_REQUEST['license_code']) && $_REQUEST['license_code']) || (getParam("license_expiration") && time() > getParam("license_expiration"))) {     
     41        if ((isset($_REQUEST['license_code']) && $_REQUEST['license_code']) || (getParam("license_expiration") && time() > getParam("license_expiration"))) { 
    4242            $bDol = checkDolphinLicense(); 
    4343            setParam('enable_dolphin_footer', ($bDol ? '' : 'on')); 
    4444        } elseif (getParam("license_code")) { 
    45             $sDomain = BX_DOL_URL_ROOT; 
    46             if (preg_match('/https?:\/\/([a-zA-Z0-9\.-]+)[:\/]/', $sDomain, $m)) $sDomain = str_replace('www.','',$m[1]);     
     45            $sDomain = BX_DOL_URL_ROOT; 
     46            if (preg_match('/https?:\/\/([a-zA-Z0-9\.-]+)[:\/]/', $sDomain, $m)) $sDomain = str_replace('www.','',$m[1]); 
    4747            $s = md5(base64_encode(serialize(array(getParam("enable_dolphin_footer"), getParam("license_code"), getParam("license_expiration"), $sDomain)))); for ($i=0 ; $i<32 ; ++$i) $s[$i] = ord($s[$i]) + $i; $s = md5($s); 
    4848            if ($s != getParam("license_checksum")) { 
     
    8989 
    9090if(!isAdmin()) { 
    91     send_headers_page_changed(); 
    92     login_form("", 1); 
    93     exit(); 
     91    send_headers_page_changed(); 
     92    login_form("", 1); 
     93    exit(); 
    9494} 
    9595 
    9696if(bx_get('boonex_news') !== false) 
    97     setParam("news_enable", (int)bx_get('boonex_news'));     
     97    setParam("news_enable", (int)bx_get('boonex_news')); 
    9898 
    9999$logged['admin'] = member_auth( 1, true, true ); 
    100100 
    101101if(bx_get('cat') !== false) 
    102     PageCategoryCode(bx_get('cat')); 
    103 else  
     102    PageCategoryCode(bx_get('cat')); 
     103else 
    104104    PageMainCode(); 
    105105 
     
    109109 
    110110    bx_import('BxDolAdminDashboard'); 
    111      
     111 
    112112    $sHtml = DesignBoxAdmin(_t('_adm_box_cpt_overview'), BxDolAdminDashboard::getCode()); 
    113113 
     
    123123        $sHtml .= DesignBoxAdmin (_t('_adm_box_cpt_featured_modules'), BxTemplFunctions::getInstance()->getRssHolder ('boonex_unity_market_featured', 5, 0, $oTemplate)); 
    124124    } 
    125          
     125 
    126126    $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); 
    127127    $oTemplate->setPageHeader (_t('_adm_page_cpt_dashboard')); 
     
    131131function PageCategoryCode($sCategoryName) { 
    132132 
    133     $oDb = BxDolDb::getInstance(); 
    134      
     133    $oDb = BxDolDb::getInstance(); 
     134 
    135135    $oTemplate = BxDolTemplateAdmin::getInstance(); 
    136136 
    137     $aItems = $oDb->getAll("SELECT `tma1`.`title` AS `title`, `tma1`.`url` AS `url`, `tma1`.`description` AS `description`, `tma1`.`icon` AS `icon`, `tma1`.`check` AS `check` FROM `sys_menu_admin` AS `tma1` LEFT JOIN `sys_menu_admin` AS `tma2` ON `tma1`.`parent_id`=`tma2`.`id` WHERE `tma2`.`name`='" . $sCategoryName . "' ORDER BY `tma1`.`Order`"); 
     137    $aItems = $oDb->getAll("SELECT `tma1`.`title` AS `title`, `tma1`.`url` AS `url`, `tma1`.`description` AS `description`, `tma1`.`icon` AS `icon`, `tma1`.`check` AS `check` FROM `sys_menu_admin` AS `tma1` LEFT JOIN `sys_menu_admin` AS `tma2` ON `tma1`.`parent_id`=`tma2`.`id` WHERE `tma2`.`name`='" . $sCategoryName . "' ORDER BY `tma1`.`Order`"); 
    138138 
    139     foreach($aItems as $aItem) { 
    140         if(strlen($aItem['check']) > 0) { 
    141             $oFunction = create_function('', $aItem['check']); 
    142             if(!$oFunction()) 
     139    foreach($aItems as $aItem) { 
     140        if(strlen($aItem['check']) > 0) { 
     141            $oFunction = create_function('', $aItem['check']); 
     142            if(!$oFunction()) 
    143143                continue; 
    144         } 
     144        } 
    145145 
    146         $aItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aItem['url']); 
    147         list($sLink, $sOnClick) = BxDolAdminMenu::getMainMenuLink($aItem['url']); 
    148          
    149         $aVariables[] = array( 
     146        $aItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aItem['url']); 
     147        list($sLink, $sOnClick) = BxDolAdminMenu::getMainMenuLink($aItem['url']); 
     148 
     149        $aVariables[] = array( 
    150150            'icon' => $oTemplate->getIconUrl($aItem['icon']), 
    151151            'link' => $sLink, 
     
    153153            'title' => _t($aItem['title']), 
    154154            'description' => $aItem['description'] 
    155         );       
    156     }        
     155        ); 
     156    } 
    157157 
    158     $sPageTitle = _t($oDb->getOne("SELECT `title` FROM `sys_menu_admin` WHERE `name`='" . $sCategoryName . "' LIMIT 1")); 
    159     $sPageContent = $oTemplate->parseHtmlByName('categories.html', array('bx_repeat:items' => $aVariables)); 
     158    $sPageTitle = _t($oDb->getOne("SELECT `title` FROM `sys_menu_admin` WHERE `name`='" . $sCategoryName . "' LIMIT 1")); 
     159    $sPageContent = $oTemplate->parseHtmlByName('categories.html', array('bx_repeat:items' => $aVariables)); 
    160160    $sPageContent = DesignBoxAdmin($sPageTitle, $sPageContent); 
    161161 
  • trunk/administration/ip_blacklist.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3434$sResult = ''; 
    3535switch(bx_get('action')) { 
    36     case 'apply_delete': 
    37         $oBxDolAdminIpBlockList->ActionApplyDelete(); 
    38         $sResult .= $oBxDolAdminIpBlockList->GenIPBlackListTable(); 
    39         break; 
     36    case 'apply_delete': 
     37        $oBxDolAdminIpBlockList->ActionApplyDelete(); 
     38        $sResult .= $oBxDolAdminIpBlockList->GenIPBlackListTable(); 
     39        break; 
    4040} 
    4141 
  • trunk/administration/js/email_templates.js

    r15201 r15211  
    2525    var iLangId = $(oSelect).val(); 
    2626    var sTemplName = $(oSelect).attr('name').replace('_Language', ''); 
    27      
     27 
    2828    $('#adm-email-loading').bx_loading(); 
    29      
     29 
    3030    $.post( 
    3131        sAdminUrl + 'email_templates.php', 
     
    3737        function(oResult) { 
    3838            $('#adm-email-loading').bx_loading(); 
    39              
     39 
    4040            $("[name='" + sTemplName + "_Subject']").val(oResult.subject); 
    4141            $("[name='" + sTemplName + "_Body']").val(oResult.body); 
  • trunk/administration/js/fields.js

    r15201 r15211  
    44 
    55function BxDolPFM( aAreas ) { 
    6     this.config = { 
    7         areas: 0, 
    8         parserUrl: '', 
    9         inactiveColumns: 4, 
    10         getAreaElem : function(id) { //function to get the area element. made to customizability 
    11             var $area = $( '#m' + id + ' > div.build_container' ); 
     6    this.config = { 
     7        areas: 0, 
     8        parserUrl: '', 
     9        inactiveColumns: 4, 
     10        getAreaElem : function(id) { //function to get the area element. made to customizability 
     11            var $area = $( '#m' + id + ' > div.build_container' ); 
    1212            return $area.length ? $area.get(0) : false; 
    13         } 
    14     }; 
    15      
    16     this.areas = new Array(); 
     13        } 
     14    }; 
     15 
     16    this.areas = new Array(); 
    1717} 
    1818 
     
    2020 
    2121BxDolPFM.prototype.init = function() { 
    22     //generate areas 
     22    //generate areas 
    2323    for (var iInd = 1; iInd <= this.config.areas; iInd ++) { //we will begin ID's from 1 ! 
    2424        var area = new BxDolPFMArea(this, iInd); 
    2525        if (!area.element) 
    2626            continue; 
    27          
     27 
    2828        this.areas[this.areas.length] = area; 
    2929    } 
     
    3131 
    3232BxDolPFM.prototype.getAreaByID = function( iAreaID ) { 
    33     for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) 
    34         if( this.areas[iAreaInd].id == iAreaID ) 
    35             return this.areas[iAreaInd]; 
    36      
    37     return false; 
     33    for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) 
     34        if( this.areas[iAreaInd].id == iAreaID ) 
     35            return this.areas[iAreaInd]; 
     36 
     37    return false; 
    3838} 
    3939 
    4040BxDolPFM.prototype.updateAreas = function( sText, iItemID, sNewName, iAreaID ) { 
    41     switch( sText ) { 
    42         case 'deleteItem': 
    43             location.reload(); 
    44         break; 
    45          
    46         case 'updateItem': 
    47             for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) 
    48                 this.areas[iAreaInd].getItemOrBlockByID( iItemID ).updateName( sNewName ); 
    49         break; 
    50          
    51         case 'newBlock': 
    52             if( !iItemID ) { 
    53                 alert( 'Sorry couldn\'t insert new block. Please check if NEW BLOCK already exists.' ); 
    54                 this.getAreaByID( iAreaID ).moveFakeBlockBack(); 
    55             } else { 
    56                 for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) { 
    57                     var oArea = this.areas[iAreaInd]; 
    58                      
    59                     oArea.insertNewBlock( iItemID ); 
    60                     oArea.moveFakeBlockBack(); 
    61                      
    62                     if( oArea.id == iAreaID ) 
    63                         oArea.resortAndSubmit(); 
    64                     else 
    65                         oArea.resortArrays(); // do not submit positions for other areas 
    66                 } 
    67             } 
    68         break; 
    69              
    70         case 'newItem': 
    71             if( !iItemID ) { 
    72                 alert( 'Sorry couldn\'t insert new item. Please check if NEW_ITEM already exists.' ); 
    73                 this.getAreaByID( iAreaID ).moveFakeItemBack(); 
    74             } else { 
    75                 for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) { 
    76                     var oArea = this.areas[iAreaInd]; 
    77                      
    78                     oArea.insertNewItem( iItemID ); 
    79                     oArea.moveFakeItemBack(); 
    80                      
    81                     if( oArea.id == iAreaID ) 
    82                         oArea.resortAndSubmit(); 
    83                     else 
    84                         oArea.resortArrays(); // do not submit positions for other areas 
    85                 } 
    86             } 
    87         break; 
    88     } 
     41    switch( sText ) { 
     42        case 'deleteItem': 
     43            location.reload(); 
     44        break; 
     45 
     46        case 'updateItem': 
     47            for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) 
     48                this.areas[iAreaInd].getItemOrBlockByID( iItemID ).updateName( sNewName ); 
     49        break; 
     50 
     51        case 'newBlock': 
     52            if( !iItemID ) { 
     53                alert( 'Sorry couldn\'t insert new block. Please check if NEW BLOCK already exists.' ); 
     54                this.getAreaByID( iAreaID ).moveFakeBlockBack(); 
     55            } else { 
     56                for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) { 
     57                    var oArea = this.areas[iAreaInd]; 
     58 
     59                    oArea.insertNewBlock( iItemID ); 
     60                    oArea.moveFakeBlockBack(); 
     61 
     62                    if( oArea.id == iAreaID ) 
     63                        oArea.resortAndSubmit(); 
     64                    else 
     65                        oArea.resortArrays(); // do not submit positions for other areas 
     66                } 
     67            } 
     68        break; 
     69 
     70        case 'newItem': 
     71            if( !iItemID ) { 
     72                alert( 'Sorry couldn\'t insert new item. Please check if NEW_ITEM already exists.' ); 
     73                this.getAreaByID( iAreaID ).moveFakeItemBack(); 
     74            } else { 
     75                for( var iAreaInd = 0; iAreaInd < this.areas.length; iAreaInd ++ ) { 
     76                    var oArea = this.areas[iAreaInd]; 
     77 
     78                    oArea.insertNewItem( iItemID ); 
     79                    oArea.moveFakeItemBack(); 
     80 
     81                    if( oArea.id == iAreaID ) 
     82                        oArea.resortAndSubmit(); 
     83                    else 
     84                        oArea.resortArrays(); // do not submit positions for other areas 
     85                } 
     86            } 
     87        break; 
     88    } 
    8989} 
    9090 
     
    9595 
    9696function BxDolPFMArea(parent, id) { 
    97     this.id     = id; 
    98     this.parent = parent; 
    99      
     97    this.id     = id; 
     98    this.parent = parent; 
     99 
    100100    this.getElement(); 
    101      
     101 
    102102    if (!this.element) 
    103103        return false; 
    104      
    105      
    106     this.active_blocks      = new Array(); 
    107     this.inactive_blocks    = new Array(); 
    108     this.active_items       = new Array(); 
    109     this.inactive_items     = new Array(); 
    110      
    111     this.activeZoneElemID         = 'area_' + this.id + '_active' 
    112     this.inactiveItemsZoneElemID  = 'area_' + this.id + '_items_inactive' 
    113     this.inactiveBlocksZoneElemID = 'area_' + this.id + '_blocks_inactive' 
    114      
    115     this.requestData(); 
     104 
     105 
     106    this.active_blocks      = new Array(); 
     107    this.inactive_blocks    = new Array(); 
     108    this.active_items       = new Array(); 
     109    this.inactive_items     = new Array(); 
     110 
     111    this.activeZoneElemID         = 'area_' + this.id + '_active' 
     112    this.inactiveItemsZoneElemID  = 'area_' + this.id + '_items_inactive' 
     113    this.inactiveBlocksZoneElemID = 'area_' + this.id + '_blocks_inactive' 
     114 
     115    this.requestData(); 
    116116} 
    117117 
    118118BxDolPFMArea.prototype.getElement = function() { 
    119     this.element = this.parent.config.getAreaElem(this.id); 
     119    this.element = this.parent.config.getAreaElem(this.id); 
    120120} 
    121121 
    122122BxDolPFMArea.prototype.requestData = function() { 
    123     var oThisArea = this; 
    124     $.getJSON( 
    125         this.parent.config.parserUrl, 
    126         {action: 'getArea', id: this.id}, 
    127         function(oAreaData){ 
    128             oThisArea.getData(oAreaData); 
    129         } 
    130     ); 
     123    var oThisArea = this; 
     124    $.getJSON( 
     125        this.parent.config.parserUrl, 
     126        {action: 'getArea', id: this.id}, 
     127        function(oAreaData){ 
     128            oThisArea.getData(oAreaData); 
     129        } 
     130    ); 
    131131} 
    132132 
    133133BxDolPFMArea.prototype.getData = function(oAreaData) { 
    134     if( this.id != oAreaData.id ) 
    135         return false; 
    136      
    137     for( var iBlockInd = 0; iBlockInd < oAreaData.active_blocks.length;   iBlockInd++ )    this.active_blocks[   this.active_blocks.length   ] = new BxDolPFMBlock( this, oAreaData.active_blocks[   iBlockInd ] ); 
    138     for( var iBlockInd = 0; iBlockInd < oAreaData.inactive_blocks.length; iBlockInd++ )    this.inactive_blocks[ this.inactive_blocks.length ] = new BxDolPFMBlock( this, oAreaData.inactive_blocks[ iBlockInd ] ); 
    139     for( var iItemInd  = 0; iItemInd  < oAreaData.active_items.length;    iItemInd ++ )    this.active_items[    this.active_items.length    ] = new BxDolPFMItem(  this, oAreaData.active_items[    iItemInd  ] ); 
    140     for( var iItemInd  = 0; iItemInd  < oAreaData.inactive_items.length;  iItemInd ++ )    this.inactive_items[  this.inactive_items.length  ] = new BxDolPFMItem(  this, oAreaData.inactive_items[  iItemInd  ] ); 
    141      
    142     this.draw(); 
     134    if( this.id != oAreaData.id ) 
     135        return false; 
     136 
     137    for( var iBlockInd = 0; iBlockInd < oAreaData.active_blocks.length;   iBlockInd++ )    this.active_blocks[   this.active_blocks.length   ] = new BxDolPFMBlock( this, oAreaData.active_blocks[   iBlockInd ] ); 
     138    for( var iBlockInd = 0; iBlockInd < oAreaData.inactive_blocks.length; iBlockInd++ )    this.inactive_blocks[ this.inactive_blocks.length ] = new BxDolPFMBlock( this, oAreaData.inactive_blocks[ iBlockInd ] ); 
     139    for( var iItemInd  = 0; iItemInd  < oAreaData.active_items.length;    iItemInd ++ )    this.active_items[    this.active_items.length    ] = new BxDolPFMItem(  this, oAreaData.active_items[    iItemInd  ] ); 
     140    for( var iItemInd  = 0; iItemInd  < oAreaData.inactive_items.length;  iItemInd ++ )    this.inactive_items[  this.inactive_items.length  ] = new BxDolPFMItem(  this, oAreaData.inactive_items[  iItemInd  ] ); 
     141 
     142    this.draw(); 
    143143} 
    144144 
    145145BxDolPFMArea.prototype.draw = function() { 
    146     $( this.element ).html( '' ); //clear element 
     146    $( this.element ).html( '' ); //clear element 
    147147    var sActiveItemsC = _t('_adm_mbuilder_active_items'); 
    148148    var sInactiveItemsC = _t('_adm_mbuilder_inactive_items'); 
    149149    var sInactiveBlocksC = _t('_adm_txt_pb_inactive_blocks'); 
    150150 
    151     $( this.element ).append( 
    152         '<div class="build_zone_header">'+sActiveItemsC+'</div>' + 
    153         '<div class="blocks_cont_bord">' + 
    154             '<div class="blocks_container" id="' + this.activeZoneElemID + '">' + 
    155                 '<div class="build_block_fake"></div>' + 
    156             '</div>' + 
    157         '</div>' + 
    158         '<br style="height:20px;clear:both;" />' + 
    159         '<div class="build_zone_header">'+sInactiveBlocksC+'</div>' + 
    160         '<div class="blocks_cont_bord">' + 
    161             '<div class="blocks_container" id="' + this.inactiveBlocksZoneElemID + '">' + 
    162                 '<div class="build_block_fake"></div>' + 
    163             '</div>' + 
    164         '</div>' + 
    165         '<br style="height:20px;clear:both;" />' + 
    166         '<div class="build_zone_header">'+sInactiveItemsC+'</div>' + 
    167         '<div class="blocks_cont_bord build_block_inactive_items">' + 
    168             '<div class="blocks_container" id="' + this.inactiveItemsZoneElemID + '">' + 
    169                 '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_1">' + 
    170                     '<div class="build_item_fake"></div>' + 
    171                 '</div>' + 
    172                 '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_2">' + 
    173                     '<div class="build_item_fake"></div>' + 
    174                 '</div>' + 
    175                 '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_3">' + 
    176                     '<div class="build_item_fake"></div>' + 
    177                 '</div>' + 
    178                 '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_4">' + 
    179                     '<div class="build_item_fake"></div>' + 
    180                 '</div>' + 
    181                 '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_5">' + 
    182                     '<div class="build_item_fake"></div>' + 
    183                 '</div>' + 
    184             '</div>' + 
    185         '</div>' 
    186     ); 
    187      
    188     this.activeZoneElement         = $( '#' + this.activeZoneElemID         ).get(0); 
    189     this.inactiveBlocksZoneElement = $( '#' + this.inactiveBlocksZoneElemID ).get(0); 
    190     this.inactiveItemsZoneElement  = $( '#' + this.inactiveItemsZoneElemID  ).get(0); 
    191      
    192     //draw all active blocks 
    193     for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) { 
    194         this.active_blocks[iBlockInd].draw( this.activeZoneElement ); 
    195          
    196         //draw subitems of block 
    197         for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
    198             if( this.active_items[iItemInd].block == this.active_blocks[iBlockInd].id ) 
    199                 this.active_items[iItemInd].draw( this.active_blocks[iBlockInd].element ); 
    200     } 
    201      
    202     //append NEW BLOCK element 
    203     $( this.inactiveBlocksZoneElement ).append( 
    204         '<div class="build_block" id="build_block_new_' + this.id + '">' + 
    205             '<div class="build_block_header">NEW BLOCK</div>' + 
    206         '</div>' 
    207     ); 
    208      
    209     //append all inactive blocks 
    210     for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
    211         this.inactive_blocks[iBlockInd].draw( this.inactiveBlocksZoneElement ); 
    212      
    213     //append NEW_ITEM element 
    214     $( '#build_inac_items_area_' + this.id + '_col_1' ).append( 
    215         '<div class="build_item_active" id="build_item_new_' + this.id + '">NEW_ITEM</div>' 
    216     ); 
    217      
    218     //append all inactive items to 5 columns 
    219     var iColCount = 2; 
    220     for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) { 
    221         this.inactive_items[iItemInd].draw( 
    222             $( '#build_inac_items_area_' + this.id + '_col_' + iColCount++ ).get(0) 
    223         ); 
    224          
    225         if( iColCount > 5 ) iColCount = 1; 
    226     } 
    227      
    228     $( this.activeZoneElement         ).append( '<div class="clear_both"></div>' ); 
    229     $( this.inactiveBlocksZoneElement ).append( '<div class="clear_both"></div>' ); 
    230     $( this.inactiveItemsZoneElement  ).append( '<div class="clear_both"></div>' ); 
    231      
    232     this.fixZonesWidths(); 
    233     this.activateSortable(); 
     151    $( this.element ).append( 
     152        '<div class="build_zone_header">'+sActiveItemsC+'</div>' + 
     153        '<div class="blocks_cont_bord">' + 
     154            '<div class="blocks_container" id="' + this.activeZoneElemID + '">' + 
     155                '<div class="build_block_fake"></div>' + 
     156            '</div>' + 
     157        '</div>' + 
     158        '<br style="height:20px;clear:both;" />' + 
     159        '<div class="build_zone_header">'+sInactiveBlocksC+'</div>' + 
     160        '<div class="blocks_cont_bord">' + 
     161            '<div class="blocks_container" id="' + this.inactiveBlocksZoneElemID + '">' + 
     162                '<div class="build_block_fake"></div>' + 
     163            '</div>' + 
     164        '</div>' + 
     165        '<br style="height:20px;clear:both;" />' + 
     166        '<div class="build_zone_header">'+sInactiveItemsC+'</div>' + 
     167        '<div class="blocks_cont_bord build_block_inactive_items">' + 
     168            '<div class="blocks_container" id="' + this.inactiveItemsZoneElemID + '">' + 
     169                '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_1">' + 
     170                    '<div class="build_item_fake"></div>' + 
     171                '</div>' + 
     172                '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_2">' + 
     173                    '<div class="build_item_fake"></div>' + 
     174                '</div>' + 
     175                '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_3">' + 
     176                    '<div class="build_item_fake"></div>' + 
     177                '</div>' + 
     178                '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_4">' + 
     179                    '<div class="build_item_fake"></div>' + 
     180                '</div>' + 
     181                '<div class="build_inac_items_col" id="build_inac_items_area_' + this.id + '_col_5">' + 
     182                    '<div class="build_item_fake"></div>' + 
     183                '</div>' + 
     184            '</div>' + 
     185        '</div>' 
     186    ); 
     187 
     188    this.activeZoneElement         = $( '#' + this.activeZoneElemID         ).get(0); 
     189    this.inactiveBlocksZoneElement = $( '#' + this.inactiveBlocksZoneElemID ).get(0); 
     190    this.inactiveItemsZoneElement  = $( '#' + this.inactiveItemsZoneElemID  ).get(0); 
     191 
     192    //draw all active blocks 
     193    for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) { 
     194        this.active_blocks[iBlockInd].draw( this.activeZoneElement ); 
     195 
     196        //draw subitems of block 
     197        for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
     198            if( this.active_items[iItemInd].block == this.active_blocks[iBlockInd].id ) 
     199                this.active_items[iItemInd].draw( this.active_blocks[iBlockInd].element ); 
     200    } 
     201 
     202    //append NEW BLOCK element 
     203    $( this.inactiveBlocksZoneElement ).append( 
     204        '<div class="build_block" id="build_block_new_' + this.id + '">' + 
     205            '<div class="build_block_header">NEW BLOCK</div>' + 
     206        '</div>' 
     207    ); 
     208 
     209    //append all inactive blocks 
     210    for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
     211        this.inactive_blocks[iBlockInd].draw( this.inactiveBlocksZoneElement ); 
     212 
     213    //append NEW_ITEM element 
     214    $( '#build_inac_items_area_' + this.id + '_col_1' ).append( 
     215        '<div class="build_item_active" id="build_item_new_' + this.id + '">NEW_ITEM</div>' 
     216    ); 
     217 
     218    //append all inactive items to 5 columns 
     219    var iColCount = 2; 
     220    for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) { 
     221        this.inactive_items[iItemInd].draw( 
     222            $( '#build_inac_items_area_' + this.id + '_col_' + iColCount++ ).get(0) 
     223        ); 
     224 
     225        if( iColCount > 5 ) iColCount = 1; 
     226    } 
     227 
     228    $( this.activeZoneElement         ).append( '<div class="clear_both"></div>' ); 
     229    $( this.inactiveBlocksZoneElement ).append( '<div class="clear_both"></div>' ); 
     230    $( this.inactiveItemsZoneElement  ).append( '<div class="clear_both"></div>' ); 
     231 
     232    this.fixZonesWidths(); 
     233    this.activateSortable(); 
    234234} 
    235235 
    236236BxDolPFMArea.prototype.fixZonesWidths = function() { 
    237     if( this.active_blocks.length ) { 
    238         //fix active area 
    239         var el = $( this.active_blocks[0].element ); 
    240          
    241         var w1 = parseInt( el.css( 'width'        ) ) | 0; 
    242         var w2 = parseInt( el.css( 'margin-left'  ) ) | 0; 
    243         var w3 = parseInt( el.css( 'margin-right' ) ) | 0; 
    244         var w = ( w1 + w2 + w3 ) * ( this.active_blocks.length + 1 ) + 20; 
    245         $( this.activeZoneElement ).parent().width( w ); 
    246     } 
    247      
    248     if( this.inactive_blocks.length ) { 
    249         //fix inactive area 
    250         var el = $( this.inactive_blocks[0].element ); 
    251          
    252         var w1 = parseInt( el.css( 'width'        ) ) | 0; 
    253         var w2 = parseInt( el.css( 'margin-left'  ) ) | 0; 
    254         var w3 = parseInt( el.css( 'margin-right' ) ) | 0; 
    255         var w = ( w1 + w2 + w3 ) * ( this.inactive_blocks.length + 2 ) + 20; 
    256         $( this.inactiveBlocksZoneElement ).parent().width( w ); 
    257     } 
     237    if( this.active_blocks.length ) { 
     238        //fix active area 
     239        var el = $( this.active_blocks[0].element ); 
     240 
     241        var w1 = parseInt( el.css( 'width'        ) ) | 0; 
     242        var w2 = parseInt( el.css( 'margin-left'  ) ) | 0; 
     243        var w3 = parseInt( el.css( 'margin-right' ) ) | 0; 
     244        var w = ( w1 + w2 + w3 ) * ( this.active_blocks.length + 1 ) + 20; 
     245        $( this.activeZoneElement ).parent().width( w ); 
     246    } 
     247 
     248    if( this.inactive_blocks.length ) { 
     249        //fix inactive area 
     250        var el = $( this.inactive_blocks[0].element ); 
     251 
     252        var w1 = parseInt( el.css( 'width'        ) ) | 0; 
     253        var w2 = parseInt( el.css( 'margin-left'  ) ) | 0; 
     254        var w3 = parseInt( el.css( 'margin-right' ) ) | 0; 
     255        var w = ( w1 + w2 + w3 ) * ( this.inactive_blocks.length + 2 ) + 20; 
     256        $( this.inactiveBlocksZoneElement ).parent().width( w ); 
     257    } 
    258258} 
    259259 
    260260 
    261261BxDolPFMArea.prototype.activateSortable = function() { 
    262     var oThisArea = this; 
    263      
     262    var oThisArea = this; 
     263 
    264264    $('.blocks_container', this.element).sortable('destroy').sortable({ 
    265265        items: $('.build_block,.build_block_fake', this.element), 
     
    269269        placeholder: 'build_block ui-sortable-placeholder', 
    270270        forcePlaceholderSize: true, 
    271         stop: function(e,ui){ 
    272             oThisArea.stopItemsSort( ui.item ); 
    273         } 
     271        stop: function(e,ui){ 
     272            oThisArea.stopItemsSort( ui.item ); 
     273        } 
    274274    }); 
    275      
     275 
    276276    $('.build_block,.build_inac_items_col', this.element).sortable({ 
    277277        items: $('.build_item_active,.build_item_inactive,.build_item_fake', this.element), 
     
    279279        placeholder: 'build_item_active  ui-sortable-placeholder', 
    280280        forcePlaceholderSize: true, 
    281         stop: function(e,ui){ 
    282             oThisArea.stopItemsSort( ui.item ); 
    283         } 
     281        stop: function(e,ui){ 
     282            oThisArea.stopItemsSort( ui.item ); 
     283        } 
    284284    }); 
    285285} 
     
    287287BxDolPFMArea.prototype.stopItemsSort = function( item ) { 
    288288    var draggedElementID = $(item).attr('id'); 
    289     if( draggedElementID == 'build_block_new_' + this.id ) { 
    290         if( $( '#build_block_new_' + this.id ).parent().is( '#' + this.activeZoneElemID ) ) 
    291             this.createNewBlock(); 
    292     } 
    293     else if( draggedElementID == 'build_item_new_' + this.id ){ 
    294         if( $( '#build_item_new_' + this.id ).parents('#' + this.activeZoneElemID).length ) 
    295             this.createNewItem(); 
    296     } 
    297     else 
    298         this.resortAndSubmit(); 
     289    if( draggedElementID == 'build_block_new_' + this.id ) { 
     290        if( $( '#build_block_new_' + this.id ).parent().is( '#' + this.activeZoneElemID ) ) 
     291            this.createNewBlock(); 
     292    } 
     293    else if( draggedElementID == 'build_item_new_' + this.id ){ 
     294        if( $( '#build_item_new_' + this.id ).parents('#' + this.activeZoneElemID).length ) 
     295            this.createNewItem(); 
     296    } 
     297    else 
     298        this.resortAndSubmit(); 
    299299} 
    300300 
    301301BxDolPFMArea.prototype.resortAndSubmit = function(){ 
    302     var oThisArea = this; 
    303      
    304     setTimeout( function() { 
    305         oThisArea.resortArrays(); 
    306         oThisArea.submitPositions(); 
    307     }, 550 ); 
     302    var oThisArea = this; 
     303 
     304    setTimeout( function() { 
     305        oThisArea.resortArrays(); 
     306        oThisArea.submitPositions(); 
     307    }, 550 ); 
    308308} 
    309309 
    310310BxDolPFMArea.prototype.createNewBlock = function() { 
    311     var oThisArea = this; 
    312      
    313     $.getJSON( 
    314         this.parent.config.parserUrl, 
    315         {action: 'createNewBlock'}, 
    316         function(oAreaData){ 
    317             oThisArea.parent.updateAreas( 'newBlock', oAreaData.id, '', oThisArea.id ); 
    318         } 
    319     ); 
     311    var oThisArea = this; 
     312 
     313    $.getJSON( 
     314        this.parent.config.parserUrl, 
     315        {action: 'createNewBlock'}, 
     316        function(oAreaData){ 
     317            oThisArea.parent.updateAreas( 'newBlock', oAreaData.id, '', oThisArea.id ); 
     318        } 
     319    ); 
    320320} 
    321321 
    322322BxDolPFMArea.prototype.createNewItem = function() { 
    323     var oThisArea = this; 
    324      
    325     $.getJSON( 
    326         this.parent.config.parserUrl, 
    327         {action: 'createNewItem'}, 
    328         function(oAreaData){ 
    329             oThisArea.parent.updateAreas( 'newItem', oAreaData.id, '', oThisArea.id ); 
    330         } 
    331     ); 
     323    var oThisArea = this; 
     324 
     325    $.getJSON( 
     326        this.parent.config.parserUrl, 
     327        {action: 'createNewItem'}, 
     328        function(oAreaData){ 
     329            oThisArea.parent.updateAreas( 'newItem', oAreaData.id, '', oThisArea.id ); 
     330        } 
     331    ); 
    332332} 
    333333 
    334334BxDolPFMArea.prototype.insertNewBlock = function( newBlockID ) { 
    335      
    336     var iNewInd = this.active_blocks.length; 
    337     var oNewBlockData = {id:newBlockID,name:'NEW BLOCK'}; 
    338     var oThisArea = this; 
    339      
    340     //create object 
    341     this.active_blocks[iNewInd] = new BxDolPFMBlock( this, oNewBlockData ); 
    342     var oNewBlock = this.active_blocks[iNewInd]; 
    343      
    344     //insert before fake NEW BLOCK element 
    345     $( oNewBlock.getCode() ).insertBefore( '#build_block_new_' + this.id ); 
    346      
    347     //attach onclick event for link 
    348     $( '#' + oNewBlock.elementID + ' > div.build_block_header' ).children( 'a' ).click( function(){ 
    349         oThisArea.openFieldDialog( oNewBlock.id, oThisArea.id ); 
    350     } ); 
    351      
    352     //get element 
    353     oNewBlock.getElement(); 
    354      
    355     this.activateSortable(); 
     335 
     336    var iNewInd = this.active_blocks.length; 
     337    var oNewBlockData = {id:newBlockID,name:'NEW BLOCK'}; 
     338    var oThisArea = this; 
     339 
     340    //create object 
     341    this.active_blocks[iNewInd] = new BxDolPFMBlock( this, oNewBlockData ); 
     342    var oNewBlock = this.active_blocks[iNewInd]; 
     343 
     344    //insert before fake NEW BLOCK element 
     345    $( oNewBlock.getCode() ).insertBefore( '#build_block_new_' + this.id ); 
     346 
     347    //attach onclick event for link 
     348    $( '#' + oNewBlock.elementID + ' > div.build_block_header' ).children( 'a' ).click( function(){ 
     349        oThisArea.openFieldDialog( oNewBlock.id, oThisArea.id ); 
     350    } ); 
     351 
     352    //get element 
     353    oNewBlock.getElement(); 
     354 
     355    this.activateSortable(); 
    356356} 
    357357 
    358358BxDolPFMArea.prototype.insertNewItem = function( newItemID ) { 
    359     var iNewInd = this.active_items.length; 
    360     var oNewItemData = {id:newItemID,name:'NEW_ITEM'}; 
    361     var oThisArea = this; 
    362      
    363     //create object 
    364     this.active_items[iNewInd] = new BxDolPFMItem( this, oNewItemData ); 
    365     var oNewItem = this.active_items[iNewInd]; 
    366      
    367     //insert before fake NEW_ITEM element 
    368     $( oNewItem.getCode() ).insertBefore( '#build_item_new_' + this.id ); 
    369      
    370     //attach onclick event for link 
    371     $( '#' + oNewItem.elementID ).children( 'a' ).click( function(){ 
    372         oThisArea.openFieldDialog( oNewItem.id, oThisArea.id ); 
    373     } ); 
    374      
    375     //get element 
    376     this.active_items[iNewInd].getElement(); 
    377      
    378     this.activateSortable(); 
     359    var iNewInd = this.active_items.length; 
     360    var oNewItemData = {id:newItemID,name:'NEW_ITEM'}; 
     361    var oThisArea = this; 
     362 
     363    //create object 
     364    this.active_items[iNewInd] = new BxDolPFMItem( this, oNewItemData ); 
     365    var oNewItem = this.active_items[iNewInd]; 
     366 
     367    //insert before fake NEW_ITEM element 
     368    $( oNewItem.getCode() ).insertBefore( '#build_item_new_' + this.id ); 
     369 
     370    //attach onclick event for link 
     371    $( '#' + oNewItem.elementID ).children( 'a' ).click( function(){ 
     372        oThisArea.openFieldDialog( oNewItem.id, oThisArea.id ); 
     373    } ); 
     374 
     375    //get element 
     376    this.active_items[iNewInd].getElement(); 
     377 
     378    this.activateSortable(); 
    379379} 
    380380 
    381381BxDolPFMArea.prototype.moveFakeBlockBack = function() { 
    382     $( '#build_block_new_' + this.id ).prependTo( this.inactiveBlocksZoneElement ); 
     382    $( '#build_block_new_' + this.id ).prependTo( this.inactiveBlocksZoneElement ); 
    383383} 
    384384 
    385385BxDolPFMArea.prototype.moveFakeItemBack = function() { 
    386     $( '#build_item_new_' + this.id ).prependTo( '#build_inac_items_area_' + this.id + '_col_1' ); 
     386    $( '#build_item_new_' + this.id ).prependTo( '#build_inac_items_area_' + this.id + '_col_1' ); 
    387387} 
    388388 
    389389BxDolPFMArea.prototype.resortArrays = function() { 
    390     var oThisArea = this; 
    391      
    392     var aNewBlocks     = new Array(); 
    393     var aNewBlocksInac = new Array(); 
    394     var aNewItems      = new Array(); 
    395     var aNewItemsInac  = new Array(); 
    396      
    397     //get active blocks 
    398     $( '#' + this.activeZoneElemID + ' .build_block' ).each( function( ind, eBlock ){ 
    399         var oBlock = oThisArea.getBlockByElementID( eBlock.id ); 
    400         if( !oBlock || $( eBlock ).css('visibility') == 'hidden' ) return; //just in case 
    401         aNewBlocks.push( oBlock ); 
    402          
    403         //get active items of this block 
    404         $( '#' + oBlock.elementID + ' .build_item_active' ).each( function( ind, eItem ){ 
    405             var oItem = oThisArea.getItemByElementID( eItem.id ); 
    406             if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; //it can be fake NEW_ITEM 
    407             oItem.block = oBlock.id; //set parent block 
    408             aNewItems.push( oItem ); 
    409         }); 
    410     }); 
    411      
    412     //get inactive blocks 
    413     $( '#' + this.inactiveBlocksZoneElemID + ' .build_block' ).each( function( ind, eBlock ){ 
    414         var oBlock = oThisArea.getBlockByElementID( eBlock.id ); 
    415         if( !oBlock || $( eBlock ).css('visibility') == 'hidden' ) return; 
    416         aNewBlocksInac.push( oBlock ); 
    417     }); 
    418      
    419     //get inactive items from blocks zone 
    420     $( '#' + this.inactiveBlocksZoneElemID + ' .build_item_active' ).each( function( ind, eItem ){ 
    421         var oItem = oThisArea.getItemByElementID( eItem.id ); 
    422         if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; 
    423         oItem.block = 0; 
    424         aNewItemsInac.push( oItem ); 
    425     }); 
    426      
    427     //get inactive items from items zone 
    428     $( '#' + this.inactiveItemsZoneElemID + ' .build_item_active' ).each( function( ind, eItem ){ 
    429         var oItem = oThisArea.getItemByElementID( eItem.id ); 
    430         if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; 
    431         oItem.block = 0; 
    432         aNewItemsInac.push( oItem ); 
    433     }); 
    434      
    435     this.active_blocks   = aNewBlocks; 
    436     this.inactive_blocks = aNewBlocksInac; 
    437     this.active_items    = aNewItems; 
    438     this.inactive_items  = aNewItemsInac; 
    439      
    440     this.fixZonesWidths(); 
     390    var oThisArea = this; 
     391 
     392    var aNewBlocks     = new Array(); 
     393    var aNewBlocksInac = new Array(); 
     394    var aNewItems      = new Array(); 
     395    var aNewItemsInac  = new Array(); 
     396 
     397    //get active blocks 
     398    $( '#' + this.activeZoneElemID + ' .build_block' ).each( function( ind, eBlock ){ 
     399        var oBlock = oThisArea.getBlockByElementID( eBlock.id ); 
     400        if( !oBlock || $( eBlock ).css('visibility') == 'hidden' ) return; //just in case 
     401        aNewBlocks.push( oBlock ); 
     402 
     403        //get active items of this block 
     404        $( '#' + oBlock.elementID + ' .build_item_active' ).each( function( ind, eItem ){ 
     405            var oItem = oThisArea.getItemByElementID( eItem.id ); 
     406            if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; //it can be fake NEW_ITEM 
     407            oItem.block = oBlock.id; //set parent block 
     408            aNewItems.push( oItem ); 
     409        }); 
     410    }); 
     411 
     412    //get inactive blocks 
     413    $( '#' + this.inactiveBlocksZoneElemID + ' .build_block' ).each( function( ind, eBlock ){ 
     414        var oBlock = oThisArea.getBlockByElementID( eBlock.id ); 
     415        if( !oBlock || $( eBlock ).css('visibility') == 'hidden' ) return; 
     416        aNewBlocksInac.push( oBlock ); 
     417    }); 
     418 
     419    //get inactive items from blocks zone 
     420    $( '#' + this.inactiveBlocksZoneElemID + ' .build_item_active' ).each( function( ind, eItem ){ 
     421        var oItem = oThisArea.getItemByElementID( eItem.id ); 
     422        if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; 
     423        oItem.block = 0; 
     424        aNewItemsInac.push( oItem ); 
     425    }); 
     426 
     427    //get inactive items from items zone 
     428    $( '#' + this.inactiveItemsZoneElemID + ' .build_item_active' ).each( function( ind, eItem ){ 
     429        var oItem = oThisArea.getItemByElementID( eItem.id ); 
     430        if( !oItem || $( eItem ).css('visibility') == 'hidden' ) return; 
     431        oItem.block = 0; 
     432        aNewItemsInac.push( oItem ); 
     433    }); 
     434 
     435    this.active_blocks   = aNewBlocks; 
     436    this.inactive_blocks = aNewBlocksInac; 
     437    this.active_items    = aNewItems; 
     438    this.inactive_items  = aNewItemsInac; 
     439 
     440    this.fixZonesWidths(); 
    441441} 
    442442 
    443443BxDolPFMArea.prototype.submitPositions = function(){ 
    444     var oRequest = {}; 
    445      
    446     for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) { 
    447         oRequest['blocks[' + iBlockInd + ']'] = this.active_blocks[iBlockInd].id; 
    448     } 
    449      
    450     for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) { 
    451         oRequest['items[' + iItemInd + ']'] = this.active_items[iItemInd].id; 
    452         oRequest['items_blocks[' + this.active_items[iItemInd].id + ']'] = this.active_items[iItemInd].block; 
    453     } 
    454      
    455     oRequest.action = 'savePositions'; 
    456     oRequest.id = this.id; 
    457      
    458     var oThisArea = this; 
    459     $.post( this.parent.config.parserUrl, oRequest, function(sResult){oThisArea.processSaveResult(sResult);} ); 
     444    var oRequest = {}; 
     445 
     446    for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) { 
     447        oRequest['blocks[' + iBlockInd + ']'] = this.active_blocks[iBlockInd].id; 
     448    } 
     449 
     450    for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) { 
     451        oRequest['items[' + iItemInd + ']'] = this.active_items[iItemInd].id; 
     452        oRequest['items_blocks[' + this.active_items[iItemInd].id + ']'] = this.active_items[iItemInd].block; 
     453    } 
     454 
     455    oRequest.action = 'savePositions'; 
     456    oRequest.id = this.id; 
     457 
     458    var oThisArea = this; 
     459    $.post( this.parent.config.parserUrl, oRequest, function(sResult){oThisArea.processSaveResult(sResult);} ); 
    460460} 
    461461 
    462462BxDolPFMArea.prototype.processSaveResult = function( sResult ) { 
    463     if( $.trim( sResult ) != 'OK' ) 
    464         alert( sResult ); 
     463    if( $.trim( sResult ) != 'OK' ) 
     464        alert( sResult ); 
    465465} 
    466466 
    467467BxDolPFMArea.prototype.getBlockByElementID = function( getID ) { 
    468     for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) 
    469         if( this.active_blocks[iBlockInd].elementID == getID ) 
    470             return this.active_blocks[iBlockInd]; 
    471      
    472     for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
    473         if( this.inactive_blocks[iBlockInd].elementID == getID ) 
    474             return this.inactive_blocks[iBlockInd]; 
    475      
    476     return false; 
     468    for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) 
     469        if( this.active_blocks[iBlockInd].elementID == getID ) 
     470            return this.active_blocks[iBlockInd]; 
     471 
     472    for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
     473        if( this.inactive_blocks[iBlockInd].elementID == getID ) 
     474            return this.inactive_blocks[iBlockInd]; 
     475 
     476    return false; 
    477477} 
    478478 
    479479BxDolPFMArea.prototype.getItemByElementID = function( getID ) { 
    480     for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
    481         if( this.active_items[iItemInd].elementID == getID ) 
    482             return this.active_items[iItemInd]; 
    483      
    484     for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) 
    485         if( this.inactive_items[iItemInd].elementID == getID ) 
    486             return this.inactive_items[iItemInd]; 
    487      
    488     return false; 
     480    for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
     481        if( this.active_items[iItemInd].elementID == getID ) 
     482            return this.active_items[iItemInd]; 
     483 
     484    for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) 
     485        if( this.inactive_items[iItemInd].elementID == getID ) 
     486            return this.inactive_items[iItemInd]; 
     487 
     488    return false; 
    489489} 
    490490 
    491491BxDolPFMArea.prototype.getItemOrBlockByID = function( getID ) { 
    492     //search in active items 
    493     for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
    494         if( this.active_items[iItemInd].id == getID ) 
    495             return this.active_items[iItemInd]; 
    496      
    497     //search in inactive items 
    498     for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) 
    499         if( this.inactive_items[iItemInd].id == getID ) 
    500             return this.inactive_items[iItemInd]; 
    501      
    502     //search in active blocks 
    503     for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) 
    504         if( this.active_blocks[iBlockInd].id == getID ) 
    505             return this.active_blocks[iBlockInd]; 
    506      
    507     //search in inactive blocks 
    508     for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
    509         if( this.inactive_blocks[iBlockInd].id == getID ) 
    510             return this.inactive_blocks[iBlockInd]; 
    511      
    512     return false; 
     492    //search in active items 
     493    for( var iItemInd = 0; iItemInd < this.active_items.length; iItemInd ++ ) 
     494        if( this.active_items[iItemInd].id == getID ) 
     495            return this.active_items[iItemInd]; 
     496 
     497    //search in inactive items 
     498    for( var iItemInd = 0; iItemInd < this.inactive_items.length; iItemInd ++ ) 
     499        if( this.inactive_items[iItemInd].id == getID ) 
     500            return this.inactive_items[iItemInd]; 
     501 
     502    //search in active blocks 
     503    for( var iBlockInd = 0; iBlockInd < this.active_blocks.length; iBlockInd ++ ) 
     504        if( this.active_blocks[iBlockInd].id == getID ) 
     505            return this.active_blocks[iBlockInd]; 
     506 
     507    //search in inactive blocks 
     508    for( var iBlockInd = 0; iBlockInd < this.inactive_blocks.length; iBlockInd ++ ) 
     509        if( this.inactive_blocks[iBlockInd].id == getID ) 
     510            return this.inactive_blocks[iBlockInd]; 
     511 
     512    return false; 
    513513} 
    514514 
    515515BxDolPFMArea.prototype.openFieldDialog = function( iItemID, iAreaID ) { 
    516     $( '#fieldFormWrap' ).css({ 
    517         width: ( document.body.clientWidth + 30 ), 
    518         height: ( ( window.innerHeight ? window.innerHeight : screen.height) + 30 ), 
    519         left: ( this.getHorizScroll() - 30 ), 
    520         top: ( this.getVertScroll() - 30 ), 
    521         display: 'block' 
    522     });  
    523  
    524     getHtmlData( 'edit_form_cont', this.parent.config.parserUrl + '?action=loadEditForm&id=' + iItemID + '&area=' + iAreaID, function (){ 
     516    $( '#fieldFormWrap' ).css({ 
     517        width: ( document.body.clientWidth + 30 ), 
     518        height: ( ( window.innerHeight ? window.innerHeight : screen.height) + 30 ), 
     519        left: ( this.getHorizScroll() - 30 ), 
     520        top: ( this.getVertScroll() - 30 ), 
     521        display: 'block' 
     522    }); 
     523 
     524    getHtmlData( 'edit_form_cont', this.parent.config.parserUrl + '?action=loadEditForm&id=' + iItemID + '&area=' + iAreaID, function (){ 
    525525        $('#edit_form_cont > div').dolPopup({ 
    526526            fog: { 
    527                 color: '#fff',  
     527                color: '#fff', 
    528528                opacity: .7 
    529529            }, 
    530530            closeOnOuterClick: false 
    531531        }); 
    532     }); 
     532    }); 
    533533} 
    534534 
    535535 
    536536BxDolPFMArea.prototype.getHorizScroll = function() { 
    537     return (navigator.appName == "Microsoft Internet Explorer") ? document.documentElement.scrollLeft : window.pageXOffset; 
     537    return (navigator.appName == "Microsoft Internet Explorer") ? document.documentElement.scrollLeft : window.pageXOffset; 
    538538} 
    539539 
    540540BxDolPFMArea.prototype.getVertScroll = function() { 
    541     return (navigator.appName == "Microsoft Internet Explorer") ? document.documentElement.scrollTop : window.pageYOffset; 
     541    return (navigator.appName == "Microsoft Internet Explorer") ? document.documentElement.scrollTop : window.pageYOffset; 
    542542} 
    543543 
     
    546546 
    547547function BxDolPFMBlock( parent, oBlockData ) { 
    548     this.id        = oBlockData.id; 
    549     this.parent    = parent; 
    550     this.name      = oBlockData.name; 
    551     this.elementID = 'build_block_' + this.parent.id + '_' + this.id; 
     548    this.id        = oBlockData.id; 
     549    this.parent    = parent; 
     550    this.name      = oBlockData.name; 
     551    this.elementID = 'build_block_' + this.parent.id + '_' + this.id; 
    552552} 
    553553 
    554554BxDolPFMBlock.prototype.draw = function( oParentElement ) { 
    555     var oThisBlock = this; 
    556      
    557     $( oParentElement ).append( this.getCode() ); 
    558     $( '#' + this.elementID + ' > div.build_block_header' ).children( 'a' ).click( function(){ 
    559         oThisBlock.parent.openFieldDialog( oThisBlock.id, oThisBlock.parent.id ); 
    560     } ); 
    561      
    562     this.getElement(); 
     555    var oThisBlock = this; 
     556 
     557    $( oParentElement ).append( this.getCode() ); 
     558    $( '#' + this.elementID + ' > div.build_block_header' ).children( 'a' ).click( function(){ 
     559        oThisBlock.parent.openFieldDialog( oThisBlock.id, oThisBlock.parent.id ); 
     560    } ); 
     561 
     562    this.getElement(); 
    563563} 
    564564 
    565565BxDolPFMBlock.prototype.getCode = function() { 
    566     return '<div class="build_block" id="' + this.elementID + '">' + 
    567             '<div class="build_block_header">' + 
    568                 '<a href="javascript:void(0)">' + 
    569                     this.name + 
    570                 '</a>' + 
    571             '</div>' + 
    572             '<div class="build_item_fake"></div>' + 
    573         '</div>'; 
     566    return '<div class="build_block" id="' + this.elementID + '">' + 
     567            '<div class="build_block_header">' + 
     568                '<a href="javascript:void(0)">' + 
     569                    this.name + 
     570                '</a>' + 
     571            '</div>' + 
     572            '<div class="build_item_fake"></div>' + 
     573        '</div>'; 
    574574} 
    575575 
    576576BxDolPFMBlock.prototype.getElement = function() { 
    577     this.element = $( '#' + this.elementID ).get(0); 
     577    this.element = $( '#' + this.elementID ).get(0); 
    578578} 
    579579 
    580580BxDolPFMBlock.prototype.updateName = function( sNewName ) { 
    581     $( this.element ).children( 'div.build_block_header' ).children( 'a' ).html( sNewName ); 
     581    $( this.element ).children( 'div.build_block_header' ).children( 'a' ).html( sNewName ); 
    582582} 
    583583 
     
    585585 
    586586function BxDolPFMItem( parent, oItemData ) { 
    587     this.id        = oItemData.id; 
    588     this.parent    = parent; 
    589     this.name      = oItemData.name; 
    590     this.block     = oItemData.block; 
    591      
    592     this.elementID = 'build_item_' + this.parent.id + '_' + this.id; 
     587    this.id        = oItemData.id; 
     588    this.parent    = parent; 
     589    this.name      = oItemData.name; 
     590    this.block     = oItemData.block; 
     591 
     592    this.elementID = 'build_item_' + this.parent.id + '_' + this.id; 
    593593} 
    594594 
    595595BxDolPFMItem.prototype.draw = function( oParentElement ) { 
    596     var oThisItem = this; 
    597      
    598     $( oParentElement ).append( this.getCode() ); 
    599     $( '#' + this.elementID ).children( 'a' ).click( function(){ 
    600         oThisItem.parent.openFieldDialog( oThisItem.id, oThisItem.parent.id ); 
    601     } ); 
    602      
    603     this.getElement(); 
     596    var oThisItem = this; 
     597 
     598    $( oParentElement ).append( this.getCode() ); 
     599    $( '#' + this.elementID ).children( 'a' ).click( function(){ 
     600        oThisItem.parent.openFieldDialog( oThisItem.id, oThisItem.parent.id ); 
     601    } ); 
     602 
     603    this.getElement(); 
    604604} 
    605605 
    606606BxDolPFMItem.prototype.getCode = function( oParentElement ) { 
    607     return '<div class="build_item_active" id="' + this.elementID + '">' + 
    608         '<a href="javascript:void(0)">' + 
    609             this.name + 
    610         '</a>' + 
    611     '</div>'; 
     607    return '<div class="build_item_active" id="' + this.elementID + '">' + 
     608        '<a href="javascript:void(0)">' + 
     609            this.name + 
     610        '</a>' + 
     611    '</div>'; 
    612612} 
    613613BxDolPFMItem.prototype.getElement = function() { 
    614     this.element = $( '#' + this.elementID ).get(0); 
     614    this.element = $( '#' + this.elementID ).get(0); 
    615615} 
    616616 
    617617BxDolPFMItem.prototype.updateName = function( sNewName ) { 
    618     $( this.element ).children( 'a' ).html( sNewName ); 
     618    $( this.element ).children( 'a' ).html( sNewName ); 
    619619} 
    620620 
     
    624624 
    625625function hideEditForm() { 
    626     $('#edit_form_cont > div').dolPopupHide(); 
     626    $('#edit_form_cont > div').dolPopupHide(); 
    627627} 
    628628 
    629629 
    630630function changeFieldType( _type ) { 
    631     var aShow = new Array(); 
    632     var aHide = new Array();     
    633     switch( _type ) { 
    634         case 'text': 
    635             aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_default' ); 
    636             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_lkey' ); 
    637         break; 
    638         case 'area': 
    639             aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
    640             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_default', 'field_lkey' ); 
    641         break; 
    642         case 'pass': 
    643             aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg' ); 
    644             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_default', 'field_lkey' ); 
    645         break; 
    646         case 'date': 
    647             aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg', 'field_default' ); 
    648             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_lkey' ); 
    649         break; 
    650         case 'select_one': 
    651             aShow = new Array( 'field_control_select_one', 'field_values', 'field_default', 'field_lkey' ); 
    652             aHide = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_control_select_set', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
    653         break; 
    654         case 'select_set': 
    655             aShow = new Array( 'field_control_select_set', 'field_values', 'field_lkey' ); 
    656             aHide = new Array( 'field_minimum', 'field_maximum', 'field_control_select_one', 'field_default', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
    657         break; 
    658         case 'num': 
    659             aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_default' ); 
    660             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_lkey' ); 
    661         break; 
    662         case 'range': 
    663             aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg', 'field_default' ); 
    664             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_lkey' ); 
    665         break; 
    666         case 'bool': 
    667             aShow = new Array( 'field_default'); 
    668             aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_values', 'field_lkey' ); 
    669         break; 
    670     } 
    671  
    672     for( var iInd = 0; iInd < aHide.length; iInd ++ ) 
    673         $( '#' + aHide[iInd] ).css( {display: 'none'} ); 
    674      
    675     for( var iInd = 0; iInd < aShow.length; iInd ++ ) 
    676         $( '#' + aShow[iInd] ).css( {display: ''} ); 
     631    var aShow = new Array(); 
     632    var aHide = new Array(); 
     633    switch( _type ) { 
     634        case 'text': 
     635            aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_default' ); 
     636            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_lkey' ); 
     637        break; 
     638        case 'area': 
     639            aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
     640            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_default', 'field_lkey' ); 
     641        break; 
     642        case 'pass': 
     643            aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg' ); 
     644            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_default', 'field_lkey' ); 
     645        break; 
     646        case 'date': 
     647            aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg', 'field_default' ); 
     648            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_lkey' ); 
     649        break; 
     650        case 'select_one': 
     651            aShow = new Array( 'field_control_select_one', 'field_values', 'field_default', 'field_lkey' ); 
     652            aHide = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_control_select_set', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
     653        break; 
     654        case 'select_set': 
     655            aShow = new Array( 'field_control_select_set', 'field_values', 'field_lkey' ); 
     656            aHide = new Array( 'field_minimum', 'field_maximum', 'field_control_select_one', 'field_default', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg' ); 
     657        break; 
     658        case 'num': 
     659            aShow = new Array( 'field_minimum', 'field_maximum', 'field_unique', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_default' ); 
     660            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_values', 'field_lkey' ); 
     661        break; 
     662        case 'range': 
     663            aShow = new Array( 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_check_msg', 'field_default' ); 
     664            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_unique_msg', 'field_values', 'field_lkey' ); 
     665        break; 
     666        case 'bool': 
     667            aShow = new Array( 'field_default'); 
     668            aHide = new Array( 'field_control_select_one', 'field_control_select_set', 'field_unique', 'field_minimum', 'field_maximum', 'field_check', 'field_minimum_msg', 'field_maximum_msg', 'field_unique_msg', 'field_check_msg', 'field_values', 'field_lkey' ); 
     669        break; 
     670    } 
     671 
     672    for( var iInd = 0; iInd < aHide.length; iInd ++ ) 
     673        $( '#' + aHide[iInd] ).css( {display: 'none'} ); 
     674 
     675    for( var iInd = 0; iInd < aShow.length; iInd ++ ) 
     676        $( '#' + aShow[iInd] ).css( {display: ''} ); 
    677677 
    678678} 
    679679 
    680680function activateValuesEdit( eLink ) { 
    681     $( eLink ).parent().html( '<textarea class="input_text" name="' + 
    682         $( eLink ).siblings( 'input' ).attr( 'name' ) + 
    683         '">' + 
    684         $( eLink ).siblings( 'input' ).val() + 
    685         '</textarea>' 
    686     ); 
     681    $( eLink ).parent().html( '<textarea class="input_text" name="' + 
     682        $( eLink ).siblings( 'input' ).attr( 'name' ) + 
     683        '">' + 
     684        $( eLink ).siblings( 'input' ).val() + 
     685        '</textarea>' 
     686    ); 
    687687} 
    688688 
    689689function clearFormErrors( eForm ) { 
    690     $( 'td.warned', eForm ).removeClass( 'warned' ).next( 'td' ).children( 'img.depr_icon' ).remove(); 
     690    $( 'td.warned', eForm ).removeClass( 'warned' ).next( 'td' ).children( 'img.depr_icon' ).remove(); 
    691691} 
    692692 
    693693function genEditFormError( sField, sText ) { 
    694     if( document.forms.fieldEditForm[sField] ) { 
    695         $( document.forms.fieldEditForm[sField] ).parent( 'td' ).next( 'td' ).prepend( 
    696             '<img src="../templates/base/images/icons/depr.gif" class="depr_icon" ' +  
    697             'onmouseover="showFloatDesc(\'' + processFloatDescInput( sText ) + '\')" ' + 
    698             'onmousemove="moveFloatDesc( event )" ' + 
    699             'onmouseout="hideFloatDesc()" ' + 
    700             ' />' 
    701         ); 
    702     } 
     694    if( document.forms.fieldEditForm[sField] ) { 
     695        $( document.forms.fieldEditForm[sField] ).parent( 'td' ).next( 'td' ).prepend( 
     696            '<img src="../templates/base/images/icons/depr.gif" class="depr_icon" ' + 
     697            'onmouseover="showFloatDesc(\'' + processFloatDescInput( sText ) + '\')" ' + 
     698            'onmousemove="moveFloatDesc( event )" ' + 
     699            'onmouseout="hideFloatDesc()" ' + 
     700            ' />' 
     701        ); 
     702    } 
    703703} 
    704704 
    705705function updateBuilder( sText, iItemID, sNewName ) { 
    706     oPFM.updateAreas( sText, iItemID, sNewName ); 
     706    oPFM.updateAreas( sText, iItemID, sNewName ); 
    707707} 
    708708 
    709709function processFloatDescInput( sText ) { 
    710     sText = sText.replace( /&/g, '&amp;' ); 
    711     sText = sText.replace( /</g, '&lt;' ); 
    712     sText = sText.replace( />/g, '&gt;' ); 
    713     sText = sText.replace( /"/g, '&quot;' ); 
    714     sText = sText.replace( /\\/g, '\\\\' ); 
    715     sText = sText.replace( /'/g, '\\\'' ); 
    716      
    717     return sText; 
    718 } 
    719  
     710    sText = sText.replace( /&/g, '&amp;' ); 
     711    sText = sText.replace( /</g, '&lt;' ); 
     712    sText = sText.replace( />/g, '&gt;' ); 
     713    sText = sText.replace( /"/g, '&quot;' ); 
     714    sText = sText.replace( /\\/g, '\\\\' ); 
     715    sText = sText.replace( /'/g, '\\\'' ); 
     716 
     717    return sText; 
     718} 
     719 
  • trunk/administration/js/functions.admin.js

    r15201 r15211  
    11 
    2 function adminMenuCollapse(oImage) {     
     2function adminMenuCollapse(oImage) { 
    33    if($(oImage).parents('.adm-menu-header').hasClass('adm-mmh-opened')) 
    44        $(oImage).removeClass('adm-mma-opened').parents('.adm-menu-header').removeClass('adm-mmh-opened').siblings('.adm-menu-items-wrapper').removeClass('adm-mmi-opened'); 
  • trunk/administration/js/lang_file.js

    r15201 r15211  
    2525    var sFilter = 'filter'; 
    2626    var sUrl = ('' + document.location).replace(/[&]{0,1}filter=.*/, ''); 
    27     var bChecked = oCheckbox.checked == undefined ? oCheckbox.attr('checked') : oCheckbox.checked; 
     27    var bChecked = oCheckbox.checked == undefined ? oCheckbox.attr('checked') : oCheckbox.checked; 
    2828    if(bChecked && $('#adm-langs-look-for').val().length > 2) 
    2929        sUrl += (sUrl.indexOf('?') == -1 ? '?' : '&') + 'filter=' + $('#adm-langs-look-for').val(); 
     
    3333    $('#adm-langs-add-key').dolPopup({ 
    3434        fog: { 
    35             color: '#fff',  
     35            color: '#fff', 
    3636            opacity: .7 
    3737        } 
    38     });  
     38    }); 
    3939} 
    4040function onResult(sType, oResult) { 
    4141    var sContentKey = '#adm-langs-' + sType + '-key-content'; 
    42      
     42 
    4343    if(parseInt(oResult.code) == 0) { 
    4444        parent.document.forms['adm-langs-' + sType + '-key-form'].reset(); 
     
    6464            $('#adm-langs-holder > #adm-langs-edit-key').dolPopup({ 
    6565                fog: { 
    66                     color: '#fff',  
     66                    color: '#fff', 
    6767                    opacity: .7 
    6868                } 
     
    7676    var sType = $(oLink).attr('id').replace('adm-langs-btn-', ''); 
    7777    var sName = '#adm-langs-cnt-' + sType; 
    78      
     78 
    7979    $(oLink).parent('.notActive').hide().siblings('.notActive:hidden').show().siblings('.active').hide().siblings('#' + $(oLink).attr('id') + '-act').show(); 
    8080    $(sName).siblings('div:visible').bx_anim('hide', 'fade', 'slow', function(){ 
     
    9090            $('#adm-langs-holder > #adm-langs-wnd-edit').dolPopup({ 
    9191                fog: { 
    92                     color: '#fff',  
     92                    color: '#fff', 
    9393                    opacity: .7 
    9494                } 
  • trunk/administration/js/memb_levels.js

    r15201 r15211  
    3030            $('#adm-mlevels-holder > #adm-mlevels-action').dolPopup({ 
    3131                fog: { 
    32                     color: '#fff',  
     32                    color: '#fff', 
    3333                    opacity: .7 
    3434                }, 
     
    3838            $(document).addWebForms(); 
    3939            $("input[type='datetime']", document).each(function() { 
    40                 $(this).dynDateTime({ 
    41                     ifFormat: '%Y-%m-%d %H:%M:%S', 
     40                $(this).dynDateTime({ 
     41                    ifFormat: '%Y-%m-%d %H:%M:%S', 
    4242                    showsTime: true, 
    4343                    position_css: 'fixed' 
  • trunk/administration/js/menu_compose.js

    r15201 r15211  
    55function initMenu( e ) 
    66{ 
    7     if( typeof( sNewItemTitle ) == 'undefined' ) 
    8         sNewItemTitle = 'NEW ITEM'; 
    9      
    10     oMenu = new BxDolMenu( topParentID, parserUrl, aTopItems, aCustomItems, aSystemItems, aAllItems, aCoords, e ) 
     7    if( typeof( sNewItemTitle ) == 'undefined' ) 
     8        sNewItemTitle = 'NEW ITEM'; 
     9 
     10    oMenu = new BxDolMenu( topParentID, parserUrl, aTopItems, aCustomItems, aSystemItems, aAllItems, aCoords, e ) 
    1111} 
    1212 
    1313function createNewItem( type, source ) { 
    14     var aParams = { 
    15         action: 'create_item', 
    16         type: type, 
    17         source: source ? source : 0 
    18     }; 
    19  
    20     var iNewID = 0; 
    21     $.ajax({ 
    22         type: 'POST', 
    23         url: parserUrl + '?r=' + Math.random(), 
    24         data: aParams, 
    25         success: function(sData) { 
    26             iNewID = parseInt(sData); 
    27         }, 
    28         dataType: 'text', 
    29         async: false 
    30     }); 
    31  
    32     return iNewID; 
     14    var aParams = { 
     15        action: 'create_item', 
     16        type: type, 
     17        source: source ? source : 0 
     18    }; 
     19 
     20    var iNewID = 0; 
     21    $.ajax({ 
     22        type: 'POST', 
     23        url: parserUrl + '?r=' + Math.random(), 
     24        data: aParams, 
     25        success: function(sData) { 
     26            iNewID = parseInt(sData); 
     27        }, 
     28        dataType: 'text', 
     29        async: false 
     30    }); 
     31 
     32    return iNewID; 
    3333} 
    3434 
     
    3636function deactivateItem( id ) 
    3737{ 
    38     var objXmlHttp = createXmlHttpObj(); 
    39     if( !objXmlHttp ) 
    40         return false; 
    41      
    42     var url = parserUrl + '&action=deactivate_item&id=' + id; 
    43     url += '&r=' + Math.random(); 
    44      
    45     objXmlHttp.open( "GET", url ); 
    46     objXmlHttp.onreadystatechange = function() 
    47     { 
    48         if ( objXmlHttp.readyState == 4 && objXmlHttp.status == 200 ) 
    49         { 
    50             //alert( objXmlHttp.responseText ); 
    51         } 
    52     } 
    53     objXmlHttp.send( null ); 
     38    var objXmlHttp = createXmlHttpObj(); 
     39    if( !objXmlHttp ) 
     40        return false; 
     41 
     42    var url = parserUrl + '&action=deactivate_item&id=' + id; 
     43    url += '&r=' + Math.random(); 
     44 
     45    objXmlHttp.open( "GET", url ); 
     46    objXmlHttp.onreadystatechange = function() 
     47    { 
     48        if ( objXmlHttp.readyState == 4 && objXmlHttp.status == 200 ) 
     49        { 
     50            //alert( objXmlHttp.responseText ); 
     51        } 
     52    } 
     53    objXmlHttp.send( null ); 
    5454} 
    5555 
    5656function showItemEditForm( id ) { 
    57     getHtmlData( 'edit_form_cont', parserUrl + '&action=edit_form&id=' + id, function (){ 
     57    getHtmlData( 'edit_form_cont', parserUrl + '&action=edit_form&id=' + id, function (){ 
    5858        $('#edit_form_cont > div').dolPopup({ 
    5959            fog: { color: '#fff', opacity: .7 } 
    6060        }); 
    61     }); 
     61    }); 
    6262} 
    6363function getHorizScroll() 
    6464{ 
    65     if (navigator.appName == "Microsoft Internet Explorer") 
    66         return document.documentElement.scrollLeft; 
    67     else 
    68         return window.pageXOffset; 
     65    if (navigator.appName == "Microsoft Internet Explorer") 
     66        return document.documentElement.scrollLeft; 
     67    else 
     68        return window.pageXOffset; 
    6969} 
    7070 
    7171function getVertScroll() 
    7272{ 
    73     if (navigator.appName == "Microsoft Internet Explorer") 
    74         return document.documentElement.scrollTop; 
    75     else 
    76         return window.pageYOffset; 
     73    if (navigator.appName == "Microsoft Internet Explorer") 
     74        return document.documentElement.scrollTop; 
     75    else 
     76        return window.pageYOffset; 
    7777} 
    7878function saveItem( id ) 
     
    8080    $('#formItemEditLoading').bx_loading(); 
    8181 
    82     _form = document.forms.formItemEdit; 
    83     if( !_form ) 
    84         return false; 
    85      
    86     /*if( _form.Caption ) 
    87     { 
    88         if( !_form.Caption.value.length ) 
    89         { 
    90             alert( 'Please enter Language Key' ); 
    91             _form.Caption.focus(); 
    92             return false; 
    93         } 
    94     } 
    95      
    96     if( _form.LangCaption ) 
    97     { 
    98         if( !_form.LangCaption.value.length ) 
    99         { 
    100             alert( 'Please enter Default Name' ); 
    101             _form.LangCaption.focus(); 
    102             return false; 
    103         } 
    104     }*/ 
    105      
    106     var oRequest = {}; 
    107     for( ind = 0; ind < _form.elements.length; ind ++ ) 
    108     { 
    109         var _el = _form.elements[ind]; 
    110         switch( _el.type ) 
    111         { 
    112             case 'text': 
    113             case 'textarea': 
    114             case 'select-one': 
    115                 oRequest[_el.name] = _el.value; 
    116         } 
    117     } 
    118      
    119     if( _form.Target ) 
    120     { 
    121         for( i = 0; i < _form.Target.length; i++ ) 
    122             if( _form.Target[i].checked ) 
    123                 sTarget = _form.Target[i].value; 
    124     } 
    125     else 
    126         sTarget = ''; 
    127  
    128     var sVisible_non  = ($(_form).find("[name='Visible[]'][value='non']").attr('checked') ? '1' : '0' ); 
    129     var sVisible_memb = ($(_form).find("[name='Visible[]'][value='memb']").attr('checked') ? '1' : '0' ); 
    130     var sBInQuickLink = ( ( _form.BInQuickLink && _form.BInQuickLink.checked ) ? '1' : '0' ); 
     82    _form = document.forms.formItemEdit; 
     83    if( !_form ) 
     84        return false; 
     85 
     86    /*if( _form.Caption ) 
     87    { 
     88        if( !_form.Caption.value.length ) 
     89        { 
     90            alert( 'Please enter Language Key' ); 
     91            _form.Caption.focus(); 
     92            return false; 
     93        } 
     94    } 
     95 
     96    if( _form.LangCaption ) 
     97    { 
     98        if( !_form.LangCaption.value.length ) 
     99        { 
     100            alert( 'Please enter Default Name' ); 
     101            _form.LangCaption.focus(); 
     102            return false; 
     103        } 
     104    }*/ 
     105 
     106    var oRequest = {}; 
     107    for( ind = 0; ind < _form.elements.length; ind ++ ) 
     108    { 
     109        var _el = _form.elements[ind]; 
     110        switch( _el.type ) 
     111        { 
     112            case 'text': 
     113            case 'textarea': 
     114            case 'select-one': 
     115                oRequest[_el.name] = _el.value; 
     116        } 
     117    } 
     118 
     119    if( _form.Target ) 
     120    { 
     121        for( i = 0; i < _form.Target.length; i++ ) 
     122            if( _form.Target[i].checked ) 
     123                sTarget = _form.Target[i].value; 
     124    } 
     125    else 
     126        sTarget = ''; 
     127 
     128    var sVisible_non  = ($(_form).find("[name='Visible[]'][value='non']").attr('checked') ? '1' : '0' ); 
     129    var sVisible_memb = ($(_form).find("[name='Visible[]'][value='memb']").attr('checked') ? '1' : '0' ); 
     130    var sBInQuickLink = ( ( _form.BInQuickLink && _form.BInQuickLink.checked ) ? '1' : '0' ); 
    131131 
    132132    oRequest['action'] = 'save_item'; 
     
    137137    oRequest['BInQuickLink'] = sBInQuickLink; 
    138138    oRequest['_r'] = Math.random(); 
    139      
     139 
    140140    $.post(parserUrl, oRequest, function(oData){ 
    141141        $('#formItemEditLoading').bx_loading(); 
     
    151151function saveItemByPost( id ) 
    152152{ 
    153     _form = document.forms.formItemEdit; 
    154     var oXMLHttpReq = createXmlHttpObj(); 
    155     var elemCont = document.getElementById( 'edit_form_cont' ); 
    156      
    157     if( !_form ) 
    158         return false; 
    159      
    160     if( !oXMLHttpReq ) 
    161         return false; 
    162      
    163     if( !elemCont ) 
    164         return false; 
    165      
    166     if( _form.Caption ) 
    167     { 
    168         if( !_form.Caption.value.length ) 
    169         { 
    170             alert( 'Please enter Language Key' ); 
    171             _form.Caption.focus(); 
    172             return false; 
    173         } 
    174     } 
    175      
    176     if( _form.LangCaption ) 
    177     { 
    178         if( !_form.LangCaption.value.length ) 
    179         { 
    180             alert( 'Please enter Default Name' ); 
    181             _form.LangCaption.focus(); 
    182             return false; 
    183         } 
    184     } 
    185      
    186     var sRequest = ''; 
    187      
    188     for( ind = 0; ind < _form.elements.length; ind ++ ) 
    189     { 
    190         var _el = _form.elements[ind]; 
    191         switch( _el.type ) 
    192         { 
    193             case 'text': 
    194             case 'textarea': 
    195             case 'select-one': 
    196                 sRequest += '&' + _el.name + '=' + encodeURIComponent( _el.value ); 
    197         } 
    198     } 
    199      
    200     if( _form.Target ) 
    201     { 
    202         for( i = 0; i < _form.Target.length; i++ ) 
    203             if( _form.Target[i].checked ) 
    204                 sTarget = _form.Target[i].value; 
    205     } 
    206     else 
    207         sTarget = ''; 
    208      
    209     var sVisible_non  = ( ( _form.Visible_non  && _form.Visible_non.checked  ) ? '1' : '0' ); 
    210     var sVisible_memb = ( ( _form.Visible_memb && _form.Visible_memb.checked ) ? '1' : '0' ); 
    211  
    212     var sBInQuickLink = ( ( _form.BInQuickLink && _form.BInQuickLink.checked ) ? '1' : '0' ); 
    213  
    214     var sRequestUrl = 'action=save_item&id=' + id + sRequest + 
    215         '&Target=' + sTarget + 
    216         '&Visible_non=' + sVisible_non + 
    217         '&Visible_memb=' + sVisible_memb + 
    218         '&BInQuickLink=' + sBInQuickLink; 
    219      
    220      
    221     elemCont.innerHTML = '<div class="loading"><img src="'+urlIconLoading+'"></div>'; 
    222      
    223     oXMLHttpReq.open("POST", parserUrl + '&r=' + Math.random() ); 
    224     oXMLHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
    225      
    226     oXMLHttpReq.onreadystatechange = function()  
    227     { 
    228         if (oXMLHttpReq.readyState == 4 && oXMLHttpReq.status == 200) { 
    229             sNewText = oXMLHttpReq.responseText; 
    230             elemCont.innerHTML = sNewText; 
    231              
    232             // parse javascripts and run them 
    233             aScrMatches = sNewText.match(/<script[^>]*javascript[^>]*>([^<]*)<\/script>/ig); 
    234             if( aScrMatches ) 
    235             { 
    236                 for( ind = 0; ind < aScrMatches.length; ind ++ ) 
    237                 { 
    238                     sScr = aScrMatches[ind]; 
    239                     iOffset = sScr.match(/<script[^>]*javascript[^>]*>/i)[0].length; 
    240                     sScript = sScr.substring( iOffset, sScr.length - 9 ); 
    241                      
    242                     eval( sScript ); 
    243                 } 
    244             } 
    245         } 
    246     } 
    247      
    248     oXMLHttpReq.send( sRequestUrl ); 
     153    _form = document.forms.formItemEdit; 
     154    var oXMLHttpReq = createXmlHttpObj(); 
     155    var elemCont = document.getElementById( 'edit_form_cont' ); 
     156 
     157    if( !_form ) 
     158        return false; 
     159 
     160    if( !oXMLHttpReq ) 
     161        return false; 
     162 
     163    if( !elemCont ) 
     164        return false; 
     165 
     166    if( _form.Caption ) 
     167    { 
     168        if( !_form.Caption.value.length ) 
     169        { 
     170            alert( 'Please enter Language Key' ); 
     171            _form.Caption.focus(); 
     172            return false; 
     173        } 
     174    } 
     175 
     176    if( _form.LangCaption ) 
     177    { 
     178        if( !_form.LangCaption.value.length ) 
     179        { 
     180            alert( 'Please enter Default Name' ); 
     181            _form.LangCaption.focus(); 
     182            return false; 
     183        } 
     184    } 
     185 
     186    var sRequest = ''; 
     187 
     188    for( ind = 0; ind < _form.elements.length; ind ++ ) 
     189    { 
     190        var _el = _form.elements[ind]; 
     191        switch( _el.type ) 
     192        { 
     193            case 'text': 
     194            case 'textarea': 
     195            case 'select-one': 
     196                sRequest += '&' + _el.name + '=' + encodeURIComponent( _el.value ); 
     197        } 
     198    } 
     199 
     200    if( _form.Target ) 
     201    { 
     202        for( i = 0; i < _form.Target.length; i++ ) 
     203            if( _form.Target[i].checked ) 
     204                sTarget = _form.Target[i].value; 
     205    } 
     206    else 
     207        sTarget = ''; 
     208 
     209    var sVisible_non  = ( ( _form.Visible_non  && _form.Visible_non.checked  ) ? '1' : '0' ); 
     210    var sVisible_memb = ( ( _form.Visible_memb && _form.Visible_memb.checked ) ? '1' : '0' ); 
     211 
     212    var sBInQuickLink = ( ( _form.BInQuickLink && _form.BInQuickLink.checked ) ? '1' : '0' ); 
     213 
     214    var sRequestUrl = 'action=save_item&id=' + id + sRequest + 
     215        '&Target=' + sTarget + 
     216        '&Visible_non=' + sVisible_non + 
     217        '&Visible_memb=' + sVisible_memb + 
     218        '&BInQuickLink=' + sBInQuickLink; 
     219 
     220 
     221    elemCont.innerHTML = '<div class="loading"><img src="'+urlIconLoading+'"></div>'; 
     222 
     223    oXMLHttpReq.open("POST", parserUrl + '&r=' + Math.random() ); 
     224    oXMLHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
     225 
     226    oXMLHttpReq.onreadystatechange = function() 
     227    { 
     228        if (oXMLHttpReq.readyState == 4 && oXMLHttpReq.status == 200) { 
     229            sNewText = oXMLHttpReq.responseText; 
     230            elemCont.innerHTML = sNewText; 
     231 
     232            // parse javascripts and run them 
     233            aScrMatches = sNewText.match(/<script[^>]*javascript[^>]*>([^<]*)<\/script>/ig); 
     234            if( aScrMatches ) 
     235            { 
     236                for( ind = 0; ind < aScrMatches.length; ind ++ ) 
     237                { 
     238                    sScr = aScrMatches[ind]; 
     239                    iOffset = sScr.match(/<script[^>]*javascript[^>]*>/i)[0].length; 
     240                    sScript = sScr.substring( iOffset, sScr.length - 9 ); 
     241 
     242                    eval( sScript ); 
     243                } 
     244            } 
     245        } 
     246    } 
     247 
     248    oXMLHttpReq.send( sRequestUrl ); 
    249249} 
    250250 
    251251function updateItem( id, title ) 
    252252{ 
    253     oMenu.updateItem( id, title ); 
     253    oMenu.updateItem( id, title ); 
    254254} 
    255255 
    256256function deleteItem( id ) { 
    257     if(confirm('Are you sure want delete this item?')){ 
    258         var aParams = { 
    259             action: 'delete_item', 
    260             id: id 
    261         }; 
    262          
    263         $.post( 
    264             parserUrl + '?r=' + Math.random(), 
    265             aParams, 
    266             function(sData) { 
    267                 if(sData == 'OK') 
    268                     location.reload(); 
    269                 else 
    270                     alert(sData); 
    271             }, 
    272             'text' 
    273         ); 
    274         return true; 
    275     } 
    276     else 
    277         return false; 
     257    if(confirm('Are you sure want delete this item?')){ 
     258        var aParams = { 
     259            action: 'delete_item', 
     260            id: id 
     261        }; 
     262 
     263        $.post( 
     264            parserUrl + '?r=' + Math.random(), 
     265            aParams, 
     266            function(sData) { 
     267                if(sData == 'OK') 
     268                    location.reload(); 
     269                else 
     270                    alert(sData); 
     271            }, 
     272            'text' 
     273        ); 
     274        return true; 
     275    } 
     276    else 
     277        return false; 
    278278} 
    279279 
    280280function saveItemsOrders( sTopItems, aCustomItems ) 
    281281{ 
    282     var objXmlHttp = createXmlHttpObj(); 
    283     if( !objXmlHttp ) 
    284         return false; 
    285      
    286     var url = parserUrl + '&action=save_orders&top=' + sTopItems; 
    287      
    288     for( id in aCustomItems ) 
    289     { 
    290         var sCustomStr = aCustomItems[id]; 
    291         if( sCustomStr.length == 0) 
    292             continue; 
    293          
    294         url += '&custom[' + id + ']=' + sCustomStr; 
    295     } 
    296      
    297     url += '&r=' + Math.random(); 
    298      
    299     objXmlHttp.open( "GET", url ); 
    300     objXmlHttp.onreadystatechange = function() 
    301     { 
    302         if ( objXmlHttp.readyState == 4 && objXmlHttp.status == 200 ) 
    303         { 
    304             /*if( objXmlHttp.responseText != 'OK' ) 
    305                 alert( objXmlHttp.responseText );*/ 
    306         } 
    307     } 
    308     objXmlHttp.send( null ); 
     282    var objXmlHttp = createXmlHttpObj(); 
     283    if( !objXmlHttp ) 
     284        return false; 
     285 
     286    var url = parserUrl + '&action=save_orders&top=' + sTopItems; 
     287 
     288    for( id in aCustomItems ) 
     289    { 
     290        var sCustomStr = aCustomItems[id]; 
     291        if( sCustomStr.length == 0) 
     292            continue; 
     293 
     294        url += '&custom[' + id + ']=' + sCustomStr; 
     295    } 
     296 
     297    url += '&r=' + Math.random(); 
     298 
     299    objXmlHttp.open( "GET", url ); 
     300    objXmlHttp.onreadystatechange = function() 
     301    { 
     302        if ( objXmlHttp.readyState == 4 && objXmlHttp.status == 200 ) 
     303        { 
     304            /*if( objXmlHttp.responseText != 'OK' ) 
     305                alert( objXmlHttp.responseText );*/ 
     306        } 
     307    } 
     308    objXmlHttp.send( null ); 
    309309} 
    310310 
    311311function resetItems() 
    312312{ 
    313     if( confirm( 'Reset Will Restore The Builder To Factory Settings :). Are You Sure?' ) ) 
    314         location = parserUrl + '&action=reset'; 
    315 } 
     313    if( confirm( 'Reset Will Restore The Builder To Factory Settings :). Are You Sure?' ) ) 
     314        location = parserUrl + '&action=reset'; 
     315} 
  • trunk/administration/js/page_builder_tiny.js

    r15201 r15211  
    22 
    33tinyMCE_GZ.init({ 
    4     plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras", 
    5     themes : "simple,advanced", 
    6     languages : "en", 
    7     disk_cache : true, 
    8     debug : false 
     4    plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras", 
     5    themes : "simple,advanced", 
     6    languages : "en", 
     7    disk_cache : true, 
     8    debug : false 
    99}); 
    1010 
    1111tinyMCE.init({ 
    12     mode : "textareas", 
    13     theme : "advanced", 
    14      
    15     editor_selector : "form_input_html", 
    16     content_css : "plugins/tiny_mce/dolphin.css", 
    17      
    18     plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras", 
    19     relative_urls : false, 
    20      
    21     theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect", 
    22     theme_advanced_buttons2 : "forecolor,backcolor,|,bullist,numlist,|,outdent,indent,|,link,unlink,image,hr,|,sub,sup,|,insertdate,inserttime,|,styleprops", 
    23     theme_advanced_buttons3 : "charmap,emotions,|,cite,abbr,acronym,attribs,|,preview,removeformat,|,code,help", 
    24     theme_advanced_buttons4 : "table,row_props,cell_props,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,row_after,row_before,split_cells,merge_cells", 
    25     theme_advanced_toolbar_location : "top", 
    26     theme_advanced_toolbar_align : "center", 
     12    mode : "textareas", 
     13    theme : "advanced", 
     14 
     15    editor_selector : "form_input_html", 
     16    content_css : "plugins/tiny_mce/dolphin.css", 
     17 
     18    plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras", 
     19    relative_urls : false, 
     20 
     21    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect", 
     22    theme_advanced_buttons2 : "forecolor,backcolor,|,bullist,numlist,|,outdent,indent,|,link,unlink,image,hr,|,sub,sup,|,insertdate,inserttime,|,styleprops", 
     23    theme_advanced_buttons3 : "charmap,emotions,|,cite,abbr,acronym,attribs,|,preview,removeformat,|,code,help", 
     24    theme_advanced_buttons4 : "table,row_props,cell_props,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,row_after,row_before,split_cells,merge_cells", 
     25    theme_advanced_toolbar_location : "top", 
     26    theme_advanced_toolbar_align : "center", 
    2727 
    2828    entity_encoding : "raw", 
     
    3131    paste_convert_headers_to_strong : false, 
    3232    paste_remove_spans : false, 
    33     paste_remove_styles : false 
     33    paste_remove_styles : false 
    3434 
    3535}); 
  • trunk/administration/js/profiles.js

    r15201 r15211  
    11// TODO: remake according to new design and principles 
    22 
    3 function BxManageProfiles(oOptions) {     
     3function BxManageProfiles(oOptions) { 
    44    this._sActionsUrl = oOptions.sActionUrl; 
    55    this._sObjName = oOptions.sObjName == undefined ? 'oMP' : oOptions.sObjName; 
     
    1818    this._oCtlValue['by'] = sBy; 
    1919    this._oCtlValue['value'] = sValue; 
    20      
     20 
    2121    this.getMembers(function() { 
    2222        $('#adm-mp-members-form > .adm-mp-members-wrapper:hidden').html(''); 
     
    2525BxManageProfiles.prototype.changeFilterTags = function(sTag) { 
    2626    this._oCtlValue['value'] = sTag; 
    27      
     27 
    2828    this.getMembers(function() { 
    2929        $('#adm-mp-members-form > .adm-mp-members-wrapper:hidden').html(''); 
     
    3131}; 
    3232BxManageProfiles.prototype.changeFilterSearch = function () { 
    33     var sValue = $("[name='adm-mp-filter']").val();     
     33    var sValue = $("[name='adm-mp-filter']").val(); 
    3434    if(sValue.length <= 0) 
    3535        return; 
    3636 
    3737    this._oCtlValue['value'] = sValue; 
    38      
     38 
    3939    this.getMembers(function() { 
    4040        $('#adm-mp-members-form > .adm-mp-members-wrapper:hidden').html(''); 
     
    4646    this._sCtlType = sType; 
    4747    $("[name = 'adm-mp-members-ctl-type']").val(sType); 
    48      
     48 
    4949    $(oLink).parent('.notActive').hide().siblings('.notActive:hidden').show().siblings('.active').hide().siblings('#' + $(oLink).attr('id') + '-act').show(); 
    5050 
     
    5757}; 
    5858BxManageProfiles.prototype.reloadTypeControl = function() { 
    59     var $this = this; 
     59    var $this = this; 
    6060 
    61     var oOptions = { 
    62             action: 'get_controls', 
    63             ctl_type: this._sCtlType 
    64         }; 
     61    var oOptions = { 
     62            action: 'get_controls', 
     63            ctl_type: this._sCtlType 
     64        }; 
    6565 
    66     $('#adm-mp-controls-loading').bx_loading(); 
     66    $('#adm-mp-controls-loading').bx_loading(); 
    6767 
    6868    $.post( 
     
    7373 
    7474            $('#adm-mp-ctl-' + $this._sCtlType).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() { 
    75                 $(this).replaceWith(oResult.content); 
     75                $(this).replaceWith(oResult.content); 
    7676            }); 
    7777        }, 
     
    8686    this._sViewType = sType; 
    8787    $("[name = 'adm-mp-members-view-type']").val(sType); 
    88      
     88 
    8989    $(oLink).parent('.notActive').hide().siblings('.notActive:hidden').show().siblings('.active').hide().siblings('#' + $(oLink).attr('id') + '-act').show(); 
    9090 
    91     if($('#adm-mp-members-' + sType).children().length)  
     91    if($('#adm-mp-members-' + sType).children().length) 
    9292        $('#adm-mp-members-form > .adm-mp-members-wrapper:visible').bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() { 
    9393            $('#adm-mp-members-' + sType).bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed); 
     
    117117BxManageProfiles.prototype.getMembers = function(onSuccess) { 
    118118    var $this = this; 
    119      
     119 
    120120    if(onSuccess == undefined) 
    121121        onSuccess = function(){}; 
    122122 
    123123    $('#adm-mp-members-loading').bx_loading(); 
    124      
     124 
    125125    var oOptions = { 
    126         action: 'get_members',  
    127         view_type: this._sViewType,  
    128         view_start: this._iStart,  
    129         view_per_page: this._iPerPage,  
    130         view_order: this._sOrderBy,  
     126        action: 'get_members', 
     127        view_type: this._sViewType, 
     128        view_start: this._iStart, 
     129        view_per_page: this._iPerPage, 
     130        view_order: this._sOrderBy, 
    131131        ctl_type: this._sCtlType 
    132132    }; 
     
    136136        oOptions['ctl_value[]'].push(sKey + '=' + sValue); 
    137137    }); 
    138      
     138 
    139139    $.post( 
    140140        this._sActionsUrl, 
     
    142142        function(oResult) { 
    143143            $('#adm-mp-members-loading').bx_loading(); 
    144              
     144 
    145145            $('#adm-mp-members-form > .adm-mp-members-wrapper:visible').bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() { 
    146146                $('#adm-mp-members-' + $this._sViewType).html(oResult.content).bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed); 
    147147            }); 
    148              
     148 
    149149            onSuccess(); 
    150150        }, 
  • trunk/administration/lang_file.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    5252if(isset($_POST['create_language'])) { 
    5353    $mixedResultCreate = createLanguage($_POST); 
    54 }  
     54} 
    5555else if(isset($_POST['import_language'])) { 
    5656    $mixedResultCreate = importLanguage($_POST, $_FILES); 
     
    6464    if(empty($mixedResultAvailable)) 
    6565        $mixedResultAvailable = '_adm_txt_langs_success_compile'; 
    66 }  
     66} 
    6767else if(isset($_POST['adm-lang-delete']) && !empty($_POST['langs'])) { 
    6868    $sNameDefault = getParam('lang_default'); 
    69     foreach($_POST['langs'] as $iLangId) {     
     69    foreach($_POST['langs'] as $iLangId) { 
    7070        $sName = getLanguageName($iLangId); 
    7171        if($sName == $sNameDefault) { 
    7272            $mixedResultAvailable = '_adm_txt_langs_cannot_delete_default'; 
    73             break; 
     73            break; 
    7474        } 
    7575 
    76         if(!deleteLanguage((int)$iLangId)){ 
     76        if(!deleteLanguage((int)$iLangId)){ 
    7777            $mixedResultAvailable = '_adm_txt_langs_cannot_delete'; 
    7878            break; 
    79         } 
     79        } 
    8080    } 
    8181 
     
    8585else if(isset($_GET['action']) && $_GET['action'] == 'export' && isset($_GET['id'])) { 
    8686    $aLanguage = $GLOBALS['MySQL']->getRow("SELECT `Name`, `Flag`, `Title` FROM `sys_localization_languages` WHERE `ID`='" . (int)$_GET['id'] . "' LIMIT 1"); 
    87      
     87 
    8888    $aContent = array(); 
    89     $aItems = $GLOBALS['MySQL']->getAll("SELECT `tlk`.`Key` AS `key`, `tls`.`String` AS `string` FROM `sys_localization_keys` AS `tlk` LEFT JOIN `sys_localization_strings` AS `tls` ON `tlk`.`ID`=`tls`.`IDKey` WHERE `tls`.`IDLanguage`='" . (int)$_GET['id'] . "'");     
     89    $aItems = $GLOBALS['MySQL']->getAll("SELECT `tlk`.`Key` AS `key`, `tls`.`String` AS `string` FROM `sys_localization_keys` AS `tlk` LEFT JOIN `sys_localization_strings` AS `tls` ON `tlk`.`ID`=`tls`.`IDKey` WHERE `tls`.`IDLanguage`='" . (int)$_GET['id'] . "'"); 
    9090    foreach($aItems as $aItem) 
    9191        $aContent[$aItem['key']] = $aItem['string']; 
     
    9393    $sName = 'lang_' . $aLanguage['Name'] . '.php'; 
    9494    $sContent = "<?php\n\$aLangInfo=" . var_export($aLanguage, true) . ";\n\$aLangContent=" . var_export($aContent, true) . ";\n?>"; 
    95      
     95 
    9696    header ("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
    9797    header ("Content-type: application/octet-stream"); 
     
    109109//--- Create/Delete/Edit Language Key ---// 
    110110if(isset($_POST['action']) && $_POST['action'] == 'get_edit_form_key') { 
    111     $oJson = new Services_JSON();    
     111    $oJson = new Services_JSON(); 
    112112    echo $oJson->encode(array('code' => PageCodeKeyEdit((int)$_POST['id']))); 
    113113    exit; 
     
    125125            if(isset($_POST['string_for_' . $aLanguage['id']])) { 
    126126                $GLOBALS['MySQL']->query("INSERT INTO `sys_localization_strings`(`IDKey`, `IDLanguage`, `String`) VALUES('" . $iKeyId . "', '" . $aLanguage['id'] . "', '" . process_db_input($_POST['string_for_' . $aLanguage['id']]) . "')"); 
    127                  
     127 
    128128                $bCompiled = $bCompiled && compileLanguage((int)$aLanguage['id']); 
    129129            } 
    130          
     130 
    131131        $aResult = $bCompiled ? array('code' => 0, 'message' => '_adm_txt_langs_success_key_save') : array('code' => 1, 'message' => '_adm_txt_langs_cannot_compile'); 
    132132    } else 
     
    134134 
    135135    $aResult['message'] = MsgBox(_t($aResult['message'])); 
    136      
    137     $oJson = new Services_JSON();    
     136 
     137    $oJson = new Services_JSON(); 
    138138    echo "<script>parent.onResult('add', " . $oJson->encode($aResult) . ");</script>"; 
    139139    exit; 
     
    152152    $aResult['message'] = MsgBox(_t($aResult['message'])); 
    153153 
    154     $oJson = new Services_JSON();    
     154    $oJson = new Services_JSON(); 
    155155    echo "<script>parent.onResult('edit', " . $oJson->encode($aResult) . ");</script>"; 
    156156    exit; 
     
    158158 
    159159if(isset($_POST['adm-lang-key-delete']) && is_array($_POST['keys'])) { 
    160     foreach($_POST['keys'] as $iKeyId) 
     160    foreach($_POST['keys'] as $iKeyId) 
    161161        $GLOBALS['MySQL']->query("DELETE FROM `sys_localization_keys`, `sys_localization_strings` USING `sys_localization_keys`, `sys_localization_strings` WHERE `sys_localization_keys`.`ID`=`sys_localization_strings`.`IDKey` AND `sys_localization_keys`.`ID`='" . $iKeyId . "'"); 
    162162} 
     
    166166    'css_name' => array('forms_adv.css', 'lang_file.css'), 
    167167    'js_name' => array('lang_file.js'), 
    168     'header' => _t('_adm_page_cpt_lang_file'),     
     168    'header' => _t('_adm_page_cpt_lang_file'), 
    169169); 
    170170 
    171 $sLangRssFeed = 'on' == getParam('feeds_enable')  
     171$sLangRssFeed = 'on' == getParam('feeds_enable') 
    172172    ?  DesignBoxAdmin (_t('_adm_box_cpt_lang_files'), ' 
    173         <div class="RSSAggrCont" rssid="boonex_unity_lang_files" rssnum="5" member="0"> 
    174             <div class="loading_rss"> 
    175                 <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> 
    176             </div> 
    177         </div>') 
     173        <div class="RSSAggrCont" rssid="boonex_unity_lang_files" rssnum="5" member="0"> 
     174            <div class="loading_rss"> 
     175                <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> 
     176            </div> 
     177        </div>') 
    178178    : ''; 
    179179 
    180180$_page_cont[$iNameIndex] = array( 
    181     'page_result_code' => $sResult,     
     181    'page_result_code' => $sResult, 
    182182    'page_code_settings' => PageCodeSettings($mixedResultSettings), 
    183183    'page_code_create' => PageCodeCreate($mixedResultCreate), 
     
    201201            'lang_default' => array( 
    202202                'type' => 'select', 
    203                 'name' => 'lang_default',                 
     203                'name' => 'lang_default', 
    204204                'caption' => _t('_adm_txt_langs_def_lang'), 
    205205                'values' => array(), 
     
    214214    ); 
    215215    $aLangs = getLangsArr(); 
    216     foreach($aLangs as $sName => $sTitle ) 
    217         $aForm['inputs']['lang_default']['values'][] = array('key' => $sName, 'value' => htmlspecialchars_adv( $sTitle )); 
     216    foreach($aLangs as $sName => $sTitle ) 
     217        $aForm['inputs']['lang_default']['values'][] = array('key' => $sName, 'value' => htmlspecialchars_adv( $sTitle )); 
    218218 
    219219    $oForm = new BxTemplFormView($aForm); 
    220220    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode())); 
    221      
     221 
    222222    if($mixedResult !== true && !empty($mixedResult)) 
    223223        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
     
    227227function PageCodeCreate($mixedResult) { 
    228228    $aTopItems = array( 
    229         'adm-langs-btn-files' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:onChangeType(this)', 'title' => _t('_adm_txt_langs_files'), 'active' => 1), 
     229        'adm-langs-btn-files' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:onChangeType(this)', 'title' => _t('_adm_txt_langs_files'), 'active' => 1), 
    230230        'adm-langs-btn-create' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:onChangeType(this)', 'title' => _t('_adm_txt_langs_create'), 'active' => 0), 
    231231        'adm-langs-btn-import' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:onChangeType(this)', 'title' => _t('_adm_txt_langs_import')) 
     
    233233 
    234234    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('langs.html', array( 
    235         'content_files' => _getLanguagesList(), 
     235        'content_files' => _getLanguagesList(), 
    236236        'content_create' => _getLanguageCreateForm(), 
    237237        'content_import' => _getLanguageImportForm() 
     
    240240    if($mixedResult !== true && !empty($mixedResult)) 
    241241        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
    242             
     242 
    243243    return DesignBoxAdmin(_t('_adm_box_cpt_lang_available'), $sResult, $aTopItems); 
    244244} 
     
    247247    $aItems = array(); 
    248248    $sNameDefault = getParam('lang_default'); 
    249       
    250     $aLangs = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Title` AS `title`, `Flag` AS `flag` FROM `sys_localization_languages` ORDER BY `Name`");     
     249 
     250    $aLangs = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Title` AS `title`, `Flag` AS `flag` FROM `sys_localization_languages` ORDER BY `Name`"); 
    251251    foreach($aLangs as $aLang) 
    252252        $aItems[] = array( 
     
    259259            'export_link' => $GLOBALS['site']['url_admin'] . 'lang_file.php?action=export&id=' . $aLang['id'] 
    260260        ); 
    261      
     261 
    262262    //--- Get Controls ---// 
    263263    $aButtons = array( 
    264264        'adm-lang-compile' => _t('_adm_txt_langs_compile'), 
    265265        'adm-lang-delete' => _t('_adm_txt_langs_delete') 
    266     );     
     266    ); 
    267267    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-langs-form', $aButtons, 'langs'); 
    268268 
     
    271271} 
    272272function _getLanguageCreateForm(){ 
    273     if(isset($_POST['action']) && $_POST['action'] == 'get_edit_form_language' && isset($_POST['id'])) 
     273    if(isset($_POST['action']) && $_POST['action'] == 'get_edit_form_language' && isset($_POST['id'])) 
    274274        $aLanguage = $GLOBALS['MySQL']->getRow("SELECT `ID` AS `id`, `Name` AS `name`, `Flag` AS `flag`, `Title` AS `title` FROM `sys_localization_languages` WHERE `ID`='" . (int)$_POST['id'] . "' LIMIT 1"); 
    275275 
     
    305305            'CopyLanguage_SourceLangID' => array( 
    306306                'type' => 'select', 
    307                 'name' => 'CopyLanguage_SourceLangID',                 
     307                'name' => 'CopyLanguage_SourceLangID', 
    308308                'caption' => _t('_adm_txt_langs_copy_from'), 
    309309                'values' => array() 
     
    318318    //--- Copy from ---// 
    319319    $aLangs = getLangsArr(false, true); 
    320     foreach($aLangs as $iId => $sName) 
    321         $aFormCreate['inputs']['CopyLanguage_SourceLangID']['values'][] = array('key' => $iId, 'value' => htmlspecialchars_adv( $sName )); 
    322      
     320    foreach($aLangs as $iId => $sName) 
     321        $aFormCreate['inputs']['CopyLanguage_SourceLangID']['values'][] = array('key' => $iId, 'value' => htmlspecialchars_adv( $sName )); 
     322 
    323323    //--- Flags ---// 
    324     $aCountries = $GLOBALS['MySQL']->getAll("SELECT `ISO2` AS `code`, `Country` AS `title` FROM `sys_countries` ORDER BY `Country`");    
    325     foreach($aCountries AS $aCountry) { 
     324    $aCountries = $GLOBALS['MySQL']->getAll("SELECT `ISO2` AS `code`, `Country` AS `title` FROM `sys_countries` ORDER BY `Country`"); 
     325    foreach($aCountries AS $aCountry) { 
    326326        $sCode = strtolower($aCountry['code']); 
    327327        $aFormCreate['inputs']['Flag']['values'][] = array('key' => $sCode, 'value' => $aCountry['title']); 
    328     } 
    329      
    330     if(!empty($aLanguage)) { 
     328    } 
     329 
     330    if(!empty($aLanguage)) { 
    331331        unset($aFormCreate['inputs']['CopyLanguage_SourceLangID']); 
    332332        $aFormCreate['inputs']['id'] = array( 
     
    335335            'value' => $aLanguage['id'] 
    336336        ); 
    337     } 
    338     $oForm = new BxTemplFormView($aFormCreate); 
     337    } 
     338    $oForm = new BxTemplFormView($aFormCreate); 
    339339 
    340340    return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_form_create.html', array( 
    341         'display' => !empty($aLanguage) ? 'block' : 'none', 
    342         'form' => $oForm->getCode() 
     341        'display' => !empty($aLanguage) ? 'block' : 'none', 
     342        'form' => $oForm->getCode() 
    343343    )); 
    344344} 
     
    351351            'method' => 'post', 
    352352            'enctype' => 'multipart/form-data' 
    353         ),         
     353        ), 
    354354        'inputs' => array( 
    355355            'ImportLanguage_File' => array( 
    356356                'type' => 'file', 
    357                 'name' => 'ImportLanguage_File',                 
     357                'name' => 'ImportLanguage_File', 
    358358                'caption' => _t('_adm_txt_langs_file'), 
    359359            ), 
     
    364364            ) 
    365365        ) 
    366     );     
    367     $oForm = new BxTemplFormView($aFormImport); 
    368  
    369     return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_form_import.html', array( 
    370         'display' => !empty($aLanguage) ? 'block' : 'none', 
    371         'form' => $oForm->getCode() 
     366    ); 
     367    $oForm = new BxTemplFormView($aFormImport); 
     368 
     369    return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_form_import.html', array( 
     370        'display' => !empty($aLanguage) ? 'block' : 'none', 
     371        'form' => $oForm->getCode() 
    372372    )); 
    373373} 
     
    387387            ); 
    388388    } 
    389      
     389 
    390390    //--- Get Controls ---// 
    391     $aButtons = array(         
     391    $aButtons = array( 
    392392        'adm-lang-key-delete' => _t('_adm_txt_langs_delete') 
    393     );     
     393    ); 
    394394    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-keys-form', $aButtons, 'keys'); 
    395      
     395 
    396396    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_keys.html', array( 
    397397        'filter_value' => $sFilter, 
     
    401401        'url_admin' => $GLOBALS['site']['url_admin'] 
    402402    )); 
    403      
     403 
    404404    if($mixedResult !== true && !empty($mixedResult)) 
    405405        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
    406          
     406 
    407407    return DesignBoxAdmin(_t('_adm_box_cpt_lang_keys'), $sResult); 
    408408} 
     
    418418        ), 
    419419        'params' => array(), 
    420         'inputs' => array(             
     420        'inputs' => array( 
    421421            'name' => array( 
    422422                'type' => 'text', 
     
    431431                'value' => '', 
    432432                'values' => array() 
    433             ),             
     433            ), 
    434434        ) 
    435435    ); 
    436436 
    437437    $aCategories = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `title` FROM `sys_localization_categories`"); 
    438     foreach($aCategories as $aCategory)  
     438    foreach($aCategories as $aCategory) 
    439439        $aForm['inputs']['category']['values'][] = array('key' => $aCategory['id'], 'value' => $aCategory['title']); 
    440440 
     
    468468        ), 
    469469        'params' => array(), 
    470         'inputs' => array(             
     470        'inputs' => array( 
    471471            'id' => array( 
    472472                'type' => 'hidden', 
     
    484484            ), 
    485485        ) 
    486     );     
     486    ); 
    487487 
    488488    $aStrings = $GLOBALS['MySQL']->getAllWithKey("SELECT CONCAT('string_for_', `IDLanguage`) AS `key`, `String` AS `value` FROM `sys_localization_strings` WHERE `IDKey`='" . $iId . "'", "key"); 
     
    509509function createLanguage(&$aData) { 
    510510    global $MySQL; 
    511      
    512     $sTitle = process_db_input($aData['CopyLanguage_Title']); 
    513     $sName  = mb_strtolower( process_db_input($aData['CopyLanguage_Name']) ); 
    514     $sFlag = htmlspecialchars_adv($aData['Flag']); 
    515     $iSourceId = isset($aData['CopyLanguage_SourceLangID']) ? (int)$aData['CopyLanguage_SourceLangID'] : 0; 
    516  
    517     if(strlen($sTitle) <= 0)  
     511 
     512    $sTitle = process_db_input($aData['CopyLanguage_Title']); 
     513    $sName  = mb_strtolower( process_db_input($aData['CopyLanguage_Name']) ); 
     514    $sFlag = htmlspecialchars_adv($aData['Flag']); 
     515    $iSourceId = isset($aData['CopyLanguage_SourceLangID']) ? (int)$aData['CopyLanguage_SourceLangID'] : 0; 
     516 
     517    if(strlen($sTitle) <= 0) 
    518518        return '_adm_txt_langs_empty_title'; 
    519     if(strlen($sName) <= 0) 
     519    if(strlen($sName) <= 0) 
    520520        return '_adm_txt_langs_empty_name'; 
    521521 
     
    525525        return '_adm_txt_langs_success_updated'; 
    526526    } 
    527      
    528  
    529     $mixedResult = $MySQL->query("INSERT INTO `sys_localization_languages` (`Name`, `Flag`, `Title`) VALUES ('{$sName}', '{$sFlag}', '{$sTitle}')"); 
    530     if($mixedResult === false)  
     527 
     528 
     529    $mixedResult = $MySQL->query("INSERT INTO `sys_localization_languages` (`Name`, `Flag`, `Title`) VALUES ('{$sName}', '{$sFlag}', '{$sTitle}')"); 
     530    if($mixedResult === false) 
    531531        return '_adm_txt_langs_cannot_create'; 
    532532 
    533     $iId = db_last_id(); 
    534     $aStrings = $MySQL->getAll("SELECT  `IDKey`, `String` FROM  `sys_localization_strings` WHERE    `IDLanguage` = $iSourceId"); 
    535  
    536     foreach($aStrings as $aString){ 
    537         $aString['String'] = addslashes($aString['String']); 
    538         $MySQL->query("INSERT INTO `sys_localization_strings`(`IDKey`, `IDLanguage`, `String`) VALUES ('{$aString['IDKey']}', $iId, '{$aString['String']}')"); 
    539          
    540         if( !db_affected_rows() ) 
    541             return '_adm_txt_langs_cannot_add_string'; 
    542     } 
    543  
    544     return '_adm_txt_langs_success_create'; 
    545 } 
    546 function importLanguage(&$aData, &$aFiles) {     
     533    $iId = db_last_id(); 
     534    $aStrings = $MySQL->getAll("SELECT    `IDKey`, `String` FROM    `sys_localization_strings` WHERE    `IDLanguage` = $iSourceId"); 
     535 
     536    foreach($aStrings as $aString){ 
     537        $aString['String'] = addslashes($aString['String']); 
     538        $MySQL->query("INSERT INTO `sys_localization_strings`(`IDKey`, `IDLanguage`, `String`) VALUES ('{$aString['IDKey']}', $iId, '{$aString['String']}')"); 
     539 
     540        if( !db_affected_rows() ) 
     541            return '_adm_txt_langs_cannot_add_string'; 
     542    } 
     543 
     544    return '_adm_txt_langs_success_create'; 
     545} 
     546function importLanguage(&$aData, &$aFiles) { 
    547547    global $MySQL; 
    548548 
    549     $sTmpPath = $GLOBALS['dir']['tmp'] . mktime() . ".php"; 
    550     if(!file_exists($aFiles['ImportLanguage_File']['tmp_name']) || !move_uploaded_file($aFiles['ImportLanguage_File']['tmp_name'], $sTmpPath))  
     549    $sTmpPath = $GLOBALS['dir']['tmp'] . mktime() . ".php"; 
     550    if(!file_exists($aFiles['ImportLanguage_File']['tmp_name']) || !move_uploaded_file($aFiles['ImportLanguage_File']['tmp_name'], $sTmpPath)) 
    551551        return '_adm_txt_langs_cannot_upload_file'; 
    552      
     552 
    553553    require_once($sTmpPath); 
    554      
    555     $aLangInfo = isset($aLangInfo) ? $aLangInfo : $LANG_INFO; 
    556     $aLangContent = isset($aLangContent) ? $aLangContent : $LANG; 
    557     if (empty($aLangInfo) || empty($aLangContent)) { 
    558         return '_adm_txt_langs_cannot_create'; 
    559     } 
     554 
     555    $aLangInfo = isset($aLangInfo) ? $aLangInfo : $LANG_INFO; 
     556    $aLangContent = isset($aLangContent) ? $aLangContent : $LANG; 
     557    if (empty($aLangInfo) || empty($aLangContent)) { 
     558        return '_adm_txt_langs_cannot_create'; 
     559    } 
    560560 
    561561    $mixedResult = $MySQL->query("INSERT INTO `sys_localization_languages` (`Name`, `Flag`, `Title`) VALUES ('" . $aLangInfo['Name'] . "', '" . $aLangInfo['Flag'] . "', '" . $aLangInfo['Title'] . "')"); 
    562     if($mixedResult === false) { 
    563         @unlink($sTmpPath);  
     562    if($mixedResult === false) { 
     563        @unlink($sTmpPath); 
    564564        return '_adm_txt_langs_cannot_create'; 
    565     } 
     565    } 
    566566 
    567567    $iId = (int)$MySQL->lastId(); 
     
    571571            continue; 
    572572 
    573         $MySQL->query("INSERT INTO `sys_localization_strings`(`IDKey`, `IDLanguage`, `String`) VALUES ('" . $aKeys[$sKey]['id'] . "', " . $iId . ", '" . addslashes($sString) . "')"); 
    574     } 
    575      
    576     compileLanguage($iId); 
    577      
    578     @unlink($sTmpPath); 
    579     return '_adm_txt_langs_success_import'; 
     573        $MySQL->query("INSERT INTO `sys_localization_strings`(`IDKey`, `IDLanguage`, `String`) VALUES ('" . $aKeys[$sKey]['id'] . "', " . $iId . ", '" . addslashes($sString) . "')"); 
     574    } 
     575 
     576    compileLanguage($iId); 
     577 
     578    @unlink($sTmpPath); 
     579    return '_adm_txt_langs_success_import'; 
    580580} 
    581581function getLanguageName($iId) { 
    582     return $GLOBALS['MySQL']->getOne("SELECT `Name` FROM `sys_localization_languages` WHERE `ID`='" . (int)$iId . "' LIMIT 1"); 
     582    return $GLOBALS['MySQL']->getOne("SELECT `Name` FROM `sys_localization_languages` WHERE `ID`='" . (int)$iId . "' LIMIT 1"); 
    583583} 
    584584 
  • trunk/administration/login_form.html

    r15201 r15211  
    22 
    33<div class="login"> 
    4     <div class="login_header">__header_text__</div> 
    5     <div class="login_form">     
    6         <form action="__action_url__" method="POST"> 
    7         <input type="hidden" name="relocate" value="__relocate_url__" /> 
    8             <div class="login_form_row"> 
    9                 <div class="clear_both"></div> 
    10                 <div class="login_form_label">__name_label__:</div> 
    11                 <div class="login_form_val"> 
    12                     <input type="text" name="ID" class="login_form_input" /> 
    13                 </div> 
    14                 <div class="clear_both"></div> 
    15             </div> 
    16             <div class="login_form_row"> 
    17                 <div class="clear_both"></div> 
    18                 <div class="login_form_label">__password_label__:</div> 
    19                 <div class="login_form_val"> 
    20                     <input type="password" name="Password" class="login_form_input" /> 
    21                 </div> 
    22                 <div class="clear_both"></div> 
    23             </div> 
    24             <div class="login_form_row"> 
    25                 <div class="clear_both"></div> 
    26                 <div class="login_form_label"></div> 
    27                 <div class="login_form_val"> 
    28                     <input type="submit" value="Enter" class="login_form_submit" /> 
    29                 </div> 
    30                 <div class="clear_both"></div> 
    31             </div> 
    32         </form> 
    33     </div> 
     4    <div class="login_header">__header_text__</div> 
     5    <div class="login_form"> 
     6        <form action="__action_url__" method="POST"> 
     7        <input type="hidden" name="relocate" value="__relocate_url__" /> 
     8            <div class="login_form_row"> 
     9                <div class="clear_both"></div> 
     10                <div class="login_form_label">__name_label__:</div> 
     11                <div class="login_form_val"> 
     12                    <input type="text" name="ID" class="login_form_input" /> 
     13                </div> 
     14                <div class="clear_both"></div> 
     15            </div> 
     16            <div class="login_form_row"> 
     17                <div class="clear_both"></div> 
     18                <div class="login_form_label">__password_label__:</div> 
     19                <div class="login_form_val"> 
     20                    <input type="password" name="Password" class="login_form_input" /> 
     21                </div> 
     22                <div class="clear_both"></div> 
     23            </div> 
     24            <div class="login_form_row"> 
     25                <div class="clear_both"></div> 
     26                <div class="login_form_label"></div> 
     27                <div class="login_form_val"> 
     28                    <input type="submit" value="Enter" class="login_form_submit" /> 
     29                </div> 
     30                <div class="clear_both"></div> 
     31            </div> 
     32        </form> 
     33    </div> 
    3434</div> 
  • trunk/administration/manage_subscribers.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    2929bx_import('BxDolSubscription'); 
    3030bx_import('BxTemplSearchResult'); 
    31      
     31 
    3232$logged['admin'] = member_auth( 1, true, true ); 
    3333 
     
    6464        'count' => $oSubscription->getSubscribersCount(), 
    6565        'page_url' => $GLOBALS['site']['url_admin'] . 'manage_subscribers.php?start={start}' 
    66          
     66 
    6767    )); 
    68      
     68 
    6969    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array( 
    7070        'adm-ms-delete' => _t('_adm_btn_ms_delete') 
    7171    ), 'members'); 
    72      
     72 
    7373    $aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage); 
    7474 
  • trunk/administration/memb_levels.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3232$logged['admin'] = member_auth( 1, true, true ); 
    3333 
    34 $oSettings = new BxDolAdminSettings(5);  
     34$oSettings = new BxDolAdminSettings(5); 
    3535 
    3636//--- Process submit ---// 
     
    4747    else if(isset($_POST['adm-mlevels-disable'])) 
    4848        $sValue = 'no'; 
    49      
     49 
    5050    $GLOBALS['MySQL']->query("UPDATE `sys_acl_levels` SET `Active`='" . $sValue . "' WHERE `ID` IN ('" . implode("','", $_POST['levels']) . "')"); 
    5151} else if(isset($_POST['adm-mlevels-delete']) && !empty($_POST['levels'])) { 
     
    5959        if(isset($_POST['adm-mlevels-actions-enable'])) 
    6060            $sQuery = "REPLACE INTO `sys_acl_matrix` SET `IDLevel`='" . $iLevelId . "', `IDAction`='" . $iId . "'"; 
    61         else  
     61        else 
    6262            $sQuery = "DELETE FROM `sys_acl_matrix` WHERE `IDLevel`='" . $iLevelId . "' AND `IDAction`='" . $iId . "'"; 
    6363 
     
    6868    $iDays = (int)$_POST['days']; 
    6969    $iPrice = (float)trim($_POST['price'], " $"); 
    70      
     70 
    7171    $GLOBALS['MySQL']->query("INSERT INTO `sys_acl_level_prices`(`IDLevel`, `Days`, `Price`) VALUES('" . $iLevelId . "', '" . $iDays . "', '" . $iPrice . "')"); 
    7272} else if(isset($_POST['adm-mlevels-prices-delete'])) { 
     
    7575    $sQuery = "REPLACE INTO `sys_acl_matrix` SET `IDLevel`='" . $_POST['levelId'] . "', `IDAction`='" . $_POST['actionId'] . "'"; 
    7676    $sQuery .= !empty($_POST['allowedCnt']) ? ", `AllowedCount`='" . $_POST['allowedCnt'] . "'" : ""; 
    77     $sQuery .= !empty($_POST['period']) ? ", `AllowedPeriodLen`='" . $_POST['period'] . "'" : "";         
     77    $sQuery .= !empty($_POST['period']) ? ", `AllowedPeriodLen`='" . $_POST['period'] . "'" : ""; 
    7878    $sQuery .= !empty($_POST['dateStart']) ? ", `AllowedPeriodStart`=FROM_UNIXTIME(" . strtotime($_POST['dateStart']) . ")" : ""; 
    7979    $sQuery .= !empty($_POST['dateEnd']) ? ", `AllowedPeriodEnd`=FROM_UNIXTIME(" . strtotime($_POST['dateEnd']) . ")" : ""; 
    8080    $aResult = $GLOBALS['MySQL']->query($sQuery) > 0 ? array('code' => 0, 'message' => MsgBox(_t('_adm_txt_mlevels_action_saved'))) : array('code' => 1, 'message' => MsgBox(_t('_adm_txt_mlevels_action_cannot_save'))); 
    8181 
    82     $oJson = new Services_JSON();    
     82    $oJson = new Services_JSON(); 
    8383    echo "<script>parent.onResult(" . $oJson->encode($aResult) . ");</script>"; 
    8484    exit; 
    8585} else if(isset($_POST['action']) && $_POST['action'] == 'get_edit_form_action') { 
    86     $oJson = new Services_JSON();    
     86    $oJson = new Services_JSON(); 
    8787    echo $oJson->encode(array('code' => PageCodeAction((int)$_POST['level_id'], (int)$_POST['action_id'], $mixedResultAction))); 
    8888    exit; 
    8989} 
    90      
     90 
    9191$iLevelId = bx_get('level') !== false ? (int)bx_get('level') : 0; 
    9292 
     
    9696    'css_name' => array('forms_adv.css', 'settings.css', 'memb_levels.css', 'plugins/jquery/themes/|ui.datepicker.css'), 
    9797    'js_name' => array('ui.datepicker.js', 'memb_levels.js'), 
    98     'header' => _t('_adm_page_cpt_memb_levels'),     
     98    'header' => _t('_adm_page_cpt_memb_levels'), 
    9999); 
    100100$_page_cont[$iNameIndex] = array( 
     
    109109 
    110110function PageCodeSettings($mixedResult) { 
    111     $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $GLOBALS['oSettings']->getForm()));     
     111    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $GLOBALS['oSettings']->getForm())); 
    112112    if($mixedResult !== true && !empty($mixedResult)) 
    113113        $sResult = $mixedResult . $sResult; 
    114      
     114 
    115115    return DesignBoxAdmin(_t('_adm_box_cpt_mlevel_settings'), $sResult); 
    116116} 
     
    132132            ), 
    133133        ), 
    134         'inputs' => array (             
     134        'inputs' => array ( 
    135135            'Active' => array( 
    136136                'type' => 'hidden', 
     
    166166                ), 
    167167                'checker' => array ( 
    168                     'func' => 'length', 
    169                     'params' => array(3,100), 
    170                     'error' => _t('_adm_txt_mlevels_name_err'), 
    171                 ), 
     168                    'func' => 'length', 
     169                    'params' => array(3,100), 
     170                    'error' => _t('_adm_txt_mlevels_name_err'), 
     171                ), 
    172172            ), 
    173173            'Icon' => array( 
     
    175175                'name' => 'Icon', 
    176176                'caption' => _t('_adm_txt_mlevels_icon'), 
    177                 'value' => '', 
     177                'value' => '', 
    178178                'checker' => array ( 
    179                     'func' => '', 
    180                     'params' => '', 
    181                     'error' => _t('_adm_txt_mlevels_icon_err'), 
    182                 ), 
     179                    'func' => '', 
     180                    'params' => '', 
     181                    'error' => _t('_adm_txt_mlevels_icon_err'), 
     182                ), 
    183183            ), 
    184184            'Description' => array( 
     
    195195                'name' => 'submit', 
    196196                'value' => _t('_adm_btn_mlevels_add'), 
    197             ),                 
     197            ), 
    198198        ) 
    199199    ); 
     
    204204    $sFilePath = BX_DIRECTORY_PATH_ROOT . 'media/images/membership/'; 
    205205    $sFileName = time(); 
    206     $sFileExt = '';     
     206    $sFileExt = ''; 
    207207    if($oForm->isSubmittedAndValid() && $bFile = (isImage($_FILES['Icon']['type'], $sFileExt) && !empty($_FILES['Icon']['tmp_name']) && move_uploaded_file($_FILES['Icon']['tmp_name'],  $sFilePath . $sFileName . '.' . $sFileExt))) { 
    208         $sPath = $sFilePath . $sFileName . '.' . $sFileExt; 
    209         imageResize($sPath, $sPath, 110, 110); 
    210      
    211         $iId = (int)$oForm->insert(array('Icon' => $sFileName . '.' . $sFileExt)); 
    212         if($iId != 0) 
    213             addStringToLanguage("_adm_txt_mp_" . strtolower(bx_get('name')), bx_get('name')); 
    214      
    215          header('Location: ' . $oForm->aFormAttrs['action']);   
     208        $sPath = $sFilePath . $sFileName . '.' . $sFileExt; 
     209        imageResize($sPath, $sPath, 110, 110); 
     210 
     211        $iId = (int)$oForm->insert(array('Icon' => $sFileName . '.' . $sFileExt)); 
     212        if($iId != 0) 
     213            addStringToLanguage("_adm_txt_mp_" . strtolower(bx_get('name')), bx_get('name')); 
     214 
     215         header('Location: ' . $oForm->aFormAttrs['action']); 
    216216    } else { 
    217         if(!$bFile) 
    218             $oForm->aInputs['Icon']['error'] = $oForm->aInputs['Icon']['checker']['error']; 
    219              
     217        if(!$bFile) 
     218            $oForm->aInputs['Icon']['error'] = $oForm->aInputs['Icon']['checker']['error']; 
     219 
    220220        return DesignBoxAdmin(_t('_adm_box_cpt_mlevel_create'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode()))); 
    221221    } 
     
    254254                    'title' => $aLevel['title'] 
    255255                ) 
    256             ),             
     256            ), 
    257257        ); 
    258      
     258 
    259259    //--- Get Controls ---// 
    260260    $aButtons = array( 
     
    262262        'adm-mlevels-disable' => _t('_adm_btn_mlevels_disable'), 
    263263        'adm-mlevels-delete' => _t('_adm_btn_mlevels_delete') 
    264     );     
     264    ); 
    265265    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-list-form', $aButtons, 'levels'); 
    266          
     266 
    267267    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_list.html', array('bx_repeat:items' => $aItems, 'controls' => $sControls)); 
    268      
     268 
    269269    if($mixedResult !== true && !empty($mixedResult)) 
    270270        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
     
    307307    $aButtons = array( 
    308308        'adm-mlevels-actions-enable' => _t('_adm_btn_mlevels_enable'), 
    309         'adm-mlevels-actions-disable' => _t('_adm_btn_mlevels_disable')         
    310     );     
     309        'adm-mlevels-actions-disable' => _t('_adm_btn_mlevels_disable') 
     310    ); 
    311311    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-actions-form', $aButtons, 'actions'); 
    312          
     312 
    313313    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_actions.html', array( 
    314314        'id' => $iId, 
     
    317317        'url_admin' => $GLOBALS['site']['url_admin'] 
    318318    )); 
    319      
     319 
    320320    if($mixedResult !== true && !empty($mixedResult)) 
    321321        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
     
    325325function PageCodeAction($iLevelId, $iActionId, $mixedResult) { 
    326326    $aAction = $GLOBALS['MySQL']->getRow("SELECT * FROM `sys_acl_matrix` WHERE `IDLevel`='" . $iLevelId . "' AND `IDAction`='" . $iActionId . "'"); 
    327      
     327 
    328328    $aForm = array( 
    329329        'form_attrs' => array( 
     
    332332            'action' => $GLOBALS['site']['url_admin'] . 'memb_levels.php', 
    333333            'method' => 'post', 
    334             'enctype' => 'multipart/form-data'             
     334            'enctype' => 'multipart/form-data' 
    335335        ), 
    336336        'params' => array (), 
    337         'inputs' => array (             
     337        'inputs' => array ( 
    338338            'levelId' => array( 
    339339                'type' => 'hidden', 
     
    375375                'value' => isset($aAction['AllowedPeriodEnd']) ? $aAction['AllowedPeriodEnd'] : "", 
    376376                'display' => 'filterDate', 
    377             ),  
     377            ), 
    378378            'adm-mlevels-action-save' => array( 
    379379                'type' => 'submit', 
    380380                'name' => 'adm-mlevels-action-save', 
    381381                'value' => _t('_adm_btn_mlevels_save'), 
    382             ),                 
     382            ), 
    383383        ) 
    384384    ); 
     
    386386 
    387387    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_action.html', array( 
    388         'content' => $oForm->getCode()         
     388        'content' => $oForm->getCode() 
    389389    )); 
    390      
     390 
    391391    if($mixedResult !== true && !empty($mixedResult)) 
    392392        $sResult = MsgBox(_t($mixedResult), 3) . $sResult; 
     
    402402    $oModuleDb = new BxDolModuleDb(); 
    403403    if($oModuleDb->isModule('payment')) { 
    404         $aInfo = BxDolService::call('payment', 'get_currency_info'); 
    405         $sCurrencySign = $aInfo['sign']; 
    406     }  
    407     else  
    408         $sCurrencySign = getParam('currency_sign'); 
     404        $aInfo = BxDolService::call('payment', 'get_currency_info'); 
     405        $sCurrencySign = $aInfo['sign']; 
     406    } 
     407    else 
     408        $sCurrencySign = getParam('currency_sign'); 
    409409 
    410410    $aPrices = $GLOBALS['MySQL']->getAll("SELECT `id` AS `id`, `Days` AS `days`, `Price` AS `price` FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "' ORDER BY `id`"); 
     
    418418    $aButtons = array( 
    419419        'adm-mlevels-prices-delete' => _t('_adm_btn_mlevels_delete') 
    420     );     
     420    ); 
    421421    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-prices-form', $aButtons, 'prices'); 
    422          
     422 
    423423    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices.html', array( 
    424424        'id' => $iId, 
     
    433433} 
    434434function isImage($sMimeType, &$sFileExtension) { 
    435     $bResult = true; 
    436     switch($sMimeType) { 
    437         case 'image/jpeg': 
    438         case 'image/pjpeg': 
    439             $sFileExtension = 'jpg'; 
    440             break; 
    441         case 'image/png': 
    442         case 'image/x-png': 
    443             $sFileExtension = 'png'; 
    444             break; 
    445         case 'image/gif': 
    446             $sFileExtension = 'gif'; 
    447             break; 
    448         default: 
    449             $bResult = false; 
    450     } 
    451     return $bResult; 
     435    $bResult = true; 
     436    switch($sMimeType) { 
     437        case 'image/jpeg': 
     438        case 'image/pjpeg': 
     439            $sFileExtension = 'jpg'; 
     440            break; 
     441        case 'image/png': 
     442        case 'image/x-png': 
     443            $sFileExtension = 'png'; 
     444            break; 
     445        case 'image/gif': 
     446            $sFileExtension = 'gif'; 
     447            break; 
     448        default: 
     449            $bResult = false; 
     450    } 
     451    return $bResult; 
    452452} 
    453453function deleteMembership($iId) { 
    454     $iId = (int)$iId; 
    455  
    456     $aLevel = $GLOBALS['MySQL']->getRow("SELECT `Icon` AS `icon`, `Removable` AS `removable` FROM `sys_acl_levels` WHERE `ID`='" . $iId . "'"); 
    457     if(empty($aLevel)) 
    458         return "_adm_txt_mlevels_not_found"; 
    459  
    460     //Check if membership can be removed 
    461     if($aLevel['removable'] != 'yes') 
    462         return '_adm_txt_mlevels_cannot_remove'; 
    463  
    464     //Check if there are still members using this membership 
    465     $iDateExpires = $GLOBALS['MySQL']->getOne("SELECT UNIX_TIMESTAMP(MAX(`DateExpires`)) as `MaxDateExpires` FROM `sys_acl_levels_members` WHERE `IDLevel`='" . $iId . "'"); 
    466     if($iDateExpires > time()) 
    467         return "_adm_txt_mlevels_is_used"; 
    468  
    469     @unlink(BX_DIRECTORY_PATH_ROOT . 'media/images/membership/' . $aLevel['icon']); 
    470     db_res("DELETE FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "'"); 
    471     db_res("DELETE FROM `sys_acl_matrix` WHERE `IDLevel`='" . $iId . "'"); 
    472     db_res("DELETE FROM `sys_acl_levels` WHERE `ID`='" . $iId . "'"); 
    473      
    474     return true; 
     454    $iId = (int)$iId; 
     455 
     456    $aLevel = $GLOBALS['MySQL']->getRow("SELECT `Icon` AS `icon`, `Removable` AS `removable` FROM `sys_acl_levels` WHERE `ID`='" . $iId . "'"); 
     457    if(empty($aLevel)) 
     458        return "_adm_txt_mlevels_not_found"; 
     459 
     460    //Check if membership can be removed 
     461    if($aLevel['removable'] != 'yes') 
     462        return '_adm_txt_mlevels_cannot_remove'; 
     463 
     464    //Check if there are still members using this membership 
     465    $iDateExpires = $GLOBALS['MySQL']->getOne("SELECT UNIX_TIMESTAMP(MAX(`DateExpires`)) as `MaxDateExpires` FROM `sys_acl_levels_members` WHERE `IDLevel`='" . $iId . "'"); 
     466    if($iDateExpires > time()) 
     467        return "_adm_txt_mlevels_is_used"; 
     468 
     469    @unlink(BX_DIRECTORY_PATH_ROOT . 'media/images/membership/' . $aLevel['icon']); 
     470    db_res("DELETE FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "'"); 
     471    db_res("DELETE FROM `sys_acl_matrix` WHERE `IDLevel`='" . $iId . "'"); 
     472    db_res("DELETE FROM `sys_acl_levels` WHERE `ID`='" . $iId . "'"); 
     473 
     474    return true; 
    475475} 
    476476?> 
  • trunk/administration/member_menu_compose.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4141 
    4242$GLOBALS['oAdmTemplate']->addJsTranslation(array( 
    43     '_adm_mbuilder_Sorry_could_not_insert_object', 
    44     '_adm_mbuilder_This_items_are_non_editable' 
     43    '_adm_mbuilder_Sorry_could_not_insert_object', 
     44    '_adm_mbuilder_This_items_are_non_editable' 
    4545)); 
    4646 
     
    4848 
    4949$aMenuSection = array ( 
    50     'top', 'top_extra' 
     50    'top', 'top_extra' 
    5151); 
    5252 
     
    5858 
    5959if ( isset($_GET['menu_position']) ) { 
    60     foreach( $aMenuSection AS $sValue ) { 
    61         if ( $sValue == $_GET['menu_position'] ) {   
    62             $sMenuSection = $sValue; 
    63             break; 
    64         }    
    65     } 
     60    foreach( $aMenuSection AS $sValue ) { 
     61        if ( $sValue == $_GET['menu_position'] ) { 
     62            $sMenuSection = $sValue; 
     63            break; 
     64        } 
     65    } 
    6666} 
    6767 
    6868// ** FOR 'AJAX' REQUESTS ; 
    6969if(bx_get('action') !== false) { 
    70     switch(bx_get('action')) { 
    71         case 'edit_form': 
    72             $id = (int)bx_get('id'); 
    73              
    74             $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_member` WHERE `ID` = $id", 0 ); 
    75             $sResponce = ($aItem) ? showEditForm($aItem, $sMenuSection) : echoMenuEditMsg('Error', 'red'); 
    76             break; 
    77         case 'create_item': 
    78             $newID = createNewElement($_POST['type'], (int)$_POST['source'], $sMenuSection); 
    79             $sResponce =  $newID; 
    80             break; 
    81         case 'deactivate_item': 
    82             $res = db_res( "UPDATE `sys_menu_member` SET `Active`='0' WHERE `ID`=" . (int)bx_get('id') ); 
     70    switch(bx_get('action')) { 
     71        case 'edit_form': 
     72            $id = (int)bx_get('id'); 
     73 
     74            $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_member` WHERE `ID` = $id", 0 ); 
     75            $sResponce = ($aItem) ? showEditForm($aItem, $sMenuSection) : echoMenuEditMsg('Error', 'red'); 
     76            break; 
     77        case 'create_item': 
     78            $newID = createNewElement($_POST['type'], (int)$_POST['source'], $sMenuSection); 
     79            $sResponce =  $newID; 
     80            break; 
     81        case 'deactivate_item': 
     82            $res = db_res( "UPDATE `sys_menu_member` SET `Active`='0' WHERE `ID`=" . (int)bx_get('id') ); 
    8383            $sResponce =  db_affected_rows(); 
    84             break; 
    85         case 'save_item': 
    86             $id = (int)$_POST['id']; 
    87             if( !$id ) { 
    88                 $sResponce = echoMenuEditMsg( 'Error', 'red' ); 
    89             } else { 
     84            break; 
     85        case 'save_item': 
     86            $id = (int)$_POST['id']; 
     87            if( !$id ) { 
     88                $sResponce = echoMenuEditMsg( 'Error', 'red' ); 
     89            } else { 
    9090                $aItemFields = array( 'Name', 'Caption', 'Link', 'Target', 'Icon', 'Script' ); 
    91                 $aItem = array(); 
     91                $aItem = array(); 
    9292 
    9393                foreach( $aItemFields as $field ) { 
    94                     $aItem[$field] = ( isset($_POST[$field]) ) ? $_POST[$field] : null ; 
    95                 } 
     94                    $aItem[$field] = ( isset($_POST[$field]) ) ? $_POST[$field] : null ; 
     95                } 
    9696 
    9797                if ( !$aItem['Icon'] ) { 
     
    9999                } 
    100100 
    101                 $res = saveItem( $id, $aItem, $sMenuSection ); 
    102                 updateLangFile( $_POST['Caption'], $_POST['LangCaption'] ); 
    103  
    104                 $res['message'] = MsgBox($res['message']); 
    105                 $oJson = new Services_JSON();   
    106                 echo $oJson->encode($res); 
     101                $res = saveItem( $id, $aItem, $sMenuSection ); 
     102                updateLangFile( $_POST['Caption'], $_POST['LangCaption'] ); 
     103 
     104                $res['message'] = MsgBox($res['message']); 
     105                $oJson = new Services_JSON(); 
     106                echo $oJson->encode($res); 
    107107                exit; 
    108108            } 
    109             break; 
    110  
    111         case 'delete_item': 
    112             $id = (int)$_POST['id']; 
    113             if( !$id ) { 
    114                 $sResponce = 'Item ID is not specified'; 
    115             } else { 
    116                 $aItem = db_arr( "SELECT `Deletable` FROM `sys_menu_member` WHERE `ID` = $id" ); 
    117                 if( !$aItem ) { 
    118                     $sResponce = 'Item not found'; 
    119                 } else if( !(int)$aItem['Deletable'] ) { 
    120                     $sResponce = 'Item is non-deletable'; 
    121                 } else { 
    122                     db_res( "DELETE FROM `sys_menu_member` WHERE `ID` = $id" ); 
    123                     $sResponce = ( db_affected_rows() ) ? 'OK' : 'Couldn\'t delete the item'; 
    124                 }     
    125             }     
    126             break; 
    127  
    128         case 'save_orders': 
    129             saveOrders( bx_get('top'), bx_get('custom'), $sMenuSection ); 
    130             $sResponce = 'OK'; 
    131             break; 
    132     } 
     109            break; 
     110 
     111        case 'delete_item': 
     112            $id = (int)$_POST['id']; 
     113            if( !$id ) { 
     114                $sResponce = 'Item ID is not specified'; 
     115            } else { 
     116                $aItem = db_arr( "SELECT `Deletable` FROM `sys_menu_member` WHERE `ID` = $id" ); 
     117                if( !$aItem ) { 
     118                    $sResponce = 'Item not found'; 
     119                } else if( !(int)$aItem['Deletable'] ) { 
     120                    $sResponce = 'Item is non-deletable'; 
     121                } else { 
     122                    db_res( "DELETE FROM `sys_menu_member` WHERE `ID` = $id" ); 
     123                    $sResponce = ( db_affected_rows() ) ? 'OK' : 'Couldn\'t delete the item'; 
     124                } 
     125            } 
     126            break; 
     127 
     128        case 'save_orders': 
     129            saveOrders( bx_get('top'), bx_get('custom'), $sMenuSection ); 
     130            $sResponce = 'OK'; 
     131            break; 
     132    } 
    133133 
    134134    // return script's response and recompile the menu cache ; 
     
    140140// generate all active menu items ; 
    141141 
    142 $sTopQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_member` WHERE `Active`='1' AND `Position`='{$sMenuSection}' AND `Type`<>'linked_item' ORDER BY `Order`"; 
     142$sTopQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_member`    WHERE `Active`='1' AND `Position`='{$sMenuSection}' AND `Type`<>'linked_item' ORDER BY `Order`"; 
    143143$rTopItems = db_res($sTopQuery); 
    144144 
     
    148148 
    149149$sComposerInit = " 
    150     <script type=\"text/javascript\"> 
    151         topParentID = 'menu_app_wrapper'; 
    152         urlIconLoading = '{$site['url_admin']}images/loading.gif'; 
    153         parserUrl = '" . $GLOBALS['site']['url_admin'] . "member_menu_compose.php?menu_position={$sMenuSection}'; 
    154          
    155         allowNewItem = true; 
    156         allowAddToTop = true; 
    157         allowAddToCustom = false; 
    158         iInactivePerRow = 5; 
    159         sendSystemOrder = false; 
    160          
    161         aCoords = {}; 
    162         aCoords['startX'] = 270; 
    163         aCoords['startY'] = 235; 
    164         aCoords['width']  = 92; 
    165         aCoords['height'] = 21; 
    166         aCoords['diffX']  = 122; 
    167         aCoords['diffY']  = 32; 
    168          
    169         aTopItems = {}; 
    170         aCustomItems = {}; 
    171         aSystemItems = {}; 
    172         aAllItems = {}; 
     150    <script type=\"text/javascript\"> 
     151        topParentID = 'menu_app_wrapper'; 
     152        urlIconLoading = '{$site['url_admin']}images/loading.gif'; 
     153        parserUrl = '" . $GLOBALS['site']['url_admin'] . "member_menu_compose.php?menu_position={$sMenuSection}'; 
     154 
     155        allowNewItem = true; 
     156        allowAddToTop = true; 
     157        allowAddToCustom = false; 
     158        iInactivePerRow = 5; 
     159        sendSystemOrder = false; 
     160 
     161        aCoords = {}; 
     162        aCoords['startX'] = 270; 
     163        aCoords['startY'] = 235; 
     164        aCoords['width']  = 92; 
     165        aCoords['height'] = 21; 
     166        aCoords['diffX']  = 122; 
     167        aCoords['diffY']  = 32; 
     168 
     169        aTopItems = {}; 
     170        aCustomItems = {}; 
     171        aSystemItems = {}; 
     172        aAllItems = {}; 
    173173"; 
    174174 
    175175$iIndex = 0; 
    176176while(($aTopItem = mysql_fetch_assoc($rTopItems)) !== false) { 
    177     $sComposerInit .= " 
    178          
    179         aTopItems[$iIndex] = [{$aTopItem['ID']}, '" . addslashes( $aTopItem['Name'] ) . "', {$aTopItem['Movable']}]; 
    180         aCustomItems[$iIndex] = {};"; 
    181  
    182     $iIndex++; 
     177    $sComposerInit .= " 
     178 
     179        aTopItems[$iIndex] = [{$aTopItem['ID']}, '" . addslashes( $aTopItem['Name'] ) . "', {$aTopItem['Movable']}]; 
     180        aCustomItems[$iIndex] = {};"; 
     181 
     182    $iIndex++; 
    183183} 
    184184 
    185185$sComposerInit .= "\n"; 
    186186while(($aAllItem = mysql_fetch_assoc($rAllItems)) !== false) { 
    187     $sComposerInit .= " 
    188         aAllItems[{$aAllItem['ID']}] = '" . addslashes( $aAllItem['Name'] ) . "';"; 
    189 } 
    190     $sComposerInit .= " 
    191     </script> 
     187    $sComposerInit .= " 
     188        aAllItems[{$aAllItem['ID']}] = '" . addslashes( $aAllItem['Name'] ) . "';"; 
     189} 
     190    $sComposerInit .= " 
     191    </script> 
    192192"; 
    193193 
     
    203203$_page_cont[$iNameIndex]['controls'] = getSwitcherBlock(); 
    204204$_page_cont[$iNameIndex]['page_main_code'] = $GLOBALS['oAdmTemplate']->parseHtmlByName('menu_compose.html', array( 
    205     'extra_js' => $sComposerInit  
     205    'extra_js' => $sComposerInit 
    206206)); 
    207207 
     
    213213{ 
    214214    global $aMenuSection; 
    215      
     215 
    216216    $sOutputCode = '<div class="dbTopMenu">'; 
    217217    foreach($aMenuSection as $sKey) 
     
    231231        switch($sClassName) { 
    232232            case 'active' : 
    233                 $sOutputCode .=  
     233                $sOutputCode .= 
    234234                ' 
    235235                    <div class="' . $sClassName . '"> 
     
    238238                '; 
    239239                break; 
    240                  
     240 
    241241            case 'notActive' : 
    242                 $sOutputCode .=  
     242                $sOutputCode .= 
    243243                ' 
    244244                    <div class="' . $sClassName . '"> 
     
    263263            'enctype' => 'multipart/form-data', 
    264264        ), 
    265         'inputs' => array (                         
     265        'inputs' => array ( 
    266266            'Name' => array( 
    267267                'type' => 'text', 
     
    292292                'attrs' => array() 
    293293            ), 
    294             'Script' => array( 
     294            'Script' => array( 
    295295                'type' => 'text', 
    296296                'name' => 'Script', 
     
    326326                        'onclick' => 'javascript:saveItem(' . $aItem['ID'] . ');' 
    327327                    ) 
    328                 ),                 
     328                ), 
    329329                array( 
    330330                    'type' => 'button', 
     
    335335                    ) 
    336336                ) 
    337             ),                 
     337            ), 
    338338        ) 
    339339    ); 
    340      
     340 
    341341    foreach($aForm['inputs'] as $sKey => $aInput) 
    342342        if(in_array($aInput['type'], array('text', 'checkbox')) && !$aItem['Editable']) 
     
    349349 
    350350    $oForm = new BxTemplFormView($aForm); 
    351     return PopupBox('mmc_edit_popup', _t('_adm_mbuilder_edit_item') 
     351    return PopupBox('mmc_edit_popup', _t('_adm_mbuilder_edit_item') 
    352352            , $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html' 
    353353            , array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
     
    356356/** 
    357357 * @description : function will create new menu items ; 
    358  * @param       : $type (string) - type of ellement ; 
    359  * @param       : $source (integer) - menu's ID;  
    360  * @return      : ID of created menu item ; 
     358 * @param         : $type (string) - type of ellement ; 
     359 * @param         : $source (integer) - menu's ID; 
     360 * @return         : ID of created menu item ; 
    361361*/ 
    362362function createNewElement( $type, $source, $sMenuSection = 'top' ) { 
    363     global $oMenu; 
    364      
    365     if( $source ) { 
    366         $sourceActive = db_value( "SELECT `Active` FROM `sys_menu_member` WHERE `ID`=$source" ); 
    367         if( !$sourceActive ) { 
    368             //convert to active 
    369             db_res( "UPDATE `sys_menu_member` SET `Active`='1', `Position`='$type' WHERE `ID`=$source" ); 
    370             $newID = $source; 
    371         } else { 
    372             //create from source 
    373             db_res( "INSERT INTO `sys_menu_member` 
    374                         ( `Name`, `Caption`, `Link`, `Target`, `Script`, `Position`, `Eval`, `Icon`, `Type`, `Bubble`, `Description`, `PopupMenu`) 
    375                     SELECT 
    376                           `Name`, `Caption`, `Link`, `Target`, `Script`, '$type', `Eval`, `Icon`, `Type`, `Bubble`, `Description`, `PopupMenu` 
    377                     FROM `sys_menu_member` 
    378                     WHERE `ID`=$source" ); 
    379             $newID = db_last_id(); 
    380         } 
    381     } else { 
    382         //create new 
    383         db_res( "INSERT INTO `sys_menu_member` ( `Name`, `Position` ) VALUES ( 'NEW ITEM', '$type' )" ); 
    384         $newID = db_last_id(); 
    385     } 
    386      
    387     return $newID; 
     363    global $oMenu; 
     364 
     365    if( $source ) { 
     366        $sourceActive = db_value( "SELECT `Active` FROM `sys_menu_member` WHERE `ID`=$source" ); 
     367        if( !$sourceActive ) { 
     368            //convert to active 
     369            db_res( "UPDATE `sys_menu_member` SET `Active`='1', `Position`='$type' WHERE `ID`=$source" ); 
     370            $newID = $source; 
     371        } else { 
     372            //create from source 
     373            db_res( "INSERT INTO `sys_menu_member` 
     374                        ( `Name`, `Caption`, `Link`, `Target`, `Script`, `Position`, `Eval`, `Icon`, `Type`, `Bubble`, `Description`, `PopupMenu`) 
     375                    SELECT 
     376                          `Name`, `Caption`, `Link`, `Target`, `Script`, '$type', `Eval`, `Icon`, `Type`, `Bubble`, `Description`, `PopupMenu` 
     377                    FROM `sys_menu_member` 
     378                    WHERE `ID`=$source" ); 
     379            $newID = db_last_id(); 
     380        } 
     381    } else { 
     382        //create new 
     383        db_res( "INSERT INTO `sys_menu_member` ( `Name`, `Position` ) VALUES ( 'NEW ITEM', '$type' )" ); 
     384        $newID = db_last_id(); 
     385    } 
     386 
     387    return $newID; 
    388388} 
    389389 
    390390function echoMenuEditMsg( $text, $color = 'black' ) { 
    391391    return <<<HTML 
    392         <div style="color:{$color};text-align:center;">{$text}</div> 
     392        <div style="color:{$color};text-align:center;">{$text}</div> 
    393393HTML; 
    394394} 
     
    396396/** 
    397397 * @description : function will save all changes into menu items ; 
    398  * @param       : $id (integer) - ID of menu items ; 
    399  * @param       : $aItem (array) - all needed POST variables ; 
    400  * @param       : $sMenuSection (string) - position of menu ;  
    401  * @return      : Html presentation data (Answer code); 
     398 * @param        : $id (integer) - ID of menu items ; 
     399 * @param        : $aItem (array) - all needed POST variables ; 
     400 * @param        : $sMenuSection (string) - position of menu ; 
     401 * @return        : Html presentation data (Answer code); 
    402402*/ 
    403403function saveItem( $id, $aItem, $sMenuSection ) { 
    404     global $oMenu, $sMenuSection, $oMemeberMenu; 
    405  
    406     $aOldItem = db_arr( "SELECT * FROM `sys_menu_member` WHERE `ID` = $id" ); 
    407  
    408     if(!$aOldItem) { 
    409         return array( 'code' => 2, 'message' => _t('_adm_mbuilder_Item_not_found') ); 
    410     } 
    411  
    412     if( (int) $aOldItem['Editable'] != 1 ) { 
    413         return array('code' => 3, 'message' => _t('_adm_mbuilder_Item_is_non_editable') ); 
    414     } 
    415  
    416     $sQuerySet = ''; 
    417     foreach( $aItem as $field => $value ) 
    418         $sQuerySet .= ", `$field`='" . process_db_input( $value ) ."'"; 
    419      
    420     $sQuerySet = substr( $sQuerySet, 1 ); 
    421      
    422     $sQuery = "UPDATE `sys_menu_member` SET $sQuerySet WHERE `ID` = $id"; 
    423     db_res( $sQuery ); 
     404    global $oMenu, $sMenuSection, $oMemeberMenu; 
     405 
     406    $aOldItem = db_arr( "SELECT * FROM `sys_menu_member` WHERE `ID` = $id" ); 
     407 
     408    if(!$aOldItem) { 
     409        return array( 'code' => 2, 'message' => _t('_adm_mbuilder_Item_not_found') ); 
     410    } 
     411 
     412    if( (int) $aOldItem['Editable'] != 1 ) { 
     413        return array('code' => 3, 'message' => _t('_adm_mbuilder_Item_is_non_editable') ); 
     414    } 
     415 
     416    $sQuerySet = ''; 
     417    foreach( $aItem as $field => $value ) 
     418        $sQuerySet .= ", `$field`='" . process_db_input( $value ) ."'"; 
     419 
     420    $sQuerySet = substr( $sQuerySet, 1 ); 
     421 
     422    $sQuery = "UPDATE `sys_menu_member` SET $sQuerySet WHERE `ID` = $id"; 
     423    db_res( $sQuery ); 
    424424 
    425425    // return script's response and recompile the menu cache ; 
    426426    $oMemeberMenu -> createMemberMenuCache( $sMenuSection ); 
    427427 
    428     return array('code' => 0, 'message' => _t('_Saved'), 'timer' => 3); 
     428    return array('code' => 0, 'message' => _t('_Saved'), 'timer' => 3); 
    429429} 
    430430 
    431431function updateLangFile( $key, $string ) { 
    432     // clear from special chars ; 
    433  
    434     $key = preg_replace( '|\{([^\}]+)\}|', '', $key); 
    435  
    436     $langName = getParam( 'lang_default' ); 
    437     $langID = db_value( "SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = '" . addslashes( $langName ) . "'" ); 
    438      
    439     $keyID = db_value( "SELECT `ID` FROM `sys_localization_keys` WHERE `Key` = '" . process_db_input( $key ) . "'" ); 
    440     if( $keyID ) { 
    441         db_res( "UPDATE `sys_localization_strings` SET `String` = '" .process_db_input( $string ) . "' WHERE `IDKey`=$keyID AND `IDLanguage`=$langID" ); 
    442     } else { 
    443         db_res( "INSERT INTO `sys_localization_keys` SET `IDCategory` = 2, `Key` = '" . process_db_input( $key ) . "'" ); 
    444         db_res( "INSERT INTO `sys_localization_strings` SET `IDKey` = " . db_last_id() . ", `IDLanguage` = $langID, `String` = '" .process_db_input( $string ) . "'" ); 
    445     } 
    446      
    447     compileLanguage($langID); 
     432    // clear from special chars ; 
     433 
     434    $key = preg_replace( '|\{([^\}]+)\}|', '', $key); 
     435 
     436    $langName = getParam( 'lang_default' ); 
     437    $langID = db_value( "SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = '" . addslashes( $langName ) . "'" ); 
     438 
     439    $keyID = db_value( "SELECT `ID` FROM `sys_localization_keys` WHERE `Key` = '" . process_db_input( $key ) . "'" ); 
     440    if( $keyID ) { 
     441        db_res( "UPDATE `sys_localization_strings` SET `String` = '" .process_db_input( $string ) . "' WHERE `IDKey`=$keyID AND `IDLanguage`=$langID" ); 
     442    } else { 
     443        db_res( "INSERT INTO `sys_localization_keys` SET `IDCategory` = 2, `Key` = '" . process_db_input( $key ) . "'" ); 
     444        db_res( "INSERT INTO `sys_localization_strings` SET `IDKey` = " . db_last_id() . ", `IDLanguage` = $langID, `String` = '" .process_db_input( $string ) . "'" ); 
     445    } 
     446 
     447    compileLanguage($langID); 
    448448} 
    449449 
    450450/** 
    451451 * @description : function will save menu orders ; 
    452  * @param       : $sTop ( string ) - current menu ellement ; 
    453  * @param       : $aCustom ( array ) - all mrnu items ; 
    454  * @param       : $sMenuSection (string) - position of menu ;  
     452 * @param        : $sTop ( string ) - current menu ellement ; 
     453 * @param        : $aCustom ( array ) - all mrnu items ; 
     454 * @param        : $sMenuSection (string) - position of menu ; 
    455455*/ 
    456456function saveOrders( $sTop, $aCustom, $sMenuSection ) { 
    457     db_res( "UPDATE `sys_menu_member` SET `Order` = 0 WHERE `Position` = '{$sMenuSection}' " ); 
    458  
    459     $sTop = trim( $sTop, ' ,' ); 
    460     $aTopIDs = explode( ',', $sTop ); 
    461   
    462     foreach( $aTopIDs as $iOrd => $iID ) { 
    463         $iID = trim( $iID, ' ,' ); 
    464         $iID = (int)$iID; 
    465  
    466         if( !$iID ) 
    467             continue; 
    468  
    469         db_res( "UPDATE `sys_menu_member` SET `Order` = $iOrd, `Position` = '{$sMenuSection}'  WHERE `ID` = $iID" ); 
    470     } 
     457    db_res( "UPDATE `sys_menu_member` SET `Order` = 0 WHERE `Position` = '{$sMenuSection}' " ); 
     458 
     459    $sTop = trim( $sTop, ' ,' ); 
     460    $aTopIDs = explode( ',', $sTop ); 
     461 
     462    foreach( $aTopIDs as $iOrd => $iID ) { 
     463        $iID = trim( $iID, ' ,' ); 
     464        $iID = (int)$iID; 
     465 
     466        if( !$iID ) 
     467            continue; 
     468 
     469        db_res( "UPDATE `sys_menu_member` SET `Order` = $iOrd, `Position` = '{$sMenuSection}'  WHERE `ID` = $iID" ); 
     470    } 
    471471} 
    472472 
  • trunk/administration/menu_compose_admin.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3636 
    3737if(bx_get('action') !== false) { 
    38     switch(bx_get('action')) { 
    39         case 'edit_form': 
    40             $id = (int)bx_get('id'); 
    41              
    42             if( $id < 1000 ) { 
    43                 $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$id}'", 0 ); 
    44                 if( $aItem ) 
    45                     echo showEditFormCustom( $aItem ); 
    46                 else 
    47                     echo echoMenuEditMsg( _t('_Error'), 'red' ); 
    48             } else { 
    49                 $id = $id - 1000; 
    50                 $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$id}' AND `parent_id`='0'", 0 ); 
    51                 if( $aItem ) 
    52                     echo showEditFormTop( $aItem ); 
    53                 else 
    54                     echo echoMenuEditMsg( _t('_Error'), 'red' ); 
    55             } 
    56             exit; 
    57         case 'create_item': 
    58             $newID = createNewElement($_POST['type'], (int)$_POST['source']); 
    59             echo $newID; 
    60             exit; 
    61         case 'deactivate_item': 
    62             $id = (int)bx_get('id'); 
    63             if( $id > 1000 ) { 
    64                 $id = $id - 1000; 
    65                 db_res( "DELETE FROM `sys_menu_admin` WHERE `id`='{$id}' AND `parent_id`='0'" ); 
    66                 echo db_affected_rows(); 
    67             } else 
    68                 echo 1; 
    69             exit; 
    70         case 'save_item': 
    71             $id = (int)$_POST['id']; 
    72             if( !$id ) { 
    73                 $aResult = array('code' => 1, 'message' => _t('_Error occured')); 
    74             } else { 
    75                 if( $id < 1000 ) { 
    76                     $aItemFields = array( 'title', 'url', 'description', 'check', 'icon' ); 
    77                     $aItem = array(); 
    78                     foreach( $aItemFields as $field ) 
    79                         $aItem[$field] = $_POST[$field]; 
    80                 } else { 
    81                     $id = $id - 1000; 
    82                     $aItemFields = array( 'title', 'icon', 'icon_large' ); 
    83                     $aItem = array(); 
    84                     foreach( $aItemFields as $field ) 
    85                         $aItem[$field] = $_POST[$field]; 
    86                 } 
    87                 $aResult = saveItem( $id, $aItem ); 
    88             } 
    89             $aResult['message'] = MsgBox($aResult['message']); 
    90  
    91             $oJson = new Services_JSON(); 
     38    switch(bx_get('action')) { 
     39        case 'edit_form': 
     40            $id = (int)bx_get('id'); 
     41 
     42            if( $id < 1000 ) { 
     43                $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$id}'", 0 ); 
     44                if( $aItem ) 
     45                    echo showEditFormCustom( $aItem ); 
     46                else 
     47                    echo echoMenuEditMsg( _t('_Error'), 'red' ); 
     48            } else { 
     49                $id = $id - 1000; 
     50                $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$id}' AND `parent_id`='0'", 0 ); 
     51                if( $aItem ) 
     52                    echo showEditFormTop( $aItem ); 
     53                else 
     54                    echo echoMenuEditMsg( _t('_Error'), 'red' ); 
     55            } 
     56            exit; 
     57        case 'create_item': 
     58            $newID = createNewElement($_POST['type'], (int)$_POST['source']); 
     59            echo $newID; 
     60            exit; 
     61        case 'deactivate_item': 
     62            $id = (int)bx_get('id'); 
     63            if( $id > 1000 ) { 
     64                $id = $id - 1000; 
     65                db_res( "DELETE FROM `sys_menu_admin` WHERE `id`='{$id}' AND `parent_id`='0'" ); 
     66                echo db_affected_rows(); 
     67            } else 
     68                echo 1; 
     69            exit; 
     70        case 'save_item': 
     71            $id = (int)$_POST['id']; 
     72            if( !$id ) { 
     73                $aResult = array('code' => 1, 'message' => _t('_Error occured')); 
     74            } else { 
     75                if( $id < 1000 ) { 
     76                    $aItemFields = array( 'title', 'url', 'description', 'check', 'icon' ); 
     77                    $aItem = array(); 
     78                    foreach( $aItemFields as $field ) 
     79                        $aItem[$field] = $_POST[$field]; 
     80                } else { 
     81                    $id = $id - 1000; 
     82                    $aItemFields = array( 'title', 'icon', 'icon_large' ); 
     83                    $aItem = array(); 
     84                    foreach( $aItemFields as $field ) 
     85                        $aItem[$field] = $_POST[$field]; 
     86                } 
     87                $aResult = saveItem( $id, $aItem ); 
     88            } 
     89            $aResult['message'] = MsgBox($aResult['message']); 
     90 
     91            $oJson = new Services_JSON(); 
    9292            echo $oJson->encode($aResult); 
    93             exit; 
    94         case 'delete_item': 
    95             $id = (int)$_POST['id']; 
    96             if( !$id ) { 
    97                 echo _t('_adm_mbuilder_Item_ID_not_specified'); 
    98                 exit; 
    99             } 
    100  
    101             if( $id > 1000 ) { 
    102                 $id = $id - 1000; 
    103                  
    104                 db_res( "DELETE FROM `sys_menu_admin` WHERE `id` = '{$id}' AND `parent_id`='0'" ); 
    105             } else { 
    106                 db_res( "DELETE FROM `sys_menu_admin` WHERE `id` = '{$id}'" ); 
    107             } 
    108  
    109             if( db_affected_rows() ) 
    110                 echo 'OK'; 
    111             else 
    112                 echo _t('_adm_mbuilder_Could_not_delete_the_item'); 
    113             exit; 
    114         case 'save_orders': 
    115             saveOrders(bx_get('top'), bx_get('custom')); 
    116             echo 'OK'; 
    117             exit; 
    118     } 
     93            exit; 
     94        case 'delete_item': 
     95            $id = (int)$_POST['id']; 
     96            if( !$id ) { 
     97                echo _t('_adm_mbuilder_Item_ID_not_specified'); 
     98                exit; 
     99            } 
     100 
     101            if( $id > 1000 ) { 
     102                $id = $id - 1000; 
     103 
     104                db_res( "DELETE FROM `sys_menu_admin` WHERE `id` = '{$id}' AND `parent_id`='0'" ); 
     105            } else { 
     106                db_res( "DELETE FROM `sys_menu_admin` WHERE `id` = '{$id}'" ); 
     107            } 
     108 
     109            if( db_affected_rows() ) 
     110                echo 'OK'; 
     111            else 
     112                echo _t('_adm_mbuilder_Could_not_delete_the_item'); 
     113            exit; 
     114        case 'save_orders': 
     115            saveOrders(bx_get('top'), bx_get('custom')); 
     116            echo 'OK'; 
     117            exit; 
     118    } 
    119119} 
    120120 
     
    129129 
    130130$sComposerInit = " 
    131     <script type=\"text/javascript\"> 
    132         topParentID = 'menu_app_wrapper'; 
    133         urlIconLoading = '{$site['url_admin']}images/loading.gif'; 
    134         parserUrl = '" . $GLOBALS['site']['url_admin'] . "menu_compose_admin.php?'; 
    135  
    136         allowNewItem = true; 
    137         allowAddToTop = true; 
    138         allowAddToCustom = true; 
    139         iInactivePerRow = 7; 
    140         sendSystemOrder = false; 
    141  
    142         aCoords = {}; 
    143         aCoords['startX'] = 270; 
    144         aCoords['startY'] = 235; 
    145         aCoords['width']  = 92; 
    146         aCoords['height'] = 21; 
    147         aCoords['diffX']  = 122; 
    148         aCoords['diffY']  = 32; 
    149  
    150         aTopItems = {}; 
    151         aCustomItems = {}; 
    152         aSystemItems = {}; 
    153         aAllItems = {}; 
     131    <script type=\"text/javascript\"> 
     132        topParentID = 'menu_app_wrapper'; 
     133        urlIconLoading = '{$site['url_admin']}images/loading.gif'; 
     134        parserUrl = '" . $GLOBALS['site']['url_admin'] . "menu_compose_admin.php?'; 
     135 
     136        allowNewItem = true; 
     137        allowAddToTop = true; 
     138        allowAddToCustom = true; 
     139        iInactivePerRow = 7; 
     140        sendSystemOrder = false; 
     141 
     142        aCoords = {}; 
     143        aCoords['startX'] = 270; 
     144        aCoords['startY'] = 235; 
     145        aCoords['width']  = 92; 
     146        aCoords['height'] = 21; 
     147        aCoords['diffX']  = 122; 
     148        aCoords['diffY']  = 32; 
     149 
     150        aTopItems = {}; 
     151        aCustomItems = {}; 
     152        aSystemItems = {}; 
     153        aAllItems = {}; 
    154154"; 
    155155 
    156156$iIndex = 0; 
    157157while(($aTopItem = mysql_fetch_assoc($rTopItems)) !== false) { 
    158     $sTopestTitle = _t($aTopItem['title']); 
    159     $sComposerInit .= " 
    160          
    161         aTopItems[$iIndex] = [" . ($aTopItem['id'] + 1000) . ", '{$sTopestTitle}', 3]; 
    162         aCustomItems[$iIndex] = {};"; 
    163     $sQuery = "SELECT `id`, `title` FROM `sys_menu_admin` WHERE `parent_id`='{$aTopItem['id']}' ORDER BY `order`"; 
    164      
    165     $iSubIndex = 0; 
    166     $rCustomItems = db_res( $sQuery ); 
    167     while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
    168         $sCustomTitle = _t($aCustomItem['title']); 
    169         $sComposerInit .= " 
    170         aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['id']}, '{$sCustomTitle}', 3];"; 
    171     } 
    172  
    173     $iIndex++; 
     158    $sTopestTitle = _t($aTopItem['title']); 
     159    $sComposerInit .= " 
     160 
     161        aTopItems[$iIndex] = [" . ($aTopItem['id'] + 1000) . ", '{$sTopestTitle}', 3]; 
     162        aCustomItems[$iIndex] = {};"; 
     163    $sQuery = "SELECT `id`, `title` FROM `sys_menu_admin` WHERE `parent_id`='{$aTopItem['id']}' ORDER BY `order`"; 
     164 
     165    $iSubIndex = 0; 
     166    $rCustomItems = db_res( $sQuery ); 
     167    while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
     168        $sCustomTitle = _t($aCustomItem['title']); 
     169        $sComposerInit .= " 
     170        aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['id']}, '{$sCustomTitle}', 3];"; 
     171    } 
     172 
     173    $iIndex++; 
    174174} 
    175175 
    176176$sComposerInit .= "\n"; 
    177177while(($aAllTopItem = mysql_fetch_assoc($rAllTopItems)) !== false) { 
    178     $sTopTitle = _t($aAllTopItem['title']); 
    179     $sComposerInit .= " 
    180         aAllItems[" . ($aAllTopItem['id'] + 1000) . "] = '{$sTopTitle}';"; 
     178    $sTopTitle = _t($aAllTopItem['title']); 
     179    $sComposerInit .= " 
     180        aAllItems[" . ($aAllTopItem['id'] + 1000) . "] = '{$sTopTitle}';"; 
    181181} 
    182182 
    183183$sComposerInit .= "\n"; 
    184184while(($aAllItem = mysql_fetch_assoc($rAllItems)) !== false) { 
    185     $sOrdTitle = _t($aAllItem['title']); 
    186     $sComposerInit .= " 
    187         aAllItems[{$aAllItem['id']}] = '{$sOrdTitle}';"; 
     185    $sOrdTitle = _t($aAllItem['title']); 
     186    $sComposerInit .= " 
     187        aAllItems[{$aAllItem['id']}] = '{$sOrdTitle}';"; 
    188188} 
    189189 
    190190$sComposerInit .= " 
    191     </script> 
     191    </script> 
    192192"; 
    193193 
     
    209209// Functions 
    210210function getMainPageCode() { 
    211     $sAdminUrl = BX_DOL_URL_ADMIN; 
    212     $sAllItemsC = _t('_adm_mbuilder_All_Items'); 
    213     $sActiveItemsC = _t('_adm_mbuilder_Active_Items'); 
    214  
    215     return <<<EOF 
    216     <div class="pseudo_wrapper"> 
    217         <div class="pseudo_head">{$sActiveItemsC}</div> 
    218         <div id="pseudo1"> 
    219             <img src="{$sAdminUrl}images/loading.gif" /> 
    220         </div> 
    221         <div class="pseudo_head">{$sAllItemsC}</div> 
    222         <div id="pseudo2"> 
    223             <img src="{$sAdminUrl}images/loading.gif" /> 
    224         </div> 
    225     </div> 
     211    $sAdminUrl = BX_DOL_URL_ADMIN; 
     212    $sAllItemsC = _t('_adm_mbuilder_All_Items'); 
     213    $sActiveItemsC = _t('_adm_mbuilder_Active_Items'); 
     214 
     215    return <<<EOF 
     216    <div class="pseudo_wrapper"> 
     217        <div class="pseudo_head">{$sActiveItemsC}</div> 
     218        <div id="pseudo1"> 
     219            <img src="{$sAdminUrl}images/loading.gif" /> 
     220        </div> 
     221        <div class="pseudo_head">{$sAllItemsC}</div> 
     222        <div id="pseudo2"> 
     223            <img src="{$sAdminUrl}images/loading.gif" /> 
     224        </div> 
     225    </div> 
    226226EOF; 
    227227} 
     
    236236            'enctype' => 'multipart/form-data', 
    237237        ), 
    238         'inputs' => array (                         
     238        'inputs' => array ( 
    239239            'Title' => array( 
    240240                'type' => 'text', 
     
    251251                'attrs' => array() 
    252252            ), 
    253             'Check' => array( 
     253            'Check' => array( 
    254254                'type' => 'text', 
    255255                'name' => 'check', 
     
    281281                        'onclick' => 'javascript:saveItem(' . $aItem['id'] . ');' 
    282282                    ) 
    283                 ),                 
     283                ), 
    284284                array( 
    285285                    'type' => 'button', 
     
    290290                    ) 
    291291                ) 
    292             ),                 
     292            ), 
    293293        ) 
    294294    ); 
    295      
     295 
    296296    $oForm = new BxTemplFormView($aForm); 
    297     return PopupBox('amc_edit_popup_custom', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
     297    return PopupBox('amc_edit_popup_custom', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
    298298} 
    299299 
     
    307307            'enctype' => 'multipart/form-data', 
    308308        ), 
    309         'inputs' => array (                         
     309        'inputs' => array ( 
    310310            'Title' => array( 
    311311                'type' => 'text', 
     
    350350        ) 
    351351    ); 
    352      
     352 
    353353    $oForm = new BxTemplFormView($aForm); 
    354     return PopupBox('amc_edit_popup_top', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
     354    return PopupBox('amc_edit_popup_top', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
    355355} 
    356356 
    357357function createNewElement( $type, $source ) { 
    358     if( $source ) { 
    359         if( $type == 'top' and $source > 1000 ) { 
    360             $source = $source - 1000; 
    361              
    362             db_res( " 
    363                 INSERT INTO `sys_menu_admin` 
    364                     (`title`, `icon`, `icon_large`) 
    365                 SELECT 
    366                       `title`, `icon`, `icon_large` 
    367                 FROM `sys_menu_admin` 
    368                 WHERE `id` = '{$source}' 
    369             " ); 
    370             $newID = db_last_id(); 
    371         } elseif( $type == 'custom' and $source < 1000 ) { 
    372             $aItem = db_res( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$source}'" ); 
    373              
    374             if( $aItem['parent_id'] == 0 ) 
    375                 $newID = $source; 
    376             else { 
    377                 db_res( " 
    378                     INSERT INTO `sys_menu_admin` 
    379                         (`title`, `url`, `description`, `check`, `icon`) 
    380                     SELECT 
    381                           `title`, `url`, `description`, `check`, `icon` 
    382                     FROM `sys_menu_admin` 
    383                     WHERE `id` = '{$source}' 
    384                 " ); 
    385                 $newID = db_last_id(); 
    386             } 
    387         } elseif( $type == 'custom' and $source > 1000 ) { 
    388             $source = $source - 1000; 
    389              
    390             db_res( " 
    391                 INSERT INTO `sys_menu_admin` 
    392                     (`title`) 
    393                 SELECT 
    394                       `title` 
    395                 FROM `sys_menu_admin` 
    396                 WHERE `id` = '{$source}' 
    397             " ); 
    398             $newID = db_last_id(); 
    399         } elseif( $type == 'top' and $source < 1000 ) { 
    400             db_res( " 
    401                 INSERT INTO `sys_menu_admin` 
    402                     (`title`) 
    403                 SELECT 
    404                       `title` 
    405                 FROM `sys_menu_admin` 
    406                 WHERE `id` = '{$source}' 
    407             " ); 
    408             $newID = db_last_id(); 
    409         } 
    410     } else { 
    411         db_res( "INSERT INTO `sys_menu_admin` SET `title` = 'NEW ITEM'" ); 
    412         $newID = db_last_id(); 
    413     } 
    414     return $newID; 
     358    if( $source ) { 
     359        if( $type == 'top' and $source > 1000 ) { 
     360            $source = $source - 1000; 
     361 
     362            db_res( " 
     363                INSERT INTO `sys_menu_admin` 
     364                    (`title`, `icon`, `icon_large`) 
     365                SELECT 
     366                      `title`, `icon`, `icon_large` 
     367                FROM `sys_menu_admin` 
     368                WHERE `id` = '{$source}' 
     369            " ); 
     370            $newID = db_last_id(); 
     371        } elseif( $type == 'custom' and $source < 1000 ) { 
     372            $aItem = db_res( "SELECT * FROM `sys_menu_admin` WHERE `id` = '{$source}'" ); 
     373 
     374            if( $aItem['parent_id'] == 0 ) 
     375                $newID = $source; 
     376            else { 
     377                db_res( " 
     378                    INSERT INTO `sys_menu_admin` 
     379                        (`title`, `url`, `description`, `check`, `icon`) 
     380                    SELECT 
     381                          `title`, `url`, `description`, `check`, `icon` 
     382                    FROM `sys_menu_admin` 
     383                    WHERE `id` = '{$source}' 
     384                " ); 
     385                $newID = db_last_id(); 
     386            } 
     387        } elseif( $type == 'custom' and $source > 1000 ) { 
     388            $source = $source - 1000; 
     389 
     390            db_res( " 
     391                INSERT INTO `sys_menu_admin` 
     392                    (`title`) 
     393                SELECT 
     394                      `title` 
     395                FROM `sys_menu_admin` 
     396                WHERE `id` = '{$source}' 
     397            " ); 
     398            $newID = db_last_id(); 
     399        } elseif( $type == 'top' and $source < 1000 ) { 
     400            db_res( " 
     401                INSERT INTO `sys_menu_admin` 
     402                    (`title`) 
     403                SELECT 
     404                      `title` 
     405                FROM `sys_menu_admin` 
     406                WHERE `id` = '{$source}' 
     407            " ); 
     408            $newID = db_last_id(); 
     409        } 
     410    } else { 
     411        db_res( "INSERT INTO `sys_menu_admin` SET `title` = 'NEW ITEM'" ); 
     412        $newID = db_last_id(); 
     413    } 
     414    return $newID; 
    415415} 
    416416 
    417417function echoMenuEditMsg( $text, $color = 'black' ) { 
    418     return <<<EOF 
     418    return <<<EOF 
    419419<div onclick="hideEditForm();" style="color:{$color};text-align:center;">{$text}</div> 
    420420EOF; 
     
    422422 
    423423function saveItem( $id, $aItem ) { 
    424     $sSavedC = _t('_Saved'); 
    425  
    426     $aOldItem = db_arr( "SELECT * FROM `sys_menu_admin` WHERE `id`='{$id}'" ); 
    427  
    428     if( !$aOldItem ) 
    429         return array('code' => 2, 'message' => _t('_Error') . ' ' . _t('_adm_mbuilder_Item_not_found')); 
    430  
    431     $sQuerySet = ''; 
    432     foreach( $aItem as $field => $value ) 
    433         $sQuerySet .= ", `{$field}`='" . process_db_input( $value ) ."'"; 
    434  
    435     $sQuerySet = substr( $sQuerySet, 1 ); 
    436  
    437     $sQuery = "UPDATE `sys_menu_admin` SET {$sQuerySet} WHERE `id` = '{$id}'"; 
    438     db_res( $sQuery ); 
    439  
    440     return array('code' => 0, 'message' => $sSavedC, 'timer' => 3); 
     424    $sSavedC = _t('_Saved'); 
     425 
     426    $aOldItem = db_arr( "SELECT * FROM `sys_menu_admin` WHERE `id`='{$id}'" ); 
     427 
     428    if( !$aOldItem ) 
     429        return array('code' => 2, 'message' => _t('_Error') . ' ' . _t('_adm_mbuilder_Item_not_found')); 
     430 
     431    $sQuerySet = ''; 
     432    foreach( $aItem as $field => $value ) 
     433        $sQuerySet .= ", `{$field}`='" . process_db_input( $value ) ."'"; 
     434 
     435    $sQuerySet = substr( $sQuerySet, 1 ); 
     436 
     437    $sQuery = "UPDATE `sys_menu_admin` SET {$sQuerySet} WHERE `id` = '{$id}'"; 
     438    db_res( $sQuery ); 
     439 
     440    return array('code' => 0, 'message' => $sSavedC, 'timer' => 3); 
    441441} 
    442442 
    443443function saveOrders( $sTop, $aCustom ) { 
    444     db_res( "UPDATE `sys_menu_admin` SET `order` = 0" ); 
    445     db_res( "UPDATE `sys_menu_admin` SET `order` = 0, `parent_id` = 0" ); 
    446  
    447     $sTop = trim( $sTop, ' ,' ); 
    448     $aTopIDs = explode( ',', $sTop ); 
    449     foreach( $aTopIDs as $iOrd => $iID ) { 
    450         $iID = trim( $iID, ' ,' ); 
    451         $iID = (int)$iID; 
    452  
    453         if( !$iID ) 
    454             continue; 
    455  
    456         $iID = $iID - 1000; 
    457  
    458         db_res( "UPDATE `sys_menu_admin` SET `order` = {$iOrd} WHERE `id` = '{$iID}'" ); 
    459     } 
    460      
    461     foreach( $aCustom as $iParent => $sCustom ) { 
    462         $iParent = (int)$iParent; 
    463         $iParent = $iParent - 1000; 
    464          
    465         $sCustom = trim( $sCustom, ' ,' ); 
    466         $aCustomIDs = explode( ',', $sCustom ); 
    467          
    468         foreach( $aCustomIDs as $iOrd => $iID ) { 
    469             $iID = trim( $iID, ' ,' ); 
    470             $iID = (int)$iID; 
    471              
    472             if( !$iID ) 
    473                 continue; 
    474              
    475             db_res( "UPDATE `sys_menu_admin` SET `order` = '{$iOrd}', `parent_id`='{$iParent}' WHERE `id` = '{$iID}'" ); 
    476         } 
    477     } 
     444    db_res( "UPDATE `sys_menu_admin` SET `order` = 0" ); 
     445    db_res( "UPDATE `sys_menu_admin` SET `order` = 0, `parent_id` = 0" ); 
     446 
     447    $sTop = trim( $sTop, ' ,' ); 
     448    $aTopIDs = explode( ',', $sTop ); 
     449    foreach( $aTopIDs as $iOrd => $iID ) { 
     450        $iID = trim( $iID, ' ,' ); 
     451        $iID = (int)$iID; 
     452 
     453        if( !$iID ) 
     454            continue; 
     455 
     456        $iID = $iID - 1000; 
     457 
     458        db_res( "UPDATE `sys_menu_admin` SET `order` = {$iOrd} WHERE `id` = '{$iID}'" ); 
     459    } 
     460 
     461    foreach( $aCustom as $iParent => $sCustom ) { 
     462        $iParent = (int)$iParent; 
     463        $iParent = $iParent - 1000; 
     464 
     465        $sCustom = trim( $sCustom, ' ,' ); 
     466        $aCustomIDs = explode( ',', $sCustom ); 
     467 
     468        foreach( $aCustomIDs as $iOrd => $iID ) { 
     469            $iID = trim( $iID, ' ,' ); 
     470            $iID = (int)$iID; 
     471 
     472            if( !$iID ) 
     473                continue; 
     474 
     475            db_res( "UPDATE `sys_menu_admin` SET `order` = '{$iOrd}', `parent_id`='{$iParent}' WHERE `id` = '{$iID}'" ); 
     476        } 
     477    } 
    478478} 
    479479 
  • trunk/administration/modules.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    6767    'page_code_updates' => DesignBoxAdmin(_t('_adm_box_cpt_available_updates'), $oInstallerUi->getUpdates($sResultDeleteUpdate)), 
    6868    'page_code_market_feed' => 'on' == getParam('feeds_enable') ? DesignBoxAdmin(_t('_adm_box_cpt_featured_modules'), ' 
    69         <div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0"> 
    70             <div class="loading_rss"> 
    71                 <img src="' . getTemplateImage('loading.gif') . '" alt="'._t('_loading ...').'" /> 
    72             </div> 
    73         </div>') : '', 
     69        <div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0"> 
     70            <div class="loading_rss"> 
     71                <img src="' . getTemplateImage('loading.gif') . '" alt="'._t('_loading ...').'" /> 
     72            </div> 
     73        </div>') : '', 
    7474); 
    7575 
  • trunk/administration/nav_menu_compose.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    4343 
    4444$GLOBALS['oAdmTemplate']->addJsTranslation(array( 
    45     '_adm_mbuilder_Sorry_could_not_insert_object', 
    46     '_adm_mbuilder_This_items_are_non_editable' 
     45    '_adm_mbuilder_Sorry_could_not_insert_object', 
     46    '_adm_mbuilder_This_items_are_non_editable' 
    4747)); 
    4848 
     
    5050 
    5151if(bx_get('action') !== false) { 
    52     switch(bx_get('action')) { 
    53         case 'edit_form': 
    54             $id = (int)bx_get('id'); 
    55              
    56             $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_top` WHERE `ID` = '{$id}'", 0 ); 
    57             if( $aItem ) 
    58                 echo showEditForm( $aItem ); 
    59             else 
    60                 echoMenuEditMsg( _t('_Error occured'), 'red' ); 
    61         exit; 
    62         case 'create_item': 
    63             $newID = createNewElement($_POST['type'], (int)$_POST['source']); 
    64             echo $newID; 
    65         exit; 
    66         case 'deactivate_item': 
    67             $res = db_res( "UPDATE `sys_menu_top` SET `Active`=0 WHERE `ID`=" . (int)bx_get('id')); 
    68             echo db_affected_rows(); 
    69             $oMenu -> compile(); 
    70         exit; 
    71         case 'save_item': 
    72             $id = (int)$_POST['id']; 
    73             if(!$id) 
    74                 $aResult = array('code' => 1, 'message' => _t('_Error occured')); 
    75             else { 
    76                 $aItemFields = array('Name', 'Caption', 'Link', 'Picture', 'Icon'); 
    77                 $aItem = array(); 
    78                 foreach( $aItemFields as $field ) 
    79                     $aItem[$field] = $_POST[$field]; 
    80      
    81                 $aVis = array(); 
    82                 if( (int)$_POST['Visible_non'] ) 
    83                     $aVis[] = 'non'; 
    84                 if( (int)$_POST['Visible_memb'] ) 
    85                     $aVis[] = 'memb'; 
    86      
    87                 $aItem['Visible'] = implode( ',', $aVis ); 
    88                 $aItem['BQuickLink'] = (int)$_POST['BInQuickLink'] ? '1' : '0'; 
    89                 $aItem['Target'] = $_POST['Target'] == '_blank' ? '_blank' : ''; 
     52    switch(bx_get('action')) { 
     53        case 'edit_form': 
     54            $id = (int)bx_get('id'); 
     55 
     56            $aItem = db_assoc_arr( "SELECT * FROM `sys_menu_top` WHERE `ID` = '{$id}'", 0 ); 
     57            if( $aItem ) 
     58                echo showEditForm( $aItem ); 
     59            else 
     60                echoMenuEditMsg( _t('_Error occured'), 'red' ); 
     61        exit; 
     62        case 'create_item': 
     63            $newID = createNewElement($_POST['type'], (int)$_POST['source']); 
     64            echo $newID; 
     65        exit; 
     66        case 'deactivate_item': 
     67            $res = db_res( "UPDATE `sys_menu_top` SET `Active`=0 WHERE `ID`=" . (int)bx_get('id')); 
     68            echo db_affected_rows(); 
     69            $oMenu -> compile(); 
     70        exit; 
     71        case 'save_item': 
     72            $id = (int)$_POST['id']; 
     73            if(!$id) 
     74                $aResult = array('code' => 1, 'message' => _t('_Error occured')); 
     75            else { 
     76                $aItemFields = array('Name', 'Caption', 'Link', 'Picture', 'Icon'); 
     77                $aItem = array(); 
     78                foreach( $aItemFields as $field ) 
     79                    $aItem[$field] = $_POST[$field]; 
     80 
     81                $aVis = array(); 
     82                if( (int)$_POST['Visible_non'] ) 
     83                    $aVis[] = 'non'; 
     84                if( (int)$_POST['Visible_memb'] ) 
     85                    $aVis[] = 'memb'; 
     86 
     87                $aItem['Visible'] = implode( ',', $aVis ); 
     88                $aItem['BQuickLink'] = (int)$_POST['BInQuickLink'] ? '1' : '0'; 
     89                $aItem['Target'] = $_POST['Target'] == '_blank' ? '_blank' : ''; 
    9090 
    9191                $aResult = saveItem( $id, $aItem ); 
    92             } 
    93  
    94             $aResult['message'] = MsgBox($aResult['message']); 
    95  
    96             $oJson = new Services_JSON();    
     92            } 
     93 
     94            $aResult['message'] = MsgBox($aResult['message']); 
     95 
     96            $oJson = new Services_JSON(); 
    9797            echo $oJson->encode($aResult); 
    98         exit; 
    99         case 'delete_item': 
    100             $id = (int)$_POST['id']; 
    101             if( !$id ) { 
    102                 echo _t('_adm_mbuilder_Item_ID_not_specified'); 
    103                 exit; 
    104             } 
    105  
    106             $aItem = db_arr( "SELECT `Deletable` FROM `sys_menu_top` WHERE `ID` = '{$id}'" ); 
    107             if( !$aItem ) { 
    108                 echo _t('_adm_mbuilder_Item_not_found'); 
    109                 exit; 
    110             } 
    111  
    112             if( !(int)$aItem['Deletable'] ) { 
    113                 echo _t('_adm_mbuilder_Item_is_non_deletable'); 
    114                 exit; 
    115             } 
    116  
    117             db_res( "DELETE FROM `sys_menu_top` WHERE `ID` = $id" ); 
    118             if( db_affected_rows() ) 
    119                 echo 'OK'; 
    120             else 
    121                 echo _t('_adm_mbuilder_Could_not_delete_the_item'); 
    122             $oMenu -> compile(); 
    123         exit; 
    124         case 'save_orders': 
    125             saveOrders(bx_get('top'), bx_get('custom')); 
    126             echo 'OK'; 
    127         exit; 
    128     } 
     98        exit; 
     99        case 'delete_item': 
     100            $id = (int)$_POST['id']; 
     101            if( !$id ) { 
     102                echo _t('_adm_mbuilder_Item_ID_not_specified'); 
     103                exit; 
     104            } 
     105 
     106            $aItem = db_arr( "SELECT `Deletable` FROM `sys_menu_top` WHERE `ID` = '{$id}'" ); 
     107            if( !$aItem ) { 
     108                echo _t('_adm_mbuilder_Item_not_found'); 
     109                exit; 
     110            } 
     111 
     112            if( !(int)$aItem['Deletable'] ) { 
     113                echo _t('_adm_mbuilder_Item_is_non_deletable'); 
     114                exit; 
     115            } 
     116 
     117            db_res( "DELETE FROM `sys_menu_top` WHERE `ID` = $id" ); 
     118            if( db_affected_rows() ) 
     119                echo 'OK'; 
     120            else 
     121                echo _t('_adm_mbuilder_Could_not_delete_the_item'); 
     122            $oMenu -> compile(); 
     123        exit; 
     124        case 'save_orders': 
     125            saveOrders(bx_get('top'), bx_get('custom')); 
     126            echo 'OK'; 
     127        exit; 
     128    } 
    129129} 
    130130 
     
    141141 
    142142$sComposerInit = " 
    143     <script type=\"text/javascript\"> 
    144     <!-- 
    145         topParentID = 'menu_app_wrapper'; 
    146         urlIconLoading = '{$sAdminUrl}images/loading.gif'; 
    147         parserUrl = '" . $GLOBALS['site']['url_admin'] . "nav_menu_compose.php?'; 
    148          
    149         allowNewItem = true; 
    150         allowAddToTop = true; 
    151         allowAddToCustom = true; 
    152         iInactivePerRow = 7; 
    153         sendSystemOrder = false; 
    154          
    155         aCoords = {}; 
    156         aCoords['startX'] = 270; 
    157         aCoords['startY'] = 235; 
    158         aCoords['width']  = 92; 
    159         aCoords['height'] = 21; 
    160         aCoords['diffX']  = 122; 
    161         aCoords['diffY']  = 32; 
    162          
    163         aTopItems = {}; 
    164         aCustomItems = {}; 
    165         aSystemItems = {}; 
    166         aAllItems = {}; 
     143    <script type=\"text/javascript\"> 
     144    <!-- 
     145        topParentID = 'menu_app_wrapper'; 
     146        urlIconLoading = '{$sAdminUrl}images/loading.gif'; 
     147        parserUrl = '" . $GLOBALS['site']['url_admin'] . "nav_menu_compose.php?'; 
     148 
     149        allowNewItem = true; 
     150        allowAddToTop = true; 
     151        allowAddToCustom = true; 
     152        iInactivePerRow = 7; 
     153        sendSystemOrder = false; 
     154 
     155        aCoords = {}; 
     156        aCoords['startX'] = 270; 
     157        aCoords['startY'] = 235; 
     158        aCoords['width']  = 92; 
     159        aCoords['height'] = 21; 
     160        aCoords['diffX']  = 122; 
     161        aCoords['diffY']  = 32; 
     162 
     163        aTopItems = {}; 
     164        aCustomItems = {}; 
     165        aSystemItems = {}; 
     166        aAllItems = {}; 
    167167"; 
    168          
     168 
    169169$iIndex = 0; 
    170170while(($aTopItem = mysql_fetch_assoc($rTopItems)) !== false) { 
    171     $sComposerInit .= " 
    172          
    173         aTopItems[$iIndex] = [{$aTopItem['ID']}, '" . addslashes( $aTopItem['Name'] ) . "', " . $aTopItem['Movable'] . "]; 
    174         aCustomItems[$iIndex] = {};"; 
    175     $sQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_top` WHERE `Active`=1 AND `Type`='custom' AND `Parent`={$aTopItem['ID']} ORDER BY `Order`"; 
    176  
    177     $iSubIndex = 0; 
    178     $rCustomItems = db_res( $sQuery ); 
    179     while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
    180         $sComposerInit .= " 
    181         aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['ID']}, '" . addslashes( $aCustomItem['Name'] ) . "', " . $aCustomItem['Movable'] . "];"; 
    182     } 
    183  
    184     $iIndex++; 
     171    $sComposerInit .= " 
     172 
     173        aTopItems[$iIndex] = [{$aTopItem['ID']}, '" . addslashes( $aTopItem['Name'] ) . "', " . $aTopItem['Movable'] . "]; 
     174        aCustomItems[$iIndex] = {};"; 
     175    $sQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_top` WHERE `Active`=1 AND `Type`='custom' AND `Parent`={$aTopItem['ID']} ORDER BY `Order`"; 
     176 
     177    $iSubIndex = 0; 
     178    $rCustomItems = db_res( $sQuery ); 
     179    while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
     180        $sComposerInit .= " 
     181        aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['ID']}, '" . addslashes( $aCustomItem['Name'] ) . "', " . $aCustomItem['Movable'] . "];"; 
     182    } 
     183 
     184    $iIndex++; 
    185185} 
    186186 
    187187while(($aSystemItem = mysql_fetch_assoc($rSysItems)) !== false) { 
    188     $sComposerInit .= " 
    189          
    190         aSystemItems[$iIndex] = [{$aSystemItem['ID']}, '" . addslashes( $aSystemItem['Name'] ) . "', " . $aSystemItem['Movable'] . "]; 
    191         aCustomItems[$iIndex] = {};"; 
    192     $sQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_top` WHERE `Active`=1 AND `Type`='custom' AND `Parent`={$aSystemItem['ID']} ORDER BY `Order`"; 
    193      
    194     $iSubIndex = 0; 
    195     $rCustomItems = db_res( $sQuery ); 
    196     while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
    197         $sComposerInit .= " 
    198         aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['ID']}, '" . addslashes( $aCustomItem['Name'] ) . "', " . $aCustomItem['Movable'] . "];"; 
    199     } 
    200  
    201     $iIndex++; 
     188    $sComposerInit .= " 
     189 
     190        aSystemItems[$iIndex] = [{$aSystemItem['ID']}, '" . addslashes( $aSystemItem['Name'] ) . "', " . $aSystemItem['Movable'] . "]; 
     191        aCustomItems[$iIndex] = {};"; 
     192    $sQuery = "SELECT `ID`, `Name`, `Movable` FROM `sys_menu_top` WHERE `Active`=1 AND `Type`='custom' AND `Parent`={$aSystemItem['ID']} ORDER BY `Order`"; 
     193 
     194    $iSubIndex = 0; 
     195    $rCustomItems = db_res( $sQuery ); 
     196    while(($aCustomItem = mysql_fetch_assoc($rCustomItems)) !== false) { 
     197        $sComposerInit .= " 
     198        aCustomItems[$iIndex][" . ($iSubIndex++) . "] = [{$aCustomItem['ID']}, '" . addslashes( $aCustomItem['Name'] ) . "', " . $aCustomItem['Movable'] . "];"; 
     199    } 
     200 
     201    $iIndex++; 
    202202} 
    203203 
    204204$sComposerInit .= "\n"; 
    205205while(($aAllItem = mysql_fetch_assoc($rAllItems)) !== false) { 
    206     $sComposerInit .= " 
    207         aAllItems[{$aAllItem['ID']}] = '" . addslashes( $aAllItem['Name'] ) . "';"; 
     206    $sComposerInit .= " 
     207        aAllItems[{$aAllItem['ID']}] = '" . addslashes( $aAllItem['Name'] ) . "';"; 
    208208} 
    209209$sComposerInit .= " 
    210     --> 
    211     </script>"; 
     210    --> 
     211    </script>"; 
    212212 
    213213$iNameIndex = 12; 
     
    237237            'enctype' => 'multipart/form-data', 
    238238        ), 
    239         'inputs' => array (                         
     239        'inputs' => array ( 
    240240            'Name' => array( 
    241241                'type' => 'text', 
     
    265265                'value' => $aItem['Link'], 
    266266                'attrs' => array() 
    267             ),             
     267            ), 
    268268            'Picture' => array( 
    269269                'type' => 'text', 
     
    319319                        'onclick' => 'javascript:saveItem(' . $aItem['ID'] . ');' 
    320320                    ) 
    321                 ),                 
     321                ), 
    322322                array( 
    323323                    'type' => 'button', 
     
    328328                    ) 
    329329                ) 
    330             ),                 
     330            ), 
    331331        ) 
    332332    ); 
    333      
     333 
    334334    foreach($aForm['inputs'] as $sKey => $aInput) 
    335335        if(in_array($aInput['type'], array('text', 'checkbox')) && !$aItem['Editable']) 
     
    342342 
    343343    $oForm = new BxTemplFormView($aForm); 
    344     return PopupBox('tmc_edit_popup', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
     344    return PopupBox('tmc_edit_popup', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); 
    345345} 
    346346 
    347347function createNewElement( $type, $source ) { 
    348     global $oMenu; 
    349      
    350     if( $source ) { 
    351         $sourceActive = db_value( "SELECT `Active` FROM `sys_menu_top` WHERE `ID`='{$source}'" ); 
    352         if( !$sourceActive ) { 
    353             //convert to active 
    354             db_res( "UPDATE `sys_menu_top` SET `Active`=1, `Type`='{$type}' WHERE `ID`='{$source}'" ); 
    355             $newID = $source; 
    356         } else { 
    357             //create from source 
    358             db_res( "INSERT INTO `sys_menu_top` 
    359                         ( `Name`, `Caption`, `Link`, `Visible`, `Target`, `Onclick`, `Check`, `Type` ) 
    360                     SELECT 
    361                           `Name`, `Caption`, `Link`, `Visible`, `Target`, `Onclick`, `Check`, '{$type}' 
    362                     FROM `sys_menu_top` 
    363                     WHERE `ID`='{$source}'" ); 
    364             $newID = db_last_id(); 
    365         } 
    366     } else { 
    367         //create new 
    368         db_res( "INSERT INTO `sys_menu_top` ( `Name`, `Type` ) VALUES ( 'NEW ITEM', '{$type}' )" ); 
    369         $newID = db_last_id(); 
    370     } 
    371      
    372     $oMenu -> compile(); 
    373     return $newID; 
     348    global $oMenu; 
     349 
     350    if( $source ) { 
     351        $sourceActive = db_value( "SELECT `Active` FROM `sys_menu_top` WHERE `ID`='{$source}'" ); 
     352        if( !$sourceActive ) { 
     353            //convert to active 
     354            db_res( "UPDATE `sys_menu_top` SET `Active`=1, `Type`='{$type}' WHERE `ID`='{$source}'" ); 
     355            $newID = $source; 
     356        } else { 
     357            //create from source 
     358            db_res( "INSERT INTO `sys_menu_top` 
     359                        ( `Name`, `Caption`, `Link`, `Visible`, `Target`, `Onclick`, `Check`, `Type` ) 
     360                    SELECT 
     361                          `Name`, `Caption`, `Link`, `Visible`, `Target`, `Onclick`, `Check`, '{$type}' 
     362                    FROM `sys_menu_top` 
     363                    WHERE `ID`='{$source}'" ); 
     364            $newID = db_last_id(); 
     365        } 
     366    } else { 
     367        //create new 
     368        db_res( "INSERT INTO `sys_menu_top` ( `Name`, `Type` ) VALUES ( 'NEW ITEM', '{$type}' )" ); 
     369        $newID = db_last_id(); 
     370    } 
     371 
     372    $oMenu -> compile(); 
     373    return $newID; 
    374374} 
    375375 
    376376function echoMenuEditMsg( $text, $color = 'black' ) { 
    377     echo <<<EOF 
     377    echo <<<EOF 
    378378<div onclick="hideEditForm();" style="color:{$color};text-align:center;">{$text}</div> 
    379379<script type="text/javascript">setTimeout( 'hideEditForm();', 1000 )</script> 
     
    382382 
    383383function saveItem( $id, $aItem ) { 
    384     global $oMenu; 
    385      
    386     $sSavedC = _t('_Saved'); 
    387     $sItemNotFoundC = _t('_adm_mbuilder_Item_not_found'); 
    388     $sItemNonEditableC = _t('_adm_mbuilder_Item_is_non_editable'); 
    389      
    390     $aOldItem = db_arr( "SELECT * FROM `sys_menu_top` WHERE `ID`='{$id}'" ); 
    391      
    392     if(!$aOldItem) 
    393         return array('code' => 2, 'message' => $sItemNotFoundC); 
    394  
    395     if((int)$aOldItem['Editable'] != 1) 
    396         return array('code' => 3, 'message' => $sItemNonEditableC); 
    397      
    398     $sQuerySet = ''; 
    399     foreach( $aItem as $field => $value ) 
    400         $sQuerySet .= ", `{$field}`='" . process_db_input( $value ) ."'"; 
    401      
    402     $sQuerySet = substr( $sQuerySet, 1 ); 
    403      
    404     $sQuery = "UPDATE `sys_menu_top` SET {$sQuerySet} WHERE `ID` = '{$id}'"; 
    405  
    406     db_res( $sQuery ); 
    407     $oMenu -> compile(); 
    408  
    409     return array('code' => 0, 'message' => $sSavedC, 'timer' => 3); 
     384    global $oMenu; 
     385 
     386    $sSavedC = _t('_Saved'); 
     387    $sItemNotFoundC = _t('_adm_mbuilder_Item_not_found'); 
     388    $sItemNonEditableC = _t('_adm_mbuilder_Item_is_non_editable'); 
     389 
     390    $aOldItem = db_arr( "SELECT * FROM `sys_menu_top` WHERE `ID`='{$id}'" ); 
     391 
     392    if(!$aOldItem) 
     393        return array('code' => 2, 'message' => $sItemNotFoundC); 
     394 
     395    if((int)$aOldItem['Editable'] != 1) 
     396        return array('code' => 3, 'message' => $sItemNonEditableC); 
     397 
     398    $sQuerySet = ''; 
     399    foreach( $aItem as $field => $value ) 
     400        $sQuerySet .= ", `{$field}`='" . process_db_input( $value ) ."'"; 
     401 
     402    $sQuerySet = substr( $sQuerySet, 1 ); 
     403 
     404    $sQuery = "UPDATE `sys_menu_top` SET {$sQuerySet} WHERE `ID` = '{$id}'"; 
     405 
     406    db_res( $sQuery ); 
     407    $oMenu -> compile(); 
     408 
     409    return array('code' => 0, 'message' => $sSavedC, 'timer' => 3); 
    410410} 
    411411 
    412412function updateLangFile( $key, $string ) { 
    413     $langName = getParam( 'lang_default' ); 
    414     $langID = db_value( "SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = '" . addslashes( $langName ) . "'" ); 
    415      
    416     $keyID = db_value( "SELECT `ID` FROM `sys_localization_keys` WHERE `Key` = '" . process_db_input( $key ) . "'" ); 
    417     if( $keyID ) { 
    418         db_res( "UPDATE `sys_localization_strings` SET `String` = '" .process_db_input( $string ) . "' WHERE `IDKey`='{$keyID}' AND `IDLanguage`='{$langID}'" ); 
    419     } else { 
    420         db_res( "INSERT INTO `sys_localization_keys` SET `IDCategory` = 2, `Key` = '" . process_db_input( $key ) . "'" ); 
    421         db_res( "INSERT INTO `sys_localization_strings` SET `IDKey` = " . db_last_id() . ", `IDLanguage` = '{$langID}', `String` = '" .process_db_input( $string ) . "'" ); 
    422     } 
    423      
    424     compileLanguage($langID); 
     413    $langName = getParam( 'lang_default' ); 
     414    $langID = db_value( "SELECT `ID` FROM `sys_localization_languages` WHERE `Name` = '" . addslashes( $langName ) . "'" ); 
     415 
     416    $keyID = db_value( "SELECT `ID` FROM `sys_localization_keys` WHERE `Key` = '" . process_db_input( $key ) . "'" ); 
     417    if( $keyID ) { 
     418        db_res( "UPDATE `sys_localization_strings` SET `String` = '" .process_db_input( $string ) . "' WHERE `IDKey`='{$keyID}' AND `IDLanguage`='{$langID}'" ); 
     419    } else { 
     420        db_res( "INSERT INTO `sys_localization_keys` SET `IDCategory` = 2, `Key` = '" . process_db_input( $key ) . "'" ); 
     421        db_res( "INSERT INTO `sys_localization_strings` SET `IDKey` = " . db_last_id() . ", `IDLanguage` = '{$langID}', `String` = '" .process_db_input( $string ) . "'" ); 
     422    } 
     423 
     424    compileLanguage($langID); 
    425425} 
    426426 
    427427function saveOrders( $sTop, $aCustom ) { 
    428     global $oMenu; 
    429      
    430     db_res( "UPDATE `sys_menu_top` SET `Order` = 0, `Parent` = 0" ); 
    431      
    432     $sTop = trim( $sTop, ' ,' ); 
    433     $aTopIDs = explode( ',', $sTop ); 
    434     foreach( $aTopIDs as $iOrd => $iID ) { 
    435         $iID = trim( $iID, ' ,' ); 
    436         $iID = (int)$iID; 
    437          
    438         if( !$iID ) 
    439             continue; 
    440          
    441         db_res( "UPDATE `sys_menu_top` SET `Order` = '{$iOrd}', `Type` = 'top' WHERE `ID` = '{$iID}'" ); 
    442     } 
    443      
    444     foreach( $aCustom as $iParent => $sCustom ) { 
    445         $iParent = (int)$iParent; 
    446         $sCustom = trim( $sCustom, ' ,' ); 
    447         $aCustomIDs = explode( ',', $sCustom ); 
    448         foreach( $aCustomIDs as $iOrd => $iID ) { 
    449             $iID = trim( $iID, ' ,' ); 
    450             $iID = (int)$iID; 
    451              
    452             if( !$iID ) 
    453                 continue; 
    454              
    455             db_res( "UPDATE `sys_menu_top` SET `Order` = '{$iOrd}', `Type` = 'custom', `Parent`='{$iParent}' WHERE `ID` = '{$iID}'" ); 
    456         } 
    457     } 
    458     $oMenu -> compile(); 
     428    global $oMenu; 
     429 
     430    db_res( "UPDATE `sys_menu_top` SET `Order` = 0, `Parent` = 0" ); 
     431 
     432    $sTop = trim( $sTop, ' ,' ); 
     433    $aTopIDs = explode( ',', $sTop ); 
     434    foreach( $aTopIDs as $iOrd => $iID ) { 
     435        $iID = trim( $iID, ' ,' ); 
     436        $iID = (int)$iID; 
     437 
     438        if( !$iID ) 
     439            continue; 
     440 
     441        db_res( "UPDATE `sys_menu_top` SET `Order` = '{$iOrd}', `Type` = 'top' WHERE `ID` = '{$iID}'" ); 
     442    } 
     443 
     444    foreach( $aCustom as $iParent => $sCustom ) { 
     445        $iParent = (int)$iParent; 
     446        $sCustom = trim( $sCustom, ' ,' ); 
     447        $aCustomIDs = explode( ',', $sCustom ); 
     448        foreach( $aCustomIDs as $iOrd => $iID ) { 
     449            $iID = trim( $iID, ' ,' ); 
     450            $iID = (int)$iID; 
     451 
     452            if( !$iID ) 
     453                continue; 
     454 
     455            db_res( "UPDATE `sys_menu_top` SET `Order` = '{$iOrd}', `Type` = 'custom', `Parent`='{$iParent}' WHERE `ID` = '{$iID}'" ); 
     456        } 
     457    } 
     458    $oMenu -> compile(); 
    459459} 
    460460 
  • trunk/administration/notifies.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3838$logged['admin'] = member_auth(1, true, true); 
    3939 
    40 if($_POST['queue_message'] && $_POST['msgs_id'])     
    41     $sActionResult = QueueMessage();     
     40if($_POST['queue_message'] && $_POST['msgs_id']) 
     41    $sActionResult = QueueMessage(); 
    4242if ($_POST['add_message']) 
    43     $action = 'add'; 
     43    $action = 'add'; 
    4444if($_POST['delete_message'] && $_POST['msgs_id']) 
    4545    $sActionResult = DeleteMessage() ? _t('_adm_mmail_Message_was_deleted') : _t('_adm_mmail_Message_was_not_deleted'); 
    4646if($_POST['preview_message'] && $_POST['msgs_id']) 
    47     $action = 'preview'; 
     47    $action = 'preview'; 
    4848if(bx_get('action') == 'empty' ) 
    4949    $sActionResult = EmptyQueue() ? _t('_adm_mmail_Queue_empty') : _t('_adm_mmail_Queue_emptying_failed'); 
     
    5656); 
    5757 
    58 $_page_cont[$iNameIndex] = array(     
     58$_page_cont[$iNameIndex] = array( 
    5959    'page_code_status' => PrintStatus($sActionResult), 
    6060    'page_code_new_message' => getEmailMessage($action), 
     
    6767 
    6868function PrintStatus($sActionResult) { 
    69     $sSubjC = _t('_Subject'); 
    70     $sEmailsC = _t('_adm_mmail_emails'); 
    71     $sEmptyQueueC = _t('_adm_mmail_Empty_Queue'); 
    72     $sCupidStatusC = _t('_adm_mmail_Cupid_mails_status'); 
    73  
    74     $sSingleEmailsTRs = ''; 
    75  
    76     // Select count of emails in queue per one message   
    77     $iCount = (int)$GLOBALS['MySQL']->getOne("SELECT COUNT(`id`) AS `count` FROM `sys_sbs_queue`"); 
    78     if ($iCount <= 0) 
    79         $sSingleEmailsTRs .= "<tr><td align=center><b><font color=red>" . _t('_adm_mmail_no_emails_in_queue') . "</font></b></td></tr>"; 
    80     else 
    81        $sSingleEmailsTRs .= "<tr><td align=center>" . _t('_adm_mmail_mails_in_queue', $iCount) . "</td></tr>";       
    82  
    83     $sEmptyQueueTable = ''; 
    84     // If queue is not empty then show link to clear it 
    85     if($iCount > 0) { 
    86         $sEmptyQueueTable = "<hr> 
    87         <table class=\"text\" width=\"50%\" style=\"height: 30px;\"> 
    88             <tr class=\"table\"> 
    89                 <td align=\"center\" colspan=\"3\"> 
    90                     <a href=\"" . BX_DOL_URL_ADMIN . "notifies.php?action=empty\">{$sEmptyQueueC}</a> 
    91                 </td> 
    92             </tr> 
    93         </table> 
    94         <hr>"; 
    95     } 
     69    $sSubjC = _t('_Subject'); 
     70    $sEmailsC = _t('_adm_mmail_emails'); 
     71    $sEmptyQueueC = _t('_adm_mmail_Empty_Queue'); 
     72    $sCupidStatusC = _t('_adm_mmail_Cupid_mails_status'); 
     73 
     74    $sSingleEmailsTRs = ''; 
     75 
     76    // Select count of emails in queue per one message 
     77    $iCount = (int)$GLOBALS['MySQL']->getOne("SELECT COUNT(`id`) AS `count` FROM `sys_sbs_queue`"); 
     78    if ($iCount <= 0) 
     79        $sSingleEmailsTRs .= "<tr><td align=center><b><font color=red>" . _t('_adm_mmail_no_emails_in_queue') . "</font></b></td></tr>"; 
     80    else 
     81       $sSingleEmailsTRs .= "<tr><td align=center>" . _t('_adm_mmail_mails_in_queue', $iCount) . "</td></tr>"; 
     82 
     83    $sEmptyQueueTable = ''; 
     84    // If queue is not empty then show link to clear it 
     85    if($iCount > 0) { 
     86        $sEmptyQueueTable = "<hr> 
     87        <table class=\"text\" width=\"50%\" style=\"height: 30px;\"> 
     88            <tr class=\"table\"> 
     89                <td align=\"center\" colspan=\"3\"> 
     90                    <a href=\"" . BX_DOL_URL_ADMIN . "notifies.php?action=empty\">{$sEmptyQueueC}</a> 
     91                </td> 
     92            </tr> 
     93        </table> 
     94        <hr>"; 
     95    } 
    9696 
    9797    ob_start(); 
     
    9999<div style="margin:9px;"> 
    100100    <center> 
    101         <table cellspacing=2 cellpadding=2 class=text border=0> 
    102             <tr class=header align="center"><td><?=_t('_adm_mmail_Queue_status');?>:</td></tr> 
    103             <?=$sSingleEmailsTRs;?> 
    104         </table> 
    105         <?=$sEmptyQueueTable;?> 
     101        <table cellspacing=2 cellpadding=2 class=text border=0> 
     102            <tr class=header align="center"><td><?=_t('_adm_mmail_Queue_status');?>:</td></tr> 
     103            <?=$sSingleEmailsTRs;?> 
     104        </table> 
     105        <?=$sEmptyQueueTable;?> 
    106106    </center> 
    107107</div> 
     
    109109    $sResult = ob_get_clean(); 
    110110 
    111     if(!empty($sActionResult)) 
    112        $sResult = MsgBox($sActionResult, 3) . $sResult; 
    113  
    114     return DesignBoxContent(_t('_Status'), $sResult, 1); 
     111    if(!empty($sActionResult)) 
     112       $sResult = MsgBox($sActionResult, 3) . $sResult; 
     113 
     114    return DesignBoxContent(_t('_Status'), $sResult, 1); 
    115115} 
    116116 
    117117function getAllMessagesBox() { 
    118     $aMessages = $GLOBALS['MySQL']->getAll("SELECT `id`, `subject`, (`id`=". (int)$_POST['msgs_id'] ." OR `subject`='". process_db_input($_POST['Subj']) ."' ) AS `selected` FROM `sys_sbs_messages`"); 
    119      
    120     $sAllMessagesOptions = ''; 
    121     foreach($aMessages as $aMessage) 
    122         $sAllMessagesOptions .= "<option value=\"" . $aMessage['id'] . "\" " . ($aMessage['selected'] ? "selected=\"selected\"" : "") . ">" . $aMessage['subject'] . "</option>"; 
    123      
     118    $aMessages = $GLOBALS['MySQL']->getAll("SELECT `id`, `subject`, (`id`=". (int)$_POST['msgs_id'] ." OR `subject`='". process_db_input($_POST['Subj']) ."' ) AS `selected` FROM `sys_sbs_messages`"); 
     119 
     120    $sAllMessagesOptions = ''; 
     121    foreach($aMessages as $aMessage) 
     122        $sAllMessagesOptions .= "<option value=\"" . $aMessage['id'] . "\" " . ($aMessage['selected'] ? "selected=\"selected\"" : "") . ">" . $aMessage['subject'] . "</option>"; 
     123 
    124124    ob_start(); 
    125125?> 
    126126<form name="form_messages" method="POST" action="<?=$GLOBALS['site']['url_admin'] . 'notifies.php';?>"> 
    127     <input type="hidden" name="action" value="view"> 
    128     <center class="text"><?= _t('_Messages'); ?>:&nbsp; 
    129         <select name=msgs_id onChange="javascript: document.forms['form_messages'].submit();"> 
    130             <option value=0><?=_t('_None');?></option> 
    131             <?=$sAllMessagesOptions;?> 
    132         </select> 
    133     </center> 
     127    <input type="hidden" name="action" value="view"> 
     128    <center class="text"><?= _t('_Messages'); ?>:&nbsp; 
     129        <select name=msgs_id onChange="javascript: document.forms['form_messages'].submit();"> 
     130            <option value=0><?=_t('_None');?></option> 
     131            <?=$sAllMessagesOptions;?> 
     132        </select> 
     133    </center> 
    134134</form> 
    135135<? 
    136136    $sResult = ob_get_clean(); 
    137137 
    138     return DesignBoxContent(_t('_adm_mmail_All_Messages'), '<div style="margin:9px;">' . $sResult . '</div>', 1); 
     138    return DesignBoxContent(_t('_adm_mmail_All_Messages'), '<div style="margin:9px;">' . $sResult . '</div>', 1); 
    139139} 
    140140 
    141141function getEmailMessage($sAction) { 
    142     $sErrorC = _t('_Error Occured'); 
    143     $sApplyChangesC = _t('_Submit'); 
    144     $sSubjectC = _t('_Subject'); 
    145     $sBodyC = _t('_adm_mmail_Body'); 
    146     $sTextBodyC = _t('_adm_mmail_Text_email_body'); 
    147     $sPreviewMessageC = _t('_Preview'); 
    148     $sDeleteC = _t('_Delete'); 
    149  
    150     $sMessageID = (int)$_POST['msgs_id']; 
    151  
    152     $sSubject = $sBody = ""; 
    153     if($_POST['body'] && $_POST['action'] != 'delete' ) { 
    154         $sSubject = process_pass_data( $_POST['subject'] ); 
    155         $sBody = process_pass_data( $_POST['body'] );        
    156     } elseif ( $sMessageID ) 
    157         list($sSubject, $sBody) = $GLOBALS['MySQL']->getRow("SELECT `subject`, `body` FROM `sys_sbs_messages` WHERE `id`='". $sMessageID . "' LIMIT 1", MYSQL_NUM); 
    158  
    159     $sSubject = htmlspecialchars($sSubject);     
    160  
    161     $aForm = array( 
    162         'form_attrs' => array( 
    163             'name' => 'sys_sbs_messages', 
    164             'action' => $GLOBALS['site']['url_admin'] . 'notifies.php', 
    165             'method' => 'post', 
    166         ), 
    167         'params' => array ( 
    168             'db' => array( 
    169                 'table' => 'sys_sbs_messages', 
    170                 'key' => 'ID', 
    171                 'submit_name' => 'add_message', 
    172             ), 
    173         ), 
    174         'inputs' => array( 
    175             'subject' => array( 
    176                 'type' => 'text', 
    177                 'name' => 'subject', 
    178                 'value' => $sSubject, 
    179                 'caption' => $sSubjectC, 
    180                 'required' => true, 
    181                 'checker' => array ( 
    182                     'func' => 'length', 
    183                     'params' => array(2,128), 
    184                     'error' => $sErrorC, 
    185                 ), 
    186                 'db' => array ( 
    187                     'pass' => 'Xss', 
    188                 ), 
    189             ), 
    190             'body' => array( 
    191                 'type' => 'textarea', 
    192                 'name' => 'body', 
    193                 'value' => $sBody, 
    194                 'caption' => $sBodyC, 
    195                 'required' => true, 
    196                 'html' => 1, 
    197                 'checker' => array ( 
    198                     'func' => 'length', 
    199                     'params' => array(10,32000), 
    200                     'error' => $sErrorC, 
    201                 ),                     
    202                 'db' => array ( 
    203                     'pass' => 'XssHtml',  
    204                 ),                     
    205             ), 
    206             'msgs_id' => array( 
    207                 'type' => 'hidden', 
    208                 'name' => 'msgs_id', 
    209                 'value' => $sMessageID, 
    210             ), 
    211             'control' => array ( 
     142    $sErrorC = _t('_Error Occured'); 
     143    $sApplyChangesC = _t('_Submit'); 
     144    $sSubjectC = _t('_Subject'); 
     145    $sBodyC = _t('_adm_mmail_Body'); 
     146    $sTextBodyC = _t('_adm_mmail_Text_email_body'); 
     147    $sPreviewMessageC = _t('_Preview'); 
     148    $sDeleteC = _t('_Delete'); 
     149 
     150    $sMessageID = (int)$_POST['msgs_id']; 
     151 
     152    $sSubject = $sBody = ""; 
     153    if($_POST['body'] && $_POST['action'] != 'delete' ) { 
     154        $sSubject = process_pass_data( $_POST['subject'] ); 
     155        $sBody = process_pass_data( $_POST['body'] ); 
     156    } elseif ( $sMessageID ) 
     157        list($sSubject, $sBody) = $GLOBALS['MySQL']->getRow("SELECT `subject`, `body` FROM `sys_sbs_messages` WHERE `id`='". $sMessageID . "' LIMIT 1", MYSQL_NUM); 
     158 
     159    $sSubject = htmlspecialchars($sSubject); 
     160 
     161    $aForm = array( 
     162        'form_attrs' => array( 
     163            'name' => 'sys_sbs_messages', 
     164            'action' => $GLOBALS['site']['url_admin'] . 'notifies.php', 
     165            'method' => 'post', 
     166        ), 
     167        'params' => array ( 
     168            'db' => array( 
     169                'table' => 'sys_sbs_messages', 
     170                'key' => 'ID', 
     171                'submit_name' => 'add_message', 
     172            ), 
     173        ), 
     174        'inputs' => array( 
     175            'subject' => array( 
     176                'type' => 'text', 
     177                'name' => 'subject', 
     178                'value' => $sSubject, 
     179                'caption' => $sSubjectC, 
     180                'required' => true, 
     181                'checker' => array ( 
     182                    'func' => 'length', 
     183                    'params' => array(2,128), 
     184                    'error' => $sErrorC, 
     185                ), 
     186                'db' => array ( 
     187                    'pass' => 'Xss', 
     188                ), 
     189            ), 
     190            'body' => array( 
     191                'type' => 'textarea', 
     192                'name' => 'body', 
     193                'value' => $sBody, 
     194                'caption' => $sBodyC, 
     195                'required' => true, 
     196                'html' => 1, 
     197                'checker' => array ( 
     198                    'func' => 'length', 
     199                    'params' => array(10,32000), 
     200                    'error' => $sErrorC, 
     201                ), 
     202                'db' => array ( 
     203                    'pass' => 'XssHtml', 
     204                ), 
     205            ), 
     206            'msgs_id' => array( 
     207                'type' => 'hidden', 
     208                'name' => 'msgs_id', 
     209                'value' => $sMessageID, 
     210            ), 
     211            'control' => array ( 
    212212                'type' => 'input_set', 
    213213                array( 
    214                     'type' => 'submit', 
    215                     'name' => 'add_message', 
    216                     'caption' => $sApplyChangesC, 
    217                     'value' => $sApplyChangesC, 
    218                 ), 
    219                 array( 
    220                     'type' => 'submit', 
    221                     'name' => 'preview_message', 
    222                     'caption' => $sPreviewMessageC, 
    223                     'value' => $sPreviewMessageC, 
    224                 ), 
    225             ) 
    226         ), 
    227     ); 
    228     if($sMessageID) { 
    229         $aForm['inputs']['control'][] = array ( 
    230             'type' => 'submit', 
    231             'name' => 'delete_message', 
    232             'caption' => $sDeleteC, 
    233             'value' => $sDeleteC, 
    234         ); 
    235     } 
    236  
    237     $sResult = ''; 
    238     $oForm = new BxTemplFormView($aForm); 
    239     $oForm->initChecker(); 
    240     if ($oForm->isSubmittedAndValid()) { 
    241         if ($sAction == 'add') { 
    242             if ($sMessageID > 0) { 
    243                 $oForm->update($sMessageID); 
    244             } else { 
    245                 $sMessageID = $oForm->insert(); 
    246             } 
    247         } 
    248  
    249         $sResult = $sMessageID > 0 ? MsgBox(_t('_Success'), 3) : MsgBox($sErrorC); 
    250     } 
    251  
    252     return DesignBoxContent(_t('_adm_mmail_Email_message'), '<div style="margin:9px;">' . $sResult . $oForm->getCode() . '</div>', 1); 
     214                    'type' => 'submit', 
     215                    'name' => 'add_message', 
     216                    'caption' => $sApplyChangesC, 
     217                    'value' => $sApplyChangesC, 
     218                ), 
     219                array( 
     220                    'type' => 'submit', 
     221                    'name' => 'preview_message', 
     222                    'caption' => $sPreviewMessageC, 
     223                    'value' => $sPreviewMessageC, 
     224                ), 
     225            ) 
     226        ), 
     227    ); 
     228    if($sMessageID) { 
     229        $aForm['inputs']['control'][] = array ( 
     230            'type' => 'submit', 
     231            'name' => 'delete_message', 
     232            'caption' => $sDeleteC, 
     233            'value' => $sDeleteC, 
     234        ); 
     235    } 
     236 
     237    $sResult = ''; 
     238    $oForm = new BxTemplFormView($aForm); 
     239    $oForm->initChecker(); 
     240    if ($oForm->isSubmittedAndValid()) { 
     241        if ($sAction == 'add') { 
     242            if ($sMessageID > 0) { 
     243                $oForm->update($sMessageID); 
     244            } else { 
     245                $sMessageID = $oForm->insert(); 
     246            } 
     247        } 
     248 
     249        $sResult = $sMessageID > 0 ? MsgBox(_t('_Success'), 3) : MsgBox($sErrorC); 
     250    } 
     251 
     252    return DesignBoxContent(_t('_adm_mmail_Email_message'), '<div style="margin:9px;">' . $sResult . $oForm->getCode() . '</div>', 1); 
    253253} 
    254254 
    255255function getQueueMessage() { 
    256     global $aPreValues; 
    257  
    258     if ( $_POST['msgs_id'] ) { 
    259         $aSexValues = getFieldValues('Sex'); 
    260         foreach($aSexValues as $sKey => $sValue) 
    261             $aSexValues[$sKey] = _t($sValue); 
    262   
    263         $aStartAgesOptions = array(); 
    264         $aEndAgesOptions = array(); 
    265         $gl_search_start_age = (int)getParam('search_start_age'); 
    266         $gl_search_end_age = (int)getParam('search_end_age'); 
    267         for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ ) { 
    268             $aStartAgesOptions[$i] = $i; 
    269         } 
    270         for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ ) { 
    271             $aEndAgesOptions[$i] = $i; 
    272         } 
    273  
    274         $aCountryOptions = array('all' => _t('_All')); 
    275         foreach ( $aPreValues['Country'] as $key => $value ) { 
    276             $aCountryOptions[$key] = _t($value['LKey']); 
    277         } 
    278  
    279         $aMembershipOptions = array('all' => _t('_All')); 
    280         $memberships_arr = getMemberships(); 
    281         foreach ( $memberships_arr as $membershipID => $membershipName ) { 
    282             if ($membershipID == MEMBERSHIP_ID_NON_MEMBER) continue; 
    283             $aMembershipOptions[$membershipID] = $membershipName; 
    284         } 
    285  
    286         $iRecipientMembers = (int)$GLOBALS['MySQL']->getOne("SELECT COUNT(`ID`) AS `count` FROM `Profiles` WHERE `Status`<>'Unconfirmed' AND `EmailNotify` = 1 LIMIT 1"); 
    287         $aForm = array( 
    288             'form_attrs' => array( 
    289                 'name' => 'form_queue', 
    290                 'class' => 'form_queue_form', 
    291                 'action' => $GLOBALS['site']['url_admin'] . 'notifies.php', 
    292                 'method' => 'post', 
    293             ), 
    294             'inputs' => array ( 
    295                 'Send1' => array( 
    296                     'type' => 'checkbox', 
    297                     'name' => 'send_to_subscribers', 
    298                     'label' => _t('_adm_mmail_Send_to_subscribers'), 
    299                     'value' => 'non', 
    300                     'checked' => true 
    301                 ), 
    302                 'Send2' => array( 
    303                     'type' => 'checkbox', 
    304                     'name' => 'send_to_members', 
    305                     'label' => _t('_adm_mmail_Send_to_members'), 
    306                     'value' => 'memb', 
    307                     'checked' => true, 
    308                     'attrs' => array( 
    309                         'onClick' => 'setControlsState();', 
    310                     ), 
    311                     'info' => _t('_adm_mmail_Send_to_members_info', $iRecipientMembers), 
    312                 ), 
    313                 'sex' => array ( 
    314                     'type' => 'checkbox_set', 
    315                     'name' => 'sex', 
    316                     'values' => $aSexValues, 
    317                     'value' => array_keys($aSexValues) 
    318                 ), 
    319                 'StartAge' => array ( 
    320                     'type' => 'select', 
    321                     'name' => 'age_start', 
    322                     'caption' => _t('_adm_mmail_Age') . ' ' . _t('_from'), 
    323                     'values' => $aStartAgesOptions, 
    324                     'value' => $gl_search_start_age, 
    325                 ), 
    326                 'EndAge' => array ( 
    327                     'type' => 'select', 
    328                     'name' => 'age_end', 
    329                     'caption' => _t('_to'), 
    330                     'values' => $aEndAgesOptions, 
    331                     'value' => $gl_search_end_age, 
    332                 ), 
    333                 'Country' => array ( 
    334                     'type' => 'select', 
    335                     'name' => 'country', 
    336                     'caption' => _t('_Country'), 
    337                     'values' => $aCountryOptions, 
    338                     'value' => 'all', 
    339                 ), 
    340                 'Membership' => array ( 
    341                     'type' => 'select', 
    342                     'name' => 'membership', 
    343                     'caption' => _t('_adm_mmi_membership_levels'), 
    344                     'values' => $aMembershipOptions, 
    345                     'value' => 'all', 
    346                 ), 
    347                 'msgs_id' => array ( 
    348                     'type' => 'hidden', 
    349                     'name' => 'msgs_id', 
    350                     'value' => (int)$_POST['msgs_id'], 
    351                 ), 
    352                 'submit' => array ( 
    353                     'type' => 'submit', 
    354                     'name' => 'queue_message', 
    355                     'value' => _t('_Submit'), 
    356                 ) 
    357             ) 
    358         ); 
    359  
    360         $oForm = new BxTemplFormView($aForm); 
     256    global $aPreValues; 
     257 
     258    if ( $_POST['msgs_id'] ) { 
     259        $aSexValues = getFieldValues('Sex'); 
     260        foreach($aSexValues as $sKey => $sValue) 
     261            $aSexValues[$sKey] = _t($sValue); 
     262 
     263        $aStartAgesOptions = array(); 
     264        $aEndAgesOptions = array(); 
     265        $gl_search_start_age = (int)getParam('search_start_age'); 
     266        $gl_search_end_age = (int)getParam('search_end_age'); 
     267        for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ ) { 
     268            $aStartAgesOptions[$i] = $i; 
     269        } 
     270        for ( $i = $gl_search_start_age ; $i <= $gl_search_end_age ; $i++ ) { 
     271            $aEndAgesOptions[$i] = $i; 
     272        } 
     273 
     274        $aCountryOptions = array('all' => _t('_All')); 
     275        foreach ( $aPreValues['Country'] as $key => $value ) { 
     276            $aCountryOptions[$key] = _t($value['LKey']); 
     277        } 
     278 
     279        $aMembershipOptions = array('all' => _t('_All')); 
     280        $memberships_arr = getMemberships(); 
     281        foreach ( $memberships_arr as $membershipID => $membershipName ) { 
     282            if ($membershipID == MEMBERSHIP_ID_NON_MEMBER) continue; 
     283            $aMembershipOptions[$membershipID] = $membershipName; 
     284        } 
     285 
     286        $iRecipientMembers = (int)$GLOBALS['MySQL']->getOne("SELECT COUNT(`ID`) AS `count` FROM `Profiles` WHERE `Status`<>'Unconfirmed' AND `EmailNotify` = 1 LIMIT 1"); 
     287        $aForm = array( 
     288            'form_attrs' => array( 
     289                'name' => 'form_queue', 
     290                'class' => 'form_queue_form', 
     291                'action' => $GLOBALS['site']['url_admin'] . 'notifies.php', 
     292                'method' => 'post', 
     293            ), 
     294            'inputs' => array ( 
     295                'Send1' => array( 
     296                    'type' => 'checkbox', 
     297                    'name' => 'send_to_subscribers', 
     298                    'label' => _t('_adm_mmail_Send_to_subscribers'), 
     299                    'value' => 'non', 
     300                    'checked' => true 
     301                ), 
     302                'Send2' => array( 
     303                    'type' => 'checkbox', 
     304                    'name' => 'send_to_members', 
     305                    'label' => _t('_adm_mmail_Send_to_members'), 
     306                    'value' => 'memb', 
     307                    'checked' => true, 
     308                    'attrs' => array( 
     309                        'onClick' => 'setControlsState();', 
     310                    ), 
     311                    'info' => _t('_adm_mmail_Send_to_members_info', $iRecipientMembers), 
     312                ), 
     313                'sex' => array ( 
     314                    'type' => 'checkbox_set', 
     315                    'name' => 'sex', 
     316                    'values' => $aSexValues, 
     317                    'value' => array_keys($aSexValues) 
     318                ), 
     319                'StartAge' => array ( 
     320                    'type' => 'select', 
     321                    'name' => 'age_start', 
     322                    'caption' => _t('_adm_mmail_Age') . ' ' . _t('_from'), 
     323                    'values' => $aStartAgesOptions, 
     324                    'value' => $gl_search_start_age, 
     325                ), 
     326                'EndAge' => array ( 
     327                    'type' => 'select', 
     328                    'name' => 'age_end', 
     329                    'caption' => _t('_to'), 
     330                    'values' => $aEndAgesOptions, 
     331                    'value' => $gl_search_end_age, 
     332                ), 
     333                'Country' => array ( 
     334                    'type' => 'select', 
     335                    'name' => 'country', 
     336                    'caption' => _t('_Country'), 
     337                    'values' => $aCountryOptions, 
     338                    'value' => 'all', 
     339                ), 
     340                'Membership' => array ( 
     341                    'type' => 'select', 
     342                    'name' => 'membership', 
     343                    'caption' => _t('_adm_mmi_membership_levels'), 
     344                    'values' => $aMembershipOptions, 
     345                    'value' => 'all', 
     346                ), 
     347                'msgs_id' => array ( 
     348                    'type' => 'hidden', 
     349                    'name' => 'msgs_id', 
     350                    'value' => (int)$_POST['msgs_id'], 
     351                ), 
     352                'submit' => array ( 
     353                    'type' => 'submit', 
     354                    'name' => 'queue_message', 
     355                    'value' => _t('_Submit'), 
     356                ) 
     357            ) 
     358        ); 
     359 
     360        $oForm = new BxTemplFormView($aForm); 
    361361        $sTmplResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('notifies_filter.html', array()); 
    362         return DesignBoxContent(_t('_adm_mmail_Queue_message'), '<div style="margin:9px;">' . $oForm->getCode() . $sTmplResult . '</div>', 1); 
    363     } 
     362        return DesignBoxContent(_t('_adm_mmail_Queue_message'), '<div style="margin:9px;">' . $oForm->getCode() . $sTmplResult . '</div>', 1); 
     363    } 
    364364} 
    365365 
    366366function QueueMessage() { 
    367367    global $MySQL; 
    368      
    369     $iEmails = 0; 
    370     $sReturn = ""; 
    371     $iMsgId = (int)$_POST['msgs_id']; 
    372  
    373     $aOriginalMessage = $MySQL->getRow("SELECT `id`, `subject`, `body` FROM `sys_sbs_messages` WHERE `id`='" . $iMsgId . "' LIMIT 1"); 
    374     if(!is_array($aOriginalMessage) || empty($aOriginalMessage)) { 
    375         return _t('_adm_mmail_Failed_to_queue_emails_X', $iMsgId); 
    376     }    
    377      
    378     //--- Send to all subscribers 
    379     $oEmailTemplates = new BxDolEmailTemplates();    
    380     if($_POST['send_to_subscribers'] == 'non') { 
    381         $sSql = "SELECT 
     368 
     369    $iEmails = 0; 
     370    $sReturn = ""; 
     371    $iMsgId = (int)$_POST['msgs_id']; 
     372 
     373    $aOriginalMessage = $MySQL->getRow("SELECT `id`, `subject`, `body` FROM `sys_sbs_messages` WHERE `id`='" . $iMsgId . "' LIMIT 1"); 
     374    if(!is_array($aOriginalMessage) || empty($aOriginalMessage)) { 
     375        return _t('_adm_mmail_Failed_to_queue_emails_X', $iMsgId); 
     376    } 
     377 
     378    //--- Send to all subscribers 
     379    $oEmailTemplates = new BxDolEmailTemplates(); 
     380    if($_POST['send_to_subscribers'] == 'non') { 
     381        $sSql = "SELECT 
    382382                    `tsu`.`name` AS `user_name`, 
    383383                    `tsu`.`email` AS `user_email`, 
     
    387387                INNER JOIN `sys_sbs_users` AS `tsu` ON `tse`.`subscriber_id`=`tsu`.`id` 
    388388                WHERE 
    389                     `tst`.`unit`='system' AND  
     389                    `tst`.`unit`='system' AND 
    390390                    `tst`.`action`='mass_mailer'"; 
    391391        $aSubscribers = $MySQL->getAll($sSql); 
    392392 
    393         foreach($aSubscribers as $aSubscriber) { 
    394             if(empty($aSubscriber['user_email'])) 
    395                 continue; 
    396  
    397             $aMessage = $oEmailTemplates->parseTemplate($aSubscriber['template_name'], array( 
     393        foreach($aSubscribers as $aSubscriber) { 
     394            if(empty($aSubscriber['user_email'])) 
     395                continue; 
     396 
     397            $aMessage = $oEmailTemplates->parseTemplate($aSubscriber['template_name'], array( 
    398398                'RealName' => $aSubscriber['user_name'], 
    399399                'Email' => $aSubscriber['user_email'], 
    400400                'MessageSubject' => $aOriginalMessage['subject'], 
    401401                'MessageText' => $aOriginalMessage['body'] 
    402             )); 
    403  
    404             $mixedResult = $MySQL->query("INSERT INTO `sys_sbs_queue`(`email`, `subject`, `body`) VALUES('" . $aSubscriber['user_email'] . "', '" . process_db_input($aMessage['subject'], BX_TAGS_STRIP) . "', '" . process_db_input($aMessage['body'], BX_TAGS_VALIDATE) . "')"); 
    405             if($mixedResult === false) { 
    406                 $sReturn .= _t('_adm_mmail_Email_not_added_to_queue_X', $aSubscriber['user_email']); 
    407                 continue; 
    408             } 
    409             $iEmails++; 
    410         } 
    411     } 
    412  
    413     //--- Send to all profiles 
    414     if($_POST['send_to_members'] == 'memb') { 
    415         //--- Sex filter 
    416         $sex_filter_sql = ''; 
    417         if(is_array($_POST['sex']) && !empty($_POST['sex'])) 
    418             $sex_filter_sql = "AND `Sex` IN ('" . implode("','", $_POST['sex']) . "')"; 
    419  
    420         //--- Age filter 
    421         $age_filter_sql = ''; 
    422         $age_start = (int)$_POST['age_start']; 
    423         $age_end = (int)$_POST['age_end']; 
    424         if ( $age_start && $age_end ) { 
    425             $date_start = (int)( date( "Y" ) - $age_start ); 
    426             $date_end = (int)( date( "Y" ) - $age_end - 1 ); 
    427             $date_start = $date_start . date( "-m-d" ); 
    428             $date_end = $date_end . date( "-m-d" ); 
    429             $age_filter_sql = "AND (TO_DAYS(`DateOfBirth`) BETWEEN TO_DAYS('{$date_end}') AND (TO_DAYS('{$date_start}')+1))"; 
    430         } 
    431  
    432         //--- Country filter 
    433         $country_filter_sql = ''; 
    434         if($_POST['country'] != 'all') { 
    435             $country = process_db_input($_POST['country']); 
    436             $country_filter_sql = "AND `Country` = '{$country}'"; 
    437         } 
    438  
    439         //--- Membership filter 
    440         $membershipID = $_POST['membership'] != 'all' ? (int)$_POST['membership'] : -1; 
    441  
    442         $aMembers = $MySQL->getAll("SELECT `ID` AS `id`, `Email` AS `email` FROM `Profiles` WHERE `Status` <> 'Unconfirmed' AND `EmailNotify` = 1 AND (`Couple` = '0' OR `Couple` > `ID`) {$sex_filter_sql} {$age_filter_sql} {$country_filter_sql}"); 
    443         foreach($aMembers as $aMember) { 
    444             if(empty($aMember['email'])) 
    445                 continue; 
    446  
    447             //--- Dynamic membership filter 
    448             $membership_info = getMemberMembershipInfo($aMember['id']); 
    449             if ($membershipID != -1 && $membership_info['ID'] != $membershipID ) 
    450                 continue; 
     402            )); 
     403 
     404            $mixedResult = $MySQL->query("INSERT INTO `sys_sbs_queue`(`email`, `subject`, `body`) VALUES('" . $aSubscriber['user_email'] . "', '" . process_db_input($aMessage['subject'], BX_TAGS_STRIP) . "', '" . process_db_input($aMessage['body'], BX_TAGS_VALIDATE) . "')"); 
     405            if($mixedResult === false) { 
     406                $sReturn .= _t('_adm_mmail_Email_not_added_to_queue_X', $aSubscriber['user_email']); 
     407                continue; 
     408            } 
     409            $iEmails++; 
     410        } 
     411    } 
     412 
     413    //--- Send to all profiles 
     414    if($_POST['send_to_members'] == 'memb') { 
     415        //--- Sex filter 
     416        $sex_filter_sql = ''; 
     417        if(is_array($_POST['sex']) && !empty($_POST['sex'])) 
     418            $sex_filter_sql = "AND `Sex` IN ('" . implode("','", $_POST['sex']) . "')"; 
     419 
     420        //--- Age filter 
     421        $age_filter_sql = ''; 
     422        $age_start = (int)$_POST['age_start']; 
     423        $age_end = (int)$_POST['age_end']; 
     424        if ( $age_start && $age_end ) { 
     425            $date_start = (int)( date( "Y" ) - $age_start ); 
     426            $date_end = (int)( date( "Y" ) - $age_end - 1 ); 
     427            $date_start = $date_start . date( "-m-d" ); 
     428            $date_end = $date_end . date( "-m-d" ); 
     429            $age_filter_sql = "AND (TO_DAYS(`DateOfBirth`) BETWEEN TO_DAYS('{$date_end}') AND (TO_DAYS('{$date_start}')+1))"; 
     430        } 
     431 
     432        //--- Country filter 
     433        $country_filter_sql = ''; 
     434        if($_POST['country'] != 'all') { 
     435            $country = process_db_input($_POST['country']); 
     436            $country_filter_sql = "AND `Country` = '{$country}'"; 
     437        } 
     438 
     439        //--- Membership filter 
     440        $membershipID = $_POST['membership'] != 'all' ? (int)$_POST['membership'] : -1; 
     441 
     442        $aMembers = $MySQL->getAll("SELECT `ID` AS `id`, `Email` AS `email` FROM `Profiles` WHERE `Status` <> 'Unconfirmed' AND `EmailNotify` = 1 AND (`Couple` = '0' OR `Couple` > `ID`) {$sex_filter_sql} {$age_filter_sql} {$country_filter_sql}"); 
     443        foreach($aMembers as $aMember) { 
     444            if(empty($aMember['email'])) 
     445                continue; 
     446 
     447            //--- Dynamic membership filter 
     448            $membership_info = getMemberMembershipInfo($aMember['id']); 
     449            if ($membershipID != -1 && $membership_info['ID'] != $membershipID ) 
     450                continue; 
    451451 
    452452            $aMessage = $oEmailTemplates->parseTemplate('t_AdminEmail', array( 
    453453                'MessageSubject' => $aOriginalMessage['subject'], 
    454454                'MessageText' => $aOriginalMessage['body'] 
    455             ), $aMember['id']); 
    456  
    457             $mixedResult = $MySQL->query("INSERT INTO `sys_sbs_queue`(`email`, `subject`, `body`) VALUES('" . $aMember['email'] . "', '" . process_db_input($aMessage['subject'], BX_TAGS_STRIP) . "', '" . process_db_input($aMessage['body'], BX_TAGS_VALIDATE) . "')"); 
    458             if($mixedResult === false) { 
    459                 $sReturn .= _t('_adm_mmail_Email_not_added_to_queue_X', $aMember['email']); 
    460                 continue; 
    461             } 
    462             $iEmails++; 
    463         } 
    464     } 
    465  
    466     $sReturn .= _t('_adm_mmail_X_emails_was_succ_added_to_queue', (int)$iEmails); 
    467     return $sReturn; 
     455            ), $aMember['id']); 
     456 
     457            $mixedResult = $MySQL->query("INSERT INTO `sys_sbs_queue`(`email`, `subject`, `body`) VALUES('" . $aMember['email'] . "', '" . process_db_input($aMessage['subject'], BX_TAGS_STRIP) . "', '" . process_db_input($aMessage['body'], BX_TAGS_VALIDATE) . "')"); 
     458            if($mixedResult === false) { 
     459                $sReturn .= _t('_adm_mmail_Email_not_added_to_queue_X', $aMember['email']); 
     460                continue; 
     461            } 
     462            $iEmails++; 
     463        } 
     464    } 
     465 
     466    $sReturn .= _t('_adm_mmail_X_emails_was_succ_added_to_queue', (int)$iEmails); 
     467    return $sReturn; 
    468468} 
    469469 
     
    475475 
    476476    $sPreview = '<div style="margin:9px;">' . $aMessage['body'] . '</div>'; 
    477     return DesignBoxContent(_t('_Preview'), $sPreview, 1); 
     477    return DesignBoxContent(_t('_Preview'), $sPreview, 1); 
    478478} 
    479479 
    480480function DeleteMessage() { 
    481     $mixedResult = $GLOBALS['MySQL']->query("DELETE FROM `sys_sbs_messages` WHERE `id`='". (int)$_POST['msgs_id'] . "' LIMIT 1"); 
    482     if($mixedResult === false) 
    483         return $mixedResult; 
    484  
    485     $_POST['msgs_id'] = 0; 
    486     return true; 
     481    $mixedResult = $GLOBALS['MySQL']->query("DELETE FROM `sys_sbs_messages` WHERE `id`='". (int)$_POST['msgs_id'] . "' LIMIT 1"); 
     482    if($mixedResult === false) 
     483        return $mixedResult; 
     484 
     485    $_POST['msgs_id'] = 0; 
     486    return true; 
    487487} 
    488488 
    489489function EmptyQueue() { 
    490     return db_res("TRUNCATE TABLE `sys_sbs_queue`"); 
     490    return db_res("TRUNCATE TABLE `sys_sbs_queue`"); 
    491491} 
    492492 
  • trunk/administration/notify_preview.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
  • trunk/administration/pageBuilder.php

    r15201 r15211  
    4141 
    4242$GLOBALS['oAdmTemplate']->addJsTranslation(array( 
    43     '_adm_btn_Column', '_Are you sure?', 
     43    '_adm_btn_Column', '_Are you sure?', 
    4444)); 
    4545 
  • trunk/administration/phpinfo.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
  • trunk/administration/preValues.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3333 
    3434$aFields = array( 
    35     'Value'  => 'The value stored in the database', 
    36     'LKey'   => 'Primary language key used for displaying', 
    37     'LKey2'  => 'Secondary language key used for displaying in some other places', 
    38     'LKey3'  => 'Miscelaniuos language key used for displaying in some other places.', 
    39     'Extra'  => 'Extra parameter. Used for example as link to profile image for Sex list.', 
    40     'Extra2' => 'Miscelanious extra parameter', 
    41     'Extra3' => 'Miscelanious extra parameter' 
     35    'Value'  => 'The value stored in the database', 
     36    'LKey'   => 'Primary language key used for displaying', 
     37    'LKey2'  => 'Secondary language key used for displaying in some other places', 
     38    'LKey3'  => 'Miscelaniuos language key used for displaying in some other places.', 
     39    'Extra'  => 'Extra parameter. Used for example as link to profile image for Sex list.', 
     40    'Extra2' => 'Miscelanious extra parameter', 
     41    'Extra3' => 'Miscelanious extra parameter' 
    4242); 
    4343 
    4444if(bx_get('popup') !== false && (int)bx_get('popup') == 1) { 
    45     $iAmInPopup = true; 
    46      
    47     $iNameIndex = 17; 
     45    $iAmInPopup = true; 
     46 
     47    $iNameIndex = 17; 
    4848    $_page = array( 
    4949        'name_index' => $iNameIndex, 
    5050        'css_name' => array('predefined_values.css'), 
    5151        'js_name' => array(), 
    52         'header' => _t('_adm_page_cpt_pvalues_manage'),     
    53         'header_text' => _t('_adm_box_cpt_pvalues_manage'),     
     52        'header' => _t('_adm_page_cpt_pvalues_manage'), 
     53        'header_text' => _t('_adm_box_cpt_pvalues_manage'), 
    5454    ); 
    5555    $_page_cont[$iNameIndex]['page_main_code'] = PageCompPageMainCode(); 
    5656} else { 
    57     $iAmInPopup = false; 
    58      
    59     $iNameIndex = 0; 
     57    $iAmInPopup = false; 
     58 
     59    $iNameIndex = 0; 
    6060    $_page = array( 
    6161        'name_index' => $iNameIndex, 
    6262        'css_name' => array('predefined_values.css'), 
    6363        'js_name' => array(), 
    64         'header' => _t('_adm_page_cpt_pvalues_manage'),     
    65         'header_text' => _t('_adm_box_cpt_pvalues_manage'),     
     64        'header' => _t('_adm_page_cpt_pvalues_manage'), 
     65        'header_text' => _t('_adm_box_cpt_pvalues_manage'), 
    6666    ); 
    67     $_page_cont[$iNameIndex]['page_main_code'] = PageCompPageMainCode();     
     67    $_page_cont[$iNameIndex]['page_main_code'] = PageCompPageMainCode(); 
    6868} 
    6969 
     
    7171 
    7272function PageCompPageMainCode() { 
    73     global $iAmInPopup; 
    74     global $aFields; 
    75  
    76     $sDeleteIcon = $GLOBALS['oAdmTemplate']->getImageUrl('minus1.gif'); 
    77     $sUpIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_up.gif'); 
    78     $sDownIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_down.gif'); 
     73    global $iAmInPopup; 
     74    global $aFields; 
     75 
     76    $sDeleteIcon = $GLOBALS['oAdmTemplate']->getImageUrl('minus1.gif'); 
     77    $sUpIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_up.gif'); 
     78    $sDownIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_down.gif'); 
    7979 
    8080    $sPopupAdd = $iAmInPopup ? '&popup=1' : ''; 
    8181    $sResultMsg = ''; 
    8282 
    83     if( isset( $_POST['action'] ) and $_POST['action'] == 'Save' and isset( $_POST['PreList'] ) and is_array( $_POST['PreList'] ) ) { 
     83    if( isset( $_POST['action'] ) and $_POST['action'] == 'Save' and isset( $_POST['PreList'] ) and is_array( $_POST['PreList'] ) ) { 
    8484        if (true === saveList( $_POST['list'], $_POST['PreList'] )) 
    8585            $sResultMsg = _t('_Success'); 
    8686        else 
    8787            $sResultMsg = _t('_Failed to apply changes'); 
    88     } 
    89  
    90     //get lists 
    91     $aLists = array( '' => '- Select -' ); 
    92     $aKeys = getPreKeys(); 
    93     foreach ($aKeys as $aList) 
    94         $aLists[ $aList['Key'] ] = $aList['Key']; 
    95      
    96     $sListIn = bx_get('list'); 
    97     if ($sListIn !== false) { 
    98         $sList_db = process_db_input($sListIn); 
    99         $sList    = process_pass_data($sListIn); 
    100          
    101         $iCount = getPreValuesCount($sListIn);       
    102         if (!$iCount) //if no rows returned... 
    103             $aLists[ $sList ] = $sList; //create new list 
    104     } else { 
    105         $sList = ''; 
    106     } 
     88    } 
     89 
     90    //get lists 
     91    $aLists = array( '' => '- Select -' ); 
     92    $aKeys = getPreKeys(); 
     93    foreach ($aKeys as $aList) 
     94        $aLists[ $aList['Key'] ] = $aList['Key']; 
     95 
     96    $sListIn = bx_get('list'); 
     97    if ($sListIn !== false) { 
     98        $sList_db = process_db_input($sListIn); 
     99        $sList    = process_pass_data($sListIn); 
     100 
     101        $iCount = getPreValuesCount($sListIn); 
     102        if (!$iCount) //if no rows returned... 
     103            $aLists[ $sList ] = $sList; //create new list 
     104    } else { 
     105        $sList = ''; 
     106    } 
    107107 
    108108    ob_start(); 
     
    110110    if ($sResultMsg) 
    111111        echo MsgBox($sResultMsg); 
    112     ?>   
    113     <script type="text/javascript"> 
    114         function createNewList() { 
    115             var sNewList = prompt( 'Please enter name of new list' ); 
    116              
    117             if( sNewList == null ) 
    118                 return false; 
    119              
    120             sNewList = $.trim( sNewList ); 
    121              
    122             if( !sNewList.length ) { 
    123                 alert( 'You should enter correct name' ); 
    124                 return false; 
    125             } 
    126              
    127             window.location = '<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>?list=' + encodeURIComponent( sNewList ) + '<?= $sPopupAdd ?>'; 
    128         } 
    129          
    130         function addRow( eImg ) { 
    131  
    132             $( eImg ).parent().parent().before( 
    133                 '<tr>' + 
    134                 <? 
    135                 foreach( $aFields as $sField => $sHelp ) { 
    136                     ?> 
    137                     '<td><input type="text" class="value_input" name="PreList[' + iNextInd + '][<?= $sField ?>]" value="" /></td>' + 
    138                     <? 
    139                 } 
    140                 ?> 
    141                     '<th>' + 
    142                         '<img src="<?= $sDeleteIcon ?>"     class="row_control" title="Delete"    alt="Delete" onclick="delRow( this );" />' + 
    143                         '<img src="<?= $sUpIcon ?>"   class="row_control" title="Move up"   alt="Move up" onclick="moveUpRow( this );" />' + 
    144                         '<img src="<?= $sDownIcon ?>" class="row_control" title="Move down" alt="Move down" onclick="moveDownRow( this );" />' + 
    145                     '</th>' + 
    146                 '</tr>' 
    147             ); 
    148              
    149             iNextInd ++; 
    150              
    151             sortZebra(); 
    152         } 
    153          
    154         function delRow( eImg ) { 
    155             $( eImg ).parent().parent().remove(); 
    156             sortZebra(); 
    157         } 
    158          
    159         function moveUpRow( eImg ) { 
    160             var oCur = $( eImg ).parent().parent(); 
    161             var oPrev = oCur.prev( ':not(.headers)' ); 
    162             if( !oPrev.length ) 
    163                 return; 
    164              
    165             // swap elements values 
    166             var oCurElems  = $('input', oCur.get(0)); 
    167             var oPrevElems = $('input', oPrev.get(0)); 
    168              
    169             oCurElems.each( function(iInd) { 
    170                 var oCurElem  = $( this ); 
    171                 var oPrevElem = oPrevElems.filter( ':eq(' + iInd + ')' ); 
    172                  
    173                 // swap them 
    174                 var sCurValue = oCurElem.val(); 
    175                 oCurElem.val( oPrevElem.val() ); 
    176                 oPrevElem.val( sCurValue ); 
    177             } ); 
    178         } 
    179          
    180         function moveDownRow( eImg ) { 
    181             var oCur = $( eImg ).parent().parent(); 
    182             var oPrev = oCur.next( ':not(.headers)' ); 
    183             if( !oPrev.length ) 
    184                 return; 
    185              
    186             // swap elements values 
    187             var oCurElems  = $('input', oCur.get(0)); 
    188             var oPrevElems = $('input', oPrev.get(0)); 
    189              
    190             oCurElems.each( function(iInd) { 
    191                 var oCurElem  = $( this ); 
    192                 var oPrevElem = oPrevElems.filter( ':eq(' + iInd + ')' ); 
    193                  
    194                 // swap them 
    195                 var sCurValue = oCurElem.val(); 
    196                 oCurElem.val( oPrevElem.val() ); 
    197                 oPrevElem.val( sCurValue ); 
    198             } ); 
    199         } 
    200          
    201         function sortZebra() { 
    202             $( '#listEdit tr:even' ).removeClass( 'even odd' ).addClass( 'even' ); 
    203             $( '#listEdit tr:odd'  ).removeClass( 'even odd' ).addClass( 'odd'  ); 
    204         } 
    205          
    206         //just a design 
    207         $( document ).ready( sortZebra ); 
    208     </script> 
    209      
    210     <form action="<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>" method="post"> 
    211         <table id="listEdit" cellpadding="0" cellspacing="0"> 
    212             <tr> 
    213                 <th colspan="<?= count( $aFields ) + 1 ?>"> 
    214                     Select a list: 
    215                     <select name="list" 
    216                       onchange="if( this.value != '' ) window.location = '<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>' + '?list=' + encodeURIComponent( this.value ) + '<?= $sPopupAdd ?>';"> 
    217                         <?= genListOptions( $aLists, $sList ) ?> 
    218                     </select> 
    219                     <input type="button" value="Create New" onclick="createNewList();" /> 
    220                 </th> 
    221             </tr> 
    222     <? 
    223     if( $sList !== '' ) { 
    224         $iNextInd = genListRows( $sList_db ); 
    225         ?> 
    226             <tr> 
    227                 <th colspan="8"> 
    228                     <input type="hidden" name="popup" value="<?= $iAmInPopup ?>" /> 
    229                     <input type="submit" name="action" value="Save" /> 
    230                 </th> 
    231             </tr> 
    232         <? 
    233     } else 
    234         $iNextInd = 0; 
    235     ?> 
    236         </table> 
    237          
    238         <script type="text/javascript"> 
    239             iNextInd = <?= $iNextInd ?>; 
    240         </script> 
    241     </form> 
    242     <? 
    243     return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => ob_get_clean())); 
     112    ?> 
     113    <script type="text/javascript"> 
     114        function createNewList() { 
     115            var sNewList = prompt( 'Please enter name of new list' ); 
     116 
     117            if( sNewList == null ) 
     118                return false; 
     119 
     120            sNewList = $.trim( sNewList ); 
     121 
     122            if( !sNewList.length ) { 
     123                alert( 'You should enter correct name' ); 
     124                return false; 
     125            } 
     126 
     127            window.location = '<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>?list=' + encodeURIComponent( sNewList ) + '<?= $sPopupAdd ?>'; 
     128        } 
     129 
     130        function addRow( eImg ) { 
     131 
     132            $( eImg ).parent().parent().before( 
     133                '<tr>' + 
     134                <? 
     135                foreach( $aFields as $sField => $sHelp ) { 
     136                    ?> 
     137                    '<td><input type="text" class="value_input" name="PreList[' + iNextInd + '][<?= $sField ?>]" value="" /></td>' + 
     138                    <? 
     139                } 
     140                ?> 
     141                    '<th>' + 
     142                        '<img src="<?= $sDeleteIcon ?>"     class="row_control" title="Delete"    alt="Delete" onclick="delRow( this );" />' + 
     143                        '<img src="<?= $sUpIcon ?>"   class="row_control" title="Move up"   alt="Move up" onclick="moveUpRow( this );" />' + 
     144                        '<img src="<?= $sDownIcon ?>" class="row_control" title="Move down" alt="Move down" onclick="moveDownRow( this );" />' + 
     145                    '</th>' + 
     146                '</tr>' 
     147            ); 
     148 
     149            iNextInd ++; 
     150 
     151            sortZebra(); 
     152        } 
     153 
     154        function delRow( eImg ) { 
     155            $( eImg ).parent().parent().remove(); 
     156            sortZebra(); 
     157        } 
     158 
     159        function moveUpRow( eImg ) { 
     160            var oCur = $( eImg ).parent().parent(); 
     161            var oPrev = oCur.prev( ':not(.headers)' ); 
     162            if( !oPrev.length ) 
     163                return; 
     164 
     165            // swap elements values 
     166            var oCurElems  = $('input', oCur.get(0)); 
     167            var oPrevElems = $('input', oPrev.get(0)); 
     168 
     169            oCurElems.each( function(iInd) { 
     170                var oCurElem  = $( this ); 
     171                var oPrevElem = oPrevElems.filter( ':eq(' + iInd + ')' ); 
     172 
     173                // swap them 
     174                var sCurValue = oCurElem.val(); 
     175                oCurElem.val( oPrevElem.val() ); 
     176                oPrevElem.val( sCurValue ); 
     177            } ); 
     178        } 
     179 
     180        function moveDownRow( eImg ) { 
     181            var oCur = $( eImg ).parent().parent(); 
     182            var oPrev = oCur.next( ':not(.headers)' ); 
     183            if( !oPrev.length ) 
     184                return; 
     185 
     186            // swap elements values 
     187            var oCurElems  = $('input', oCur.get(0)); 
     188            var oPrevElems = $('input', oPrev.get(0)); 
     189 
     190            oCurElems.each( function(iInd) { 
     191                var oCurElem  = $( this ); 
     192                var oPrevElem = oPrevElems.filter( ':eq(' + iInd + ')' ); 
     193 
     194                // swap them 
     195                var sCurValue = oCurElem.val(); 
     196                oCurElem.val( oPrevElem.val() ); 
     197                oPrevElem.val( sCurValue ); 
     198            } ); 
     199        } 
     200 
     201        function sortZebra() { 
     202            $( '#listEdit tr:even' ).removeClass( 'even odd' ).addClass( 'even' ); 
     203            $( '#listEdit tr:odd'  ).removeClass( 'even odd' ).addClass( 'odd'  ); 
     204        } 
     205 
     206        //just a design 
     207        $( document ).ready( sortZebra ); 
     208    </script> 
     209 
     210    <form action="<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>" method="post"> 
     211        <table id="listEdit" cellpadding="0" cellspacing="0"> 
     212            <tr> 
     213                <th colspan="<?= count( $aFields ) + 1 ?>"> 
     214                    Select a list: 
     215                    <select name="list" 
     216                      onchange="if( this.value != '' ) window.location = '<?=$GLOBALS['site']['url_admin'] . 'preValues.php'; ?>' + '?list=' + encodeURIComponent( this.value ) + '<?= $sPopupAdd ?>';"> 
     217                        <?= genListOptions( $aLists, $sList ) ?> 
     218                    </select> 
     219                    <input type="button" value="Create New" onclick="createNewList();" /> 
     220                </th> 
     221            </tr> 
     222    <? 
     223    if( $sList !== '' ) { 
     224        $iNextInd = genListRows( $sList_db ); 
     225        ?> 
     226            <tr> 
     227                <th colspan="8"> 
     228                    <input type="hidden" name="popup" value="<?= $iAmInPopup ?>" /> 
     229                    <input type="submit" name="action" value="Save" /> 
     230                </th> 
     231            </tr> 
     232        <? 
     233    } else 
     234        $iNextInd = 0; 
     235    ?> 
     236        </table> 
     237 
     238        <script type="text/javascript"> 
     239            iNextInd = <?= $iNextInd ?>; 
     240        </script> 
     241    </form> 
     242    <? 
     243    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => ob_get_clean())); 
    244244} 
    245245 
    246246function genListOptions( $aLists, $sActive ) { 
    247     $sRet = ''; 
    248     foreach( $aLists as $sKey => $sValue ) { 
    249         $sRet .= ' 
    250             <option value="' . 
    251             htmlspecialchars( $sKey ) . 
    252             '"' . ( ( $sKey == $sActive ) ? ' selected="selected"' : '' ) . 
    253             '>' . htmlspecialchars( $sValue ) . '</option>'; 
    254     } 
    255      
    256     return $sRet; 
     247    $sRet = ''; 
     248    foreach( $aLists as $sKey => $sValue ) { 
     249        $sRet .= ' 
     250            <option value="' . 
     251            htmlspecialchars( $sKey ) . 
     252            '"' . ( ( $sKey == $sActive ) ? ' selected="selected"' : '' ) . 
     253            '>' . htmlspecialchars( $sValue ) . '</option>'; 
     254    } 
     255 
     256    return $sRet; 
    257257} 
    258258 
    259259function genListRows( $sList ) { 
    260     global $aFields; 
    261  
    262     $sDeleteIcon = $GLOBALS['oAdmTemplate']->getImageUrl('minus1.gif'); 
    263     $sUpIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_up.gif'); 
    264     $sDownIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_down.gif'); 
    265      
    266     $aRows = getPreValues($sList); 
    267      
    268     ?> 
    269         <tr class="headers"> 
    270     <? 
    271     foreach( $aFields as $sField => $sHelp ) { 
    272         ?> 
    273             <th> 
    274                 <span class="tableLabel" 
    275                   onmouseover="showFloatDesc( '<?= addslashes( htmlspecialchars( $sHelp ) ) ?>' );" 
    276                   onmousemove="moveFloatDesc( event );" 
    277                   onmouseout="hideFloatDesc();"> 
    278                     <?= $sField ?> 
    279                 </span> 
    280             </th> 
    281         <? 
    282     } 
    283     ?> 
    284             <th>&nbsp;</th> 
    285         </tr> 
    286     <? 
    287      
    288     $iCounter = 0; 
    289      
    290     foreach ($aRows as $aRow) { 
    291         ?> 
    292         <tr> 
    293         <? 
    294         foreach( $aFields as $sField => $sHelp ) { 
    295             ?> 
    296             <td><input type="text" class="value_input" name="PreList[<?= $iCounter ?>][<?= $sField ?>]" value="<?= htmlspecialchars( $aRow[$sField] ) ?>" /></td> 
    297             <? 
    298         } 
    299         ?> 
    300             <th><img src="<?=$sDeleteIcon?>"     class="row_control" title="Delete"    alt="Delete" onclick="delRow( this );" /><img src="<?= $sUpIcon ?>"   class="row_control" title="Move up"   alt="Move up" onclick="moveUpRow( this );" /><img src="<?= $sDownIcon ?>" class="row_control" title="Move down" alt="Move down" onclick="moveDownRow( this );" /></th> 
    301         </tr> 
    302         <? 
    303          
    304         $iCounter ++; 
    305     } 
    306     ?> 
    307         <tr class="headers"> 
    308             <td colspan="<?= count( $aFields ) ?>">&nbsp;</td> 
    309             <th> 
     260    global $aFields; 
     261 
     262    $sDeleteIcon = $GLOBALS['oAdmTemplate']->getImageUrl('minus1.gif'); 
     263    $sUpIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_up.gif'); 
     264    $sDownIcon = $GLOBALS['oAdmTemplate']->getImageUrl('arrow_down.gif'); 
     265 
     266    $aRows = getPreValues($sList); 
     267 
     268    ?> 
     269        <tr class="headers"> 
     270    <? 
     271    foreach( $aFields as $sField => $sHelp ) { 
     272        ?> 
     273            <th> 
     274                <span class="tableLabel" 
     275                  onmouseover="showFloatDesc( '<?= addslashes( htmlspecialchars( $sHelp ) ) ?>' );" 
     276                  onmousemove="moveFloatDesc( event );" 
     277                  onmouseout="hideFloatDesc();"> 
     278                    <?= $sField ?> 
     279                </span> 
     280            </th> 
     281        <? 
     282    } 
     283    ?> 
     284            <th>&nbsp;</th> 
     285        </tr> 
     286    <? 
     287 
     288    $iCounter = 0; 
     289 
     290    foreach ($aRows as $aRow) { 
     291        ?> 
     292        <tr> 
     293        <? 
     294        foreach( $aFields as $sField => $sHelp ) { 
     295            ?> 
     296            <td><input type="text" class="value_input" name="PreList[<?= $iCounter ?>][<?= $sField ?>]" value="<?= htmlspecialchars( $aRow[$sField] ) ?>" /></td> 
     297            <? 
     298        } 
     299        ?> 
     300            <th><img src="<?=$sDeleteIcon?>"     class="row_control" title="Delete"    alt="Delete" onclick="delRow( this );" /><img src="<?= $sUpIcon ?>"   class="row_control" title="Move up"   alt="Move up" onclick="moveUpRow( this );" /><img src="<?= $sDownIcon ?>" class="row_control" title="Move down" alt="Move down" onclick="moveDownRow( this );" /></th> 
     301        </tr> 
     302        <? 
     303 
     304        $iCounter ++; 
     305    } 
     306    ?> 
     307        <tr class="headers"> 
     308            <td colspan="<?= count( $aFields ) ?>">&nbsp;</td> 
     309            <th> 
    310310                <img src="<?= $GLOBALS['oAdmTemplate']->getImageUrl('plus1.gif') ?>" class="row_control" title="Add" alt="Add" onclick="addRow( this );" /> 
    311             </th> 
    312         </tr> 
    313     <? 
    314      
    315     return $iCounter; 
     311            </th> 
     312        </tr> 
     313    <? 
     314 
     315    return $iCounter; 
    316316} 
    317317 
    318318function saveList( $sList, $aData ) { 
    319     global $aFields; 
    320     global $iAmInPopup; 
    321      
    322     $sList_db = trim( process_db_input( $sList ) ); 
    323      
    324     if( $sList_db == '' ) 
    325         return false; 
    326      
    327     $sQuery = "DELETE FROM `" . BX_SYS_PRE_VALUES_TABLE . "` WHERE `Key` = '$sList_db'"; 
    328      
    329     db_res( $sQuery ); 
    330      
    331     $sValuesAlter = ''; 
    332      
    333     foreach( $aData as $iInd => $aRow ) { 
    334         $aRow['Value'] = str_replace( ',', '', trim( $aRow['Value'] ) ); 
    335          
    336         if( $aRow['Value'] == '' ) 
    337             continue; 
    338          
    339         $sValuesAlter .= "'" . process_db_input( $aRow['Value'] ) . "', "; 
    340          
    341         $sInsFields = ''; 
    342         $sInsValues = ''; 
    343         foreach( $aFields as $sField => $sTemp ) { 
    344             $sValue = trim( process_db_input( $aRow[$sField] ) ); 
    345              
    346             $sInsFields .= "`$sField`, "; 
    347             $sInsValues .= "'$sValue', "; 
    348         } 
    349          
    350         $sInsFields = substr( $sInsFields, 0, -2 ); //remove ', ' 
    351         $sInsValues = substr( $sInsValues, 0, -2 ); 
    352          
    353         $sQuery = "INSERT INTO `" . BX_SYS_PRE_VALUES_TABLE . "` ( `Key`, $sInsFields, `Order` ) VALUES ( '$sList_db', $sInsValues, $iInd )"; 
    354          
    355         db_res( $sQuery ); 
    356     } 
    357      
    358     //alter Profiles table 
    359     $sValuesAlter = substr( $sValuesAlter, 0, -2 ); //remove ', ' 
    360     $sQuery = "SELECT `Name` FROM `sys_profile_fields` WHERE `Type` = 'select_set' AND `Values` = '#!{$sList_db}'"; 
    361     $rFields = db_res( $sQuery ); 
    362     while( $aField = mysql_fetch_assoc( $rFields ) ) { 
    363         $sField = $aField['Name']; 
    364          
    365         $sQuery = "ALTER TABLE `Profiles` CHANGE `$sField` `$sField` set($sValuesAlter) NOT NULL default ''"; 
    366         db_res( $sQuery ); 
    367     } 
    368  
    369     compilePreValues(); 
     319    global $aFields; 
     320    global $iAmInPopup; 
     321 
     322    $sList_db = trim( process_db_input( $sList ) ); 
     323 
     324    if( $sList_db == '' ) 
     325        return false; 
     326 
     327    $sQuery = "DELETE FROM `" . BX_SYS_PRE_VALUES_TABLE . "` WHERE `Key` = '$sList_db'"; 
     328 
     329    db_res( $sQuery ); 
     330 
     331    $sValuesAlter = ''; 
     332 
     333    foreach( $aData as $iInd => $aRow ) { 
     334        $aRow['Value'] = str_replace( ',', '', trim( $aRow['Value'] ) ); 
     335 
     336        if( $aRow['Value'] == '' ) 
     337            continue; 
     338 
     339        $sValuesAlter .= "'" . process_db_input( $aRow['Value'] ) . "', "; 
     340 
     341        $sInsFields = ''; 
     342        $sInsValues = ''; 
     343        foreach( $aFields as $sField => $sTemp ) { 
     344            $sValue = trim( process_db_input( $aRow[$sField] ) ); 
     345 
     346            $sInsFields .= "`$sField`, "; 
     347            $sInsValues .= "'$sValue', "; 
     348        } 
     349 
     350        $sInsFields = substr( $sInsFields, 0, -2 ); //remove ', ' 
     351        $sInsValues = substr( $sInsValues, 0, -2 ); 
     352 
     353        $sQuery = "INSERT INTO `" . BX_SYS_PRE_VALUES_TABLE . "` ( `Key`, $sInsFields, `Order` ) VALUES ( '$sList_db', $sInsValues, $iInd )"; 
     354 
     355        db_res( $sQuery ); 
     356    } 
     357 
     358    //alter Profiles table 
     359    $sValuesAlter = substr( $sValuesAlter, 0, -2 ); //remove ', ' 
     360    $sQuery = "SELECT `Name` FROM `sys_profile_fields` WHERE `Type` = 'select_set' AND `Values` = '#!{$sList_db}'"; 
     361    $rFields = db_res( $sQuery ); 
     362    while( $aField = mysql_fetch_assoc( $rFields ) ) { 
     363        $sField = $aField['Name']; 
     364 
     365        $sQuery = "ALTER TABLE `Profiles` CHANGE `$sField` `$sField` set($sValuesAlter) NOT NULL default ''"; 
     366        db_res( $sQuery ); 
     367    } 
     368 
     369    compilePreValues(); 
    370370 
    371371    if( $iAmInPopup ) 
  • trunk/administration/profiles.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    5555    $oEmailTemplate = new BxDolEmailTemplates(); 
    5656    foreach($_POST['members'] as $iId) { 
    57         createUserDataFile((int)$iId); 
    58         reparseObjTags('profile', (int)$iId); 
    59  
    60         $aProfile = getProfileInfo($iId); 
    61         $aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId); 
    62         sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']); 
     57        createUserDataFile((int)$iId); 
     58        reparseObjTags('profile', (int)$iId); 
     59 
     60        $aProfile = getProfileInfo($iId); 
     61        $aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId); 
     62        sendMail($aProfile['Email'], $aMail['subject'], $aMail['body']); 
    6363 
    6464        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Active')); 
     
    6767    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
    6868    exit; 
    69 }  
     69} 
    7070else if(isset($_POST['adm-mp-deactivate']) && (bool)$_POST['members']) { 
    7171    $GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status`='Approval' WHERE `ID` IN ('" . implode("','", $_POST['members']) . "')"); 
    7272    foreach($_POST['members'] as $iId) { 
    73         createUserDataFile((int)$iId); 
    74         reparseObjTags('profile', (int)$iId); 
     73        createUserDataFile((int)$iId); 
     74        reparseObjTags('profile', (int)$iId); 
    7575        $oAlert = new BxDolAlerts('profile', 'change_status', (int)$iId, 0, array('status' => 'Approval')); 
    7676        $oAlert->alert(); 
     
    7979    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
    8080    exit; 
    81 }  
     81} 
    8282else if(isset($_POST['adm-mp-ban']) && (bool)$_POST['members']) { 
    8383    foreach($_POST['members'] as $iId) 
    8484        $GLOBALS['MySQL']->query("REPLACE INTO `sys_admin_ban_list` SET `ProfID`='" . $iId . "', `Time`='0',  `DateTime`=NOW()"); 
    8585 
    86     echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
    87     exit; 
    88 }  
    89 else if(isset($_POST['adm-mp-unban']) && (bool)$_POST['members']) {     
     86    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
     87    exit; 
     88} 
     89else if(isset($_POST['adm-mp-unban']) && (bool)$_POST['members']) { 
    9090    $GLOBALS['MySQL']->query("DELETE FROM `sys_admin_ban_list` WHERE `ProfID` IN ('" . implode("','", $_POST['members']) . "')"); 
    9191 
    9292    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
    9393    exit; 
    94 }  
    95 else if(isset($_POST['adm-mp-delete']) && (bool)$_POST['members']) {     
     94} 
     95else if(isset($_POST['adm-mp-delete']) && (bool)$_POST['members']) { 
    9696    foreach($_POST['members'] as $iId) 
    9797        $bResult = profile_delete((int)$iId); 
    9898 
    99     echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
    100     exit; 
    101 }  
    102 else if(isset($_POST['adm-mp-confirm']) && (bool)$_POST['members']) {     
     99    echo "<script>window.parent." . BX_DOL_ADM_MP_JS_NAME . ".reload();</script>"; 
     100    exit; 
     101} 
     102else if(isset($_POST['adm-mp-confirm']) && (bool)$_POST['members']) { 
    103103    foreach($_POST['members'] as $iId) 
    104104        activation_mail((int)$iId, 0); 
    105105 
    106     echo "<script>alert('" . _t('_adm_txt_mp_activation_sent') . "')</script>"; 
     106    echo "<script>alert('" . _t('_adm_txt_mp_activation_sent') . "')</script>"; 
    107107    exit; 
    108108} 
     
    115115        } 
    116116 
    117     $oJson = new Services_JSON();    
     117    $oJson = new Services_JSON(); 
    118118    echo $oJson->encode(array('code' => 0, 'content' => getMembers(array( 
    119         'view_type' => $_POST['view_type'],  
     119        'view_type' => $_POST['view_type'], 
    120120        'view_start' => (int)$_POST['view_start'], 
    121121        'view_per_page' => (int)$_POST['view_per_page'], 
     
    127127} 
    128128else if(isset($_POST['action']) && $_POST['action'] == 'get_controls') { 
    129     $oJson = new Services_JSON(); 
    130  
    131     $sCtlType = process_db_input($_POST['ctl_type'], BX_TAGS_STRIP); 
    132     $sMethodName = 'getBlock' . ucfirst($sCtlType); 
    133     if(!function_exists($sMethodName)) { 
    134         echo '{}'; 
    135         exit; 
    136     } 
     129    $oJson = new Services_JSON(); 
     130 
     131    $sCtlType = process_db_input($_POST['ctl_type'], BX_TAGS_STRIP); 
     132    $sMethodName = 'getBlock' . ucfirst($sCtlType); 
     133    if(!function_exists($sMethodName)) { 
     134        echo '{}'; 
     135        exit; 
     136    } 
    137137 
    138138    echo $oJson->encode(array( 
    139         'code' => 0,  
    140         'content' => $oAdmTemplate->parseHtmlByName('mp_ctl_type_' . $sCtlType . '.html', $sMethodName($sCtlType)) 
     139        'code' => 0, 
     140        'content' => $oAdmTemplate->parseHtmlByName('mp_ctl_type_' . $sCtlType . '.html', $sMethodName($sCtlType)) 
    141141    )); 
    142142    exit; 
     
    164164 
    165165function PageCodeControls($sDefault = BX_DOL_ADM_MP_CTL) { 
    166     global $oAdmTemplate;     
    167  
    168     $aTopMenu = array(             
     166    global $oAdmTemplate; 
     167 
     168    $aTopMenu = array( 
    169169        'ctl-type-qlinks' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeControl(this);', 'title' => _t('_adm_btn_mp_qlinks'), 'active' => $sDefault == 'qlinks' ? 1 : 0), 
    170170        //'ctl-type-browse' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeControl(this);', 'title' => _t('_adm_btn_mp_browse'), 'active' => $sDefault == 'browse' ? 1 : 0), 
     
    172172        'ctl-type-tags' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeControl(this);', 'title' => _t('_adm_btn_mp_tags'), 'active' => $sDefault == 'tags' ? 1 : 0), 
    173173        'ctl-type-search' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeControl(this);', 'title' => _t('_adm_btn_mp_search'), 'active' => $sDefault == 'search' ? 1 : 0) 
    174     );       
     174    ); 
    175175 
    176176    $aParams = array_merge( 
    177         getBlockQlinks($sDefault), 
    178         getBlockBrowse($sDefault), 
    179         getBlockCalendar($sDefault), 
    180         getBlockTags($sDefault), 
    181         getBlockSearch($sDefault), 
    182         array( 
    183             'loading' => LoadingBox('adm-mp-controls-loading') 
    184         ) 
     177        getBlockQlinks($sDefault), 
     178        getBlockBrowse($sDefault), 
     179        getBlockCalendar($sDefault), 
     180        getBlockTags($sDefault), 
     181        getBlockSearch($sDefault), 
     182        array( 
     183            'loading' => LoadingBox('adm-mp-controls-loading') 
     184        ) 
    185185    ); 
    186186    return DesignBoxAdmin(_t('_adm_box_cpt_mp_controls'), $oAdmTemplate->parseHtmlByName('mp_controls.html', $aParams), $aTopMenu); 
     
    188188function getBlockQlinks($sDefault) { 
    189189    global $MySQL; 
    190      
     190 
    191191    $aResult = array(); 
    192192    $sBaseUrl = $GLOBALS['site']['url_admin'] . 'profiles.php?type=qlinks&value='; 
    193      
     193 
    194194    $aItems = array(); 
    195195    $aItems = array_merge($aItems, $MySQL->getAll("SELECT 'all' AS `by`, 'all' AS `value`, COUNT(`ID`) AS `count` FROM `Profiles` WHERE 1 AND (`Couple`='0' OR `Couple`>`ID`)")); 
     
    202202    $aItems = array_merge($aItems, $MySQL->getAll("SELECT 'type' AS `by`, 'couple' AS `value`, COUNT(`ID`) AS `count` FROM `Profiles` WHERE `Couple`<>'0' AND `Couple`>`ID`")); 
    203203    $aItems = array_merge($aItems, $MySQL->getAll("SELECT 'role' AS `by`, 'admins' AS `value`, COUNT(`ID`) AS `count` FROM `Profiles` WHERE `Role` & " . BX_DOL_ROLE_ADMIN . "")); 
    204          
     204 
    205205    foreach($aItems as $aItem) 
    206206        $aResult[] = array('link' => 'javascript:void(0)', 'on_click' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeFilterQlinks(\'' . strtolower($aItem['by']) . '\', \'' . strtolower($aItem['value']) . '\')', 'title' => _t('_adm_txt_mp_' . strtolower($aItem['value'])), 'count' => $aItem['count']); 
    207207 
    208     return array(  
    209         'styles_qlinks' => $sDefault != 'qlinks' ? "display: none;" : "", 
    210         'bx_repeat:content_qlinks' => $aResult 
     208    return array( 
     209        'styles_qlinks' => $sDefault != 'qlinks' ? "display: none;" : "", 
     210        'bx_repeat:content_qlinks' => $aResult 
    211211    ); 
    212212} 
    213213function getBlockBrowse($sDefault) { 
    214     return array( 
    215         'styles_browse' => $sDefault != 'browse' ? "display: none;" : "", 
    216         'content_browse' => '' 
    217     ); 
     214    return array( 
     215        'styles_browse' => $sDefault != 'browse' ? "display: none;" : "", 
     216        'content_browse' => '' 
     217    ); 
    218218} 
    219219function getBlockCalendar($sDefault) { 
    220     return array( 
    221         'styles_calendar' => $sDefault != 'calendar' ? "display: none;" : "", 
    222         'content_calendar' => '' 
    223     ); 
     220    return array( 
     221        'styles_calendar' => $sDefault != 'calendar' ? "display: none;" : "", 
     222        'content_calendar' => '' 
     223    ); 
    224224} 
    225225function getBlockTags($sDefault) { 
     
    229229    $aTags = $oTags->getTagList(array('type' => 'profile')); 
    230230    return array( 
    231         'styles_tags' => $sDefault != 'tags' ? "display: none;" : "", 
    232         'content_tags' => $oTags->getTagsView($aTags, BX_DOL_ADM_MP_JS_NAME . '.changeFilterTags(\'{tag}\')') 
     231        'styles_tags' => $sDefault != 'tags' ? "display: none;" : "", 
     232        'content_tags' => $oTags->getTagsView($aTags, BX_DOL_ADM_MP_JS_NAME . '.changeFilterTags(\'{tag}\')') 
    233233    ); 
    234234} 
     
    255255                    'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeFilterSearch()' 
    256256                ) 
    257             ),                 
     257            ), 
    258258        ) 
    259259    ); 
     
    261261    $oForm = new BxTemplFormView($aForm); 
    262262    return array( 
    263         'styles_search' => $sDefault != 'search' ? "display: none;" : "", 
    264         'content_search' => $oForm->getCode() 
     263        'styles_search' => $sDefault != 'search' ? "display: none;" : "", 
     264        'content_search' => $oForm->getCode() 
    265265    ); 
    266266} 
     
    272272        'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 
    273273        'adm-mp-ban' => _t('_adm_btn_mp_ban'), 
    274         'adm-mp-unban' => _t('_adm_btn_mp_unban'),         
     274        'adm-mp-unban' => _t('_adm_btn_mp_unban'), 
    275275        'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 
    276276        'adm-mp-delete' => _t('_adm_btn_mp_delete'), 
    277     );     
     277    ); 
    278278    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-form', $aButtons, 'members'); 
    279      
     279 
    280280    $aTopMenu = array( 
    281         'view-type-simple' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_simple'), 'active' => $sDefaultView == 'simple' ? 1 : 0),         
    282         'view-type-extended' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_extended'), 'active' => $sDefaultView == 'extended' ? 1 : 0),         
     281        'view-type-simple' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_simple'), 'active' => $sDefaultView == 'simple' ? 1 : 0), 
     282        'view-type-extended' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_extended'), 'active' => $sDefaultView == 'extended' ? 1 : 0), 
    283283        'view-type-geeky' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_geeky'), 'active' => $sDefaultView == 'geeky' ? 1 : 0) 
    284284    ); 
     
    288288        'per_page_step' => BX_DOL_ADM_MP_PER_PAGE_STEP, 
    289289        'on_change_per_page' => BX_DOL_ADM_MP_JS_NAME . '.changePerPage(this);' 
    290     ));     
     290    )); 
    291291 
    292292    $aResult = array( 
    293         'action_url' => $GLOBALS['site']['url_admin'] . 'profiles.php', 
     293        'action_url' => $GLOBALS['site']['url_admin'] . 'profiles.php', 
    294294        'ctl_type' => $sDefaultCtl, 
    295295        'view_type' => $sDefaultView, 
     
    301301 
    302302    foreach(array('simple', 'extended', 'geeky') as $sType) 
    303         if($sType == $sDefaultView)  
     303        if($sType == $sDefaultView) 
    304304            $aResult = array_merge($aResult, array('style_' . $sType => '', 'content_' . $sType => getMembers(array('view_type' => $sType)))); 
    305         else  
     305        else 
    306306            $aResult = array_merge($aResult, array('style_' . $sType => 'display: none;', 'content_' . $sType => '')); 
    307307 
     
    316316        $aParams['view_per_page'] = BX_DOL_ADM_MP_PER_PAGE; 
    317317 
    318     $aParams['view_order_way'] = 'ASC'; 
     318    $aParams['view_order_way'] = 'ASC'; 
    319319    if(!isset($aParams['view_order']) || empty($aParams['view_order'])) 
    320320        $aParams['view_order'] = 'ID'; 
    321     else { 
    322         $aOrder = explode(' ', $aParams['view_order']); 
    323         if(count($aOrder) > 1) { 
    324             $aParams['view_order'] = $aOrder[0]; 
    325             $aParams['view_order_way'] = $aOrder[1];  
    326         } 
    327     } 
     321    else { 
     322        $aOrder = explode(' ', $aParams['view_order']); 
     323        if(count($aOrder) > 1) { 
     324            $aParams['view_order'] = $aOrder[0]; 
     325            $aParams['view_order_way'] = $aOrder[1]; 
     326        } 
     327    } 
    328328 
    329329    $sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB); 
     
    342342                    $sWhereClause .= " AND (`tbl`.`Time`='0' OR (`tbl`.`Time`<>'0' AND DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW()))"; 
    343343                    break; 
    344                 case 'type':                     
     344                case 'type': 
    345345                    $sWhereClause .= $aParams['ctl_params']['value'] == 'single' ? " AND `tp`.`Couple`='0'" : " AND `tp`.`Couple`<>'0' AND `tp`.`Couple`>`tp`.`ID`"; 
    346346                    break; 
     
    367367        case 'search': 
    368368            $sWhereClause .= " AND ( 
    369                 `tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
    370                 `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
    371                 `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
    372                 `tp`.`Headline` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
    373                 `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
    374                 `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
    375                 `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR  
     369                `tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     370                `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     371                `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     372                `tp`.`Headline` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     373                `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     374                `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
     375                `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR 
    376376                `tp`.`DateLastLogin` LIKE '%" . $aParams['ctl_params']['value'] . "%' 
    377377            )"; 
    378378            break; 
    379379    } 
    380      
     380 
    381381    //--- Get Paginate ---// 
    382382    $oPaginate = new BxDolPaginate(array( 
     
    387387        'on_change_page' => BX_DOL_ADM_MP_JS_NAME . '.changePage({start})' 
    388388    )); 
    389     $sPaginate = $oPaginate->getPaginate();     
     389    $sPaginate = $oPaginate->getPaginate(); 
    390390 
    391391    //--- Get Items ---// 
    392392    $sQuery = " 
    393         SELECT 
    394             `tp`.`ID` as `id`, 
    395             `tp`.`NickName` AS `username`, 
    396             `tp`.`Headline` AS `headline`, 
    397             `tp`.`Sex` AS `sex`, 
    398             `tp`.`DateOfBirth` AS `date_of_birth`, 
    399             `tp`.`Country` AS `country`, 
    400             `tp`.`City` AS `city`, 
    401             `tp`.`DescriptionMe` AS `description`, 
    402             `tp`.`Email` AS `email`, 
    403             DATE_FORMAT(`tp`.`DateReg`,  '" . $sDateFormat . "' ) AS `registration`, 
    404             DATE_FORMAT(`tp`.`DateLastLogin`,  '" . $sDateFormat . "' ) AS `last_login`, 
    405             `tp`.`Status` AS `status`, 
    406             IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`,  
    407             `tl`.`ID` AS `ml_id`,  
    408             IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name` 
    409             " . $sSelectClause . " 
    410         FROM `Profiles` AS `tp`  
     393        SELECT 
     394            `tp`.`ID` as `id`, 
     395            `tp`.`NickName` AS `username`, 
     396            `tp`.`Headline` AS `headline`, 
     397            `tp`.`Sex` AS `sex`, 
     398            `tp`.`DateOfBirth` AS `date_of_birth`, 
     399            `tp`.`Country` AS `country`, 
     400            `tp`.`City` AS `city`, 
     401            `tp`.`DescriptionMe` AS `description`, 
     402            `tp`.`Email` AS `email`, 
     403            DATE_FORMAT(`tp`.`DateReg`,  '" . $sDateFormat . "' ) AS `registration`, 
     404            DATE_FORMAT(`tp`.`DateLastLogin`,  '" . $sDateFormat . "' ) AS `last_login`, 
     405            `tp`.`Status` AS `status`, 
     406            IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`, 
     407            `tl`.`ID` AS `ml_id`, 
     408            IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name` 
     409            " . $sSelectClause . " 
     410        FROM `Profiles` AS `tp` 
    411411        LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` 
    412         LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`))   
    413         LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID`  
    414         " . $sJoinClause . " 
    415         WHERE 
    416             1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . " 
    417         " . $sGroupClause . " 
    418         ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . " 
    419         LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page']; 
     412        LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) 
     413        LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` 
     414        " . $sJoinClause . " 
     415        WHERE 
     416            1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . " 
     417        " . $sGroupClause . " 
     418        ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . " 
     419        LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page']; 
    420420    $aProfiles = $GLOBALS['MySQL']->getAll($sQuery); 
    421      
     421 
    422422    //--- Display ---// 
    423423    $sFunction = 'getMembers' . ucfirst($aParams['view_type']); 
     
    426426 
    427427function getMembersGeeky($aProfiles, $sPaginate) { 
    428     $iEmailLength = 20;  
     428    $iEmailLength = 20; 
    429429    $aItems = array(); 
    430430    foreach($aProfiles as $aProfile){ 
     
    439439            'edit_class' => (int)$aProfile['banned'] == 1 ? 'adm-mp-banned' : ($aProfile['status'] != 'Active' ? 'adm-mp-inactive' : 'adm-mp-active'), 
    440440            'registration' => $aProfile['registration'], 
    441             'last_login' => $aProfile['last_login'],             
     441            'last_login' => $aProfile['last_login'], 
    442442            'status' => $aProfile['status'], 
    443443            'ml_id' => !empty($aProfile['ml_id']) ? (int)$aProfile['ml_id'] : 2, 
     
    445445        ); 
    446446    } 
    447      
     447 
    448448    return $GLOBALS['oAdmTemplate']->parseHtmlByName('mp_members_geeky.html', array( 
    449449        'bx_repeat:items' => array_values($aItems), 
     
    462462            'username' => $aProfile['username'] 
    463463        ); 
    464          
     464 
    465465    return $GLOBALS['oAdmTemplate']->parseHtmlByName('mp_members_simple.html', array( 
    466466        'bx_repeat:items' => array_values($aItems), 
  • trunk/administration/settings.php

    r15201 r15211  
    1111* This file is part of Dolphin - Smart Community Builder 
    1212* 
    13 * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.  
     13* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
    1414* http://creativecommons.org/licenses/by/3.0/ 
    1515* 
    1616* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
    1717* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    18 * See the Creative Commons Attribution 3.0 License for more details.  
    19 * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,  
     18* See the Creative Commons Attribution 3.0 License for more details. 
     19* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
    2020* see license.txt file; if not, write to marketing@boonex.com 
    2121***************************************************************************/ 
     
    3232$mixedCategory = 0; 
    3333if(bx_get('cat') !== false) 
    34     $mixedCategory = bx_get('cat'); 
     34    $mixedCategory = bx_get('cat'); 
    3535 
    3636$oSettings = new BxDolAdminSettings($mixedCategory); 
     
    5252$_page_cont[$iNameIndex]['page_main_code'] = $oSettings->getForm(); 
    5353if (26 == $mixedCategory) { 
    54     define('BX_PROMO_CODE', adm_hosting_promo()); 
     54    define('BX_PROMO_CODE', adm_hosting_promo()); 
    5555} 
    5656 
  • trunk/administration/templates/base/_footer.html

    r10490 r15211  
    1        <bx_injection:injection_footer /> 
     1       <bx_injection:injection_footer /> 
    22    </body> 
    33</html> 
  • trunk/administration/templates/base/_header.html

    r15201 r15211  
    33    <head> 
    44        <meta http-equiv="Content-Type" content="text/html; charset=__page_charset__" /> 
    5         <title>__page_header__</title>       
     5        <title>__page_header__</title> 
    66 
    77        <bx_include_css /> 
     
    1515            var site_url = '<bx_url_root />'; 
    1616            var glUserInfoDisabled = 'yes'; 
    17         </script>        
     17        </script> 
    1818        __extra_js__ 
    1919 
  • trunk/administration/templates/base/_sub_header.html

    r15201 r15211  
    44 
    55        <div id="bx-logo-container" class="bx-def-margin-top"> 
    6                 <img src="<bx_image_url:logo.png />" />              
     6                <img src="<bx_image_url:logo.png />" /> 
    77        </div> 
    88 
     
    1313        <div class="bx-def-margin-top"> 
    1414 
    15             <table id="bx-admin-page-table"> 
    16                 <tr> 
    17                     <td class="bx-adm-middle-menu"> 
     15            <table id="bx-admin-page-table"> 
     16                <tr> 
     17                    <td class="bx-adm-middle-menu"> 
    1818                        __main_menu__ 
    1919                        __boonex_promo__ 
    20                     </td> 
    21                      
    22                     <td class="bx-adm-middle-main" id="main_cont"> 
     20                    </td> 
     21 
     22                    <td class="bx-adm-middle-main" id="main_cont"> 
    2323 
    2424                        <div id="bx-adm-page-content-container" class="bx-def-padding-left"> 
    2525 
    2626                            <div class="bx-def-padding-bottom"> 
    27                                 <h1 id="bx-adm-page-header">__page_header__</h1> 
    28                             </div> 
     27                                <h1 id="bx-adm-page-header">__page_header__</h1> 
     28                            </div> 
    2929 
    30                             <div id="bx-adm-page-content"> 
     30                            <div id="bx-adm-page-content"> 
  • trunk/administration/templates/base/antispam_dnsbl_recheck.html

    r15201 r15211  
    1111                var iId = m[1]; 
    1212                var eStatus = this; 
    13                 $(this).html('Checking...');                 
     13                $(this).html('Checking...'); 
    1414                $.post('__admin_url__antispam.php', {action: '__action__', id: iId, 'test': sTest}, function (sRet) { 
    1515                    if ('LISTED' == sRet) { 
    16                         $(eStatus).html('__txt_listed__');  
     16                        $(eStatus).html('__txt_listed__'); 
    1717                    } 
    1818                    else if ('NOT LISTED' == sRet) { 
     
    3737            </tr> 
    3838        </bx_repeat:items> 
    39     </table>         
     39    </table> 
    4040</div> 
  • trunk/administration/templates/base/antispam_manage_dnsbl.html

    r15201 r15211  
    3232            </tr> 
    3333        </bx_repeat:items> 
    34      
     34 
    3535    </table> 
    3636    __controls__ 
  • trunk/administration/templates/base/boonex_promo.html

    r15201 r15211  
    11<div class="bx-adm-boonex-promo bx-def-padding bx-def-border bx-def-margin-top"> 
    2     <div> 
    3         <a target="_blank" href="http://www.boonex.com/payment.php"><bx_text:_adm_txt_boonex_promo_title /></a> 
    4         <bx_text:_adm_txt_boonex_promo_text /> 
    5     </div> 
     2    <div> 
     3        <a target="_blank" href="http://www.boonex.com/payment.php"><bx_text:_adm_txt_boonex_promo_title /></a> 
     4        <bx_text:_adm_txt_boonex_promo_text /> 
     5    </div> 
    66</div> 
  • trunk/administration/templates/base/categories.html

    r15201 r15211  
    33<div class="adm-category-items"> 
    44    <bx_repeat:items> 
    5         <div class="adm-category-item">  
    6             <img src="__icon__" /> 
    7             <div class="adm-ci-link"><a href="__link__" __onclick__>__title__</a></div> 
    8             <div class="adm-ci-description">__description__</div> 
     5        <div class="adm-category-item"> 
     6            <img src="__icon__" /> 
     7            <div class="adm-ci-link"><a href="__link__" __onclick__>__title__</a></div> 
     8            <div class="adm-ci-description">__description__</div> 
    99        </div> 
    1010    </bx_repeat:items> 
  • trunk/administration/templates/base/css/activityTrac.css

    r15201 r15211  
    22 
    33.alertUnit { 
    4     position: relative; 
    5     width: 600px; 
    6     margin: 5px 0px 5px 0px; 
     4    position: relative; 
     5    width: 600px; 
     6    margin: 5px 0px 5px 0px; 
    77} 
    88.alertUnit div { 
    9     text-align: center; 
    10     position: relative; 
    11     float: left; 
     9    text-align: center; 
     10    position: relative; 
     11    float: left; 
    1212} 
    1313.alertRcpt { 
    14     width: 60px; 
     14    width: 60px; 
    1515} 
    1616.alertMessage { 
    17     width: 340px; 
     17    width: 340px; 
    1818} 
    1919.alertDate { 
    20     width: 120px; 
     20    width: 120px; 
    2121} 
  • trunk/administration/templates/base/css/admin.css

    r15201 r15211  
    22 
    33table#bx-admin-page-table { 
    4    border-collapse:collapse;  
     4   border-collapse:collapse; 
    55} 
    66 
     
    1010} 
    1111 
    12 td.bx-adm-middle-menu {     
    13     width: 300px; 
    14      
    15     border: 0px;     
     12td.bx-adm-middle-menu { 
     13    width: 300px; 
     14 
     15    border: 0px; 
    1616} 
    1717 
     
    3838div.menu_categ_hover_header { 
    3939    height: 44px; 
    40     padding-left: 44px; 
     40    padding-left: 44px; 
    4141 
    42     z-index: 5;  
    43      
     42    z-index: 5; 
     43 
    4444    border:1px solid #ddd; 
    4545    background-color:#fff; 
    4646 
    47     line-height: 44px; 
    48     font-size: 16px; 
    49     font-weight: bold; 
     47    line-height: 44px; 
     48    font-size: 16px; 
     49    font-weight: bold; 
    5050} 
    5151div.adm-mmh-hover { 
    52     border:1px solid #999; 
     52    border:1px solid #999; 
    5353} 
    5454div.adm-mmh-active { 
    55     border:1px solid #ccc; 
     55    border:1px solid #ccc; 
    5656} 
    5757div.adm-mmh-opened { 
    58     border:1px solid #ccc; 
     58    border:1px solid #ccc; 
    5959} 
    6060 
    6161img.adm-menu-icon { 
    6262    top: -5px; 
    63     left: 7px; 
     63    left: 7px; 
    6464 
    65     position: absolute;  
    66     z-index: 10; 
     65    position: absolute; 
     66    z-index: 10; 
    6767} 
    6868 
     
    7272    width: 17px; 
    7373    height: 17px; 
    74      
    75     position: absolute; 
    76     z-index: 5;  
    77          
    78     background-image: url(../images/mm_item_arrow_bg.png); 
    79     background-repeat: no-repeat; 
    80     background-position: 0px 0px; 
    81      
    82     cursor:pointer; 
     74 
     75    position: absolute; 
     76    z-index: 5; 
     77 
     78    background-image: url(../images/mm_item_arrow_bg.png); 
     79    background-repeat: no-repeat; 
     80    background-position: 0px 0px; 
     81 
     82    cursor:pointer; 
    8383} 
    8484img.adm-mma-opened { 
     
    9090    padding: 5px 0px; 
    9191 
    92     border: 1px solid #ccc; 
    93     border-top: none; 
     92    border: 1px solid #ccc; 
     93    border-top: none; 
    9494    background-color: #f6f6f6; 
    95      
    96     position: relative; 
    97     z-index: 1; 
    98     display: none; 
    99      
    100      
    101     font-size: 13px;     
    102     color: black; 
     95 
     96    position: relative; 
     97    z-index: 1; 
     98    display: none; 
     99 
     100 
     101    font-size: 13px; 
     102    color: black; 
    103103} 
    104104div.adm-mmi-opened { 
     
    108108div.adm-menu-item-wrapper { 
    109109    height: 26px; 
    110     padding-left: 33px; 
    111      
    112     position: relative; 
     110    padding-left: 33px; 
     111 
     112    position: relative; 
    113113 
    114114    line-height: 26px; 
     
    117117img.adm-menu-item-icon { 
    118118    top: 5px; 
    119     left: 9px; 
    120     width: 16px; 
    121     height: 16px; 
    122      
    123     position: absolute;  
    124     z-index: 5; 
     119    left: 9px; 
     120    width: 16px; 
     121    height: 16px; 
     122 
     123    position: absolute; 
     124    z-index: 5; 
    125125} 
    126126 
  • trunk/administration/templates/base/css/anchor.css

    r15201 r15211  
    22 
    33a, a:link { 
    4     color:#3333CC; 
    5     font-family:Verdana,Arial; 
     4    color:#3333CC; 
     5    font-family:Verdana,Arial; 
    66} 
    77a:visited { 
    8     color:#000099; 
     8    color:#000099; 
    99} 
    1010 
    1111a:hover, a:active { 
    12     color:#3333CC; 
     12    color:#3333CC; 
    1313} 
    1414 
    1515a, a:link, a:visited, a:active { 
    16     text-decoration:none; 
     16    text-decoration:none; 
    1717} 
    1818a:hover { 
    19     text-decoration:underline; 
     19    text-decoration:underline; 
    2020} 
  • trunk/administration/templates/base/css/dashboard.css

    r15201 r15211  
    99 
    1010    position: relative; 
    11     float: left;     
     11    float: left; 
    1212} 
    1313div.adm-dashboard-item { 
     
    1515    height: 73px; 
    1616    margin-bottom: 10px; 
    17      
     17 
    1818    position: relative; 
    1919 
     
    2525    width: 73px; 
    2626    height: 73px; 
    27      
     27 
    2828    position: absolute; 
    29      
     29 
    3030    background-repeat: no-repeat; 
    3131    background-position: center; 
    3232} 
    33 div.adm-di-title,  
     33div.adm-di-title, 
    3434div.adm-di-content { 
    3535    margin: 0px 10px 0px 73px; 
  • trunk/administration/templates/base/css/fields.css

    r15201 r15211  
    33#main_container {} 
    44#tabs_container { 
    5     position:relative; 
     5    position:relative; 
    66} 
    77 
     
    1010#mode_switcher_2 ul, 
    1111#mode_switcher_3 ul { 
    12     margin: 0px; 
    13     padding: 5px; 
    14  
    15     list-style: none;    
     12    margin: 0px; 
     13    padding: 5px; 
     14 
     15    list-style: none; 
    1616} 
    1717 
     
    2020#mode_switcher_3 ul li { 
    2121    margin:0px; 
    22     float:left; 
    23     line-height: 14px; 
     22    float:left; 
     23    line-height: 14px; 
    2424} 
    2525 
     
    2727#mode_switcher_2 ul li a , 
    2828#mode_switcher_3 ul li a { 
    29     cursor:default; 
    30     padding:3px 7px 3px 18px; 
    31     font-size:12px; 
    32     display:block; 
    33     background-position:3px 3px; 
    34     background-repeat:no-repeat; 
    35     background-image:url(../images/radio.gif); 
     29    cursor:default; 
     30    padding:3px 7px 3px 18px; 
     31    font-size:12px; 
     32    display:block; 
     33    background-position:3px 3px; 
     34    background-repeat:no-repeat; 
     35    background-image:url(../images/radio.gif); 
    3636} 
    3737 
     
    5151#mode_switcher_3 ul li a:active, 
    5252#mode_switcher_3 ul li a:visited { 
    53     color:#000000; 
    54     text-decoration:none; 
     53    color:#000000; 
     54    text-decoration:none; 
    5555} 
    5656 
     
    5959#mode_switcher_3 ul li.ui-tabs-selected a 
    6060{ 
    61     background-image:url(../images/radio_active.gif); 
     61    background-image:url(../images/radio_active.gif); 
    6262} 
    6363 
     
    6565 
    6666.build_container { 
    67     padding:15px; 
    68     font-size:11px; 
     67    padding:15px; 
     68    font-size:11px; 
    6969} 
    7070 
    7171.build_zone_header { 
    72     font-weight:bold; 
     72    font-weight:bold; 
    7373} 
    7474 
    7575.blocks_cont_bord { 
    76     border:1px solid #cccccc; 
    77      
     76    border:1px solid #cccccc; 
     77 
    7878} 
    7979 
    8080.blocks_container { 
    81     background-color:#ffffff; 
    82     padding:6px; 
     81    background-color:#ffffff; 
     82    padding:6px; 
    8383} 
    8484 
     
    8888.build_block, 
    8989.build_block_inactive { 
    90     width:142px; 
    91     float:left; 
    92     margin-left:2px; 
    93     margin-right:2px; 
    94     /*position:relative;*/ 
     90    width:142px; 
     91    float:left; 
     92    margin-left:2px; 
     93    margin-right:2px; 
     94    /*position:relative;*/ 
    9595} 
    9696 
    9797.build_block_header { 
    98     padding-top:7px; 
    99     height:21px; 
    100     background-image:url(../images/block_header.gif); 
    101     text-align:center; 
    102     color:#999999; 
    103     cursor:move; 
    104     margin-top:2px; 
    105     margin-bottom:2px; 
    106      
    107     background-repeat:no-repeat; 
     98    padding-top:7px; 
     99    height:21px; 
     100    background-image:url(../images/block_header.gif); 
     101    text-align:center; 
     102    color:#999999; 
     103    cursor:move; 
     104    margin-top:2px; 
     105    margin-bottom:2px; 
     106 
     107    background-repeat:no-repeat; 
    108108} 
    109109 
    110110.build_block_hover { 
    111     border: 1px dotted #999999; 
     111    border: 1px dotted #999999; 
    112112} 
    113113 
     
    116116 
    117117.build_item_active { 
    118     width:117px; 
    119     height:21px; 
    120     padding-left:25px; 
    121     padding-top:7px; 
    122     background-image:url(../images/block_item_bg.gif); 
    123     color: #6666cc; 
    124     margin-top:2px; 
    125     margin-bottom:2px; 
    126     cursor:move; 
     118    width:117px; 
     119    height:21px; 
     120    padding-left:25px; 
     121    padding-top:7px; 
     122    background-image:url(../images/block_item_bg.gif); 
     123    color: #6666cc; 
     124    margin-top:2px; 
     125    margin-bottom:2px; 
     126    cursor:move; 
    127127} 
    128128 
    129129.build_item_hover { 
    130     border: 1px dotted #999999; 
     130    border: 1px dotted #999999; 
    131131} 
    132132 
     
    139139.build_item_fake, 
    140140.build_block_fake { 
    141     height:2px; 
    142     font-size:1px; 
    143     /*background-color:yellow;*/ 
     141    height:2px; 
     142    font-size:1px; 
     143    /*background-color:yellow;*/ 
    144144} 
    145145 
    146146.build_inac_items_col { 
    147     width:142px; 
    148     margin-left:2px; 
    149     margin-right:2px; 
    150     float:left; 
    151     min-height:1px; 
    152     position:relative; 
    153     /*background-color:red;*/ 
     147    width:142px; 
     148    margin-left:2px; 
     149    margin-right:2px; 
     150    float:left; 
     151    min-height:1px; 
     152    position:relative; 
     153    /*background-color:red;*/ 
    154154} 
    155155 
    156156.build_block_inactive_items { 
    157     width:744px; 
     157    width:744px; 
    158158} 
    159159 
    160160*html .build_block_inactive_items { 
    161     width:748px; 
     161    width:748px; 
    162162} 
    163163 
     
    167167 
    168168.ui-tabs-container { 
    169     clear:both; 
     169    clear:both; 
    170170} 
    171171 
    172172.ui-tabs-hide { 
    173     display:none; 
     173    display:none; 
    174174} 
    175175 
     
    177177 
    178178#fieldFormWrap { 
    179     background-image:url(../images/sp_op.png); 
    180     position:absolute; 
    181     z-index:100; 
     179    background-image:url(../images/sp_op.png); 
     180    position:absolute; 
     181    z-index:100; 
    182182} 
    183183 
    184184* html #fieldFormWrap 
    185185{ 
    186     background-image:url( ../images/spacer.gif ); 
    187     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op.png', sizingMethod='scale'); 
     186    background-image:url( ../images/spacer.gif ); 
     187    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op.png', sizingMethod='scale'); 
    188188} 
    189189 
    190190 
    191191#edit_form_cont { 
    192     position:relative; 
     192    position:relative; 
    193193    z-index: 1000; 
    194194} 
    195195 
    196196.notify_msg { 
    197     color:green; 
    198     text-align:center; 
     197    color:green; 
     198    text-align:center; 
    199199} 
    200200 
    201201.error_msg { 
    202     color:red; 
    203     text-align:center; 
     202    color:red; 
     203    text-align:center; 
    204204} 
    205205 
     
    210210.popup_form_wrapper 
    211211{ 
    212     border-collapse:collapse; 
    213     margin:0px; 
    214     padding:0px; 
    215     width:482px; 
     212    border-collapse:collapse; 
     213    margin:0px; 
     214    padding:0px; 
     215    width:482px; 
    216216} 
    217217 
    218218.popup_form_wrapper td 
    219219{ 
    220     padding:0px; 
    221     margin:0px; 
     220    padding:0px; 
     221    margin:0px; 
    222222} 
    223223 
    224224.popup_form_wrapper td.corner 
    225225{ 
    226     width:16px; 
    227     height:16px; 
    228     font-size:1px; 
     226    width:16px; 
     227    height:16px; 
     228    font-size:1px; 
    229229} 
    230230 
    231231.popup_form_wrapper td.side 
    232232{ 
    233     width:16px; 
     233    width:16px; 
    234234} 
    235235 
    236236.popup_form_wrapper td.side_ver 
    237237{ 
    238     height:16px; 
     238    height:16px; 
    239239} 
    240240 
     
    242242.popup_form_wrapper td.side 
    243243{ 
    244     background-image:url(../images/sp_op_gr.png); 
    245     font-size:1px; 
     244    background-image:url(../images/sp_op_gr.png); 
     245    font-size:1px; 
    246246} 
    247247 
     
    249249* html .popup_form_wrapper td.side 
    250250{ 
    251     background-image:url( ../images/spacer.gif ); 
    252     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op_gr.png', sizingMethod='scale'); 
     251    background-image:url( ../images/spacer.gif ); 
     252    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op_gr.png', sizingMethod='scale'); 
    253253} 
    254254 
     
    256256.popup_form_wrapper td.container 
    257257{ 
    258     background-color:white; 
    259     width:450px; 
     258    background-color:white; 
     259    width:450px; 
    260260} 
    261261 
    262262.edit_item_table_cont 
    263263{ 
    264     position:relative;       
     264    position:relative; 
    265265} 
    266266 
     
    269269 
    270270.field_edit_tab { 
    271     border-collapse:collapse; 
    272     width:100%; 
     271    border-collapse:collapse; 
     272    width:100%; 
    273273} 
    274274 
    275275.field_edit_tab td.label { 
    276     width:40%; 
    277     text-align:right; 
    278     font-weight:bold; 
    279     padding:5px; 
    280     vertical-align:center; 
     276    width:40%; 
     277    text-align:right; 
     278    font-weight:bold; 
     279    padding:5px; 
     280    vertical-align:center; 
    281281} 
    282282 
    283283.field_edit_tab td.warned { 
    284     background-color:#f20000; 
     284    background-color:#f20000; 
    285285} 
    286286 
    287287.field_edit_tab td.value { 
    288     width:40%; 
    289     text-align:left; 
    290     padding:5px; 
    291     vertical-align:center; 
     288    width:40%; 
     289    text-align:left; 
     290    padding:5px; 
     291    vertical-align:center; 
    292292} 
    293293 
    294294.field_edit_tab td.info { 
    295     width:20%; 
    296     text-align:left; 
    297     padding:5px; 
    298     vertical-align:center; 
     295    width:20%; 
     296    text-align:left; 
     297    padding:5px; 
     298    vertical-align:center; 
    299299} 
    300300 
    301301.field_edit_tab td.buttons { 
    302     text-align:center; 
     302    text-align:center; 
    303303} 
    304304 
    305305.field_edit_tab td.buttons input { 
    306     margin:5px; 
     306    margin:5px; 
    307307} 
    308308 
     
    310310.field_edit_tab select.select_type, 
    311311.field_edit_tab textarea.input_text { 
    312     width:170px; 
    313     border:1px solid #ccc; 
     312    width:170px; 
     313    border:1px solid #ccc; 
    314314} 
    315315 
    316316.field_edit_tab select.select_page { 
    317     border: 1px solid #ccc; 
    318     width: 45px; 
     317    border: 1px solid #ccc; 
     318    width: 45px; 
    319319} 
    320320 
    321321input.input_checkbox { 
    322     /*border:1px solid #ccc;*/ 
     322    /*border:1px solid #ccc;*/ 
    323323} 
    324324 
    325325.field_edit_tab select.select_multiple { 
    326     width:170px; 
    327     height:75px; 
    328     border:1px solid #ccc; 
     326    width:170px; 
     327    height:75px; 
     328    border:1px solid #ccc; 
    329329} 
    330330 
    331331.field_edit_tab textarea.input_text { 
    332     height:62px; 
    333     font-family: Arial,Helvetica,sans-serif; 
    334     font-size:12px; 
     332    height:62px; 
     333    font-family: Arial,Helvetica,sans-serif; 
     334    font-size:12px; 
    335335} 
    336336 
    337337img.info_icon, 
    338338img.depr_icon { 
    339     width: 16px; 
    340     height:16px; 
    341     cursor:help; 
    342     margin:2px; 
     339    width: 16px; 
     340    height:16px; 
     341    cursor:help; 
     342    margin:2px; 
    343343} 
    344344 
     
    346346 
    347347ul#form_tabs_switcher { 
    348     margin:0px; 
    349     margin-bottom:3px; 
    350     padding:0px; 
    351     border-bottom:1px solid #ccc; 
    352     list-style:none; 
    353     height:25px; 
     348    margin:0px; 
     349    margin-bottom:3px; 
     350    padding:0px; 
     351    border-bottom:1px solid #ccc; 
     352    list-style:none; 
     353    height:25px; 
    354354} 
    355355 
    356356ul#form_tabs_switcher li { 
    357     float:left; 
    358     padding:5px; 
     357    float:left; 
     358    padding:5px; 
    359359} 
    360360 
    361361ul#form_tabs_switcher li.ui-tabs-selected { 
    362     background-color:#ccc; 
    363      
    364 } 
     362    background-color:#ccc; 
     363 
     364} 
  • trunk/administration/templates/base/css/general.css

    r15201 r15211  
    88} 
    99div#FloatDesc { 
    10     position:absolute; 
    11     display:none; 
    12     z-index:10000; 
    13     background-color:#ffffe0; 
    14     border:1px solid #000000; 
    15     padding:3px; 
    16     width:180px; 
     10    position:absolute; 
     11    display:none; 
     12    z-index:10000; 
     13    background-color:#ffffe0; 
     14    border:1px solid #000000; 
     15    padding:3px; 
     16    width:180px; 
    1717} 
    1818 
    1919form, p { 
    20     margin:0px; 
    21     padding:0px; 
     20    margin:0px; 
     21    padding:0px; 
    2222} 
    2323 
    2424a img { 
    25     border:none; 
     25    border:none; 
    2626} 
    2727 
    2828.err { 
    29     color: #FF0000; 
     29    color: #FF0000; 
    3030} 
    3131 
    3232/*--- Top Header ---*/ 
    3333div.adm-header { 
    34     height: 87px;     
    35  
    36     position: relative;  
     34    height: 87px; 
     35 
     36    position: relative; 
    3737 
    3838    border-bottom: 1px solid #c8c8c8; 
    39     background-image: url(../images/header_bg.png); 
    40     background-repeat: repeat-x; 
    41     background-position: 0px 0px;    
     39    background-image: url(../images/header_bg.png); 
     40    background-repeat: repeat-x; 
     41    background-position: 0px 0px; 
    4242} 
    4343div.adm-header-content { 
     
    4646} 
    4747 
    48 img.adm-header-logo {    
    49     top: 0px; 
    50     left: 0px; 
    51     width: 105px; 
    52     height: 116px; 
    53  
    54     position:absolute; 
     48img.adm-header-logo { 
     49    top: 0px; 
     50    left: 0px; 
     51    width: 105px; 
     52    height: 116px; 
     53 
     54    position:absolute; 
    5555} 
    5656div.adm-header-title { 
     
    5959    position: relative; 
    6060    float: left; 
    61      
    62     line-height: 87px;     
     61 
     62    line-height: 87px; 
    6363    font-family: Copperplate Gothic Bold; 
    64     font-size: 48px; 
    65     font-weight: bold; 
    66     color: #333333; 
     64    font-size: 48px; 
     65    font-weight: bold; 
     66    color: #333333; 
    6767} 
    6868div.adm-header-verion { 
     
    7272    height: 10px; 
    7373    position: absolute; 
    74      
     74 
    7575    line-height: 9px; 
    7676    font-family: Verdana; 
     
    100100    margin: 0px; 
    101101    padding: 0px; 
    102      
     102 
    103103    display: block; 
    104104 
     
    129129table.adm-middle { 
    130130    width: 900px; 
    131     margin: 0px auto; 
    132     padding: 0px; 
    133      
    134     border: 0px; 
     131    margin: 0px auto; 
     132    padding: 0px; 
     133 
     134    border: 0px; 
    135135} 
    136136td.adm-middle-menu { 
    137     width: 214px; 
    138     padding: 0px; 
    139     margin: 0px; 
    140      
    141     border: 0px; 
    142  
    143     vertical-align: top; 
     137    width: 214px; 
     138    padding: 0px; 
     139    margin: 0px; 
     140 
     141    border: 0px; 
     142 
     143    vertical-align: top; 
    144144} 
    145145td.adm-middle-main { 
    146146    padding: 0px; 
    147     margin: 0px; 
    148  
    149     background-repeat: no-repeat; 
    150     background-position: 470px 0px; 
    151     vertical-align: top; 
     147    margin: 0px; 
     148 
     149    background-repeat: no-repeat; 
     150    background-position: 470px 0px; 
     151    vertical-align: top; 
    152152} 
    153153 
    154154div.adm-page-header { 
    155155    margin: 0px 0px 20px 34px; 
    156      
    157     font-weight: bold; 
    158     font-size: 30px; 
     156 
     157    font-weight: bold; 
     158    font-size: 30px; 
    159159} 
    160160div.adm-page-content { 
    161     margin: 0px 0px 0px 34px; 
     161    margin: 0px 0px 0px 34px; 
    162162} 
    163163 
     
    165165/*--- Footer Part ---*/ 
    166166div.adm-footer { 
    167     position:relative; 
    168     height: 73px;    
    169  
    170     background-color: #6e6e6e; 
    171     background-repeat: repeat-x; 
    172     background-image: url(../images/bottom_bord.gif); 
    173  
    174     font-size: 14px; 
    175     line-height: 20px; 
    176     color: #ffffff; 
     167    position:relative; 
     168    height: 73px; 
     169 
     170    background-color: #6e6e6e; 
     171    background-repeat: repeat-x; 
     172    background-image: url(../images/bottom_bord.gif); 
     173 
     174    font-size: 14px; 
     175    line-height: 20px; 
     176    color: #ffffff; 
    177177} 
    178178.adm-footer-logo { 
    179     position:absolute;  
    180     top:20px;  
    181     right:20px; 
     179    position:absolute; 
     180    top:20px; 
     181    right:20px; 
    182182} 
    183183div.adm-footer-content { 
     
    190190div.adm-footer a:hover, 
    191191div.adm-footer a:active { 
    192     color:#ffffff; 
     192    color:#ffffff; 
    193193} 
    194194 
     
    196196/*--- DesignBox ---*/ 
    197197div.adm-design-box { 
    198     margin-bottom: 10px; 
    199      
    200     border: 1px solid #CCC; 
    201     background-image: url(../images/head_bg.gif); 
    202     background-repeat: repeat-x; 
    203     background-color: #fff; 
     198    margin-bottom: 10px; 
     199 
     200    border: 1px solid #CCC; 
     201    background-image: url(../images/head_bg.gif); 
     202    background-repeat: repeat-x; 
     203    background-color: #fff; 
    204204} 
    205205div.adm-db-head { 
    206     height: 28px;    
    207     position: relative; 
    208     border-bottom: 1px solid #ccc; 
    209  
    210     line-height: 28px; 
    211     text-indent: 10px; 
    212     text-align: left; 
    213     text-transform: capitalize; 
    214      
    215     font-size: 12px;     
    216     font-weight: bold; 
    217     font-family: Verdana,Arial; 
    218     color: #333;         
     206    height: 28px; 
     207    position: relative; 
     208    border-bottom: 1px solid #ccc; 
     209 
     210    line-height: 28px; 
     211    text-indent: 10px; 
     212    text-align: left; 
     213    text-transform: capitalize; 
     214 
     215    font-size: 12px; 
     216    font-weight: bold; 
     217    font-family: Verdana,Arial; 
     218    color: #333; 
    219219} 
    220220div.adm-db-content { 
    221     padding: 1px; 
    222     font-size: 11px; 
     221    padding: 1px; 
     222    font-size: 11px; 
    223223} 
    224224div.adm-db-control-panel { 
    225225    height: 30px; 
    226      
     226 
    227227    background-color: #ededed; 
    228      
     228 
    229229    line-height: 30px; 
    230230    font-size: 11px; 
    231231} 
    232232div.adm-db-content-wrapper { 
    233     padding: 9px; 
    234     position: relative; 
     233    padding: 9px; 
     234    position: relative; 
    235235} 
    236236div.adm-design-box div.adm-db-head .dbTopMenu { 
    237237    top: 0px; 
    238     right: 1px; 
    239  
    240     position: absolute; 
    241  
    242     text-transform: capitalize; 
    243     text-indent: 0px; 
    244     white-space: nowrap; 
    245  
    246     font-size: 11px; 
    247     font-weight: bold; 
    248     color: #333; 
    249 } 
    250 .dbTopMenu div.active,  
     238    right: 1px; 
     239 
     240    position: absolute; 
     241 
     242    text-transform: capitalize; 
     243    text-indent: 0px; 
     244    white-space: nowrap; 
     245 
     246    font-size: 11px; 
     247    font-weight: bold; 
     248    color: #333; 
     249} 
     250.dbTopMenu div.active, 
    251251.dbTopMenu div.notActive { 
    252     float: left; 
    253     padding: 0px 5px; 
    254     border-left: 0px solid #ccc; 
    255     height: 28px; 
    256     line-height: 28px; 
    257     position: relative; 
    258     font-weight: normal; 
     252    float: left; 
     253    padding: 0px 5px; 
     254    border-left: 0px solid #ccc; 
     255    height: 28px; 
     256    line-height: 28px; 
     257    position: relative; 
     258    font-weight: normal; 
    259259} 
    260260.dbTopMenu div a, 
     
    263263.dbTopMenu div a:active, 
    264264.dbTopMenu div a:visited { 
    265     color: #666; 
    266     font-family:Verdana,Arial; 
    267     font-size:11px; 
     265    color: #666; 
     266    font-family:Verdana,Arial; 
     267    font-size:11px; 
    268268} 
    269269.dbTopMenu div.active { 
    270     background:transparent url(../images/head_ti_left.gif) no-repeat scroll 0%; 
    271     cursor:pointer; 
    272     display:block; 
    273     float:left; 
    274     height:28px; 
    275     line-height:28px; 
    276     padding:0pt 0pt 0pt 5px; 
     270    background:transparent url(../images/head_ti_left.gif) no-repeat scroll 0%; 
     271    cursor:pointer; 
     272    display:block; 
     273    float:left; 
     274    height:28px; 
     275    line-height:28px; 
     276    padding:0pt 0pt 0pt 5px; 
    277277} 
    278278.dbTopMenu .active span { 
    279     background:transparent url(../images/head_ti_right.gif) repeat-y scroll right top; 
    280     display:block; 
    281     float:left; 
    282     height:28px; 
    283     padding:0pt 5px 0pt 0px; 
     279    background:transparent url(../images/head_ti_right.gif) repeat-y scroll right top; 
     280    display:block; 
     281    float:left; 
     282    height:28px; 
     283    padding:0pt 5px 0pt 0px; 
    284284} 
    285285div.adm-db-head div.notActiveIcon { 
    286     background-position: 0px 5px; 
    287     background-repeat: no-repeat; 
    288     padding-left: 18px; 
     286    background-position: 0px 5px; 
     287    background-repeat: no-repeat; 
     288    padding-left: 18px; 
    289289} 
    290290div.adm-design-box div.adm-db-close { 
     
    303303 
    304304/* top settings */ 
    305 div.top_settings_block  
     305div.top_settings_block 
    306306{ 
    307     background-color:#EDEDED; 
    308     height:30px; 
    309     width:100%; 
    310     color:#666666; 
    311 } 
    312  
    313 div.top_settings_block div.ordered_block  
     307    background-color:#EDEDED; 
     308    height:30px; 
     309    width:100%; 
     310    color:#666666; 
     311} 
     312 
     313div.top_settings_block div.ordered_block 
    314314{ 
    315     padding-top:5px; 
    316     padding-left:9px; 
    317     float:left; 
    318 } 
    319  
    320 div.top_settings_block div.per_page_block  
     315    padding-top:5px; 
     316    padding-left:9px; 
     317    float:left; 
     318} 
     319 
     320div.top_settings_block div.per_page_block 
    321321{ 
    322     padding-top:5px; 
    323     float:right; 
    324     padding-right:9px; 
     322    padding-top:5px; 
     323    float:right; 
     324    padding-right:9px; 
    325325} 
    326326 
     
    336336} 
    337337 
    338 .sys-adm-enabled {     
     338.sys-adm-enabled { 
    339339    color:#fff; 
    340340    background-color:#0b0; 
    341341} 
    342342 
    343 .sys-adm-disabled {     
     343.sys-adm-disabled { 
    344344    color:#fff; 
    345345    background-color:#d00; 
  • trunk/administration/templates/base/css/index.css

    r15201 r15211  
    66} 
    77div.adm-category-item { 
    8     position: relative;  
    9     margin-bottom: 10px; 
     8    position: relative; 
     9    margin-bottom: 10px; 
    1010} 
    1111div.adm-category-item img { 
    1212    top: 3px; 
    13     left: 7px; 
    14     position: absolute;  
     13    left: 7px; 
     14    position: absolute; 
    1515} 
    1616div.adm-ci-link { 
    17     margin-left: 35px; 
    18      
    19     line-height: 20px; 
    20     font-size: 18px; 
    21     font-weight: bold;   
     17    margin-left: 35px; 
     18 
     19    line-height: 20px; 
     20    font-size: 18px; 
     21    font-weight: bold; 
    2222} 
    2323div.adm-ci-description { 
    24     margin-left: 35px; 
     24    margin-left: 35px; 
    2525 
    26     font-size: 13px; 
     26    font-size: 13px; 
    2727} 
    2828 
     
    4141} 
    4242div.adm-news-item { 
    43     padding-bottom: 8px; 
     43    padding-bottom: 8px; 
    4444} 
    4545/*div.adm-ni-title { 
    46     font-size: 12px; 
     46    font-size: 12px; 
    4747    font-weight:bold; 
    48     color: #3333cc; 
     48    color: #3333cc; 
    4949}*/ 
    5050div.adm-ni-title a, 
     
    6565} 
    6666span.adm-ni-date { 
    67     color: #999999; 
     67    color: #999999; 
    6868    display:block; 
    6969    font-size:9px; 
  • trunk/administration/templates/base/css/lang_file.css

    r15201 r15211  
    2525div.adm-lk-chb-apply { 
    2626    position: relative; 
    27     float: left;     
     27    float: left; 
    2828} 
    2929div.adm-lk-btn-new { 
     
    3434div.adm-lk-keys { 
    3535    margin: 10px; 
    36     padding: 0px;     
     36    padding: 0px; 
    3737} 
    3838div.adm-lk-key { 
     
    4444div#adm-langs-add-key, 
    4545div#adm-langs-edit-key { 
    46     width: 562px;     
     46    width: 562px; 
    4747} 
    4848div#adm-langs-add-key table.popup_form_wrapper, 
     
    7272    width: 480px; 
    7373    height: 295px; 
    74     position: relative; 
     74    position: relative; 
    7575 
    7676    overflow-y: scroll; 
    77     overflow-x: hidden; 
     77    overflow-x: hidden; 
    7878} 
    7979div#adm-langs-add-key-content table.form_advanced_table, 
     
    8181div#adm-langs-add-key-content table.form_advanced_table tr, 
    8282div#adm-langs-edit-key-content table.form_advanced_table tr { 
    83     width: 478px; 
    84     overflow: hidden; 
     83    width: 478px; 
     84    overflow: hidden; 
    8585} 
    8686 
  • trunk/administration/templates/base/css/login.css

    r15201 r15211  
    77 
    88a img { 
    9     border: none; 
     9    border: none; 
    1010} 
    1111 
     
    1616 
    1717.admin_login_wrapper { 
    18     background-image: url(../images/admin_login_bg.png); 
    19     background-repeat: no-repeat; 
    20     width: 680px; 
    21     height: 400px; 
    22      
     18    background-image: url(../images/admin_login_bg.png); 
     19    background-repeat: no-repeat; 
     20    width: 680px; 
     21    height: 400px; 
     22 
    2323    position:absolute; 
    2424    top:50%; 
     
    2626    margin-left:-340px; 
    2727    margin-top:-146px; 
    28      
    29     overflow: hidden; 
    30          
    31     color: #333333; 
     28 
     29    overflow: hidden; 
     30 
     31    color: #333333; 
    3232} 
    3333 
     
    3636.admin_login_wrapper a:visited 
    3737{ 
    38     color: #3333cc; 
    39     text-decoration: none; 
     38    color: #3333cc; 
     39    text-decoration: none; 
    4040} 
    4141 
     
    4343.admin_login_wrapper a:active 
    4444{ 
    45     text-decoration: underline; 
     45    text-decoration: underline; 
    4646} 
    4747 
    4848.admin_login_icon { 
    49     width: 159px; 
    50     height: 200px; 
    51     float: right; 
    52     margin-right: 45px; 
    53     margin-top: 40px; 
    54     position: relative; 
     49    width: 159px; 
     50    height: 200px; 
     51    float: right; 
     52    margin-right: 45px; 
     53    margin-top: 40px; 
     54    position: relative; 
    5555} 
    5656 
    5757.admin_login_form_wrapper { 
    58     margin-top: 50px; 
    59     margin-left: 35px; 
     58    margin-top: 50px; 
     59    margin-left: 35px; 
    6060} 
    6161 
    6262.admin_license_form_wrapper { 
    63     margin-left: 15px; 
    64     margin-top: 25px; 
     63    margin-left: 15px; 
     64    margin-top: 25px; 
    6565} 
    6666 
    6767.admin_login_table td { 
    68     vertical-align: middle; 
     68    vertical-align: middle; 
    6969} 
    7070 
    7171.admin_login_table td.value { 
    72     text-align: right; 
     72    text-align: right; 
    7373} 
    7474 
     
    7777#admin_login_license 
    7878{ 
    79     border: none; 
    80     background-image: url(../images/admin_login_input.png); 
    81     background-repeat: no-repeat; 
    82     width: 251px; 
    83     height: 23px; 
    84     background-color: transparent; 
    85     vertical-align: middle; 
    86     padding: 10px; 
     79    border: none; 
     80    background-image: url(../images/admin_login_input.png); 
     81    background-repeat: no-repeat; 
     82    width: 251px; 
     83    height: 23px; 
     84    background-color: transparent; 
     85    vertical-align: middle; 
     86    padding: 10px; 
    8787} 
    8888 
    8989#admin_login_license { 
    90     background-image: url(../images/admin_login_input_long.png); 
    91     width: 484px; 
     90    background-image: url(../images/admin_login_input_long.png); 
     91    width: 484px; 
    9292} 
    9393 
    9494#admin_login_remember { 
    95     width: 21px; 
    96     height: 21px; 
    97     vertical-align: middle; 
     95    width: 21px; 
     96    height: 21px; 
     97    vertical-align: middle; 
    9898} 
    9999 
    100100.remember_me_row label 
    101101{ 
    102     vertical-align: middle; 
     102    vertical-align: middle; 
    103103} 
    104104 
    105105#admin_login_form_submit { 
    106     width: 97px; 
    107     height: 31px; 
    108     color: #666666; 
    109     background-repeat: no-repeat; 
    110     background-image: url(../images/admin_login_button.png); 
    111     background-color: transparent; 
    112     border: none; 
    113     background-position: left top; 
    114     overflow: visible; 
     106    width: 97px; 
     107    height: 31px; 
     108    color: #666666; 
     109    background-repeat: no-repeat; 
     110    background-image: url(../images/admin_login_button.png); 
     111    background-color: transparent; 
     112    border: none; 
     113    background-position: left top; 
     114    overflow: visible; 
    115115} 
    116116 
    117117#admin_login_form_submit:hover { 
    118     background-position: left -33px; 
     118    background-position: left -33px; 
    119119} 
    120120 
    121121#admin_login_form_submit:focus { 
    122     background-position: left -66px; 
     122    background-position: left -66px; 
    123123} 
    124124 
    125125 
    126126.admin_login_footers { 
    127     position: fixed; 
    128     bottom: 0px; 
    129     left: 0px; 
    130     width: 100%; 
    131     height: 54px; 
     127    position: fixed; 
     128    bottom: 0px; 
     129    left: 0px; 
     130    width: 100%; 
     131    height: 54px; 
    132132} 
    133133 
    134134.admin_login_footers .left_banner { 
    135     float: left; 
    136     position: relative; 
    137     margin-left: 30px; 
     135    float: left; 
     136    position: relative; 
     137    margin-left: 30px; 
    138138} 
    139139 
    140140.admin_login_footers .right_banner { 
    141     float: right; 
    142     position: relative; 
    143     margin-right: 30px; 
     141    float: right; 
     142    position: relative; 
     143    margin-right: 30px; 
    144144} 
  • trunk/administration/templates/base/css/memb_levels.css

    r15201 r15211  
    3535/*--- 'Manage Action' section ---*/ 
    3636div.calendar { 
    37     z-index: 9999; 
     37    z-index: 9999; 
    3838} 
    3939div#adm-mlevels-action{ 
    40     width: 562px;     
     40    width: 562px; 
    4141} 
    4242div#adm-mlevels-action table.popup_form_wrapper, 
     
    5858} 
    5959div.ui-datepicker { 
    60     z-index: 9999; 
     60    z-index: 9999; 
    6161} 
  • trunk/administration/templates/base/css/menu_compose.css

    r15201 r15211  
    1212    /*position: relative;*/ 
    1313 
    14     cursor:default;  
     14    cursor:default; 
    1515} 
    1616 
     
    2121.inactive_item 
    2222{ 
    23     position:absolute; 
    24     width:92px; 
    25     height:21px; 
    26     color: #6666CC; 
    27     font-size:11px; 
     23    position:absolute; 
     24    width:92px; 
     25    height:21px; 
     26    color: #6666CC; 
     27    font-size:11px; 
    2828} 
    2929 
    3030#mov_indic 
    3131{ 
    32     padding-left:23px; 
    33     padding-top:5px; 
    34     border: 1px dashed #999; 
     32    padding-left:23px; 
     33    padding-top:5px; 
     34    border: 1px dashed #999; 
    3535} 
    3636 
     
    4040.inactive_item 
    4141{ 
    42     cursor:move; 
    43     padding: 7px 5px 0px 20px;   
    44     overflow:hidden; 
    45     white-space:nowrap; 
     42    cursor:move; 
     43    padding: 7px 5px 0px 20px; 
     44    overflow:hidden; 
     45    white-space:nowrap; 
    4646} 
    4747 
    4848.top_item 
    4949{ 
    50     background-image:url( ../images/top_item_bg.gif ); 
     50    background-image:url( ../images/top_item_bg.gif ); 
    5151} 
    5252 
    5353.custom_item 
    5454{ 
    55     background-image:url( ../images/custom_item_bg.gif ); 
     55    background-image:url( ../images/custom_item_bg.gif ); 
    5656} 
    5757 
    5858.inactive_item 
    5959{ 
    60     background-image:url( ../images/inact_item_bg.gif ); 
    61 } 
    62 .system_item  
    63 { 
    64     background-image:url( ../images/system_item_bg.gif ); 
     60    background-image:url( ../images/inact_item_bg.gif ); 
     61} 
     62.system_item 
     63{ 
     64    background-image:url( ../images/system_item_bg.gif ); 
    6565} 
    6666 
     
    8787{ 
    8888    display: block; 
    89     color: #6666CC; 
    90     text-decoration:none; 
    91     overflow: hidden; 
    92 } 
    93  
    94 .pseudo_wrapper {    
    95     position: relative;  
     89    color: #6666CC; 
     90    text-decoration:none; 
     91    overflow: hidden; 
     92} 
     93 
     94.pseudo_wrapper { 
     95    position: relative; 
    9696} 
    9797 
    9898.pseudo_head { 
    99     font-weight:bold;        
     99    font-weight:bold; 
    100100} 
    101101 
     
    103103#pseudo2, 
    104104.legend { 
    105     border: 1px solid #cccccc 
     105    border: 1px solid #cccccc 
    106106} 
    107107 
    108108#edit_form_wrapper 
    109109{ 
    110     position:absolute; 
    111     z-index:15000; 
    112     background-image:url( ../images/sp_op.png ); 
     110    position:absolute; 
     111    z-index:15000; 
     112    background-image:url( ../images/sp_op.png ); 
    113113} 
    114114 
    115115* html #edit_form_wrapper 
    116116{ 
    117     background-image:url( ../images/spacer.gif ); 
    118     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op.png', sizingMethod='scale'); 
     117    background-image:url( ../images/spacer.gif ); 
     118    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op.png', sizingMethod='scale'); 
    119119} 
    120120 
     
    125125.popup_form_wrapper 
    126126{ 
    127     border-collapse:collapse; 
    128     margin:0px; 
    129     padding:0px; 
    130     width:482px; 
     127    border-collapse:collapse; 
     128    margin:0px; 
     129    padding:0px; 
     130    width:482px; 
    131131} 
    132132 
    133133.popup_form_wrapper td 
    134134{ 
    135     padding:0px; 
    136     margin:0px; 
     135    padding:0px; 
     136    margin:0px; 
    137137} 
    138138 
    139139.popup_form_wrapper td.corner 
    140140{ 
    141     width:16px; 
    142     height:16px; 
     141    width:16px; 
     142    height:16px; 
    143143} 
    144144 
    145145.popup_form_wrapper td.side 
    146146{ 
    147     width:16px; 
     147    width:16px; 
    148148} 
    149149 
    150150.popup_form_wrapper td.side_ver 
    151151{ 
    152     height:16px; 
     152    height:16px; 
    153153} 
    154154 
     
    156156.popup_form_wrapper td.side 
    157157{ 
    158     background-image:url(../images/sp_op_gr.png); 
    159     font-size:1px; 
     158    background-image:url(../images/sp_op_gr.png); 
     159    font-size:1px; 
    160160} 
    161161 
     
    163163* html .popup_form_wrapper td.side 
    164164{ 
    165     background-image:url( ../images/spacer.gif ); 
    166     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op_gr.png', sizingMethod='scale'); 
     165    background-image:url( ../images/spacer.gif ); 
     166    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/sp_op_gr.png', sizingMethod='scale'); 
    167167} 
    168168 
     
    170170.popup_form_wrapper td.container 
    171171{ 
    172     background-color:white; 
    173     width:450px; 
     172    background-color:white; 
     173    width:450px; 
    174174} 
    175175 
     
    177177{ 
    178178 
    179     border:1px solid #666666; 
    180     padding-top:25px; 
    181     padding-bottom:25px; 
     179    border:1px solid #666666; 
     180    padding-top:25px; 
     181    padding-bottom:25px; 
    182182} 
    183183 
    184184.edit_item_table 
    185185{ 
    186     border-collapse:collapse; 
    187     margin-left: auto; 
    188     margin-right: auto; 
     186    border-collapse:collapse; 
     187    margin-left: auto; 
     188    margin-right: auto; 
    189189} 
    190190 
    191191.edit_item_table td 
    192192{ 
    193     padding:3px; 
     193    padding:3px; 
    194194} 
    195195 
    196196.form_label 
    197197{ 
    198     width:125px; 
    199     font-weight:bold; 
    200     font-size:13px; 
    201     text-align:right; 
     198    width:125px; 
     199    font-weight:bold; 
     200    font-size:13px; 
     201    text-align:right; 
    202202} 
    203203 
    204204.form_input_text 
    205205{ 
    206     width:250px; 
     206    width:250px; 
    207207} 
    208208 
    209209.form_input_area 
    210210{ 
    211     width:250px; 
    212     height:125px; 
     211    width:250px; 
     212    height:125px; 
    213213} 
    214214 
    215215.form_colspan 
    216216{ 
    217     text-align:center; 
     217    text-align:center; 
    218218} 
    219219 
    220220.form_colspan input 
    221221{ 
    222     margin-left:15px; 
     222    margin-left:15px; 
    223223} 
    224224 
     
    226226.loading 
    227227{ 
    228     text-align:center; 
    229 } 
     228    text-align:center; 
     229} 
  • trunk/administration/templates/base/css/modules.css

    r15201 r15211  
    2424div.modules-plank { 
    2525    margin: 5px  0px; 
    26     padding: 5px; 
    27      
    28     position: relative; 
    29      
    30     border: 1px solid #cccccc; 
    31     background-color: #eeeeee;   
     26    padding: 5px; 
     27 
     28    position: relative; 
     29 
     30    border: 1px solid #cccccc; 
     31    background-color: #eeeeee; 
    3232} 
    3333span.modules-plank-title {} 
    34 div.modules-plank-switch {     
    35     top: 5px; 
    36     right: 6px; 
    37     width: 13px; 
    38     height: 13px; 
     34div.modules-plank-switch { 
     35    top: 5px; 
     36    right: 6px; 
     37    width: 13px; 
     38    height: 13px; 
    3939 
    40     position: absolute; 
     40    position: absolute; 
    4141 
    42     background-image:url(../images/modules_toggle.png); 
    43     background-repeat: no-repeat; 
    44     background-position: 0px 0px; 
     42    background-image:url(../images/modules_toggle.png); 
     43    background-repeat: no-repeat; 
     44    background-position: 0px 0px; 
    4545 
    46     font-size: 11px; 
    47     font-weight: bold; 
    48     cursor: pointer; 
     46    font-size: 11px; 
     47    font-weight: bold; 
     48    cursor: pointer; 
    4949} 
    5050div.modules-plank-switch-opened { 
     
    5252} 
    5353div.modules-plank-content { 
    54     display: none; 
     54    display: none; 
    5555} 
    5656span.modules-plank-success { 
  • trunk/administration/templates/base/css/pageBuilder.css

    r15201 r15211  
    22 
    33.block_cont { 
    4     background-color: #ffffff; 
    5     background-image: none; 
    6     width: auto; 
     4    background-color: #ffffff; 
     5    background-image: none; 
     6    width: auto; 
    77    padding: 5px; 
    8     border: 1px solid #cccccc; 
     8    border: 1px solid #cccccc; 
    99} 
    1010div.block_head { 
     
    1313div.block_cont, 
    1414div.block_cont_nd { 
    15     margin-bottom: 10px; 
     15    margin-bottom: 10px; 
    1616    margin-top: 5px; 
    1717} 
    1818 
    1919.block_cont#activeAreaWrapper { 
    20     margin-bottom: 0px; 
    21     border-bottom: none; 
     20    margin-bottom: 0px; 
     21    border-bottom: none; 
    2222} 
    2323 
    2424.block_cont#activeAreaWrapper .buildArea { 
    25     border-bottom: none; 
     25    border-bottom: none; 
    2626} 
    2727 
    2828/*--- Builder styles ---*/ 
    2929#buildZoneWrapper { 
    30     width: 782px; 
     30    width: 782px; 
    3131} 
    3232 
    3333 
    3434#buildAreasWrapper { 
    35     margin: 15px; 
    36     position:relative; 
     35    margin: 15px; 
     36    position:relative; 
    3737} 
    3838 
    3939#pageWidthValue, 
    4040#pageWidthValue1 { 
    41     height: 16px; 
    42      
    43     position: relative; 
    44     float: left; 
    45      
    46     font-size: 12px; 
    47     line-height: 16px; 
     41    height: 16px; 
     42 
     43    position: relative; 
     44    float: left; 
     45 
     46    font-size: 12px; 
     47    line-height: 16px; 
    4848} 
    4949 
    5050#pageWidthSlider, 
    5151#pageWidthSlider1 { 
    52     float: right; 
    53     position: relative; 
    54     width: 700px; 
    55     height: 16px; 
    56     background-image: url(../images/width_slider.png); 
     52    float: right; 
     53    position: relative; 
     54    width: 700px; 
     55    height: 16px; 
     56    background-image: url(../images/width_slider.png); 
    5757} 
    5858 
     
    6161#pageWidthSlider1 a.ui-slider-handle { 
    6262    top: -2px; 
    63     width: 12px; 
    64     height: 20px; 
     63    width: 12px; 
     64    height: 20px; 
    6565    border: none; 
    6666    background-image: url(../images/slider-handle1.gif); 
     
    6868 
    6969.buildArea { 
    70     /*padding: 8px;*/ 
     70    /*padding: 8px;*/ 
    7171} 
    7272 
     
    7575 
    7676.buildColumn { 
    77     float:left; 
    78     /*position: relative;*/ 
     77    float:left; 
     78    /*position: relative;*/ 
    7979} 
    8080 
    8181.buildColumnCont { 
    82     border: 1px solid #ccc; 
    83     background-color: #fff; 
    84     padding: 3px; 
    85     margin: 5px; 
    86     text-align: center; 
    87     overflow: hidden; 
     82    border: 1px solid #ccc; 
     83    background-color: #fff; 
     84    padding: 3px; 
     85    margin: 5px; 
     86    text-align: center; 
     87    overflow: hidden; 
    8888} 
    8989 
    9090.buildColumnHeader { 
    91     background-color: #ccc; 
    92     padding: 3px; 
    93     font-size: 13px; 
    94     margin-bottom: 5px; 
    95     cursor: move; 
    96     white-space: nowrap; 
    97     overflow: hidden; 
    98     position: relative; 
     91    background-color: #ccc; 
     92    padding: 3px; 
     93    font-size: 13px; 
     94    margin-bottom: 5px; 
     95    cursor: move; 
     96    white-space: nowrap; 
     97    overflow: hidden; 
     98    position: relative; 
    9999} 
    100100 
    101101.buildColumnHeader a { 
    102     cursor: pointer; /*for macs*/ 
     102    cursor: pointer; /*for macs*/ 
    103103} 
    104104 
    105105.buildBlock  { 
    106     margin: 0px auto 2px auto; 
    107     width: 142px; 
    108     height: 22px; 
    109     text-align: center; 
    110     cursor: move; 
    111     padding-top: 6px; 
    112     background-repeat: no-repeat; 
    113     background-image: url( ../images/block_header.gif ); 
    114     text-transform: capitalize; 
    115     font-size: 11px;     
     106    margin: 0px auto 2px auto; 
     107    width: 142px; 
     108    height: 22px; 
     109    text-align: center; 
     110    cursor: move; 
     111    padding-top: 6px; 
     112    background-repeat: no-repeat; 
     113    background-image: url( ../images/block_header.gif ); 
     114    text-transform: capitalize; 
     115    font-size: 11px; 
    116116} 
    117117 
     
    123123 
    124124.buildBlock a { 
    125     cursor: pointer; /*for macs*/ 
     125    cursor: pointer; /*for macs*/ 
    126126} 
    127127 
    128128.buildBlock .blockAlert { 
    129     cursor:help; 
    130     height:16px; 
    131     width:16px; 
    132     vertical-align: middle; 
    133     margin-left: 3px; 
     129    cursor:help; 
     130    height:16px; 
     131    width:16px; 
     132    vertical-align: middle; 
     133    margin-left: 3px; 
    134134} 
    135135 
    136136#samplesBlocksArea .buildBlock, 
    137137#inactiveBlocksArea .buildBlock { 
    138     margin: 2px; 
    139     float: left; 
     138    margin: 2px; 
     139    float: left; 
    140140} 
    141141 
    142142.buildHover { 
    143     /*background-color: #f5f5f5;*/ 
    144     border: 1px dashed #999999; 
     143    /*background-color: #f5f5f5;*/ 
     144    border: 1px dashed #999999; 
    145145    float: left; 
    146146} 
    147147 
    148148.buildBlockFake { 
    149     height: 5px; 
    150     font-size: 1px; 
     149    height: 5px; 
     150    font-size: 1px; 
    151151} 
    152152 
    153153#columnsSlider { 
    154     height: 14px; 
    155     position: relative; 
    156     background-image: url(../images/col_slider_bg.gif); 
    157     border-left: 1px solid #808080; 
    158     border-right: 1px solid #808080; 
    159     border-bottom: 1px solid #808080; 
    160     margin-bottom: 10px; 
     154    height: 14px; 
     155    position: relative; 
     156    background-image: url(../images/col_slider_bg.gif); 
     157    border-left: 1px solid #808080; 
     158    border-right: 1px solid #808080; 
     159    border-bottom: 1px solid #808080; 
     160    margin-bottom: 10px; 
    161161} 
    162162 
    163163#columnsSlider a { 
    164     top: -5px; 
    165     width: 12px; 
    166     height: 23px; 
     164    top: -5px; 
     165    width: 12px; 
     166    height: 23px; 
    167167    border: none; 
    168     background-image: url(../images/slider-handle.gif); 
     168    background-image: url(../images/slider-handle.gif); 
    169169} 
    170170 
    171171#pageControls { 
    172     position: absolute; 
    173     top: -10px; 
    174     right: 0px; 
    175     font-size: 13px; 
    176     font-weight: bold; 
     172    position: absolute; 
     173    top: -10px; 
     174    right: 0px; 
     175    font-size: 13px; 
     176    font-weight: bold; 
    177177} 
    178178 
    179179#pageControls a { 
    180     margin-left: 6px; 
     180    margin-left: 6px; 
    181181} 
    182182 
     
    184184#pageControls a:link, 
    185185#pageControls a:visited { 
    186     text-decoration: none; 
     186    text-decoration: none; 
    187187} 
    188188 
    189189#pageControls a:hover, 
    190190#pageControls a:active { 
    191     text-decoration: underline; 
     191    text-decoration: underline; 
    192192} 
    193193 
    194194#linkDelete { 
    195     display: block; 
    196     position: absolute; 
    197     right: 3px; 
    198     top: 3px; 
    199     display: block; 
    200     text-decoration: none; 
     195    display: block; 
     196    position: absolute; 
     197    right: 3px; 
     198    top: 3px; 
     199    display: block; 
     200    text-decoration: none; 
    201201} 
    202202 
     
    205205#linkDelete:active, 
    206206#linkDelete:hover { 
    207     text-decoration: none; 
     207    text-decoration: none; 
    208208} 
    209209 
     
    214214    position: relative; 
    215215    float: left; 
    216      
     216 
    217217    line-height: 30px; 
    218218} 
    219219div.adm-pb-cp-item-right { 
    220     margin: 2px 10px 0px 0px;     
    221      
     220    margin: 2px 10px 0px 0px; 
     221 
    222222    float: right; 
    223223 
    224     line-height: normal;  
     224    line-height: normal; 
    225225} 
    226226 
    227227/*--- Edit Form styles ---*/ 
    228 #editFormCont {  
    229     width:482px; 
    230 } 
    231  
    232  
     228#editFormCont { 
     229    width:482px; 
     230} 
     231 
     232 
  • trunk/administration/templates/base/css/predefined_values.css

    r15201 r15211  
    22 
    33#listEdit { 
    4     border-top:1px solid #999999; 
    5     border-left:1px solid #999999; 
     4    border-top:1px solid #999999; 
     5    border-left:1px solid #999999; 
    66} 
    77 
    88#listEdit tr { 
    9     margin:0px; 
    10     padding:0px; 
     9    margin:0px; 
     10    padding:0px; 
    1111} 
    1212 
    1313#listEdit td, 
    1414#listEdit th { 
    15     padding:2px; 
    16     vertical-align:middle; 
    17     border-right:1px solid #999999; 
    18     border-bottom:1px solid #999999; 
     15    padding:2px; 
     16    vertical-align:middle; 
     17    border-right:1px solid #999999; 
     18    border-bottom:1px solid #999999; 
    1919} 
    2020 
    2121#listEdit th { 
    2222    padding:2px; 
    23     text-align:center; 
    24     font-weight:bold; 
    25     background-color:#eeeeee; 
     23    text-align:center; 
     24    font-weight:bold; 
     25    background-color:#eeeeee; 
    2626} 
    2727 
    2828#listEdit tr.even { 
    29     background-color:#ffffff; 
     29    background-color:#ffffff; 
    3030} 
    3131 
    3232#listEdit tr.odd { 
    33     background-color:#dddddd; 
     33    background-color:#dddddd; 
    3434} 
    3535 
    3636#listEdit td .value_input { 
    37     width:70px; 
     37    width:70px; 
    3838} 
    3939 
    4040.tableLabel { 
    41     border-bottom:1px dashed #000000; 
    42     cursor:help; 
     41    border-bottom:1px dashed #000000; 
     42    cursor:help; 
    4343} 
    4444 
    4545img.row_control { 
    46     width:16px; 
    47     height:16px; 
    48     cursor:pointer; 
    49     margin-right: 3px; 
     46    width:16px; 
     47    height:16px; 
     48    cursor:pointer; 
     49    margin-right: 3px; 
    5050} 
  • trunk/administration/templates/base/css/profiles.css

    r15201 r15211  
    22 
    33iframe#adm-mp-members-iframe { 
    4     width: 0px; 
    5     height: 0px; 
    6     margin: 0px; 
    7     padding: 0px; 
     4    width: 0px; 
     5    height: 0px; 
     6    margin: 0px; 
     7    padding: 0px; 
    88 
    9     border: 0px; 
     9    border: 0px; 
    1010} 
    1111form#adm-mp-members-form { 
     
    1515/*--- Tags Styles ---*/ 
    1616div.tags_wrapper { 
    17     text-align: center;  
     17    text-align: center; 
    1818} 
    1919span.one_tag{ 
    2020    padding: 0px 4px; 
    21     line-height: 30px; 
     21    line-height: 30px; 
    2222} 
    2323 
     
    2626    width: 210px; 
    2727    height: 30px; 
    28      
     28 
    2929    position: relative; 
    3030    float: left; 
    31      
     31 
    3232    background-image: url(../images/icons/pm_qlinks_item.png); 
    3333    background-position: 0px 7px; 
    3434    background-repeat: no-repeat; 
    35      
     35 
    3636    line-height: 30px; 
    3737    text-indent: 20px; 
     
    4545    position: relative; 
    4646    float: left; 
    47      
     47 
    4848    line-height: 30px; 
    4949} 
    5050div.adm-mp-order-item-right { 
    5151    padding: 0px 10px 0px 0px; 
    52      
     52 
    5353    float: right; 
    5454} 
     
    9191    position: absolute; 
    9292    z-index: 2; 
    93      
     93 
    9494    background-color: #ffcccc; 
    9595} 
     
    9999} 
    100100*+html div.adm-mp-ms-check input.form_input_checkbox { 
    101     margin: 0px;   
     101    margin: 0px; 
    102102} 
    103103div.adm-mp-ms-username { 
     
    117117    padding: 5px; 
    118118 
    119     position: relative;     
     119    position: relative; 
    120120} 
    121121div.adm-mp-ms-thumbnail { 
  • trunk/administration/templates/base/dashboard_content_info.html

    r14102 r15211  
    22<!-- 
    33    $(document).ready(function() { 
    4         $.get( 
    5             '<bx_url_root />get_rss_feed.php?ID=boonex_version&member=0',  
    6             {}, 
    7             function(sData) { 
    8                 var sVerCur = '__current_version__'; 
    9                 var sVerNew = $(sData).find('dolphin').html();  
     4        $.get( 
     5            '<bx_url_root />get_rss_feed.php?ID=boonex_version&member=0', 
     6            {}, 
     7            function(sData) { 
     8                var sVerCur = '__current_version__'; 
     9                var sVerNew = $(sData).find('dolphin').html(); 
    1010 
    11                 if(sVerNew != 'undefined' && sVerNew != '' && sVerNew != sVerCur) 
    12                     $('#adm-dic-update').html('<a href="http://www.boonex.com/dolphin/download/"><bx_text:_adm_txt_dashboard_update_to /> ' + sVerNew + '</a>'); 
    13             }, 
    14             'text' 
    15         ); 
    16     }); 
     11                if(sVerNew != 'undefined' && sVerNew != '' && sVerNew != sVerCur) 
     12                    $('#adm-dic-update').html('<a href="http://www.boonex.com/dolphin/download/"><bx_text:_adm_txt_dashboard_update_to /> ' + sVerNew + '</a>'); 
     13            }, 
     14            'text' 
     15        ); 
     16    }); 
    1717--> 
    1818</script> 
     
    2020    <tr> 
    2121        <td class="left"> 
    22             __cell_11__ 
     22            __cell_11__ 
    2323        </td> 
    2424        <td class="right"> 
    25             <span class="__cell_12_class__">__cell_12__</span> 
    26         </td> 
     25            <span class="__cell_12_class__">__cell_12__</span> 
     26        </td> 
    2727    </tr> 
    2828    <tr> 
  • trunk/administration/templates/base/default.html

    r15201 r15211  
    1 <bx_include_auto:_sub_header.html />     
     1<bx_include_auto:_sub_header.html /> 
    22    __page_main_code__ 
    33    __promo_code__ 
  • trunk/administration/templates/base/design_box_1.html

    r15201 r15211  
    11<!-- Design Box [ Start ] here  --> 
    22<div class="bx-db-container bx-def-border bx-def-color-bg-block bx-def-margin-bottom"> 
    3     <div class="bx-db-header bx-def-border-bottom"> 
     3    <div class="bx-db-header bx-def-border-bottom"> 
    44        <div class="bx-db-title bx-def-padding-sec-left">__title__</div> 
    55        <div class="bx-db-menu"> 
     
    1515            </bx_repeat:actions> 
    1616        </div> 
    17     </div> 
    18     <div class="bx-db-content">__content__</div> 
    19     __bottom_items__ 
     17    </div> 
     18    <div class="bx-db-content">__content__</div> 
     19    __bottom_items__ 
    2020</div> 
    2121<!-- Design Box [ End ] here  --> 
  • trunk/administration/templates/base/fields.html

    r15201 r15211  
    55<div id="edit_form_cont"></div> 
    66<div id="main_container"> 
    7     <div id="tabs_container"> 
    8         <div id="m1"> 
    9             <div class="build_container"><bx_text:_adm_fields_loading /></div> 
    10         </div> 
    11         <div id="edit-tab" style="display:none"> 
     7    <div id="tabs_container"> 
     8        <div id="m1"> 
     9            <div class="build_container"><bx_text:_adm_fields_loading /></div> 
     10        </div> 
     11        <div id="edit-tab" style="display:none"> 
    1212            <div class="adm-db-control-panel" id="mode_switcher_1"> 
    13                 <ul> 
    14                     <li><a href="#m2"><bx_text:_adm_fields_owner /></a></li> 
    15                     <li><a href="#m3"><bx_text:_adm_fields_admin /></a></li> 
    16                 </ul> 
     13                <ul> 
     14                    <li><a href="#m2"><bx_text:_adm_fields_owner /></a></li> 
     15                    <li><a href="#m3"><bx_text:_adm_fields_admin /></a></li> 
     16                </ul> 
    1717            </div> 
    18             <div id="m2"> 
    19                 <div class="build_container"></div> 
    20             </div> 
    21             <div id="m3"> 
    22                 <div class="build_container"></div> 
    23             </div> 
    24         </div> 
    25         <div id="view-tab" style="display:none"> 
     18            <div id="m2"> 
     19                <div class="build_container"></div> 
     20            </div> 
     21            <div id="m3"> 
     22                <div class="build_container"></div> 
     23            </div> 
     24        </div> 
     25        <div id="view-tab" style="display:none"> 
    2626            <div class="adm-db-control-panel" id="mode_switcher_2"> 
    27                 <ul> 
    28                     <li><a href="#m5"><bx_text:_adm_fields_admin /></a></li> 
    29                     <li><a href="#m6"><bx_text:_adm_fields_member /></a></li> 
    30                     <li><a href="#m8"><bx_text:_adm_fields_visitor /></a></li> 
    31                 </ul> 
     27                <ul> 
     28                    <li><a href="#m5"><bx_text:_adm_fields_admin /></a></li> 
     29                    <li><a href="#m6"><bx_text:_adm_fields_member /></a></li> 
     30                    <li><a href="#m8"><bx_text:_adm_fields_visitor /></a></li> 
     31                </ul> 
    3232            </div> 
    33             <div id="m5"> 
    34                 <div class="build_container"></div> 
    35             </div> 
    36             <div id="m6"> 
    37                 <div class="build_container"></div> 
    38             </div>           
    39             <div id="m8"> 
    40                 <div class="build_container"></div> 
    41             </div> 
    42         </div> 
    43         <div id="search-tab" style="display:none"> 
     33            <div id="m5"> 
     34                <div class="build_container"></div> 
     35            </div> 
     36            <div id="m6"> 
     37                <div class="build_container"></div> 
     38            </div> 
     39            <div id="m8"> 
     40                <div class="build_container"></div> 
     41            </div> 
     42        </div> 
     43        <div id="search-tab" style="display:none"> 
    4444            <div class="adm-db-control-panel" id="mode_switcher_3"> 
    45                 <ul> 
    46                     <li><a href="#m9"><bx_text:_adm_fields_simple_search /></a></li> 
    47                     <li><a href="#m10"><bx_text:_adm_fields_quick_search /></a></li> 
    48                     <li><a href="#m11"><bx_text:_adm_fields_advanced_search /></a></li> 
    49                 </ul> 
     45                <ul> 
     46                    <li><a href="#m9"><bx_text:_adm_fields_simple_search /></a></li> 
     47                    <li><a href="#m10"><bx_text:_adm_fields_quick_search /></a></li> 
     48                    <li><a href="#m11"><bx_text:_adm_fields_advanced_search /></a></li> 
     49                </ul> 
    5050            </div> 
    51             <div id="m9"> 
    52                 <div class="build_container"></div> 
    53             </div> 
    54             <div id="m10"> 
    55                 <div class="build_container"></div> 
    56             </div> 
    57             <div id="m11"> 
    58                 <div class="build_container"></div> 
    59             </div> 
    60         </div>       
    61     </div> 
     51            <div id="m9"> 
     52                <div class="build_container"></div> 
     53            </div> 
     54            <div id="m10"> 
     55                <div class="build_container"></div> 
     56            </div> 
     57            <div id="m11"> 
     58                <div class="build_container"></div> 
     59            </div> 
     60        </div> 
     61    </div> 
    6262</div> 
    6363<script language="javascript" type="text/javascript"> 
    6464<!-- 
    65     oPFM = new BxDolPFM();   
    66     oPFM.config.areas  = 11; 
    67     oPFM.config.parserUrl = 'fields.parse.php'; 
     65    oPFM = new BxDolPFM(); 
     66    oPFM.config.areas  = 11; 
     67    oPFM.config.parserUrl = 'fields.parse.php'; 
    6868 
    69     $(document).ready(function() { 
    70         $('#mode_switcher_1').tabs(); 
    71         $('#mode_switcher_2').tabs(); 
    72         $('#mode_switcher_3').tabs(); 
    73         oPFM.init(); 
    74     }); 
    75      
    76     function changeType(oLink){ 
    77         var sType = oLink.id.replace('adm-fb-ctl-', ''); 
     69    $(document).ready(function() { 
     70        $('#mode_switcher_1').tabs(); 
     71        $('#mode_switcher_2').tabs(); 
     72        $('#mode_switcher_3').tabs(); 
     73        oPFM.init(); 
     74    }); 
    7875 
    79         $(oLink).parent('.notActive').hide().siblings('.notActive:hidden').show().siblings('.active').hide().siblings('#' + $(oLink).attr('id') + '-act').show(); 
     76    function changeType(oLink){ 
     77        var sType = oLink.id.replace('adm-fb-ctl-', ''); 
    8078 
    81         $('#tabs_container > :visible').bx_anim('hide', 'fade', 'slow', function() { 
     79        $(oLink).parent('.notActive').hide().siblings('.notActive:hidden').show().siblings('.active').hide().siblings('#' + $(oLink).attr('id') + '-act').show(); 
     80 
     81        $('#tabs_container > :visible').bx_anim('hide', 'fade', 'slow', function() { 
    8282            $('#tabs_container > #' + sType).show(); 
    83         });  
    84     } 
     83        }); 
     84    } 
    8585--> 
    8686</script> 
  • trunk/administration/templates/base/hosting_promo.html

    r15201 r15211  
    22 
    33<style> 
    4     .adm-hosting-promo { 
    5         position:relative; 
    6     } 
    7     .adm-hosting-promo > img { 
    8         position:absolute; 
    9         top:0px; 
    10         left:0px; 
    11         width:60px; 
    12         height:60px; 
    13         background-repeat:no-repeat; 
    14         background-position:center center; 
    15     } 
    16     .adm-hosting-promo > div { 
    17         padding:10px 10px 10px 60px; 
    18     } 
    19     .adm-hosting-promo > div > a { 
    20         display:block; 
    21         font-size:14px; 
    22         font-weight:bold; 
    23     } 
     4    .adm-hosting-promo { 
     5        position:relative; 
     6    } 
     7    .adm-hosting-promo > img { 
     8        position:absolute; 
     9        top:0px; 
     10        left:0px; 
     11        width:60px; 
     12        height:60px; 
     13        background-repeat:no-repeat; 
     14        background-position:center center; 
     15    } 
     16    .adm-hosting-promo > div { 
     17        padding:10px 10px 10px 60px; 
     18    } 
     19    .adm-hosting-promo > div > a { 
     20        display:block; 
     21        font-size:14px; 
     22        font-weight:bold; 
     23    } 
    2424</style> 
    2525<div class="adm-hosting-promo"> 
    26     <img src="<bx_image_url:spacer.gif />" style="background-image:url(<bx_icon_url:hosting_promo.png />);" /> 
    27     <div> 
    28         <a target="_blank" href="http://www.boonex.com/hosting/"><bx_text:_adm_txt_hosting_title /></a> 
    29         <bx_text:_adm_txt_hosting_text /> 
    30     </div> 
     26    <img src="<bx_image_url:spacer.gif />" style="background-image:url(<bx_icon_url:hosting_promo.png />);" /> 
     27    <div> 
     28        <a target="_blank" href="http://www.boonex.com/hosting/"><bx_text:_adm_txt_hosting_title /></a> 
     29        <bx_text:_adm_txt_hosting_text /> 
     30    </div> 
    3131</div> 
  • trunk/administration/templates/base/langs_form_create.html

    r15201 r15211  
    22 
    33<div id="adm-langs-cnt-create" style="display:__display__;"> 
    4     <div class="adm-db-content-wrapper">__form__</div> 
     4    <div class="adm-db-content-wrapper">__form__</div> 
    55</div> 
  • trunk/administration/templates/base/langs_form_import.html

    r15201 r15211  
    22 
    33<div id="adm-langs-cnt-import" style="display:__display__;"> 
    4     <div class="adm-db-content-wrapper">__form__</div> 
     4    <div class="adm-db-content-wrapper">__form__</div> 
    55</div> 
  • trunk/administration/templates/base/langs_key.html

    r15201 r15211  
    33<div id="adm-langs-__type__-key" style="display:none;"> 
    44    <table class="popup_form_wrapper"> 
    5         <tr> 
    6             <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
    7             <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    8             <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
    9         </tr> 
    10         <tr> 
    11             <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    12             <td class="container"> 
    13                 <div class="adm-design-box"> 
    14                     <div class="adm-db-head"> 
     5        <tr> 
     6            <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
     7            <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     8            <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
     9        </tr> 
     10        <tr> 
     11            <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     12            <td class="container"> 
     13                <div class="adm-design-box"> 
     14                    <div class="adm-db-head"> 
    1515                        <bx_text:_adm_box_cpt_lang_key /> 
    1616                        <div class="dbTopMenu"> 
     
    2121                            </div> 
    2222                        </div> 
    23                     </div> 
    24                     <div class="adm-db-content"> 
     23                    </div> 
     24                    <div class="adm-db-content"> 
    2525                        <div class="adm-db-content-wrapper"> 
    2626                            <div id="adm-langs-__type__-key-content"> 
     
    2929                            </div> 
    3030                        </div> 
    31                     </div>                   
    32                 </div>                     
     31                    </div> 
     32                </div> 
    3333            </td> 
    34             <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    35         </tr> 
    36         <tr> 
    37             <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
    38             <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    39             <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
    40         </tr> 
    41     </table> 
     34            <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     35        </tr> 
     36        <tr> 
     37            <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
     38            <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     39            <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
     40        </tr> 
     41    </table> 
    4242</div> 
  • trunk/administration/templates/base/login.html

    r10490 r15211  
    11<div class="admin_login_wrapper"> 
    2     <img class="admin_login_icon" src="<bx_image_url:admin_login_icon.png />" /> 
    3     <div class="admin_login_form_wrapper"> 
    4         <form class="admin_login_form" action="__action_url__" method="post" onsubmit="javascript: validateLoginForm(this); return false;"> 
    5             <input type="hidden" name="relocate" value="__relocate_url__" /> 
     2    <img class="admin_login_icon" src="<bx_image_url:admin_login_icon.png />" /> 
     3    <div class="admin_login_form_wrapper"> 
     4        <form class="admin_login_form" action="__action_url__" method="post" onsubmit="javascript: validateLoginForm(this); return false;"> 
     5            <input type="hidden" name="relocate" value="__relocate_url__" /> 
    66            <table cellspacing="20" cellpadding="0" class="admin_login_table"> 
    77                <tr> 
     
    2424 
    2525<div class="admin_login_footers"> 
    26     <div class="left_banner"> 
    27         <img src="<bx_image_url:admin_login_admin_logo.png />" alt="Dolphin 7 Admin" /> 
     26    <div class="left_banner"> 
     27        <img src="<bx_image_url:admin_login_admin_logo.png />" alt="Dolphin 7 Admin" /> 
    2828    </div> 
    2929    <div class="right_banner"> 
    30         <img src="../media/images/small_logo.png" alt="BoonEx - Community Software Experts" /> 
     30        <img src="../media/images/small_logo.png" alt="BoonEx - Community Software Experts" /> 
    3131    </div> 
    3232</div> 
  • trunk/administration/templates/base/main_menu.html

    r15201 r15211  
    1212                <bx_if:item-link> 
    1313                    <a href="__link__">__title__</a> 
    14                 </bx_if:item-link>         
     14                </bx_if:item-link> 
    1515            </div> 
    1616            <bx_if:submenu> 
  • trunk/administration/templates/base/manage_subscribers.html

    r15201 r15211  
    22 
    33<form id="adm-ms-form" name="adm-ms-form" action="" method="post"> 
    4     <div class="adm-ms-items">     
     4    <div class="adm-ms-items"> 
    55        <bx_repeat:items> 
    66            <div class="adm-ms-item"> 
     
    1010                <div class="adm-ms-name">__name__</div> 
    1111                <div class="adm-ms-email">__email__</div> 
    12                 <div class="clear_both">&nbsp;</div> 
     12                <div class="clear_both">&nbsp;</div> 
    1313            </div> 
    1414        </bx_repeat:items> 
    15      
     15 
    1616    </div> 
    1717    __paginate__ 
  • trunk/administration/templates/base/menu_compose.html

    r15201 r15211  
    33<div class="adm-db-content-wrapper"> 
    44    __extra_js__ 
    5     <div id="edit_form_cont"></div>  
    6     <div id="menu_app_wrapper"></div> 
    7     <div class="pseudo_wrapper">     
    8         <div class="pseudo_head"><bx_text:_adm_mbuilder_active_items /></div> 
    9         <div id="pseudo1"> 
    10             <img src="<bx_image_url:loading.gif />" /> 
    11         </div> 
    12         <div class="pseudo_head" style="padding-top:7px;"><bx_text:_adm_mbuilder_all_items /></div> 
    13         <div id="pseudo2"> 
    14             <img src="<bx_image_url:loading.gif />" /> 
    15         </div> 
    16     </div> 
    17     <div class="pseudo_head" style="padding-top:7px;"><bx_text:_adm_mbuilder_legend /></div> 
    18     <div class="legend"> 
    19         <table border="0"> 
    20             <tr><td><img src="<bx_image_url:system_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_system /></td></tr> 
    21             <tr><td><img src="<bx_image_url:top_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_top /></td></tr> 
    22             <tr><td><img src="<bx_image_url:custom_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_custom /></td></tr> 
    23             <tr><td><img src="<bx_image_url:inact_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_inact /></td></tr> 
    24         </table> 
    25     </div> 
     5    <div id="edit_form_cont"></div> 
     6    <div id="menu_app_wrapper"></div> 
     7    <div class="pseudo_wrapper"> 
     8        <div class="pseudo_head"><bx_text:_adm_mbuilder_active_items /></div> 
     9        <div id="pseudo1"> 
     10            <img src="<bx_image_url:loading.gif />" /> 
     11        </div> 
     12        <div class="pseudo_head" style="padding-top:7px;"><bx_text:_adm_mbuilder_all_items /></div> 
     13        <div id="pseudo2"> 
     14            <img src="<bx_image_url:loading.gif />" /> 
     15        </div> 
     16    </div> 
     17    <div class="pseudo_head" style="padding-top:7px;"><bx_text:_adm_mbuilder_legend /></div> 
     18    <div class="legend"> 
     19        <table border="0"> 
     20            <tr><td><img src="<bx_image_url:system_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_system /></td></tr> 
     21            <tr><td><img src="<bx_image_url:top_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_top /></td></tr> 
     22            <tr><td><img src="<bx_image_url:custom_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_custom /></td></tr> 
     23            <tr><td><img src="<bx_image_url:inact_item_bg.gif />" /></td><td><bx_text:_adm_mbuilder_legend_inact /></td></tr> 
     24        </table> 
     25    </div> 
    2626</div> 
  • trunk/administration/templates/base/mlevels_action.html

    r15201 r15211  
    33<div id="adm-mlevels-action" style="display:none;"> 
    44    <table class="popup_form_wrapper"> 
    5         <tr> 
    6             <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
    7             <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    8             <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
    9         </tr> 
    10         <tr> 
    11             <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    12             <td class="container"> 
    13                 <div class="adm-design-box"> 
    14                     <div class="adm-db-head"> 
     5        <tr> 
     6            <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
     7            <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     8            <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
     9        </tr> 
     10        <tr> 
     11            <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     12            <td class="container"> 
     13                <div class="adm-design-box"> 
     14                    <div class="adm-db-head"> 
    1515                        <bx_text:_adm_box_cpt_mlevel_action /> 
    1616                        <div class="dbTopMenu"> 
     
    2121                            </div> 
    2222                        </div> 
    23                     </div> 
    24                     <div class="adm-db-content"> 
     23                    </div> 
     24                    <div class="adm-db-content"> 
    2525                        <div class="adm-db-content-wrapper"> 
    2626                            <div id="adm-mlevels-action-content"> 
     
    2929                            </div> 
    3030                        </div> 
    31                     </div>                   
    32                 </div>                     
     31                    </div> 
     32                </div> 
    3333            </td> 
    34             <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    35         </tr> 
    36         <tr> 
    37             <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
    38             <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    39             <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
    40         </tr> 
    41     </table> 
     34            <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     35        </tr> 
     36        <tr> 
     37            <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
     38            <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     39            <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
     40        </tr> 
     41    </table> 
    4242</div> 
  • trunk/administration/templates/base/mlevels_actions.html

    r15201 r15211  
    77        <bx_repeat:items> 
    88            <div class="adm-mlevels-item __class__"> 
    9                 <input type="checkbox" class="form_input_checkbox" id="adm-mlevels-__action_id__" name="actions[]" value="__action_id__" />                 
     9                <input type="checkbox" class="form_input_checkbox" id="adm-mlevels-__action_id__" name="actions[]" value="__action_id__" /> 
    1010                <bx_if:enabled> 
    1111                    <a href="javascript:void(0)" onclick="javascript:onEditAction(__level_id__, __action_id__)">__title__</a> 
  • trunk/administration/templates/base/mlevels_list.html

    r15201 r15211  
    44    <div class="adm-mlevels-items"> 
    55        <bx_repeat:items> 
    6             <div class="adm-mlevels-item __class__">                 
     6            <div class="adm-mlevels-item __class__"> 
    77                <input type="checkbox" class="form_input_checkbox" id="adm-mlevels-__id__" name="levels[]" value="__id__" <bx_if:system>disabled="disabled"</bx_if:system> /> 
    88                <bx_if:enabled> 
  • trunk/administration/templates/base/modules_results.html

    r15201 r15211  
    1010            <bx_if:operation_result_failed> 
    1111                <span class="modules-plank-failed"><bx_text:_adm_txt_modules_process_failed /></span> 
    12             </bx_if:operation_result_failed>             
     12            </bx_if:operation_result_failed> 
    1313            <div class="modules-plank-switch" onclick="$(this).toggleClass('modules-plank-switch-opened').next().toggle()"></div> 
    1414            <div class="modules-plank-content">__message__</div> 
  • trunk/administration/templates/base/mp_controls.html

    r15201 r15211  
    33<div id="adm-mp-control" class="adm-db-content-wrapper"> 
    44    <bx_include_auto:mp_ctl_type_qlinks.html /> 
    5     <bx_include_auto:mp_ctl_type_browse.html /> 
     5    <bx_include_auto:mp_ctl_type_browse.html /> 
    66    <bx_include_auto:mp_ctl_type_calendar.html /> 
    77    <bx_include_auto:mp_ctl_type_tags.html /> 
  • trunk/administration/templates/base/mp_members.html

    r15201 r15211  
    44<form id="adm-mp-members-form" enctype="multipart/form-data" method="post" action="__action_url__" class="form_advanced" target="adm-mp-members-iframe"> 
    55    <input type="hidden" name="adm-mp-members-ctl-type" value="__ctl_type__" /> 
    6     <input type="hidden" name="adm-mp-members-view-type" value="__view_type__" />     
     6    <input type="hidden" name="adm-mp-members-view-type" value="__view_type__" /> 
    77    <div class="adm-db-control-panel"> 
    88        <div class="adm-mp-order-item"> 
     
    1313                <option value="DateReg DESC"><bx_text:_adm_txt_mp_order_last_join /></option> 
    1414                <option value="DateLastNav DESC"><bx_text:_adm_txt_mp_order_last_activity /></option> 
    15             </select>             
     15            </select> 
    1616        </div> 
    1717        <div class="adm-mp-order-item-right"> 
     
    2020        <div class="clear_both">&nbsp;</div> 
    2121    </div> 
    22      
     22 
    2323    <div class="adm-mp-members-wrapper" id="adm-mp-members-simple" style="__style_simple__">__content_simple__</div> 
    2424    <div class="adm-mp-members-wrapper" id="adm-mp-members-extended" style="__style_extended__">__content_extended__</div> 
  • trunk/administration/templates/base/mp_members_extended.html

    r15201 r15211  
    33<div class="adm-mp-members-extended"> 
    44    <bx_repeat:items> 
    5         <div class="adm-mp-member-extended">         
     5        <div class="adm-mp-member-extended"> 
    66            <div class="adm-mp-ms-check"> 
    77                <input type="checkbox" class="form_input_checkbox" id="adm-mp-__id__" name="members[]" value="__id__" /> 
     
    99            <div class="adm-mp-ms-thumbnail">__thumbnail__</div> 
    1010            <div class="adm-mp-ms-info"> 
    11                 <div class="adm-mp-ms-nick"> 
     11                <div class="adm-mp-ms-nick"> 
    1212                    <a href="__edit_link__" class="__edit_class__">__username__</a>: 
    1313                    __headline__ 
    1414                </div> 
    15                 <div class="adm-mp-ms-age"> 
    16                     <img src="__sex_link__" /> 
    17                     __age__  
    18                     <bx_if:flag> 
     15                <div class="adm-mp-ms-age"> 
     16                    <img src="__sex_link__" /> 
     17                    __age__ 
     18                    <bx_if:flag> 
    1919                        <img src="__flag_link__" alt="flag" /> 
    20                     </bx_if:flag> 
    21                      __city__,  
    22                     __country__ 
    23                 </div> 
    24                 <div class="adm-mp-ms-desc">__description__</div> 
    25             </div> 
    26             <div class="clear_both">&nbsp;</div> 
     20                    </bx_if:flag> 
     21                     __city__, 
     22                    __country__ 
     23                </div> 
     24                <div class="adm-mp-ms-desc">__description__</div> 
     25            </div> 
     26            <div class="clear_both">&nbsp;</div> 
    2727        </div> 
    28     </bx_repeat:items>     
     28    </bx_repeat:items> 
    2929</div> 
    3030__paginate__ 
  • trunk/administration/templates/base/mp_members_geeky.html

    r15201 r15211  
    99            <th><bx_text:_adm_txt_mp_mlevel /></th> 
    1010            <th><bx_text:_adm_txt_mp_registration /></th> 
    11             <th><bx_text:_adm_txt_mp_last_login /></th>                 
     11            <th><bx_text:_adm_txt_mp_last_login /></th> 
    1212        </tr> 
    1313        <bx_repeat:items> 
     
    1818                <td width="100px">__ml_name__</td> 
    1919                <td width="105px">__registration__</td> 
    20                 <td width="105px">__last_login__</td>                     
     20                <td width="105px">__last_login__</td> 
    2121            </tr> 
    2222        </bx_repeat:items> 
  • trunk/administration/templates/base/notifies_filter.html

    r15201 r15211  
    22 
    33<script type="text/javascript" language="JavaScript"> 
    4     <!-- 
    5     function setControlsState() { 
    6         var state_disabled = ($('.form_queue_form select[name=age_start]').attr('disabled') == true) ? '' : 'disabled'; 
     4    <!-- 
     5    function setControlsState() { 
     6        var state_disabled = ($('.form_queue_form select[name=age_start]').attr('disabled') == true) ? '' : 'disabled'; 
    77 
    8         $(".form_queue_form input[name='sex[]']").attr('disabled', state_disabled); 
    9         $('.form_queue_form select[name=age_start]').attr('disabled', state_disabled); 
    10         $('.form_queue_form select[name=age_end]').attr('disabled', state_disabled); 
    11         $('.form_queue_form select[name=country]').attr('disabled', state_disabled); 
    12         $('.form_queue_form select[name=membership]').attr('disabled', state_disabled); 
    13     } 
    14     --> 
     8        $(".form_queue_form input[name='sex[]']").attr('disabled', state_disabled); 
     9        $('.form_queue_form select[name=age_start]').attr('disabled', state_disabled); 
     10        $('.form_queue_form select[name=age_end]').attr('disabled', state_disabled); 
     11        $('.form_queue_form select[name=country]').attr('disabled', state_disabled); 
     12        $('.form_queue_form select[name=membership]').attr('disabled', state_disabled); 
     13    } 
     14    --> 
    1515</script> 
    1616<center></center> 
  • trunk/administration/templates/base/page_10.html

    r15201 r15211  
    11<!-- TODO: remake to regular template file + some standard page index --> 
    2 <bx_include_auto:_sub_header.html />     
     2<bx_include_auto:_sub_header.html /> 
    33    __page_code_controls__ 
    44    __page_code_members__ 
  • trunk/administration/templates/base/page_13.html

    r15201 r15211  
    44    __page_code_new_message__ 
    55    __page_code_preview_message__ 
    6     __page_code_all_messages__     
    7     __page_code_queue_message__     
     6    __page_code_all_messages__ 
     7    __page_code_queue_message__ 
    88<bx_include_auto:_sub_footer.html /> 
  • trunk/administration/templates/base/page_3.html

    r15201 r15211  
    33    <!-- Design Box [ Start ] here  --> 
    44    <div class="adm-design-box"> 
    5         <div class="adm-db-head">__page_header_text__</div> 
    6         <div class="adm-db-content"> 
     5        <div class="adm-db-head">__page_header_text__</div> 
     6        <div class="adm-db-content"> 
    77            <div class="adm-settings-wrapper"> 
    88                __page_result_code__ 
     
    1212    </div> 
    1313    <!-- Design Box [ End ] here  --> 
    14     __promo_code__ 
     14    __promo_code__ 
    1515<bx_include_auto:_sub_footer.html /> 
  • trunk/administration/templates/base/page_4.html

    r15201 r15211  
    22<bx_include_auto:_sub_header.html /> 
    33    <!-- Design Box [ Start ] here  --> 
    4     __page_code_settings__         
     4    __page_code_settings__ 
    55    __page_code_logo__ 
    66    __page_code_promo__ 
  • trunk/administration/templates/base/page_6.html

    r15201 r15211  
    11<!-- TODO: remake to regular template file + some standard page index --> 
    2 <bx_include_auto:_sub_header.html />     
     2<bx_include_auto:_sub_header.html /> 
    33    __page_code_settings__ 
    44    __page_code_create__ 
  • trunk/administration/templates/base/page_7.html

    r15201 r15211  
    11<!-- TODO: remake to regular template file + some standard page index --> 
    2 <bx_include_auto:_sub_header.html />     
     2<bx_include_auto:_sub_header.html /> 
    33    __page_code_results__ 
    44    __page_code_uploader__ 
     
    66    __page_code_not_installed__ 
    77    __page_code_updates__ 
    8     __page_code_market_feed__ 
     8    __page_code_market_feed__ 
    99<bx_include_auto:_sub_footer.html /> 
  • trunk/administration/templates/base/page_8.html

    r15201 r15211  
    11<!-- TODO: remake to regular template file + some standard page index --> 
    2 <bx_include_auto:_sub_header.html />     
     2<bx_include_auto:_sub_header.html /> 
    33    __page_code_settings__ 
    44    __page_code_templates__ 
  • trunk/administration/templates/base/pbuilder_content.html

    r15201 r15211  
    22 
    33<div id="buildZoneWrapper"> 
    4     __selector__ 
    5     <bx_if:page> 
    6         <div id="buildAreasWrapper"> 
    7             <div class="block_head"><bx_text:_adm_txt_pb_page_width /></div> 
    8             <div class="block_cont_nd"> 
    9                 <div id="pageWidthValue"></div> 
    10                 <div id="pageWidthSlider"></div> 
    11                 <div class="clear_both"></div> 
    12             </div> 
    13             <div class="block_head"><bx_text:_adm_txt_pb_active_blocks /></div> 
    14             <div class="block_cont" id="activeAreaWrapper"> 
    15                 <div id="pageControls"> 
     4    __selector__ 
     5    <bx_if:page> 
     6        <div id="buildAreasWrapper"> 
     7            <div class="block_head"><bx_text:_adm_txt_pb_page_width /></div> 
     8            <div class="block_cont_nd"> 
     9                <div id="pageWidthValue"></div> 
     10                <div id="pageWidthSlider"></div> 
     11                <div class="clear_both"></div> 
     12            </div> 
     13            <div class="block_head"><bx_text:_adm_txt_pb_active_blocks /></div> 
     14            <div class="block_cont" id="activeAreaWrapper"> 
     15                <div id="pageControls"> 
    1616                    <bx_if:delete_link> 
    1717                        <a href="javascript:void(0)" onclick="oPB.deleteCustomPage()"><bx_text:_Delete /></a> 
     
    2020                        <a href="__site_url__page/__page_name__" target="_blank"><bx_text:_adm_txt_pb_view_page /></a> 
    2121                    </bx_if:view_link> 
    22                 </div> 
    23                  
    24                 <div id="activeBlocksArea" class="buildArea"> 
    25                     <bx_text:_adm_txt_pb_loading /> 
    26                 </div> 
    27             </div> 
    28              
    29             <div id="columnsSlider"></div> 
    30      
    31             <div class="block_head"><bx_text:_adm_txt_pb_inactive_blocks /></div> 
    32             <div class="block_cont"> 
    33                 <div id="inactiveBlocksArea" class="buildArea"> 
    34                     <bx_text:_adm_txt_pb_loading /> 
    35                 </div> 
    36             </div> 
    37              
    38             <div class="block_head"><bx_text:_adm_txt_pb_samples /></div> 
    39             <div class="block_cont"> 
    40                 <div id="samplesBlocksArea" class="buildArea"> 
    41                     <bx_text:_adm_txt_pb_loading /> 
    42                 </div> 
    43             </div> 
    44              
    45             <div class="block_head"><bx_text:_adm_txt_pb_other_pages_width /></div> 
    46             <div class="block_cont_nd"> 
    47                 <div id="pageWidthValue1"></div> 
    48                 <div id="pageWidthSlider1"></div> 
    49                 <div class="clear_both"></div> 
    50             </div> 
    51         </div> 
    52          
    53         <script language="javascript" type="text/javascript"> 
    54         <!-- 
     22                </div> 
     23 
     24                <div id="activeBlocksArea" class="buildArea"> 
     25                    <bx_text:_adm_txt_pb_loading /> 
     26                </div> 
     27            </div> 
     28 
     29            <div id="columnsSlider"></div> 
     30 
     31            <div class="block_head"><bx_text:_adm_txt_pb_inactive_blocks /></div> 
     32            <div class="block_cont"> 
     33                <div id="inactiveBlocksArea" class="buildArea"> 
     34                    <bx_text:_adm_txt_pb_loading /> 
     35                </div> 
     36            </div> 
     37 
     38            <div class="block_head"><bx_text:_adm_txt_pb_samples /></div> 
     39            <div class="block_cont"> 
     40                <div id="samplesBlocksArea" class="buildArea"> 
     41                    <bx_text:_adm_txt_pb_loading /> 
     42                </div> 
     43            </div> 
     44 
     45            <div class="block_head"><bx_text:_adm_txt_pb_other_pages_width /></div> 
     46            <div class="block_cont_nd"> 
     47                <div id="pageWidthValue1"></div> 
     48                <div id="pageWidthSlider1"></div> 
     49                <div class="clear_both"></div> 
     50            </div> 
     51        </div> 
     52 
     53        <script language="javascript" type="text/javascript"> 
     54        <!-- 
    5555            $(document).ready(function(){ 
    5656                oPB = new BxDolPageBuilder({ 
     
    6666            }); 
    6767        --> 
    68         </script> 
     68        </script> 
    6969    </bx_if:page> 
    7070</div> 
  • trunk/administration/templates/base/popup_form_wrapper.html

    r15201 r15211  
    22 
    33<table class="popup_form_wrapper"> 
    4     <tr> 
    5         <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
    6         <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    7         <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
    8     </tr> 
    9     <tr> 
    10         <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    11         <td class="container"> 
    12                 <div class="adm-design-box"> 
    13                     <div class="adm-db-head"> 
    14                         __caption__ 
     4    <tr> 
     5        <td class="corner"><img src="<bx_image_url:op_cor_tl.png />" alt="" /></td> 
     6        <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     7        <td class="corner"><img src="<bx_image_url:op_cor_tr.png />" alt="" /></td> 
     8    </tr> 
     9    <tr> 
     10        <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     11        <td class="container"> 
     12                <div class="adm-design-box"> 
     13                    <div class="adm-db-head"> 
     14                        __caption__ 
    1515                        <div class="dbTopMenu"> 
    1616                            <div class="adm-db-close" style="background-image:url(<bx_image_url:close.gif />)"> 
     
    2020                            </div> 
    2121                        </div> 
    22                     </div> 
    23                     <div class="adm-db-content"> 
     22                    </div> 
     23                    <div class="adm-db-content"> 
    2424                        <div class="adm-db-content-wrapper"> 
    2525                            <div id="adm-mlevels-action-content"> 
     
    2727                            </div> 
    2828                        </div> 
    29                     </div>                   
    30                 </div>   
     29                    </div> 
     30                </div> 
    3131 
    32         </td> 
    33         <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    34     </tr> 
    35     <tr> 
    36         <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
    37         <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
    38         <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
    39     </tr> 
     32        </td> 
     33        <td class="side"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     34    </tr> 
     35    <tr> 
     36        <td class="corner"><img src="<bx_image_url:op_cor_bl.png />" alt="" /></td> 
     37        <td class="side_ver"><img src="<bx_image_url:spacer.gif />" alt="" /></td> 
     38        <td class="corner"><img src="<bx_image_url:op_cor_br.png />" onload="if( navigator.appName == 'Microsoft Internet Explorer' && window.version && version >= 5.5 && version < 7 ) png_fix();" alt="" /></td> 
     39    </tr> 
    4040</table> 
  • trunk/administration/templates/base/promo.html

    r15201 r15211  
    1818        function togglePromo(oRadio) { 
    1919            var aSwitcher = {text: 'image', image: 'text'}; 
    20              
     20 
    2121            $('#promo-cnt-' + aSwitcher[$(oRadio).val()]).bx_anim('hide', 'fade', 'slow', function(){ 
    2222                $('#promo-cnt-' + $(oRadio).val()).bx_anim('show', 'fade', 'slow'); 
    2323            }); 
    24         }         
     24        } 
    2525    --> 
    2626    </script> 
  • trunk/administration/templates/base/promo_images.html

    r15201 r15211  
    22 
    33<bx_repeat:images> 
    4     <a href="javascript:void(0);" onmouseover="javascript:onOver('__title__');" onmousemove="javascript:moveFloatDesc(event);" onmouseout="javascript:hideFloatDesc();">__title__</a> (<a href="__delete_url__"><bx_text:_adm_txt_settings_delete /></a>)<br /> 
     4    <a href="javascript:void(0);" onmouseover="javascript:onOver('__title__');" onmousemove="javascript:moveFloatDesc(event);" onmouseout="javascript:hideFloatDesc();">__title__</a> (<a href="__delete_url__"><bx_text:_adm_txt_settings_delete /></a>)<br /> 
    55</bx_repeat:images> 
    66<script type="text/javascript" language="javascript"> 
  • trunk/administration/templates/base/register.html

    r15201 r15211  
    11 
    22<div class="admin_login_wrapper"> 
    3     <div class="admin_license_form_wrapper"> 
    4         <form class="admin_login_form" method="post"> 
    5             <input type="hidden" name="ID" value="__id__" /> 
    6             <input type="hidden" name="Password" value="__password__" /> 
     3    <div class="admin_license_form_wrapper"> 
     4        <form class="admin_login_form" method="post"> 
     5            <input type="hidden" name="ID" value="__id__" /> 
     6            <input type="hidden" name="Password" value="__password__" /> 
    77            <table cellspacing="20" cellpadding="0" class="admin_login_table"> 
    88                <tr> 
     
    2121                </tr> 
    2222                <tr> 
    23                     <td>  
     23                    <td> 
    2424                    </td> 
    2525                    <td> 
    26                         <input type="submit" id="admin_login_form_submit" value="Register"/> 
     26                        <input type="submit" id="admin_login_form_submit" value="Register"/> 
    2727                    </td> 
    2828                </tr> 
    29                 <tr> 
    30                     <td colspan="2" style="font-size:14px; padding-top:35px;"> 
    31 If money is tight, or you don't feel like supporting BoonEx, or just want to test-drive Dolphin you can  
    32 <a href="http://www.boonex.com/community/licenses/">generate a free license at BoonEx Unity</a> or <a href="__relocate_url__">continue using an unregistered copy</a>. In that case, links  
     29                <tr> 
     30                    <td colspan="2" style="font-size:14px; padding-top:35px;"> 
     31If money is tight, or you don't feel like supporting BoonEx, or just want to test-drive Dolphin you can 
     32<a href="http://www.boonex.com/community/licenses/">generate a free license at BoonEx Unity</a> or <a href="__relocate_url__">continue using an unregistered copy</a>. In that case, links 
    3333to BoonEx ads and promo blocks will remain on your site and admin panel. 
    34                     </td> 
    35                 </tr> 
     34                    </td> 
     35                </tr> 
    3636            </table> 
    3737        </form> 
Note: See TracChangeset for help on using the changeset viewer.