
'admin' and g2_Item.g_canContainChildren=0 AND ( g2_Derivative.g_derivativeType=1 or g2_Derivative.g_derivativeType=3) and g2_Entity.g_modificationTimestamp > $recentitems UNION select c.timestamp as timeorder, date_format(from_unixtime(c.timestamp),'%W %D %M %Y %H:%i') as DatePosted, u.name, u.uid,c.subject, n.title, 'Reply Post' as ptype, c.cid, n.nid as tid1, 0 as tid2 FROM comments c INNER JOIN users u ON u.uid = c.uid INNER JOIN node n ON n.nid=c.nid WHERE (( n.type = 'forum' ) or (n.type ='blog') or (n.type ='poll') or (n.type ='page') or (n.type = 'event')) and n.status=1 and c.timestamp> $recentitems UNION select n.changed as timeorder, date_format(from_unixtime(n.changed),'%W %D %M %Y %H:%i') as DatePosted, u.name, u.uid, n.title, n.title, CONCAT(UPPER(SUBSTRING(n.type,1,1)),SUBSTRING(n.type,2),' Post') as ptype, 0 as tid4, n.nid as tid1, 0 as tid2 FROM node n INNER JOIN users u ON n.uid = u.uid WHERE (( n.type = 'forum' ) or (n.type ='page') or (n.type = 'blog') or (n.type = 'event') or (n.type = 'poll') or (n.type = 'weblink')) and n.status=1 and n.changed > $recentitems UNION SELECT g2_Comment.g_date as timeorder, date_format(from_unixtime(g2_Comment.g_date),'%W %D %M %Y %H:%i') as DatePosted, users.name as User, g2_ExternalIdMap.g_externalId, g2_Comment.g_comment as Photo_Title, g2_Comment.g_subject as Album, 'Gallery Comment' as ptype, g2_Comment.g_id as ItemId, g2_Derivative.g_Id as ThumbId, g2_ChildEntity.g_parentId as ParentGid from g2_Comment LEFT JOIN g2_ExternalIdMap ON g2_Comment.g_commenterId=g2_ExternalIdMap.g_entityId LEFT JOIN users on g2_ExternalIdMap.g_externalId=users.uid LEFT JOIN g2_ChildEntity on g2_Comment.g_id=g2_ChildEntity.g_Id LEFT JOIN g2_Derivative ON g2_ChildEntity.g_parentId=g2_Derivative.g_derivativeSourceId WHERE (g2_Derivative.g_derivativeType=1 or g2_Derivative.g_derivativeType=3) and g2_Comment.g_date > $recentitems ORDER BY timeorder DESC"; $t1=' class="active"'; } else { if ($chosentab == 'Gal') { $query="SELECT g2_Entity.g_modificationTimestamp as timeorder, date_format(from_unixtime(g2_Entity.g_modificationTimestamp),'%W %D %M %Y %H:%i') as DatePosted, g_userName as User, g2_ExternalIdMap.g_externalId, g2_Item.g_title as Photo_Title, parentitem.g_title as Album, 'Gallery Photo' as ptype, g2_Item.g_Id as ItemId, g2_Derivative.g_Id as ThumbId,parentitem.g_Id as ParentGid from g2_Item LEFT JOIN g2_User on g2_Item.g_OwnerID=g2_User.g_Id LEFT JOIN g2_ChildEntity ON g2_Item.g_Id=g2_ChildEntity.g_Id LEFT JOIN g2_Item as parentitem ON g2_ChildEntity.g_parentId=parentitem.g_Id LEFT JOIN g2_ExternalIdMap ON g2_ExternalIdMap.g_entityId=g2_Item.g_ownerId LEFT JOIN g2_Derivative ON g2_Item.g_Id=g2_Derivative.g_derivativeSourceId LEFT JOIN g2_Entity ON g2_Item.g_id=g2_Entity.g_Id WHERE g_userName <>'admin' and g2_Item.g_canContainChildren=0 AND ( g2_Derivative.g_derivativeType=1 or g2_Derivative.g_derivativeType=3) and g2_Entity.g_modificationTimestamp > $recentitems UNION SELECT g2_Comment.g_date as timeorder, date_format(from_unixtime(g2_Comment.g_date),'%W %D %M %Y %H:%i') as DatePosted, users.name as User, g2_ExternalIdMap.g_externalId, g2_Comment.g_comment as Photo_Title, g2_Comment.g_subject as Album, 'Gallery Comment' as ptype, g2_Comment.g_id as ItemId, g2_Derivative.g_Id as ThumbId, g2_ChildEntity.g_parentId as ParentGid from g2_Comment LEFT JOIN g2_ExternalIdMap ON g2_Comment.g_commenterId=g2_ExternalIdMap.g_entityId LEFT JOIN users on g2_ExternalIdMap.g_externalId=users.uid LEFT JOIN g2_ChildEntity on g2_Comment.g_id=g2_ChildEntity.g_Id LEFT JOIN g2_Derivative ON g2_ChildEntity.g_parentId=g2_Derivative.g_derivativeSourceId WHERE (g2_Derivative.g_derivativeType=1 or g2_Derivative.g_derivativeType=3) and g2_Comment.g_date > $recentitems ORDER BY timeorder DESC"; $t2=' class="active"'; } else { if ($chosentab == 'Tri') { $query="select c.timestamp as timeorder, date_format(from_unixtime(c.timestamp),'%W %D %M %Y %H:%i') as DatePosted, u.name as User, u.uid as g_externalId,c.subject as Photo_Title, n.title as Album, 'Reply Post' as ptype, c.cid as ItemId, n.nid as ThumbId, 0 as ParentGid FROM comments c INNER JOIN users u ON u.uid = c.uid INNER JOIN node n ON n.nid=c.nid LEFT JOIN forum nf ON n.nid=nf.nid WHERE n.type = 'forum' and nf.tid=149 and n.status=1 and c.timestamp> $recentitems UNION select n.changed as timeorder, date_format(from_unixtime(n.changed),'%W %D %M %Y %H:%i') as DatePosted, u.name, u.uid, n.title, n.title, CONCAT(UPPER(SUBSTRING(n.type,1,1)),SUBSTRING(n.type,2),' Post') as ptype, 0 as tid4, n.nid as tid1, 0 as tid2 FROM node n INNER JOIN users u ON n.uid = u.uid LEFT JOIN forum nf ON n.nid=nf.nid WHERE n.type = 'forum' and nf.tid=149 and n.status=1 and n.changed > $recentitems ORDER BY timeorder DESC"; $t3=' class="active"'; } else { $query="select c.timestamp as timeorder, date_format(from_unixtime(c.timestamp),'%W %D %M %Y %H:%i') as DatePosted, u.name as User, u.uid as g_externalId,c.subject as Photo_Title, n.title as Album, 'Reply Post' as ptype, c.cid as ItemId, n.nid as ThumbId, 0 as ParentGid FROM comments c INNER JOIN users u ON u.uid = c.uid INNER JOIN node n ON n.nid=c.nid LEFT JOIN forum nf ON n.nid=nf.nid WHERE (( n.type = 'forum' ) or (n.type ='blog') or (n.type ='page') or (n.type ='poll') or (n.type = 'event')) and nf.tid<>149 and n.status=1 and c.timestamp> $recentitems UNION select n.changed as timeorder, date_format(from_unixtime(n.changed),'%W %D %M %Y %H:%i') as DatePosted, u.name, u.uid, n.title, n.title, CONCAT(UPPER(SUBSTRING(n.type,1,1)),SUBSTRING(n.type,2),' Post') as ptype, 0 as tid4, n.nid as tid1, 0 as tid2 FROM node n INNER JOIN users u ON n.uid = u.uid LEFT JOIN forum nf ON n.nid=nf.nid WHERE (( n.type = 'forum' ) or (n.type ='page') or (n.type = 'blog') or (n.type = 'event') or (n.type = 'poll') or (n.type = 'weblink')) and nf.tid<>149 and n.status=1 and n.changed > $recentitems ORDER BY timeorder DESC"; $t4=' class="active"'; } } } print '
| Description | Title | Posted By | Date Posted/Updated | Album or Main Title |
| $r1->Photo_Title | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | $r1->Album | |
| Gallery Photo | $r1->Photo_Title | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | $r1->Album |
| ".substr($r1->Photo_Title,0,15)."... | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | $r1->Album | |
| Gallery Comment | ".substr($r1->Photo_Title,0,15)."... | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | $r1->Album |
| $r1->ptype | ".$r1->Photo_Title." | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | ".l($r1->Album,"node/".$r1->ThumbId)." |
| $r1->ptype | ".$r1->Photo_Title." | ".l($r1->User,"user/".$r1->g_externalId)." | $r1->DatePosted | ".l($r1->Album,"node/".$r1->ThumbId)." |
"; if ($startnum==1) { $output.='Next'; } else { $output.='Previous '; $output.='Next'; } $output.="