[Logicampus-cvs] logicampus/src/logicreate/services/users articles.lcp, 1.2, 1.3 blog.lcp, 1.1, 1.2
Brought to you by:
trilexcom
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/users In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24452/users Modified Files: articles.lcp blog.lcp chat.lcp maillist.lcp online.lcp view.lcp viewPhoto.lcp Log Message: Change function "next_record" to "nextRecord". Index: viewPhoto.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/viewPhoto.lcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** viewPhoto.lcp 18 Nov 2006 00:09:35 -0000 1.2 --- viewPhoto.lcp 8 Oct 2007 14:31:27 -0000 1.3 *************** *** 26,33 **** $sql = "select * from userPhotos where pkey='$pkey'"; $db->queryOne($sql); ! $t[image] = $db->Record; $db->queryOne("select username, firstname, lastname from profile where username='".$t[image][username]."'"); ! $t[profile] = $db->Record; $db->query("update userPhotos set count=count+1 where pkey='$pkey'"); --- 26,33 ---- $sql = "select * from userPhotos where pkey='$pkey'"; $db->queryOne($sql); ! $t[image] = $db->record; $db->queryOne("select username, firstname, lastname from profile where username='".$t[image][username]."'"); ! $t[profile] = $db->record; $db->query("update userPhotos set count=count+1 where pkey='$pkey'"); Index: view.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/view.lcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** view.lcp 18 Nov 2006 00:09:35 -0000 1.3 --- view.lcp 8 Oct 2007 14:31:27 -0000 1.4 *************** *** 40,47 **** $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $t['user'] = $db->Record; ! $t['photo'] = is_file(IMAGES_PATH.'photos/'.$db->Record['photo']) ! ? IMAGES_URL.'photos/'.$db->Record['photo'] : IMAGES_URL.'noimage.png'; --- 40,47 ---- $db->RESULT_TYPE = MYSQL_ASSOC; $db->queryOne($sql); ! $t['user'] = $db->record; ! $t['photo'] = is_file(IMAGES_PATH.'photos/'.$db->record['photo']) ! ? IMAGES_URL.'photos/'.$db->record['photo'] : IMAGES_URL.'noimage.png'; Index: online.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/online.lcp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** online.lcp 2 Sep 2007 16:32:38 -0000 1.5 --- online.lcp 8 Oct 2007 14:31:27 -0000 1.6 *************** *** 31,36 **** $i=1; ! while($db->next_record()) { ! $t['users'][$i++]= $db->Record; } $t['anonymous'] = $x - count($t['users']); --- 31,36 ---- $i=1; ! while($db->nextRecord()) { ! $t['users'][$i++]= $db->record; } $t['anonymous'] = $x - count($t['users']); Index: articles.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/articles.lcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** articles.lcp 18 Nov 2006 00:09:35 -0000 1.2 --- articles.lcp 8 Oct 2007 14:31:27 -0000 1.3 *************** *** 23,34 **** $sql = "select pkey, title, introtext, maintext, notes from articles where author='".$u->username."' and status='Return'"; $db->query($sql); ! while($db->next_record()) { ! $t[returned][] = $db->Record; } # Show all pending articles $sql = "select title from articles where author='".$u->username."' and status='Pending'"; $db->query($sql); ! while($db->next_record()) { ! $t[pending][] = $db->Record; } } --- 23,34 ---- $sql = "select pkey, title, introtext, maintext, notes from articles where author='".$u->username."' and status='Return'"; $db->query($sql); ! while($db->nextRecord()) { ! $t[returned][] = $db->record; } # Show all pending articles $sql = "select title from articles where author='".$u->username."' and status='Pending'"; $db->query($sql); ! while($db->nextRecord()) { ! $t[pending][] = $db->record; } } *************** *** 37,42 **** $sql = "select pkey, title, introtext, maintext, author from articles where pkey='".$arg->getvars[pkey]."'"; $db->queryOne($sql); ! if ($db->Record[author] == $u->username) { ! $t[article] = $db->Record; } else { $t[error] = "There was an error re-submitting this article. Please contact the webmaster."; --- 37,42 ---- $sql = "select pkey, title, introtext, maintext, author from articles where pkey='".$arg->getvars[pkey]."'"; $db->queryOne($sql); ! if ($db->record[author] == $u->username) { ! $t[article] = $db->record; } else { $t[error] = "There was an error re-submitting this article. Please contact the webmaster."; *************** *** 47,51 **** function editReturnPostRun(&$db,&$u,&$arg,&$t) { $db->queryOne("select author from articles where pkey='".$arg->postvars[pkey]."'"); ! if($u->username != $db->Record[author]) { $t[error] = "You are not the owner of this article."; $this->run(&$db,&$u,&$arg,&$t); --- 47,51 ---- function editReturnPostRun(&$db,&$u,&$arg,&$t) { $db->queryOne("select author from articles where pkey='".$arg->postvars[pkey]."'"); ! if($u->username != $db->record[author]) { $t[error] = "You are not the owner of this article."; $this->run(&$db,&$u,&$arg,&$t); Index: chat.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/chat.lcp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** chat.lcp 11 Feb 2007 22:41:08 -0000 1.4 --- chat.lcp 8 Oct 2007 14:31:27 -0000 1.5 *************** *** 55,60 **** $lcObj->templateName = "chat_main"; # $db->query("select pkey,chatName,chatDesc from chatArchives ORDER BY pkey DESC"); ! # while($db->next_record()) { ! # $x[] = $db->Record; # } $t['archiveList'] = $x; --- 55,60 ---- $lcObj->templateName = "chat_main"; # $db->query("select pkey,chatName,chatDesc from chatArchives ORDER BY pkey DESC"); ! # while($db->nextRecord()) { ! # $x[] = $db->record; # } $t['archiveList'] = $x; *************** *** 112,117 **** $lcObj->templateName = "chat_show"; $db->query("select * from chatThreads"); ! while($db->next_record()) { ! extract($db->Record); $x = "<a href=\"#\" onClick=\"window.open('"; $x .= appurl("{$this->module_name}/chat/event=admin/chatThread=$chatThread"); --- 112,117 ---- $lcObj->templateName = "chat_show"; $db->query("select * from chatThreads"); ! while($db->nextRecord()) { ! extract($db->record); $x = "<a href=\"#\" onClick=\"window.open('"; $x .= appurl("{$this->module_name}/chat/event=admin/chatThread=$chatThread"); *************** *** 147,151 **** $arg->templateName='chat_usershow'; $db->queryOne("select * from lcUsers where username='".$arg->getvars['username']."'"); ! $t['usershow'] = $db->Record; $this->presentor = "emptypresentation"; } --- 147,151 ---- $arg->templateName='chat_usershow'; $db->queryOne("select * from lcUsers where username='".$arg->getvars['username']."'"); ! $t['usershow'] = $db->record; $this->presentor = "emptypresentation"; } *************** *** 154,159 **** $arg->templateName='chat_userlist'; $db->query("select distinct(username) from chat where chat_id='{$this->chat_id}' and timeint>=".(time()-900)." order by username"); ! while($db->next_record()) { ! $t['users'][] = $db->Record; } $this->presentor = "emptypresentation"; --- 154,159 ---- $arg->templateName='chat_userlist'; $db->query("select distinct(username) from chat where chat_id='{$this->chat_id}' and timeint>=".(time()-900)." order by username"); ! while($db->nextRecord()) { ! $t['users'][] = $db->record; } $this->presentor = "emptypresentation"; *************** *** 225,230 **** $db->query($sql); ! while($db->next_record()) { ! extract($db->Record); $message = stripslashes($message); $nameclass = "regname$style"; --- 225,230 ---- $db->query($sql); ! while($db->nextRecord()) { ! extract($db->record); $message = stripslashes($message); $nameclass = "regname$style"; *************** *** 363,368 **** $db->query($sql); ! while($db->next_record()) { ! extract($db->Record); $message = stripslashes($message); $post = "<a href=\"".appurl("chat/main/event=moveQ/move=1/pkey=$pkey")."\">approve</a>\n"; --- 363,368 ---- $db->query($sql); ! while($db->nextRecord()) { ! extract($db->record); $message = stripslashes($message); $post = "<a href=\"".appurl("chat/main/event=moveQ/move=1/pkey=$pkey")."\">approve</a>\n"; *************** *** 386,390 **** if ($lcObj->getvars["move"]==1) { $db->queryOne("select * from chatQ where pkey=$pkey"); ! extract($db->Record); $message = addslashes($message); $username = addslashes($username); --- 386,390 ---- if ($lcObj->getvars["move"]==1) { $db->queryOne("select * from chatQ where pkey=$pkey"); ! extract($db->record); $message = addslashes($message); $username = addslashes($username); Index: maillist.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/maillist.lcp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** maillist.lcp 18 Nov 2006 00:09:35 -0000 1.2 --- maillist.lcp 8 Oct 2007 14:31:27 -0000 1.3 *************** *** 24,33 **** function Run (&$db, &$u, &$arg, &$t) { $db->query("select gid, groupName from lcGroups where gid like 'ml_%'"); ! while($db->next_record()) { ! $t['maillist'][$db->Record['gid']] = $db->Record; ! if (in_array($db->Record['gid'], $u->groups)) { ! $t['maillist'][$db->Record['gid']][checked] = 'yes'; } --- 24,33 ---- function Run (&$db, &$u, &$arg, &$t) { $db->query("select gid, groupName from lcGroups where gid like 'ml_%'"); ! while($db->nextRecord()) { ! $t['maillist'][$db->record['gid']] = $db->record; ! if (in_array($db->record['gid'], $u->groups)) { ! $t['maillist'][$db->record['gid']][checked] = 'yes'; } *************** *** 70,77 **** $db->query($sql); ! while($db->next_record()) { ! if (in_array($db->Record['gid'], $list)) { ! $t['list'][] = $db->Record['groupName']; } } --- 70,77 ---- $db->query($sql); ! while($db->nextRecord()) { ! if (in_array($db->record['gid'], $list)) { ! $t['list'][] = $db->record['groupName']; } } Index: blog.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/users/blog.lcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blog.lcp 17 Dec 2003 00:07:23 -0000 1.1 --- blog.lcp 8 Oct 2007 14:31:27 -0000 1.2 *************** *** 194,199 **** $message = "$x\n\n\nYou asked to be notified of any new postings to the '".$originalEntry->blogEntryTitle."' thread on the '".$blog->blogName."' web log. Please visit ".modurl("blog/".$blog->blogOwner."/".$originalEntry->blogEntryId."/event=read")." to read new comments made to that thread."; ! while($db->next_record()){ ! $mails[$db->Record[0]] = $db->Record[0]; } while(list($k,$v) = each($mails)) { --- 194,199 ---- $message = "$x\n\n\nYou asked to be notified of any new postings to the '".$originalEntry->blogEntryTitle."' thread on the '".$blog->blogName."' web log. Please visit ".modurl("blog/".$blog->blogOwner."/".$originalEntry->blogEntryId."/event=read")." to read new comments made to that thread."; ! while($db->nextRecord()){ ! $mails[$db->record[0]] = $db->record[0]; } while(list($k,$v) = each($mails)) { |