Changeset 3299
- Timestamp:
- 05/21/07 01:56:13 (18 months ago)
- Location:
- sandbox
- Files:
-
- 21 added
- 31 modified
-
blog/checkup/index.php (modified) (1 diff)
-
blog/comment/delete/item.php (modified) (2 diffs)
-
blog/login/index.php (modified) (2 diffs)
-
blog/owner/center/dashboard/index.php (modified) (2 diffs)
-
blog/owner/entry/add/index.php (modified) (1 diff)
-
blog/owner/entry/delete/index.php (modified) (1 diff)
-
blog/owner/entry/delete/item.php (modified) (1 diff)
-
blog/owner/entry/edit/item.php (modified) (2 diffs)
-
blog/owner/entry/visibility/item.php (modified) (1 diff)
-
blog/owner/setting/account/cancelInvite/index.php (modified) (1 diff)
-
blog/owner/setting/account/index.php (modified) (3 diffs)
-
blog/owner/setting/account/invite/index.php (modified) (1 diff)
-
blog/owner/setting/account/password/index.php (modified) (1 diff)
-
blog/owner/setting/account/profile/index.php (modified) (1 diff)
-
blog/owner/setting/teamblog (added)
-
blog/owner/setting/teamblog/Invite (added)
-
blog/owner/setting/teamblog/Invite/index.php (added)
-
blog/owner/setting/teamblog/cancelInvite (added)
-
blog/owner/setting/teamblog/cancelInvite/index.php (added)
-
blog/owner/setting/teamblog/changeBlog (added)
-
blog/owner/setting/teamblog/changeBlog/index.php (added)
-
blog/owner/setting/teamblog/delInvite (added)
-
blog/owner/setting/teamblog/delInvite/index.php (added)
-
blog/owner/setting/teamblog/deleteUser (added)
-
blog/owner/setting/teamblog/deleteUser/index.php (added)
-
blog/owner/setting/teamblog/index.php (added)
-
blog/owner/setting/teamblog/isAdmin (added)
-
blog/owner/setting/teamblog/isAdmin/index.php (added)
-
blog/owner/setting/teamblog/nameStyle (added)
-
blog/owner/setting/teamblog/nameStyle/index.php (added)
-
blog/owner/setting/teamblog/profileImage (added)
-
blog/owner/setting/teamblog/profileImage/index.php (added)
-
blog/owner/setting/teamblog/profileText (added)
-
blog/owner/setting/teamblog/profileText/index.php (added)
-
components/Textcube.Control.Auth.php (modified) (1 diff)
-
components/Textcube.Core.php (modified) (1 diff)
-
components/Textcube.Data.Post.php (modified) (2 diffs)
-
components/Textcube.Data.User.php (modified) (1 diff)
-
lib/auth.php (modified) (3 diffs)
-
lib/includeForBlogOwner.php (modified) (1 diff)
-
lib/includeForReader.php (modified) (1 diff)
-
lib/model/blog.api.php (modified) (2 diffs)
-
lib/model/blog.comment.php (modified) (2 diffs)
-
lib/model/blog.entry.php (modified) (3 diffs)
-
lib/model/blog.user.php (modified) (1 diff)
-
lib/pageACL.php (added)
-
lib/piece/blog/entries.php (modified) (4 diffs)
-
lib/piece/blog/list.php (modified) (2 diffs)
-
lib/piece/owner/contentMenu.php (modified) (2 diffs)
-
lib/piece/owner/header.php (modified) (2 diffs)
-
lib/session.php (modified) (1 diff)
-
setup.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/blog/checkup/index.php
r3108 r3299 492 492 } 493 493 494 if (!doesExistTable($database['prefix'] . 'Teamblog')) { 495 $changed = true; 496 echo '<li>', _text('팀블로그 기능을 위한 테이블을 추가합니다.'), ': '; 497 $query = " 498 CREATE TABLE {$database['prefix']}Teamblog ( 499 teams int(11) NOT NULL default 0, 500 userid int(11) NOT NULL default 1, 501 enduser int(11) NOT NULL default 0, 502 admin int(11) NOT NULL default 0, 503 posting int(11) NOT NULL default 0, 504 profile text NULL default '', 505 logo varchar(15) default '', 506 font_style int(11) NOT NULL default 0, 507 font_color varchar(10) NOT NULL default '#000000', 508 font_size int(11) NOT NULL default 10, 509 font_bold int(11) NOT NULL default 0, 510 created int(11) NOT NULL default 0, 511 lastLogin int(11) NOT NULL default 0, 512 PRIMARY KEY (teams,userid,admin) 513 ) TYPE=MyISAM 514 "; 515 if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { 516 while($row = DBQuery::queryRow("SELECT * FROM `{$database['prefix']}Users` ORDER BY userid")){ 517 DBQuery::execute("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$row['userid']."', '".$row['userid']."','0','1','1', '".$row['name']."', '', '0', '#000000', '10', '0', '".$row['created']."', '0')"); 518 } 519 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 520 } else 521 echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 522 } 523 524 if (!doesExistTable($database['prefix'] . 'TeamEntryRelations')) { 525 $changed = true; 526 echo '<li>', _text('팀블로그 연관글 기능을 위한 테이블을 추가합니다.'), ': '; 527 $query = " 528 CREATE TABLE {$database['prefix']}TeamEntryRelations ( 529 owner int(11) NOT NULL default 1, 530 id int(11) NOT NULL default 1, 531 team int(11) NOT NULL default 1, 532 PRIMARY KEY (owner,id,team) 533 ) TYPE=MyISAM 534 "; 535 if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { 536 while($row = DBQuery::queryRow("SELECT * FROM `{$database['prefix']}Entries` ORDER BY owner")){ 537 DBQuery::execute("INSERT INTO `{$database['prefix']}TeamEntryRelations` VALUES('".$row['owner']."', '".$row['id']."','".$row['owner']."')"); 538 } 539 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 540 } else 541 echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 542 } 543 494 544 $filename = ROOT . '/.htaccess'; 495 545 $fp = fopen($filename, "r"); -
sandbox/blog/comment/delete/item.php
r3294 r3299 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(); … … 52 70 try { 53 71 obj = opener.document.getElementById("commentCount<?php echo $entryId;?>"); 54 if (obj != null) obj.innerHTML = "<?php echo str_ replace('"', '\"',$commentView);?>";72 if (obj != null) obj.innerHTML = "<?php echo str_innerHTML($commentView);?>"; 55 73 } catch(e) { } 56 74 try { 57 75 obj = opener.document.getElementById("commentCountOnRecentEntries<?php echo $entryId;?>"); 58 if (obj != null) obj.innerHTML = "<?php echo ($commentCount > 0) ? '(' . $commentCount . ')' : '';?>";76 if (obj != null) obj.innerHTML = "<?php echo str_innerHTML(($commentCount > 0) ? '(' . $commentCount . ')' : '');?>"; 59 77 } catch(e) { } 60 78 window.close(); -
sandbox/blog/login/index.php
r3212 r3299 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 } -
sandbox/blog/owner/center/dashboard/index.php
r3138 r3299 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 ?> -
sandbox/blog/owner/entry/add/index.php
r3106 r3299 39 39 fireEvent('AddPost', $id, $entry); 40 40 setUserSetting('LatestEditedEntry',$id); 41 42 // �����:: �۾�� ����� �����DB �� �ִ´� 43 DBQuery::query("INSERT INTO `{$database['prefix']}TeamEntryRelations` VALUES('$owner', '$id', '$_SESSION[admin]')"); 44 // End TeamBlog 41 45 } 42 46 $result = array(); -
sandbox/blog/owner/entry/delete/index.php
r3106 r3299 12 12 requireStrictRoute(); 13 13 foreach(explode(',', $_POST['targets']) as $target) { 14 15 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ� 16 if(empty($pc)){ 17 $isPosting = DBQuery::queryCell("SELECT Team FROM {$database['prefix']}TeamEntryRelations WHERE Owner='$owner' and Team='$_SESSION[admin]' and Id='$suri[id]' " ); 18 if(empty($isPosting)) { respondResultPage(-1); exit; } 19 } 20 // End TeamBlog 21 14 22 if (!deleteEntry($owner, $target)) 15 23 respondResultPage(-1); 24 16 25 } 17 26 respondResultPage(0); -
sandbox/blog/owner/entry/delete/item.php
r3106 r3299 8 8 9 9 $isAjaxRequest = checkAjaxRequest(); 10 11 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ� 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)) { respondResultPage(-1); exit; } 15 } 16 // End TeamBlog 10 17 11 18 if ($isAjaxRequest) { -
sandbox/blog/owner/entry/edit/item.php
r3224 r3299 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() ;return false;">'._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()"' : 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> -
sandbox/blog/owner/entry/visibility/item.php
r3106 r3299 14 14 require ROOT . '/lib/includeForBlogOwner.php'; 15 15 requireStrictRoute(); 16 17 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ� 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)) { exit; } 21 } 22 // End TeamBlog 16 23 17 24 //$isAjaxRequest = checkAjaxRequest(); -
sandbox/blog/owner/setting/account/cancelInvite/index.php
r3106 r3299 13 13 $result = cancelInvite($_POST['userid']); 14 14 if ($result) { 15 DBQuery::execute("DELETE FROM `{$database['prefix']}Teamblog` WHERE teams='$owner' and userid='$_POST[userid]'"); 15 16 respondResultPage(0); 16 17 } else { -
sandbox/blog/owner/setting/account/index.php
r3138 r3299 228 228 ?> //]]> 229 229 </script> 230 230 231 232 <?php 233 // 팀블로그 :: 사용자 이름 받아오기 234 $CH_user = DBQuery::queryRow("SELECT name, loginid FROM {$database['prefix']}Users WHERE userid='$_SESSION[admin]'"); 235 // End TeamBlog 236 ?> 237 238 231 239 <div id="part-setting-account" class="part"> 232 240 <h2 class="caption"><span class="main-text"><?php echo _t('회원정보를 관리합니다');?></span></h2> … … 239 247 <dl id="blogger-name-line" class="line"> 240 248 <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>249 <dd><input type="text" id="nickname" class="input-text" value="<?php echo htmlspecialchars($CH_user['name']);?>" onkeydown="if(event.keyCode == 13) save();" /></dd> 242 250 </dl> 243 251 <dl id="blogger-email-line" class="line"> 244 252 <dt><label for="email"><?php echo _t('e-mail');?></label></dt> 245 253 <dd> 246 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars( User::getEmail());?>" />254 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars($CH_user['loginid']);?>" /> 247 255 <em><?php echo _t('(로그인시 ID로 사용됩니다)');?></em> 248 256 </dd> … … 281 289 282 290 <?php 283 if (($service['type'] != 'single') && (getUserId() == 1) ) {291 if (($service['type'] != 'single') && (getUserId() == 1) && ($_SESSION['admin'] == 1)) { 284 292 $urlRule = getBlogURLRule(); 285 293 ?> -
sandbox/blog/owner/setting/account/invite/index.php
r3106 r3299 19 19 respondResultPage(false); 20 20 $result = addUser($_POST['email'], $_POST['name'], $_POST['identify'], $_POST['comment'], $_POST['senderName'], $_POST['senderEmail']); 21 22 // �����:: DB �� ��� ��� ��� 23 if($result == 15){ 24 $my = DBQuery::queryRow("SELECT userid, name FROM {$database['prefix']}Users WHERE loginid='$_POST[email]'"); 25 $profile = $my['name'] . "�����Դϴ�"; 26 $teams=DBQuery::query("INSERT INTO `{$database['prefix']}Teamblog` VALUES('$my[userid]', '$my[userid]', '0', '1', '1', '$profile', '', '0', '#000000', '10', '0', UNIX_TIMESTAMP(), '0')"); 27 if(!$teams||(mysql_affected_rows()==0)){ 28 respondResultPage(20); 29 } 30 } 21 31 respondResultPage($result); 22 32 ?> -
sandbox/blog/owner/setting/account/password/index.php
r3106 r3299 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 } -
sandbox/blog/owner/setting/account/profile/index.php
r3106 r3299 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 } -
sandbox/components/Textcube.Control.Auth.php
r3108 r3299 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'"); -
sandbox/components/Textcube.Core.php
r3108 r3299 36 36 } 37 37 } 38 39 40 class teamblogUser{ 41 function name(){ 42 requireComponent('Eolin.PHP.Core'); 43 global $database, $owner, $entry, $_SESSION; 44 45 $res = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='$owner' and userid='$owner' " ); 46 47 $is_style = $res['font_style'] & 1; 48 $is_admin = $res['font_style'] & 2; 49 $font_style = $res['font_style'] & 4; 50 $isname = $res['font_style'] & 8; 51 $is_ch = $res['font_style'] & 16; 52 $name = array(4); 53 $name[0] = ''; 54 $name[1] = ''; 55 $name[2] = 0; 56 $name[3] = ''; 57 58 $styleS = ''; 59 $styleE = ''; 60 61 $ttmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='".$owner."' and userid='".$_SESSION['admin']."' " ); 62 $stmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."TeamEntryRelations WHERE owner='".$owner."' and id='".$entry['id']."'"); 63 $itmp = DBQuery::queryRow("SELECT a.*, b.name FROM {$database['prefix']}Teamblog a, {$database['prefix']}Users b WHERE a.teams='".$owner."' and a.userid='".$stmp['team']."' AND a.userid=b.userid"); 64 65 if(empty($font_style)){ 66 if(empty($is_style)){ 67 if(empty($is_admin)) $ures = $itmp; 68 else $ures = $res; 69 70 $font_bold = $ures['font_bold'] & 1; 71 if(empty($font_bold)) $font_bold = ''; 72 else $font_bold = 'bold'; 73 74 $font_italic = $ures['font_bold'] & 2; 75 if(empty($font_italic)) $font_italic = ''; 76 else $font_italic = 'italic'; 77 78 79 $styleS = '<font style="font-Weight:'.$font_bold.';font-Style:'.$font_italic.';font-Size:'.$ures['font_size'].'pt;color:'.$ures['font_color'].';">'; 80 $styleE = '</font>'; 81 } 82 if(empty($is_ch)){ 83 if(empty($isname)) $name[0] = ' by ' . $styleS . $itmp['name'] . $styleE; 84 else $name[1] = ' by ' . $styleS . $itmp['name'] . $styleE; 85 } else { 86 $name[3] = $styleS . $itmp['name'] . $styleE; 87 } 88 } 89 90 if(($ttmp['Posting'] == 1) || ($stmp['Team'] == $_SESSION['admin'])) $name[2] = 1; 91 92 return $name; 93 } 94 95 function PC(){ 96 global $database, $owner, $_SESSION; 97 $itmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='".$owner."' and userid='".$_SESSION['admin']."'"); 98 $access = 0; 99 if(!empty($itmp['Posting'])) $access = 1; 100 return $access; 101 } 102 103 function AC(){ 104 global $database, $owner, $_SESSION; 105 $itmp = DBQuery::queryRow("SELECT * FROM ".$database['prefix']."Teamblog WHERE teams='".$owner."' and userid='".$_SESSION['admin']."'"); 106 $access = 0; 107 if(!empty($itmp['admin'])) $access = 1; 108 if(($itmp['userid'] == $itmp['teams']) && ($itmp['enduser'] !=0)) $access = 2; 109 return $access; 110 } 111 112 function myBlog(){ 113 global $database, $owner, $_SESSION, $blogURL, $_SERVER, $blog, $service; 114 115 if($service['type'] == "path") 116 $Path = str_replace($service['path']."/".$blog['name'], "", $_SERVER["REQUEST_URI"]); 117 else 118 $Path = str_replace("/".$blog['name'], "", $_SERVER["REQUEST_URI"]); 119 120 $blogn = ('<script type="text/javascript"> 121 function teamblog(){ 122 var bs = document.getElementById("teamblog"); 123 if(bs.value != "") 124 location.href = "'.$blogURL.'/owner/setting/teamblog/changeBlog/?bs=" + bs.value + "&path='.$Path.'"; 125 } 126 </script>'); 127 $blogn .= '<select id="teamblog" onChange="teamblog();"><optgroup label="'._t('내가 가입한 팀블로그').'">'; 128 129 $isEnd = $_SESSION['admin']+1; 130 $myres = DBQuery::queryRow("SELECT * FROM `{$database['prefix']}Teamblog` WHERE `userid`='".$_SESSION['admin']."' and enduser='".$isEnd."'"); 131 if(!empty($myres['profile'])){ 132 if($owner == $_SESSION['admin'] && $myres['userid'] > 1) $myblogsel = " selected "; 133 $blogn .= '<option value="'.$myres['userid'].'" '. $myblogsel .'/>'._t('내 블로그').'</option>'; 134 } 135 136 $result = DBQuery::query("SELECT * FROM ".$database['prefix']."Teamblog WHERE userid='".$_SESSION['admin']."'"); 137 while($res = mysql_fetch_array($result)){ 138 if($res['teams'] == $res['userid'] && $res['enduser'] > '0'){ 139 continue; 140 } else { 141 $itmp = DBQuery::queryCell("SELECT title FROM ".$database['prefix']."BlogSettings WHERE owner='".$res['teams']."'"); 142 if(empty($itmp['title'])){ 143 $itmp = DBQuery::queryCell("SELECT name FROM ".$database['prefix']."Users WHERE userid='".$res['teams']."'"); 144 $title = $itmp['name'] .'님의 블로그'; 145 } else { 146 $title = $itmp['title']; 147 } 148 $blogn .= '<option value="' . $res['teams'] . '"'; 149 if($res['teams'] == $owner) $blogn .= ' selected'; 150 $blogn .= ' />' . $title . '</option>'; 151 } 152 } 153 $blogn .= '</optgroup> </select> '; 154 155 return $blogn; 156 } 157 } 38 158 ?> -
sandbox/components/Textcube.Data.Post.php
r3109 r3299 89 89 } 90 90 91 function add( ) {91 function add($userid) { 92 92 global $database, $owner; 93 93 if (isset($this->id) && !Validator::number($this->id, 1)) … … 141 141 } 142 142 } 143 $TN = mysql_fetch_array(mysql_query("SELECT userid FROM {$database['prefix']}Users WHERE loginid='$userid'")); 144 mysql_query("INSERT INTO {$database['prefix']}TeamEntryRelations VALUES('$owner', '$this->id', '$TN[userid]')"); 143 145 return true; 144 146 } -
sandbox/components/Textcube.Data.User.php
r3109 r3299 73 73 } 74 74 75 function get Userid() {75 function getuserid() { 76 76 if (is_null($this->userid)) 77 77 $this->getUser(); -
sandbox/lib/auth.php
r3108 r3299 6 6 global $database; 7 7 global $service; 8 global $owner; // 팀블로그 변수 추가 8 9 $loginid = mysql_tt_escape_string($loginid); 9 10 if ((strlen($password) == 32) && preg_match('/[0-9a-f]/i', $password)) … …
