Changeset 3300
- Timestamp:
- 05/21/07 02:25:54 (18 months ago)
- Location:
- sandbox
- Files:
-
- 14 modified
-
blog/owner/entry/add/index.php (modified) (1 diff)
-
blog/owner/entry/delete/index.php (modified) (2 diffs)
-
blog/owner/entry/delete/item.php (modified) (1 diff)
-
blog/owner/entry/edit/item.php (modified) (1 diff)
-
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) (2 diffs)
-
blog/owner/setting/account/invite/index.php (modified) (1 diff)
-
components/Textcube.Data.User.php (modified) (1 diff)
-
lib/model/blog.blogSetting.php (modified) (2 diffs)
-
lib/model/blog.entry.php (modified) (2 diffs)
-
lib/piece/blog/list.php (modified) (2 diffs)
-
lib/piece/owner/header.php (modified) (1 diff)
-
lib/session.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/blog/owner/entry/add/index.php
r3299 r3300 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 TeamBlog45 41 } 46 42 $result = array(); -
sandbox/blog/owner/entry/delete/index.php
r3299 r3300 12 12 requireStrictRoute(); 13 13 foreach(explode(',', $_POST['targets']) as $target) { 14 15 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ� 14 // TeamBlog check 16 15 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; } 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 } 19 21 } 20 22 // End TeamBlog … … 22 24 if (!deleteEntry($owner, $target)) 23 25 respondResultPage(-1); 24 25 26 } 26 27 respondResultPage(0); -
sandbox/blog/owner/entry/delete/item.php
r3299 r3300 9 9 $isAjaxRequest = checkAjaxRequest(); 10 10 11 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ�11 // TeamBlog check. 12 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; } 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 } 15 18 } 16 19 // End TeamBlog -
sandbox/blog/owner/entry/edit/item.php
r3299 r3300 667 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> 668 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> 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>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> 670 670 </dd> 671 671 </dl> -
sandbox/blog/owner/entry/visibility/item.php
r3299 r3300 15 15 requireStrictRoute(); 16 16 17 // �����:: �� ���Ʈ�� ���� ��� ������Ȯ�17 // TeamBlog ACL check whether or not current user can edit this post. 18 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; } 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 } 21 23 } 22 24 // End TeamBlog -
sandbox/blog/owner/setting/account/cancelInvite/index.php
r3299 r3300 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]'");16 15 respondResultPage(0); 17 16 } else { -
sandbox/blog/owner/setting/account/index.php
r3299 r3300 231 231 232 232 <?php 233 // 팀블로그 :: 사용자 이름 받아오기 234 $CH_user = DBQuery::queryRow("SELECT name, loginid FROM {$database['prefix']}Users WHERE userid='$_SESSION[admin]'"); 233 // Teamblog :: Get username. 234 $teamblog_user = DBQuery::queryRow("SELECT name, loginid 235 FROM {$database['prefix']}Users 236 WHERE userid='".$_SESSION['admin']."'"); 235 237 // End TeamBlog 236 238 ?> … … 247 249 <dl id="blogger-name-line" class="line"> 248 250 <dt><label for="nickname"><?php echo _t('필명');?></label></dt> 249 <dd><input type="text" id="nickname" class="input-text" value="<?php echo htmlspecialchars($ CH_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> 250 252 </dl> 251 253 <dl id="blogger-email-line" class="line"> 252 254 <dt><label for="email"><?php echo _t('e-mail');?></label></dt> 253 255 <dd> 254 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars($ CH_user['loginid']);?>" />256 <input type="text" id="email" class="input-text" value="<?php echo htmlspecialchars($teamblog_user['loginid']);?>" /> 255 257 <em><?php echo _t('(로그인시 ID로 사용됩니다)');?></em> 256 258 </dd> -
sandbox/blog/owner/setting/account/invite/index.php
r3299 r3300 20 20 $result = addUser($_POST['email'], $_POST['name'], $_POST['identify'], $_POST['comment'], $_POST['senderName'], $_POST['senderEmail']); 21 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 }31 22 respondResultPage($result); 32 23 ?> -
sandbox/components/Textcube.Data.User.php
r3299 r3300 73 73 } 74 74 75 function get userid() {75 function getUserid() { 76 76 if (is_null($this->userid)) 77 77 $this->getUser(); -
sandbox/lib/model/blog.blogSetting.php
r3217 r3300 292 292 return 62; 293 293 } 294 295 $result = DBQuery::query("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$id."', '".$id."', '0', '1', '1', '"._f("%1 님의 글입니다",$name)."', '', '0', '#000000', '10', '0', UNIX_TIMESTAMP(), '0')"); 296 if (!$result || (mysql_affected_rows() == 0)) { 297 DBQuery::query("DELETE FROM `{$database['prefix']}Users` WHERE `userid` = $id"); 298 DBQuery::query("DELETE FROM `{$database['prefix']}BlogSettings` WHERE `owner` = $id"); 299 DBQuery::query("DELETE FROM `{$database['prefix']}SkinSettings` WHERE `owner` = $id"); 300 DBQuery::query("DELETE FROM `{$database['prefix']}FeedSettings` WHERE `owner` = $id"); 301 DBQuery::query("DELETE FROM `{$database['prefix']}FeedGroups` WHERE `owner` = $id"); 302 return 20; 303 } 304 294 305 $headers = 'From: ' . encodeMail($senderName) . '<' . $senderEmail . ">\n" . 'X-Mailer: ' . TEXTCUBE_NAME . "\n" . "MIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n"; 295 306 if (empty($name)) … … 332 343 if (DBQuery::execute("DELETE FROM `{$database['prefix']}SkinSettings` WHERE `owner` = $userid")) { 333 344 if (DBQuery::execute("DELETE FROM `{$database['prefix']}FeedSettings` WHERE `owner` = $userid")) { 334 return true; 345 if(DBQuery::execute("DELETE FROM `{$database['prefix']}Teamblog` WHERE teams='".$owner."' and userid='."$_POST['userid']."'")) { 346 return true; 347 } else { 348 return false; 335 349 } else { 336 350 return false; -
sandbox/lib/model/blog.entry.php
r3299 r3300 218 218 requireComponent('Eolin.PHP.Core'); 219 219 220 // 팀블로그220 // Teamblog 221 221 $chT_SQL1 = $chT_SQL2 = ""; 222 $posting = DBQuery::queryCell("SELECT Posting FROM {$database['prefix']}Teamblog WHERE teams='$owner' and userid=' $_SESSION[admin]'" );222 $posting = DBQuery::queryCell("SELECT Posting FROM {$database['prefix']}Teamblog WHERE teams='$owner' and userid='".$_SESSION['admin']."'" ); 223 223 if(empty($posting)){ 224 224 $chT_SQL1 = ", {$database['prefix']}TeamEntryRelations z"; 225 $chT_SQL2 = " AND z.Owner= $ownerAND z.Id=e.id AND z.Team=".$_SESSION['admin'];225 $chT_SQL2 = " AND z.Owner=".$owner." AND z.Id=e.id AND z.Team=".$_SESSION['admin']; 226 226 } 227 227 // End TeamBlog … … 454 454 DBQuery::query("DELETE FROM {$database['prefix']}Entries WHERE owner = $owner AND id = $id AND draft = 1"); 455 455 DBQuery::query("UPDATE {$database['prefix']}Attachments SET parent = $id WHERE owner = $owner AND parent = 0"); 456 DBQuery::query("INSERT INTO `{$database['prefix']}TeamEntryRelations` VALUES('$owner', '$id', '".$_SESSION['admin']."')"); 456 457 updateEntriesOfCategory($owner, $entry['category']); 457 458 if ($entry['visibility'] == 3) -
sandbox/lib/piece/blog/list.php
r3299 r3300 8 8 $itemsView = ''; 9 9 foreach ($list['items'] as $item) { 10 $CHT_name = DBQuery::queryCell("SELECT b.name FROM {$database['prefix']}TeamEntryRelations a, {$database['prefix']}Users b WHERE a.Owner=$item[owner] AND a.Id=$item[id] AND a.Team=b.userid " ); 10 $teamblog_name = DBQuery::queryCell("SELECT b.name 11 FROM {$database['prefix']}TeamEntryRelations a, {$database['prefix']}Users b 12 WHERE a.Owner=".$item['owner']." AND a.Id=".$item['id']." AND a.Team=b.userid"); 11 13 $itemsView .= str_replace( 12 14 array( … … 19 21 fireEvent('ViewListDate', Timestamp::format3($item['published'])), 20 22 "$blogURL/" . ($blog['useSlogan'] ? 'entry/' . encodeURL($item['slogan']) : $item['id']), 21 htmlspecialchars('['.$ CHT_name.'] '. fireEvent('ViewListTitle', $item['title'])),23 htmlspecialchars('['.$teamblog_name.'] '. fireEvent('ViewListTitle', $item['title'])), 22 24 ($item['comments'] > 0) ? "({$item['comments']})" : '' 23 25 ), -
sandbox/lib/piece/owner/header.php
r3299 r3300 172 172 <ul id="main-description"> 173 173 <?php 174 $writer =DBQuery::queryCell("SELECT name FROM {$database['prefix']}Users WHERE userid = $_SESSION[admin]");174 $writer = DBQuery::queryCell("SELECT name FROM {$database['prefix']}Users WHERE userid = ".$_SESSION['admin']); 175 175 ?> 176 176 <li id="description-blogger"><span class="text"><?php echo _f('환영합니다. <em>%1</em>님.', htmlspecialchars($writer));?></span></li> -
sandbox/lib/session.php
r3299 r3300 128 128 } 129 129 130 // �����:: ����ν����serid �� admin �����ִ´�130 // Teamblog : insert userid to variable admin when member logins. 131 131 function authorizeSession($userid, $admin) { 132 132 global $database, $service;
