Changeset 3313
- Timestamp:
- 05/23/07 16:44:06 (20 months ago)
- Files:
-
- 58 modified
- 42 copied
-
branches/1.5/blog/checkup/index.php (modified) (1 diff)
-
branches/1.5/blog/comment/delete/item.php (modified) (1 diff)
-
branches/1.5/blog/login/index.php (modified) (2 diffs)
-
branches/1.5/blog/owner/center/dashboard/index.php (modified) (2 diffs)
-
branches/1.5/blog/owner/entry/delete/index.php (modified) (1 diff)
-
branches/1.5/blog/owner/entry/delete/item.php (modified) (1 diff)
-
branches/1.5/blog/owner/entry/edit/item.php (modified) (2 diffs)
-
branches/1.5/blog/owner/entry/visibility/item.php (modified) (1 diff)
-
branches/1.5/blog/owner/setting/account/index.php (modified) (3 diffs)
-
branches/1.5/blog/owner/setting/account/invite/index.php (modified) (1 diff)
-
branches/1.5/blog/owner/setting/account/password/index.php (modified) (1 diff)
-
branches/1.5/blog/owner/setting/account/profile/index.php (modified) (1 diff)
-
branches/1.5/blog/owner/setting/teamblog (copied) (copied from sandbox/blog/owner/setting/teamblog)
-
branches/1.5/blog/owner/setting/teamblog/Invite (copied) (copied from sandbox/blog/owner/setting/teamblog/Invite)
-
branches/1.5/blog/owner/setting/teamblog/Invite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/Invite/index.php)
-
branches/1.5/blog/owner/setting/teamblog/cancelInvite (copied) (copied from sandbox/blog/owner/setting/teamblog/cancelInvite)
-
branches/1.5/blog/owner/setting/teamblog/cancelInvite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/cancelInvite/index.php)
-
branches/1.5/blog/owner/setting/teamblog/changeBlog (copied) (copied from sandbox/blog/owner/setting/teamblog/changeBlog)
-
branches/1.5/blog/owner/setting/teamblog/changeBlog/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/changeBlog/index.php)
-
branches/1.5/blog/owner/setting/teamblog/delInvite (copied) (copied from sandbox/blog/owner/setting/teamblog/delInvite)
-
branches/1.5/blog/owner/setting/teamblog/delInvite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/delInvite/index.php)
-
branches/1.5/blog/owner/setting/teamblog/deleteUser (copied) (copied from sandbox/blog/owner/setting/teamblog/deleteUser)
-
branches/1.5/blog/owner/setting/teamblog/deleteUser/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/deleteUser/index.php)
-
branches/1.5/blog/owner/setting/teamblog/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/index.php)
-
branches/1.5/blog/owner/setting/teamblog/isAdmin (copied) (copied from sandbox/blog/owner/setting/teamblog/isAdmin)
-
branches/1.5/blog/owner/setting/teamblog/isAdmin/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/isAdmin/index.php)
-
branches/1.5/blog/owner/setting/teamblog/nameStyle (copied) (copied from sandbox/blog/owner/setting/teamblog/nameStyle)
-
branches/1.5/blog/owner/setting/teamblog/nameStyle/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/nameStyle/index.php)
-
branches/1.5/blog/owner/setting/teamblog/profileImage (copied) (copied from sandbox/blog/owner/setting/teamblog/profileImage)
-
branches/1.5/blog/owner/setting/teamblog/profileImage/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/profileImage/index.php)
-
branches/1.5/blog/owner/setting/teamblog/profileText (copied) (copied from sandbox/blog/owner/setting/teamblog/profileText)
-
branches/1.5/blog/owner/setting/teamblog/profileText/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/profileText/index.php)
-
branches/1.5/components/Textcube.Control.Auth.php (modified) (1 diff)
-
branches/1.5/components/Textcube.Core.php (modified) (1 diff)
-
branches/1.5/components/Textcube.Data.Post.php (modified) (2 diffs)
-
branches/1.5/lib/auth.php (modified) (3 diffs)
-
branches/1.5/lib/includeForBlogOwner.php (modified) (1 diff)
-
branches/1.5/lib/includeForReader.php (modified) (1 diff)
-
branches/1.5/lib/model/blog.api.php (modified) (2 diffs)
-
branches/1.5/lib/model/blog.blogSetting.php (modified) (2 diffs)
-
branches/1.5/lib/model/blog.comment.php (modified) (2 diffs)
-
branches/1.5/lib/model/blog.entry.php (modified) (2 diffs)
-
branches/1.5/lib/model/blog.user.php (modified) (1 diff)
-
branches/1.5/lib/pageACL.php (copied) (copied from sandbox/lib/pageACL.php)
-
branches/1.5/lib/piece/blog/entries.php (modified) (4 diffs)
-
branches/1.5/lib/piece/blog/list.php (modified) (2 diffs)
-
branches/1.5/lib/piece/owner/contentMenu.php (modified) (2 diffs)
-
branches/1.5/lib/piece/owner/header.php (modified) (2 diffs)
-
branches/1.5/lib/session.php (modified) (1 diff)
-
branches/1.5/setup.php (modified) (5 diffs)
-
trunk/blog/checkup/index.php (modified) (1 diff)
-
trunk/blog/comment/delete/item.php (modified) (1 diff)
-
trunk/blog/login/index.php (modified) (2 diffs)
-
trunk/blog/owner/center/dashboard/index.php (modified) (2 diffs)
-
trunk/blog/owner/entry/delete/index.php (modified) (1 diff)
-
trunk/blog/owner/entry/delete/item.php (modified) (1 diff)
-
trunk/blog/owner/entry/edit/item.php (modified) (2 diffs)
-
trunk/blog/owner/entry/visibility/item.php (modified) (1 diff)
-
trunk/blog/owner/setting/account/index.php (modified) (3 diffs)
-
trunk/blog/owner/setting/account/invite/index.php (modified) (1 diff)
-
trunk/blog/owner/setting/account/password/index.php (modified) (1 diff)
-
trunk/blog/owner/setting/account/profile/index.php (modified) (1 diff)
-
trunk/blog/owner/setting/teamblog (copied) (copied from sandbox/blog/owner/setting/teamblog)
-
trunk/blog/owner/setting/teamblog/Invite (copied) (copied from sandbox/blog/owner/setting/teamblog/Invite)
-
trunk/blog/owner/setting/teamblog/Invite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/Invite/index.php)
-
trunk/blog/owner/setting/teamblog/cancelInvite (copied) (copied from sandbox/blog/owner/setting/teamblog/cancelInvite)
-
trunk/blog/owner/setting/teamblog/cancelInvite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/cancelInvite/index.php)
-
trunk/blog/owner/setting/teamblog/changeBlog (copied) (copied from sandbox/blog/owner/setting/teamblog/changeBlog)
-
trunk/blog/owner/setting/teamblog/changeBlog/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/changeBlog/index.php)
-
trunk/blog/owner/setting/teamblog/delInvite (copied) (copied from sandbox/blog/owner/setting/teamblog/delInvite)
-
trunk/blog/owner/setting/teamblog/delInvite/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/delInvite/index.php)
-
trunk/blog/owner/setting/teamblog/deleteUser (copied) (copied from sandbox/blog/owner/setting/teamblog/deleteUser)
-
trunk/blog/owner/setting/teamblog/deleteUser/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/deleteUser/index.php)
-
trunk/blog/owner/setting/teamblog/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/index.php)
-
trunk/blog/owner/setting/teamblog/isAdmin (copied) (copied from sandbox/blog/owner/setting/teamblog/isAdmin)
-
trunk/blog/owner/setting/teamblog/isAdmin/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/isAdmin/index.php)
-
trunk/blog/owner/setting/teamblog/nameStyle (copied) (copied from sandbox/blog/owner/setting/teamblog/nameStyle)
-
trunk/blog/owner/setting/teamblog/nameStyle/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/nameStyle/index.php)
-
trunk/blog/owner/setting/teamblog/profileImage (copied) (copied from sandbox/blog/owner/setting/teamblog/profileImage)
-
trunk/blog/owner/setting/teamblog/profileImage/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/profileImage/index.php)
-
trunk/blog/owner/setting/teamblog/profileText (copied) (copied from sandbox/blog/owner/setting/teamblog/profileText)
-
trunk/blog/owner/setting/teamblog/profileText/index.php (copied) (copied from sandbox/blog/owner/setting/teamblog/profileText/index.php)
-
trunk/components/Textcube.Control.Auth.php (modified) (1 diff)
-
trunk/components/Textcube.Core.php (modified) (1 diff)
-
trunk/components/Textcube.Data.Post.php (modified) (2 diffs)
-
trunk/lib/auth.php (modified) (3 diffs)
-
trunk/lib/includeForBlogOwner.php (modified) (1 diff)
-
trunk/lib/includeForReader.php (modified) (1 diff)
-
trunk/lib/model/blog.api.php (modified) (2 diffs)
-
trunk/lib/model/blog.blogSetting.php (modified) (2 diffs)
-
trunk/lib/model/blog.comment.php (modified) (2 diffs)
-
trunk/lib/model/blog.entry.php (modified) (2 diffs)
-
trunk/lib/model/blog.user.php (modified) (1 diff)
-
trunk/lib/pageACL.php (copied) (copied from sandbox/lib/pageACL.php)
-
trunk/lib/piece/blog/entries.php (modified) (4 diffs)
-
trunk/lib/piece/blog/list.php (modified) (2 diffs)
-
trunk/lib/piece/owner/contentMenu.php (modified) (2 diffs)
-
trunk/lib/piece/owner/header.php (modified) (2 diffs)
-
trunk/lib/session.php (modified) (1 diff)
-
trunk/setup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/blog/checkup/index.php
r3124 r3313 475 475 } 476 476 477 if (!doesExistTable($database['prefix'] . 'Teamblog')) { 478 $changed = true; 479 echo '<li>', _text('팀블로그 기능을 위한 테이블을 추가합니다.'), ': '; 480 $query = " 481 CREATE TABLE {$database['prefix']}Teamblog ( 482 teams int(11) NOT NULL default 0, 483 userid int(11) NOT NULL default 1, 484 enduser int(11) NOT NULL default 0, 485 admin int(11) NOT NULL default 0, 486 posting int(11) NOT NULL default 0, 487 profile text NULL default '', 488 logo varchar(15) default '', 489 font_style int(11) NOT NULL default 0, 490 font_color varchar(10) NOT NULL default '#000000', 491 font_size int(11) NOT NULL default 10, 492 font_bold int(11) NOT NULL default 0, 493 created int(11) NOT NULL default 0, 494 lastLogin int(11) NOT NULL default 0, 495 PRIMARY KEY (teams,userid,admin) 496 ) TYPE=MyISAM 497 "; 498 if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { 499 $query = new TableQuery($database['prefix'] . 'Users'); 500 if($query->doesExist()) { 501 $changed = true; 502 if ($users = $query->getAll('userid, name, created')) { 503 foreach($users as $user) { 504 DBQuery::execute("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$user['userid']."', '".$user['userid']."','0','1','1', '".$user['name']."', '', '0', '#000000', '10', '0', '".$user['created']."', '0')"); 505 } 506 } 507 unset($users); 508 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 509 } 510 } else 511 echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 512 } 513 514 if (!doesExistTable($database['prefix'] . 'TeamEntryRelations')) { 515 $changed = true; 516 echo '<li>', _text('팀블로그 연관글 기능을 위한 테이블을 추가합니다.'), ': '; 517 $query = " 518 CREATE TABLE {$database['prefix']}TeamEntryRelations ( 519 owner int(11) NOT NULL default 1, 520 id int(11) NOT NULL default 1, 521 team int(11) NOT NULL default 1, 522 PRIMARY KEY (owner,id,team) 523 ) TYPE=MyISAM 524 "; 525 if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { 526 $query = new TableQuery($database['prefix'] . 'Entries'); 527 if($query->doesExist()) { 528 $changed = true; 529 if ($entries = $query->getAll('owner, id')) { 530 foreach($entries as $entry) { 531 DBQuery::execute("INSERT INTO `{$database['prefix']}TeamEntryRelations` VALUES('".$entry['owner']."', '".$entry['id']."','".$entry['owner']."')"); 532 533 } 534 } 535 unset($entries); 536 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 537 } 538 539 } else 540 echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 541 } 542 477 543 $filename = ROOT . '/.htaccess'; 478 544 $fp = fopen($filename, "r"); -
branches/1.5/blog/comment/delete/item.php
r3305 r3313 16 16 ); 17 17 require ROOT . '/lib/includeForBlog.php'; 18 list($replier)=getCommentAttributes($owner,$suri['id'],'replier'); 19 $ch_res = mysql_fetch_array(mysql_query("SELECT Posting FROM `{$database['prefix']}Teamblog` WHERE teams='$owner' and userid='$_SESSION[admin]'")); 20 if(empty($ch_res['Posting']) && $owner != $_SESSION['admin']){ 21 if(!empty($replier)){ 22 if($owner != $_SESSION['admin']){ 23 if($replier != $_SESSION['admin']){ 24 echo _t('<script> alert("권한이 없습니다."); window.close(); </script>'); 25 exit; 26 } 27 } 28 } 29 else{ 30 if($owner != $_SESSION['admin'] && !empty($_SESSION['admin'])){ 31 echo _t('<script> alert("권한이 없습니다."); window.close(); </script>'); 32 exit; 33 } 34 } 35 } 18 36 if (false) { 19 37 fetchConfigVal(); -
branches/1.5/blog/login/index.php
r3124 r3313 17 17 'requestURI' => array('string', 'default' => null), 18 18 'reset' => array(array('on') ,'default' => null), 19 'save' => array('any', 'default' => null) 19 'save' => array('any', 'default' => null), 20 'teamblogPatch' => array('string', 'default' => null) 20 21 ) 21 22 ); … … 42 43 $message = _text('권한이 없습니다.'); 43 44 } else if (!empty($_POST['loginid']) && !empty($_POST['password'])) { 44 if (!login($_POST['loginid'], $_POST['password'])) { 45 // 팀블로그 :: 로그인 46 $isLogin = login($_POST['loginid'],$_POST['password']); 47 if (!$isLogin) { 45 48 $message = _text('아이디 또는 비밀번호가 틀렸습니다.'); 46 49 if (!doesHaveMembership() && isLoginId($owner, $_POST['loginid'])) 47 50 $showPasswordReset = true; 51 } 52 else if($isLogin == 2){ 53 $message=_t('권한이 없습니다.'); 48 54 } 49 55 } -
branches/1.5/blog/owner/center/dashboard/index.php
r3144 r3313 458 458 } 459 459 460 // 팀블로그 :: 관리자 권한이 없으면 센터를 편집할수없다. 461 462 if(!empty($ac)){ 463 460 464 if (!isset($_REQUEST['edit'])) { 461 465 ?> … … 508 512 } 509 513 514 } // End TeamBlog 515 510 516 require ROOT . '/lib/piece/owner/footer.php'; 511 517 ?> -
branches/1.5/blog/owner/entry/delete/index.php
r3124 r3313 12 12 requireStrictRoute(); 13 13 foreach(explode(',', $_POST['targets']) as $target) { 14 // TeamBlog check 15 if(empty($pc)){ 16 $isPosting = DBQuery::queryCell("SELECT team FROM {$database['prefix']}TeamEntryRelations WHERE owner='$owner' and team='".$_SESSION['admin']."' and id='".$suri['id']."'" ); 17 if(empty($isPosting)) { 18 respondResultPage(-1); 19 exit; 20 } 21 } 22 // End TeamBlog 23 14 24 if (!deleteEntry($owner, $target)) 15 25 respondResultPage(-1); -
branches/1.5/blog/owner/entry/delete/item.php
r3124 r3313 8 8 9 9 $isAjaxRequest = checkAjaxRequest(); 10 11 // TeamBlog check. 12 if(empty($pc)){ 13 $isPosting = DBQuery::queryCell("SELECT team FROM {$database['prefix']}TeamEntryRelations WHERE owner='".$owner."' and team='".$_SESSION['admin']."' and id='".$suri['id']."'" ); 14 if(empty($isPosting)) { 15 respondResultPage(-1); 16 exit; 17 } 18 } 19 // End TeamBlog 10 20 11 21 if ($isAjaxRequest) { -
branches/1.5/blog/owner/entry/edit/item.php
r3225 r3313 29 29 $isKeyword = ($entry['category'] == -1); 30 30 } 31 32 33 // 팀블로그 :: 현재 포스트를 내가 편집할 수 있는지 권한확인 34 if(empty($pc) && !empty($suri['id'])){ 35 $isPosting = DBQuery::queryCell("SELECT Team FROM {$database['prefix']}TeamEntryRelations WHERE Owner='$owner' and Team='$_SESSION[admin]' and Id='$suri[id]' " ); 36 if(empty($isPosting)) { @header("location:".$blogURL ."/owner/entry"); exit; } 37 } 38 // End TeamBlog 31 39 32 40 if (isset($_GET['popupEditor'])) { … … 659 667 <div id="status-protected" class="status-protected"<?php if($isKeyword) echo _t('style="display: none"');?>><input type="radio" id="visibility_protected" class="radio" name="visibility" value="1"<?php echo (abs($entry['visibility']) == 1 ? ' checked="checked"' : '');?> /><label for="visibility_protected"><?php echo _t('보호');?></label></div> 660 668 <div id="status-public" class="status-public"><input type="radio" id="visibility_public" class="radio" name="visibility" value="2"<?php echo (abs($entry['visibility']) == 2 ? ' checked="checked"' : '');?> /><label for="visibility_public"><?php echo _t('공개');?></label></div> 661 <div id="status-syndicated" class="status-syndicated"<?php if($isKeyword) echo _t('style="display: none"');?>><input type="radio" id="visibility_syndicated" class="radio" name="visibility" value="3"<?php echo $countResult == false ? ' onclick="viewWhatIsEolin() "' : NULL; echo (abs($entry['visibility']) == 3 ? ' checked="checked"' : '');?> /><label for="visibility_syndicated"><?php echo _t('발행');?><?php echo $countResult == true ? ' (<a href="#void" onclick="viewWhatIsEolin()">'._t('설명').'</a>)' : NULL;?></label></div>669 <div id="status-syndicated" class="status-syndicated"<?php if($isKeyword) echo _t('style="display: none"');?>><input type="radio" id="visibility_syndicated" class="radio" name="visibility" value="3"<?php echo $countResult == false ? ' onclick="viewWhatIsEolin();return false;"' : NULL; echo (abs($entry['visibility']) == 3 ? ' checked="checked"' : '');?> /><label for="visibility_syndicated"><?php echo _t('발행');?><?php echo $countResult == true ? ' (<a href="#void" onclick="viewWhatIsEolin()">'._t('설명').'</a>)' : NULL;?></label></div> 662 670 </dd> 663 671 </dl> -
branches/1.5/blog/owner/entry/visibility/item.php
r3124 r3313 14 14 require ROOT . '/lib/includeForBlogOwner.php'; 15 15 requireStrictRoute(); 16 17 // TeamBlog ACL check whether or not current user can edit this post. 18 if(empty($pc) && !empty($suri['id'])){ 19 $isPosting = DBQuery::queryCell("SELECT team FROM {$database['prefix']}TeamEntryRelations WHERE owner='".$owner."' and team='".$_SESSION['admin']."' and id='".$suri['id']."'" ); 20 if(empty($isPosting)) { 21 exit; 22 } 23 } 24 // End TeamBlog 16 25 17 26 //$isAjaxRequest = checkAjaxRequest(); -
branches/1.5/blog/owner/setting/account/index.php
r3144 r3313 228 228 ?> //]]> 229 229 </script> 230 230 231 232 <?php 233 // Teamblog :: Get username. 234 $teamblog_user = DBQuery::queryRow("SELECT name, loginid 235 FROM {$database['prefix']}Users 236 WHERE userid='".$_SESSION['admin']."'"); 237 // End TeamBlog 238 ?> 239 240 231 241 <div id="part-setting-account" class="part"> 232 242 <h2 class="caption"><span class="main-text"><?php echo _t('회원정보를 관리합니다');?></span></h2> … … 239 249 <dl id="blogger-name-line" class="line"> 240 250 <dt><label for="nickname"><?php echo _t('필명');?></label></dt> 241 <dd><input type="text" id="nickname" class="input-text" value="<?php echo htmlspecialchars($ user['name']);?>" onkeydown="if(event.keyCode == 13) save();" /></dd>251 <dd><input type="text" id="nickname" class="input-text" value="<?php echo htmlspecialchars($teamblog_user['name']);?>" onkeydown="if(event.keyCode == 13) save();" /></dd> 242 252 </dl> 243 253 <dl id="blogger-email-line" class="line"> 244 254 <dt><label for="email"><?php echo _t('e-mail');?></label></dt> 245 255 <dd> 246 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars( User::getEmail());?>" />256 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars($teamblog_user['loginid']);?>" /> 247 257 <em><?php echo _t('(로그인시 ID로 사용됩니다)');?></em> 248 258 </dd> … … 281 291 282 292 <?php 283 if (($service['type'] != 'single') && (getUserId() == 1) ) {293 if (($service['type'] != 'single') && (getUserId() == 1) && ($_SESSION['admin'] == 1)) { 284 294 $urlRule = getBlogURLRule(); 285 295 ?> -
branches/1.5/blog/owner/setting/account/invite/index.php
r3124 r3313 19 19 respondResultPage(false); 20 20 $result = addUser($_POST['email'], $_POST['name'], $_POST['identify'], $_POST['comment'], $_POST['senderName'], $_POST['senderEmail']); 21 21 22 respondResultPage($result); 22 23 ?> -
branches/1.5/blog/owner/setting/account/password/index.php
r3124 r3313 12 12 require ROOT . '/lib/includeForBlogOwner.php'; 13 13 requireStrictRoute(); 14 if (changePassword($ owner, $_POST['pwd'], $_POST['prevPwd'])) {14 if (changePassword($_SESSION['admin'], $_POST['pwd'], $_POST['prevPwd'])) { 15 15 respondResultPage(0); 16 16 } -
branches/1.5/blog/owner/setting/account/profile/index.php
r3124 r3313 6 6 $IV = array( 7 7 'POST' => array( 8 'email' => array('email'), 9 'nickname' => array('string') 8 'userid'=>array('id') 10 9 ) 11 10 ); 12 11 require ROOT . '/lib/includeForBlogOwner.php'; 13 12 requireStrictRoute(); 14 if (changeSetting($ owner, $_POST['email'], $_POST['nickname'])) {13 if (changeSetting($_SESSION['admin'], $_POST['email'], $_POST['nickname'])) { 15 14 respondResultPage(0); 16 15 } -
branches/1.5/components/Textcube.Control.Auth.php
r3124 r3313 7 7 global $database, $owner; 8 8 $loginid = mysql_tt_escape_string($loginid); 9 $result = mysql_query("SELECT userid FROM {$database['prefix']}Users WHERE userid = $owner AND loginid = '$loginid' ANDpassword = '" . md5($password) . "'");9 $result = mysql_query("SELECT a.userid FROM {$database['prefix']}Users a, {$database['prefix']}Teamblog b WHERE b.teams = $owner AND a.userid=b.userid AND a.loginid = '$loginid' AND a.password = '" . md5($password) . "'"); 10 10 if ($result && (mysql_num_rows($result) == 1)) { 11 11 mysql_query("UPDATE {$database['prefix']}Users SET lastLogin = UNIX_TIMESTAMP() WHERE loginid = '$loginid'"); -
branches/1.5/components/Textcube.Core.php
r3124 r3313 36 36 } 37 37 } 38 39 40 class teamblogUser{ 41 function name(){ 42 requireComponent('Eolin.PHP.Core'); 43 global $database, $owner, $entry; 44 45 $res = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog 46 WHERE teams='$owner' AND userid='$owner' " ); 47 48 $is_style = $res['font_style'] & 1; 49 $is_admin = $res['font_style'] & 2; 50 $font_style = $res['font_style'] & 4; 51 $isname = $res['font_style'] & 8; 52 $is_ch = $res['font_style'] & 16; 53 $name = array(4); 54 $name[0] = ''; 55 $name[1] = ''; 56 $name[2] = 0; 57 $name[3] = ''; 58 59 $styleS = ''; 60 $styleE = ''; 61 if(!isset($_SESSION['admin'])) $_SESSION['admin'] = $owner; 62 63 $ttmp = DBQuery::queryRow("SELECT * 64 FROM ".$database['prefix']."Teamblog 65 WHERE teams='".$owner."' 66 and userid='".$_SESSION['admin']."'"); 67 $stmp = DBQuery::queryRow("SELECT * 68 FROM ".$database['prefix']."TeamEntryRelations 69 WHERE owner='".$owner."' 70 and id='".$entry['id']."'"); 71 $itmp = DBQuery::queryRow("SELECT a.*, b.name 72 FROM {$database['prefix']}Teamblog a, 73 {$database['prefix']}Users b 74 WHERE a.teams='".$owner."' 75 AND a.userid='".$stmp['team']."' 76 AND a.userid=b.userid"); 77 78 if(empty($font_style)){ 79 if(empty($is_style)){ 80
