Changeset 625
- Timestamp:
- 11/27/10 16:17:09 (18 months ago)
- Location:
- trunk
- Files:
-
- 15 edited
-
admin/applets/menu.php (modified) (1 diff)
-
cache/.htaccess (modified) (1 diff)
-
components/blogs/frontend.php (modified) (12 diffs)
-
components/blogs/model.php (modified) (13 diffs)
-
components/content/model.php (modified) (1 diff)
-
components/users/frontend.php (modified) (1 diff)
-
components/users/includes/usercore.php (modified) (1 diff)
-
components/users/model.php (modified) (2 diffs)
-
core/classes/actions.class.php (modified) (3 diffs)
-
includes/config.inc.php (modified) (2 diffs)
-
index.php (modified) (1 diff)
-
modules/mod_bestphoto/module.php (modified) (1 diff)
-
templates/_default_/components/com_content_my.tpl (modified) (1 diff)
-
templates/_default_/components/com_users_not_allow.tpl (modified) (1 diff)
-
upload/.htaccess (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/applets/menu.php
r594 r625 71 71 $toolmenu[4]['title'] = 'Ñêðûòü âûáðàííûå'; 72 72 $toolmenu[4]['link'] = "javascript:checkSel('?view=menu&do=hide&multiple=1');"; 73 74 $toolmenu[6]['icon'] = 'reorder.gif';75 $toolmenu[6]['title'] = 'Ñîõðàíèòü ïîðÿäîê ýëåìåíòîâ';76 $toolmenu[6]['link'] = "javascript:checkSel('?view=menu&do=saveorder');";77 73 78 74 $toolmenu[7]['icon'] = 'autoorder.gif'; -
trunk/cache/.htaccess
r458 r625 1 order allow, deny2 1 deny from all -
trunk/components/blogs/frontend.php
r594 r625 295 295 //Ñ÷èòàåì ÷èñëî êîììåíòàðèåâ 296 296 $blog['comments'] = blogComments($blog['id']); 297 //Íîðìàëèçóåì äàòó ñîçäàíèÿ298 $blog['pubdate'] = $inCore->dateFormat($blog['pubdate']);299 297 //Ôîðìàòèðóåì çíà÷åíèå êàðìû áëîãà 300 298 $blog['karma'] = cmsKarmaFormatSmall($blog['points']); … … 469 467 $post['comments'] = $post['comments'] ? $inCore->getCommentsCount('blog', $post['id']) : false; 470 468 $post['karma'] = cmsKarmaFormatSmall($post['points']); 471 $post['fpubdate'] = $inCore->dateFormat($post['fpubdate']);472 469 473 470 $msg = $post['content_html']; … … 572 569 $post['msg'] = $post['content_html']; 573 570 $post['tagline'] = cmsTagLine('blogpost', $post['id']); 571 $post['fpubdate'] = $inCore->dateFormat($post['pubdate']); 574 572 $post['url'] = $model->getPostURL(null, $post['bloglink'], $post['seolink']); 575 573 $posts[] = $post; … … 994 992 } 995 993 996 $post['fpubdate'] = cmsCore::dateDiffNow($post['fpubdate']).' '.$_LANG['BACK'].' ('.$post['fpubdate'].')'; 997 $post['feditdate'] = cmsCore::dateDiffNow($post['feditdate']).' '.$_LANG['BACK']; 994 $post['fpubdate'] = cmsCore::dateDiffNow($post['pubdate']).' '.$_LANG['BACK'].' ('.$post['fpubdate'].')'; 998 995 999 996 if ($post['cat_id']){ … … 1176 1173 if (!$user_id){ $inCore->halt(); } 1177 1174 1178 $blog = $model->getBlog($id);1179 1180 if (!$blog){ $inCore->halt(); }1181 1182 1175 if ( $inCore->inRequest('confirm') ){ 1183 1176 if ($user_id == $blog['user_id'] || $inUser->is_admin){ … … 1276 1269 1277 1270 $smarty = $inCore->initSmarty('components', 'com_blog_view_posts.tpl'); 1278 $error = '';1279 1271 1280 1272 $user_id = $inUser->id; … … 1283 1275 1284 1276 $posts = array(); 1285 1286 if ($error) {1287 echo '<p style="color:red">'.$error.'</p>';1288 return;1289 }1290 1291 if (!$error){1292 1277 1293 1278 //Ñ÷èòàåì êîëè÷åñòâî ïåðñîíàëüíûõ è êîëëåêòèâíûõ áëîãîâ … … 1360 1345 1361 1346 } 1362 1363 }1364 1347 ////////// VIEW POPULAR POSTS //////////////////////////////////////////////////////////////////////////////////////// 1365 1348 if ($do=='best'){ … … 1373 1356 1374 1357 $smarty = $inCore->initSmarty('components', 'com_blog_view_posts.tpl'); 1375 $error = '';1376 1358 1377 1359 $user_id = $inUser->id; … … 1381 1363 1382 1364 $posts = array(); 1383 1384 if ($error) {1385 echo '<p style="color:red">'.$error.'</p>';1386 return;1387 }1388 1389 if (!$error){1390 1365 1391 1366 //TITLES … … 1418 1393 $post['comments'] = $post['comments'] ? $inCore->getCommentsCount('blog', $post['id']) : false; 1419 1394 $post['karma'] = cmsKarmaFormatSmall($post['points']); 1395 $post['fpubdate'] = $inCore->dateFormat($post['pubdate']); 1420 1396 1421 1397 $msg = $post['content_html']; … … 1433 1409 } 1434 1410 } 1435 }1436 1411 1437 1412 $smarty->assign('is_posts', (bool)sizeof($posts)); -
trunk/components/blogs/model.php
r458 r625 77 77 $sql = "SELECT * 78 78 FROM cms_blogs 79 WHERE id = $id79 WHERE id = '$id' 80 80 LIMIT 1"; 81 81 $result = $this->inDB->query($sql); … … 83 83 $blog = $this->inDB->num_rows($result) ? $this->inDB->fetch_assoc($result) : false; 84 84 $blog = cmsCore::callEvent('GET_BLOG', $blog); 85 $blog['pubdate'] = cmsCore::dateFormat($blog['pubdate']); 85 86 86 87 return $blog; … … 112 113 $blog = $this->inDB->num_rows($result) ? $this->inDB->fetch_assoc($result) : false; 113 114 $blog = cmsCore::callEvent('GET_BLOG', $blog); 115 $blog['pubdate'] = cmsCore::dateFormat($blog['pubdate']); 114 116 115 117 return $blog; … … 415 417 416 418 while($blog = $this->inDB->fetch_assoc($result)){ 419 $blog['pubdate'] = cmsCore::dateFormat($blog['pubdate']); 417 420 $list[] = $blog; 418 421 } … … 435 438 FROM cms_blogs b 436 439 LEFT JOIN cms_blog_posts p ON p.blog_id = b.id 437 WHERE b.id = $blog_idAND p.published = 1 AND b.owner = '$owner' {$cat_sql}440 WHERE b.id = '$blog_id' AND p.published = 1 AND b.owner = '$owner' {$cat_sql} 438 441 "; 439 442 $result = $this->inDB->query($sql); … … 454 457 455 458 //Ïîëó÷àåì çàïèñè, îòíîñÿùèåñÿ ê íóæíîé ñòðàíèöå áëîãà 456 $sql = "SELECT p.*, p.pubdate as fpubdate,459 $sql = "SELECT p.*, 457 460 IFNULL(r.total_rating, 0) as points, u.nickname as author, u.id as author_id 458 461 FROM cms_blogs b … … 469 472 if ($this->inDB->num_rows($result)){ 470 473 while($post = $this->inDB->fetch_assoc($result)){ 474 $post['fpubdate'] = cmsCore::dateFormat($post['pubdate']); 471 475 $list[] = $post; 472 476 } … … 482 486 483 487 $sql = "SELECT p.*, 484 DATE_FORMAT(p.pubdate, '%d-%m-%Y %H:%i') fpubdate,485 DATE_FORMAT(p.edit_date, '%d-%m-%Y %H:%i') feditdate,486 488 u.nickname as author, 487 489 u.login as author_login, … … 508 510 509 511 $sql = "SELECT p.*, 510 DATE_FORMAT(p.pubdate, '%d-%m-%Y %H:%i') fpubdate,511 DATE_FORMAT(p.edit_date, '%d-%m-%Y %H:%i') feditdate,512 512 u.nickname as author, 513 513 u.id as author_id, … … 524 524 $post = $this->inDB->num_rows($result) ? $this->inDB->fetch_assoc($result) : false; 525 525 526 if ($post){ $post = cmsCore::callEvent('GET_POST', $post); } 526 if ($post){ 527 $post = cmsCore::callEvent('GET_POST', $post); 528 $post['fpubdate'] = cmsCore::dateFormat($post['pubdate']); 529 $post['feditdate'] = cmsCore::dateFormat($post['edit_date']); 530 } 527 531 528 532 return $post; … … 575 579 576 580 $sql = "SELECT p.*, 577 DATE_FORMAT(p.pubdate, '%d-%m-%Y (%H:%i)') as fpubdate,578 581 IFNULL(r.total_rating, 0) as points, 579 582 u.nickname as author, … … 582 585 b.seolink bloglink, 583 586 b.owner 584 FROM cms_blogs b, cms_users u, cms_blog_posts p 587 FROM cms_blog_posts p 588 LEFT JOIN cms_users u ON u.id = p.user_id 589 LEFT JOIN cms_blogs b ON b.id = p.blog_id 585 590 LEFT JOIN cms_ratings_total r ON r.item_id=p.id AND r.target='blogpost' 586 WHERE p.user_id = u.id AND p.published = 1 AND p.blog_id = b.id AND DATEDIFF(NOW(), p.pubdate) <= 7 AND b.owner = 'user' 587 GROUP BY p.id 591 WHERE p.published = 1 AND DATEDIFF(NOW(), p.pubdate) <= 7 AND b.owner = 'user' 588 592 ORDER BY points DESC 589 593 LIMIT ".(($page-1)*$perpage).", $perpage"; … … 682 686 $list = array(); 683 687 684 $sql = "SELECT p.*, DATE_FORMAT(p.pubdate, '%d-%m-%Y (%H:%i)') as fpubdate,u.nickname as author, u.id as author_id,688 $sql = "SELECT p.*, u.nickname as author, u.id as author_id, 685 689 b.seolink as bloglink, 686 690 u.login as author_login -
trunk/components/content/model.php
r613 r625 165 165 166 166 $count_sql = "SELECT con.id 167 FROM cms_content con, cms_category cat 168 WHERE con.category_id = cat.id AND (cat.NSLeft >= {$subcat['NSLeft']} AND cat.NSRight <= {$subcat['NSRight']}) AND con.published = 1"; 167 FROM cms_content con 168 INNER JOIN cms_category cat ON cat.id = con.category_id AND (cat.NSLeft >= {$subcat['NSLeft']} AND cat.NSRight <= {$subcat['NSRight']}) 169 WHERE con.published = 1 AND con.is_arhive = 0"; 169 170 170 171 $count_result = $this->inDB->query($count_sql); -
trunk/components/users/frontend.php
r615 r625 678 678 $smarty->assign('avatar', usrImageNOdb($usr['id'], 'big', $usr['imageurl'], $usr['is_deleted'])); 679 679 $smarty->assign('usr', $usr); 680 $smarty->assign('messages', cmsCore::getSessionMessages()); 680 681 $smarty->display('com_users_not_allow.tpl'); 681 682 return; -
trunk/components/users/includes/usercore.php
r515 r625 13 13 14 14 function usrBlog($user_id){ 15 return dbGetFields('cms_blogs', 'owner="user" AND user_id = '.$user_id, 'id, seolink' );15 return dbGetFields('cms_blogs', 'owner="user" AND user_id = '.$user_id, 'id, seolink', 'owner'); 16 16 } 17 17 -
trunk/components/users/model.php
r540 r625 67 67 IFNULL(COUNT(i.id), 0) as invites_count 68 68 FROM cms_users u 69 LEFT JOIN cms_user_profiles p ON u.id = p.id70 LEFT JOIN cms_user_groups g ON u.group_id = g.id71 LEFT JOIN cms_online o ON u.id = o.user_id72 LEFT JOIN cms_banlist b ON u.id = b.user_id73 LEFT JOIN cms_users ui ON u .invited_by = ui.id74 LEFT JOIN cms_user_invites i ON u.id = i.owner_id AND i.is_used = 0 AND i.is_sended = 069 LEFT JOIN cms_user_profiles p ON p.user_id = u.id 70 LEFT JOIN cms_user_groups g ON g.id = u.group_id 71 LEFT JOIN cms_online o ON o.user_id = u.id 72 LEFT JOIN cms_banlist b ON b.user_id = u.id 73 LEFT JOIN cms_users ui ON ui.id = u.invited_by 74 LEFT JOIN cms_user_invites i ON i.owner_id = u.id AND i.is_used = 0 AND i.is_sended = 0 75 75 WHERE u.is_locked = 0 AND u.id = '$user_id' 76 76 GROUP BY u.id … … 712 712 } 713 713 714 cmsActions::removeTargetLog('add_user_photo_multi', $album_id); 715 714 716 $this->inDB->query("DELETE FROM cms_user_albums WHERE id = '$album_id'") ; 715 717 -
trunk/core/classes/actions.class.php
r609 r625 145 145 } 146 146 147 /** 148 * Óäàëÿåò èç ëåíòû àêòèâíîñòè âñå ñîáûòèÿ îïðåäåëåííîãî òèïà äëÿ óêàçàííîé öåëè 149 * @param string $action_name Òèï ñîáûòèÿ 150 * @param int $target_id Èäåíòèôèêàòîð öåëè 151 * @return bool 152 */ 153 public static function removeTargetLog($action_name, $target_id, $user_id = false){ 154 155 $inDB = cmsDatabase::getInstance(); 156 157 $action = self::getAction($action_name); 158 159 $usr_sql = $user_id ? "AND user_id = {$user_id}" : ''; 160 161 $sql = "DELETE 162 FROM cms_actions_log 163 WHERE action_id = '{$action['id']}' AND target_id = '{$target_id}' $usr_sql"; 164 165 $inDB->query($sql); 166 167 return true; 168 169 } 170 147 171 // ============================================================================ // 148 172 // ============================================================================ // … … 154 178 */ 155 179 public function where($condition){ 180 if ($this->where) { 156 181 $this->where .= "AND ({$condition})"; 182 } else { 183 $this->where = "({$condition})"; 184 } 157 185 } 158 186 … … 262 290 u.login as user_login 263 291 264 FROM cms_actions_log log, 265 cms_actions a, 266 cms_users u 267 268 WHERE log.user_id = u.id AND 269 log.action_id = a.id AND 270 a.is_visible = 1 271 {$this->where} 272 273 ORDER BY log.pubdate DESC 292 FROM cms_actions_log log 293 LEFT JOIN cms_actions a ON a.id = log.action_id AND a.is_visible = 1 294 LEFT JOIN cms_users u ON u.id = log.user_id 295 296 WHERE {$this->where} 297 298 ORDER BY log.id DESC 274 299 "; 275 300 -
trunk/includes/config.inc.php
r618 r625 3 3 $_CFG = array(); 4 4 $_CFG['sitename'] = 'Ìîÿ ñîöèàëüíàÿ ñåòü'; 5 $_CFG['hometitle'] = '';6 $_CFG['homecom'] = '';7 $_CFG['siteoff'] = 0;8 $_CFG['debug'] = 0;9 $_CFG['offtext'] = 'Ïðîèçâîäèòñÿ îáíîâëåíèå ñàéòà';10 $_CFG['keywords'] = 'InstantCMS, ñèñòåìà óïðàâëåíèÿ ñàéòîì, áåñïëàòíàÿ CMS, äâèæîê ñàéòà, CMS, äâèæîê ñîöèàëüíîé ñåòè';11 $_CFG['metadesc'] = 'InstantCMS - áåñïëàòíàÿ ñèñòåìà óïðàâëåíèÿ ñàéòîì ñ ñîöèàëüíûìè ôóíêöèÿìè';12 $_CFG['seourl'] = '';13 $_CFG['lang'] = 'ru';14 $_CFG['sitemail'] = '';15 $_CFG['wmark'] = 'watermark.png';16 $_CFG['stats'] = 0;17 $_CFG['template'] = '_default_';18 $_CFG['splash'] = 0;19 $_CFG['slight'] = 0;20 $_CFG['back_btn'] = 0;21 5 $_CFG['db_host'] = 'localhost'; 22 6 $_CFG['db_base'] = 'icms'; … … 24 8 $_CFG['db_pass'] = ''; 25 9 $_CFG['db_prefix'] = 'cms'; 26 $_CFG['show_pw'] = 1; 27 $_CFG['short_pw'] = 1; 28 $_CFG['index_pw'] = 0; 29 $_CFG['fastcfg'] = 1; 30 $_CFG['mailer'] = 'mail'; 31 $_CFG['sendmail'] = '/usr/sbin/sendmail'; 32 $_CFG['smtpauth'] = 0; 33 $_CFG['smtpuser'] = ''; 34 $_CFG['smtppass'] = ''; 35 $_CFG['smtphost'] = 'localhost'; 10 $_CFG['template'] = '_default_'; 11 $_CFG['tooltips'] = '1'; 12 $_CFG['index_pw'] = '0'; 13 $_CFG['show_pw'] = '1'; 14 $_CFG['short_pw'] = '1'; 15 $_CFG['splash'] = '0'; 16 $_CFG['stats'] = '0'; 17 $_CFG['slight'] = '0'; 18 $_CFG['siteoff'] = '0'; 19 $_CFG['offtext'] = 'Ïðîèçâîäèòñÿ îáíîâëåíèå ñàéòà'; 20 $_CFG['keywords'] = 'InstantCMS, ñèñòåìà óïðàâëåíèÿ ñàéòîì, áåñïëàòíàÿ CMS, äâèæîê ñàéòà, CMS, äâèæîê ñîöèàëüíîé ñåòè'; 21 $_CFG['metadesc'] = 'InstantCMS - áåñïëàòíàÿ ñèñòåìà óïðàâëåíèÿ ñàéòîì ñ ñîöèàëüíûìè ôóíêöèÿìè'; 22 $_CFG['fastcfg'] = '1'; 23 $_CFG['debug'] = '0'; 24 $_CFG['lang'] = 'ru'; 25 $_CFG['wmark'] = 'watermark.png'; 26 $_CFG['back_btn'] = '0'; 36 27 $_CFG['timezone'] = 'Europe/Moscow'; 37 $_CFG['timediff'] = ' ';28 $_CFG['timediff'] = '0'; 38 29 ?> -
trunk/index.php
r618 r625 19 19 ////////////////////////////// Ïðîâåðÿåì ÷òî ñèñòåìà óñòàíîâëåíà ///////////////////////////// 20 20 21 //if(is_dir('install')||is_dir('migrate')) {22 //if (!file_exists(PATH.'/includes/config.inc.php')){23 //header('location:/install/');24 //} else {25 //include(PATH.'/core/messages/installation.html');26 //die();27 //}28 //}21 if(is_dir('install')||is_dir('migrate')) { 22 if (!file_exists(PATH.'/includes/config.inc.php')){ 23 header('location:/install/'); 24 } else { 25 include(PATH.'/core/messages/installation.html'); 26 die(); 27 } 28 } 29 29 30 30 /////////////////////////////////// Ïîäãîòîâêà ////////////////////////////////////////////// -
trunk/modules/mod_bestphoto/module.php
r465 r625 25 25 $catsql = $cfg['album_id'] ? ' AND album_id = '.$cfg['album_id'] : ''; 26 26 27 $today = date("d-m ");27 $today = date("d-m-Y"); 28 28 29 29 switch ($cfg['whatphoto']){ 30 30 31 31 case 'all': $periodsql = ''; break; 32 case 'day': $periodsql = " AND DATE_FORMAT(f.pubdate, '%d-%m ')='$today'"; break;32 case 'day': $periodsql = " AND DATE_FORMAT(f.pubdate, '%d-%m-%Y')='$today'"; break; 33 33 case 'week': $periodsql = " AND DATEDIFF(NOW(), f.pubdate) <= 7"; break; 34 34 case 'month': $periodsql = " AND DATE_SUB(NOW(), INTERVAL 1 MONTH) < f.pubdate"; break; -
trunk/templates/_default_/components/com_content_my.tpl
r514 r625 10 10 </div> 11 11 {/if} 12 12 <p><a href="/content/add.html">{$LANG.ADD_ARTICLE}?</a></p> 13 13 <table width="100%" cellpadding="5" cellspacing="0" border="0"> 14 14 <thead> -
trunk/templates/_default_/components/com_users_not_allow.tpl
r594 r625 2 2 {* ==================Çàêðûòûé ïðîôèëü ïîëüçîâàòåëÿ ================================ *} 3 3 {* ================================================================================ *} 4 4 {if $messages} 5 <div class="sess_messages"> 6 {foreach key=id item=message from=$messages} 7 {$message} 8 {/foreach} 9 </div> 10 {/if} 5 11 <div id="usertitle"> 6 12 <div class="con_heading" id="nickname"> -
trunk/upload/.htaccess
r458 r625 1 Options -Indexes 2 3 # Ïåðâûé âàðèàíò çàïðåòà âûïîëíåíèÿ php 1 4 php_flag engine 0 2 5 AddType "text/html" .php .cgi .pl .fcgi .fpl .phtml .shtml .php2 .php3 .php4 .php5 .asp .jsp 3 6 RemoveType php 7 8 # Âòîðîé âàðèàíò çàïðåòà âûïîëíåíèÿ php 9 # èñïîëüçóéòå åãî, åñëè ïðè ïåðâîì âàðèàíòå êàðòèíêè èç äèðåêòîðèé íå îòîáðàæàþòñÿ 10 # çàêîììåíòèðóéòå ñòðî÷êè ïåðâîãî âàðèàíòà, ñî ñòðî÷åê íèæå êîììåíòàðèè ñíèìèòå 11 # RemoveHandler .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml 12 # AddType application/x-httpd-php-source .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
Note: See TracChangeset
for help on using the changeset viewer.
